I've been trying to make a dialogue option only appear if a memory key containing my script does
not exist (i.e. is null). However, if I use the !$[memKey] condition in
rules.csv to check for that, it doesn't appear to work correctly, so the dialogue still appears even when that script exists and is stored in the specified memory key.
rules.csv Condition for a PopulateOptions trigger (Highlighted is the problem condition)
$isPerson
$personFaction.id == adversary
$player.fcm_faction == adversary
Commission personCanGiveCommission
!$player.defeatedAdversaryAttack
!$global.adversary_mt_ref
In Devmode, after going through my dialogue, triggering the script, and then dumping the memory, I can see it clearly as
$global.adversary_mt_ref = MutualTenacityScript@[object #], but, for whatever reason (and this is my guess), the
!$global.adversary_mt_ref condition still thinks that that memory key doesn't exist, making the condition always true when I expect it to be false at that point. All other conditions seem to work fine, and, from what I can find, the other times I used
!$global.[memKey] to check for
global memory keys had worked as intended. It's only that
!$global.adversary_mt_ref condition check that isn't working as I thought it would.
If this is an unsupported feature (or just user error), what would be the intended solution for checking memory keys containing a non-boolean object in
rules.csv?
(Oh, and I used the
PiracyRespiteScript.java, which contains "$prf_ref" as its key, as a reference for my own script. I didn't see its memory key get used anywhere in the vanilla
rules.csv, though, so there wasn't anything else I could fall back on for help with this problem.)