1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Advanced dialogue settings

Discussion in 'Dialogue' started by Konashion, Nov 26, 2012.

  1. Konashion

    Konashion Potential Patron

    Joined:
    Feb 17, 2011
    Messages:
    10
    Likes Received:
    2
    Hey,

    Someone commented a while back that people have been making fairly complicated story style dialogues, and suggested that being able to store your own variables would make that a lot easier. I've added a test system for this to the latest release (1.18.1b), but I wanted to get some feedback here before making it more visible in the game, because it's mostly for more advanced writers, and it does need manual text editing at the moment.

    Dialogue lines already have some optional settings (things like mood), stored as a JSON string at the end of each line, so the new system uses "set" and "check" objects inside of that. There's some information about JSON here, but it's basically a list of names and values written with commas in between:
    Code:
    "name":"value", "anotherName":"value", "aNumber":5
    Those go inside {} braces to make groups named "set" and "check", which look like:
    Code:
    "set":{"name":"value"}
    and those go inside another group which is what gets saved as the settings for each line, so all together it looks like this:
    Code:
    intro:"This is the normal dialogue line."{"set":{"count":1}, "check":{"aDifferentCount":5}}
    You can try out writing JSON manually here. The main thing to remember is that the names always need to be in "", but the values can be "strings", plain numbers, or true / false.

    Add a "set" object to store values, and add a "check" object to limit the line to only play when the checks are correct. You can also insert things that you've stored into lines by writing *name*.

    Setting values just saves the new value over the top of whatever is already there (or makes a new value), and checking will only allow a line to play if the "check" value matches what you've stored previously.

    When you're working with numbers though, you can change values by writing + or - a number in "", like:
    Code:
    "set":{"count":"+1"}
    and you can check for numbers being greater or less by writing >, >=, <, or <= in "", like:
    Code:
    "check":{"count":">=2"}
    Finally, you can set up your variables when a dialogue script is loaded by writing:
    Code:
    initial_settings:{"count":0}
    If you don't add initial_settings, number checks will assume the value starts at 0, and otherwise assume the value is false.

    With this, you can do things like set a "chapter" name, and check lines so that they only play in the correct chapter:
    Code:
    initial_settings:{"chapter":"introduction"}
    general:"Hello."{"check":{"chapter":"introduction"}, "set":{"chapter":"afterwards"} }
    general:"Goodbye."{"check":{"chapter":"afterwards"}}
    
    If you go into the dialogue editor, there's a new "Log" button which will show you if your custom settings are loading correctly, and list the checks being made for each line when the game tries to find one to play.

    Any feedback on the system or how it works would be great. Hopefully it's not impossible to get working.

    *edit* Actually, you'll have to grab the download again if you got it before I edited the post, otherwise it will be impossible to get working. I left a debug reset in, but that should be fixed now.
     
  2. kastieris

    kastieris Potential Patron

    Joined:
    Nov 15, 2012
    Messages:
    2
    Likes Received:
    0
    These updates are great. I've been playing around the the editor and making more complex dialogs (none done yet to share). I'm going to try and use some of these features. I especially like the chapter check option that will really help with some of the more complex scenarios. People have used the moods to do this up to this point. Chapters will be far more versatile.

    As an aside, it might be nice to consider a "remove penis" option to make the penis and balls invisible, disable cum, and have the girl close her mouth, etc until it becomes visible again. It would help dialog writers write foreplay or intro dialogs without the cock hanging out there in the girl's face.

    In my case, I'm doing a nun scenario, where she's doing confession. Doing the confession scenario would work a lot better if the guy's cock wasn't in her face until a little later.

    Back on task, thank you for the update. I'm looking forward to seeing what people do with these changes.
     
  3. HentaiBob

    HentaiBob Avid Affiliate

    Joined:
    Jun 6, 2012
    Messages:
    160
    Likes Received:
    0
    I see awesome times coming to us :D
    Do you think options like changing clothes will be possible too?

    Thanks, this is going to be amazing!

    I will come back, once I tested things out, but I just had to post right now... so excited! xD
     
  4. booster

    booster Avid Affiliate

    Joined:
    Sep 19, 2011
    Messages:
    332
    Likes Received:
    1
    i know, this doesn't really fit here, but the only two things i am missing in dialogues after this update are dialogue actions for:
    -generate precum
    -cock twitching
     
  5. derpy

    derpy Potential Patron

    Joined:
    Apr 27, 2012
    Messages:
    3
    Likes Received:
    0
    I tried downloading this but whenever I press continue on depositfiles it does nothing can you upload it to mediafire or something else please?
     
  6. testing

    testing Potential Patron

    Joined:
    May 9, 2012
    Messages:
    12
    Likes Received:
    0
    I love you!!!

    It would be good if you could add information about style:Him and Style:Thought.

    Ex:
    intro:"The guy is talking."{"check":{"IntroCount":"0"}, "set":{"IntroCount":"+9000"}, "style":"Him" }
    intro:"The girl is thinking."{"check":{"IntroCount":">1"}, "set":{"IntroCount":"+1"}, "style":"Thought" }

    ########


    Also, you need to put " " with Initialsettings:

    initial_settings:{"chap":"Intro"}
    instead of
    initial_settings:{"chap":Intro} like you wrote.
     
  7. Leela

    Leela Potential Patron

    Joined:
    Mar 28, 2011
    Messages:
    93
    Likes Received:
    0
    This is wonderful but I have a few requests.
    Firstly I second the request for methods to check, change, add, remove clothes. Maybe even influence setting like resistance and breast size and maybe more. For example "Leia, you're my sister."{"set":{"resistanceSlider":100},"style":"Him"}

    Second is for a way to check status of events like if DT has been hit. The dialog may not be triggered so we need a way to be sure if it's been hit. A count of finishes. A count for each of the cum targets (face, mouth, eye, nose and maybe mister completely). The current state of her throat, how much resistance is left. Probably a bunch I can think of right now.
    E.g. "I can't believe I ate the whole thing."{"check":{"has_been_dt":"true"}}

    and probably a lot more I'm not thinking of of the top of my head. These are variables that are most likely already in the program we just need to access them for dialog scripting.

    Third is a way to easily sequence dialog and make sure a given speech gets finished. Some things you want her to say are several lines and she won't pick up where she left off if interrupted. It'd sure be nice is she was a talented porn star and always said her lines no matter how many cocks were stuffed in her mouth.

    P.S. The script I'm working on will be so much cooler with just what we have so far.
    P.P.S. Action for her to pull off immediately. E.g. "Leia, I'm your brother[PULL_OFF_NOW]"{"style":"Him","next":"WTF_Luke"}
     
  8. testing

    testing Potential Patron

    Joined:
    May 9, 2012
    Messages:
    12
    Likes Received:
    0
    Another suggestion: Add an anything option.

    Ex:

    anything:"She will say that no matter what is hapenning."

    Thanks :D
     
  9. Leela

    Leela Potential Patron

    Joined:
    Mar 28, 2011
    Messages:
    93
    Likes Received:
    0
    Feature request: Reset finishes count on new character and/or loading a dialog. Maybe expose the finishes variable so we can just check/set it.
     
  10. T0mcat

    T0mcat Avid Affiliate

    Joined:
    Feb 5, 2012
    Messages:
    263
    Likes Received:
    2
    might be either I'm to dumb to get it working as intended, or it just ISN'T working as intended..

    For me it looks as if there a several small issues with JSON

    - "set" can be used with "initial_settings" to set only ONE variable. So resetting all used variables at the start of a new dialogue seems impossible to me.
    - at least on my laptop the constant checking for triggered variables seems to slow the game heavily. Which seems to result in other triggers not being triggered. Have to check further to confirm this

    - the game seems to check variables randomly, resulting in unneccessary checks, which might be the reason for the checks taking so much time. Got a small "Dialogue" in the spoiler, so anyone can test that for himself - and maybe give some solution which I've not been able to find.

    What this dialogue is supposed to do:
    Just load and start it from within SDT. No movement etc. neccessary. It is supposed to make HER start a countdown in her thoughts, then change her mood when count five is reached. Then the countdown should start again..
    For me, this isn't working right now. The reason seems to be that only one variable can be set with initial_settings, so in the log there appear "undefined values" which keep lines from being displayed when they should be..

    dialogue_name:"Test"

    all:"CLEAR"

    initial_settings:{"change":0}

    intro:"intro one" {"style":"Thought","set":{"mood":1},"check":{"mood":0}}
    intro:"intro two" {"style":"Thought","set":{"mood":2},"check":{"mood":1}}
    intro:"intro three" {"style":"Thought","set":{"mood":3},"check":{"mood":2}}
    intro:"intro four" {"style":"Thought","set":{"mood":4},"check":{"mood":3}}
    intro:"intro five" {"style":"Thought","set":{"change":1},"check":{"mood":4}}

    intro:"Change to happy [HAPPY_MOOD]" {"style":"Thought","set":{"mood":0},"set":{"change":2},"check":{"change":1}}
    intro:"Change to ahegao [AHEGAO_MOOD]" {"style":"Thought","set":{"mood":0},"set":{"change":3},"check":{"change":2}}
    intro:"Change to angry [ANGRY_MOOD]"{"style":"Thought","set":{"mood":0},"set":{"change":4},"check":{"change":3}}
    intro:"Change to normal [NORMAL_MOOD]" {"style":"Thought","set":{"mood":0},"set":{"change":0},"check":{"change":4}}

    So.. any input will be appreciated..
     
  11. RC

    RC Potential Patron

    Joined:
    Nov 27, 2012
    Messages:
    60
    Likes Received:
    0
    Instead of :
    "set":{"mood":0},"set":{"change":4}

    Use:
    "set":{"mood":"0","change":"4"}
     
  12. pinosante

    pinosante Avid Affiliate

    Joined:
    May 9, 2012
    Messages:
    127
    Likes Received:
    0
    Hi T0mcat,

    I've tested out your script and reproduced your errors. But it bugs out even if you remove the multiple set's. Then I thought, maybe the mood settings [HAPPYMOOD] etc. conflict with the set's and check's, but that is not the problem either. You can see with my edit of your dialogue, that the mood changing in combination with the numbering up of the thought, works. But then it will keep looping between Intro 5, Change to Happy, Intro 5, Change to Happy, etc. And I can't see why at this point...

    Code:
    dialogue_name:"Advanced Dialogue Test"
    
    all:"CLEAR"
    
    initial_settings:{"change":0, "mood":0}
    
    intro:"intro one"                      {"style":"Thought","set":{"mood":1},"check":{"mood":0}}
    intro:"intro two [AHEGAO_MOOD]"        {"style":"Thought","set":{"mood":2},"check":{"mood":1}}
    intro:"intro three [HAPPY_MOOD]"       {"style":"Thought","set":{"mood":3},"check":{"mood":2}}
    intro:"intro four [ANGRY_MOOD]"        {"style":"Thought","set":{"mood":4},"check":{"mood":3}}
    intro:"intro five [NORMAL_MOOD]"       {"style":"Thought","set":{"change":1},"check":{"mood":4}}
    
    intro:"Change to happy [HAPPY_MOOD]"   {"style":"Thought","set":{"change":2},"check":{"change":1}}
    intro:"Change to ahegao [AHEGAO_MOOD]" {"style":"Thought","set":{"change":3},"check":{"change":2}}
    intro:"Change to angry [ANGRY_MOOD]"   {"style":"Thought","set":{"mood":0},"set":{"change":4},"check":{"change":3}}
    intro:"Change to normal [NORMAL_MOOD]" {"style":"Thought","set":{"mood":0},"set":{"change":0},"check":{"change":4}}
     
  13. DarkVioletMoonRay

    DarkVioletMoonRay Avid Affiliate

    Joined:
    Aug 10, 2012
    Messages:
    117
    Likes Received:
    0
    Maybe an in-game example would suffice? I'm sure many people learn better by being shown what to do.
     
  14. T0mcat

    T0mcat Avid Affiliate

    Joined:
    Feb 5, 2012
    Messages:
    263
    Likes Received:
    2
    Okay, this one solved the problem.. even without the " around the numbers :)

    See spoiler..

    dialogue_name:"Test"

    all:"CLEAR"

    initial_settings:{"change":0,"mood":0}


    intro:"intro one" {"style":"Thought","set":{"mood":1},"check":{"mood":"0"}}
    intro:"intro two" {"style":"Thought","set":{"mood":2},"check":{"mood":"1"}}
    intro:"intro three" {"style":"Thought","set":{"mood":3},"check":{"mood":"2"}}
    intro:"intro four" {"style":"Thought","set":{"mood":4},"check":{"mood":"3"}}
    intro:"intro five" {"style":"Thought","set":{"mood":5},"check":{"mood":"4"}}

    intro:"Change to happy [HAPPY_MOOD]" {"style":"Thought","set":{"mood":0,"change":1},"check":{"mood":5,"change":0}}

    intro:"Change to ahegao [AHEGAO_MOOD]" {"style":"Thought","set":{"mood":0,"change":2},"check":{"mood":5,"change":1}}

    intro:"Change to angry [ANGRY_MOOD]" {"style":"Thought","set":{"mood":0,"change":3},"check":{"mood":5,"change":2}}

    intro:"Change to normal [NORMAL_MOOD]" {"style":"Thought","set":{"mood":0,"change":0},"check":{"mood":5,"change":3}}

    So, we got circular mood change! Or, well, anything we want to loop in a dialogue ^^
     
  15. DarkVioletMoonRay

    DarkVioletMoonRay Avid Affiliate

    Joined:
    Aug 10, 2012
    Messages:
    117
    Likes Received:
    0
    Figured it out just now. Here's the code that I used to experiment with, but it seems that RC beat me to it lol:

    dialogue_name:"Advanced Dialogue Test"

    all:"CLEAR"

    initial_settings:{"change":0, "mood":0}


    intro:"intro one" {"style":"Thought","check":{"mood":0}, "set":{"mood":1}}
    intro:"intro five [HAPPY_MOOD]" {"style":"Thought","check":{"mood":1}, "set":{"mood":5, "change":1}}

    intro:"Change to happy [HAPPY_MOOD]" {"style":"Thought","check":{"change":1}, "set":{"change":2}}
    intro:"Change to ahegao [AHEGAO_MOOD]" {"style":"Thought","check":{"change":2}, "set":{"change":3}}
    intro:"Change to angry [ANGRY_MOOD]" {"style":"Thought","check":{"change":3}, "set":{"change":4}}
    intro:"Change to normal [NORMAL_MOOD]" {"style":"Thought","check":{"change":4}, "set":{"change":0, "mood":0}}

    See the emboldened areas? But I made it a bit simpler, so that the second group doesn't have to even check the "mood" parts because they're irrelevant at this point (given that they focus on the "change" not the "mood." ) :)
     
  16. This is what I did to make the mood change loop.

    The first one sticks to the formula of letting a new intro event trigger to increment the count. It uses moodCheck like a switch and the appended number as cases. Sorry the variable names are a little confusing on this one.
    dialogue_name:"Test"

    all:"CLEAR"

    initial_settings:{"change":"0", "mood":"0"}

    intro:"intro *mood*[moodCheck]" {"style":"Thought","set":{"mood":"+1"},"check":{"mood":"<=3"}}
    moodCheck:"[mood*change*]" {"style":"Thought","set":{"change":"+1"},"check":{"mood":"3"}}

    mood1:"Change to happy [HAPPY_MOOD]" {"style":"Thought","set":{"mood":0}}
    mood2:"Change to ahegao [AHEGAO_MOOD]" {"style":"Thought","set":{"mood":0}}
    mood3:"Change to angry [ANGRY_MOOD]"{"style":"Thought","set":{"mood":0}}
    mood4:"Change to normal [NORMAL_MOOD]" {"style":"Thought","set":{"mood":0,"change":"0"}}

    The second one starts a recursive dialogue line that loops until it hits its count. This is a bit faster.
    dialogue_name:"Test"

    all:"CLEAR"

    initial_settings:{"count":0, "mood":0}

    intro:"[countdown]"{"style":"Thought","check":{"count":0}}
    countdown:"Count *count* [countdown]" {"style":"Thought","set":{"count":"+1"},"check":{"count":"<5"}}
    countdown:"[mood*mood*]" {"style":"Thought","set":{"mood":"+1"},"check":{"count":"5"}}

    mood1:"Change to happy [HAPPY_MOOD][countdown]" {"style":"Thought","set":{"count":0}}
    mood2:"Change to ahegao [AHEGAO_MOOD][countdown]" {"style":"Thought","set":{"count":0}}
    mood3:"Change to angry [ANGRY_MOOD][countdown]"{"style":"Thought","set":{"count":0}}
    mood4:"Change to normal [NORMAL_MOOD][countdown]" {"style":"Thought","set":{"count":0,"change":0}}

    Overall this method should allow us to check against more complex criteria, though I have yet to test it. Where as listing multiple checks in the JSON seems to evaluate as an or operator, we can check multiple criteria using the dialogue line names. Say if you want to check against three variables. CumCount > 3, Mood ahego, and has deepthroated. If you set a naming protocol such as
    Code:
    switch:"[Case*mood**dt*]"{"check":{"cumCount":">3"}}
    CaseHY:"Happy / Deep Throated"
    CaseHN:"Happy / Has Not Deep Throated"
    CaseAY:"Ahego / Deep Throated"
    CaseHN:"Ahego / Has Not Deep Throated"
    
    etc...
    Another possibility is nesting the switches which allows for a lot of control as well.
     
  17. pinosante

    pinosante Avid Affiliate

    Joined:
    May 9, 2012
    Messages:
    127
    Likes Received:
    0
    Of course! Genius. You have to set the mood to something different to get out of the check: mood line in "intro line 5". Ok, got it. Thanks!
     
  18. AaRL

    AaRL Swell Supporter

    Joined:
    Feb 17, 2011
    Messages:
    824
    Likes Received:
    0
    Man Ive been out of the dialogue loop too long...

    Is anyone willing to upload a sample dialogue explaining the new advanced techniques? I'm having trouble following Kona's explanation (and others) of it. It would work better for me in practice to see a short simple dialogue containing the strings and variables. Also a quick explanation of what this can actually do for dialogue would be helpful. (Trigger certain lines with certain actions? / Making certain appear more than others? Hidden dialogue if other dialogue triggers have been met? Stuff like that if that what this latest feature does.)

    Also, on a side note. It doesn't help that the actual in game help contained within the dialogue editor doesn't have anything on this latest feature...
     
  19. RC

    RC Potential Patron

    Joined:
    Nov 27, 2012
    Messages:
    60
    Likes Received:
    0
    I will soon release a new very big dialogue with all the different new tricks you can do with the new system.
     
  20. AaRL

    AaRL Swell Supporter

    Joined:
    Feb 17, 2011
    Messages:
    824
    Likes Received:
    0
    Thanks RC for doing this. I just hope this new system doesn't break older dialogues... but I think it has.

    Some older dialogues and the larger ones (ie Booster's Hypno Series) take some time to load, where in earlier versions it was instant. Even my own which arent that large at all take 2-3 seconds to load. In this day and age, it should not take 2-3 seconds to load a 20-30kb size file in ANY system.

    Also, some characters it seems are no longer valid thus making incorrect dialogue display, none at all, or just stopped all together. The effected dialogue still displays using the in game editor but not in game play itself. I'm still testing various dialogues to get a better feel. I'm guessing this has to do with the new system regarding strings and variables but I don't know since I don't understand the latest dialogue system.

    I'm hoping Kona returns here to address it, but given his visits to the forum, we can probably hope to see him some time in 2014 unless the Mayans are right... (lol)