Can't get stat-changes to take effect (Solved)


#1

Just started working on my game, had some trouble getting stats working but I’ve managed to solve all problems except for this. Everything seems right to me, but the stat changes I make, such as

Don’t have any effect on my stat list whenever I try to test/playthrough the game.

Skills
*stat_chart
opposed_pair Good
Evil
opposed_pair Social
Loner
opposed_pair Happiness
Hate

Fight
*stat_chart
percent Power
percent Intelligence

Relationships
*stat_chart
percent Mom
percent Dad
percent John

Any advice would be helpful, I feel a bit stuck.


#2

I’m hardly a coding expert, but I’m happy to give it a guess.

I assume you have *create social 50 in your startup.txt file? And no errors when you play? Have you run quicktest or randomtest to try and troubleshoot that way?

And . . . I suppose two percent does make a change, even with fairmath, but have you tried it with a bigger number? Ten percent, maybe? Just in case.

EDIT: Oh. Or it might be capitalisation that’s the problem. Try removing the caps from all your variables, including in the stat chart. Choicescript is case sensitive, if I recall correctly.


#3

This would bring up the question, how are percent bars rounded?

if social is at 50 and you increase it by 2%, it would be 51.

however, if social is higher than 50 before the calculation, the increase would be less than 1. If fairmath follows standard rounding, then when the base amount for social is higher than 75, the increase would be rounded to 0 [actually 0.49 before rounding], thus having now increase.

Solution, make the increase higher, or, don’t use fairmath.

Also, I think the opposite of Hate would be Love, don’t you think?

[quote=“Fiogan, post:2, topic:13958”]
Or it might be capitalisation that’s the problem.
[/quote] @Fiogan

Variables are case-sensitive, stat-chart isn’t. As long as *create and *set parts are lower case, it’s fine. Stat chart can have any case.


#4

Okay, so I think my issue was I didn’t know anything about fairmath. I switched from fairmath and it is so much easier, thanks :slightly_smiling:
And I realize Hate should actually be Anger, hate is more directive at something and anger can just be a mental state which is what the gauge is supposed to be for. Thanks so much for the help!