Variables set under the Variables: field and with - setvariable{save=true} are not retained upon Restart.
Title. Tested on 1.20.4 Paper & MythicMobs Build #5127.
Used this mob:
test-variable_saving:
Type: ARMOR_STAND
DisplayName: Variable Saving Test
Options:
Despawn: persistent
Variables:
test1: false
test2: "true"
test3: 777
Skills:
# - skill{s=[
# - setvar{var=caster.test1;val=<caster.var.test1>;type=STRING;save=true}
# - setvar{var=caster.test2;val=<caster.var.test2>;type=STRING;save=true}
# - setvar{var=caster.test3;val=<caster.var.test3>;type=INTEGER;save=true}
# ]} @self ~onSpawn
- message{m="<caster.var.test1> <caster.var.test2> <caster.var.test3>"} @trigger ~onInteract
Expected behavior - After Restart, right clicking the mob returns false true 777 in chat
Actual behavior - After Restart, right clicking the mob returns UNDEFINED.
With
# - skill{s=[
# - setvar{var=caster.test1;val=<caster.var.test1>;type=STRING;save=true}
# - setvar{var=caster.test2;val=<caster.var.test2>;type=STRING;save=true}
# - setvar{var=caster.test3;val=<caster.var.test3>;type=INTEGER;save=true}
# ]} @self ~onSpawn
Uncommented, results are the same.