Need Some Help On Creating A Pioneer Variant

Hi guys, I am trying to create a pioneer variant that is only able to spawn outpost. Name I am working on now is Outlander. I took the entire pioneer code for 10 races from the CoreUnits file and pasted in into a new XML, added UnitTypes tag, and change the all non-file-name-related instances of Pioneer to Outlander (maintaining the TrainUnitIcon reference). I also change all the pop cost to "5" for Outlanders. 

Try as I might, I cannot make Outlanders appear in the training list for a new settlement (except for one time when I accidentally kept the InternalName reference, and couldn't build Pioneers for that game). Any help on this problem will be appreciated.

Also, just a related question. Why is the pop cost in the units file 10 while the in-game unit pop cost is 30? What is affecting this multiplier? 

Oh, one more thing. Any idea whether this unit will sit well with AI or will it screw them up bad?

Thanks a lot!

53,886 views 12 replies
Reply #1 Top

The pop cost in the XML is for a single unit of Pioneer, but when you train a pioneer you get a group of 3, that is why it is 30 pop in game. If the AI for it is the same preset as it is for the original Pioneer it should be fine. 

To make a unit appear in the training list make sure these are in:

No more than 4 abilities

<CanBeDesigned>1</CanBeDesigned>

<IsUniqueButBuildable>1</IsUniqueButBuildable>

 

This will let you train the unit without adding it to any racetypes.

 

It wasn't showing up for you because Pioneer is down as <IsStartingUnitType>1</IsStartingUnitType> but this can't be used for modded units without editing the RaceConfig file.

+1 Loading…
Reply #2 Top

I did not realize about the necessity of editing the RaceConfig file and that explains why I could not get some custom units to show up for starting factions, thanks for that tid bit of information there.

Reply #3 Top

Yeah, but if you use 

<CanBeDesigned>1</CanBeDesigned>

<IsUniqueButBuildable>1</IsUniqueButBuildable>

Then you don't need to edit a race config, delete the line about being a starting unit

Reply #4 Top

OK, having already done this (making Pioneer type traits), if you want to make a 'designable' pioneer, this is all you need:

Code: xml
  1. &lt;AbilityBonuses&gt;
  2.   &lt;AbilityBonus InternalName="PioneerGearAbility"&gt;
  3.         &lt;AbilityBonusType&gt;Unit_Design&lt;/AbilityBonusType&gt;
  4.         &lt;AbilityBonusOption InternalName="PioneerGear"&gt;
  5.             &lt;DisplayName&gt;Pioneer Gear&lt;/DisplayName&gt;
  6.             &lt;Description&gt;Allows unit to build towns and outposts&lt;/Description&gt;
  7.             &lt;Icon&gt;Ability_Adventurer_Icon.png&lt;/Icon&gt;
  8.             &lt;Cost&gt;20&lt;/Cost&gt;
  9.             &lt;Type&gt;Army&lt;/Type&gt;
  10.         &lt;GameModifier&gt;
  11.             &lt;ModType&gt;Unit&lt;/ModType&gt;
  12.             &lt;Attribute&gt;UnlockAction&lt;/Attribute&gt;
  13.             &lt;StrVal&gt;BuildTown&lt;/StrVal&gt;
  14.         &lt;/GameModifier&gt;
  15.         &lt;GameModifier&gt;
  16.             &lt;ModType&gt;Unit&lt;/ModType&gt;
  17.             &lt;Attribute&gt;UnlockAction&lt;/Attribute&gt;
  18.             &lt;StrVal&gt;BuildImprovement&lt;/StrVal&gt;
  19.             &lt;StrVal2&gt;Outpost&lt;/StrVal2&gt;
  20.         &lt;/GameModifier&gt;
  21.             &lt;AdditionalTrainingTurns&gt;36&lt;/AdditionalTrainingTurns&gt;
  22.         &lt;ProductionRequirement&gt;
  23.             &lt;Type&gt;Resource&lt;/Type&gt;
  24.             &lt;Attribute&gt;Population&lt;/Attribute&gt;
  25.             &lt;Value&gt;10&lt;/Value&gt;
  26.         &lt;/ProductionRequirement&gt;
  27.             &lt;AIData AIPersonality="AI_General"&gt;
  28.                 &lt;AIPriority&gt;5&lt;/AIPriority&gt;
  29.             &lt;/AIData&gt;
  30.         &lt;/AbilityBonusOption&gt;
  31.     &lt;/AbilityBonus&gt;
  32. &lt;/AbilityBonuses&gt;

Save the above code into it's own .xml file in the mods folder, with it's own name (settlers.xml or whatever), and Pioneer Gear will appear as a trait which you can choose, in the same place/row that the Scouting trait appears.

If you wanted to allow outpost building but not town building, simply delete the UnlockAction/BuildTown Game Modifier, which I'm sure you already did.  Note that, as an above poster pointed out, you can't design a unit with less than 3 individuals, so keep this in mind when arriving at your values.  BTW, my values were something I was experimenting with, choose any resource, training turns, etc. that you feel is appropriate for whatever you are trying to do.

This will, of course, allow your Outpost builders to buy armor and such as well, if you feel the need for armored outpost builders, but I personally don't take an issue with this as the world of Elemental is a dangerous place, and packing some iron to protect yourself is usually a very good idea if you can afford it...

I am (eventually) planning to release this as part of my mini E:LH mod (my roadbuilding trait mod), but of course feel free to use/share this code as you see fit!

Reply #5 Top

You CAN design a unit with less than three inidividuals if you use <AllowGrouping>0</AllowGrouping>, which will make it an individual unit.

Reply #6 Top

Quoting DatedSandwich, reply 5

You CAN design a unit with less than three inidividuals if you use <AllowGrouping>0</AllowGrouping>, which will make it an individual unit.

This is good to know.  I'll give it a whirl!

Edit: I'm about to try this to see what happens, but in my case, I'm good with the group size of 3 in this case, i.e. a construction CREW, not a lone construction dude.  If there was some way to figure construction time into the unit size (i.e. a size 6 unit builds things twice as fast), that'd be cool, but I'm guessing that isn't within the realm of modders...

Of coursing a crew of six should last a bit longer against maurading wolves, if they are packing clubs, but that's another story.

Reply #7 Top

Followup.

Simply adding <AllowGrouping>0</AllowGrouping> to my .xml won't allow you to build individuals.  You still only have Party/Group/Etc. to choose from, and the interface doesn't show individuals.

This may work another way, but not within my trait .xml as presented.  As I noted before, I'm good with a minimum unit size of 3 for engineers/settlers/etc. though.  Plus, I like keeping things simple, and the above .xml is short, sweet, and works.

Reply #8 Top

<AllowGrouping>0</AllowGrouping> goes on the unit, not a trait

Reply #9 Top

Updated code:

Code: xml
  1.  &lt;AbilityBonuses&gt;
  2.      &lt;AbilityBonus InternalName="PioneerGearAbility"&gt;
  3.         &lt;AbilityBonusType&gt;Unit_Design&lt;/AbilityBonusType&gt;
  4.         &lt;AbilityBonusOption InternalName="PioneerGear"&gt;
  5.             &lt;DisplayName&gt;Pioneer Gear&lt;/DisplayName&gt;
  6.             &lt;Description&gt;Allows unit to build towns and outposts&lt;/Description&gt;
  7.             &lt;Icon&gt;Ability_Adventurer_Icon.png&lt;/Icon&gt;
  8.             &lt;Cost&gt;20&lt;/Cost&gt;
  9.             &lt;Type&gt;Army&lt;/Type&gt;
  10.         &lt;GameModifier&gt;
  11.             &lt;ModType&gt;Unit&lt;/ModType&gt;
  12.             &lt;Attribute&gt;UnlockAction&lt;/Attribute&gt;
  13.             &lt;StrVal&gt;BuildTown&lt;/StrVal&gt;
  14.                 &lt;Provides&gt;Allows unit to establish new settlements&lt;/Provides&gt;
  15.         &lt;/GameModifier&gt;
  16.         &lt;GameModifier&gt;
  17.             &lt;ModType&gt;Unit&lt;/ModType&gt;
  18.             &lt;Attribute&gt;UnlockAction&lt;/Attribute&gt;
  19.             &lt;StrVal&gt;BuildImprovement&lt;/StrVal&gt;
  20.             &lt;StrVal2&gt;Outpost&lt;/StrVal2&gt;
  21.                 &lt;Provides&gt;Also allows unit to establish outposts&lt;/Provides&gt;
  22.         &lt;/GameModifier&gt;
  23.             &lt;AdditionalTrainingTurns&gt;30&lt;/AdditionalTrainingTurns&gt;
  24.         &lt;ProductionRequirement&gt;
  25.             &lt;Type&gt;Resource&lt;/Type&gt;
  26.             &lt;Attribute&gt;Population&lt;/Attribute&gt;
  27.             &lt;Value&gt;10&lt;/Value&gt;
  28.         &lt;/ProductionRequirement&gt;
  29.             &lt;AIData AIPersonality="AI_General"&gt;
  30.                 &lt;AIPriority&gt;5&lt;/AIPriority&gt;
  31.             &lt;/AIData&gt;
  32.         &lt;/AbilityBonusOption&gt;
  33.     &lt;/AbilityBonus&gt;
  34.  &lt;/AbilityBonuses&gt;

Main changes here are the descriptions for <provides>, and assigning the additional training turns of 30, which gives a build cost of 109 with the weak attribute and staves (normal 'weak' pioneers without any weapons have a build cost of 103).  Note that the designer forces you to choose at least a club, stave, or spear.  As I think Pioneers would/should have walking staffs handy if they are ambushed, I'm good with this.

Note that the 'Weak' Attribute no longer appears in the unit design/traits window as a choosable option.  This reduces training turns by -10, and reduces attack strength by -2.  Hence, 'Average Strength' Pioneers will have a higher build cost.  A workaround for this is to modify the 'scout', which has the 'Weak' Attribute, and add the Pioneer Gear to that unit.  Or, you could just add 'Weak' back into the designer...

Code: xml
  1. &lt;AbilityBonuses&gt;
  2.    &lt;AbilityBonus InternalName="Unit_Weakness"&gt;
  3.         &lt;AbilityBonusType&gt;Unit_Design&lt;/AbilityBonusType&gt;
  4.          &lt;AbilityBonusOption InternalName="Weak2"&gt;
  5.             &lt;DisplayName&gt;Weak&lt;/DisplayName&gt;
  6.             &lt;Description&gt;-2 Attack&lt;/Description&gt;
  7.             &lt;Icon&gt;Ability_Weak_Icon.png&lt;/Icon&gt;
  8.             &lt;Cost&gt;0&lt;/Cost&gt;
  9.             &lt;Type&gt;Weakness&lt;/Type&gt;
  10.             &lt;GameModifier&gt;
  11.                 &lt;ModType&gt;Unit&lt;/ModType&gt;
  12.                 &lt;Attribute&gt;AdjustUnitStat&lt;/Attribute&gt;
  13.                 &lt;StrVal&gt;UnitStat_Attack_Pierce&lt;/StrVal&gt;
  14.                 &lt;Multiplier&gt;.5&lt;/Multiplier&gt;
  15.                 &lt;Provides&gt;Reduces Physical Attack by 50%.  Shortens time to produce unit slightly.&lt;/Provides&gt;
  16.             &lt;/GameModifier&gt;
  17.             &lt;AdditionalTrainingTurns&gt;-10&lt;/AdditionalTrainingTurns&gt;
  18.             &lt;AIData AIPersonality="AI_General"&gt;
  19.                 &lt;AIPriority&gt;5&lt;/AIPriority&gt;
  20.             &lt;/AIData&gt;
  21.         &lt;/AbilityBonusOption&gt;
  22.     &lt;/AbilityBonus&gt;
  23. &lt;/AbilityBonuses&gt;

Note the <Multiplier>, which now reduces attack strength by 50%, instead of by -2, which makes more sense to me from a balancing perspective.  If you prefer the -2, simply change <Multiplier>.5</Multiplier> to <Value>-2</Value>.

Now, off to figure out how to upload this, and update/post my mod thread.

Reply #10 Top

I don't even have a mod thread on here XD I should probably make one, all my stuff is just on the nexus

+1 Loading…
Reply #11 Top

Please don't take this the wrong way, but this isn't going to work. You will be able to certainly have the unit appear in game and you can make it build outposts, that is easy enough, however the AI will not use it. I already tried this once before in the past. I had even removed the ability for pioneers to build outposts but the AI will still build only pioneers and will be able to build settlements and outposts with pioneers only. It is hardcoded.

Reply #12 Top

Yeah, I noticed. I never imagined that the AI will be smart enough to notice a cheaper outpost builder. It just does not make sense that that outpost cost so much (30 pop), especially when LH pop growth seems so much slower than FE. 

Now I'm stuck between "taking advantage" of the AI weakness, or spending an exorbitant amount on outposts. Or I can just keep going for them Arcane Outposts, which I also feel is somewhat overpowered. =/

Anyway, here is my outpost builders, if anybody is interested. Didn't put much thought to it, but props to DatedSandwich for his help on making the unit parseable. Sorry if it's a bit long, I was too lazy to take out the unneeded parts of the Pioneer. 

Code: xml
  1. &lt;UnitTypes&gt;
  2. &lt;UnitType InternalName="Unit_Outlander"&gt;
  3. &lt;DisplayName&gt;Outlander&lt;/DisplayName&gt;
  4. &lt;Description&gt;Outlanders are equipped with the necessary supplies to create outposts.&lt;/Description&gt;
  5. &lt;Gender&gt;Female&lt;/Gender&gt;
  6. &lt;AdditionalTrainingTurns&gt;48&lt;/AdditionalTrainingTurns&gt;
  7. &lt;HasWages&gt;0&lt;/HasWages&gt;
  8. &lt;IsSovereign&gt;0&lt;/IsSovereign&gt;
  9. &lt;CanBeDesigned&gt;1&lt;/CanBeDesigned&gt;
  10. &lt;IsUniqueButBuildable&gt;1&lt;/IsUniqueButBuildable&gt;
  11. &lt;GroupingType&gt;UnitGroupingType_Party&lt;/GroupingType&gt;
  12. &lt;TrainUnitIcon&gt;TrainUnitIcon_Pioneer.png&lt;/TrainUnitIcon&gt;
  13. &lt;GameModifier&gt;
  14. &lt;ModType&gt;Unit&lt;/ModType&gt;
  15. &lt;Attribute&gt;UnlockAction&lt;/Attribute&gt;
  16. &lt;StrVal&gt;BuildImprovement&lt;/StrVal&gt;
  17. &lt;StrVal2&gt;Outpost&lt;/StrVal2&gt;
  18. &lt;/GameModifier&gt;
  19. &lt;LevelMilestone InternalName="L1"&gt;
  20. &lt;Level&gt;1&lt;/Level&gt;
  21. &lt;/LevelMilestone&gt;
  22. &lt;SelectedAbilityBonusOption&gt;Weak&lt;/SelectedAbilityBonusOption&gt;
  23. &lt;Equipment&gt;K_Female_Head_02&lt;/Equipment&gt;
  24. &lt;Equipment&gt;Sovereign_Bandit_Hair_ID1&lt;/Equipment&gt;
  25. &lt;Equipment&gt;Quilted_Corset_ID1&lt;/Equipment&gt;
  26. &lt;Equipment&gt;Empire_Overskirt_ID2_Flipped&lt;/Equipment&gt;
  27. &lt;Equipment&gt;TightBoots_Dark&lt;/Equipment&gt;
  28. &lt;Equipment&gt;SionVambraces&lt;/Equipment&gt;
  29. &lt;ProductionRequirement&gt;
  30. &lt;Type&gt;Resource&lt;/Type&gt;
  31. &lt;Attribute&gt;Population&lt;/Attribute&gt;
  32. &lt;Value&gt;3.333333&lt;/Value&gt;
  33. &lt;/ProductionRequirement&gt;
  34. &lt;Backstory&gt;"I seek no mercenaries; the Silver Swordsmen and their ilk are unwelcome in the ranks of my army. What I seek are heroes - those who wish to make bettering this world their life&#39;s adventure!" These words - uttered at the nadir of the Nobles Revolt, when the armies of Procipinee surrounded Relias and his companions at the foot of Mount Essa - remain the rallying cry for all Altar&#39;s soldiers. This is an army of adventurers - many of whom are famous in their own right for the quests they have completed - an army that will sometimes dare the impossible and often achieve it.&lt;/Backstory&gt;
  35. &lt;AnimationPack&gt;FemaleSovereignAnimationPack&lt;/AnimationPack&gt;
  36. &lt;BattleAnimationBehavior&gt;Melee&lt;/BattleAnimationBehavior&gt;
  37. &lt;ClothMapScale&gt;1.6&lt;/ClothMapScale&gt;
  38. &lt;ClothPoseIndex&gt;6&lt;/ClothPoseIndex&gt;
  39. &lt;Color_Hair&gt;163,118,83,255&lt;/Color_Hair&gt;
  40. &lt;CutSceneDataPack&gt;DefaultUnitCutscenePack&lt;/CutSceneDataPack&gt;
  41. &lt;EyeTexture&gt;gfx\eyes\blinks\eyeblink_f2_ltblue.png&lt;/EyeTexture&gt;
  42. &lt;InfoCardBackground&gt;BG_KingdomRugged&lt;/InfoCardBackground&gt;
  43. &lt;InfoCardBackgroundFlipped&gt;0&lt;/InfoCardBackgroundFlipped&gt;
  44. &lt;ModelPath&gt;Gfx\HKB\Units\K_Female_Mesh_01.hkb&lt;/ModelPath&gt;
  45. &lt;ModelScale&gt;1&lt;/ModelScale&gt;
  46. &lt;MovementType&gt;land&lt;/MovementType&gt;
  47. &lt;MovingSFX&gt;TEMP_KnightMarching1&lt;/MovingSFX&gt;
  48. &lt;OnHitParticleName&gt;Bloody_OnHit&lt;/OnHitParticleName&gt;
  49. &lt;SkeletonPath&gt;Gfx\HKB\Units\K_Male_Skeleton_01.hkb&lt;/SkeletonPath&gt;
  50. &lt;SoundPack&gt;SoundPack_Generic_Female&lt;/SoundPack&gt;
  51. &lt;TacticalModelScale&gt;1.5&lt;/TacticalModelScale&gt;
  52. &lt;Texture_Eyes&gt;gfx\eyes\blinks\eyeblink_f2_ltblue.png&lt;/Texture_Eyes&gt;
  53. &lt;Texture_Skin&gt;K_Female_Freckles_Texture_01.png&lt;/Texture_Skin&gt;
  54. &lt;UnitModelType&gt;KingdomFemale&lt;/UnitModelType&gt;
  55. &lt;/UnitType&gt;
  56. &lt;/UnitTypes&gt;