What am i doing wrong? (Stats won't change)

I have never coded in my life but I’m slowly getting the hang of it :upside_down_face:
I’m using ChoiceScript IDE as many suggested and it’s made things so much easier but I still can’t seem to get the stats to change. I’ve tried,

*choice
    #Gold Gladius!
        *set Tactless 60
        *goto_scene riverambush1
    #Gold Round Shield!
        *set Prudent 60
        *goto_scene riverambush2

and

*choice
    #Gold Gladius!
        *set Tactless +10
        *goto_scene riverambush1
    #Gold Round Shield!
        *set Prudent +10
        *goto_scene riverambush2

but the stats stay the same when you go to the next scene, please tell me how I’m being a dummy.

1 Like

First thing’s first: is “Tactless” and “Prudent” capitalized that way in your startup.txt and stats screen? :slight_smile: Capitalizing stats/variables can get messy sometimes…

3 Likes

just checked, the first letters of each are indeed all capitalized the same :thinking:

Second thing second, do you have a *create prudent 0 and *create tactless 0 in your startup file? (replacing 0 with whatever number you want to start those stats with.)

Also, do you intend tactless and prudent to be two different stats, or a single, bipolar stat? In other words, do you want, when losing tactless, to gain prudent?

2 Likes

yes, I do.

And haha I was just about to ask whether which stat format I’m using would matter!

This is how I have it :

*stat_chart
	opposed_pair Female
		Male
	opposed_pair Prudent
		Tactless
	opposed_pair Humor
		Maturity
	opposed_pair Compassion
		Coolness

i know its weird to have a gender stat but it makes sense with what I’m working on I promise

So as you have it, there is no such thing as “Tactless.” That’s just a thing to help you think about it.

You should raise Prudent and lower Prudent. Don’t touch Tactless. It doesn’t exist. That’s how bipolar stats work. The stat immediately after “opposed_pair” is the real stat.

4 Likes

Ah, so when you’re working with opposed pairs, only one variable matters. So it really should be

opposed_pair Prudent
Prudent
Tactless

So any action where you want to decrease or increase Prudent will affect its opposing stat. (Aka, if you want to increase Tactless, decrease Prudent.)

#Thing 
     *set Prudent +10
#Opposing Thing
     *set Prudent -10
2 Likes

Ahhh I see! It worked! thank you both @Rinari and @Gower!

If I could bother you with one more thing?

What do I do so that depending on whether you chose the sword or the shield, said item becomes your main weapon of choice?

Edit : I hope i worded that so it makes sense to others and not just myself

1 Like

I would *create mainweapon "" in the startup, then when you choose it:

Which weapon will you pick?
*choice
#The sword.
    *set mainweapon "sword"

Then to check it later:

You pull out your weapon.
*if mainweapon = "sword"
      You slash the enemies with your sword.
*if mainweapon = "shield"
       You use your shield to defend yourself. 

I hope that makes sense!

(You can also do it so that there are true/false variables in the startup: *create mainweapon_sword false and *create mainweapon_shield false–then when the MC picks the weapon, set whichever one it is to true!)

2 Likes

It does, thank you so much! Everyone on here is so kind and helpful I’m really grateful :hugs:

2 Likes

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