So basically what I want to do is create a bonus that gives the player a little boost in stats. The only way to get these bonuses is to improve (or damage) their relationship with the other supporting characters of the game.
*if (talia = 50) *set talia_bonus "Encourgment (Max Health +10)" *set max_health +10 *goto warning *elseif (talia > 50) *set talia_bonus "Improved Encourgment (Max Health +15)" *set max_health +15 *goto warning *elseif (talia = 100) and (romanced_talia = "yes") *set talia_bonus "Lover's Encourgment (Max Health +20)" *set max_health +20 *goto warning *elseif (talia < 50) *set talia_bonus "Cold Welcome (Max Health +5)" *set max_health +5 *goto warning *elseif (talia = 0) *set talia_bonus "Silent Treatment (Ranged & Melee +10)" *set ranged +10 *set melee +10 *goto warning
This is the code for that of just a single character. The problem I’m having is that when I place this in the choicescript_stats it doesn’t affect the max health. For example: in start up I have the *create health command and have set the percentage to 100% and the *create max_health command set to 100 as well. The Improved Encouragement bonus adds +15 to the max health. I place this code into the choicescript_stats (NOT STARTUP) and then BAM! Nothing. So I moved the code to startup and BAM! IT WORKS! YAY! MAX HEALTH IS 115! :)) BUT WAIT! [-X Now as I start to write the next scene I can’t help but wonder, will I have to do this at the beginning of EVERY scene?!? If that’s true then will it continue to add +15 to max health?
So this is what I want to know. How can I get this code to 1) be a bit simpler, maybe even cleaner. 2) Get it into the choicescript_stats screen. And 3) How to prevent it from continuously adding when I want the bonus to be added only once. ALSO how would I have the code reset max_health so that it doesn’t stack? e.g. the player is given Cold Welcome +5 to max_health. Player improves relationship to Improved Encouragement + 15 to max_health. Now player has a bonus of +20 to max health therefore max health is at 120 rather than 115. Make sense? Let me know if I need to clarify a bit more. Any advice or help or links or well, anything is greatly appreciated. I understand how to use choicescript but i would say I’m only an intermediate user so be sure to dumb your explanation down a bit.