Stat not raising

So my problem is my stat won’t raise no matter what I add or take away.

*stat_chart
 opposed_pair Impulsive
       Logical

*create logical 50
*create impulsive 50

Now when I attempt to raise the stat during a convo, the stat just stays the same.

*fake_choice
 #What?!
      *set logical +5

An opposed stat isn’t really two different stats, it’s one stat with another word at the far end of the stat bar, to highlight what the reverse of the main stat name would be. There’s more information on opposed stats on this page of the wiki.

If you put ${logical} in your text, you’d see the change (logical would now be 55). But you’re not changing {impulsive}, here, just {logical}—which you have set as both the extra word in your {impulsive} stat bar, and as its own individual stat.

In order to get impulsive to go down and logical to go up, you’d want

*fake_choice
    #What?!
        *set impulsive -5

Also, I think stats may be case sensitive? I would suggest using lower case for variables, just to avoid any potential problems.

And finally, your indentation needs to be even. If you use four spaces to indent, every level of indentation needs to be four spaces—so the first indentation here, for your option, would be four spaces, and then the indentation for *set would be eight.

6 Likes

Edit: @Fiogan always gets everything right the first time.Listen to her before you listen to me :wink:

Logical and logical are not the same variable. If you capitalize one, you need to capitalize the other.

Try unifying variable names under one standard… see if that works properly.

1 Like

Omg…I can’t believe I missed that one on the wiki. I thought they were two different stats and did not know I had to subtract the opposing stat!

2 Likes

Here’s an example (with errors). Two options work, and two options do not, because of the way the code is setup.

*temp impulsive 50
*label menu

*stat_chart
 opposed_pair Impulsive
  Logical

.

Experiments!

.

*choice
 #Increase logical by 5
  *set logical +5
  *goto menu
 #Increase impulsive by 5
  *set impulsive +5
  *goto menu
 #Decrease logical by 5
  *set logical -5
  *goto menu
 #Decrease impulsive by 5
  *set impulsive -5
  *goto menu