Howdy, Stranger!

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

new to twine, need help.

edited October 2015 in Help! with 2.0
so far i have learned how to use links, however i am having trouble with figuring out how macros and other things work. can someone please help? right now i am trying to set up on occupation system, where if the player picks a particular occupation, he will have specific skills and whatnot and the game will remember which he picked. i also need help in figuring out how to setup an inventory system, health, etc.

i am using harlowe format, and dont have programming experience. help would be greatly appreciated.

Comments

  • so no one wants to help a complete beginner learn how to use twine? it is very hard to follow the tutorials when i don't even know what they are talking about half the time, and trying to make sense of it is pointless unless i have step by step instructions for what i want to do.
  • Sometimes you need to be a little patient because not everyone is on-line at the same times you are, some people live in different parts of the world.

    I suggest you start by first reading the Twine 2 Guide, it covers the basic usage of the Twine 2 application. You may want to read the Twine Index section of the Twine Wiki which is actually about Twine 1 but includes information about using macros and other features that are also in Twine 2.
    note: Although the format (syntax) of the Twine 1 macro examples are different to the ones in Harlowe they still work in a similar way.

    After that have a quick look over the Harlowe documentation so that you have some idea of what features that story format has.

    Once you have done the above you should know a little more about how Twine and Harlowe work together.
  • i did that already and generally know but the macros and the the other more complex things are not making much sense to me, i dont know how to actually acomplish things i want to do, yet. i can do limited things with using the set and $ but i dont actually know how do do more than that.
  • You should give each of the $variables in your story a default value at the start of the story, you do this by adding a startup tagged passage to your story into which you place some (set:) macros like the following:
    (set: $health to 100)
    (set: $teacher to false)
    (set: $doctor to false)
    (set: $communication to 0)
    (set: $healing to 0)
    (set: $hasSword to false)
    
    ... set up on occupation system, where if the player picks a particular occupation, he will have specific skills ...
    If you want a variable to only change if the reader clicks on a link you could try combining the (link:) and (set:) macros:
    note: The following is formatted for readability, you can remove the indents and extra line-breaks.
    Select an occupation:
    (link: "Teacher")[
    	(set: $teacher to true)
    	(set: $communication to 10)
    	(goto: "Next Passage")
    ]
    (link: "Doctor")[
    	(set: $doctor to true)
    	(set: $healing to 10)
    	(goto: "Next Passage")
    ]
    
    how to setup an inventory system
    An inventory system can be as simple as:
    (set: $hasSword to true)
    
    ... or as complex as using collection $variables (like arrays and datamaps) to track:
    a. what items each character in the story is carrying
    b. which items have been dropped in which locations
    c. whatever else you can think of etc...
  • so the link: "word" command will do the same thing as the word version?

    for one of the classes i have, it is the only class that uses magic, but the other jobs will allow skills, which take the place of magic. say i want to implement use of mp/sp, i would do:

    (set:$mp to 0) and have an $mp mp display somewhere

    would i use the format you mentioned above with the link command to give the character mp points once they pick the job?
  • edited October 2015
    lets say i want to add npc to the story? how would i do that? and how would i set up a shopping system as well as putting items in rooms to pick up?
  • Soapstone wrote: »
    so the link: "word" command will do the same thing as the word version?
    The Harlowe documentation contains information about Passage links (also known as Markup Links) and the (link: "Link Text") sensor macro which is used to display a click-able link. The two are not exact the same, the first automatically navigates the story to a passage when it is clicked, the second executes whatever is contained with it's associated hook.
    would i use the format you mentioned above with the link command to give the character mp points once they pick the job?
    If you want to, that is one way to do it.
    lets say i want to add npc to the story?
    You could either use one $variable for each attribute you want to track about the npc:
    (set: $playerName to "Jane")
    (set: $playerHP to 100)
    (set: $playerMP to 100)
    
    ... or you could use a single $variable and a datamap to store all attributes about the npc:
    (set: $player to (datamap: "Name", "Jane", "HP", 100, "MP", 100))
    Player Info
    Name: (print: $player's Name)
    HP: (print: $player's HP)
    MP: (print: $player's MP)
    
    and how would I set up a shopping system as well as putting items in rooms to pick up?
    Both of these would take some time to explain and would depend on exactly how much functionality you wanted in each one. What you are asking for is a description on how to design and code the starting of a RPG engine.
  • edited October 2015
    As @Greyelf is saying, what you are asking takes a long time to explain, so I suggest that you look at the examples we are linking and then we can try to help with specific questions.
    The following guides made by Twine users may help:

    This is by Nate.
    https://github.com/nate2squared/game-creation/tree/master/twine

    This is by prof_yaffle
    http://twine.analytical-engine.co.uk/index.html

    This is by Chris Martens
    http://lambdamaphone.blogspot.it/2015/02/using-twine-for-games-research-part-ii.html

    Edit: I am 99.9% sure that some of those questions have been answered, at least partially, in previous threads - it is probably a good idea to find a similar question that works for you, and play with the engine to obtain the effect that you want, starting from the existing examples.

    Cheers.
  • @Melyanna:
    Ty, could you please add those links and any others you can think of to the Twine Wiki
  • For anyone that wants Chris Martens's rpg tutorial in sugarcube 2 instead of Harlowe, I've done a version for curiosity's sake. It's essentially exactly as the tutorial, but I went ahead and incorporated the ideas of storing strings instead of objects in the next field.

    Anyway, I liked the straightforward approach of her game, so I may use parts of it and play. I like the idea of simply prototyping mechanics.

    So, this is a file that you use with Twine 2 and Sugarcube 2. It's not compiled, so as to take up less space. Just put it wherever you put your own project files (usually in My Documents/Twine/Stories or something).
  • i will definitely check them out. i am reading one right now for RPG implements so far i am kinda getting how it works but not completely. i think it would be easier if they actually had classes you could goto to learn this stuff.
  • i think the thing i like most about twine is you dont have to use the programming at all, if you just want to use it to tell an open ended story like the classic choose your own adventure books i used to read as a kid. i am doing more of that right now in one of my projects.
  • question, when i view the html file on my pc, it is just a bunch of text at the top of the screen, it doesnt show links or anything, the way it does when i use twine to test play the game. do i have to use twine to view and play the story properly? do i have to use some online website for IF for it to display properly?
  • Did you create the HTML file using the Publish to File option?
  • Oh sorry, the file I uploaded wasn't a compiled html story. It was just a file to be used in Twine. Plus it was sugarcube instead of harlowe like you wanted to look at. So, it might not be all that useful.

    And, the forum ate the upload.

    Anyway, to use that file I uploaded, you need to... umm, it's actually a bit complicated since you need to install Sugarcube 2, which you need to download and install separately.

    I could upload the compiled html. Most of the code is in sugarcube though, so quite different than harlowe and different from what Chris does in the tutorial (I converted).

    Let me know if you want the html file you can run in browser. I'm not sure, since it comes with some dependencies and stuff.
  • ty for the instructions but I have a fair understanding on how to use Twine 2. lol

    My question was in relation to you saying that when you viewed the html file on your machine it only showed text at the top of the screen and I was asking if you created that html file using the Publish to File option, because some people mistakenly use the Archive option which will create a html file that behaves exactly like you described.

    Assuming you are using the Publish to File option, are you using the hosted version of Twine 2 and if so are you running it on OSX or using Safari?
    Both situations have been known to create a story html file that does not work correctly.
  • edited November 2015
    Yea, I selected publish to file. it seems to look the exact same as the html file does in the stories directory. using the dloaded version of Twine 2. using windows 10, I have Firefox, Chrome, and Internet explorer/edge, none of them display it properly.

    why doesn't it display properly?
  • The files within the Documents/Twine/Stories directory are the individual story archives for each of the stories you've created. They only contain the data chunk for your story and are not playable.

    You must use the Publish to File menu item to create a playable story.
  • edited November 2015
    @Soapstone
    You must use the Publish to File menu item to create a playable story.
    ... and do not save the story HTML files you create using the Publish to File option in the Documents/Twine/Stories folder/directory!
    That folder/directory is reserved for Twine to use internally.
  • edited November 2015
    i am selecting publish to file, it saves it right in my downloads folder. it looks the exact same as the html does in the stories folder. i clicked both versions to be sure. even when select proofread, it does display it properly when i am in twine, but when i copy and paste into a document editor like open office it looks just like the html file does w/ everything on the top of the screen, no line breaks, etc.
  • edited November 2015
    If the story you're having trouble with is the one I uploaded, then here it is again, in a complied form. It should be playable with just a browser.

    But to work at the mechanics of it, you'd need to install sugarcube 2 from here and use that as the story format. Twine only comes with sugarcube 1 by default. That's why I said it was a bit involved.

    But again, it's mostly just a story from the tuturial. That was was written in harlowe. I just offered to upload the story in native sugarcube, just because I'd already done it. It's not easy to switch between sugarcube and harlowe, since the underlying coding is different. But, here it is, in case this is what is causing all the fuss.

    To edit the story, you'd simply import it into TWINE 2. It might work just like that, or you might need to have sugarcube 2 installed. I'm not sure.

    Edit: sorry, I should point out that it's a twine 2 game. Sugarcube 2 as well.
  • greyelf wrote: »
    @Melyanna:
    Ty, could you please add those links and any others you can think of to the Twine Wiki

    @greyelf - I don't think I can edit the wiki.
    (I just registered, though)
Sign In or Register to comment.