[Idea] Adding UnitStat

I am attempting to add a unit stat and I am not sure if this will even work. If it does it would mean remodding ALL units in the game that wear armor but to a point. With this it is then possible to set up base units that the computer would only upgrade with specific armor types.

<UnitStatType InternalName="UnitStat_ArmorLevel">
<DisplayName>Armor Allowed</DisplayName>
<DisplayNameShort>ARMA</DisplayNameShort>
<Description>The units Armor Type Allowed.</Description>
<Icon>Icon_Experience.png</Icon>
<Hidden>1</Hidden>
<DefaultValue>0.0</DefaultValue>
<UnitStatGrouping>AbilityStat</UnitStatGrouping>
</UnitStatType>

 

I got the idea based upon this set of coding for level required for item equipment.

 

<Prereq>
<Type>UnitStat_Level</Type>
<Attribute>5</Attribute>
</Prereq>

 

So then just add something like;

 

<Prereq>
<Type>UnitStat_ArmorLevel</Type>
<Attribute>3</Attribute>
</Prereq>

For a piece of plate armor.

The idea is that armor would then be divided into 4 values, go with the basic values for most fantasy games, 0 for cloth, 1 for leather, 2 for chain and 3 for plate. Shields would be added as well.

 

You could then set up specific classes of Troops based upon armor type and add in those values to the base classes that are researched. This brings the possibility of the whole Rock / Paper / Scissors troops types. Heavy Infantry, Light Infantry, Heavy Horse, Light Horse, Artillery (Bows), and such. Not sure if this can used with Unit design or not, I honestly have not explored it yet. I am just curious before I dig much deeper if anyone else has tried this or something similar or not. Also this can also be used with the Path of So and So changes so that only certain paths can wear different armor types, no Plate Wearing mages but that's modifiable of course.

 

Some feedback please, Thanks Guys.

1,745 views 4 replies
Reply #1 Top

Unfortunately, this doesn't work. The only Prereq accepted by an item to determine if it can be worn by a particular unit is UnitStat_Level.

We have made a request to expand on this behaviour to do exactly what you wanted here: https://forums.elementalgame.com/433089/get;3242322 

Reply #2 Top

Nuts.  I was hoping this would be a work around but I did not know that the Prereq command only accepts UnitStat_Level.  That seems shortsighted where as if you could enable all the UnitStats you could make some real definitions for equipment requirements.  Should I bump that thread or just leave it alone?

Reply #3 Top

Bumping it now won't matter, it's for after release when they have said that they'll work on mod features.

Reply #4 Top

Ok, I will wait impatiently then :annoyed:  .

 

Thanks for the information.