I understand plots and journal entries, etc.
I have a quest that requires collecting bar tabs from three specific people. However, the order is irrelevant. Most quests are like "do step one, this leads to step two"... but I need steps 2a, 2b, and 2c to be completed before moving to step 3.
I realized I could call a separate plot from within my main plot, but it still leaves the same problem. I need a way to say 'when bing bang and boom are ALL THREE DONE, no matter which order you did them in, activate shazam'
any tips?
help with non-linear quest creation
Débuté par
ixobelle
, nov. 12 2009 10:09
#1
Posté 12 novembre 2009 - 10:09
#2
Posté 13 novembre 2009 - 12:19
Another approach could be to create three plot flags for the three different tabs, and then create a "defined" plot flag that uses a script to check whether all three of the individual tab plots have been set.
Defined plot flags rely on the plot's event script to determine what their value should be, they can't be "set" or "cleared" explicitly like regular plot flags are.
Here's a really quick and dirty pseudocodish example:
int StartingConditional()
{
if( nType == EVENT_TYPE_SET_PLOT )
{
//regular settable plot flags. Pretend there's plot flags for GOT_TAB_A, GOT_TAB_B, and GOT_TAB_C.
}
//--------------------------------------------------------------------------
// Conditions -> defined flags only (GET DEFINED)
//--------------------------------------------------------------------------
else
{
switch( nFlag )
{
case GOT_ALL_THREE_TABS:
{
if (WR_GetPlotFlag(sPlot,GOT_TAB_A) &&
WR_GetPlotFlag(sPlot,GOT_TAB_
&&
WR_GetPlotFlag(sPlot,GOT_TAB_C) )
bResult = TRUE;
break;
}
}
}
return bResult;
}
I know there's a way to set up the journal so that the quest's journal entry will read "you've collected one of the three tabs", "you've collected two of the three tabs", etc., but I don't know what method's used for that offhand. Hopefully this will get you to a good start in the meantime.
Defined plot flags rely on the plot's event script to determine what their value should be, they can't be "set" or "cleared" explicitly like regular plot flags are.
Here's a really quick and dirty pseudocodish example:
int StartingConditional()
{
if( nType == EVENT_TYPE_SET_PLOT )
{
//regular settable plot flags. Pretend there's plot flags for GOT_TAB_A, GOT_TAB_B, and GOT_TAB_C.
}
//--------------------------------------------------------------------------
// Conditions -> defined flags only (GET DEFINED)
//--------------------------------------------------------------------------
else
{
switch( nFlag )
{
case GOT_ALL_THREE_TABS:
{
if (WR_GetPlotFlag(sPlot,GOT_TAB_A) &&
WR_GetPlotFlag(sPlot,GOT_TAB_
WR_GetPlotFlag(sPlot,GOT_TAB_C) )
bResult = TRUE;
break;
}
}
}
return bResult;
}
I know there's a way to set up the journal so that the quest's journal entry will read "you've collected one of the three tabs", "you've collected two of the three tabs", etc., but I don't know what method's used for that offhand. Hopefully this will get you to a good start in the meantime.
#3
Posté 13 novembre 2009 - 01:05
I think you've got it reversed, the three "tab_paid" flags should be in the main flags section (so that they can each be set to true when each tab is paid) and the ALL_TABS_COLLECTED flag should be in the defined flags section (since it's something that depends on a script to determine whether it's "true" or not).
When you get to making an attempt at writing the event script, take a look at the "templates" button in the constants browser. There's a template called "Custom plot events.txt" that will set up the basic framework of a plot event script for you, the only thing you'll need to do is add an #include statement for the plot in question and add case statements for the plot flags you want to have special handling for.
When you get to making an attempt at writing the event script, take a look at the "templates" button in the constants browser. There's a template called "Custom plot events.txt" that will set up the basic framework of a plot event script for you, the only thing you'll need to do is add an #include statement for the plot in question and add case statements for the plot flags you want to have special handling for.





Retour en haut






