This is kinda a repeat topic, since it goes over something I already have a topic on. However, this is an issue entirely of it’s own. I’m attempting to make a combat system using a methos suggested be StephenHart in my other topic.
I posted this error in there, but I figured I might get a quicker response making a newer topic instead of waiting for someone to stumble on that one.
Yeah, you can do *create neg_value "-5" (or *create neg_value 0-5) if I remember correctly, and it’ll “work”. But it’s semantically horrifying, so the above solution is probably better, where it works.
Honestly, I didn’t realize I was setting it to a negative value. I was attempting to set it to subtract 5 from the standard agility variable of 15. So instead of changing agility from 15 to 10, I was changing it from 15 to -5.
Another trick I have found is to use startup.txt to simply declare the variables with value 0. I then have an init function to set the values, in which *set foo - 5 will work.
It does involve double-handling which is a downside although even that can be useful in obscure circumstances where you want to compare the effects of two sets of values via two different init functions.