Hi there,
I was wondering if there is a way for me to define a name for an entity (like a procedurally generated quest) in a regular quest and display it using a text table.
For example, I have a quest centered around a girl who wants to understand how guys perceive her. The girl acts as the quest giver, so I can use {QUESTGIVER} to display her name in the Journal and I want to do the same thing with guys. Is there a method to define {GUY_A}, {GUY_B}, and {GUY_C} in a text table and display their names as tags? Or, are there any other similar approaches that can accomplish this?
How to define tags from a text table?
Re: How to define tags from a text table?
Hi,
Assuming each guy is a quest entity, each guy will have a display name. You can assign a string, a String Asset, or a Text Table field to the display name.
When the girl generates a quest, the generated quest text should include the guy's display name.
Assuming each guy is a quest entity, each guy will have a display name. You can assign a string, a String Asset, or a Text Table field to the display name.
When the girl generates a quest, the generated quest text should include the guy's display name.
Re: How to define tags from a text table?
Hi Tony,
I apologize for the confusion. I wasn't referring to a procedurally generated quest, but rather a designed quest. Is it possible for me to customize my own tags?
I apologize for the confusion. I wasn't referring to a procedurally generated quest, but rather a designed quest. Is it possible for me to customize my own tags?
Re: How to define tags from a text table?
Hi,
Yes, but only in C# using Quest.tagDictionary.SetTag(tag, value). Examples:
Yes, but only in C# using Quest.tagDictionary.SetTag(tag, value). Examples:
Code: Select all
// Assign string value to tag GUY_A:
someQuest.tagDictionary.SetTag("GUY_A", "Adam");
// Assign text table field to GUY_B:
int fieldID = someTextTable.GetFieldID("Bob");
someQuest.tagDictionary.SetTag("GUY_B", new StringField(someTextTable, fieldID));
Re: How to define tags from a text table?
Got it, thanks!
Re: How to define tags from a text table?
Glad to help!
Re: How to define tags from a text table?
I'll leave this for anyone who might want to use custom tags or have their terms localized in I2. You can consider overriding the AddBodyContent method in UnityUIQuestJournalUI. I hope this helps!