Hi there! You are currently browsing as a guest. Why not create an account? Then you get less ads, can thank creators, post feedback, keep a list of your favourites, and more!
Quick Reply
Search this Thread
Field Researcher
Original Poster
#1 Old 26th Feb 2006 at 11:49 PM
Default Check tree primitive blocked completion error
Does anyone know what the "Check tree primitive blocked completion" error means? I'm getting it on a social object I'm making. It happens on a yes/no dialog I've setup:

0001 : 0024 : 0000000000010000000000001100 : 01 : 0002 : 0003
[prim 0x0024] Dialog ("What answer do you wish to give?")

I get:

Object id: 725
name: N001_User00596 - Larry
Stack size: 9
Error: Check tree primitive blocked completion.
Iterations: 1
Frame 8:
Stack Object id: 520
Stack Object name: Social Download Test
Node: 1
Tree: id 4103 name 'JEC - Try Asking something' version -32760
from SocialDownloadTest
Prim state: 1
Params: Locals: 0 0

Thanks!
Advertisement
One horse disagreer of the Apocalypse
#2 Old 27th Feb 2006 at 7:57 AM
What the error means in English is that you made a call to a Primitive (in this case Dialog) and you did it while you were running a Test for an interaction and it is running while a sim is just evaluating what to do next (autonomously), which normally would not expect to make output

Sometimes I have thought, no it's not in a Test tree at all - it's called as part of the action. But then looking closer I see it is being called by something else also that does form part of a test for something else.

Another thing that sometimes frees up an obstinate dialog call is to change the Node Version for the line to 1, but then you have to change your operands round as it's a different format. I suggest if you try this you duplicate the existing line first so it's easy to reinstate if it did't help

"You can do refraction by raymarching through the depth buffer" (c. Reddeyfish 2017)
Fat Obstreperous Jerk
#3 Old 27th Feb 2006 at 12:53 PM
Certain commands are not allowed in "check tree" mode, I.E., anything running in a stack other than Main or a non-immediate Interaction, among which includes idle, and any interactive dialog. If you have debug mode out, you can hit cancel to override the objection, but for anyone else, it will reset.

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.
Field Researcher
Original Poster
#4 Old 27th Feb 2006 at 9:06 PM
This code is running within a social plugin, from a private BHAV called from my "CT - Object Menu Command" BHAV. I know that one can make social plugins that get called autonomously, but I'm preventing this one from being used that way. This error only happens when the user specifically selects my menu off of the sim, which is when I would expect the dialog to appear; I heavily doubt it's being called autonomously.

So... is it impossible for any social plugin to use dialogs that require input, because some social plugins might be called autonomously? If so, that's irritating!

Also: Note that this is happening in the "CT - Object Menu Command", not the "CT - Object Menu". It's not happening when we're building up the menu, just when we're acting on a click.
Field Researcher
Original Poster
#5 Old 28th Feb 2006 at 11:51 PM
Well, I did find away around this issue for anyone interested: You can put the code for the dialog in your plug-in object's main action function, where it usually just idles. Keep the idle time long, and use the Notify Stack Object out of idle primitive (0x0031) in your CT - Object Menu Command BHAV to knock your self out of idle in main.

A finished solution, of course, would use object attributes to distinguish between an actual invocation and the idle just timing out. Attributes can also be used to switch between dialogs, or other functionality you need in main().

Thanks to both Inge and JM for your comments; I would never have thought to try this unless I had a clue about what that error message meant.

My solution is messy; if anyone has a cleaner solution I'm still interested!
Instructor
#6 Old 17th Oct 2006 at 2:06 AM
The method that I would use is to add a TTAB to the social plugin that will contain an interaction that when selected calls the BHAV containing the dialog. Then I would have CT - Object Menu Command call a BHAV that will use the push interaction primitive to select that interaction.
The ModFather
retired moderator
#7 Old 23rd Apr 2007 at 9:28 AM
Quote: Originally posted by J. M. Pescado
Certain commands are not allowed in "check tree" mode, I.E., anything running in a stack other than Main or a non-immediate Interaction, among which includes idle, and any interactive dialog. If you have debug mode out, you can hit cancel to override the objection, but for anyone else, it will reset.


Note to self: you dumb! Any interaction that have the "Immediately" checkbox ticked (in the TTAB) will NOT stop the acting sim's autonomous behaviour, thus conflicting with the BHAV containing the Dialog or the Idle opcode...
In other words, BHAV containing Dialogs and Idle opcodes (and possibly others?) must have the "Immediately" checkbox unticked.

I've finally started my Journal. Information only, no questions.

My latest activity: CEP 9.2.0! - AnyGameStarter 2.1.1 (UPD) - Scriptorium v.2.2f - Photo & Plaques hide with walls - Magazine Rack (UPD) - Animated Windows Hack (UPD) - Custom Instrument Hack (UPD) - Drivable Cars Without Nightlife (UPD) - Courtesy Lights (FIX) - Custom Fence-Arches - Painting-TV - Smarter Lights (UPD)


I *DON'T* accept requests, sorry.
Instructor
#8 Old 23rd Apr 2007 at 10:10 AM
A normal dialog that just displays information shouldn't cause an error, only those that expect some form of input from the user such as ones that have a yes and no button.

Tired of getting ripped off by paysites?
http://paysites.mustbedestroyed.org/
Test Subject
#9 Old 30th Jun 2007 at 9:44 AM Last edited by Simbiont : 30th Jun 2007 at 8:58 PM.
--"In other words, BHAV containing Dialogs and Idle opcodes (and possibly others?) must have the "Immediately" checkbox unticked. "
-- Numenor

I hope you don't mind a newbie asking a few silly questions.

As I understand it, dialogs invoked from a pie menu can only be inserted in the action queue, not executed immediately?

That would mean that you can't use them while the game is paused. That wouldn't do for an object I'm working on. Werrl, dreaming of.

Dolphin26 suggested putting the dialog in the main BHAV. Would that mean that I'd have to keep main looping all through the game, or does it do that by itself? Or is main a default method that gets called with every call to the object? (Sorry if I'm not using the correct SimAntics lingo yet)

I wouldn't like my object to have continuous idle loops; I'm probably going to use about 200 instances of it in the neighbo[u]rhood I'm planning, or up to some 16 per lot.

And there's another thing, of course: Are idle loops performed while the game is paused? If not, this workaround wouldn't work for me anyway.
The ModFather
retired moderator
#10 Old 2nd Jul 2007 at 9:54 AM
The Main bhav is constantly executed for each and every object; even the simplest decorative objects "do" something while you're not watching (they stay idel for an hour or an entire day, and then adjust their value, and go idle again). An Idle operation just means "do nothing", therefore it doesn't load any actual job to the processor.

When the game is paused, you can't have dialogs; but you can instruct the Dialog to pause the game and wait for input: click on the Wizard icon (next to the 16 operand fields) to get all the available options for the Dialog opcode; check the "Block Sims" and "Wait for user" options, and the game will stop, waiting for you to either click OK, input a word etc.

As far as I know, no operations are executed while the game is paused, not even the Idle loops. But there was a setting (which I've never used and for the life of me can't remember!) that should determine wheter the object gets halted when the game is paused or not. In fact, there are some game objects (for example the plumbob, just to mention one) that are NOT paused when the game is paused: you should examine the Init and Main bhavs for the plumbob, searching for such a setting...

I've finally started my Journal. Information only, no questions.

My latest activity: CEP 9.2.0! - AnyGameStarter 2.1.1 (UPD) - Scriptorium v.2.2f - Photo & Plaques hide with walls - Magazine Rack (UPD) - Animated Windows Hack (UPD) - Custom Instrument Hack (UPD) - Drivable Cars Without Nightlife (UPD) - Courtesy Lights (FIX) - Custom Fence-Arches - Painting-TV - Smarter Lights (UPD)


I *DON'T* accept requests, sorry.
One horse disagreer of the Apocalypse
#11 Old 2nd Jul 2007 at 10:08 AM
Quote: Originally posted by Simbiont
Would that mean that I'd have to keep main looping all through the game, or does it do that by itself? Or is main a default method that gets called with every call to the object? (Sorry if I'm not using the correct SimAntics lingo yet)


As far as I am aware, the Main BHAV won't loop unless you code it to loop. All the Maxis objects I have examined have explicit loops in their Main. It's theoretically possible for a Main BHAV to end. Not sure what happens then, because it takes so long for the game to load that I don't like to test any code I am not already pretty sure should work and be useful :D

I believe any Main BHAV will start again from the top if an object is reset or errors.

"You can do refraction by raymarching through the depth buffer" (c. Reddeyfish 2017)
Test Subject
#12 Old 2nd Jul 2007 at 1:48 PM Last edited by Simbiont : 2nd Jul 2007 at 2:25 PM.
--"The Main bhav is constantly executed for each and every object"
-- Numenor

--"the Main BHAV won't loop unless you code it to loop"
-- Inge Jones

LOL -- diametrically opposed info from the two modders I respect most.

I need the dialog approach for a replacement for Inge's 4 key doors; those have always served, but I'm trying some appartment buildings now and I need a more elaborate key/targeting system (plus some motive and dress options and an attractor for keyholders).

Typically you'd move the family onto the lot, pause the game and assign all the keys. I had hoped to do the latter with a Phone Book type dialog so as to be able to include all neighborhood Sims, not just the ones on the lot. As there could be as much as 800 Sims per NB in the games I'm planning, pieing through all of them seemed to be a bit troublesome; it could need some 100 pies per key issue, if I'd do it straight. Family/Name layering would be a bit better, but still...

Lock Sims/modal dialog would work /if/ I could nest dialogs, but the SimAntics engine isn't set up like that, so that is out too, or I'd have to accept a bit of game stutter. Right now, however, that seems the likely way to go.

The PlumbBob's Init BHAV sets the "My simulate on pause" value (flag? attribute?) to 01h; it's already in Peter's disassembler. I'll try it on my door tonight. However, it probably won't work out for me. I'd still have to stick my dialog onto the action queue of the current Sim, and I obviously can't depause him/her.

Is there an object attribute quickref around, btw? I'm constructing my own, but if the wheel has been invented before, why try again.

Thanks for answering.
I may have a few more brain pickers shortly
Retired Duck
retired moderator
#13 Old 2nd Jul 2007 at 2:27 PM
Quote: Originally posted by Simbiont
--"The Main bhav is constantly executed for each and every object"
-- Numenor

--"the Main BHAV won't loop unless you code it to loop"
-- Inge Jones

LOL -- diametrically opposed info from the two modders I respect most.

Both completely accurate though. The loop in the main BHAV does have to be coded explicitly, in that it's not implied or hidden code. It still gets executed constantly in every Maxis object and most cloned object as well. It's part of the basic theory of threaded execution. Even if the thread is just continuously idling, something needs to be happening for the thread to persist. The only time I've ever actually had a return from a main, it was a return right after I did a "Remove object instance (me)", so I'm not sure if it ever actually reached it or not! Like Inge, I've never tried returning from a regular main (for much the same reasons!)... It may just restart itself automatically, it may just continue as always, it's stack might get deallocated and cause all sorts of weird stuff, I'm just not sure.

Not sure what you mean by an "object attribute quickref"... But it probably does exist, most of the object attribute stuff is fairly general knowledge now.
The ModFather
retired moderator
#14 Old 2nd Jul 2007 at 2:32 PM
Quote: Originally posted by Simbiont
--"The Main bhav is constantly executed for each and every object"
-- Numenor

--"the Main BHAV won't loop unless you code it to loop"
-- Inge Jones

LOL -- diametrically opposed info from the two modders I respect most.



No, no, we are stating the same fact, though it looks the opposite
Inge is right when she says that the Main bhavs are NOT automatically repeated endlessly, but on the contrary they need an explicit loop set.
And I'm right when I say that (almost?) all the Main bhavs ARE repeated: this is because Maxis has explicitly included a loop in (almost?) all the Main bhavs.
I've never seen a Main bhav that is not looped; but technically it should work: when the Main ends, no interaction will be possible with that object; possibly not even removing it from the game (never tried myself).


Quote:
I need the dialog approach for a replacement for Inge's 4 key doors; those have always served, but I'm trying some appartment buildings now and I need a more elaborate key/targeting system (plus some motive and dress options and an attractor for keyholders).

Typically you'd move the family onto the lot, pause the game and assign all the keys. [...]

Where is the problem? You set the assignment as interaction (via Pie menus), being sure that the "Immediately" checkbox in the TTAB is deactivated.
When you pause the game, you can click on the doors and set all the needed assignments: the assignments will be queued on the sims' queue, but not executed (no dialogue appears). When you unpause the game, all the assignments are executed, and for each one you'll get the dialogue window (and each dialogue window will stop the game and wait for input; when done, you'll get another dialogue, and so on).
Imagine this scenario:
A family of four goes to a community clothing shop; when they arrive, you pause the game, select in turn each sim and click on the clothing rack, selecting "Buy... Everyday". When you unpause the game, all the sims will run to the rack and will issue a clothing dialog. Nothing strange, I do this all the time

Quote:
The PlubmBob's Init BHAV sets the "My simulate on pause" value (flag? attribute?) to 01h

Yes! That's it My memory is not like it used to be any more
BTW, it's not an attribute nor a flag: it's just a setting stored in the object (1=yes, the object will simulate also on pause).


Quote:
Is there an object attribute quickref around, btw?

Each object has its own attribute. There are private attributes, that affect only your object, and semiglobal attributes[/i], that affect all the objects of the same kinds.
The explanatory name of the various private attributes is stored in the text list 0x0100, within the package itself (if it doesn't exist, create it by yourself).
You can play quite safely with the private attribute, without risking to break the semiglobal behaviour. Remember to read/set the private attributes using the "My/Stack Object's Attribute" operands of the Expression opcode; don't use the "My/St.Obj's [semi] Attribute" operands.

I've finally started my Journal. Information only, no questions.

My latest activity: CEP 9.2.0! - AnyGameStarter 2.1.1 (UPD) - Scriptorium v.2.2f - Photo & Plaques hide with walls - Magazine Rack (UPD) - Animated Windows Hack (UPD) - Custom Instrument Hack (UPD) - Drivable Cars Without Nightlife (UPD) - Courtesy Lights (FIX) - Custom Fence-Arches - Painting-TV - Smarter Lights (UPD)


I *DON'T* accept requests, sorry.
Test Subject
#15 Old 2nd Jul 2007 at 2:34 PM Last edited by Simbiont : 2nd Jul 2007 at 2:54 PM.
--"Not sure what you mean by an "object attribute quickref"... "
-- Echo

A "Quick Reference" -- just a shortlist (annotated, by preferece). I've read most of the tutorials by now, but while they're informative, they offer little tabular information -- you know, the kind you find in the appendixes of manuals. I found a few quickrefs on the Wiki, but they're very well hidden and none of them as complete and informative as I'd like.

I'd give a mint for Peter Jones' private notes
Test Subject
#16 Old 2nd Jul 2007 at 2:42 PM Last edited by Simbiont : 2nd Jul 2007 at 3:20 PM.
--"Where is the problem? You set the assignment as interaction (via Pie menus), being sure that the "Immediately" checkbox in the TTAB is deactivated.
When you pause the game, you can click on the doors and set all the needed assignments: the assignments will be queued on the sims' queue, but not executed (no dialogue appears). When you unpause the game, all the assignments are executed, and for each one you'll get the dialogue window (and each dialogue window will stop the game and wait for input; when done, you'll get another dialogue, and so on)."
-- Numenor

That would work for a clothes rack, because the game reports which Sim is addressed by this dialog.

Not so for doors. In your scenario, you click the 8 outside doors on the lot (front an back door of 4 appartments, none of them numbered), and in each case some time later a dialog asks you "The Wonderful Experimental Door: Give a key to...". You'd have to remember in which order you clicked the doors, and trust that the dialogs will appear in the same order. Plus I might want to give away more than one key per door.

Especially for younger people, I need a simple, real-time "Click this door - Give key to..." interaction. So it's probably back to pies.


--"Each object has its own attribute. [...8<...] The explanatory name of the various private attributes is stored in the text list 0x0100, within the package itself (if it doesn't exist, create it by yourself)."
-- Numenor

But be careful not to import a semiglobal attribute label textlist, then -- that also has an instance ID of 0100h, albeit in the semi-global data scope.
One horse disagreer of the Apocalypse
#17 Old 2nd Jul 2007 at 3:54 PM
Quote: Originally posted by Simbiont
I'd give a mint for Peter Jones' private notes


I am not sure he's got any! I shall have to ask him when he gets home

"You can do refraction by raymarching through the depth buffer" (c. Reddeyfish 2017)
Test Subject
#18 Old 2nd Jul 2007 at 9:03 PM
--"I am not sure he's got any!"
-- Inge

Aw come on, pull the other one. The guy who wrote the PJSE SimAntics Editor? Surely he must have a ton of notes; one doesn't create a disassembler on-the-fly. And otherwise, I'd settle for his "strings.h" [re]source or whatever he's called it

While we're at it: I noticed a few oddities in your 4 Key Doors. There's an attribute label (in text list 0x0100 not 0x012E!) "Remove Key $Local:0 from $Neighbor $Family" that doesn't seem to be used anywhere in your BHAVs (yet in this format can't be just a label). And from the six Init BHAVs, only 2 seem to be actually used, one for each tile.

Are these leftovers from earlier experiments, or am I missing something here and do they serve a purpose that I don't yet comprehend?
One horse disagreer of the Apocalypse
#19 Old 2nd Jul 2007 at 10:04 PM
Probably left over from something. Str# 100 is meant to be attribute labels anyway. I haven't revisited those doors for ages. BTW did you look at the appartment system I made? That might be a better basis for your project than the 4-key doors.

"You can do refraction by raymarching through the depth buffer" (c. Reddeyfish 2017)
Test Subject
#20 Old 2nd Jul 2007 at 10:21 PM Last edited by Simbiont : 2nd Jul 2007 at 10:36 PM.
--"Did you look at the appartment system I made?"
-- Inge

Not yet, but I'd love to. Do you have a link for me? A quick search on MTS2 and Simlogical yielded no matches.

Although I'm relatively new to Sims 2, a few lifetimes ago I did play with your prison system for the Original Sims, and I learned quite a lot from it. For this project, though, I decided against a central room controller, such as the prison system uses, for a number of reasons (one being my target audience of 1).
One horse disagreer of the Apocalypse
#21 Old 2nd Jul 2007 at 11:00 PM
No one ever seems to be able to find it! http://www.simlogical.com/sl/Sims2P..._Apartments.htm

"You can do refraction by raymarching through the depth buffer" (c. Reddeyfish 2017)
Don't ask me, I just code
#22 Old 2nd Jul 2007 at 11:03 PM
All the source for PJSE is on Sourceforge. The decoding work for BHAVs has mostly been done by Shy and dizzy2 for disaSim2. The code's in BhavWizPrim.cs and is public domain. I've no idea what any of it means in game terms (I neither play nor hack objects)!
Retired Duck
retired moderator
#23 Old 3rd Jul 2007 at 12:16 PM
Quote: Originally posted by Simbiont
A "Quick Reference" -- just a shortlist (annotated, by preferece). I've read most of the tutorials by now, but while they're informative, they offer little tabular information -- you know, the kind you find in the appendixes of manuals.


Well you're more than welcome to mine, although a whole heap of the stuff in there is probably completely irrelevant now that it's been integrated into SimPE. Try the "Attribute Labels" tab on the far left. Since SimPE integrated a lot of these lookups I haven't been keeping it up to date, but it should be accurate as of around the release of NL, and attributes haven't changed much since then.
Attached files:
File Type: zip  SimNotes.zip (1.25 MB, 20 downloads) - View custom content
Test Subject
#24 Old 3rd Jul 2007 at 1:02 PM Last edited by Simbiont : 3rd Jul 2007 at 10:44 PM.
--"All the source for PJSE is on Sourceforge."
-- Peter

--"you're more than welcome to mine, although a whole heap of the stuff in there is probably completely irrelevant now"
-- Echo

Thanks a bunch, guys.

Completely irrelevant I think not. It's like real life: if you walk the streets long enough you get to know all the shops. But if you need something specific, the Yellow Pages still come in quite handy.

You know, I'm one of those people who actually read dictionaries for fun.


--"No one ever seems to be able to find it!"
-- Inge

Ah, the Security System. (It's only the /page/ that is named "Sims2 Apartments", all the titling and filenames refer to the Security System -- and that's what search engines pick up).

Yes, I've had a peek at it, and I like it, although there are a few issues. But in all honesty, without an elaborate setup dialog (which afaik isn't possible in SimAntics), I wouldn't know how to fix those, either.

I've toyed with it, but as my daughter finds the controller approach a bit hard to fathom, I decided to go for a door-based approach instead.

Another reason for that is that on some of my lots, apartment doors have different settings depending on the adjacent room. Eg, doors leading to the public outside behave differently from doors leading to a common utility room or a (not publicly accessible, but inter-apartment connected) backyard. I haven't yet figured out how to do that with your Security Controller/Token.

____

Addition:
I just stumbled across Tunaisafish's SmartDoor, and it incorporated almost everything I wanted. I just had to stick on a directionality switch and a motive maxer (and translate the strings). It still isn't perfect of course, but it'll do for now. It even does diagonals (not tested yet).

So that's probably it for that project.
Back to top