How To Question: Add a New Leader for Japan (Oda from Civ5)

Varek

Chieftain
Joined
Dec 17, 2005
Messages
20
Location
Canada
Hi,

Just playing around trying to learn the modding for civ6 and trying to get my head around how to make changes etc. and thought of the following question, any feedback would be great as I'm still learning the ins/outs of what can be done via XML vs SQL vs LUA.

If for example I wanted to change Japan to have it's Civ 5 power/ability (All units fight at full strength despite injury).

Looking through the Units.xml and UnitAbitlites.xml i see:

<Row Type="ABILITY_SAMURAI" Kind="KIND_ABILITY"/>

<Row>
<UnitAbilityType>ABILITY_SAMURAI</UnitAbilityType>
<ModifierId>SAMURAI_NO_REDUCTION_DAMAGE</ModifierId>
</Row>
<Row>
<ModifierId>SAMURAI_NO_REDUCTION_DAMAGE</ModifierId>
<ModifierType>MODIFIER_PLAYER_UNIT_ADJUST_NO_REDUCTION_DAMAGE</ModifierType>
</Row>

So I'm assuming I would need to somehow update any Japanese combat unit and give them that ability. With my limited experience thus far I'd imagine I'd need to either:

a) Add an entry for each Japanese unit to the unit.xml and force it to use those instead. So instead of Unit_Warrior it would use Unit_Japanese_Warrior which would have the Samurai Ability.

b) Have some kind of update code which would check if the player is playing Japan and if so add that ability to each of their units on the fly. So something like (just pseudo code) this for each unit I wanted to add it to:

<Update>
<Where PLAYER_CIV=CIV_JAPAN UnitType="UNIT_WARRIOR"
SET TraitType=TRAIT_CIVILIZATION_UNIT_JAPANESE_SAMURAI />
</Update>

What would be the most efficient way to do that and why? And if not possible yet why not? Is there a better way to come at this?

Thanks in advance for any info,

-V
 
Anyone with any idea on how to do this? The more I play Japan the more I dislike the new Divine Wind "ability" and want to go back to what they had before. I had a look through the files last night and Japan doesn't even have any kind of start bias to be on the coast, yet their main ability requires coast. Very strange.
 
So after thinking on this more, I'm thinking I'll try adding a new Leader to Japan. So instead of changing HoJo im going to try and make Oda from Civ5 as a second option for Japan. Still just a concept atm...

So any tips for adding a new leader, ability etc?
 
Back
Top Bottom