Can i change a stat name while in the game?

Hello i’ve been learning about story telling and trying to use the mechanics of scriptchoice within that storytelling my problem i’m listing here is as follows:

my stat name will be looking like this

*create fame 0

this will go along like this for a while inside the game but i want the name to change after a certain point in the story like this

*create infamy 0

is it possible to change the name of the stat later in the story?

1 Like

You can’t change the variable name anytime during a game. However, you can change how it’s displayed.

*if chapter < 5
   Fame: ${fame}
*elseif chapter >= 5
   Infamy: ${fame}
4 Likes

can i bring the number from Fame into infamy?

You mean you want the game to have both stats named [fame] and [infamy] and share the value between both?

yes

You can, but I think that’d be unnecessary if the stats are always on the same value.

i’ll just have to *set them when they change then.

Another approach is to create both as variables, using the same script to value them.

Then on the stat page, you can display one and hide the second.

Then, when you reach the point in the game where you want to hide the first and display the second on the stat page you can do so.

2 Likes

The way to set one value to that of another variable was

*set var1 var2

or am I misremembering thing?

2 Likes

It is, just like simple *set var1 123, but instead of 123, you put the content of [var2] into [var1].

1 Like

There was a way to set whatever value var2 would be (it was used for savegames iirc). I think it’s what the OP was also looking for?

1 Like

If you mean, “Will the variable ${fame} still be the same value when I use this method?” then the answer is yes. ${fame} displays the value of the variable “fame” - the “Fame:” and “Infamy:” text preceding it is just text that gets displayed as-is, not a variable.

Also, just to clarify:

What exactly do you want to do, @Dapyx :

Do you want the displayed name to change on the stats screen, or do you want the value of ‘fame’ carry over to a complete new stat called ‘infamy’ that grows separately from ‘fame’?

(asking because I can imagine a scenario in which one would come back to ‘fame’ at one point with its old value)