The quick script below emulates
Is there any way to manually hold the previous score with a variable and use the FROM to set the score back to what it was before the set_player_character and also stop the additions to the character_history section?
Thanks for the help!
play [id]
available in the console by toggling between different players using the "decisions" functionality. The only problem is there is a strange bug where pausing the game and switching back and forth between two different playable characters causes the score for each of the characters to increase summing the previous value with itself (i.e. char1.score = 100, switch to char2, char1.score += 100
). The set_player_character effect also causes the character_history={ ... } to needlessly bloat in the save file.Is there any way to manually hold the previous score with a variable and use the FROM to set the score back to what it was before the set_player_character and also stop the additions to the character_history section?
Thanks for the help!
Code:
targetted_decisions = {
custom_play_as_target = {
filter = all
ai = no
potential = {
ai = yes
is_playable = yes
is_landed = yes
is_theocracy = no
}
allow = { always = yes }
effect = { set_player_character = ROOT }
ai_chance = { factor = 0 }
}
}