Hey
@iieeann, I am looking to do exactly the same thing with Pericles and the Viking longship. Which files did you edit? I have been making a real mess.
That civilization is from base version, from my experience, all the xml files to be edited would be in the expansion1 folder. Do not edit the base file. The only base file that needs to edit is the units.artdef file
The name of the Viking longship in base file is UNIT_NORWEGIAN_LONGSHIP. You cannot use this name again, rename it to something else like UNIT_NORWEGIAN_LONGSHIP2, and this applies to all other places.
Any lines after Name= and Description= can just leave it untouched to save time.
Example:
<Row TraitType="TRAIT_LEADER_UNIT_NORWEGIAN_LONGSHIP" Name="LOC_TRAIT_LEADER_TRAIT_LEADER_UNIT_NORWEGIAN_LONGSHIP_NAME"/>
become
<Row TraitType="TRAIT_LEADER_UNIT_NORWEGIAN_LONGSHIP2" Name="LOC_TRAIT_LEADER_TRAIT_LEADER_UNIT_NORWEGIAN_LONGSHIP_NAME"/>
in Expansion1, files involved are Expansion1_Civilizations.xml (or Expansion1_Leaders.xml), Expansion1_Icons_UnitPortraits.xml, Expansion1_Icons_Units.xml, Expansion1_Moments.xml, Expansion1_Units.xml.
I noticed this unique unit is not under civilization trait but under leader trait. You can copy lines from Leaders.xml anything about longship to Expansion1_Leaders.xml. just remember to rename to longship2. For me i would put it under civilization trait.
Under Expansion1_Icons_UnitPortraits.xml, copy exactly any line about longship from base file UnitPortraits.xml (under icon folder). rename to longship2.
Do the same for Expansion1_Icons_Units.xml.
In Expansion1_Moments.xml, the line about longship already exists, so just copy another line and rename to longship2.
In Expansion1_Units.xml, copy any line from base file Units.xml about longship, rename to longship2.
Under the line
Code:
<Row UnitType="UNIT_NORWEGIAN_LONGSHIP" Cost="65" Maintenance="1" BaseMoves="3" BaseSightRange="2" ZoneOfControl="true" Domain="DOMAIN_SEA" Combat="30" FormationClass="FORMATION_CLASS_NAVAL" PromotionClass="PROMOTION_CLASS_NAVAL_MELEE" AdvisorType="ADVISOR_CONQUEST" Name="LOC_UNIT_NORWEGIAN_LONGSHIP_NAME" Description="LOC_UNIT_NORWEGIAN_LONGSHIP_DESCRIPTION" PurchaseYield="YIELD_GOLD" MandatoryObsoleteTech="TECH_ELECTRICITY" TraitType="TRAIT_LEADER_UNIT_NORWEGIAN_LONGSHIP" PrereqTech="TECH_SAILING"/>
besides renaming to longship2, you can change the parameters as you like, make it move further, hit harder, obtain earlier, etc. the Name="LOC_UNIT_NORWEGIAN_LONGSHIP_NAME" you may just leave it or rename it to something you like, i.e. Name="Longer Ship", then in the game unit will be called Longer Ship when you build it or select it. I don't see the reason to edit Description="bla bla" part just leave it alone. REMEMBER to edit the last part, TraitType= to longship2.
Furthermore, if you want to make the unit even more powerful with special abilities, you may just copy other unit class ability into this unit. i.e. under TypeTags,
<Row Type="UNIT_NORWEGIAN_LONGSHIP2" Tag="CLASS_CAPTURE_SHIPS"/> This will give your unit the English Seadog ability to capture ships
<Row Type="UNIT_NORWEGIAN_LONGSHIP2" Tag="CLASS_CREE_OKIHTCITAW"/> Your new unit will get 1 free promotion after built or upgraded from earlier generation, from Okihtcitaw ability
<Row Type="UNIT_NORWEGIAN_LONGSHIP2" Tag="CLASS_ZULU_IMPI"/> Your unit gain faster XP in combat, from Impi ability
You can also instead make the longship a more advanced unit to replace Caravel or Iconclad by editing the codes like MandatoryObsoleteTech and PrereqTech from the unit you want to replace, and add additional codes in <UnitUpgrades> and <UnitReplaces> area.
In base file unit.artdef, look for the code family regarding to longship as below, copy paste the whole section inside the same file again (anywhere, better to be just at the bottom of the line you copy from), and rename the <m_Name text="UNIT_NORWEGIAN_LONGSHIP"/> at the bottom to longship2. This will tell the game to use the original Longship 3D graphic as your longship2 unit. Otherwise you may see your unit appearance as basic warrior unit.
Code:
<Element>
<m_Fields>
<m_Values>
<Element class="AssetObjects..ArtDefReferenceValue">
<m_ElementName text="Galley"/>
<m_RootCollectionName text="UnitFormationTypes"/>
<m_ArtDefPath text="Units.artdef"/>
<m_CollectionIsLocked>true</m_CollectionIsLocked>
<m_TemplateName text=""/>
<m_ParamName text="Formation"/>
</Element>
<Element class="AssetObjects..ArtDefReferenceValue">
<m_ElementName text="Galley"/>
<m_RootCollectionName text="UnitCombat"/>
<m_ArtDefPath text="Units.artdef"/>
<m_CollectionIsLocked>true</m_CollectionIsLocked>
<m_TemplateName text="Units"/>
<m_ParamName text="UnitCombat"/>
</Element>
<Element class="AssetObjects..ArtDefReferenceValue">
<m_ElementName text=""/>
<m_RootCollectionName text="UnitFormationTypes"/>
<m_ArtDefPath text="Units.artdef"/>
<m_CollectionIsLocked>true</m_CollectionIsLocked>
<m_TemplateName text=""/>
<m_ParamName text="EscortFormation"/>
</Element>
<Element class="AssetObjects..ArtDefReferenceValue">
<m_ElementName text=""/>
<m_RootCollectionName text="Units"/>
<m_ArtDefPath text="Units.artdef"/>
<m_CollectionIsLocked>true</m_CollectionIsLocked>
<m_TemplateName text=""/>
<m_ParamName text="EmbarkedUnit"/>
</Element>
<Element class="AssetObjects..BoolValue">
<m_bValue>false</m_bValue>
<m_ParamName text="DoNotDisplayCharges"/>
</Element>
<Element class="AssetObjects..ArtDefReferenceValue">
<m_ElementName text=""/>
<m_RootCollectionName text="UnitCulture"/>
<m_ArtDefPath text="Cultures.artdef"/>
<m_CollectionIsLocked>true</m_CollectionIsLocked>
<m_TemplateName text=""/>
<m_ParamName text="Culture"/>
</Element>
<Element class="AssetObjects..ArtDefReferenceValue">
<m_ElementName text=""/>
<m_RootCollectionName text="Era"/>
<m_ArtDefPath text="Eras.artdef"/>
<m_CollectionIsLocked>true</m_CollectionIsLocked>
<m_TemplateName text=""/>
<m_ParamName text="Era"/>
</Element>
<Element class="AssetObjects..ArtDefReferenceValue">
<m_ElementName text=""/>
<m_RootCollectionName text="Units"/>
<m_ArtDefPath text="Units.artdef"/>
<m_CollectionIsLocked>true</m_CollectionIsLocked>
<m_TemplateName text=""/>
<m_ParamName text="ProxyUnit"/>
</Element>
<Element class="AssetObjects..BoolValue">
<m_bValue>false</m_bValue>
<m_ParamName text="PlayDeathOnDestroy"/>
</Element>
<Element class="AssetObjects..IntValue">
<m_nValue>500</m_nValue>
<m_ParamName text="DisplayLevel"/>
</Element>
</m_Values>
</m_Fields>
<m_ChildCollections>
<Element>
<m_CollectionName text="Members"/>
<m_ReplaceMergedCollectionElements>false</m_ReplaceMergedCollectionElements>
<Element>
<m_Fields>
<m_Values>
<Element class="AssetObjects..FloatValue">
<m_fValue>0.760000</m_fValue>
<m_ParamName text="Scale"/>
</Element>
<Element class="AssetObjects..IntValue">
<m_nValue>2</m_nValue>
<m_ParamName text="Count"/>
</Element>
<Element class="AssetObjects..ArtDefReferenceValue">
<m_ElementName text="VikingLongship"/>
<m_RootCollectionName text="UnitMemberTypes"/>
<m_ArtDefPath text="Units.artdef"/>
<m_CollectionIsLocked>true</m_CollectionIsLocked>
<m_TemplateName text="Units"/>
<m_ParamName text="Type"/>
</Element>
</m_Values>
</m_Fields>
<m_ChildCollections/>
<m_Name text="Members1"/>
<m_AppendMergedParameterCollections>false</m_AppendMergedParameterCollections>
</Element>
</Element>
<Element>
<m_CollectionName text="Audio"/>
<m_ReplaceMergedCollectionElements>false</m_ReplaceMergedCollectionElements>
<Element>
<m_Fields>
<m_Values>
<Element class="AssetObjects..StringValue">
<m_Value text="Galley"/>
<m_ParamName text="XrefName"/>
</Element>
</m_Values>
</m_Fields>
<m_ChildCollections/>
<m_Name text="GALLEY"/>
<m_AppendMergedParameterCollections>false</m_AppendMergedParameterCollections>
</Element>
</Element>
</m_ChildCollections>
<m_Name text="UNIT_NORWEGIAN_LONGSHIP"/>
<m_AppendMergedParameterCollections>false</m_AppendMergedParameterCollections>
</Element>
Before you edit the files,
BACKUP first. After you edited the files, make another
BACKUP of edited files in case the new game patch overwrites them.
Notepad++ is a useful tool to edit xml file.
Winmerge is very useful to compare 2 or 3 files (i.e. unedited file vs edited file).
Agent Ransack is useful to search for specific text in files and folder, so you can know the specific codes appear in which file(s) and need to be edited.
Hope this helps, you will feel like eureka after successfully done it.