First Question

Discussion in 'Ink NPC Dialogue Composition' started by Lazarus Long, Jan 31, 2020.

  1. Lazarus Long

    Lazarus Long Avatar

    Messages:
    742
    Likes Received:
    2,153
    Trophy Points:
    93
    Gender:
    Male
    Location:
    New Britannia
    Ok folks so seems I got the first question for all you really geeky code monkeys out there :)

    And thanks for being so more than me.

    Ok so here goes.

    In the example given by @Ravalox in the introduction https://www.shroudoftheavatar.com/f...ned-npcs-with-player-created-dialogue.161442/ and on the Inky website i took it and started to play.

    So.. I can get this to work partially

    Code:
    The Setting...  Owls Head, Any given day.... Usually Monday thru Friday at Noon.
    NBNN Studios Owls Head. Laz & Jack sit on a lot and bring you the news.
    -> owlshead
    
    === owlshead ===
    Laz shouts "Quiet on the set" as Jack jumps in to his chair late and Guardian Spif starts playing piano. Laz say's NBNN News going live on air
     
    
    + [Nod curtly.]  -> nod
     
    + [Live on air?]
        Yes live on Twitch. twitch.tv/nbnnnews or twitch.tv/sinassist -> radio
    
    + [In game radio?]
        Yes on the in game radio on Radio Free Britannia. WRFB.ROCKS -> twitch
    
    
    
    === nod ===
    I nodded curtly, not believing a word of it. -> ending
    
    
        
    === radio ===
     Don't forget on the in game radios as well on Radio Free Britannia. WRFB.ROCKS."
    + "But of course."
     -> ending
     
     + "Nod curtly."
     -> nod
     
     
    === twitch ===
     Don't forget on twitch.tv/nbnnnews or twitch.tv/sinassist
     + "But of course."
     -> ending
     
    
    === ending ===
    "NBNN shall interpret the news like never before."
    -> END
    It Functions but not fully. FYI Works fine in the editor.

    But this version will not compile? When i save it it's not recognized by SOTA

    Code:
    The Setting...  Owls Head, Any given day.... Usually Monday thru Friday at Noon.
    NBNN Studios Owls Head. Laz & Jack sit on a lot and bring you the news.
    -> owlshead
    
    === owlshead ===
    Laz shouts "Quiet on the set" as Jack jumps in to his chair late and Guardian Spif starts playing piano. Laz say's NBNN News going live on air
     
    
    + [Nod curtly.]  -> nod
     
    + [Live on air?]
        Yes live on Twitch. twitch.tv/nbnnnews or twitch.tv/sinassist -> radio
    
    + [In game radio?]
        Yes on the in game radio on Radio Free Britannia. WRFB.ROCKS -> twitch
    
    
    
    === nod ===
    I nodded curtly, not believing a word of it. -> ending
    
    === laz ===
    Laz Say's I LOVE Ths ****! -> ending
        
    === radio ===
     Don't forget on the in game radios as well on Radio Free Britannia. WRFB.ROCKS."
    + "But of course."
     -> ending
     
     + "Nod curtly."
     -> nod
     
     
    === twitch ===
     Don't forget on twitch.tv/nbnnnews or twitch.tv/sinassist
     + "But of course."
     -> laz
     
    
    === ending ===
    "NBNN shall interpret the news like never before."
    -> END
    This version also works fine in the editor but SOTA won't recognize it.

    Any help is much Appreciated!

    Thanks,

    Laz
     
    .dao. likes this.
  2. Alley Oop

    Alley Oop Bug Brigade – Bug Hunter

    Messages:
    9,081
    Likes Received:
    14,620
    Trophy Points:
    153
    length.

     
    Cordelayne, Anpu and Numa like this.
  3. Ravalox

    Ravalox Dev At Large Moderator SOTA Developer

    Messages:
    610
    Likes Received:
    1,435
    Trophy Points:
    105
    Gender:
    Male
    Location:
    Austin, TX
    @Lazarus Long This should work as it is 960 characters long (IE < 1000)... but for reasons unknown as of yet, the game will only allow 922 characters. We are looking into this and should have it resolved before we apply the system in full force.
     
  4. Lazarus Long

    Lazarus Long Avatar

    Messages:
    742
    Likes Received:
    2,153
    Trophy Points:
    93
    Gender:
    Male
    Location:
    New Britannia
    Understood.

    Still can't figure the partiality of the functioning tho.

    Works fine in the editor but when applied to the NPC it only works partially. Prob related?

    Here is another example...

    Code:
    Welcome to the NBNN Studio!
     Home of Lunch with Laz and Jack!
    -> owlshead
    
    === owlshead ===
    + [Twitch] -> twitch
    + [Radio] -> radio
    + [RMT] -> RMT
    
    
    === radio ===
    "Use your aether amplifier to choose Radio Free Britannia. or visit WRFB.ROCKS."
    
    + [Twitch] -> twitch
    + [RMT] -> RMT
    + [Aloha] -> ending
     
    
     === twitch ===
     "You can watch on twitch.tv/nbnnnews or twitch.tv/sinassist ."
    
    + [Radio] -> radio
    + [RMT] -> RMT
    + [Adios] -> ending
     
    === RMT ====
    "ShroudMarketplace.com is the place to go for all of your RMT needs."
    
    + [Twitch] -> twitch
    + [Radio] -> radio
    + [RMT] -> RMT
    + [Auf Wiedersehen] -> ending
     
    
    === ending ===
    "NBNN interprets the news like nobody else."
    -> END
    This works GREAT in the editor but leaves a LOT to be seen on an NPC?

    Anyone else got ideas?
     
  5. Alley Oop

    Alley Oop Bug Brigade – Bug Hunter

    Messages:
    9,081
    Likes Received:
    14,620
    Trophy Points:
    153
    new lines? i think i saw something about that but can't find it now. try

    + [Twitch]
    -> twitch
     
    Anpu likes this.
  6. Lazarus Long

    Lazarus Long Avatar

    Messages:
    742
    Likes Received:
    2,153
    Trophy Points:
    93
    Gender:
    Male
    Location:
    New Britannia
    It's a Syntax error? If that's the proper term :)

    Thanks to @Jack SinAssist dinking around.

    Seems if you add a . before the actions they seem to trigger properly. at least that what we have functional at this point :)

    Code:
    Owls Head, Any given day.... Usually Monday thru Friday at Noon.
    NBNN Studios Owls Head. Laz & Jack sit on a lot and bring you the news.
    -> owlshead
    
    === owlshead ===
    Welcome To NBNN
    
    + [Nod curtly.]  -> nod
     
    + [Live on air?]
        Yes live on Twitch. twitch.tv/nbnnnews or twitch.tv/sinassist -> radio
    
    + [In game radio?]
        Yes on the in game radio on Radio Free Britannia. WRFB.ROCKS -> twitch
    
    
    
    === nod ===
    .
    I nodded curtly, not believing a word of it. -> ending
    
    === laz ===
    .
    Laz Say's I LOVE This ****! -> ending
        
    === radio ===
    .
     Don't forget on the in game radios as well on Radio Free Britannia. WRFB.ROCKS."
    + "But of course."
     -> ending
     
     + "Nod curtly."
     -> nod
     
     
    === twitch ===
    .
     Don't forget on twitch.tv/nbnnnews or twitch.tv/sinassist
     + "But of course."
     -> laz
     
    
    === ending ===
    "NBNN shall interpret the news like never before."
    -> END
     
  7. Ravalox

    Ravalox Dev At Large Moderator SOTA Developer

    Messages:
    610
    Likes Received:
    1,435
    Trophy Points:
    105
    Gender:
    Male
    Location:
    Austin, TX
    @Lazarus Long @Jack SinAssist

    Here is a composition that is working 100% on my Automaton. Note the lack of "white space"; any extra CR/LF or spaces will be counted towards the character count. So compacting as much as you can will get you more space for dialogue. No need for quotes or brackets, and putting the divert "->" on the same line using the below format will not work (it's still less characters even though you have to use the CR/LF).

    I'll be writing some more advanced stuff soon since I am re-working Hometown and adding in Automatons to assist in guiding players to various locations and items on display. :D

    Code:
    Greetings! My lord has asked me to assist you as I can.  Anything I can help you with?
    ->start
    ==start
    +Any rumors?
    ->A
    +Who is Your Lord?
    ->B
    +Where am I?
    ->C
    +Goodbye
    ->F
    ==A
    Since your asking, stories have been floating around! I hear of a dungeon in the local cemetery that many have gone to explore, whereas none have returned. You'd be wise to avoid that cursed place!
    ->start
    ==B
    Ravalox of the Darkshire. He's the Governor of Darkshire Hills. He is good and just; unlike his brother Xolavar, who has great disdain for Outlanders!
    +Xolavar?
    ->E
    +I must ask something else of you
    ->start
    ==C
    Why, this is Darkshire Hills, Of Course! Why not take Holiday at the Darkshire Hills Hunting and Fishing Lodge this year?  See the Majestic møøse!  A møøse once bit Xolavar.
    +møøse?
    ->D
    +May I ask something else?
    ->start
    ==D
    No realli! He was Karving his initials on the møøse at the time!
    ->start
    ==E
    I dare not speak of him!
    ->start
    ==F
    Fare Thee Well
    ->END
     
    Aeryk, .dao. and Sean Silverfoot like this.
  8. Ravalox

    Ravalox Dev At Large Moderator SOTA Developer

    Messages:
    610
    Likes Received:
    1,435
    Trophy Points:
    105
    Gender:
    Male
    Location:
    Austin, TX
    By the way ... the 922 character thing: Turns out the CR/LF (Carriage Return/Line Feed) are characters, and are being counted. The Ink Editor doesn't have a character count built in (that I have seen), I have been doing my writing in Notepad++ (shows accurate character count on the bottom status bar).

    We are adding a character count in the Dialogue Import UI, so at minimum there will be a way to see it there.
     
    Aeryk, Sean Silverfoot, Anpu and 2 others like this.
  9. Lars vonDrachental

    Lars vonDrachental Avatar

    Messages:
    1,090
    Likes Received:
    1,537
    Trophy Points:
    125
    Gender:
    Male
    Location:
    Germany
    I was testing a little too and ran into the same problems as Lazarus Long...not using a new line for the link-calls and way to many characters. ;)
    So far I have two question to add.
    1) Is it normal that using "->END" is not closing the NPC-dialog-interface? As far as I have seen the dialog stays open and you have to click the button "leave" to close it.
    2) Maybe that would be overkill but would it difficult to prepare some kind of "localisation flag" to import the same ink-conversations in different languages?
     
  10. Lazarus Long

    Lazarus Long Avatar

    Messages:
    742
    Likes Received:
    2,153
    Trophy Points:
    93
    Gender:
    Male
    Location:
    New Britannia
    I'm hoping that when things get fixed we are going to be able to go past 1k characters?
    Can we confirm this?

    Otherwise I'm afraid that linking and story telling is gonna be a waste of time.
     
    Last edited: Feb 1, 2020
    Numa, Sean Silverfoot and Cordelayne like this.
  11. Anpu

    Anpu Avatar

    Messages:
    3,747
    Likes Received:
    4,200
    Trophy Points:
    153
    I believe what Ravalox is saying is they need to test the basic functionality and behavior of this new npc scripting function first. Once that is all working correctly as expected, then they can add more options and a larger script to these.
     
    Numa, Sean Silverfoot and Alley Oop like this.
  12. Lazarus Long

    Lazarus Long Avatar

    Messages:
    742
    Likes Received:
    2,153
    Trophy Points:
    93
    Gender:
    Male
    Location:
    New Britannia
    I believe so too. But confirmations help :)

    @Ravalox Thanks for your example. SYNTAX while very free here counts I have now found several variants that work.

    Here is the latest using your style.

    Code:
    Welcome to the NBNN Studios!
    Home of Lunch with Laz and Jack!
    Laz and Jack are the best newsmen in the game!
    ->start
    ==start
    +News
    ->A
    +Listen
    ->B
    +Watch
    ->C
    +Laz
    ->D
    +Jack
    ->E
    +Shroud Marketplace
    ->F
    +Goodbye
    ->G
    ==A
    Laz and Jack broadcast SotA news over the aether and on twitch.
    You can watch or listen Monday - Friday from 12-1 NBT.
    ->start
    ==B
    Use your aether amplifier to choose Radio Free Britannia. or visit WRFB.ROCKS.
    ->start
    ==C
    You can watch on twitch.tv/nbnnnews or twitch.tv/sinassist
    ->start
    ==D
    Say's I LOVE This ****!
    ->start
    ==E
    Say's Shop Shroudmarketplace.com
    ->start
    ==F
    ShroudMarketplace.com is the place to go for all of your RMT needs.
    ->start
    ==G
    Remember: NBNN interprets the news like nobody else.
    ->END
    Code:
    Welcome to the NBNN Studios!
    Home of Lunch with Laz and Jack!
    Laz and Jack are the best newsmen in the game!
    ->start
    ==start
    *News
    ->A
    *Listen
    ->B
    *Watch
    ->C
    *Laz
    ->D
    *Jack
    ->E
    *Shroud Marketplace
    ->F
    *Goodbye
    ->G
    ==A
    Laz and Jack broadcast SotA news over the aether and on twitch.
    You can watch or listen Monday - Friday from 12-1 NBT.
    ->start
    ==B
    Use your aether amplifier to choose Radio Free Britannia. or visit WRFB.ROCKS.
    ->start
    ==C
    You can watch on twitch.tv/nbnnnews or twitch.tv/sinassist
    ->start
    ==D
    Say's I LOVE This ****!
    ->start
    ==E
    Say's Shop Shroudmarketplace.com
    ->start
    ==F
    ShroudMarketplace.com is the place to go for all of your RMT needs.
    ->start
    ==G
    Remember: NBNN interprets the news like nobody else.
    ->END
    Varying The + for *
    Gives 2 different results. Pretty cool stuff.

    Learning as we go!​
     
    Aeryk, Sean Silverfoot and Anpu like this.
  13. Anpu

    Anpu Avatar

    Messages:
    3,747
    Likes Received:
    4,200
    Trophy Points:
    153
    Is there a specific Notepad + we need to use? I honestly have not used that for years (when I used to do NWN and NWN2 scripting).
     
  14. Lazarus Long

    Lazarus Long Avatar

    Messages:
    742
    Likes Received:
    2,153
    Trophy Points:
    93
    Gender:
    Male
    Location:
    New Britannia
    Anpu the Inky Editor is what i'm using.
    You can get it here.
    https://www.inklestudios.com/ink/
     
    Aeryk and Anpu like this.
  15. Alley Oop

    Alley Oop Bug Brigade – Bug Hunter

    Messages:
    9,081
    Likes Received:
    14,620
    Trophy Points:
    153
    any plain text editor will work, ravalox was just naming a specific one that has a convenient char count display.
     
    Aeryk, Anpu and Ravalox like this.
  16. Aeryk

    Aeryk Avatar

    Messages:
    112
    Likes Received:
    144
    Trophy Points:
    18
    Location:
    Terra (thus far)
    Some of us that have multiple systems (or running the Linux subsystem on Windows) can do our editing on Mac or Linux where it is just one character (\n unless the user changes a setting in a specific program to use the Windows line endings).

    Alternatively for those using Notepad++, you can open a file with the Windows line endings, and save it with the macOS/Unix endings by changing this setting:
    `Edit > EOL Conversion > UNIX Format`
    via http://wiki.secondlife.com/wiki/How_to_avoid_DOS_line_endings_in_Windows_tools

    Just keep in mind you may want to set it back later if you use the program for other things on Windows. As @Alley Oop points out, there are handfuls of text editors, and many of them can also do this.

    The higher limit will of course be nice when we get it, but there will always be a case where we need to squeeze in a few precious characters. ^_^
     
    Numa likes this.
  17. Numa

    Numa Avatar

    Messages:
    2,758
    Likes Received:
    5,398
    Trophy Points:
    153
    Location:
    Breaker's Landing
    We'll need 7-8 pages minimum for a decent story. I have no problems paying extra on the store for more capacity as long as the minimum is there.
     
    Paladin Michael and Aeryk like this.
  18. Numa

    Numa Avatar

    Messages:
    2,758
    Likes Received:
    5,398
    Trophy Points:
    153
    Location:
    Breaker's Landing
    Notepad++ is a great editor. Very glad it can be used here.
     
  19. Rowell

    Rowell Avatar

    Messages:
    553
    Likes Received:
    1,156
    Trophy Points:
    63
    Location:
    Brittany Fields
    Okay...I gotta ask. How do we get these Inky scripts into these new Conversationalist NPC's from the AddOn Store?
     
  20. Nick

    Nick Avatar

    Messages:
    805
    Likes Received:
    1,575
    Trophy Points:
    93
    I believe you can only insert these scripts with the NPC in your inventory and not on the lot. Took me a loooong time to figure that out on the automaton.
    *can't confirm if its the same on the ones on the store because I am too cheapskate to buy them. But they should work the same way.*

    Below is from the player's instructions.

    Custom NPC Dialogue
    Some Decoration Pets can be given custom dialogue in the form of an Ink source file. Ink is a scripting language used to create stories. Click here for more information about Ink.


    To import custom dialogue, right-click on an eligible Decoration Pet (such as an Automaton Decoration Pet), and select Edit Dialogue from the context menu. In the Edit Dialogue window, click the Import Content button, select your Ink source file from the list, and click Import.


    [​IMG]

    [​IMG]

    Edit Dialogue window

    Custom Dialogue “source file” window


    In order for Ink files to be shown in the list, they must be placed in a particular directory on your computer. To open the correct directory, click the folder icon in the bottom-left corner of this “source file” window.
     
    Numa likes this.