Is there a way to put tokens into a conversation without knowing how many you need.
I want a single conversation that will display all the quests in the PC's current area.
I would script all the quests and in individual if statements based on the PC's current area and set the custom tokens within each if statement. The problem comes that i cant figure out how to get the conversation to display the custom tokens when the number of tokens changes based on the area. I'd rather not write a seperate script for each area and I know someone out there can give me a solution.
Dynamic Custom Tokens
Débuté par
Tazzvon
, nov. 18 2013 01:13
#1
Posté 18 novembre 2013 - 01:13
#2
Posté 18 novembre 2013 - 02:02
Instead of making each quest a different token, put them all into one token.
int StartingConditional()
{
object oPC = GetPCSpeaker();
string sArea = GetTag(GetArea(oPC));
string sToken = "The following quests are available in this area:\\n";
if (sArea == "area1")
{
sToken += "\\nQuest 1: Do the first thing!";
sToken += "\\nQuest 2: Do the second thing!";
sToken += "\\nQuest 3: Do the third thing!";
}
else if (sArea == "area2")
{
sToken += "\\nQuest 4: Do the fourth thing!";
sToken += "\\nQuest 5: Do the fifth thing!";
sToken += "\\nQuest 6: Do the sixth thing!";
}
else
sToken = "Sorry, there are no quests in this area.";
SetCustomToken(20000, sToken);
return TRUE;
}
Modifié par Squatting Monk, 18 novembre 2013 - 02:03 .
#3
Posté 18 novembre 2013 - 11:52
So, that looks great but that won't separate them out to individual selections that the PC can select will it? I would like the conversation to say "here are the quests in your area" then the player can select one to get more info. I don't think it would work for that but thank you.
#4
Posté 20 novembre 2013 - 10:58
Ah. I thought you were just looking to list them in the NPC's dialog. In that case, I suggest using a dynamic dialog system like ZZ-Dialog. I'll try to whip up a simple demonstration of how you could go about doing it yourself, if you feel like doing it the hard way.
#5
Posté 20 novembre 2013 - 11:05
If Z-Dialog is the way to go, we will be happy to post our fixes to it. I'll see about that this week if I can ever get time outside of RL obligations.





Retour en haut







