Millennia Mods?

Bonyduck Campersang

Odd lookin duck
Joined
Dec 11, 2022
Messages
4,635
I've made a bunch of custom nation mods that I want to upload (not on Steam). Could a resources category for Millennia be made? @moderators?
 
Sort of invading your post, but I do not believe it's interesting enough question for its own thread - did they make it possible to mod the starting traits? I waited whole year for modding and once released they didn't seem to have included it. Has the state of modding been updated in the meantime?
 
Anyone here familiar with XML modding? I've got some questions I'm not getting an answer to in the Paradox forums
 
Conceptually, at least to some extent. For Millennia specifically, though, I am not. Civ IV used XML for some of its modding (along with Python and C++), so most people who have modded for IV would be at least somewhat familiar with XML modding.
 
I want to make some changes to the vanilla game but I am unsure how to do so. For a start, I want to change the flags of some of the nations.

There is a mod in the Steam Workshop which does something similar: it changes the in-game names of some of the nations. It is structured thus: ModFolder -> Strings -> RenamedNations.xml . This is the entire code:
XML:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<GameStrings xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <Entry>
        <Key>NationName-america</Key>
        <Value><![CDATA[America]]></Value>
    </Entry>
    <Entry>
        <Key>NationNameSplinter-america</Key>
        <Value><![CDATA[Revolutionary America]]></Value>
    </Entry>
    <Entry>
        <Key>NationName-aztec</Key>
        <Value><![CDATA[Aztec]]></Value>
    </Entry>
    <Entry>
        <Key>NationNameSplinter-aztec</Key>
        <Value><![CDATA[Revolutionary Aztec]]></Value>
    </Entry>
    <Entry>
        <Key>NationName-britain</Key>
        <Value><![CDATA[England]]></Value>
    </Entry>
    <Entry>
        <Key>NationNameSplinter-britain</Key>
        <Value><![CDATA[Revolutionary England]]></Value>
    </Entry>
    <Entry>
        <Key>NationName-incanempire</Key>
        <Value><![CDATA[Inca]]></Value>
    </Entry>
    <Entry>
        <Key>NationNameSplinter-incanempire</Key>
        <Value><![CDATA[Revolutionary Inca]]></Value>
    </Entry>
    <Entry>
        <Key>NationName-indus</Key>
        <Value><![CDATA[Harappa]]></Value>
    </Entry>
    <Entry>
        <Key>NationNameSplinter-indus</Key>
        <Value><![CDATA[Revolutionary Harappa]]></Value>
    </Entry>
    <Entry>
        <Key>NationName-maliempire</Key>
        <Value><![CDATA[Mali]]></Value>
    </Entry>
    <Entry>
        <Key>NationNameSplinter-maliempire</Key>
        <Value><![CDATA[Revolutionary Mali]]></Value>
    </Entry>
    <Entry>
        <Key>NationName-ottomans</Key>
        <Value><![CDATA[Ottoman]]></Value>
    </Entry>
    <Entry>
        <Key>NationNameSplinter-ottomans</Key>
        <Value><![CDATA[Revolutionary Turkey]]></Value>
    </Entry>
    <Entry>
        <Key>NationName-shang</Key>
        <Value><![CDATA[Shang]]></Value>
    </Entry>
    <Entry>
        <Key>NationNameSplinter-shang</Key>
        <Value><![CDATA[Revolutionary Shang]]></Value>
    </Entry>
    <Entry>
        <Key>NationName-southkorea</Key>
        <Value><![CDATA[Korea]]></Value>
    </Entry>
    <Entry>
        <Key>NationNameSplinter-southkorea</Key>
        <Value><![CDATA[Revolutionary Korea]]></Value>
    </Entry>
</GameStrings>

I understand what it does is update the string values of the keys for the nation names. I understand the XML structure because it is the same as the one used in the custom nation template. (For Strings it looks like this:)

Spoiler strings :

XML:
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<GameStrings xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <Entry>
    <Key>UI-MainMenu-NationBuilder-GokturkCityNames</Key>
    <Value><![CDATA[Gokturk Cities]]></Value>
  </Entry>
  <Entry>
    <Key>UI-MainMenu-NationBuilder-GokturkTownNames</Key>
    <Value><![CDATA[Gokturk Towns]]></Value>
  </Entry>
  <Entry>
    <Key>GokturkCityNames-Ordukent</Key>
    <Value><![CDATA[Ordukent]]></Value>
  </Entry>
  <Entry>
    <Key>GokturkCityNames-Otuken</Key>
    <Value><![CDATA[Ötüken]]></Value>
  </Entry>
  <Entry>
    <Key>GokturkCityNames-Karabalghasun</Key>
    <Value><![CDATA[Karabalghasun]]></Value>
  </Entry>
  <Entry>
    <Key>GokturkCityNames-Nvekat</Key>
    <Value><![CDATA[Nvekat]]></Value>
  </Entry>
  <Entry>
    <Key>GokturkCityNames-Romitan</Key>
    <Value><![CDATA[Romitan]]></Value>
  </Entry>
  <Entry>
    <Key>GokturkCityNames-Almalik</Key>
    <Value><![CDATA[Almalik]]></Value>
  </Entry>
  <Entry>
    <Key>GokturkCityNames-Taraz</Key>
    <Value><![CDATA[Taraz]]></Value>
  </Entry>
  <Entry>
    <Key>GokturkCityNames-Subeshi</Key>
    <Value><![CDATA[Subeshi]]></Value>
  </Entry>
  <Entry>
    <Key>GokturkCityNames-Jushi</Key>
    <Value><![CDATA[Jushi]]></Value>
  </Entry>
  <Entry>
    <Key>GokturkTownNames-Kengu-Tarman</Key>
    <Value><![CDATA[Kengü Tarman]]></Value>
  </Entry>
  <Entry>
    <Key>GokturkTownNames-Bolchu</Key>
    <Value><![CDATA[Bolchu]]></Value>
  </Entry>
  <Entry>
    <Key>GokturkTownNames-Ergenekon</Key>
    <Value><![CDATA[Ergenekon]]></Value>
  </Entry>
  <Entry>
    <Key>GokturkTownNames-Ongi</Key>
    <Value><![CDATA[Ongi]]></Value>
  </Entry>
  <Entry>
    <Key>GokturkTownNames-Tashkurgan</Key>
    <Value><![CDATA[Tashkurgan]]></Value>
  </Entry>
  <Entry>
    <Key>GokturkTownNames-Elegest</Key>
    <Value><![CDATA[Elegest]]></Value>
  </Entry>
  <Entry>
    <Key>GokturkTownNames-Isfijab</Key>
    <Value><![CDATA[Isfijab]]></Value>
  </Entry>
  <Entry>
    <Key>GokturkTownNames-Yarkhoto</Key>
    <Value><![CDATA[Yarkhoto]]></Value>
  </Entry>
  <Entry>
    <Key>GokturkTownNames-Yarnaz</Key>
    <Value><![CDATA[Yarnaz]]></Value>
  </Entry>
  <Entry>
    <Key>GokturkTownNames-Tugruq</Key>
    <Value><![CDATA[Tugruq]]></Value>
  </Entry>
  <Entry>
    <Key>GokturkTownNames-Taspar</Key>
    <Value><![CDATA[Taspar]]></Value>
  </Entry>
  <Entry>
    <Key>GokturkTownNames-Shibi</Key>
    <Value><![CDATA[Shibi]]></Value>
  </Entry>
  <Entry>
    <Key>GokturkTownNames-Chuluo</Key>
    <Value><![CDATA[Chuluo]]></Value>
  </Entry>
  <Entry>
    <Key>GokturkTownNames-Jolene</Key>
    <Value><![CDATA[Jolene]]></Value>
  </Entry>
  <Entry>
    <Key>GokturkTownNames-Sute</Key>
    <Value><![CDATA[Sute]]></Value>
  </Entry>
  <Entry>
    <Key>GokturkTownNames-Ikhe-Khushotu</Key>
    <Value><![CDATA[Ikhe-Khushotu]]></Value>
  </Entry>
  <Entry>
    <Key>GokturkTownNames-Huvten</Key>
    <Value><![CDATA[Hüyten]]></Value>
  </Entry>
  <Entry>
    <Key>GokturkTownNames-Mongun-Tayga</Key>
    <Value><![CDATA[Möngün Tayga]]></Value>
  </Entry>
  <Entry>
    <Key>GokturkTownNames-Ala-at</Key>
    <Value><![CDATA[Ala-at]]></Value>
  </Entry>
  <Entry>
    <Key>GokturkTownNames-Jetisu</Key>
    <Value><![CDATA[Jetisu]]></Value>
  </Entry>
  <Entry>
    <Key>GokturkTownNames-Temirqipay</Key>
    <Value><![CDATA[Temirqipay]]></Value>
  </Entry>
  <Entry>
    <Key>GokturkTownNames-Chimgan</Key>
    <Value><![CDATA[Chimgan]]></Value>
  </Entry>
  <Entry>
    <Key>GokturkTownNames-Chatkal</Key>
    <Value><![CDATA[Chatkal]]></Value>
  </Entry>
  <Entry>
    <Key>GokturkTownNames-Alarcha</Key>
    <Value><![CDATA[Alarcha]]></Value>
  </Entry>
  <Entry>
    <Key>GokturkTownNames-Onarcha</Key>
    <Value><![CDATA[Onarcha]]></Value>
  </Entry>
  <Entry>
    <Key>GokturkTownNames-Tash-Dobo</Key>
    <Value><![CDATA[Tash-Döbö]]></Value>
  </Entry>
  <Entry>
    <Key>GokturkTownNames-Nyldy</Key>
    <Value><![CDATA[Nyldy]]></Value>
  </Entry>
  <Entry>
    <Key>GokturkTownNames-Dashman</Key>
    <Value><![CDATA[Dashman]]></Value>
  </Entry>
  <Entry>
    <Key>GokturkTownNames-Donguz</Key>
    <Value><![CDATA[Donguz]]></Value>
  </Entry>
  <Entry>
    <Key>GokturkTownNames-Gulcho</Key>
    <Value><![CDATA[Gülchö]]></Value>
  </Entry>
  <Entry>
    <Key>NationName-Gokturk</Key>
    <Value><![CDATA[Göktürk]]></Value>
  </Entry>
  <Entry>
    <Key>NationNameSplinter-Gokturk</Key>
    <Value><![CDATA[Revolutionary Göktürk]]></Value>
  </Entry>
</GameStrings>


Now the XML that handles the flags looks like this:

XML:
<ACustomFlagWrapper>
  <FlagNames>
    <Flag>GokturkFlag</Flag>
    <Flag>GokturkFlag_SPLINTER</Flag>
  </FlagNames>
</ACustomFlagWrapper>

This adds the flag to the game. The code that 'attaches' the flag to the nation is in NationConfig.xml:

XML:
<?xml version="1.0" encoding="utf-8"?>
<APlayerSetupState xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <ConfigID>GokturkNation</ConfigID>
  <PlayerType>PT_Human</PlayerType>
  <NationName>Gokturk</NationName>
  <CityNameCollection>GokturkCityNames</CityNameCollection>
  <TownNameCollection>GokturkTownNames</TownNameCollection>
  <Flag>GokturkFlag</Flag>
  <Personality>AIP_Militant</Personality>
  <StartupBonuses>
    <StartupBonus>TECHAGE1-STARTUPBONUS-FASTER_SCOUTS</StartupBonus>
  </StartupBonuses>
  <AIDifficulty>0</AIDifficulty>
  <ColorProfileIndex>-1</ColorProfileIndex>
  <IsSplinterNation>false</IsSplinterNation>
</APlayerSetupState>

Going by the logic of the Replace Names mod, I made a mod with two XML files, one which updates the flag in the NationConfig, and one which updates in the Flag (admittedly I am not perfectly sure as to what exactly the difference is between the two).

The NationConfig.xml is this:
XML:
<ArrayOfAPlayerSetupState>
    <APlayerSetupState>
    <ConfigID>aztec</ConfigID>
    <Flag>Flag_BC_Aztec</Flag>
</APlayerSetupState>

The Flag.xml is this:
XML:
<ACustomFlagWrapper>
  <FlagNames>
    <Flag>Flag_BC_Aztec</Flag>
    <Flag>Flag_BC_Aztec2</Flag>
  </FlagNames>
</ACustomFlagWrapper>

The Flag_BC_Aztec and Flag_BC_Aztec2 PNG files are of course included. Yet this mod is making no changes in the game. What could I be doing wrong?
 

Attachments

I took a look at your zipfile.

I think you need to rename flags.xml to the flag name you use in nationconfig, so in this case Flag_BC_Aztec.xml.
your NationConfig.xml is missing a close tag at the end: </ArrayOfAPlayerSetupState>
It could be that you also have to rename the file to NationConfigs.xml (with an s, as the base game seems to use that file). And I am not sure if it has to placed in a subfolder, maybe Entities subfolder.

good luck friend
 
how do you know about the folder structure of the game?
oh yeah never mind I just saw it too

1735903396993.png
 
And I am not sure if it has to placed in a subfolder, maybe Entities subfolder.
Well it does need to be placed in a subfolder, but it's not the Entities one (the GameEntities.xml only has references to units). It's not clear which subfolder NationConfigs.xml goes into
 
Back
Top Bottom