Journal (stat reset bug?)



So I’m attempting to make a journal in the choicescript_stats scene. Here are the variables:

*create journaltest "test" *create journalnote " " *create journalentry " "

And here’s the code in the stats scene:

*input_text journalnote
*set journalentry (journaltest&" ")&journalnote

The input text works fine and the concatenation shows up when I print journal entry. The problem arises when I click return to game and re-enter a new, different value into the input box. To my mind, the above code should retain the original entry in the variable ‘journalentry’ and then add whatever I next put into ‘journalnote’.

Except what happens is the value defaults to what was originally set, effectively resetting the value each time I go onto stats and then back to the game. I’m aware this may be to do with a known bug relating to resetting stats but I was just wondering if there was any workaround to get the journal working, even if it means using different code altogether.

Thanks :slight_smile:


I dunno if you can do that. In order for the variables to be saved, you need to return to the game and then click next. If you return to the game, and immidiately click on stats again, then it resets. No idea how it would work on a tablet.


Haven’t played with & much, but I think what you’re looking for is something like this:

*create journalnote ""
*create journalentry ""

*input_text journalnote
*set journalentry (journalentry&" ")&journalnote

I’m not sure what your intent with journaltest is. The first two lines are the obvious create and don’t need spaces (I guess technically the spaces don’t hurt, but cleanliness counts.) With the third line in the second section, you forgot to make it save what is already in journalentry.

Also, as @MutonElite noted, you can’t do this in the stats screen and have it saved.


@MutonElite Thanks for the link to that topic; quite informative but a little disheartening to know there’s no current workaround. Looking at what Dan had posted, it seems as much to do with gauging what a player is likely to do as well as how to display it. Either way, I suppose I’ll have to abandon the journal idea, which is a shame.

@Reaperoa Thanks for the tweak. I was using the journaltest variable just to test whether concatenation would work at all in the first place but ultimately, it’s a redundant string. I didn’t realise you could have “” as a NULL value so that’s good to know :slight_smile: I corrected the code as per your above suggestions. It does work in practice within a single scene but unfortunately doesn’t function as a journal the PC can refer to due to the stat screen “bug” you and @MutonElite mentioned.

Thanks for the responses in any case. I’ll try and see if I can incorporate the journal idea in some other way, if possible.

EDIT: Ah, just saw that the latest version pushed does save if the player hits next. I suppose you’d need to bank on the user doing this. Perhaps I could include some kind of note with words to that affect. Good news! :slight_smile: