Inky learning and discovery.

Discussion in 'Ink NPC Dialogue Composition' started by craftymethod, Nov 12, 2019.

Tags:
Thread Status:
Not open for further replies.
  1. craftymethod

    craftymethod Avatar

    Messages:
    1,133
    Likes Received:
    2,001
    Trophy Points:
    113
    Lets create a thread specifically for the purpose of learning what we can do with Inky, tips and tricks and sharing examples of code and implementations.







     
    Last edited by a moderator: Feb 22, 2020
  2. craftymethod

    craftymethod Avatar

    Messages:
    1,133
    Likes Received:
    2,001
    Trophy Points:
    113
    Last edited: Dec 7, 2020
  3. craftymethod

    craftymethod Avatar

    Messages:
    1,133
    Likes Received:
    2,001
    Trophy Points:
    113
    (Very) Simple pick a path adventure. just copy and paste into the program and it will run on the right side of the screen. Try not to read to much of the code before trying :p
    Code:
    -> Castle1
    
    === Castle1
    
    = CourtYard
        You have woken up on some cold stone tiles in what seems to be the courtyard of a small and very parculiar looking castle.
        What are you going to do? You feel quite drousy and your clothes are tattered.
        *Go through the Front Door... Confidently!
            -> FrontDoor
        *Search for another entrance...
            -> Entrance2
        *Leave the area, I don't want to go into the castle!
            ->LeaveArea
     
    -> FrontDoor
    
    = FrontDoor
    GUARD: "Oi!"
    
        * Act cool...
            As you try to act cool, the guard strikes you with his mace, killing you with a devestating blow.
            -> GameOver3
         
        * Run away as fast as you can...
            You turn and run... as you are running down the stairs, you feel a cold sharp pain and realise, you have a throwing dagger in your heart... Woops!
            -> GameOver3
    
    = Entrance2
        Slowly, you make your way towards the side of the castle and after several minutes of searching, you find a small window which you manage to fit through and discover that you have landed in a treasure room!
     
            What will you loot?
            **As much as you can carry!
                While you are loading your arms with treasure you fail to hear the guard coming into the room and slamming an axe into your skull.
             
                The last thing you remember is seeing a shadow that looked an awefull lot like an axe...
                    -> GameOver3
         
            **Take one item only...
                You spend a moment choosing a piece of tresure and leave through the window in which you came.
                    ->GameOver2
     
     
    = LeaveArea
        You leave the strange looking castle and within a few days it slips from your memory forever...
        -> END
    
    = GameOver2
        You escaped with the treasure!
        -> END
     
    = GameOver3
        You have foolishly died.
        -> END
     
    Last edited: Nov 13, 2019
    Time Lord, Anpu and Sean Silverfoot like this.
  4. Daxxe Diggler

    Daxxe Diggler Avatar

    Messages:
    2,692
    Likes Received:
    5,711
    Trophy Points:
    153
    Gender:
    Male
    Location:
    Virtue Oasis - Hidden Vale
    Hmm, maybe I'm doing something wrong, but I downloaded Inky and ran the .exe, copy/pasted your sample code, right side is completely blank.

    On a side note, I also just tried typing stuff and creating my own and still nothing appeared on the right.

    What am I doing wrong?
     
    Time Lord likes this.
  5. Aartemis

    Aartemis Avatar

    Messages:
    1,377
    Likes Received:
    3,806
    Trophy Points:
    125
    Gender:
    Male
    Location:
    Cleveland, Ohio
    That's weird. As soon as I was typing things on the left they appeared on the right. It sort of runs in active mode. You can press the Double Return Arrow in the top right to reset the story/script from the beginning.
     
    Time Lord likes this.
  6. Aartemis

    Aartemis Avatar

    Messages:
    1,377
    Likes Received:
    3,806
    Trophy Points:
    125
    Gender:
    Male
    Location:
    Cleveland, Ohio
    Maybe try [inky debug] tab and Reset web form / CTRL+R?

    Sounds like something is blocking that right side view. With a new project it should start by displaying End of Story. As you type you start seeing it on the right as it will appear to the viewer.

    If you watch his first video above, you can see how it should be reacting.
     
    Time Lord likes this.
  7. Daxxe Diggler

    Daxxe Diggler Avatar

    Messages:
    2,692
    Likes Received:
    5,711
    Trophy Points:
    153
    Gender:
    Male
    Location:
    Virtue Oasis - Hidden Vale
    Yea, I watched all the videos. When it first loads, I see all the menu stuff up top (even looked through the documentation, etc.) and I can type stuff in the left panel. The right panel is completely blank though... no "End of Story" or anything showing.

    Do I need to run an install prog to get it to work or just download and unzip?

    I've tried both the Win32 and Win64 versions and neither work. :(
     
    Time Lord likes this.
  8. Daxxe Diggler

    Daxxe Diggler Avatar

    Messages:
    2,692
    Likes Received:
    5,711
    Trophy Points:
    153
    Gender:
    Male
    Location:
    Virtue Oasis - Hidden Vale
    Hmm, OK, I just ran the Win64 version again "as admin" and it now seems to work.
     
    Time Lord, Anpu, craftymethod and 2 others like this.
  9. craftymethod

    craftymethod Avatar

    Messages:
    1,133
    Likes Received:
    2,001
    Trophy Points:
    113
    Meet Crazy Ivan!

    Code:
    // Author: Craftymethod
    // NPC Test: Crazy Ivan
    
    "Hi I'm Crazy Ivan!"...
    
    -> CrazyIvan
    
    === CrazyIvan
    
        -> IvansRamblings
    
        == IvansRamblings
    
            {~"I'm as poor as a church mouse, that's just had an enormous tax bill on the very day his wife ran off with another mouse, taking all the cheese."|"I have a cunning plan"|"You ride a horse rather less well than another horse would. Your brain would make a grain of sand look large and ungainly and the part of you that can't be mentioned, I am reliably informed by women around the Court, wouldn't be worth mentioning even if it could be."|"Give the likes of Baldrick the vote and we'll be back to cavorting druids, death by stoning and dung for dinner..."|"I would advise you to make the explanation you are about to give... phenomenally good."|"Bloody explorers, ponce off to Mumbo Jumbo land, come home with a tropical disease, a suntan and a bag of brown lumpy things, and Bob's your uncle, everyone's got a picture of them in the lavatory."|"Oh god, who is she this time?"|"The path of my life is strewn with cowpats from the devil's own satanic herd."|"I've always been meaning to ask: do you have any ambitions in life apart from the acquisition of turnips?"|"A man may fight for many things. His country, his principles, his friends. The glistening tear on the cheek of a golden child. But personally, I'd mud-wrestle my own mother for a ton of cash, an amusing clock and a sack of French porn."|"I couldnt be more petrified if a wild Rhinoceros had just come home from a hard day at the swamp and found me wearing his pyjamas, smoking his cigars and in bed with his wife."}
    
                * Well said!
                    -> CrazyIvan
                * Ok...
                    -> CrazyIvan
                * ENOUGH!
                    -> Ending
    
    === Ending
        ->END
    
     
    Last edited: Nov 14, 2019
  10. Merrik

    Merrik Bug Hunter

    Messages:
    188
    Likes Received:
    354
    Trophy Points:
    30
    Gender:
    Male
    Location:
    Elysium
    A quick tutorial:
    This is Inky :)
    [​IMG]

    Let me start by saying Inky can get a LOT more complicated then this.. you can nest choices and all kinds of neat sorcery like that.. also the diverts "+" can be denoted with an asterisk ( * ) and in most tutorials they use the asterisk instead of the plus sign. (The asterisk is used when you want the question only asked once, the plus sign for when you can ask the question over and over.)
    What I use here is the most basic and all you need for scripting in SotA

    the Opening is the first line.. generally setting up the mood of your script.
    the "->" is called a divert, think of it as saying "go to"
    the "==" is called a knot, this is where the divert is going (this is also called a Branch in all other languages)
    the "+" or "*" is a choice.. it's just something to choose

    For example, in Robecca.ink we start with

    Greetings! If you need anything, please check with the cashier. I am very busy picking up after Miss Lucy...
    ->start
    ==start
    +Any rumors?
    ->A

    the "Greetings" line is an opening followed by a divert and the fist Knot which is the start of the dialogue, the first choice is "Any rumors?" and when you click it, it will take you to Knot "A" with a divert.. saying "Go to A"

    ==A
    Since your asking, stories have been floating around! I hear of strange happenings in the Dougan Family silver mine. It's out back near the greenhouses.
    ->start

    this tells the script "hey this is where I wanted to go if they click "Any rumors?", and then the script diverts you back to the start "->start"
    so basically you have an Opening, a "->start", and an "->END" and everything else goes between the "->start" and "->END"
    from there you add the rest using the same principle
     
    Last edited: Apr 23, 2020
  11. Merrik

    Merrik Bug Hunter

    Messages:
    188
    Likes Received:
    354
    Trophy Points:
    30
    Gender:
    Male
    Location:
    Elysium
    I Felt that my tutorial needed to be expanded and at that point it grew too large to include in this thread, so i have created it's own thread Here.
     
  12. Net

    Net Avatar

    Messages:
    3,727
    Likes Received:
    11,178
    Trophy Points:
    153
    I love your tutorial and hope you expand on this. I really want my NPC to be able to respond to passwords and since we cannot input random keywords (as far as I can tell) I was thinking maybe with branching and possibly cycles there could be some workaround with so many possibilities that only those with the right knowledge or extreme luck might get the right result.
     
    Time Lord likes this.
  13. Fetid SirDidy

    Fetid SirDidy Avatar

    Messages:
    242
    Likes Received:
    425
    Trophy Points:
    18
    Gender:
    Male
    I recently bought my first crown store NPC and have begun messing around with Ink Dialogue. I've been trying to figure out if there is some way to display text without displaying the NPC character name or Avatars name. I want to be able to add narrative voice/internal dialogue to the opening of a conversation or even throughout the course of the conversation. If I go with no tag in my "narration/internal dialogue" text , it displays the npc's name as if he is speaking which is no good.

    [​IMG]
    [​IMG]

    If I add a (*) tag to the line of text it at least comes from the Avatar (which makes sense because it's sort of an internal dialogue) but this means you have to click a dialogue option when you first interact with the NPC.
    [​IMG]
    [​IMG]
    [​IMG]

    So, in short, I'm wondering if there is some sort of tag or command that would allow for certain text to be displayed without any NPC or Avatar designation.
     
    Time Lord, Anpu, Net and 1 other person like this.
  14. Paladin Michael

    Paladin Michael Bug Hunter

    Messages:
    2,649
    Likes Received:
    4,202
    Trophy Points:
    153
    Gender:
    Male
    Location:
    Perennial Coast
    Is it currently possible to insert /Emotes into code?
    I remember a stream with @Elgarion mentioning this - but can't remember exactly what stream and when. @Elgarion? :)
    Thank you for any information!
     
    Time Lord, Sean Silverfoot and Net like this.
  15. Elgarion

    Elgarion Dev Emeritus Dev Emeritus

    Messages:
    3,223
    Likes Received:
    9,292
    Trophy Points:
    153
    Gender:
    Male
    Don't think that's put into the Inky stuff yet. But in player chat:

    "If Darkstarr types "/em jabs their finger %point% threateningly at you.", the chat window will display "Darkstarr jabs their finger threateningly at you.", and will play the animation for the /point emote."

    From: http://sotawiki.net/sota/Emotes
     
  16. Paladin Michael

    Paladin Michael Bug Hunter

    Messages:
    2,649
    Likes Received:
    4,202
    Trophy Points:
    153
    Gender:
    Male
    Location:
    Perennial Coast
    Thank you Elgarion. That's what I meant, if it is possible for the NPC's - would be fine to have emotes for them while talking to them.

    So we are waiting for 3 things to create interesting player quests:
    1. Possibility to insert items for quests (like a key or a fruit or a fish or ...)
    2. Possibility to reward players with XP or items or gold or crowns (maybe we have an amount of 10000 xp for finishing a quest and 100 gold - and the possibility to raise the reward with Crowns or random items)
    3. Emotes for upgrade the conversations

    Would be fine, if you could talk about Inky Updates on a livestream next time :)
     
  17. Paladin Michael

    Paladin Michael Bug Hunter

    Messages:
    2,649
    Likes Received:
    4,202
    Trophy Points:
    153
    Gender:
    Male
    Location:
    Perennial Coast
    Another Question about using different languages:

    Is it possible to provide different text (english and german f.e.) depending on language in game options?

    This would be another interesting feature :)
     
    Last edited: Jul 14, 2020
  18. Aeso Wondah

    Aeso Wondah Avatar

    Messages:
    46
    Likes Received:
    80
    Trophy Points:
    8
    Location:
    Canada
    Are you sure Elgarion?

    I have tried this recently in game to no avail.

    Cheers.
     
    Time Lord and Elgarion like this.
  19. Merrik

    Merrik Bug Hunter

    Messages:
    188
    Likes Received:
    354
    Trophy Points:
    30
    Gender:
    Male
    Location:
    Elysium
    i can confirm this works in game.. for the player... either /me or /em works for emoting

    type:
    /me says %wave% hello
    this displays "<your name> says hello" and your character will wave

    works with regular text as well

    Type:
    Hello! %wave%
    this will display "<your name>: Hello!" and your character will wave

    i do this regularly adding %pontificate% into the chat box when people ask me questions and i am answering them

    That being said... it is NOT in inky... it needs to go in as a wishlist item to add it to shroud's implementation of Ink along with all the other sudgestions here..

    Personally i would LOVE for all of it to be added.. wait... no... then i would have to add more chapters to my tutorial...
    nevermind.. forget i said anything LOL
     
    Time Lord, Lily Byrd and Elgarion like this.
  20. craftymethod

    craftymethod Avatar

    Messages:
    1,133
    Likes Received:
    2,001
    Trophy Points:
    113
    As adventure crafting goes, its good to remember that us as players already have emote functions in our text output I didn't know about the %emote% :)

    Excited about next layer consideration ideas like npc emotes and something i've been championing, the loading of movement paths into npc's, and something else I would suggest perhaps is loading of player created speech audio into the conversationalists.

    Imagine what we could do with that kind of functionality.

    Would be great too if they were able to move away from the lot, I would have great fun pretending my convo npc got lost in a local forrest and had to be found as a little quest.
     
    Sean Silverfoot and Time Lord like this.
Thread Status:
Not open for further replies.