Getting a vanilla re-skin mod working

Kahotep

Warlord
Joined
Sep 27, 2009
Messages
147
Location
Fallbrook, CA
So I'm in the process of creating a mod that re-skins the Egyptian War Chariot unit. I've already taken care of the .dds, .gr2, and .fxsxml portions, but I am almost completely clueless with regards to the XML part. Just how do you create an XML file that replaces the unit's vanilla texture with your own?

These are the contents of my EgyptianWarChariot.XML, the XML file I am currently using for the mod (needless to say it has not affected the unit one bit when I test the mod):
Code:
<GameData>
  <ArtDefine_UnitMemberInfos>
	  <Update>
		  <Where Type="ART_DEF_UNIT_MEMBER_U_EGYPTIAN_WARCHARIOT" />
		  <Set>
			 <Model>U_Egyptian_WarChariot_Reskinned.fxsxml</Model>
		  </Set>
	  </Update>
  </ArtDefine_UnitMemberInfos>
</GameData>

Moderator Action: Moved to main C&C forum.
 
First, wrong forum. You want this in the main Creation & Customization forum; I've alerted the mods to move it.

As for your mod, it should work, actually, based on your description. You didn't do one or more of the following steps:
  • Set your XML to OnModActivated > UpdateDatabase in the Actions tab of the mod's properties
  • Check the Reload Unit System checkbox in the Mod Info tab of the mod's properties
  • Set your .gr2/.fxsxml/.dds files to VFS=true (select the files in the Solution Explorer pane, right-click, and choose Properties)
  • Edit the .gr2 with ModBuddy to change the referenced texture
 
As for your mod, it should work, actually, based on your description. You didn't do one or more of the following steps:
  • Set your XML to OnModActivated > UpdateDatabase in the Actions tab of the mod's properties
  • Check the Reload Unit System checkbox in the Mod Info tab of the mod's properties
  • Set your .gr2/.fxsxml/.dds files to VFS=true (select the files in the Solution Explorer pane, right-click, and choose Properties)
  • Edit the .gr2 with ModBuddy to change the referenced texture
Thanks for the suggestions (and apologies for submitting this thread in the wrong forum), but even when I take all those steps, the mod still doesn't work. I still think there is something off with my XML file. Either that or the mod's internal organization:

sugYKgI.png
 
Your XML is fine. I'm telling you, one of the above steps is still wrong. The folder structure and the naming of the files (unless you're trying to replace a file from the base game) doesn't matter.

Why don't you attach the .civ5mod from the Packages folder of your ModBuddy project; alternatively, zip up the built copy from your Mods folder and attach that.
 
Works just fine for me.

As far as file naming, you changed the database reference to a file, you didn't replace the file itself.
 

Attachments

  • warchariot_darker.png
    warchariot_darker.png
    256.6 KB · Views: 49
Works just fine for me.

As far as file naming, you changed the database reference to a file, you didn't replace the file itself.

I just tried it again and it works for me too.

When previously testing the mod, I loaded a game session I had saved earlier (i.e. before installing the mod), and it didn't seem to work then. However, when starting a totally new game with the mod activated, it works.
 
Back
Top Bottom