Generated quest counter message events always have the "Any" sender/target specifier
Posted: Wed Dec 07, 2022 5:11 pm
After scratching my head for a while trying to figure out why my counters were updating more than they should, I figured out that the Sender ID & Target ID fields in an action's completion condition counter don't actually do anything. Any value set there will not end up on the counter for three reasons:
1. The "Sender Specifier" and "Target Specifier" fields on the QuestCounterMessageEvent are not visible in the inspector for the action. I used the debug inspector to set their values.
2. The constructor for QuestCounterMessageEvent does not have parameters for the sender/target specifier, so their value is always the default "Any" which leads to the targetID property returning an empty StringField, no matter what the underlying m_targetID value is.
3. Both sender specifier and sender ID are not even copied from the action message event to the generated quest message event (not in the constructor).
I went ahead and hacked in a fix to add the target specifier value to the new QuestCounterMessageEvent in PlanToQuestBuilder.AddStepCondition since that was specifically what we needed.
We're currently on QM 1.2.31, but I don't see anything in the changelog for the recent releases that addresses this issue so I figured I would make a note of it here to notify and hopefully save anyone some time in the future.
1. The "Sender Specifier" and "Target Specifier" fields on the QuestCounterMessageEvent are not visible in the inspector for the action. I used the debug inspector to set their values.
2. The constructor for QuestCounterMessageEvent does not have parameters for the sender/target specifier, so their value is always the default "Any" which leads to the targetID property returning an empty StringField, no matter what the underlying m_targetID value is.
3. Both sender specifier and sender ID are not even copied from the action message event to the generated quest message event (not in the constructor).
I went ahead and hacked in a fix to add the target specifier value to the new QuestCounterMessageEvent in PlanToQuestBuilder.AddStepCondition since that was specifically what we needed.
We're currently on QM 1.2.31, but I don't see anything in the changelog for the recent releases that addresses this issue so I figured I would make a note of it here to notify and hopefully save anyone some time in the future.