Howdy, Stranger!

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

finished 250k word game in Harlowe. Save data doesnt persist. Options?

Recently we completed a TWINE game with over 250k words. There are hundreds of variables and 1000+ passages. Great right? Well, then I realized that Harlowe data doesn't persist. Now I'm searching for a save option similar to one in sugarcube. Then, I'm ready to embark on learning that format. Any advice Twine wizards? Thanks as usual for your help in this.

Comments

  • I'm doing a Harlowe game with 400k words, so I'm reeeallly interested in this question. o_o
  • FIFFIF
    edited January 2017
    @DairynGM So far all I've been able to come up with (minus some sort of band-aid that will break in the future) is to change the format to SugarCube. Yeah. That sucks but it could be worse. Hope we get a better answer from the likes of the Twine Supermen.
  • I threw a comment on the Harlowe bitbucket last month, but no response as of yet. Hopefully something comes up.

    The other question is if Harlowe has anything that SugarCube doesn't, feature wise, to avoid moving out of the frying pan and into the fire.
  • FIFFIF
    edited January 2017
    @DairynGM Good question. From what I can tell, yes. Harlowe has a few features like blink that are more visual effects that I don't THINK exist in Sugarcube, but I'm still learning. I also think something like state.variables pushed to javascript SQL-lite would solve the problem I initially had in mind. Let me add that Sugarcube is superior for people writing longer form games like us. The features and seamless integration into Javascript are stellar.
  • FIF wrote: »
    […] From what I can tell, yes. Harlowe has a few features like blink that are more visual effects that I don't THINK exist in Sugarcube, but I'm still learning. […]
    Most (all?) of those are simply predefined styles. I have not predefined anything like them in SugarCube, so you are correct in that they do not exist by default. It is, however, completely possible to use similar, or even identical, styles in SugarCube to achieve the same effects.

    Case in point, IIRC, @greyelf posted a version of many of the "effect" styles from Harlowe for SugarCube on these forums at one point—I believe this is the post I'm remembering.
  • FIFFIF
    edited January 2017
    Thank you @TheMadExile . Moving to SugarCube has proven to be a challenge. I've already altered all of my links, and the variables are mostly the same. I'm having challenges with a few issues that I can't wrap my Harlowe mind around. Please, be gentle; I'm used to Harlowe and I'm probably missing something very basic.

    #1: UI.alert: The ui alert property is the equilavent in Harlowe as (alert:""). However, I try writing it into the passage like so
    <<script>>UI.alert("You smell of elderberries!");<</script>>
    

    And I get an error. "Error: <<script>>: bad evaluation: UI is not defined "

    Was I supposed to define the UI element somewhere? (I'm guessing in my CSS?) Worst of all, I have it defined. I pulled the bleached CSS sheet.

    Now that I'm looking at it, is it that I don't have the UI.alert property specifically defined?

    2. There are various posts to hide the bar. I just want to make sure that I understand the code here....
    <<link "Saves">><<script>>UI.saves()<</script>><</link>>
    

    UI.saves() Now...the saves() is a function that I must define (or is it predefined?) in Javascript area of the editor?

    Same with
    <<script>>setup.stowUiBar()<</script>>
    
    .

    Note that in this case, I have the setup.stowUiBar in my javascript area.
    setup.stowUiBar = function () {
    	if (typeof Config.ui.stowBarInitially === 'number' && $(window).width() <= Config.ui.stowBarInitially) {
    		$('#ui-bar').addClass('stowed');
    	}
    };
    

    I think once I get this figured out I should be able to move forward.

    Thank you!
  • FIF wrote: »
    […] I'm having challenges with a few issues that I can't wrap my Harlowe mind around. Please, be gentle; I'm used to Harlowe and I'm probably missing something very basic.
    You do not define anything related to SugarCube's APIs, they are a predefined part of SugarCube. Your issue is that you are, in all likelihood, attempting to use SugarCube v2 APIs in the legacy SugarCube v1.

    The current release of Twine 2 is from the v2.0.x series and comes preinstalled with SugarCube v1 only. If you want to use SugarCube v2, and you do, then you must install it manually.

    The next significant update to Twine 2—the v2.1.x series—is currently in beta and will come preinstalled with SugarCube v2 as well.

    FIF wrote: »
    Same with
    <<script>>setup.stowUiBar()<</script>>
    
    .
    Note that in this case, I have the setup.stowUiBar in my javascript area.
    setup.stowUiBar = function () {
    	if (typeof Config.ui.stowBarInitially === 'number' && $(window).width() <= Config.ui.stowBarInitially) {
    		$('#ui-bar').addClass('stowed');
    	}
    };
    
    That function is no longer necessary in SugarCube v2 as of release v2.12.0—current: v2.12.1. The UI API now has two methods—UI.stow() and UI.unstow()—which handle (un)stowing the UI bar.
  • HA! :-( lol @TheMadExile you should set up a patreon acct. people like me owe you and @greyelf
  • DairynGM wrote: »
    I'm doing a Harlowe game with 400k words, so I'm reeeallly interested in this question. o_o
    @DairynGM
    I just wanted to say that you SHOULD use sugarcube. The flow is so much easier and it will make the process of creating a game much faster in the future. Great job @TheMadExile!
  • edited January 2017
    FIF wrote: »
    I just wanted to say that you SHOULD use sugarcube. The flow is so much easier and it will make the process of creating a game much faster in the future. Great job @TheMadExile!

    Yesss, this is the conclusion I've been dreading coming to, but it looks like the time has come. I'm just glad I realized this at the 30k mark, not when I'd finished transferring and coding the full 400k. o_o;;; Thank you for the advice! I can't even imagine how much rejiggering you're doing right now with your game.

    And yes, @TheMadExile and @greyelf are boss. :)
  • DairynGM wrote: »
    FIF wrote: »
    I just wanted to say that you SHOULD use sugarcube. The flow is so much easier and it will make the process of creating a game much faster in the future. Great job @TheMadExile!

    Yesss, this is the conclusion I've been dreading coming to, but it looks like the time has come. I'm just glad I realized this at the 30k mark, not when I'd finished transferring and coding the full 400k. o_o;;; Thank you for the advice! I can't even imagine how much rejiggering you're doing right now with your game.

    And yes, @TheMadExile and @greyelf are boss. :)
    @DairynGM It's not TOO bad. I'll explain what I'm doing in hopes of it benefiting the community.

    1. I'm using software called "CODE COMPARE" to pull up two versions of my completed harlowe script.
    2. Using find/replace, I've changed [[set: to <<set and so on.

    After that, some changing in CSS and widget additions, it's basically the same.

    Links are the same.
    Variables are the same.
    sooooooo, it's not impossible.

    Note, I took a day to read the documentation and bug @TheMadExile on all questions I had until I feel comfortable doing this final read/copy & paste through.
Sign In or Register to comment.