Inky learning and discovery.

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

Tags:
  1. craftymethod

    craftymethod Avatar

    Messages:
    916
    Likes Received:
    1,699
    Trophy Points:
    93
    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:
    916
    Likes Received:
    1,699
    Trophy Points:
    93
    Sean Silverfoot likes this.
  3. craftymethod

    craftymethod Avatar

    Messages:
    916
    Likes Received:
    1,699
    Trophy Points:
    93
    (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
    Anpu and Sean Silverfoot like this.
  4. Daxxe Diggler

    Daxxe Diggler Bug Brigade - Bug Hunter

    Messages:
    2,704
    Likes Received:
    5,733
    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?
     
  5. Aartemis

    Aartemis Avatar

    Messages:
    1,390
    Likes Received:
    3,837
    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.
     
  6. Aartemis

    Aartemis Avatar

    Messages:
    1,390
    Likes Received:
    3,837
    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.
     
  7. Daxxe Diggler

    Daxxe Diggler Bug Brigade - Bug Hunter

    Messages:
    2,704
    Likes Received:
    5,733
    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. :(
     
  8. Daxxe Diggler

    Daxxe Diggler Bug Brigade - Bug Hunter

    Messages:
    2,704
    Likes Received:
    5,733
    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.
     
  9. craftymethod

    craftymethod Avatar

    Messages:
    916
    Likes Received:
    1,699
    Trophy Points:
    93
    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
    Anpu and Sean Silverfoot like this.
  10. Merrik

    Merrik Avatar

    Messages:
    129
    Likes Received:
    251
    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
    Lily Byrd and craftymethod like this.
  11. Merrik

    Merrik Avatar

    Messages:
    129
    Likes Received:
    251
    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.
     
    Net likes this.
  12. Net

    Net Avatar

    Messages:
    3,580
    Likes Received:
    10,857
    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.
     
  13. Fetid SirDidy

    Fetid SirDidy Avatar

    Messages:
    82
    Likes Received:
    141
    Trophy Points:
    8
    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.
     
    Anpu, Net and craftymethod like this.