How to give 2 civs the same unique unit?

Tomice

Passionate Smart-Ass
Joined
Oct 5, 2009
Messages
2,366
Location
Austria, EU, no kangaroos ;)
Hi! I was experimenting with custom civs. I wanted to give Carthage the Jaguar slayer as UU instead of the Colonist (in an attempt to create my dream custom civ).
In Civ5 and 6, the UU was part of the civ ability. It was enough to change an entry and a civ easily had a different UU.

This changed in civ 7!
The unique unit now has an entry for which civ it belongs to.
This can be changed easily, but it's seemingly impossible to have 2 civs with the same UU.
I tried copying the entry for Jaguar Slayer and putting "Carthage" in the second entry, which leads to a crash during game start.
Is there any other way?

I would really appreciate some guidance!
 
The easiest way would be to copy and paste the UU while giving the copy a prefix so the database sees them as two different things, but that's gonna be a lot of files and making sure both copies are the same.

However, there's another way I can think of but I haven't tried this following method but I think it might work.

Make a new TRAIT, say:
<Row Type="TRAIT_JAGUAR_SLAYER" Kind="KIND_TRAIT"/>

Change the TRAIT of the JAGUAR_SLAYER from TRAIT_MAYA to TRAIT_JAGUAR_SLAYER

Add the TRAIT_JAGUAR_SLAYER to CIVILIZATION_MAYA and CIVILIZATION_CARTHAGE
 
This logic is pretty similar to Civ6 if you are familiar with it. But let me explain more:
  1. Unique units, buildings, improvements or whatever are assigned a "TraitType" which marks whoever owns this trait type can have it. Unit example below:
    1741818613194.png
  2. Then when declaring a civ, you need to add traits to this civ under "CivilizationTraits":
    1741818674130.png
So, for same unique assigned to multiple civ, you shall have the unit assigned under a unique trait (just the same way as you mentioned Civ6 did), and assign this unique trait to all the civs you want to have this unique item.
Hope that helps.

Good luck with your creation!
 
Back
Top Bottom