.modinfo structure

Status
Not open for further replies.

Gedemon

Modder
Super Moderator
Joined
Oct 4, 2004
Messages
11,592
Location
France
Moderator Action: Closing this thread, please see the updated version thanks to PlotinusRedux : here

The organization of that file has changed a bit, here is what I've noted so far...

HTML:
<Mod id="11111111-1111-1111-1111-111111111111" version="1">
    <Properties>
        <Name>Name of your mod</Name>
        <Teaser>Short Description</Teaser>
        <Description>LOC_DESCRIPTION</Description>
        <Authors>Your name goes here</Authors>
        <SpecialThanks>My name goes here :)</SpecialThanks>
    </Properties>
    <Components>
        <UpdateDatabase>
            <Properties>
                <RuleSet>YOUR_RULESET</RuleSet>   
            </Properties>
            <Items>
                <File>YourRulesChange.xml</File>
                <File>YourRulesChange.sql</File>
            </Items>
        </UpdateDatabase>
        <GameplayScripts>
            <Properties>
                <RuleSet>YOUR_RULESET</RuleSet>  
            </Properties>
            <Items>
                <File>YourGameplayScripts.Lua</File>
            </Items>
        </GameplayScripts>
        <ImportFiles>
            <Items>
                <File>YourImportedFile</File>
            </Items>
        </ImportFiles>
        <UserInterface>    
            <Properties>
                <Context>InGame</Context>
            </Properties>
            <Items>
                <File>YourUI.xml</File>
            </Items>
        </UserInterface>
        <LocalizedText id="YOUR_TEXT">
            <Properties>
                <RuleSet>YOUR_RULESET</RuleSet>
            </Properties>
            <Items>
                <File>YourModTexts_Text.xml</File>
            </Items>
        </LocalizedText>
    </Components>
    <Settings>
        <Custom id="YOUR_SETTING">
            <Items>
                <File>YourConfig.xml</File>
            </Items>
        </Custom>
       <Map>
           <Properties>
               <Name>Your Map Name</Name>
               <Description>Your Map Description</Description>
           </Properties>
           <Items>
               <File>YourMap.Civ6Map</File>
           </Items>
       </Map>
        <LocalizedText id="YOUR_SETTING">
            <Items>
                <File>YourTextsRelatedToSettings_Text.xml</File>
            </Items>
        </LocalizedText>
    </Settings>
    <LocalizedText>
        <Text id="LOC_DESCRIPTION">
            <en_US>Long Description of your mod</en_US>
        </Text>
    </LocalizedText>
    <Files>
        <File>YourRulesChange.xml</File>
        <File>YourRulesChange.sql</File>
        <File>YourGameplayScripts.Lua</File>
        <File>YourModTexts_Text.xml</File>
        <File>YourConfig.xml</File>
        <File>YourTextsRelatedToSettings_Text.xml</File>
        <File>YourImportedFile</File>
        <File>YourMap.Civ6Map</File>
        <File>YourUI.xml</File>
        <File>YourUI.lua</File>
    </Files>
</Mod>

the Mod id must be unique, you can generate one (like for civ5) with a GUID generator, if two mods are installed with the same Mod id, one will be ignored.

Under <Components> you can use those tags:
  • UpdateDatabase
  • LocalizedText
  • ImportFiles (like a map script)
  • GameplayScripts
  • UserInterface
  • Custom
Under <Settings> you can use those tags
  • Map
  • Custom
  • LocalizedText
There is also a <ModArt> tag that I have no idea how to use.

The setting section is used to update the DebugConfiguration.sqlite DB that can be found in ..\Documents\my games\Sid Meier's Civilization VI\Cache

The <UpdateDatabase> tag used in <Components> update the DebugGameplay.sqlite DB

AFAIK <RuleSet> is not required, but without it your mod will be activated by default, the use of a rule set may allow some... things I guess... maybe compatibility between mods.

Ask your questions here, I may not have the answers, but I hope some people have or that we'll find them by testing and testing and testing (I've done a lot to get that, and also a bit of search for strings in the game's files)
 
Last edited:
I've made a few maps in worldbuilder, and have managed to acquire a few .Civ6Map files. Since the game may be loading it as a map script when loading it the hacky way (and crashes) - do you think adding the map file via a mod would change anything?

I wonder if there'd be anything other than the map file itself that we'd need to set up (component wise).
 
I've tried it after your message in the other thread, but no luck so far.

I think your way the game crashes because it launches a map file in a game while still being in WB mode, and the way I tested because I tried to make it load a map where it was expecting a map script. (edit: IMHO the game just can't load a map outside the WB mode yet)

I'm pondering writing a converter to take a map in civ5 and put it in a script for civ6.

The complete lack of informations about the mod tools is something that I really hate, "soon" does not means anything for me, I've waited patiently 4 years for mods to be available in MP for civ5 before I started to work on MPMPM, I won't do that again, but still, I'm a bit annoyed at the thought of losing a week-end to program a tool that may be obsolete next week...
 
Using the Tutorial.modinfo as a point of reference...

Code:
<?xml version="1.0" encoding="utf-8"?>
<Mod id="17462E0F-1EE1-4819-AAAA-052B5896B02A" version="1">
    <Properties>
        <Name>LOC_MOD_TITLE</Name>
        <Teaser>LOC_MOD_TEASER</Teaser>
        <Description>LOC_MOD_DESCRIPTION</Description>
        <Authors>LOC_MOD_AUTHORS</Authors>
      
        <Trusted>1784197304</Trusted>
        <ShowInBrowser>AlwaysHidden</ShowInBrowser>
        <EnabledAtStartup>0</EnabledAtStartup>
    </Properties>
    <Components>
        <UpdateDatabase id="TUTORIAL_DATBASE_UPDATES">
            <Properties>
                <RuleSet>RULESET_TUTORIAL</RuleSet>
            </Properties>
            <Items>
                <File>Tutorial_Technologies.xml</File>
            </Items>
        </UpdateDatabase>
        <ImportFiles id="TUTORIAL_IMPORT_FILES">
            <Properties>
                <RuleSet>RULESET_TUTORIAL</RuleSet>
            </Properties>
            <Items>
                <File>TutorialScenarioBase.lua</File>
            </Items>
        </ImportFiles>
    </Components>
    <Settings>
        <Map id="TUTORIAL_MAP">
            <Properties>
                <Group>Tutorial_Maps</Group>
                <Name>LOC_TUTORIAL_MAP_NAME</Name>
                <Description>LOC_TUTORIAL_MAP_DESCRIPTION</Description>
            </Properties>
            <Items>
                <File>Tutorial.Civ6Map</File>
            </Items>
        </Map>
        <Custom id="TUTORIAL_SETTINGS">
            <Items>
                <File>Tutorial_Config.xml</File>
            </Items>
        </Custom>
      
    </Settings>
    <LocalizedText>
        <Text id="LOC_MOD_TITLE">
            <en_US>Tutorial</en_US>
        </Text>
        <Text id="LOC_MOD_TEASER">
            <en_US>A basic tutorial.</en_US>
        </Text>
        <Text id="LOC_MOD_DESCRIPTION">
            <en_US>This is a basic tutorial</en_US>
        </Text>
        <Text id="LOC_MOD_AUTHORS">
            <en_US>Firaxis</en_US>
        </Text>
        <Text id="LOC_TUTORIAL_MAP_NAME">
            <en_US>Tutorial Map</en_US>
        </Text>
        <Text id="LOC_TUTORIAL_MAP_DESCRIPTION">
            <en_US>A basic tutorial</en_US>
        </Text>
    </LocalizedText>
    <Files>
        <File>Tutorial.Civ6Map</File>
        <File>Tutorial.lua</File>
        <File>Tutorial_Config.xml</File>
        <File>Tutorial_Technologies.xml</File>
        <File>TutorialScenarioBase.lua</File>
    </Files>
</Mod>

Based on the above highlights
The ImportFiles section seems to be used for supporting lua files
Custom maps are included via the Map section and are appended to the Map table in DebugConfiguration.sqlite as "../../Assets/Scenarios/Tutorial/Tutorial.Civ6Map"

However I do not know (yet) how they bypass the game options screen and automatically load the tutorial config settings. I think there might be some hardcoding involved given it is the tutorial.
 
You need <Settings> section to add your leader in the Leader Selection screen. Look in the Aztec DLC as example. It has the ConfigData.xml that puts your leader info in the selection screen. (which seems redundant for Civs and Leaders, but nevertheless necessary).

I suspect other settings you want to add to game setup screens will be involved here.

tutorial is just a glorified scenario. there's some files in the UI folder that loads the tutorial stuff, including maps.
 
Last edited:
Aztec DLC gives us some useful properties, especially when testing our mods.
Code:
<Mod>
	<Properties>
		<EnabledByDefault>1</EnabledByDefault>
		<EnabledAtStartup>1</EnabledAtStartup>
	</Properties>
</Mod>
 
I have some new info to add to the above post (you might want to word it better than me!)

Rulesets are your absolute best friend!

The Properties tag is used to exclusively associated a set of base game changes to that ruleset. Here is an example:
HTML:
    <Components>
       <UpdateDatabase id="TESTMOD_COMPONENT">
           <Properties>
               <RuleSet>RULESET_MODTEST</RuleSet>
           </Properties>
           <Items>
               <File>TestMod_GameChanges.xml</File>
           </Items>
       </UpdateDatabase>
   </Components>


When you specify a Ruleset within the Properties section (and create the necessary Ruleset entries via the config.xml file), it will only process the files in the Items section if the ruleset is chosen in the game setup screen. Leaving the 'Standard Rules' basically ignores your mod base game changes, thus why all the example scenarios have a ruleset associated with them.

Now here is the cool part...you can have multiple rulesets for a mod. Here is a slightly modified version of the same code above that I confirmed works.

HTML:
    <Components>

       <UpdateDatabase id="TESTMOD_COMPONENT">
           <Properties>
               <RuleSet>RULESET_MODTEST</RuleSet>
           </Properties>
           <Items>
               <File>TestMod_GameChanges.xml</File>
           </Items>
       </UpdateDatabase>

       <UpdateDatabase id="TESTMOD_COMPONENT2">
           <Properties>
               <RuleSet>RULESET_MODTEST2</RuleSet>
           </Properties>
           <Items>
               <File>TestMod_GameChanges2.xml</File>
           </Items>
       </UpdateDatabase> 

   </Components>

In the above case, depending on which ruleset you choose, only the specific Items for that ruleset will be loaded. I assume the same principle applies to other Components types such as <GameplayScripts> and <ImportFiles>, but I have yet to test it.

So we now have an effective way of tweaking rules based on player preference for a specific mod. This could be good news for YnAEM setups variations of the same map.
 
Last edited:
Has anybody found the reference to leader screens? I don't see where to set in leaders' xml file the graphics (like Barbarossa uses Barbarossa splash screen or animations X,Y and Z)
 
Can someone clarify for me the difference between <Components> and <Settings>?

There seems to be a lot of duplicity involved
 
There are 2 databases (3 with the texts localisation I think), <Settings> update the configuration database
 
So unless I want something to appear in the set up menu, I can just have <Settings />?

Update:
The answer is yes. Considering all the mods I've downloaded to see how they work have something in that field - which in many cases does nothing - this is clearly not widely known.
 
Last edited:
How is the ModID assigned/calculated? I'm making a mod right now what should I set the modID to?
 
Okay, I'm apparently being dense... I have 5 new map sizes I want to make into a mod...
3 files;
xxxGamePlay.xml - contains the size info, natural wonder info, etc
xxxConfig.xml - contains number of players/default players/etc
xxxText.xml - Contains the text info for the different sized maps

I'm haphazardly guessing where/how I put these into the modinfo file...
Gameplay = Components section?
Config = Settings?
Text = LocalizedText section?

I appreciate the template, but can someone give me a breakdown on each section with an example? In - I'm a complete dummy - explanation please?
 
I looked through the existing mods and thought I'd take a crack at making a quick and easy one. The goal (as a learning experience) was to modify start conditions of the game. The mod I created showed up under Additional Content, and when I create a game it is listed under DLC for that save, however the effects don't seem active. Maybe you guys could look at the files and see if I'm missing something?

...\Documents\My Games\Sid Meier's Civilization VI\Mods\Lockes Russia Mods\Lockes Russia Mods.modinfo
Code:
<?xml version="1.0" encoding="utf-8"?>
<Mod id="88E5DBDB-70AF-0E92-8064-73C052D0364A" version="1">
    <Properties>
        <Name>Locke's Russia Mods</Name>
        <Teaser/>
        <Description>Adjusts Russian Traits/Start Conditions</Description>
        <Authors>Locke</Authors>
        <ShowInBrowser>Show</ShowInBrowser>
        <EnabledByDefault>1</EnabledByDefault>
        <EnabledAtStartup>1</EnabledAtStartup>
    </Properties>
    <Components>
        <UpdateDatabase id="LOCKE_RUSSIAMODS">
            <Items>
                <File>Data/LockeRussiaMods_Eras.xml</File>
            </Items>
        </UpdateDatabase>
    </Components>
    <Files>
        <File>Data/LockeRussiaMods_Eras.xml</File>
    </Files>
</Mod>

...\Documents\My Games\Sid Meier's Civilization VI\Mods\Lockes Russia Mods\Data\LockeRussiaMods_Eras.xml
Code:
<GameInfo>
    <StartEras>
        <Row EraType="ERA_ANCIENT" Gold="1000" StartingMeleeStrengthMajor="20" StartingMeleeStrengthMinor="20" Tiles="0" Year="-4000"/>
    </StartEras>
    <MajorStartingUnits>
        <Row Era="ERA_ANCIENT" Unit="UNIT_SETTLER" Quantity="1" NotStartTile="true"/>
        <Row Era="ERA_ANCIENT" Unit="UNIT_WARRIOR" Quantity="2" NotStartTile="true"/>
        <Row Era="ERA_ANCIENT" Unit="UNIT_BUILDER" Quantity="3" NotStartTile="true"/>
        <Row Era="ERA_ANCIENT" Unit="UNIT_SCOUT" Quantity="5" NotStartTile="true"/>
    </MajorStartingUnits>
    <StartBiasRivers>
        <Row CivilizationType="CIVILIZATION_RUSSIA" Tier="5"/>
        <Row CivilizationType="CIVILIZATION_RUSSIA" TerrainType="TERRAIN_COAST" Tier="3"/>
    </StartBiasRivers>
    <StartBiasResources>
        <Row CivilizationType="CIVILIZATION_RUSSIA" ResourceType="RESOURCE_HORSES" Tier="2"/>
        <Row CivilizationType="CIVILIZATION_RUSSIA" ResourceType="RESOURCE_STONE" Tier="2"/>
        <Row CivilizationType="CIVILIZATION_RUSSIA" ResourceType="RESOURCE_URANIUM" Tier="2"/>
        <Row CivilizationType="CIVILIZATION_RUSSIA" ResourceType="RESOURCE_OIL" Tier="2"/>
        <Row CivilizationType="CIVILIZATION_RUSSIA" ResourceType="RESOURCE_ALUMINUM" Tier="2"/>
        <Row CivilizationType="CIVILIZATION_RUSSIA" ResourceType="RESOURCE_COAL" Tier="2"/>
        <Row CivilizationType="CIVILIZATION_RUSSIA" ResourceType="RESOURCE_COPPER" Tier="2"/>
    </StartBiasResources>
</GameInfo>

To be clear, it appears that none of my start condition modifications are active in game so far as I can tell (but it is obviously hard to test the Start Bias settings.

On a side note, does anyone know what the "Tier" settings are for StartBiases? Also, is there any way to specify that only certain civilizations should receive certain starting units? I'd love to be able to give some Civs extra warrior units, others extra builders, etc.


Additional Note: I also tried splitting the xml file out into a separate ...Civilizations.xml and ...Eras.xml file in case the specific file mattered (in additional to the XML node structure), however that didn't seem to work either.
 
Last edited:
I looked through the existing mods and thought I'd take a crack at making a quick and easy one. The goal (as a learning experience) was to modify start conditions of the game. The mod I created showed up under Additional Content, and when I create a game it is listed under DLC for that save, however the effects don't seem active. Maybe you guys could look at the files and see if I'm missing something?

I seem to be having a similar problem. I sense it's something to do with Settings or Rulesets. Hopefully someone can point us in the right direction.
 
Status
Not open for further replies.
Top Bottom