Stats not increasing when using *set

I have no idea what’s going on. For some reason, various *set commands just wont actually add the designated values set below.

For example, when I choose ANY of these options, NOTHING changes in the stat menu!

*choice
    #"...How cruel." You whisper angrily, trying hard not to lash out at everything around you.
        *set impulsive + 5
        *set paragon + 5
        *goto aquilaconvo3
    #You gaze at your hands, taking in every single speck of blood stained onto your skin. A forlorn look forms in your eyes... before morphing one into a grim smile.
        *set psychopathic + 10
        *set brutality + 5
        *goto aquilaconvo3
    #Clench your fists, trying hard to fight the burst of tears forming in the corners of your eyes.
        *set compassionate + 5
        *set paragon + 5
        *goto aquilaconvo3
    #Say nothing, blankly staring at the carnage before you.
        *set intimidating + 5
        *set apathetic + 5
        *goto aquilaconvo3

Another weird example is this set of choices as well:

    #...Like you should do something about it. Despite you being a simple village dweller, you feel like you should do [i]something[/i] to break this endless cycle of violence. If only you knew how to.
        *set compassionate + "5"
        *set charming + "5"
        You feel an odd sense of responsibility, as if you had some duty to upkeep. The violence… the death. The anger. It does things to people, cracks them open and swallows them whole, destroying their souls. They deserve better than that. You [i]all[/i] do.
    #...Angry. This shouldn't be the way people are forced to survive. To barely scrape by, only to be cutdown by another invading bandit faction. The thought sickens you.
        *set impulsive + "10"
        Your fists clench, white-hot anger surging through every core in your system. It takes a special kind of scum to commit such wanton acts of debauchery and violence. All for what? Money? Land? Power? The thought makes you [i]sick[/i].
    #...Indifferent. It makes no difference to you. This is Lower Kusanagi, the black sheep of the world that everyone tries to forget even exists. Learning how to accept death is essential to surviving.
        *set psychopathic + "5"
        *set apathetic + "5"
        That's right. In this lawless, brutal place, death is everywhere. Accepting it is the only way you can move on.

The first choice works as intended, the Charming and Compassionate stat both raising as it should. However, the 2nd and 3rd choice don’t even change the stats in the stat menu.

I have no idea what’s going on, I’ve been at it for hours trying to figure this out. I feel like I’m missing a really dumb, minute detail that’s probably going to make me scream for not noticing sooner.

For more insight, here’s how my opposed_pairs look inside choicescript_stats file.

opposed_pair Alacrity
            Brutality
        opposed_pair Charming
            Intimidating  
        opposed_pair Tactician
            Impulsive
        opposed_pair Psychopathic
            Paragon
        opposed_pair Compassionate
            Apathetic

How it looks in game:
image

Remove the spaces between the + sign and number. That should fix it.

@RascaldeesV2 Nope, no dice.

*choice
    #"...How cruel." You whisper angrily, trying hard not to lash out at everything around you.
        *set impulsive +15
        *set paragon +10

Even with this, the values still wont change after I make the choice.

  #"...How cruel." (da da da)
   *set Impulsive +15
   *set paragon +10


Try this?

I have copied your first bit of code and added the print variable bits below, to see what happens when you make the choices

*create impulsive 0
*create paragon 0
*create psychopathic 0
*create brutality 0
*create compassionate 0
*create intimidating 0
*create apathetic 0

*choice
    #"...How cruel." You whisper angrily, trying hard not to lash out at everything around you.
        *set impulsive + 5
        *set paragon + 5
        *goto aquilaconvo3
    #You gaze at your hands, taking in every single speck of blood stained onto your skin. A forlorn look forms in your eyes... before morphing one into a grim smile.
        *set psychopathic + 10
        *set brutality + 5
        *goto aquilaconvo3
    #Clench your fists, trying hard to fight the burst of tears forming in the corners of your eyes.
        *set compassionate + 5
        *set paragon + 5
        *goto aquilaconvo3
    #Say nothing, blankly staring at the carnage before you.
        *set intimidating + 5
        *set apathetic + 5
        *goto aquilaconvo3
    
*label aquilaconvo3 
impulsive${impulsive}

paragon${paragon}

psychopathic${psychopathic}

brutality${brutality}

compassionate${compassionate}

intimidating ${ intimidating}

apathetic ${apathetic}

This runs fine for me and the values change as expected.
Can you add the print statements to your code (before and after the choices would be good) and run it - to see if the variables are being changed correctly at the point of the choice.

1 Like

@Sinnie Wow, this is strange. The *print outputs the values the stats should be changing to.

For example, here’s the *print results after choice 2, which appears to be correct

impulsive50

paragon50

psychopathic60

brutality55

compassionate50

intimidating 50

apathetic 50

But here is the stat page, where only the Psychopathic value is changes, but not Brutality

image

Very strange. This is the same case for almost ALL of my *choices that have a stat *set code to it. Only one of the values are changes, or none at all.

Looks like you are using two different stats for your opposed pairs.
It’s a very common error for new CS writers.
Only the red stat of an opposed pair is an actual stat (the blue is purely visual), so if you want brutality to increase, you need to lower alacrity instead, etc.

5 Likes

I have never actually built a stats page before, so was just working on the same issue @The_Lady_Luck.

I didn’t realise that was the case and instead solved it a slightly different way. You can represent two distinct stats inside an opposed pair chart, but you have to alter both stats together.

So this works for the first choice option:

*choice
    #"...How cruel." You whisper angrily, trying hard not to lash out at everything around you.
        *set impulsive + 5
        *set tactician -5
        *set paragon + 5
        *set psychopathic -5
        *goto aquilaconvo3

I don’t know if that’s intended design and perhaps having and altering the single variable is the ‘correct’ way.

@The_Lady_Luck Oh JEEZ. That’s how it works? Damn, I feel dumb… Just changed a bunch of my variables and it should all work now.

@Sinnie Thanks for your help, I’ll keep that code in mind :slight_smile:

The blue part is literally just giving a color, name, and value to the other side of the percent stat bar. Using two stats is just a lot of extra work, without any real benefit.
I know it’s un-intuitive, I did the same thing when I first started. :blush:

Believe me, it’s the error I see most new people here making, so it’s not you being stupid at all.

2 Likes

Thanks everyone for the help! marking this as the solution so newbie writers like myself dont make the same mistake :smiley:

1 Like

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