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!
Field Researcher
Original Poster
#1 Old 12th Feb 2006 at 8:28 AM
Default Help Needed with Dialog primitive 0x24
Ok, I did a quick search on this and did not find anything relevant. I've taken a look at several other mods, and I even managed to use it properly in one of my other mods that I've been working on, but for some reason, in this particular one, I am having problems.

I am trying to use the Dialog primitive 0x24 to pop up a simple yes-no dialog box. In the .package itself, the correct STR# that I want shows up. In the instructions settings, it looks like this:

Quote:
[prim 0x0024] Dialog (Type: yes-no: "Do you wish to enroll $Object in private school?", Yes: [none], No: [none], Title: [none], Cancel: [none], icon: automatic, wait for user, block Sim, Style: System, Private strings. (Display a dialog with a message, a yes button and a no button. Return true on yes and false on no.))


However, when testing it in the game, the string doesn't show up! I am at my wits end and I am totally frustrated and stumped. In one of my other mods in progress, I use pretty much the same instruction settings, and it works fine in game. I see the sim's icon, the correct message is actually displayed and the Yes and No options are available and work as expected.

In the mod that I am having the problem with, the dialog box pops up, with the sim's icon, and the yes and no values, which Do work properly, but the dialog box is BLANK! The message doesn't show up at all, and I can't figure out why?


I've tried the following instruction settings:

00 00 00 00 00 01 00 00
00 00 14 00 01 13 00 00

Which displays the values as shown above. These are essentially the same settings as other dialog calls in the SAME BHAV. The only difference is, that I changed the dialog type to 01 and the value of the STR# that I want displayed. So it's kinda driving me :loco: because I can't understand why it won't work.

I also tried:

00 00 00 00 00 01 00 00
00 00 00 00 00 13 00 00

Which displays the following:

Quote:
[prim 0x0024] Dialog (Type: yes-no: "Do you wish to enroll $Object in private school?", Yes: [none], No: [none], Title: [none], Cancel: [none], icon: automatic, wait for user, block Sim, Style: Sim, Private strings. (Display a dialog with a message, a yes button and a no button. Return true on yes and false on no.))


00 00 00 00 00 01 00 04
00 00 14 00 01 13 00 00

Which displays the following:

Quote:
[prim 0x0024] Dialog (Type: yes-no: "Do you wish to enroll $Object in private school?", Yes: [none], No: [none], Title: [none], Cancel: [none], icon: neighbor, wait for user, block Sim, Style: Sim, Private strings. (Display a dialog with a message, a yes button and a no button. Return true on yes and false on no.))


I've tried a couple of other values, but I just can't seem to figure it out.

If it means anything, the Group Instance is 0x7F0CD143 with SemiGlobal = 0x7F01EC29 PersonGlobals.

I've looked at several other existing mods with pop-up Dialogs similar to what I want to use. I've tried copying the same settings as those, and of the different things that I have tried so far, I still get a Blank Dialog box.

It is very strange. The only thing I'm doing pretty much adding a single line for a Dialog box in this single BHAV. Additionally, I add a single string in the Dialog prim string set. I don't change anything else. In game, everything else seems to work with exception that my string does not show up and the dialog box is blank. :banghead:

Anyways, I'd appreciate any help. Maybe it's something very simple that I'm missing and I can't wrap my head around it. I'm not sure what else to try? :shrug:

Ste
Advertisement
Field Researcher
#2 Old 12th Feb 2006 at 10:14 AM
Do you want to display a yes - no dialog?

00000B0000050A030000000000000000
[prim 0x0002] Expression (Stack Object ID := My 0x000B (object id))

00000000000100000000000000"Dialog Number"0000
[prim 0x0024] Dialog (Type: yes-no: "Do Something to $Object.", Yes: [none], No: [none], Title: [none], Cancel: [none], icon: automatic, wait for user, block Sim, Style: Sim, Private strings. (Display a dialog with a message, a yes button and a no button. Return true on yes and false on no.))
Set node version *1*

00001F0000050A120000000000000000
prim 0x0002] Expression (Stack Object ID := My person data 0x001F (neighbor id))

00000000000100040000000000"Dialog Number"0000
[prim 0x0024] Dialog (Type: yes-no: "Do Something to *$Neighbor*.", Yes: [none], No: [none], Title: [none], Cancel: [none], icon: neighbor, wait for user, block Sim, Style: Sim, Private strings. (Display a dialog with a message, a yes button and a no button. Return true on yes and false on no.))
Set node version *1*

If you want to use semiglobal strings,
00000000000100040100000000"Dialog Number"0000
[prim 0x0024] Dialog (Type: yes-no: "Semiglobal Strings $Neighbor.", Yes: [none], No: [none], Title: [none], Cancel: [none], icon: neighbor, wait for user, block Sim, Style: Sim, SemiGlobal strings. (Display a dialog with a message, a yes button and a no button. Return true on yes and false on no.))
Set node version *1*

and please uncheck "immediately" in pie menu.
One horse disagreer of the Apocalypse
#3 Old 12th Feb 2006 at 12:35 PM
Have you set your Dialog string file to Default Strings Only and edited the string in the default language?

"You can do refraction by raymarching through the depth buffer" (c. Reddeyfish 2017)
Field Researcher
Original Poster
#4 Old 12th Feb 2006 at 4:06 PM Last edited by syberspunk : 12th Feb 2006 at 4:33 PM.
Quote: Originally posted by christianlov
Do you want to display a yes - no dialog?

00000B0000050A030000000000000000
[prim 0x0002] Expression (Stack Object ID := My 0x000B (object id))

00000000000100000000000000"Dialog Number"0000
[prim 0x0024] Dialog (Type: yes-no: "Do Something to $Object.", Yes: [none], No: [none], Title: [none], Cancel: [none], icon: automatic, wait for user, block Sim, Style: Sim, Private strings. (Display a dialog with a message, a yes button and a no button. Return true on yes and false on no.))
Set node version *1*


Well... I have the StO already assigned. It gets assigned by a Set to Next:

00000000810A00000000000000000000
[prim 0x001F] Set to Next (person, result in Stack Object ID)
node version *0*

When the dialog box shows up, I can click Yes or No, and it does exactly what I want it to do for that person. So, it looks like that assignment is correct. The problem is, I've already tried the settings exactly as you described above, and the dialog still comes up blank.

Quote: Originally posted by christianlov
00001F0000050A120000000000000000
prim 0x0002] Expression (Stack Object ID := My person data 0x001F (neighbor id))

00000000000100040000000000"Dialog Number"0000
[prim 0x0024] Dialog (Type: yes-no: "Do Something to *$Neighbor*.", Yes: [none], No: [none], Title: [none], Cancel: [none], icon: neighbor, wait for user, block Sim, Style: Sim, Private strings. (Display a dialog with a message, a yes button and a no button. Return true on yes and false on no.))
Set node version *1*


What exactly is the difference between this and using neighbor? I never quite understood this exactly. How is the object id different than the neighbor id? If If Me is Lilith Pleasant for example, and I use her NID instead, will the above string say "Do Something to *Lilith Pleasant*." or will it be someone else? Who is the "neighbor" in this case? In plain english language, I would think that neighbor is someone else. Mathematically, as in nearest neighbors, "neighbor" is another element in the set.

Quote: Originally posted by christianlov
If you want to use semiglobal strings,
00000000000100040100000000"Dialog Number"0000
[prim 0x0024] Dialog (Type: yes-no: "Semiglobal Strings $Neighbor.", Yes: [none], No: [none], Title: [none], Cancel: [none], icon: neighbor, wait for user, block Sim, Style: Sim, SemiGlobal strings. (Display a dialog with a message, a yes button and a no button. Return true on yes and false on no.))
Set node version *1*

and please uncheck "immediately" in pie menu.


How do I know when I should use semiglobal strings or not? I've tried setting that bit (the one that you changed to 1) and the string doesn't show up properly. So I am forced to use Private strings. When I use Private strings, the correct string shows up in SimPE. But when I test in game, the dialog box is still blank.

I guess I will try again later today, to see if any of your examples above work.



Quote: Originally posted by Inge Jones
Have you set your Dialog string file to Default Strings Only and edited the string in the default language?


Are you asking because I should do this? Or is doing this the wrong thing to do? What I did was, I included the Dialogs prim string set. I clicked on Default Strings Only, and indeed, I only edited the string in the default language. Is this bad? I believe that, doing this would force all other games that use my mod to only see Default. So... in other languages it might show up as English (American, which is my default) or blank? I'm not sure. Btw, I also clicked on Default lang only. Was that bad? Should I have not done that? I wouldn't think it would cause problems, since it didn't for the other dialog boxes I added in my other mods, but right now, I'm just desperately grasping at straws, trying to find something to blame. :P

But since I am using the default, and didn't install it in any other language, and everything Else works as american english, I don't understand why I'm getting blank dialog boxes. Especially when, in two other mods that I've been toying with, using dialog boxes, those both show up fine in game. One is a cloned/new object with the Group Instance 0XFFFFFFFF and the other is modified CarGlobals. It is really frustrating. I must be missing or overlooking something really simple.

Ste
Slippery When Wet
#5 Old 12th Feb 2006 at 6:02 PM
Ste, Just something stupid that you may be overlooking is the node version.
The string "Set node version *1*" looks like an instruction to the modder, not an explanation of what the thing does.

When copying the operands from another node, you currently have to copy the node version across manually. Also we cannot see the current value from looking at the pasted code above.

BTW, Using the Default String the way you do sounds fine.
Field Researcher
Original Poster
#6 Old 12th Feb 2006 at 6:39 PM Last edited by syberspunk : 13th Feb 2006 at 9:51 AM.
Quote: Originally posted by tunaisafish
Ste, Just something stupid that you may be overlooking is the node version.
The string "Set node version *1*" looks like an instruction to the modder, not an explanation of what the thing does.


Yeah. I've seen that node and how it sometimes makes a difference. In this particular case, if I leave it 0, then the values change completely. I tried it both ways, setting it at 0 and setting it as 1.


Quote: Originally posted by tunaisafish
When copying the operands from another node, you currently have to copy the node version across manually. Also we cannot see the current value from looking at the pasted code above.


When you say copying from another node, do you mean the previous node? Or do you mean the "sample" node that we are trying to "copy" from?

In other words, do you mean that consecutive nodes (which I am interpreting to mean each "line" of code in a BHAV) have to be the same node version? Or are you just saying that, if we want a similar line of code from another BHAV that we are copying from, as an example, we should make sure the node version is the same. This is typically what I do when I am trying to use something similar from another BHAV or mod. I will copy the instruction settings using the >> option, then I will manually copy the Opcode and the Node version. After that, I make any minor changes in the individual boxes, or using the instruction "wizard" > option.


Quote: Originally posted by tunaisafish
BTW, Using the Default String the way you do sounds fine.


Thanks. Well that partially saves my sanity. :gonemad: I was even desperate enough to go back and start from scratch, extracting the original BHAV and Dialog TXT file. Creating a new package, and slowly adding the changes I made. This time, I kept the other languages, in the off chance that, for some magically insane reason, it would have some effect. It of course, didn't. :P

I'm just about given up. I guess I'll attach the package and if anyone is willing to take a look at it, I'd appreciate any help. I think I've run out of other options. Or I'm too lazy to think of/and or try anything else that wouldn't be too tedious and painful.

Ste

PS. The point of the hack? To add a dialog box for the private school/headmaster scenario, so players can individually choose which students they want to enroll in private school. Sounds simple enough, right? Painfully apparently not.
One horse disagreer of the Apocalypse
#7 Old 12th Feb 2006 at 7:07 PM
Sorry if I wasn't clear, yes you should set to default strings only if you are not intending to translate the other languages, and it sounds like that's what you did.

"You can do refraction by raymarching through the depth buffer" (c. Reddeyfish 2017)
Slippery When Wet
#8 Old 12th Feb 2006 at 7:20 PM
Quote: Originally posted by syberspunk
When you say copying from another node, do you mean the previous node? Or do you mean the "sample" node that we are trying to "copy" from?


I meant using the '>>' button to pop up the operands.
The various other buttons that 'clone' the node (line), keep intact all the associated values.

On the topic of the buttons and the PJSE plugin in general, I have written a README that now lives in the PJSE Help forum at http://simlogical.com/SMF/index.php

Look forward to seeing a solution to this problem. Sounds like a weird hole that many of us could fall into.

The hack sounds good to me, but others may be wondering why in hell you would want to do something like that
(JMPs future hack to fix the public school to actually cost.)
Field Researcher
#9 Old 13th Feb 2006 at 12:11 AM Last edited by christianlov : 13th Feb 2006 at 12:45 AM.
I set node version *1* to the dialog line when I don't use custom Yes-No-Cancel-Title, and set node version *0* when I do.

Quote: Originally posted by syberspunk
What exactly is the difference between this and using neighbor? I never quite understood this exactly. How is the object id different than the neighbor id? If If Me is Lilith Pleasant for example, and I use her NID instead, will the above string say "Do Something to *Lilith Pleasant*." or will it be someone else? Who is the "neighbor" in this case? In plain english language, I would think that neighbor is someone else. Mathematically, as in nearest neighbors, "neighbor" is another element in the set.


If Me is Lilith Pleasant and stack object is set to be My(Lilith's) nID, and the string is "Do something to $Neighbor", then the dialog will say "Do something to Lilith". And because the icon of the dialog is set to use neighbor, the dialog will show Lilith's face.

Quote: Originally posted by syberspunk
How do I know when I should use semiglobal strings or not? I've tried setting that bit (the one that you changed to 1) and the string doesn't show up properly. So I am forced to use Private strings. When I use Private strings, the correct string shows up in SimPE. But when I test in game, the dialog box is still blank.


There is no rule that you should use semiglobal strings or not. If you want to use them and if they are in the semiglobal strings, you can use.
Slippery When Wet
#10 Old 13th Feb 2006 at 4:09 AM
Oops, sorry Chris, when I first read your post above it looked like the "Set node version *1*" was something new that the editor was spitting out.

Ste, I found your problem. Inge was right.
Press 'Default Lang Only' again, but this time press that Commit button
Field Researcher
Original Poster
#11 Old 13th Feb 2006 at 4:24 AM
Quote: Originally posted by tunaisafish
On the topic of the buttons and the PJSE plugin in general, I have written a README that now lives in the PJSE Help forum at http://simlogical.com/SMF/index.php

Look forward to seeing a solution to this problem. Sounds like a weird hole that many of us could fall into.


Yep, I saw the readme... which reminds me, I should go snag the latest version. Thanks, btw for the readme. Definitely a great help! I also need to figure out how to use the bcon trcn labels and the include thingie. I sorta just glanced at that part. I didn't feel like reading it in depth. I'll eventually get around to it. hehe

Quote: Originally posted by tunaisafish
The hack sounds good to me, but others may be wondering why in hell you would want to do something like that
(JMPs future hack to fix the public school to actually cost.)


That's exactly the point. I figured, well I whined about it on MATY, I might as well make it, at least for myself, if no one else wants it. Only it's proven to be a lot more of pain that I thought it would be. *sigh* And I guess it depends on whether Pescado will actually release it anytime soon. Regardless, I did actually want this before he mentioned it. In particular, since I've started playing the game again, I have a huge house with 6 children/teens, and I didn't want them all to go to private school. I would have liked to have had the ability to send the younger ones to private school, while the older teens were still in public. I know I could have just moved the teens out as YAs, but I wasn't ready for that. It would be nice to have an option to choose. Why does it always have to be an all-or-nothing situation?



Quote: Originally posted by christianlov
I set node version *1* to the dialog line when I don't use custom Yes-No-Cancel-Title, and set node version *0* when I do.


Ahh... ok. Thanks for the enlightenment. I wasn't sure what the difference would be. In this case, I'm don't think I need custom values for the Yes-No-Cancel-Title parts. Just the dialog box message itself.

Quote: Originally posted by christianlov
If Me is Lilith Pleasant and stack object is set to be My(Lilith's) nID, and the string is "Do something to $Neighbor", then the dialog will say "Do something to Lilith". And because the icon of the dialog is set to use neighbor, the dialog will show Lilith's face.


Ahh... ok. Well... maybe I'll try that. In this case, Me would be the caller (in my test runs, usually Daniel or Mary-Sue inviting the headmaster) and StO is assigned by a Set to Next which eventually finds a student i.e. a sim whose JobData and School Object GUIDs match that of Public School AND their grade is at least a C. After a first day back from school, in what is essentially a clean install, Angela and Lilith both qualify.

Quote: Originally posted by christianlov
There is no rule that you should use semiglobal strings or not. If you want to use them and if they are in the semiglobal strings, you can use.


I guess I wasn't sure when I would have access to semiglobals or not. Since, in this particular case, all the related BHAVs in this Group Instance are in the 1000s, the "scope" is private. So the STR Text file 0x12D for this Group Instance are Private strings, right? And the Semiglobal strings are for the Group Instance that shows up as SemiGlobal at the top of each html file (assuming you've used disaSim2 to generate the html files for each Group Instance). So the STR Text file 0x12D for that Group will be the semiglobal strings, right? I know that seems simple enough, but again I'm grasping at straws. Maybe something might pop up that everyone else knows, and I might have misunderstood.

The next thing I guess I'm going to try is have the hack by itself in the game and see if it still comes up with blank dialog boxes. If not, then maybe it's some other hack that's overriding it somehow? I can't imagine what, because I don't think I have any other hacks that modify the headmaster routines. I even ran dizzy's GUID conflict tool thingie (I always forget what it's called :P) and I did not see any conflicts with this mod. I do have some hacks separated into other folders, but I keep gamehacks in the same folder, and keep hacked objects or other hacks that are essentially standalone (like Macrostatic related ones), which are pretty much separate objects anyway, and shouldn't conflict at all.

It's kind of frustrating because I managed to make a phone plug-in hack, that allows you to call up the private school and individually choose which sims you want to deregister and make them attend public school instead. Sort of a complementary hack to this one. I tested that out on the Goth house, and it worked fine. I even made it so that it only shows up during valid school hours based on the time hours of the private school job data. I would have thought that making that hack would have been more difficult. The thing is, I pretty much cloned this exact same BHAV for the phone plug-in, and the dialog box works fine. :confused: It even shows the sims thumbnail icon, with the dialog box, and the options. I just can't figure out for the life of me what is the problem with this one.

Ste
Field Researcher
Original Poster
#12 Old 13th Feb 2006 at 6:01 AM
Quote: Originally posted by tunaisafish
Oops, sorry Chris, when I first read your post above it looked like the "Set node version *1*" was something new that the editor was spitting out.

Ste, I found your problem. Inge was right.
Press 'Default Lang Only' again, but this time press that Commit button


Hrm... *boggles* Well... the original version I had, I could have sworn I used Default Lang Only and committed. The version I uploaded/included above was after starting from scratch, I think and attempting to see if NOT using Default Lang would make a difference. I've started from scratch a bunch of times, and I've already forgotten all of the things I've tried.

I just finished testing again with ONLY this hack installed and it was still giving me blank dialog boxes. I will start over from scratch yet again, do the default lang only thingie, commit (I'm about ready to have myself commited :screwy: ) and see if that hopefully makes a difference. If it doesn't then I'm gonna have to start wondering if it's my computer. Hopefully that's not the case.

Ste
Field Researcher
Original Poster
#13 Old 13th Feb 2006 at 10:14 AM
Alright, I sorted it out with Pescado and Inge. Thanks to everyone for all your advice trying to help me figure this out. :grouphug:

It definitely is frustrating when you think you've done everything correctly, and then you run into odd things like this.

For those curious, basically what happened is, the BHAV I'm trying to mod is part of the Headmaster NPC template. As a result, similar to Pescado's lobonanny hack, each NPC has an individual copy of the BHAV and TXT string file. Since the NPCs seem to be pre-generated using the original Maxis code, it wasn't properly running my hack.

What is really :screwy: is that the game would still run the BHAV, but apparently did not properly see the TXT string file. So... I would get the dialog boxes, but that's why they were empty.

The solution was to use SimPE and manually edit each indvidual Headmaster NPC, replacing the BHAV AND the TXT string file. After doing this, and running another test in-game, it finally worked. I got the dialog boxes, with the correct message, and options. After running through the scenario in the Pleasant household, I was able to pick Angela for private school only. Daniel, Mary-Sue, and Angela received the correct "Angela/Got into Private School" memories and Lilith did not receive any memories. Angela's school panel changed to Private School while Lilith's remained Public. *whew*

Again, thanks to everyone for trying to help. In the very least, I learned some new things and confirmed some things that I thought I knew or barely understood. So it wasn't all for naught.

I'll probably release a couple of these hacks I've been toying with sometime soon, after a bit more play-testing, and when I eventually get around to writing the RTFMs. :P

Ste
Back to top