More Awesome Than You!
Welcome,
Guest
. Please
login
or
register
.
2024 November 22, 12:10:33
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Search:
Advanced search
SUPPORT THE MUNICIPALITY!
Have you destroyed a paysite today?
"Jelenedra" is the new "gay".
All Lythdans are stupid and suck!
DEATH TO ALL STUPID HAIRY-BELLIED NESSES!
All Kewians are stupid and suck! Accept no Kewian-based substitutes!
Clearly, BlueSoup has failed us! You must not! BlueSoup has a fat head!
Hobbsee has a
scrawny pencil neck.
Rohina the Ugly Butted is a Horny Turkey
540287
Posts in
18067
Topics by
6545
Members
Latest Member:
cincinancy
More Awesome Than You!
TS2: Burnination
The Podium
Check Tree (in)efficiency
0 Members and 2 Chinese Bots are viewing this topic.
« previous
next »
Pages:
[
1
]
Author
Topic: Check Tree (in)efficiency (Read 6880 times)
rufio
Non-Standard
Uncouth Undesirable
Posts: 3030
More Nonstandard Than You
Check Tree (in)efficiency
«
on:
2009 April 26, 00:35:02 »
I am having some problems with "Too Many Iterations" errors from wants check trees with my extented family hack - the hack is
here
, but if you don't feel like wading through simantics, I have attached a pseudocode summary of the four extended family BHAVs to this post. The problem check tree is CT - Family Reunion, which runs through the neighborhood looking for 5 sims that are related to the want-roller. Naturally, I have set it up to check for extended family relationships using the BHAVs detailed in the pseudocode. Formerly, I was only having this problem when the want-roller was a certain dead sim who I suspect may be somewhat borked, so I put in a check to prevent the loop in CT - Family Reunion from starting when the want-roller was dead. But now, I have two grandkids born to a pair of (alive, non-borky) family sims, and every time I reroll their wants it's "Too Many Iterations" and empty want slots. One of these sims is a former townie with
no
parents, and thus most of the code blocks should have been skipped anyway.
I don't think my algorithms are too involved; they don't call themselves, they don't call each other, and they don't call
any
BHAVs except the Verify - Neighbor ID BHAV and global 0x0337; everything else is primitives. Am I wrong? Is there a better way to do it? Is global 0x0337 some kind of inefficient waste of space and I just had no idea? I did try to call 0x0337 beforehand and simply pass the parent NIDS to the four functions, but that would mean I need 6 arguments, and SimPE doesn't seem to want to let me use more than 4.
Help?
Incidentally, I don't understand the first part of some of these error messages - something to do with Object Scripts and display cases? I've attached an example.
pseudocode.txt
(2.15 KB - downloaded 286 times.)
Logged
Quote from: Tsenatserix on 2010 December 08, 08:01:19
I was thinking about these things and I am a feminist.
tunaisafish
Axe Murderer
Exasperating Eyesore
Posts: 245
Re: Check Tree (in)efficiency
«
Reply #1 on:
2009 April 26, 01:52:18 »
The Script Errors are LUA errors.
I've posted the LUA source in Trogdor so you can search those function names an hopefully get a better idea of what is going on there.
As for passing more than 4 args; You can store the arguments in Temps, and use the 'Pass Temps' button on the wizard.
This copies the necessary temp values into param for the called bhav (Temp0 -> Param 0, etc...)
So if that global bhav already uses more than 4, then you can supply them without having to edit it.
Logged
Tuna's Tweaks
rufio
Non-Standard
Uncouth Undesirable
Posts: 3030
More Nonstandard Than You
Re: Check Tree (in)efficiency
«
Reply #2 on:
2009 April 26, 02:03:56 »
Ah, thanks, I forgot about Temps. Why is there a limit on four arguments, though? Four arguments is only 8 operands, but in the editor you get 16.
Logged
Quote from: Tsenatserix on 2010 December 08, 08:01:19
I was thinking about these things and I am a feminist.
J. M. Pescado
Fat Obstreperous Jerk
El Presidente
Posts: 26288
Re: Check Tree (in)efficiency
«
Reply #3 on:
2009 April 26, 02:17:51 »
Interesting, there is a horrible bug which occurs if a function seems to use more than 8 arguments. This is what causes the Apartment Door Bug, that more than 8 arguments will not pass successfully...and it seems this bug is shared, either by intent or accident, with SimPE. Weird.
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.
rufio
Non-Standard
Uncouth Undesirable
Posts: 3030
More Nonstandard Than You
Re: Check Tree (in)efficiency
«
Reply #4 on:
2009 April 26, 02:34:32 »
Tuna, I looked at your most recent thread in BoT, but it does not make much more sense to me than opening the Object Scripts/ObjectScripts.package in SimPE did, and I have no idea what display cases have to do with family relationships or the wants controller, especially since the only actual display cases in my game are in a community lot which I have placed but never used, including never having had any sims visit it.
Logged
Quote from: Tsenatserix on 2010 December 08, 08:01:19
I was thinking about these things and I am a feminist.
tunaisafish
Axe Murderer
Exasperating Eyesore
Posts: 245
Re: Check Tree (in)efficiency
«
Reply #5 on:
2009 April 26, 02:50:24 »
Quote from: rufio on 2009 April 26, 02:03:56
Ah, thanks, I forgot about Temps. Why is there a limit on four arguments, though? Four arguments is only 8 operands, but in the editor you get 16.
The 16 Operands (bytes) are used by the 'node'. They vary depending whether you ar calling a primitive or calling a function. Some bytes will be used as flags, and some will be data.
When calling another bhav. If the flags are set to pass 4 args, then 4*3bytes are needed as data. Each arg is described with one byte showing the 'owner' (local, temp, param, literal, const, etc.), and 2 bytes for the offset (or value).
The '4 arg' and 'use temps' methods are the most common ones used in the game. There is a way to pass 8 constants though in one node using only the operands - though it's not that useful. There's an old thread on MTS2 you can use if you ever need that ability. If you set the operands manually SimPE will tell you what you are actuallly passing.
Most of those 16 Operands have been worked out over the years by dozens of people, and there are still some unknowns.
Quote from: J. M. Pescado on 2009 April 26, 02:17:51
Interesting, there is a horrible bug which occurs if a function seems to use more than 8 arguments. This is what causes the Apartment Door Bug, that more than 8 arguments will not pass successfully...and it seems this bug is shared, either by intent or accident, with SimPE. Weird.
The only BHAV I've seen that use more than 8 args are called from Entry Points, (using the FFFF... Ops (aka pass temps)).
The args above param7 are consistent, but I couldn't figure out where they come from.
@Rufio, yeah I took a quick look at that lua, and wondered what the hell it had to do with relationships too.
ETA: Link to the 'more than 8 args' discussion at MTS2.
http://www.modthesims2.com/showthread.php?t=306923
«
Last Edit: 2009 April 26, 03:07:44 by tunaisafish
»
Logged
Tuna's Tweaks
J. M. Pescado
Fat Obstreperous Jerk
El Presidente
Posts: 26288
Re: Check Tree (in)efficiency
«
Reply #6 on:
2009 April 26, 03:06:19 »
I haven't seen it. If you want to look at one that is broken, look at 208A in DoorGlobals. You know of one that passes more than 8 and actually works?
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.
rufio
Non-Standard
Uncouth Undesirable
Posts: 3030
More Nonstandard Than You
Re: Check Tree (in)efficiency
«
Reply #7 on:
2009 April 26, 03:31:14 »
Quote from: tunaisafish on 2009 April 26, 02:50:24
If the flags are set to pass 4 args, then 4*3bytes are needed as data. Each arg is described with one byte showing the 'owner' (local, temp, param, literal, const, etc.), and 2 bytes for the offset (or value).
Oh right... duh.
Quote
@Rufio, yeah I took a quick look at that lua, and wondered what the hell it had to do with relationships too.
I had thought before that they might be something to do with the NIDs being misinterpreted as Object IDs, like the SOs that don't have anything to do with anything, but yeah.
Logged
Quote from: Tsenatserix on 2010 December 08, 08:01:19
I was thinking about these things and I am a feminist.
tunaisafish
Axe Murderer
Exasperating Eyesore
Posts: 245
Re: Check Tree (in)efficiency
«
Reply #8 on:
2009 April 26, 04:17:52 »
@Pes, I don't know of any offhand.
The one you fixed is passing more than 8. If it was passing zero's instead of the args then SimPE is doing a better job than Edith
If not, then something has changed since NL ~ it was about then that the flags causing "all zeros" to be passed was found.
That might be the Numenor was talking about. Param 8 is labelled as 'moving foot' somewhere, then gets labelled in another (and used) as a boolean '[FBA/FFO?]'.
I think that param 8 is something to do with "Find Best Action/Find Functional O???", and it's only used to decide whether to display a thought bubble. So if param 8 is still broke then it's not a biggie.
Logged
Tuna's Tweaks
J. M. Pescado
Fat Obstreperous Jerk
El Presidente
Posts: 26288
Re: Check Tree (in)efficiency
«
Reply #9 on:
2009 April 26, 05:11:33 »
Quote from: tunaisafish on 2009 April 26, 04:17:52
The one you fixed is passing more than 8. If it was passing zero's instead of the args then SimPE is doing a better job than Edith
If not, then something has changed since NL ~ it was about then that the flags causing "all zeros" to be passed was found.
It was passing zeroes. SimPE 68, the one I'm still using, also claims that this particular call is "passing zeroes". In fact, it will pass zeroes even if called using explicit 4-arg format, and 68 will still interpret this as "passing zeroes", which actually happens in the game, too, meaning the bug is shared between them. Since only the first arguments are even USED for anything, I changed the pass-format so that the relevant arguments would be properly passed.
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.
rufio
Non-Standard
Uncouth Undesirable
Posts: 3030
More Nonstandard Than You
Re: Check Tree (in)efficiency
«
Reply #10 on:
2009 April 26, 14:50:48 »
Ok, I tried rewriting my hack so that it calls 0x0337 before the four other BHAVs and then passes the results via temps, but it still complains of "Too Many Iterations". What exactly counts as "Too Many Iterations" in check trees? Is there any way to change it to something more reasonable?
Logged
Quote from: Tsenatserix on 2010 December 08, 08:01:19
I was thinking about these things and I am a feminist.
Pages:
[
1
]
« previous
next »
Jump to:
Please select a destination:
-----------------------------
TS4: The Pee-ening
-----------------------------
=> Insert Amusing Name Here
=> Facts and Strategery
-----------------------------
TS3/TSM: The Pudding
-----------------------------
=> The World Of Pudding
=> Facts & Strategery
=> Pudding Factory
===> World of Puddings
===> Pudding Plots
-----------------------------
TS2: Burnination
-----------------------------
=> The Podium
===> Oops! You Broke It!
=> The War Room
=> Planet K 20X6
===> Building Contest of Awesomeness
=> Peasantry
===> Taster's Choice
-----------------------------
The Bowels of Trogdor
-----------------------------
=> The Small Intestines of Trogdor
=> The Large Intestines of Trogdor
-----------------------------
Awesomeware
-----------------------------
=> TS4 Stuff
=> Armoire of Invincibility
===> AwesomeMod!
=> The Armory
===> Playsets & Toys
===> The Scrapyard
-----------------------------
Darcyland
-----------------------------
=> Lord Darcy Investigates
-----------------------------
Ye Olde Simmes 2 Archives: Dead Creators
-----------------------------
=> Ye Olde Crammyboye Archives
=> Ye Olde Syberspunke Archives
-----------------------------
Serious Business
-----------------------------
===> Spore Discussions
Loading...