<update> tag doesn't work for vanilla Units.

You may want to delete everything in your "..\Documents\My Games\Sid Meier's Civilization 5\cache" directory.

On your actions tab if you use the following it won't work:

Code:
  <Actions>
    <OnModActivated>
      <UpdateDatabase>XML\Units\UnitTweaks.xml</UpdateDatabase>
    </OnModActivated>
  </Actions>

It must be:

Code:
  <Actions>
    <OnModActivated>
      <UpdateDatabase>XML/Units/UnitTweaks.xml</UpdateDatabase>
    </OnModActivated>
  </Actions>

I've attached a test project which reduces warrior movement to 1. You can load it with ModBuddy.
 

Attachments

Some say forward slah, others say back slash... :crazyeye:

Thank you Thalassicus, yours works. Only one diffrence between the test mod and my mod is the test mod XML file is not in a folder. Putting the XML file outside of folders didn't work... BUT...

You may want to delete everything in your "..\Documents\My Games\Sid Meier's Civilization 5\cache" directory.

:bowdown:This works.:bowdown:

Now after a week of pulling my hair out, I'm going to get to work. Thank you everyone.
 
You may want to delete everything in your "..\Documents\My Games\Sid Meier's Civilization 5\cache" directory.

On your actions tab if you use the following it won't work:

Code:
  <Actions>
    <OnModActivated>
      <UpdateDatabase>XML\Units\UnitTweaks.xml</UpdateDatabase>
    </OnModActivated>
  </Actions>

It must be:

Code:
  <Actions>
    <OnModActivated>
      <UpdateDatabase>XML/Units/UnitTweaks.xml</UpdateDatabase>
    </OnModActivated>
  </Actions>

I've attached a test project which reduces warrior movement to 1. You can load it with ModBuddy.

Backslashes work for me. ;)
 
ok well, I thought I had it fixed by deleting the contents out of the cache folder and it did work, but after I moded in a few more units. Deleting the cache contents doesn&#8217;t help anymore, neither does cleaning and rebuilding the mod solution.

If anyone is Interested in taking a look, here it is.

XML
Spoiler :

<?xml version="1.0" encoding="utf-8"?>
<!-- Created by ModBuddy on 9/29/2010 6:30:43 PM -->
<GameData>
<Units>
<Update>
<Set Moves="4" />
<Where Type="UNIT_SCIENTIST" />
</Update>
<Update>
<Set Moves="4" />
<Where Type="UNIT_ARTIST" />
</Update>
<Update>
<Set Moves="4" />
<Where Type="UNIT_MERCHANT" />
</Update>
<Update>
<Set Moves="4" />
<Where Type="UNIT_ENGINEER" />
</Update>
<Update>
<Set Moves="4" />
<Where Type="UNIT_GREAT_GENERAL" />
</Update>
<Update>
<Set RangedCombat="60" />
<Where Type="UNIT_MISSILE_CRUISER" />
</Update>
<Update>
<Set Range="6" />
<Where Type="UNIT_MISSILE_CRUISER" />
</Update>
<Update>
<Set Cost="840" />
<Where Type="UNIT_MISSILE_CRUISER" />
</Update>
<Update>
<Set Combat="50" />
<Where Type="UNIT_NUCLEAR_SUBMARINE" />
</Update>
<Update>
<Set Cost="675" />
<Where Type="UNIT_NUCLEAR_SUBMARINE" />
</Update>
<Update>
<Set Move="5" />
<Where Type="UNIT_NUCLEAR_SUBMARINE" />
</Update>
<Update>
<Set Range="4" />
<Where Type="UNIT_NUCLEAR_SUBMARINE" />
</Update>
<Update>
<Set Cost="650" />
<Where Type="UNIT_CARRIER" />
</Update>
<Update>
<Set Combat="75" />
<Where Type="UNIT_BATTLESHIP" />
</Update>
<Update>
<Set Cost="680" />
<Where Type="UNIT_BATTLESHIP" />
</Update>
<Update>
<Set Range="2" />
<Where Type="UNIT_BATTLESHIP" />
</Update>
<Update>
<Set RangedCombat="50" />
<Where Type="UNIT_BATTLESHIP" />
</Update>
<Update>
<Set Range="2" />
<Where Type="UNIT_SUBMARINE" />
</Update>
<Update>
<Set Combat="50" />
<Where Type="UNIT_DESTROYER" />
</Update>
<Update>
<Set RangedCombat="35" />
<Where Type="UNIT_DESTROYER" />
</Update>
<Update>
<Set Cost="420" />
<Where Type="UNIT_DESTROYER" />
</Update>
<Update>
<Set Moves="6" />
<Where Type="UNIT_DESTROYER" />
</Update>
<Update>
<Set RangedCombat="20" />
<Where Type="UNIT_IRONCLAD" />
</Update>
<Update>
<Set Moves="3" />
<Where Type="UNIT_IRONCLAD" />
</Update>
<Update>
<Set Moves="4" />
<Where Type="UNIT_FRIGATE" />
</Update>
<Update>
<Set RangedCombat="20" />
<Where Type="UNIT_ENGLISH_SHIPOFTHELINE" />
</Update>
<Update>
<Set Moves="5" />
<Where Type="UNIT_CARAVEL" />
</Update>
<Update>
<Set Range="1" />
<Where Type="UNIT_CARVAEL" />
</Update>
<Update>
<Set Moves="2" />
<Where Type="UNIT_TRIREME" />
</Update>
<Update>
<Set Range="1" />
<Where Type="UNIT_TRIREME" />
</Update>
<Update>
<Set RangedCombat="100" />
<Where Type="UNIT_STEALTH_BOMBER" />
</Update>
<Update>
<Set Range="40" />
<Where Type="UNIT_STEALTH_BOMBER" />
</Update>
<Update>
<Set Range="20" />
<Where Type="UNIT_JET_FIGHTER" />
</Update>
<Update>
<Set RangedCombat="100" />
<Where Type="UNIT_GUIDED_MISSILE" />
</Update>
<Update>
<Set Cost="720" />
<Where Type="UNIT_GUIDED_MISSILE" />
</Update>
<Update>
<Set Range="12" />
<Where Type="UNIT_GUIDED_MISSILE" />
</Update>
<Row>
<Set RangedCombat="40" />
<Where Type="MODERN_ARMOR" />
</Row>
<Row>
<Set Range="2" />
<Where Type="MODERN_ARMOR" />
</Row>
<Update>
<Set Moves="3" />
<Where Type="MODERN_ARMOR" />
</Update>
<Row>
<Set RangedCombat="60" />
<Where Type="UNIT_HELICOPTER_GUNSHIP" />
</Row>
<Row>
<Set Range="4" />
<Where Type="UNIT_HELICOPTER_GUNSHIP" />
</Row>
<Update>
<Set Cost="650" />
<Where Type="UNIT_HELICOPTER_GUNSHIP" />
</Update>
<Update>
<Set Range="6" />
<Where Type="UNIT_MOBILE_SAM" />
</Update>
<Update>
<Set Cost="520" />
<Where Type="UNIT_MOBILE_SAM" />
</Update>
<Update>
<Set Moves="3" />
<Where Type="UNIT_MOBILE_SAM" />
</Update>
<Update>
<Set Range="6" />
<Where Type="UNIT_MOBILE_SAM" />
</Update>
<Update>
<Set Combat="10" />
<Where Type="UNIT_ROCKET_ARTILLERY" />
</Update>
<Update>
<Set RangedCombat="80" />
<Where Type="UNIT_ROCKET_ARTILLERY" />
</Update>
<Update>
<Set Cost="890" />
<Where Type="UNIT_ROCKET_ARTILLERY" />
</Update>
<Update>
<Set Range="6" />
<Where Type="UNIT_ROCKET_ARTILLERY" />
</Update>
<Row>
<Set RangedCombat="30" />
<Where Type="UNIT_MECHANIZED_INFANTRY" />
</Row>
<Row>
<Set Range="1" />
<Where Type="UNIT_MECHANIZED_INFANTRY" />
</Row>
<Update>
<Set Range="15" />
<Where Type="UNIT_BOMBER" />
</Update>
<Update>
<Set Range="15" />
<Where Type="UNIT_AMERICAN_B17" />
</Update>
<Update>
<Set RangeCombat="70" />
<Where Type="UNIT_AMERICAN_B17" />
</Update>
<Update>
<Set Range="10" />
<Where Type="UNIT_FIGHTER" />
</Update>
<Update>
<Set Range="10" />
<Where Type="UNIT_JAPANESE_ZERO" />
</Update>
<Update>
<Set RangeCombat="60" />
<Where Type="UNIT_JAPANESE_ZERO" />
</Update>
<Update>
<Set Combat="45" />
<Where Type="UNIT_PARATROOPER" />
</Update>
<Row>
<Set RangedCombat="25" />
<Where Type="UNIT_PARATROOPER" />
</Row>
<Row>
<Set Range="1" />
<Where Type="UNIT_PARATROOPER" />
</Row>
<Update>
<Set Combat="65" />
<Where Type="UNIT_TANK" />
</Update>
<Row>
<Set RangedCombat="30" />
<Where Type="UNIT_TANK" />
</Row>
<Row>
<Set Range="2" />
<Where Type="UNIT_TANK" />
</Row>
<Update>
<Set Combat="65" />
<Where Type="UNIT_GERMAN_PANZER" />
</Update>
<Row>
<Set RangedCombat="35" />
<Where Type="UNIT_GERMAN_PANZER" />
</Row>
<Row>
<Set Range="2" />
<Where Type="UNIT_GERMAN_PANZER" />
</Row>
<Update>
<Set Moves="5" />
<Where Type="UNIT_GERMAN_PANZER" />
</Update>
<Update>
<Set Cost="500" />
<Where Type="UNIT_GERMAN_PANZER" />
</Update>
<Update>
<Set Combat="12" />
<Where Type="UNIT_ARTILLERY" />
</Update>
<Update>
<Set RangedCombat="60" />
<Where Type="UNIT_ARTILLERY" />
</Update>
<Update>
<Set Range="3" />
<Where Type="UNIT_ARTILLERY" />
</Update>
<Update>
<Set Move="1" />
<Where Type="UNIT_ARTILLERY" />
</Update>
<Update>
<Set Combat="26" />
<Where Type="UNIT_ANTI_AIRCRAFT_GUN" />
</Update>
<Update>
<Set Move="1" />
<Where Type="UNIT_ANTI_AIRCRAFT_GUN" />
</Update>
<Update>
<Set Range="3" />
<Where Type="UNIT_ANTI_AIRCRAFT_GUN" />
</Update>
<Update>
<Set Combat="40" />
<Where Type="UNIT_ANTI_TANK_GUN" />
</Update>
<Row>
<Set RangedCombat="30" />
<Where Type="UNIT_ANTI_TANK_GUN" />
</Row>
<Row>
<Set Range="2" />
<Where Type="UNIT_ANTI_TANK_GUN" />
</Row>
<Update>
<Set Moves="1" />
<Where Type="UNIT_ANTI_TANK_GUN" />
</Update>
<Update>
<Set Combat="42" />
<Where Type="UNIT_INFANTRY" />
</Update>
<Row>
<Set RangedCombat="20" />
<Where Type="UNIT_INFANTRY" />
</Row>
<Row>
<Set Range="1" />
<Where Type="UNIT_INFANTRY" />
</Row>
<Update>
<Set Combat="42" />
<Where Type="UNIT_FRENCH_FOREIGNLEGION" />
</Update>
<Row>
<Set RangedCombat="22" />
<Where Type="UNIT_FRENCH_FOREIGNLEGION" />
</Row>
<Row>
<Set Range="1" />
<Where Type="UNIT_FRENCH_FOREIGNLEGION" />
</Row>
<Update>
<Set Cost="260" />
<Where Type="UNIT_FRENCH_FOREIGNLEGION" />
</Update>
<Update>
<Set Combat="30" />
<Where Type="UNIT_CAVALRY" />
</Update>
<Row>
<Set RangedCombat="20" />
<Where Type="UNIT_CAVALRY" />
</Row>
<Row>
<Set Range="1" />
<Where Type="UNIT_CAVALRY" />
</Row>
<Update>
<Set Combat="32" />
<Where Type="UNIT_RUSSIAN_COSSACK" />
</Update>
<Row>
<Set RangedCombat="20" />
<Where Type="UNIT_RUSSIAN_COSSACK" />
</Row>
<Row>
<Set Range="1" />
<Where Type="UNIT_RUSSIAN_COSSACK" />
</Row>
<Update>
<Set Cost="240" />
<Where Type="UNIT_RUSSIAN_COSSACK" />
</Update>
<Row>
<Set RangedCombat="16" />
<Where Type="UNIT_RIFLEMAN" />
</Row>
<Row>
<Set Range="1" />
<Where Type="UNIT_RIFLEMAN" />
</Row>
<Update>
<Set Combat="20" />
<Where Type="UNIT_LANCER" />
</Update>
<Update>
<Set Cost="180" />
<Where Type="UNIT_LANCER" />
</Update>
<Update>
<Set Cost="170" />
<Where Type="UNIT_OTTOMAN_SIPAHI" />
</Update>
<Update>
<Set Move="4" />
<Where Type="UNIT_OTTOMAN_SIPAHI" />
</Update>
<Update>
<Set Move="1" />
<Where Type="UNIT_CANNON" />
</Update>
<Update>
<Set RangedCombat="30" />
<Where Type="UNIT_CANNON" />
</Update>
<Row>
<Set RangedCombat="12" />
<Where Type="UNIT_MUSKETMAN" />
</Row>
<Row>
<Set Range="1" />
<Where Type="UNIT_MUSKETMAN" />
</Row>
<Row>
<Set Range="1" />
<Where Type="UNIT_AMERICAN_MINUTEMAN" />
</Row>
<Update>
<Set Combat="20" />
<Where Type="UNIT_AMERICAN_MINUTEMAN" />
</Update>
<Row>
<Set RangeCombat="12" />
<Where Type="UNIT_AMERICAN_MINUTEMAN" />
</Row>
<Update>
<Set Cost="80" />
<Where Type="UNIT_AMERICAN_MINUTEMAN" />
</Update>
<Row>
<Set Range="1" />
<Where Type="UNIT_FRENCH_MUSKETEER" />
</Row>
<Row>
<Set RangeCombat="12" />
<Where Type="UNIT_FRENCH_MUSKETEER" />
</Row>
<Update>
<Set Cost="100" />
<Where Type="UNIT_FRENCH_MUSKETEER" />
</Update>
<Update>
<Set Combat="20" />
<Where Type="UNIT_OTTOMAN_JANISSARY" />
</Update>
<Row>
<Set RangedCombat="12" />
<Where Type="UNIT_OTTOMAN_JANISSARY" />
</Row>
<Row>
<Set Range="1" />
<Where Type="UNIT_OTTOMAN_JANISSARY" />
</Row>
<Update>
<Set Combat="16" />
<Where Type="UNIT_LONGSWORDSMAN" />
</Update>
<Update>
<Set Cost="180" />
<Where Type="UNIT_JAPANESE_SAMURAI" />
</Update>
<Update>
<Set Combat="4" />
<Where Type="UNIT_TREBUCHET" />
</Update>
<Update>
<Set Move="1" />
<Where Type="UNIT_TREBUCHET" />
</Update>
<Update>
<Set Combat="7" />
<Where Type="UNIT_ARABIAN_CAMELARCHER" />
</Update>
<Update>
<Set Range="1" />
<Where Type="UNIT_ARABIAN_CAMELARCHER" />
</Update>
<Update>
<Set Combat="20" />
<Where Type="UNIT_SIAMESE_WARELEPHANT" />
</Update>
<Update>
<Set Cost="140" />
<Where Type="UNIT_SIAMESE_WARELEPHANT" />
</Update>
<Update>
<Set Cost="120" />
<Where Type="UNIT_SONGHAI_MUSLIMCAVALRY" />
</Update>
<Update>
<Set Combat="4" />
<Where Type="UNIT_CROSSBOWMAN" />
</Update>
<Update>
<Set Range="1" />
<Where Type="UNIT_CROSSBOWMAN" />
</Update>
<Update>
<Set Cost="65" />
<Where Type="UNIT_CROSSBOWMAN" />
</Update>
<Update>
<Set Cost="65" />
<Where Type="UNIT_CHINESE_CHUKONU" />
</Update>
<Update>
<Set Range="1" />
<Where Type="UNIT_CHINESE_CHUKONU" />
</Update>
<Update>
<Set Cost="50" />
<Where Type="UNIT_ENGLISH_LONGBOWMAN" />
</Update>
<Update>
<Set RangedCombat="10" />
<Where Type="UNIT_ENGLISH_LONGBOWMAN" />
</Update>
<Update>
<Set Range="1" />
<Where Type="UNIT_ENGLISH_LONGBOWMAN" />
</Update>
<Update>
<Set Cost="50" />
<Where Type="UNIT_PIKEMAN" />
</Update>
<Update>
<Set Combat="12" />
<Where Type="UNIT_PIKEMAN" />
</Update>
<Update>
<Set Combat="14" />
<Where Type="UNIT_GERMAN_LANDSKNECHT" />
</Update>
<Update>
<Set Cost="50" />
<Where Type="UNIT_GERMAN_LANDSKNECHT" />
</Update>
<Update>
<Set Combat="2" />
<Where Type="UNIT_CATAPULT" />
</Update>
<Update>
<Set Moves="1" />
<Where Type="UNIT_CATAPULT" />
</Update>
<Update>
<Set Range="2" />
<Where Type="UNIT_CATAPULT" />
</Update>
<Update>
<Set Combat="2" />
<Where Type="UNIT_ROMAN_BALLISTA" />
</Update>
<Update>
<Set Moves="1" />
<Where Type="UNIT_ROMAN_BALLISTA" />
</Update>
<Update>
<Set Range="2" />
<Where Type="UNIT_ROMAN_BALLISTA" />
</Update>
<Update>
<Set Cost="40" />
<Where Type="UNIT_HORSEMAN" />
</Update>
<Update>
<Set Moves="40" />
<Where Type="UNIT_GREEK_COMPANIONCAVALRY" />
</Update>
<Update>
<Set Cost="60" />
<Where Type="UNIT_SWORDSMAN" />
</Update>
<Update>
<Set Combat="9" />
<Where Type="UNIT_SWORDSMAN" />
</Update>
<Update>
<Set Cost="80" />
<Where Type="UNIT_IROQUOIAN_MOHAWKWARRIOR" />
</Update>
<Update>
<Set Cost="80" />
<Where Type="UNIT_ROMAN_LEGION" />
</Update>
<Update>
<Set Combat="1" />
<Where Type="UNIT_CHARIOT_ARCHER" />
</Update>
<Update>
<Set Moves="2" />
<Where Type="UNIT_CHARIOT_ARCHER" />
</Update>
<Update>
<Set Range="1" />
<Where Type="UNIT_CHARIOT_ARCHER" />
</Update>
<Update>
<Set Moves="2" />
<Where Type="UNIT_EGYPTIAN_WARCHARIOT" />
</Update>
<Update>
<Set Range="1" />
<Where Type="UNIT_EGYPTIAN_WARCHARIOT" />
</Update>
<Update>
<Set Combat="1" />
<Where Type="UNIT_INDIAN_WARELEPHANT" />
</Update>
<Update>
<Set Moves="2" />
<Where Type="UNIT_INDIAN_WARELEPHANT" />
</Update>
<Update>
<Set Range="1" />
<Where Type="UNIT_INDIAN_WARELEPHANT" />
</Update>
<Update>
<Set Combat="6" />
<Where Type="UNIT_SPEARMAN" />
</Update>
<Update>
<Set Cost="40" />
<Where Type="UNIT_SPEARMAN" />
</Update>
<Update>
<Set Cost="50" />
<Where Type="UNIT_GREEK_HOPLITE" />
</Update>
<Update>
<Set Combat="8" />
<Where Type="UNIT_GREEK_HOPLITE" />
</Update>
<Update>
<Set Cost="40" />
<Where Type="UNIT_PERSIAN_IMMORTAL" />
</Update>
<Update>
<Set Cost="52" />
<Where Type="UNIT_ARCHER" />
</Update>
<Update>
<Set Range="1" />
<Where Type="UNIT_ARCHER" />
</Update>
<Update>
<Set Moves="1" />
<Where Type="UNIT_WARRIOR" />
</Update>
<Row>
<Set Range="1" />
<Where Type="UNIT_WARRIOR" />
</Row>
<Row>
<Set RangedCombat="1" />
<Where Type="UNIT_WARRIOR" />
</Row>
</Units>
</GameData>


modinfo
Spoiler :

<?xml version="1.0" encoding="utf-8"?>
<Mod id="0b3489af-b10a-4bb7-a8cc-99726e5084d3" version="1">
<Properties>
<Name>Unit Tweaks</Name>
<Stability>Experimental</Stability>
<Description>This mod will tweak various game units, such as the amount of spaces a unit can move, changes range a unit can bombard and incudes bombard ability for gunpowder units.</Description>
<Authors>CrazyAce</Authors>
<SpecialThanks>Kael, Dale, Firaxis, 2KGames and Civfanatics.com</SpecialThanks>
<AffectsSavedGames>0</AffectsSavedGames>
<SupportsSinglePlayer>1</SupportsSinglePlayer>
<SupportsMultiplayer>1</SupportsMultiplayer>
<SupportsMac>1</SupportsMac>
<ReloadLandmarkSystem>0</ReloadLandmarkSystem>
<ReloadUnitSystem>0</ReloadUnitSystem>
</Properties>
<Dependencies />
<References />
<Blocks />
<Files>
<File md5="D00FF74B6282286E4B0C90AAA371D5A6">XML/Units/UnitTweaks.xml</File>
</Files>
<Actions>
<OnModActivated>
<UpdateDatabase>XML/Units/UnitTweaks.xml</UpdateDatabase>
</OnModActivated>
</Actions>
</Mod>


I first started out with all <update> instead of using <Row>, neither would work and to make things quick, I edited the Warrior as a test dummy. I'm exhausted now... I think it&#8217;s time for sleep; I&#8217;ve been working on this all hours of the day, all week. :sleep:

:edi:
Forward or backward slashes results in the same failure.
 
Did it work when you tested the warrior test-dummy changes?
Here was my "test tweak" to the warrior unit:

Code:
<GameData>
	<Units>
		<Update>
			<Set Combat="60"/>
			<Where Type="UNIT_WARRIOR"/>
		</Update>
	</Units>
</GameData>

This works for me. Does it work for you?
 
Hi everyone, I'm new here, thought I'd register cause I'm already having some trouble to mod.


I thought I'd add my problem in CrazyAce's thread cause I'm having king of the same problem as his : some really minor tweaks that SHOULD work but don't want to.
Perhaps I've been too fast and didn't see some things to do before beginning to mod... I don't know, but I began by Kael's "hide unit icon" example, and spotted a problem when the game never wanted to print the right text instead of "TXT_KEY_MAP_OPTIONS_HIDE_UNIT_ICON" il the little menu.

This mornig I thought I'll go easy and just try to change one of the existing option text there (the grid one). So I changed the string reference to whatever, created the whatever text as such :
Code:
<GameData>
	<Language_FR_FR>
		<Row Tag="TXT_KEY_MAP_OPTIONS_JEP">
			<Text>Grouille</Text>
		</Row>
	</Language_FR_FR>
</GameData>
(I'm french so yeah... and I've even copied and pasted the code from an existing file, just in case...)

That didn't work. I tried then to update an existing text, to see. Using CIV5ModdingText.XML, I decided to first change the grid text in the menu to the "back" one in the XML (that worked), and then to try to update the "back" text to something of my own, like that :

Code:
<GameData>
  <Language_FR_FR>
	<Update>
		<Where Tag="TXT_KEY_MODDING_BACK"/>
		<Set Text="Grouille"/>
	</Update>
  </Language_FR_FR>
</GameData>

And that don't get me nothing, it's still written "back" in the menu, like I've done nothing.

It's has if the menu XML is used, but no one of both text XML I've created.


I hope I'm not hijacking CrazyAce's thread for a different problem, if I'm mistaken, don't bother and separate my post. Thanks !


edit : I forgot to tell, deleting the cache didn't work for me.
 
Back
Top Bottom