Quests and battle failure

Hi guys, in my work with the Quest wizard I have tried many variations of objectives and choices and battles.  One thing that I can't get to work correctly is to figure out what will happen when I lose a battle in a quest.   Does anyone have a good feel for what happens for an objective that has a battle victory as a condition?   

 

The core quests used to have a failure condition when the battle was lost, but that was taken out a couple of builds ago, in theory so that the player could come back to the quest and fight the battle again.

 

So a quest that doesn't quite work how it should is the The Camp Healer2 quest I made that you can download from the quest wizard post.  In particular, this objective below will still move to the next objective even if I lose the battle (the remaining enemies will be on the strategic map).

 

Code: xml
  1. <QuestObjectiveDef>
  2. <ObjectiveID>6</ObjectiveID>
  3. <NextObjectiveID>7</NextObjectiveID>
  4. <PopupObjectiveMsg>0</PopupObjectiveMsg>
  5. <Description>Shaman Battle</Description>
  6. <QuestConditionDef>
  7. <Class>Success</Class>
  8. <Type>BattleFinished</Type>
  9. <TextData>DarklingShaman</TextData>
  10. <MoreTextData>Victory</MoreTextData>
  11. <Objective>
  12. <Icon>M_Darkling_Shaman_Card.png</Icon>
  13. <Text>Find the healer</Text>
  14. <IsOptional>0</IsOptional>
  15. </Objective>
  16. </QuestConditionDef>
  17. </QuestObjectiveDef>

Any thoughts or ideas?   What we'd really like to do is move to a new objective if you lose and a different one if you win.

5,742 views 5 replies
Reply #1 Top

Add a condition. Make it a class failure, type battlefnished and have a next objective ID move to a new objective. That objective would be -1 to end the quest and say 6 to move to a new part of the story where you failed but move on in the quest.

Reply #2 Top

So you are saying that something like this should work:

 

Code: xml
  1. <QuestObjectiveDef>
  2. <ObjectiveID>6</ObjectiveID>
  3. <NextObjectiveID>7</NextObjectiveID>
  4. <PopupObjectiveMsg>0</PopupObjectiveMsg>
  5. <Description>Shaman Battle</Description>
  6. <QuestConditionDef>
  7. <NextObjectiveID>7</NextObjectiveID>
  8. <Class>Success</Class>
  9. <Type>BattleFinished</Type>
  10. <TextData>DarklingShaman</TextData>
  11. <MoreTextData>Victory</MoreTextData>
  12. <Objective>
  13. <Icon>M_Darkling_Shaman_Card.png</Icon>
  14. <Text>Find the healer</Text>
  15. <IsOptional>0</IsOptional>
  16. </Objective>
  17. </QuestConditionDef>
  18. <QuestConditionDef>
  19. <NextObjectiveID>-1</NextObjectiveID>
  20. <Class>Failure</Class>
  21. <Type>BattleFinished</Type>
  22. <TextData>DarklingShaman</TextData>
  23. <MoreTextData>Defeat</MoreTextData>
  24. <Objective>
  25. <Icon>M_Darkling_Shaman_Card.png</Icon>
  26. <Text>Find the healer</Text>
  27. <IsOptional>0</IsOptional>
  28. </Objective>
  29. </QuestConditionDef>
  30. </QuestObjectiveDef>

 I'll have to try it out.

Reply #3 Top

-1 ends the quest. Switch it to anything else to keep it going. One thing I like to do is have a failed battle loop the objective, so you spawn a whole new goodiehut and have to try again.

Reply #4 Top

So I don't think this works.   At least it seems to completely ignore the nextObjectiveID within the conditions.   Sean (or anyone)  do you have a working quest that does this?

Reply #5 Top

I'll check my files as soon as I get a chance. I am sure I have this in one of my quests, but I can't remember which one. I have alot of projects going at once. I now and afraid I coded it without testing it and it doesn't work.  8C