Page 1 of 1
why are quest state conditions referenced by string?
Posted: Mon Nov 06, 2023 10:07 pm
by toro_rosso
hello,
I'm talking about QuestStateQuestCondition.requiredQuestID
why isn't it a scriptableobject reference? managing strings seems error prone and not the unity-way
am I missing something?
thanks
Re: why are quest state conditions referenced by string?
Posted: Tue Nov 07, 2023 7:09 am
by Tony Li
Hi - Some quests, such as procedurally-generated quests, aren't associated with a ScriptableObject asset.
However, you don't need to use strings. Create a StringAsset ScriptableObject asset and assign that to the quest's ID field and the requiredQuestID field.
Providing the flexibility to use strings, StringAssets, or text table references makes it easier for designers who are doing more complex quest management such as creating quests at runtime or pulling down new quests from a server.
Re: why are quest state conditions referenced by string?
Posted: Tue Nov 07, 2023 9:24 am
by toro_rosso
ok, I get it
I'm going to tweak that code locally to support both quest references and stringId
or create another type of condition maybe
thanks!
Re: why are quest state conditions referenced by string?
Posted: Tue Nov 07, 2023 10:26 am
by Tony Li
Better to create a custom class. That way you won't lose your changes when you update.
Also, this change (ability to assign quest asset or quest ID) will be in version 1.2.41.