Howdy, Stranger!

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

macro and episodic games.

Hi, I'm trying to figure out how to make an episodic story using the <<remember>> macro. At the end of each episode some variable would be <<remember>>-ed to be used in the next episode. But it looks like I'm not understanding how it works: I tried the effect of a variable through different stories on philome.la and the same variables was seen by different stories published under the same username, even if their StoryTitle was different. Doesn't Twine limit <<remember>-ed variables? Does a variable work on all the Story in the same domaine, following the "Same origin policy" for cookies? Shouldn't it recognize the StoryTitle, too?
For example, this is the first test story of mine. It <<remember>>s the variable $storia (I'm Italian, so the variable has an Italian name) = 1 and it prints it, stop.
http://philome.la/ilsignorm/storia-episodio-1
This is the second story of mine. It has the same StoryTitle (Storia) but different StorySubtitle. It prints $storia, then it forgets it and re-prints it (just to be sure everything works). So it should give 1 and then 0.
http://philome.la/ilsignorm/storia-episodio-2
Then this is the third test story. It has a different StoryTitle (Storia Diversa = Different Story) and it just prints $storia.
http://philome.la/ilsignorm/storia-diversa
The third Story, "Storia Diversa", prints the $storia variable set by the first Story, "Storia - Episodio 1". Why? Should it work this way?
I'm using Twine 1.4.2 and Surgarcane (but the final work will be in Jonah).

Comments

  • It appears that you have found a bug.

    If you look at the source code of the <<remember>> macro you will see that it determines the name to use to remember the variable by adding a predetermined prefix to the start of the variable's name. (around line 826)

    This prefix is meant to be the combination of the word "Twine" and the title of the story but unfortunately it tries to obtain the title of the story using an internal variable named tale.defaultTitle which is undefined. Which results in the prefix for all stories being equal to "Twine.undefined."

    eg. Your $storia variable is remembered as "Twine.undefined.storia" in all your stories.

    I am currently unable to think of a work around to this issue, but maybe one of the more experienced Javascript coders like @TheMadExile may know of one.
  • Thank you!
    Ok, so it's a known bug. It's not a problem, because I want to use variables through different Stories and I was looking for a workaround for the StoryTitle limitation for the <<remember>> macro. If this limitation is bugged... it's just easier for me.
  • ilsignorM wrote: »
    Ok, so it's a known bug.
    No, it is a previously unknown bug that you have discovered.

    Normally I would suggest that you create a new issue on the Twine 1 project website so that someone could fix the problem but version 1.4.2 of Twine 1 was released around June 2014 and even though there have been a number of bug-fixes/enhancement to the project since then no new version of Twine 1 has been released.
  • Actually, that bug has been reported before. There's probably no issue for it on the tracker, but it's not unknown.
  • edited February 2016
    Ok, so I don't have to report the bug. I have to work with Twine 1.x because I need Jonah, so I have to accept the bugged <<remember>> macro. It's not a problem. So do <<remember>>-ed variables just follow the "same origin policy" for cookies and nothing else?
Sign In or Register to comment.