pls help a newbie with tweaking Colonialist Legacies' Cuba mod

Wan Yao

Chieftain
Joined
Sep 9, 2017
Messages
3
I've never modded Civ 5 before, but as the title says, I am trying to tweak the UU for the Fidel Castro's Cuba mod, the Guerrillero, but I'm running into some difficulties. I think I've finally figured out what the problem might be and I need to know if I am crazy or doing something wrong or what... And maybe how to fix the issue...

I was also hoping for some general feedback, if you're familiar with the civ, about my changes. If you like the changes and also if you think the numbers are balanced. But that's icing on the cake, really I just want to get the damn thing working the way I want it to work.

So... Ideally, I want to do what many people in the mod's comments have suggested: change the UU from a Great War Infantry replacement to a straight up Infantry replacement. However, when I try this it just doesn't work in game. After a bunch of digging I think the reason might be that the tech with which I want it to go obsolete -- Mobile Tactics, just like regular Infantry -- is not in the Civ 5 tech definitions file. I've literally read through that file, tech by tech, more than once and I can't find it. Which means that that reference in the mod's XML file is broken. At least, that's what I think is going on.....

The ideal version of the UU would:

a) be an Infantry replacement and probably go obsolete with Mobile Tactics and be replaced with MechInf, just like regular infantry
b) Have 60 combat strength (vs 70) but be proportionally cheaper to build (320 or 325).
c) Have the additional ability on top of what it currently does of a 50% chance to retreat from any melee attack. (I know the field for this, but I can't figure out how to use it, where to put in the file, etc. etc. Like I said, I am brand new to this!)

For now I have created a version that at least works and is hopefully an improvement on the default UU. It's still a GWI replacement (no choice) but it obsoletes with and upgrades to Paratroopers, not Plastics. This way it'll hopefully stick around a bit longer and have more value. I'm going to try putting in the 50% retreat chance next... knock on wood...

Here is the XML for the mod's Units.xml that I have so far if anyone want to look at it... I don't know what or where any of the other stuff for the unit might be, this and the text is all I have worked on. Sorry, the formatting is gone, I just cut and pasted it out of wordpad :(


-<GameData>

-<Units>
-<Row>
<Class>UNITCLASS_GREAT_WAR_INFANTRY</Class>
<Type>UNIT_CL_UC_GUERRILLERO</Type>
<Combat>50</Combat>
<Cost>320</Cost>
<Moves>2</Moves>
<CombatClass>UNITCOMBAT_GUN</CombatClass>
<PrereqTech>TECH_REPLACEABLE_PARTS</PrereqTech>
<Domain>DOMAIN_LAND</Domain>
<DefaultUnitAI>UNITAI_ATTACK</DefaultUnitAI>
<Description>TXT_KEY_UNIT_CL_UC_GUERRILLERO</Description>
<Civilopedia>TXT_KEY_CIV5_CL_UC_GUERRILLERO_TEXT</Civilopedia>
<Strategy>TXT_KEY_UNIT_CL_UC_GUERRILLERO_STRATEGY</Strategy>
<Help>TXT_KEY_UNIT_HELP_CL_UC_GUERRILLERO</Help>
<MilitarySupport>true</MilitarySupport>
<MilitaryProduction>true</MilitaryProduction>
<Pillage>true</Pillage>
<ObsoleteTech>TECH_RADAR</ObsoleteTech>
<GoodyHutUpgradeUnitClass>UNITCLASS_PARATROOPER</GoodyHutUpgradeUnitClass>
<AdvancedStartCost>10</AdvancedStartCost>
<XPValueAttack>3</XPValueAttack>
<XPValueDefense>3</XPValueDefense>
<Conscription>1</Conscription>
<UnitArtInfo>ART_DEF_UNIT_CL_GREENBERET</UnitArtInfo>
<UnitFlagIconOffset>0</UnitFlagIconOffset>
<IconAtlas>CL_UC_CUBA_COLOR_ATLAS</IconAtlas>
<PortraitIndex>2</PortraitIndex>
<UnitFlagAtlas>CL_UC_GUERRILLERO_FLAG_ATLAS</UnitFlagAtlas>
<WorkRate>100</WorkRate>
</Row>
</Units>

-<Unit_ClassUpgrades>
-<Row>
<UnitType>UNIT_CL_UC_GUERRILLERO</UnitType>
<UnitClassType>UNITCLASS_PARATROOPER</UnitClassType>
</Row>
</Unit_ClassUpgrades>

-<Unit_Flavors>
-<Row>
<UnitType>UNIT_CL_UC_GUERRILLERO</UnitType>
<FlavorType>FLAVOR_OFFENSE</FlavorType>
<Flavor>25</Flavor>
</Row>
-<Row>
<UnitType>UNIT_CL_UC_GUERRILLERO</UnitType>

<FlavorType>FLAVOR_DEFENSE</FlavorType>

<Flavor>10</Flavor>

</Row>

</Unit_Flavors>

</GameData>
 
If you are not finding TECH_MOBILE_TACTICS then you are looking in the Vanilla files and not the G&K/BNW folders.

[.code] and [./code] (without the period signs) wraps a collection of text with a code-block and preserves the original spacing and indents. Like this:
Code:
<GameData>
	<Buildings>
		<Update>
			<Where Type="BUILDING_CARAVANSARY"/>
			<Set>
				<TradeRouteLandDistanceModifier>100</TradeRouteLandDistanceModifier>
			</Set>
		</Update>
	</Buildings>
     ...etc...
 
Back
Top Bottom