[HOWTO] How To: Use StringAssets for quest strings

Announcements, support questions, and discussion for Quest Machine.
Post Reply
User avatar
Tony Li
Posts: 21925
Joined: Thu Jul 18, 2013 1:27 pm

[HOWTO] How To: Use StringAssets for quest strings

Post by Tony Li »

A Quest Machine user asked about how to avoid using strings in quests, such as the quest's ID, to reduce the risk of typos. In any text-based quest field, you can use a literal string, or assign a StringAsset, or assign a field from a TextTable.

If you don't want to enter a literal string or use a text table, create a StringAsset in your project. Set the StringAsset's value (e.g., "peskyRabbits"). Then you can assign this StringAsset everywhere in place of the literal "peskyRabbits" string, including the quest's ID field and any conditions or actions that reference the quest ID in any quests. Another advantage of the StringAsset (or TextTable field) is that you can change the ID at any time by changing the value in the StringAsset, and you won't have to update strings in your quests themselves.
Post Reply