More Awesome Than You!

TS2: Burnination => The Podium => Topic started by: dizzy on 2006 August 25, 23:34:34



Title: Removing stickiness code
Post by: dizzy on 2006 August 25, 23:34:34
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.


Title: Re: Removing stickiness code
Post by: dizzy on 2006 August 26, 12:36:17
In retrospect, this obviously wouldn't work.  :P Need to think a little deeper.


Title: Re: Removing stickiness code
Post by: Theo on 2006 August 26, 14:57:28
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 :P


Title: Re: Removing stickiness code
Post by: dizzy on 2006 August 27, 01:13:35
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.  :P


Title: Re: Removing stickiness code
Post by: dizzy on 2006 August 28, 06:07:33
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.


Title: Re: Removing stickiness code
Post by: jsalemi on 2006 August 28, 13:14:11
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.


Title: Re: Removing stickiness code
Post by: Gwill on 2006 August 28, 16:14:05
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.


Title: Re: Removing stickiness code
Post by: jsalemi on 2006 August 28, 16:34:50
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.


Title: Re: Removing stickiness code
Post by: dizzy on 2006 August 28, 18:11:09
I think noassignmentlitter is a good idea, but it needs to work a little differently IMHO.


Title: Re: Removing stickiness code
Post by: J. M. Pescado on 2006 August 28, 18:23:10
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.


Title: Re: Removing stickiness code
Post by: Ominous on 2006 September 10, 21:02:36
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.


Title: Re: Removing stickiness code
Post by: dizzy on 2006 September 12, 02:24:53
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.  :P