'Stache
Chieftain
- Joined
- Jan 10, 2019
- Messages
- 19
Hello, I am currently trying to make my first own civ in civ 6, I have used Josh Atkins YouTube tutorial and used his template. Now I am stuck at adding the ability to my new civ, that enables all units to ignore hills.
I have written this code so far.
Here it is as xml:
and as sql:
I don't know if this is correct. I copied it from a suggestion from @LeeS, made in the "give all units a promotion as a trait?" thread. Then I adjusted it accordingly.
My game ignores this file though. The new civ runs without it.
I put the .xml in FrontEnd Actions and In-game Actions under Update Database.
My questions are: Is this code even correct?
Didn't I connect it correctly?
(The "TRAIT_CIVILIZATION_STACHE_IGNORE HILLS" leads to the trait of the civ (not the leader), which is defined in another .sql file.)
I may be way off here, this is my first time as a modder dealing with coding of that magnitude.
Thank you very much for any help.
I have written this code so far.
Here it is as xml:
Code:
<?xml version="1.0" encoding="utf-8"?>
<GameInfo>
<Types>
<Row Type="ABILITY_STACHE_IGNORE_HILL_COST" Kind="KIND_ABILITY"/>
</Types>
<TypeTags>
<Row Type="ABILITY_STACHE_IGNORE_HILL_COST" Tag="CLASS_LANDCIVILIAN"/>
<Row Type="ABILITY_STACHE_IGNORE_HILL_COST" Tag="CLASS_RECON"/>
<Row Type="ABILITY_STACHE_IGNORE_HILL_COST" Tag="CLASS_MELEE"/>
<Row Type="ABILITY_STACHE_IGNORE_HILL_COST" Tag="CLASS_RANGED"/>
<Row Type="ABILITY_STACHE_IGNORE_HILL_COST" Tag="CLASS_SIEGE"/>
<Row Type="ABILITY_STACHE_IGNORE_HILL_COST" Tag="CLASS_HEAVY_CAVALRY"/>
<Row Type="ABILITY_STACHE_IGNORE_HILL_COST" Tag="CLASS_LIGHT_CAVALRY"/>
<Row Type="ABILITY_STACHE_IGNORE_HILL_COST" Tag="CLASS_RANGED_CAVALRY"/>
<Row Type="ABILITY_STACHE_IGNORE_HILL_COST" Tag="CLASS_ANTI_CAVALRY"/>
<Row Type="ABILITY_STACHE_IGNORE_HILL_COST" Tag="CLASS_HEAVY_CHARIOT"/>
<Row Type="ABILITY_STACHE_IGNORE_HILL_COST" Tag="CLASS_LIGHT_CHARIOT"/>
<Row Type="ABILITY_STACHE_IGNORE_HILL_COST" Tag="CLASS_BATTERING_RAM"/>
<Row Type="ABILITY_STACHE_IGNORE_HILL_COST" Tag="CLASS_SIEGE_TOWER"/>
<Row Type="ABILITY_STACHE_IGNORE_HILL_COST" Tag="CLASS_OBSERVATION"/>
<Row Type="ABILITY_STACHE_IGNORE_HILL_COST" Tag="CLASS_ANTI_AIR"/>
<Row Type="ABILITY_STACHE_IGNORE_HILL_COST" Tag="CLASS_GARDE"/>
</TypeTags>
<UnitAbilities>
<Row UnitAbilityType="ABILITY_STACHE_IGNORE_HILL_COST" Name="LOC_ABILITY_STACHE_IGNORE_HILL_COST_NAME" Description="LOC_ABILITY_STACHE_IGNORE_HILL_COST_DESCRIPTION" Inactive="true"/>
</UnitAbilities>
<!-- -->
<UnitAbilityModifiers>
<Row>
<UnitAbilityType>ABILITY_STACHE_IGNORE_HILL_COST</UnitAbilityType>
<ModifierId>ALTITUDE_TRAINING_IGNORE_HILLS</ModifierId>
</Row>
</UnitAbilityModifiers>
<Modifiers>
<Row>
<ModifierId>STACHE_IGNORE_HILL_COST</ModifierId>
<ModifierType>MODIFIER_PLAYER_UNITS_GRANT_ABILITY</ModifierType>
<Permanent>true</Permanent>
</Row>
</Modifiers>
<ModifierArguments>
<Row>
<ModifierId>STACHE_IGNORE_HILL_COST</ModifierId>
<Name>AbilityType</Name>
<Value>ABILITY_STACHE_IGNORE_HILL_COST</Value>
</Row>
<Row>
<ModifierId>ALTITUDE_TRAINING_IGNORE_HILLS</ModifierId>
<Name>Ignore</Name>
<Value>true</Value>
</Row>
<Row>
<ModifierId>ALTITUDE_TRAINING_IGNORE_HILLS</ModifierId>
<Name>Type</Name>
<Value>HILLS</Value>
</Row>
</ModifierArguments>
<TraitModifiers>
<Row TraitType="TRAIT_CIVILIZATION_STACHE_IGNORE_HILLS" ModifierId="STACHE_IGNORE_HILL_COST"/>
</TraitModifiers>
</GameInfo>
and as sql:
Code:
INSERT INTO Types
(Type, Kind)
('ABILITY_STACHE_IGNORE_HILL_COST', 'KIND_ABILITY');
INSERT INTO TypeTags
(Type, Tag)
('ABILITY_STACHE_IGNORE_HILL_COST', 'CLASS_LANDCIVILIAN'),
('ABILITY_STACHE_IGNORE_HILL_COST', 'CLASS_RECON'),
('ABILITY_STACHE_IGNORE_HILL_COST', 'CLASS_MELEE'),
('ABILITY_STACHE_IGNORE_HILL_COST', 'CLASS_RANGED'),
('ABILITY_STACHE_IGNORE_HILL_COST', 'CLASS_SIEGE'),
('ABILITY_STACHE_IGNORE_HILL_COST', 'CLASS_HEAVY_CAVALRY'),
('ABILITY_STACHE_IGNORE_HILL_COST', 'CLASS_LIGHT_CAVALRY'),
('ABILITY_STACHE_IGNORE_HILL_COST', 'CLASS_RANGED_CAVALRY'),
('ABILITY_STACHE_IGNORE_HILL_COST', 'CLASS_ANTI_CAVALRY'),
('ABILITY_STACHE_IGNORE_HILL_COST', 'CLASS_HEAVY_CHARIOT'),
('ABILITY_STACHE_IGNORE_HILL_COST', 'CLASS_LIGHT_CHARIOT'),
('ABILITY_STACHE_IGNORE_HILL_COST', 'CLASS_BATTERING_RAM'),
('ABILITY_STACHE_IGNORE_HILL_COST', 'CLASS_SIEGE_TOWER'),
('ABILITY_STACHE_IGNORE_HILL_COST', 'CLASS_OBSERVATION'),
('ABILITY_STACHE_IGNORE_HILL_COST', 'CLASS_ANTI_AIR'),
('ABILITY_STACHE_IGNORE_HILL_COST', 'CLASS_GARDE');
INSERT INTO UnitAbilities
(UnitAbilityType, Name, Description, Inactive)
('ABILITY_STACHE_IGNORE_HILL_COST', 'LOC_ABILITY_STACHE_IGNORE_HILL_COST_NAME', 'LOC_ABILITY_STACHE_IGNORE_HILL_COST_DESCRIPTION', 'true');
INSERT INTO UnitAbilityModifiers
(UnitAbilityType, ModifierId)
('ABILITY_STACHE_IGNORE_HILL_COST', 'ALTITUDE_TRAINING_IGNORE_HILLS');
INSERT INTO Modifiers
(ModifierId, ModifierType, Permanent)
('STACHE_IGNORE_HILL_COST', 'MODIFIER_PLAYER_UNITS_GRANT_ABILITY', 'true');
INSERT INTO ModifierArguments
(ModifierId, Name, Value)
('STACHE_IGNORE_HILL_COST', 'AbilityType', 'ABILITY_STACHE_IGNORE_HILL_COST'),
('ALTITUDE_TRAINING_IGNORE_HILLS', 'Ignore', 'true'),
('ALTITUDE_TRAINING_IGNORE_HILLS', 'Type' 'HILLS');
INSERT INTO TraitModifiers
(TraitType, ModifierId)
('TRAIT_CIVILIZATION_STACHE_IGNORE HILLS', 'STACHE_IGNORE_HILL_COST');
I don't know if this is correct. I copied it from a suggestion from @LeeS, made in the "give all units a promotion as a trait?" thread. Then I adjusted it accordingly.
My game ignores this file though. The new civ runs without it.
I put the .xml in FrontEnd Actions and In-game Actions under Update Database.
My questions are: Is this code even correct?
Didn't I connect it correctly?
(The "TRAIT_CIVILIZATION_STACHE_IGNORE HILLS" leads to the trait of the civ (not the leader), which is defined in another .sql file.)
I may be way off here, this is my first time as a modder dealing with coding of that magnitude.
Thank you very much for any help.
Last edited: