Bobby Hardenbrook Bobby Hardenbrook

Quest mod questions...

Quest mod questions...

 

Has anyone been able to get a quest result to spawn a unit or unit group? I can see how to get a quest to spawn a goodiehut, since there are examples in the corequest files. But I cannot figure out how to get a unit or unit group to spawn based on a quest result. I want to have a unit spawn if the user makes a certain choice. I assume you use the gamemodifer as with spawning goodie huts...

 

<GameModifier InternalName="CreateGoodieHut">

 <ModType>Map</ModType>

 <Attribute>CreateGoodieHut</Attribute>

 <UnitClass>RatNest</UnitClass>

 <StrVal>Rat Nest</StrVal>

<Radius>8</Radius>

</GameModifier>

 

I can get a goodiehut to spawn using the above xml if the user makes a certain choice, but I haven't been able to tweak it to make a unit spawn instead. Tried a bunch of different combinations of things such as making the modtype 'Unit' and the Attribute 'CreateUnit', etc, and could not get the gamemodifier element to do it.

 

 

A more general question/request for Stardock, any chance we can get a data dictionary for the XML schema? I'm really struggling figuring out what I can do with quests, and how to do it. 

 

 

17,535 views 30 replies
Reply #26 Top

I really just tryig to create a big enough thread so that the powers that be take notice.O:)

Reply #27 Top

 

 

This has totally stalled my quest mod efforts, since all my ideas revolve around getting units to spawn to the map and I can't figure it out ;(

Reply #28 Top

This code is from the "Maggie's ring quest, it spawns a goodie hut and an alpha wolf.

  <TriggerChance>100</TriggerChance>
  <QuestClass>Minor</QuestClass>
  <Repeatable>0</Repeatable>
  <TriggerType>QuestLocation</TriggerType>
  <TriggerOrigin>EventLocation</TriggerOrigin>
  <Image>TombMedallion.png</Image>
  <PrefQuestLoc>Quest_Level2_Hut01</PrefQuestLoc>
  <QuestObjectiveDef InternalName="Quest_Part1_FindingMaggiesKey">
   <ObjectiveID>0</ObjectiveID>
   <NextObjectiveID>1</NextObjectiveID>
   <Description>Find Maggie's key.</Description>
   <PopupObjectiveMsg>1</PopupObjectiveMsg>
   <GameModifier InternalName="MakeWolfInfestedWoods">
    <ModType>Map</ModType>
    <Attribute>CreateGoodieHut</Attribute>
    <UnitClass>Level2_WolfPack_01</UnitClass>
    <StrVal>Lost key location</StrVal>
    <Radius>4</Radius>
   </GameModifier>

If you ditched the     <StrVal>Lost key location</StrVal> would it then just spawn "Level2_WolfPack_01"; this is the code for "Level2_WolfPack_01":

 <GoodieHutType InternalName="Level2_WolfPack_01">
  <Name>Pack of wolves</Name>
  <SpawnRating>-1</SpawnRating>
  <Description>This may not be a safe place to visit.</Description>
  <Medallions>
   <All>CaveGrassland_Medallion.png</All>
  </Medallions>
  <Encounter InternalName="WolfPack">
   <Liklihood>100</Liklihood>
   <LevelLo>2</LevelLo>
   <LevelHi>4</LevelHi>
   <WillRespawn>0</WillRespawn>
   <WanderingRadius>0</WanderingRadius>
   <UnitInstance>
    <UnitType>Wolf</UnitType>
    <UnitName>Alpha Wolf</UnitName>
    <Level>2</Level>
   </UnitInstance>
  </Encounter>  
  <Destructable>1</Destructable>
  <TileDesign>A_WolfPack_01</TileDesign>
  <DrawnIcon>Gfx/TacticalIcons/Quest_Cave1.png</DrawnIcon>
  <IconSize>50</IconSize>
 </GoodieHutType>

Reply #29 Top

For anyone working on this who hasn't seen the post in the Dev Journal area, Frogboy has posted a thread on Creating Quests Part 2" in it he lists what I belive to be all the variables and functions available at this point (@1.07).  https://forums.elementalgame.com/396539 From that it looks like "GameModifier" "ModType" "Map" "SetEnvironment" "SummonUnit" "UnitName"* will be the command structure that is needed to use in order to make a unit spawn on the map.  

 

*I am assuming you need unitname since it is not actually stated in Frogboys post.

Reply #30 Top

 

It looks like that alpha wolf quest just spawns a goodiehut that has an encounter with a alpha wolf unit inside it, but it doesn't actually spawn an alpha wolf unit to the map. I'll check it again tonight, maybe I am wrong.