Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Picking a story format/coding

Hey folks,
I am new to twine and I can't decide which story format would be best for the project I'm planning.

I have a tiny (very tiny!) amount of knowledge about HTML and CSS coding and looking through the twine wiki actually confused me more than it helped (I'm not an English native...) so maybe one of you can suggest a good format for a coding beginner based on what I need?

I need a format...

... that allows the character to pick up and carry things around for a while
... events happening based on choices and things the character picked up. For me, this is the most important part!
For example if my character goes left and carries a cat with him, a wild dog will appear and attack. If the character goes left and has no cat but a cookie the dog will be friendly and follow him around. If the character goes left and has neither cat nor cookie nothing will happen. Or if the character hasn't met the dog he won't be able to enter a certain place and so on.
If there is a name for the kind of coding that needs to be done here I'd like to know it so I know what kind of tutorials I must look for

If my main focus is too complex I'd like to know how and what I should learn. I plan to use twine for my thesis next year and have a few month to learn all that's needed but I don't know where to start.

Comments

  • All the things in your list can be done using a combination of $variables and IF / ELSE-IF / ELSE macros. Both the SugarCube and Harlowe story formats have the features needed to do what you want.

    This comment in the How Do I Make An Inventory mentions the Screencasts by Dan Cox and Anna Anthropy's introduction both of which are available via links found on the main page of the Twine Wiki.

    The following very simple two passage example (written using SugarCube) shows one way to do what you want. Changing the $variable values between true and false will effect what is displayed in the second passage.

    1. Start passage:
    <<set $hasCat to true>>
    <<set $hasCookie to false>>
    <<set $meetDog to false>>
    <<set $petDog to false>>
    
    Which way do you wish to go? [[Left|Dog Kennel]] or Right
    
    2. Dog Kennel passage:
    <<if not $petDog>>
    	<<set $meetDog to true>>
    	<<if $hasCat>>
    		A wild dog appears and attacks you!
    	<<elseif $hasCookie>>
    		<<set $petDog to true>>
    		A friendly dog appears and starts following you around.
    	<<else>>
    		The room is empty.
    	<</if>>
    <<else>>
    	This is the room where you first meet your pet dog.
    <</if>>
    
    note: I used indentation and extra line-breaks in the above to make them more readable, you can safely remove both of those.
  • edited July 2016
    I think one of the most important decisions is workflow.

    I really favour SugarCube 2 in Twine 1.x over Twine 2. This is because Twine 1.x works via external story files, not internal memory. Therefore, you can keep your Twine 1.x story in your local DropBox folder, open it from there in Twine, and every time you save it inside Twine, it will be backed up to the cloud automagically, and you can also then work on it easily on other machines, just by also telling Twine on those other machines to work out of a DropBox folder synched to your account.

    This also means your work will always be backed up, without having to manually remember to archive, as Twine 2 requires you to.

    TBH I can't fathom why Twine 2 removed this capability. You can't really do the same thing with Twine 2 even with its desktop app since it's so large and every time you saved you'd have to reupload the whole app to DropBox.

    If you don't want to use the Harlowe format, there isn't really any advantage to Twine 2 at all other than "It works on mobiles".

    Especially I think for a thesis where security of work is paramount.
  • Claretta wrote: »
    You can't really do the same thing with Twine 2 even with its desktop app since it's so large and every time you saved you'd have to reupload the whole app to DropBox.
    When using the install-able release of the Twine 2 application you can replace the physical folder used to store the Story Project HTML files with a Directory Symbolic Link which references a physical folder within your Dropbox folder, thus allowing you to 'automagically' backup your changes to the cloud.

    This technique is not limited to Windows nor Dropbox, it can be used on multiple operating systems and for different Dropbox equivalent file hosting sites.

    note: I am not suggesting which particular application named Twine you should use, as I think that people should choose for themself how they want to build a Story HTML file.
    eg. command line vs GUI application
  • edited July 2016
    Ah, that's good to know. :)

    I still like the other advantages of Twine 1 (SugarCube) like easier integration of javascript libraries. For my current project that's a deal maker/breaker since I use GSAP so much. Otherwise without easy access to the HTML header file it makes it harder to do.

    Not that relevant if you're not looking to do anything complex, but still. There are a lot of useful javascript libraries out there that can add a bit of extra polish.
  • Thanks everyone, your comments are really helpful! I think I'll take a look at Harlowe and SugarCube and choose what suits me best after playing around with both. Also the tip for online backup saves is awesome, a feature I'll definitely need! :)
Sign In or Register to comment.