Ability to change choice-making character mid-game?

I’ve noticed that after selecting a choice, the game will always echo it as if it’s made by the character with the ID “player” in characters.yaml. In the example below the player character is named “You”:



I can’t just rename the “player” from “You” to “Celsius” though, because I want to swap between who is making choices at different points in the story.

I was wondering if it’d be possible to change the character name that pops up when choosing a choice mid-game. In this case, I manually added “Celsius” saying the line through a talk command. But I want to only have “Celsius” there, preferably by changing the automatic “You” into “Celsius” so I don’t have to duplicate the text.

There isn’t a way to change which character is the “player” yet (though I should add a setting for that).

In the meantime, one solution can be to edit the config dynamically. So you could at some point do something like this:

  set data.playerName (text_field "Enter your name")
  set config.characters.characters.player.name $data.playerName

And after that the player name changes.

This is actually given as an example in the save and loading documentation, because if you want changes to the config to stay they need to be reloaded when a player loads a save.

I’ll look at implementing a proper way to change which character the player is though


Thanks for the reply! I’ll check out the dynamic config wizardry

I’ve just released version 3.2.2 with a new feature to change the player or game character in script easily, without needing to play with editing the config.

docs for how to do it are there:

1 Like

Aaah what! That was so quick! Thank you so much, please don’t tire yourself out :sob: :sob:

No worries, it will be useful to lots of people as I already had questions from people multiple times about editing the player name before, so I figured I’d add a proper way to do it :blush:

1 Like