More Awesome Than You!
Welcome, Guest. Please login or register.
2024 May 10, 07:54:59

Login with username, password and session length
Search:     Advanced search
540274 Posts in 18066 Topics by 6513 Members
Latest Member: Linnie
* Home Help Search Login Register
+  More Awesome Than You!
|-+  TS2: Burnination
| |-+  The Podium
| | |-+  Removing stickiness code
0 Members and 1 Chinese Bot are viewing this topic. « previous next »
Pages: [1] THANKS THIS IS GREAT Print
Author Topic: Removing stickiness code  (Read 4256 times)
dizzy
Souped!
*
Posts: 1572


unplugged


View Profile
Removing stickiness code
« on: 2006 August 25, 23:34:34 »
THANKS THIS IS GREAT

Could someone who codes check this out? I think this should work, but not too sure:

Code:
# kill stickiness

  Local 0 := 0

loop1:
  Get in Temp 0 - ID - Next Obj of Category(Const 0x106:0x0D, Local 0); true: next, false: done1  # 0x2CE, chair
  Stack Object := Temp 0;
  Local 0 := Stack Object;
  Stack Object's flags (0x8) Flag Set? in use; true: skip1, false: loop1

skip1:
  Stack Object := 0;

loop2:
  Set to Next: person; true: next, false: skip2
  Local 1 := stack obj's person data ci: Current Interaction Object ID (0x50);
  Local 1 == Local 0; true: loop1, false: loop2

skip2:
  Stack Object := Local 0;
  Stack Object's flags (0x8) Clear Flag in use; true: loop1

# do the next thing (doors, flamingos, etc.)

done1:

Obviously, this would just be called every now and then to look for stuck things and unstick them.
Logged

dizzy
Souped!
*
Posts: 1572


unplugged


View Profile
Re: Removing stickiness code
« Reply #1 on: 2006 August 26, 12:36:17 »
THANKS THIS IS GREAT

In retrospect, this obviously wouldn't work.  Tongue Need to think a little deeper.
Logged

Theo
Lipless Loser
***
Posts: 602



View Profile
Re: Removing stickiness code
« Reply #2 on: 2006 August 26, 14:57:28 »
THANKS THIS IS GREAT

Maybe it could try to find objects that are in use by sims no longer present on the lot.

Other that that, it's pretty much human observation that determines if a object is stuck Tongue
Logged
dizzy
Souped!
*
Posts: 1572


unplugged


View Profile
Re: Removing stickiness code
« Reply #3 on: 2006 August 27, 01:13:35 »
THANKS THIS IS GREAT

No, I've thought about this and it's not that difficult. You simply need to exclude two classes of chair situations:

1) Chairs that contain sims (probably filling a slot).
2) Chairs that have a sim en route to them for some purpose.

Given that you only have table and desk chairs for various purposes, that could simplify things. At this point, though, I'm just looking for the simplest possible routine.  Tongue
Logged

dizzy
Souped!
*
Posts: 1572


unplugged


View Profile
Re: Removing stickiness code
« Reply #4 on: 2006 August 28, 06:07:33 »
THANKS THIS IS GREAT

Here's a rough draft of some working code (using CBoy's portal monitor as the base):

Code:
###
# Group = 0xFFFFFFFF, Instance = 0x1001
# Title = Function - Main
#
# Format = 8007, Params = 0, Locals = 4
# Tree type = 0, Header flag = 0, Tree version = FFFF800D (-32755)

     0: Idle(1); true: 1, false: 1
     1: Local 0 := Stack Object; true: 2, false: 2
     2: Stack Object := 0; true: 3, false: 3
     3: Set to Next: object of type GUID 0xCC7B08F8 (0x7F856F00: Portal - Car - Service Start); true: 4, false: C
     4: Stack Object := 0; true: 5, false: 5
     5: Set to Next: object of type GUID 0x6C7B0905 (0x7F856F00: Portal - Car - Service Stop); true: 6, false: C
     6: Stack Object := 0; true: 7, false: 7
     7: Set to Next: object of type GUID 0xCC203477 (0x7F856F00: Portal - Car - Start); true: 8, false: C
     8: Stack Object := 0; true: 9, false: 9
     9: Set to Next: object of type GUID 0x865A6812 (0x7F856F00: Portal - Car - Stop); true: A, false: C
     A: Stack Object := 0; true: B, false: B
     B: Set to Next: object of type GUID 0x81E6BEF9 (0x7F19EC55: Portal - Pedestrian); true: D, false: C
     C: Dialog: Text Notification: [Private STR# 0x12D:0x0], TNS Sim Type, priority 1, timeout 30, putting Text ID in temp 0, icon: automatic; true: D, false: error
     D: Stack Object := Local 0; true: E, false: E
     E: Idle(1); true: F, false: F
     F: Stack Object := 0; true: 10, false: error
    10: Set to Next: person; true: 11, false: 12
    11: stack obj's person data Censorship Flags (0x1E) := 0; true: 10, false: error
    12: Local 1 ++ and < 256 (0x100); true: D, false: 13
    13: Local 1 := 0; true: 14, false: error
    14: Local 2 := 0; true: 15, false: error
    15: Get in Temp 0 - ID - Next Obj of Category(Const 0x106(Category):0xD, Local 1); true: 16, false: 27
    16: Stack Object := Temp 0; true: 17, false: error
    17: Local 1 := Stack Object; true: 18, false: error
    18: Stack Object's flags (0x8) Flag Set? in use; true: 19, false: 15
    19: stack object's slot 0 == 0; true: 1A, false: 15
    1A: stack object's slot 1 == 0; true: 1B, false: 15
    1B: Stack Object := 0; true: 1C, false: error
    1C: Set to Next: person; true: 1D, false: 24
    1D: Local 3 := Stack Object; true: 1E, false: error
    1E: Stack Object := stack obj's person data ci: Current Interaction Object ID (0x50); true: 1F, false: error
    1F: Verify - Object ID(Stack Object); true: 20, false: 23
    20: Stack Object's category (0x3B) == Const 0x106(Category):0x24; true: 15, false: 21
    21: Stack Object's category (0x3B) == Const 0x106(Category):0x25; true: 15, false: 22
    22: Stack Object's category (0x3B) == Const 0x106(Category):0x63; true: 15, false: 23
    23: Stack Object := Local 3; true: 1C, false: error
    24: Stack Object := Local 1; true: 25, false: error
    25: Stack Object's flags (0x8) Clear Flag in use; true: 26, false: error
    26: Local 2 += 1; true: 15, false: error
    27: Local 1 := 0; true: 28, false: error
    28: Local 2 != 0; true: 29, false: 2
    29: Dialog: Text Notification: [Private STR# 0x12D:0x1], TNS Sim Type, priority 1, timeout 30, putting Text ID in temp 0, icon: automatic; true: 2, false: error

It's a little slow on the trigger but it seems to get the job done.
Logged

jsalemi
Town Crier
Vacuous Vegetable
*****
Posts: 4475


In dog we trust, all others pay cash...


View Profile
Re: Removing stickiness code
« Reply #5 on: 2006 August 28, 13:14:11 »
THANKS THIS IS GREAT

Will this fix the problem of dining room chairs getting stuck in dorms?  I seem to have  a rash of that lately, to the point where I play uni with the testing cheats on so I can force errors on them. I had one dorm were every chair in the dining hall got stuck, and that was something like 20 of them.
Logged

Excelsior, you fathead!
I am Canadian.
Gwill
Terrible Twerp
****
Posts: 2162



View Profile
Re: Removing stickiness code
« Reply #6 on: 2006 August 28, 16:14:05 »
THANKS THIS IS GREAT

Will this fix the problem of dining room chairs getting stuck in dorms?  I seem to have  a rash of that lately, to the point where I play uni with the testing cheats on so I can force errors on them. I had one dorm were every chair in the dining hall got stuck, and that was something like 20 of them.

I had a lot of trouble with that, but it conveniently disappeared when I removed noassignmentlitter, although Pescado claims that's not related.
Logged

Dibs on Darth Telligent!
INTJ bordering on P
Want to know where babies come from?
jsalemi
Town Crier
Vacuous Vegetable
*****
Posts: 4475


In dog we trust, all others pay cash...


View Profile
Re: Removing stickiness code
« Reply #7 on: 2006 August 28, 16:34:50 »
THANKS THIS IS GREAT

Will this fix the problem of dining room chairs getting stuck in dorms?  I seem to have  a rash of that lately, to the point where I play uni with the testing cheats on so I can force errors on them. I had one dorm were every chair in the dining hall got stuck, and that was something like 20 of them.

I had a lot of trouble with that, but it conveniently disappeared when I removed noassignmentlitter, although Pescado claims that's not related.

Hmm.  I don't currently have anyone in Uni in my test hood, but I'll have to disable that next time I do and see if it solves the problem. I did check with the hack conflict detector, and nothing shows up that conflicts with noassignmentlitter, so I know it's not a conflict causing it.
Logged

Excelsior, you fathead!
I am Canadian.
dizzy
Souped!
*
Posts: 1572


unplugged


View Profile
Re: Removing stickiness code
« Reply #8 on: 2006 August 28, 18:11:09 »
THANKS THIS IS GREAT

I think noassignmentlitter is a good idea, but it needs to work a little differently IMHO.
Logged

J. M. Pescado
Fat Obstreperous Jerk
El Presidente
*****
Posts: 26283



View Profile
Re: Removing stickiness code
« Reply #9 on: 2006 August 28, 18:23:10 »
THANKS THIS IS GREAT

I've seen it happen even in dormie-free dorms, so it's not directly related, although the dormie habit of repeatedly chain-dumping assignments may simply make it worse. Left to themselves, dormies will wallpaper your entire dorm in junk assignments abandoned everywhere.
Logged

Grant me the serenity to accept the things I cannot change, the courage to change the things I cannot accept, and the wisdom to hide the bodies of those I had to kill because they pissed me off.
Ominous
Asinine Airhead

Posts: 15


...there is an ominous cloud in the distance...


View Profile
Re: Removing stickiness code
« Reply #10 on: 2006 September 10, 21:02:36 »
THANKS THIS IS GREAT

I have also been having problems with dining chairs becoming unusable.  "Force Error" does nothing to fix it.  I was downtown at "The Hub" and eventually all of the chairs became unusable forcing sims to eat downstairs at the bar.  Not sure if this is related or not.
Logged

There is an ominous cloud in the distance though at present it be no bigger than a man's hand.
  -Arthur Eddington
dizzy
Souped!
*
Posts: 1572


unplugged


View Profile
Re: Removing stickiness code
« Reply #11 on: 2006 September 12, 02:24:53 »
THANKS THIS IS GREAT

I think I may have a partial solution to the assignment litter in the cafeteria. This makes the cafeteria server look for unguarded homework to dispose of.

EDIT: Changed so it waits for the homework's owner to leave the room.  Tongue

* cleanup-homework1b.zip (0.56 KB - downloaded 98 times.)
« Last Edit: 2006 September 12, 04:21:23 by dizzy » Logged

Pages: [1] Print 
« previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.087 seconds with 20 queries.