# Equations with Several Values

Hello,

I’ve just been trying to get some values to transfer from one “format” to another:

[code][Skill Equations]
[BiG Equation]
Equation - BiG Equation
X = B+A+E
Where X is a Skill Value, B is BaseTen, A is SklAgility, and E is Extra BiG.

[Skills Setup]
[Skills Stats]
A Skill Value is a kind of value. 1% specifies a Skill Value.
BiG is a Skill Value that varies. BiG is usually 10%.

[Base Stats]
BaseTen is a Skill Value that varies. BaseTen is usually 10%.

[Earnt Points]
[BiG]
Extra BiG is a Skill Value that varies. Extra BiG is usually 0%.

[Skills Updating]
Every turn:
Let X be given by the BiG Equation;
Now BiG is X;
Say “[BiG], [SklAgility].”

[SPECIAL Setup]
A SPECIAL Value is a kind of value. 1 SPECIAL specifies a SPECIAL Value.
Max SPECIAL is a SPECIAL Value that varies. Max SPECIAL is usually 40 SPECIAL.
Total SPECIAL is a SPECIAL Value that varies. Total SPECIAL is usually 35 SPECIAL.
Leftover SPECIAL is a SPECIAL Value that varies. Leftover SPECIAL is usually 5 SPECIAL.
Agility is a SPECIAL Value that varies. Agility is usually 5 SPECIAL.

[SPECIAL Skill Value]
[Agility]
SklAgility is a Skill Value that varies.
Every turn:
If Agility is 1 SPECIAL, let SklAgility be 1%;
If Agility is 2 SPECIAL, let SklAgility be 2%;
If Agility is 3 SPECIAL, let SklAgility be 3%;
If Agility is 4 SPECIAL, let SklAgility be 4%;
If Agility is 5 SPECIAL, let SklAgility be 5%;
If Agility is 6 SPECIAL, let SklAgility be 6%;
If Agility is 7 SPECIAL, let SklAgility be 7%;
If Agility is 8 SPECIAL, let SklAgility be 8%;
If Agility is 9 SPECIAL, let SklAgility be 9%;
If Agility is 10 SPECIAL, let SklAgility be 10%.[/code]

So, basically, the problem is that SklAgility doesn’t update itself every turn. Instead, it just stays at 0, and so BiG stays at 10%, though I want it to change to 15%, or more or less, depending on the Agility value. Does anyone know how to get this to work? Also, I’ve tried “now, is” rather than “let, be” already.

Thanks,
Blaze5565

So, I got some help here (not sure if he wants his username to be mentioned), but, this code got it to work.

``` [Strength] SklStrength is a Skill Value that varies. When play begins: If Strength is 1 SPECIAL, now SklStrength is 1%; If Strength is 2 SPECIAL, now SklStrength is 2%; If Strength is 3 SPECIAL, now SklStrength is 3%; If Strength is 4 SPECIAL, now SklStrength is 4%; If Strength is 5 SPECIAL, now SklStrength is 5%; If Strength is 6 SPECIAL, now SklStrength is 6%; If Strength is 7 SPECIAL, now SklStrength is 7%; If Strength is 8 SPECIAL, now SklStrength is 8%; If Strength is 9 SPECIAL, now SklStrength is 9%; If Strength is 10 SPECIAL, now SklStrength is 10%. Every turn: If Strength is 1 SPECIAL, now SklStrength is 1%; If Strength is 2 SPECIAL, now SklStrength is 2%; If Strength is 3 SPECIAL, now SklStrength is 3%; If Strength is 4 SPECIAL, now SklStrength is 4%; If Strength is 5 SPECIAL, now SklStrength is 5%; If Strength is 6 SPECIAL, now SklStrength is 6%; If Strength is 7 SPECIAL, now SklStrength is 7%; If Strength is 8 SPECIAL, now SklStrength is 8%; If Strength is 9 SPECIAL, now SklStrength is 9%; If Strength is 10 SPECIAL, now SklStrength is 10%.```

Which removed the tabs and changed to “now, is”.

Hope this helps anyone else with the same type of problem!

Do you need the SklStrength value as an actual variable? Otherwise, you could always just have a conversion from a SPECIAL score into a percentage value.

```To decide which skill value is skillified (s - a SPECIAL value): decide on (s divided by 1 SPECIAL) multiplied by 1%.```

I put that in, but it doesn’t work. Is there some extra code I need to go with it? And, no, I don’t need them as actual values.

Thanks,
Blaze5565

Cool. In that case, it ensures that

```SklStrength is a Skill Value that varies. When play begins: If Strength is 1 SPECIAL, now SklStrength is 1%; If Strength is 2 SPECIAL, now SklStrength is 2%; If Strength is 3 SPECIAL, now SklStrength is 3%; If Strength is 4 SPECIAL, now SklStrength is 4%; If Strength is 5 SPECIAL, now SklStrength is 5%; If Strength is 6 SPECIAL, now SklStrength is 6%; If Strength is 7 SPECIAL, now SklStrength is 7%; If Strength is 8 SPECIAL, now SklStrength is 8%; If Strength is 9 SPECIAL, now SklStrength is 9%; If Strength is 10 SPECIAL, now SklStrength is 10%. Every turn: If Strength is 1 SPECIAL, now SklStrength is 1%; If Strength is 2 SPECIAL, now SklStrength is 2%; If Strength is 3 SPECIAL, now SklStrength is 3%; If Strength is 4 SPECIAL, now SklStrength is 4%; If Strength is 5 SPECIAL, now SklStrength is 5%; If Strength is 6 SPECIAL, now SklStrength is 6%; If Strength is 7 SPECIAL, now SklStrength is 7%; If Strength is 8 SPECIAL, now SklStrength is 8%; If Strength is 9 SPECIAL, now SklStrength is 9%; If Strength is 10 SPECIAL, now SklStrength is 10%.```

can be removed. Instead, whenever you want to know the SklStrength equivalent, you simply invoke the phrase. Whenever you want to know the “SklStrength” of “Strength”, for instance, simply refer to it by calling it skillified Strength.

Uh, I tried your code and still have no idea as to how to use it… Sorry…

Ok. If you can give me a code example of what you want your code to actually do, then I could probably give you the working code. Right now, it’s hard to give an example because your code doesn’t actually do anything with the values.

It uses the values in multiple equations, all like this one:

[code][Out Equation]
Equation - Out Equation
X = B+((I+E)/Q)+O
Where X is a Skill Value, B is BaseFive, I is SklIntelligence, E is SklEndurance, Q is TwoSkill, and O is Extra Out/code]
Is that all you need?

What are you trying to actually do? Inform’s equation feature may not be the most appropriate option. (I haven’t actually seen equations used in practice. They would be most useful when you want to automatically use one equation to perform multiple calculations, otherwise phrases are simpler to use.)

What Dannii said. Your code, right now, is a set of numeric relationships with no way of telling how they’re supposed to be used.

I want it to work out the Skill Value every turn via the equation, and use that to update each of the different skills, such as “Out”.

As I said, in order to help, I’ll need a code example. Something like this:

``````A SPECIAL Value is a kind of value. 1 SPECIAL specifies a SPECIAL Value.
Agility is a SPECIAL Value that varies. Agility is usually 5 SPECIAL.

A Skill Value is a kind of value. 1% specifies a Skill Value.
Ranged Combat is a Skill Value that varies.

To decide which skill value is skillified (s - a SPECIAL value):
decide on (s divided by 1 SPECIAL) multiplied by 1%.

Every turn:
say "Ranged Combat percentage value is [Ranged Combat + skillified Agility]."

Ranged Combat is 12%.

There is a room.
Test me with "wait".``````

As you can see, you do not need to make gigantic list in order update every turn, you can just calculate it.

And everything gets simpler if you don’t use custom values but just normal numbers. Kerkerkruip just uses normal numbers and then prints units manually when needed.

Yeah, I’m trying out using actual numbers now, and it’s working much better.