Unit Properties

Moderators: Slitherine Core, Gothic Labs

Post Reply
lpgamble
Administrative Corporal - SdKfz 232 8Rad
Administrative Corporal - SdKfz 232 8Rad
Posts: 163
Joined: Mon Jun 25, 2007 8:00 pm
Location: Houston. Tx

Unit Properties

Post by lpgamble »

What I have so far

Modding Units
In Mod's Directory structure in Sov_charts.xml (only modifications and New units)
add a line under the Table name="Unit" section

Properties:
name
displayname=UNITNAME### --- ties to entry in sov_text.xml
art=(name of png) --- located in \Data\images\units\combat
realm="Iron Barony"
rlmid="28"
form="11" ???
pce="2" ???
bld="2" --- time to build
war="2" ???
sound="growl" --- attack sound
movesound="pantingshort" --- moving sound
class="Cavalry" --- unit type
race="Orc"
entity="Unit" --- unit or indiv
cwork="253" ???
total_cost="300" --- cost to buy
total_upkeep="80" --- upkeep cost
purch="yes" --- purchasable unit
trans="No" ??? able to transport units
time="2" --- time till built
cap="0" --- Capacity Transporting
contact="0" ???
purch="0" --- Unit purchasable
pack="No" --- unit can not shoot after moving if yes
terrain="Any" --- Harbor, 0 or any
type="Standard" --- unit type Merc, Elite, Unique
atttype="Physical" --- type of damage dealt
attack="1" --- attack value
defense="0" --- def value
move="4" --- move value
life="80" --- usually 100
spot="2" ???
rng_att="2" --- range attack
range="2" --- range of attack
speed="3" --- speed of attack auto resolve
morale="2" --- morale
heal="2" --- health regen
special1=(special ability)
special2=(special ability)
special3=(special ability)
metal1a=(medal abilities)
metal1b=(medal abilities)
metal2a=(medal abilities)
metal2b=(medal abilities)
soundranged="bow_release_arrow_02" === sound of ranged attack
attackanim="attack_peppering" --- animation of attack
resource1=(Resource)
res1="2" --- number of resource 1 required to purchase
resource2=(resource)
res2="0" --- number of resource 2 required to purchase
unitdesc="UNITDESC21" --- line in sov_text.xml describing unit
text="" --- text when viewing unit
Last edited by lpgamble on Sat May 09, 2015 2:24 am, edited 1 time in total.
Jekky
Illustrious Software
Illustrious Software
Posts: 867
Joined: Wed Jan 09, 2008 7:06 pm

Re: Unit Properties

Post by Jekky »

You said only new units and modifications - while it is true that you cannot remove a unit completely, you can change it's properties and set Purch=no which will disable it from being visible/purchasable in-game (units which use this in the default sov_charts are either pending units for a future update, or units which are enabled by a scripted event later in the game).
lpgamble
Administrative Corporal - SdKfz 232 8Rad
Administrative Corporal - SdKfz 232 8Rad
Posts: 163
Joined: Mon Jun 25, 2007 8:00 pm
Location: Houston. Tx

Re: Unit Properties

Post by lpgamble »

Anyone have info on the Properties:
form
pce
war
contact
spot
Jekky
Illustrious Software
Illustrious Software
Posts: 867
Joined: Wed Jan 09, 2008 7:06 pm

Re: Unit Properties

Post by Jekky »

form - unit formation value, used in autobattles to determine order of moves (will be obsoleted soon).

pce, bld, war - chances for AI players controlling this realm to build this unit, depending on their current diplomatic status. pce is chance in peace time, bld is chance if war is expected soon, war is chance if already at war. Chance for the AI to make any given unit - total up the value of all realm units from the appropriate column, the divide the chance for the specific unit by the total.

contact - chance for this unit to trigger a naval battle in a sea zone (chance of a naval battle between 2 enemies is based on the combined total of their contact stats).

spot - not currently used, was going to be used for Fog of War effects in battle - would represent how many tiles the unit can "see" into the FoW.
lpgamble
Administrative Corporal - SdKfz 232 8Rad
Administrative Corporal - SdKfz 232 8Rad
Posts: 163
Joined: Mon Jun 25, 2007 8:00 pm
Location: Houston. Tx

Re: Unit Properties

Post by lpgamble »

GREAT thanks!
lpgamble
Administrative Corporal - SdKfz 232 8Rad
Administrative Corporal - SdKfz 232 8Rad
Posts: 163
Joined: Mon Jun 25, 2007 8:00 pm
Location: Houston. Tx

Re: Unit Properties

Post by lpgamble »

Capture.PNG
Capture.PNG (30.72 KiB) Viewed 5767 times
I've added a sov_text.xml file with entries for my units, and have adjusted the numbers from 500, to 450, then the next open number. I can't get the descriptions to load. Is there a range for new units?

<root>
<Table name="GameText">
<Row textid="FLAGDESC47" english="If this Unit is part of an Attacker Army, it gains an initial +3/+3/+3 Attack, Discipline, and Initiative. Each odd Turn after the first, it receives a -1/-1/-1 to Attack, Discipline and Initiative, whether it is an Attacker or a Defender." german="Wenn diese Einheit Teil eines Angreifer Stapels ist, erzielt sie anfängliche +3/+3/+3 Angriff, Moral und Initiative. Nach der 1. Jede ungerade Runde nach dem ersten empfangenen -1/-1/-1 für Angriff, Moral und Initiative, egal ob als Angreifer oder Verteidiger." />
<Row textid="UNITNAME414" english="Wolfbow" german="Wolfreiter" />
<Row textid="UNITNAME413" english="Orc Fire Shamen" german="Shamen" />
<Row textid="UNITDESC414" english="Scouts armed with short bows on Dire Wolves." german="0" />
<Row textid="UNITDESC413" english="Orc Shamen drilled in Fire manipulation." german="0" />
</Table>
Capture1.PNG
Capture1.PNG (183.22 KiB) Viewed 5767 times
</root>
Jekky
Illustrious Software
Illustrious Software
Posts: 867
Joined: Wed Jan 09, 2008 7:06 pm

Re: Unit Properties

Post by Jekky »

Must be a bug, the game shouldn't care what names you give to text entries in the file, they don't even have to follow UNITNAMEXXX, that's just for our convenience. In fact i would advise strongly that you prefix all text names for your mod with your mod name, or an abbreviation of it, to avoid potential future conflict with other mods.
lpgamble
Administrative Corporal - SdKfz 232 8Rad
Administrative Corporal - SdKfz 232 8Rad
Posts: 163
Joined: Mon Jun 25, 2007 8:00 pm
Location: Houston. Tx

Re: Unit Properties

Post by lpgamble »

Couple more ?

What is :
cwork
purc

Is purc a limit on numbers? I'd like to limit a unit to 2.
Jekky
Illustrious Software
Illustrious Software
Posts: 867
Joined: Wed Jan 09, 2008 7:06 pm

Re: Unit Properties

Post by Jekky »

cwork sets a value on units - this is mainly used by the AI when deciding how important units are relative to each other (for example, as part of it's spell target selection process, it will include this information in it's weighting).

purc is used for the initial starting army for each realm - if purc has a value greater than 0, then the game will include those units in the starting line up (if it has money left over after this, it will then prioritise unique units, and then use the pce column to weight units after that). units purchased because they are set in purc are also exempt from the usual resource costs - allowing armies to start with a couple of units which the player could not normally obtain on turn 1.
Post Reply

Return to “Sovereignty: Modders Corner”