(HELP REQUEST) Adding a Unique Improvement to a Mod Civ

HewlHotler

Chieftain
Joined
May 17, 2016
Messages
6
Hello Civfanatics!

I've been a bit of a lurker for some time but I've decided to get my feet wet.

I've got a bit of a specific issue that would be great if someone could offer me some guidance on.

It involves two mods:

Colonialist Legacies' Mexico:
https://steamcommunity.com/sharedfiles/filedetails/?id=226712279

Leugi's Gran Colombia:
https://steamcommunity.com/sharedfiles/filedetails/?id=161615476

This has been a bit of a personal project but I've run into a wall. I've become really interested in Latin American history over the last few years, and I've just been trying to add the Mexico UI (Hacienda) into the Gran Colombia civ.

I've tried doing this by transferring the necessary Art, XML, SQL, and LUA files into the Gran Colombia folder and then transferring all the Hacienda references from the Mexico MODINFO file into the Colombia MODINFO file.

However - this basically makes the tech tree unusable when I attempt to do this.

Is there anyway someone could offer me some guidance/insight/help on transferring this improvement into the Gran Colombia civ? Not trying to create my own mod, this is just a personal project on trying to immerse myself into a nice game as Colombia (I'd like to imagine Pablo Escobar being in one of those Haciendas). I ask this with all required respect and due diligence to the original creators of these two mods.

Thanks for any help in advance,
~Hewl
 
Lurker here too. I mess with and combine civs all the time, mostly because I really like mikeburnfire's 3rd & 4th Unique Component projects but also really like all the mod civs out there that only get 2 unique components. So I'll graft, say, the uniques from one person's Bulgaria to another (there are like 5+ Bulgaria civs on here--I don't need that many when I don't play scenarios for specific timeframes). I never moved CL's Mexico and its hacienda to another civ though--I added another Mexico's stuff to CL's Mexico.


I don't know about the specific problem you've got, but I'll give you a sort of checklist I go through:

Spoiler :

I. Units

A. XML or SQL entries (they're laid out differently but ultimately do the same thing)

1. <Units>, straight copy

2. <Unit_AITypes>, straight copy

3. <Unit_ClassUpgrades>, "

4. <Unit_Flavors>, "

5. <UnitGameplay2DScripts>, "

6. <Language_en_US>, ", whichever ones have to do with the unit or its promotions

7. <Unit_FreePromotions>, straight copy if even present

8. <UnitPromotions>, ", and if it references a civ change to the new one

9. <UnitPromotions_UnitCombarts>, "

10. basically anything about units

11. <IconTextureAtlases>, Whichever atlases are referenced in <Units>, of all sizes

12. <Civilization_UnitClassOverrides>, change the <CivilizationType> to new parent

13. <ArtDefine_UnitInfos>, <ArtDefine_UnitInfoMemberInfos>, <ArtDefine_UnitMemberCombats>, <ArtDefine_UnitMemberCombatWeapons>, & <ArtDefine_StrategicView>. Usually these are in a LUA file apart from the rest of the code, grouped with the actual art assets.

B. LUA code. main thing here is to change any references to the old civ to the new parent civ. They'll either be in the lines of code or up at the top being given a shorter name to be used elsewhere (e.g. "local civilizationID = GameInfoTypes["CIVILIZATION_KIEVAN_RUS_MOD"]" so a simple "civilizationID" can be typed every time after instead of the whole thing). You'll find functions related purely to the unique unit you care about in the same file as functions related to the old civ's trait that you don't care about. Just try to cull carefully.

C. Art. Just a straight copy.

1. every .dds, .fxsxml, and .gr2 file you find in the folder for the unit

2. every .dds file you find referenced in the relevant <IconTextureAtlases> and <ArtDefine_StrategicView>


II. Buildings

A. XML or SQL entries

1. <Buildings>, and everything else that says building in the columns, copy like units

2. <Language_en_US> and <IconTextureAtlases>, same as with units, and sometimes the latter is shared between units and buildings.

3. <Civilization_BuildingClassOverrides>, crucial to change the <CivilizationType>

B. LUA, same as units

C. Art, same as units except you only have to worry about the .dds files from the <IconTextureAtlases>


III. Improvements

A. XML or SQL

1. <Improvements>, change the <CivilizationType>

2. everything else that says Improvement, straight copy

3. <ArtDefine_Landmarks>, copy and it's fine if it's already in a separate SQL even if everything else is XML

4. <Builds> & <BuildFeatures>

5. <Language_en_US> & <IconTextureAtlases> straight copy & consolidate with the ones from buildings and units if you want

6. <Unit_Builds> copy. Usually references workers. if it references a special worker type (whether overt or shown in-game as a regular worker) or if the parent civ has a UI that reference a special worker type, make sure they jibe. For example, I had a hell of a time combining Brunei and Malaysia, both of which have UIs, because I didn't realize Malaysia made up a civ-specific worker unit, and in game I could only build one of the two UIs.)

B. LUA

C. Art. same as with units.


IV. Tie it up in the .modinfo file

A. If you're making a modmod, give it a new id up at the top in <Mod>, a new <Name>, etc.

B. If it's a modmod, update <Dependencies> with the mod you're referencing--don't worry about DLC

C. <Files>. Add new lines whether you're making a new modmod or just editing an existing one. I mark import as 0 if it's an .xml or .sql, but I don't really understand what's going on there and just do what I see others do (and there are exceptions I see. JFD's Norway has some .lua files at import=0 and an .xml file at import=1. Also find a free checksum program to give you the right md5 hash--the one I use has a green X for an icon but I forget the name; it might work without that.

D. <Actions><OnModActivated>, I do every .sql & .xml but there are exceptions I don't understand. just do what the mod you're ripping from does.

E. <EntryPoints> for every lua. Just do as it's been done before.




Massive failure is usually related to making typos, forgetting brackets or backslashes, or forgetting to change the <CivilizationType> referenced at various points. If your unit shows up but he looks like a spearman, something went wrong loading the model. Blank icons, obvious icon either in a bad reference in the <IconTextureAtlases>, the relevant parts of <Units>, <Buildings>, or <Improvements> not referencing that that atlas correctly, or the .modinfo file not referencing the file with the <IconTextureAtlas> correctly. It's tempting to just throw all the relevant XML stuff into one new .xml file, but keep it as you found it and just delete the irrelevant stuff; if you have multiple and you bork one by forgetting a tag or something, it's easier to figure out that way. There are probably some programs that can tell you where you make code-breaking mistakes, but I don't use any.
 
transferring all the Hacienda references from the Mexico MODINFO file into the Colombia MODINFO file
Anything of this ilk - any manual modification to the .modinfo - is just asking for trouble. (Not from us, I mean - from the game) It's not that it can't be done, although I say that much in the same way that you might say "it's not that it can't be done" about cutting a wire to defuse a bomb, if you catch my drift.
Especially if you don't change those references to reflect the actual mod the game will try to load.

But, as of now, we're just throwing out guesses. See #2 below:

  1. In your original post you should try to be as specific as you can as to what your problem is, so far as you are able to understand what has gone wrong with your mod. Many times, however, what the novice modder thinks the problem is and what the problem actually is are two different things. Which is why, at a minimum, you need to adhere to #2 and #3 in this list of what you should do when starting a thread to ask for help.
  2. In your original post, attach a zipped-up copy of the built version of your mod. See this tutorial for how to add the attachment, and what is meant by the built version of the mod.
  3. Start the thread in the main Creation & Customization forum. DO NOT start your thread in any of the sub-forums: Civ5 - Modding Tutorials & Reference, Civ5 - Modpacks, Civ5 - Mod Components , Civ5 - Graphics modpacks, Civ5 - Unit Graphics, Civ5 - New Civilizations, Civ5 - Scenarios, Civ5 - Custom maps, Civ5 - Map Scripts, Civ5 - Utility Programs, Civ5 - Project & Mod Development (or any of its sub-forums). You should avoid posting your question in the Civ5 - SDK / LUA sub-forum unless you are certain you have a question directly related to creating C++/lua programs.
Return to the list of Internal Navigation Links

link to thread
 
SUPER BUMP

My apologies for not responding. I experienced a major hardware crash over the Summer and I've actually just managed to get my PC back working again.

I've tried as you both have suggested, but to no avail. I've attached my current broken mod in this reply via google drive. Would anyone mind having a look and seeing what I've managed to do entirely wrong?

I've never done this before, but I'd really like to have a successful version. I play with the 3rd and 4th Unique Component mods with friends on hotseat, and I'd really like to be able to use Colombia with the added uniques from Mexico.

I thank you both for the help, would it be possible for you or anyone else to take a look at my garbage mod edit and help me out?

Thanks,
Hewl

LINK: https://drive.google.com/open?id=0B5_HcaVn9QYsRU5lTVVodktXYWM
 
Back
Top Bottom