Guys, use the link Kona gave for testing settings in JSON ;)
And remember to set ALL (!!!) variables You use to a value (even if it's 0) in the "initial_settings" line..
like:
initial_settings:{"variableA":0, "variableB":"Text"}
Using a variable which isn't set to a value in the initial settings results in an error, due to a "undefined value"
It's easy to check if all Your variables in "initial_settings" are properly set when You load a dialogue. Just start the build-in editor and press the "LOG" button, right after You loaded the dialogue (best when having startet with a fresh SDT window before). At the top of the log all variables and the values they are set to are listed.
-------------------------------------------
If You want to set several varibles in the same line in the dialogue, that is possible. But You have to do it right.
Wrong way:
intro:"text" {"set":{"varibleA":1}, "set":{"variableB":"text"}} = this results in ONE of the variables NOT being set.
Right way:
intro:"text" {"set":{"varibleA":1}, {"variableB":"text"}}
-------------------------------------------
So You can "set" multiple variables in one line, but You can only "check" for one! At least it looks like that, when I checked the logs...
-------------------------------------------
Remember to use " " properly in the "set", "check" and "initial_settings" lines.. No need for " " for pure numbers. As soon as strings are involved (be it text or +>=<- in front of a number) You MUST use " ". And of course You have to put the variable itself in " "
Same goes for those {} - just see the example above ;)
-------------------------------------------
Built me a small script, 'cause something in pinosante's dialogue looked a bit strange to me..
[spoiler]
//testing variables
DEFAULT:
all:"CLEAR"
initial_settings:{"counter":"zero", "count":0}
intro:"Line 1 Check counter *counter* *count*" {"mood":"Normal", "check":{"counter":"zero"}, "set":{"counter":"one", "count":"+1"}}
intro:"Line 2 Check counter *counter* *count*" {"mood":"Normal", "check":{"counter":"one"}, "set":{"counter":"two", "count":"+1"}}
intro:"Line 3 Check counter *counter* *count*" {"mood":"Normal", "check":{"counter":"two"}, "set":{"counter":"three", "count":"+1"}}
intro:"Line 4 Check counter *counter* *count*" {"mood":"Normal", "check":{"counter":"three"}, "set":{"counter":"four", "count":"+1"}}
intro:"Line 5 Check counter *counter* *count* [HAPPY_MOOD]" {"mood":"Normal", "check":{"counter":"four"}, "set":{"counter":"five", "count":"+1"}}
intro:"Line 2/1 Check count *counter* *count*" {"mood":"Happy", "check":{"count":"5"}, "set":{"counter":"five", "count":"-1"}}
intro:"Line 2/2 Check count *counter* *count*" {"mood":"Happy", "check":{"count":"4"}, "set":{"counter":"four", "count":"-1"}}
intro:"Line 2/3 Check count *counter* *count*" {"mood":"Happy", "check":{"count":"3"}, "set":{"counter":"three", "count":"-1"}}
intro:"Line 2/3 Check count *counter* *count*" {"mood":"Happy", "check":{"count":"2"}, "set":{"counter":"two", "count":"-1"}}
intro:"Line 2/4 Check count *counter* *count*" {"mood":"Happy", "check":{"count":"1"}, "set":{"counter":"one", "count":"-1"}}
intro:"Line 2/5 Check count *counter* *count* [NORMAL_MOOD]" {"mood":"Happy", "check":{"count":"0"}, "set":{"counter":"zero", "count":0}}
[/spoiler]
The script is supposed to do the following (when You start with HER in "normal mood":
SHE should kinda count up from 0 to 5, then down again from 5 to 0.
So the display for the first line should be:
Line 1 Check counter zero 0
Instead it displays:
Line 1 Check counter one 1
So, if You use the *variable* option to display a variable in a line, You shouldn't use the "set" command in the same line, because it seems to be done first.
Using pinosante's dialogue as an example, there was a line (cum_in_mouth) which ran like:
cum_in_mouth:"Here you go *characterdescription*... Your first load of cum right into that whore mouth of yours..." {"style":"Him", "set":{"characterdescription":"cum drinker"},"check":{"cuminmouth":"0"}}
At that moment, SHE was not supposed to have yet swallowd any cum. So her status could either have been "innocent little girl" or - if HE already had cum on her face - "cum slut".
But due to the "set" command in the line, HE always called her "cum drinker" immediately.
To achieve the - what I suppose to be - proper result, the line should rather be:
cum_in_mouth:"Here you go *characterdescription*... Your first load of cum right into that whore mouth of yours...[cum_in_mouth01]" {"style":"Him", "check":{"cuminmouth":"0"}}
cum_in_mouth01:"From now on, You will be a *characterdescription*" {"style":"Him", "set":{"characterdescription":"cum drinker"}}
That way HE'd call her "innocent little girl" or "cum slut" in the first line and "renames" HER in the second..
-----------------------------
Oh, and another tidbit with pinosante's dialogue.. The following lines CANNOT work..
general:"God, I know I am this *characterdescription*, but do I love to suck dick." {"check":{"characterdescription":"innocent little girl"}}
general:"Well, Mr., I don't really know you, so I still don't understand why I am sucking your dick. But it sure is fun! *giggles*" {"check":{"characterdescription":"innocent little girl"}}
general:"Do you like it when this *characterdescription* sucks on your dick?" {"check":{"characterdescription":"innocent little girl"}}
Reason: "general" lines are called instead of "intro" lines, after the first deepthroat has been achieved. But because she's already set to "deepthroat whore" as soon as she's managed to do that, the "check" will lead to no result...
Solution: change those lines to "intro"
---------------------------------------
Don't want to lecture anyone here - I think pinosante did a great job with this dialogue.. just needs a bit more work to get it working as intended, I guess..
If I made any errors or false assumptions myseln here, please correct me.. the new options are still a bit.. unclear.. to me, too..