Howdy, Stranger!

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

Various questions about Twine 2 + Harlowe

Forgive me if these are all basic questions that have been asked 100000x before but I have limited patience for sorting through topics and just asking might get me answers faster /shrugs

1. How can I link something on all passage pages? To be more specific, I want to add a stats/inventory system like in Choice games, where, on all pages, you can click a link to check your character's stats, inventory, relationship status, etc etc. I'd like the link to check stats/inventory to be at the top-right, like in Choice games, so being able to position it would be nice. And please baby me on this like just show me the code if you know it/know where to find it I don't want to be led to the answer like a student because that's all I've seen on other people's questions where they asked about this; and I don't need to be taught how to make the inventory just how to link to it

2. How do I change the color of the back button? I made the background black so I can barely see the button anymore lol

3. Is it possible to make the game keep track of the player using the back button? So, like, if the player used it at a key moment to erase a major screw-up, the game would know and maybe the player would be punished somehow? That's just an example of what I intend to do w/ it, anyway

4. Can I make a progress bar out of a variable? This is another Choice games-style thing I want to do. Like, I want to show progress in a skill out of 100, or percent of a personality type versus an opposing one (like 25% nice displayed as blue on an otherwise red bar where the red is 75% evil).

5. So could I... add a save button... perhaps right next to the inventory/stats button? I've heard this isn't possible in certain versions of Harlowe but if I went and got the right one (or if I perhaps already had it?) how would I go about implementing a save feature? Like, specifically.

Comments

  • edited July 2015
    sutorumie wrote: »
    2. How do I change the color of the back button? I made the background black so I can barely see the button anymore lol

    I don't know how to edit posts to have this part crossed out but I figured it out :P So ignore this one.

    For anyone wondering: the css tags or w/e for the icons are "tw-sidebar tw-icon.redo" and "tw-sidebar tw-icon.undo" just change the color, hover color, opacity, whatever you want
    sutorumie wrote: »
    1. How can I link something on all passage pages?
    Change this to how do I link to a passage from the edit javascript feature... I've figured out how to link something on every passage page with this:
    function addElement () {
    	var divElement = document.createElement("div");
    	divElement.style = "position:absolute; top: 0px; left: 0px;";
    	divElement.innerHTML = "<a href='LINK GOES HERE'><font size=0px face='Century Gothic' color=#777777>Statistics</font></a>";
    	document.body.appendChild(divElement);
    }
    
    addElement();
    

    But how do I link the code to a passage?? It would seem to only go to webpages :v
  • A couple of these features have been added to the latest version of Harlowe (which comes with Twine 2.0.8)
    1. How can I link something on all passage pages?

    This can be achieved using headers/footers. Create a passage with the tag header and it'll be displayed at the top of every passage page.
    5. So could I... add a save button... perhaps right next to the inventory/stats button?

    A save game feature has been added to Harlowe. The syntax to add a save and load link is
    (link: "save")[(save-game: "file A")]
    (link: "load")[(load-game: "file A")]
    

    Which will create a save file called "file A"

    At the moment the best place to read about all the new features in Harlowe 1.1 is in this thread http://twinery.org/forum/discussion/2549/beta-version-of-harlowe-1-1/p1
  • sutorumie wrote: »
    1. How can I link something on all passage pages?
    Use Harlowe 1.1.1's new header passage tag to create a passage header passage, then add the markup link to your Inventory passage to it.
    :: Passage Header [header]
    <div class="menu">[[Inventory]]</div>
    
    (note: the above example uses Twine notation)
  • greyelf wrote: »
    sutorumie wrote: »
    1. How can I link something on all passage pages?
    Use Harlowe 1.1.1's new header passage tag to create a passage header passage, then add the markup link to your Inventory passage to it.
    :: Passage Header [header]
    <div class="menu">[[Inventory]]</div>
    
    (note: the above example uses Twine notation)

    And is it possible, to use footer/header to all BUT some passages?
  • I don't believe a header passage is conditional but the content within the header passage itself could be by using a $variable, you would just need to toggle the value between true and false:
    (if: $displayHeader)[Your header content goes here!]
    
Sign In or Register to comment.