Is it possible to make a variable dependent on another variable?

I’ve only started Choice Script recently and i am sorry if this question was asked before, I was wondering if it was possible to make a variable dependent on another variable? percent-based skills don’t work that well for what i have planned so i was wondering if i could do something like say:
Skill_A_prog = 100 x(2 x skill_a tier)
so that as skill A increases so does the progress needed to increase
or should i do something like this:
Skill_A_1_prog = 100
Skill_A_2_prog = 400

and so on

Also as a side question, is it possible to use concatenation on numeric variables?

like:

Combat Performance= Skill_a + Skill_b+ Skill_c- injury

Sure!

*create Skill_A_prog
*create Skill_A_1_prog 100
*create Skill_A_2_prog 400
...
*set Skill_A_prog 100 * (2 * Skill_A_1_prog)

You can add numeric values together as well. The main trick is that ChoiceScript only allows you to add or subtract two things, so you have to use parentheses to turn an expression like Skill_a + Skill_b into a single thing (Skill_a + Skill_b). So for the example you showed:

*set combat_performance (Skill_a + Skill_b) + (Skill_c - injury)
4 Likes

Thanks a lot!!

It is also possible to add two variables without the need for a third.

UnNatural for example has checks like

*if ((physical + vampire_lore) >49)

2 Likes

@Sargent already gave you the solution for using number variables to change other number variables, but keep in mind that you also can automatically change text (“string”) variables with text variables as well.

Of course, you can’t do any of the math stuff (divide, add, multiply) but you can still do some cool stuff with interlocking text variables.

This topic was automatically closed 24 hours after the last reply. If you want to reopen your WiP, contact the moderators.