Quick Question, how to copy a unit from a mod?

Underdog Ally

Chieftain
Joined
Feb 22, 2019
Messages
63
*Sorry, I posted this in the wrong forum how do I delete this thread -_-

I am wondering how exactly (or if) I can simply take one unit from a mod and isolate it to put by itself into the game (or actually a mod of the game which just adds a unit). There is a transport helicopter from Neoteric world I want, but I do not like all the other stuff in there, like all the extra technologies. Can I just copy the unit from the art folder and unit.xml then tweak the required tech? Am I missing some key concepts here ?

Brand new to modding and Civfanatics, I’ve read some tutorials but I’m not very intuitive to this sort of thing so thanks for any assistance !!
 
A unit consist of xml entries in 3 files:

  • art\CIV4ArtDefines_Unit.xml
  • units\CIV4UnitInfos.xml
  • units\CIV4UnitClassInfos.xml
In theory it should work if you copy the unit from those 3. In reality a modded DLL file can change the xml layout, in which case it becomes more complex, but for a start let's assume that's not the case.

You also need to copy the media files for the unit in question. They consist of the entry in the art file and Button in UnitInfos.

I think that covers it. The next question is how to add it to a new mod. Maybe the easiest option is to make a module where you simply copy the 3 files in question and then delete all the entries you don't want to copy. This approach has the benefit of working repeatably meaning if you want one unit from 3 mods (3 in total), if you figure out how to turn one into a module, then you can figure out how make one mod with 3 modules.

I wouldn't recommend making a mod with just one unit. You shouldn't start with vanilla. Instead install K-mod and use that as a base for your new mod. You do want the optimization and bugfixes it provides.
 
Thank you so much. Follow up question, If I copy the 3 XML documents, and the art folder of the unit, can I add these to a new mod just as an add-on, or does the mod folder need to contain everything in the base/original assets folder, with the new items pasted in? does that make sense. I also realize i could do it in custom assets folder as well from what i read
 
Last edited:
Moderator Action: Moved the thread to the general Creation & Customization forum. The Tutorials forum is only for complete tutorials, not open questions and asks for help.

To answer your question, you do not have to copy all files in the Assets folder into your mod. When you start a mod, it will use the files from the mod, and if they don't exist there, use the default files from BtS instead. So it is sufficient to only copy the files into the mod that you want to edit.
 
Back
Top Bottom