• Civilization 7 has been announced. For more info please check the forum here .

Unique unit mod question

JustNilt

Chieftain
Joined
Apr 4, 2012
Messages
17
I'm playing around with a mod of my own creation where I mix and match from existing civilization and leader abilities to basically make one I enjoy playing. I've been able to give myself other civilizations' unique units here and there, which is quite straightforward. For example, this works quite nicely:

INSERT INTO CivilizationTraits (CivilizationType, TraitType) VALUES ('CIVILIZATION_CREE', 'TRAIT_CIVILIZATION_UNIT_NUBIAN_PITATI');

I was considering adding some of the later unique scout units but since UUs upgrade to a vanilla unit, that's not ideal if I'd like a chain of upgrades such as upgrading my Okihtcitaws into Warakaqs and so on. The method for tinkering with the upgrades appears quite straightforward to me so something along the lines of this seems sensible:

INSERT INTO UnitUpgrades (Unit, UpgradeUnit) VALUES ('UNIT_CREE_OKIHTCITAW', 'UNIT_INCA_WARAKAQ');

My concern here is what would happen if I have the other civilization in the game. Since they'd lack the appropriate traits to grant them the upgrades, my assumption is it would almost certainly cause problems. I was considering making my own traits with the units in them but that doesn't really appear to me to change the issue since the unit applied to the new trait will need to be different in some way. Something like changing it from, say, UNIT_INCA_WARAKAQ to UNIT_CREE_WARAKAQ would be likely to resolve the issue.

This all seems fairly straightforward, really. All I need to do is grab the various bits for each unit and modify them. The main thing with that, though, is I've never played around with anything with the unit models before. That seems fairly straightforward as well except I'm a little concerned about causing crashes by duplicating too much of that. For example, going back to the Pitatis, these seem to set the icons and descriptions:

<PlayerItems> <Row CivilizationType="CIVILIZATION_NUBIA" LeaderType="LEADER_AMANITORE" Type="UNIT_NUBIAN_PITATI" Icon="ICON_UNIT_NUBIAN_PITATI" Name="LOC_UNIT_NUBIAN_PITATI_NAME" Description="LOC_UNIT_NUBIAN_PITATI_DESCRIPTION" SortIndex="10"/> <!-- Expansion 1 Support --> <Row Domain="Players:Expansion1_Players" CivilizationType="CIVILIZATION_NUBIA" LeaderType="LEADER_AMANITORE" Type="UNIT_NUBIAN_PITATI" Icon="ICON_UNIT_NUBIAN_PITATI" Name="LOC_UNIT_NUBIAN_PITATI_NAME" Description="LOC_UNIT_NUBIAN_PITATI_DESCRIPTION" SortIndex="10"/> <!-- Expansion 2 Support --> <Row Domain="Players:Expansion2_Players" CivilizationType="CIVILIZATION_NUBIA" LeaderType="LEADER_AMANITORE" Type="UNIT_NUBIAN_PITATI" Icon="ICON_UNIT_NUBIAN_PITATI" Name="LOC_UNIT_NUBIAN_PITATI_NAME" Description="LOC_UNIT_NUBIAN_PITATI_DESCRIPTION" SortIndex="10"/> </PlayerItems>

If I want to reuse that and just change the references to Nubia to Cree, should that work or will I need to copy those assets somewhere as well? Similarly, I assume I would need to find and modify the appropriate Moments and just copy those over. Just using the Moment_UniqueUnit_Nubia.dds shouldn't cause issues I wouldn't think. What's driving me a bit nutty, however, is I can't figure out how the game applies a model to the units. If that's not able to be duplicated, I'd have to rethink what I'm doing, I suppose.

My main concern here is how much I'd need to actually duplicate in order for that to all work properly while upgrading to the correct other unique units without causing trouble somewhere. I've found quite a lot of discussion on how to add units and looking at other UU mods makes it all fairly clear I haven't found much along these lines elsewhere.

As far as I can gather, the game uses ARTDEF files for this but searching for instances of UNIT_NUBIAN_PITATI in all artdef files in the game directory shows only a single example which doesn't look like much to me. It seems almost as though there are basic Archer units and maybe the models are all the same with different colors applied to them? Honestly, as silly as it is, I don't think I've really noticed that there's a big difference in the models and after playing Civ as long as I have, I mostly only look at the models for the first few weeks then that gets old.

Anyhow, I hope this all makes sense. It got a lot longer than I'd planned and I suspect if I had a better grasp of this, I could have made a much shorter post.
 
Top Bottom