Here's your problem.
12th Archivist wrote:
Set var swordA = 20000
Set var _Sword = swordA
After the first line, you have the following:
swordA = 20000
After the second, you have:
swordA = 20000
_Sword = 20000
So far, so good.
But when you do:
12th Archivist wrote:
Set var swordA = 20000
Set var swordB = "$swordA$" (Using "Assign text")
Set var _Sword = swordB
You get this after the first line:
swordA = 20000
...and this after the second line:
swordA = 20000
swordB = "20000"
...and this after the third line:
swordA = 20000
swordB = "20000"
_Sword = "20000" (illegal, so becomes 0)
First off, you can't set _Sword to a string of text. Secondly, you can't set swordB to a dynamically updating string: it turns "
$swordA$"
to "
20000"
the *moment* you set swordB to that. swordB no longer references swordA, because that reference was already dealt with.
If you want to change _Sword, then you can set it to a variable, and you can even have that variable set by referencing another variable, but you (1) can't set _Sword to text, and (2) should make sure you update the variables yourself. You can't change swordA and expect that some nested recursion will automatically update _Sword for you.
So what you could do is instead:
Set var swordA = 20000
Set var swordB = swordA
Set var _Sword = swordB
The above would set _Sword to 20000. But it doesn't mean that if you later change swordA that _Sword will automatically update: you can't do that (and honestly, that way lies trouble with recursion and nested problems). But since you'll usually be changing swordA manually, it isn't difficult to simply update _Sword yourself at the same time (especially if you have a Global Script that queries the variable and synchronises other variables with it every turn).