New Modding Basics

Can I ask something here?
I'm trying to make a civilization traits that give me a unit whenever I create a city.
My idea is, because every city will have City Center district, I use <ModifierType>MODIFIER_PLAYER_DISTRICT_CREATE_UNIT</ModifierType> which point to DISTRICT_CITY_CENTER. But it didn't work. Do anyone have another idea or find better modifier for that purpose?
 
Civ games use a variety of different languages, but the ones you'll need the most for modding will definitely be XML/SQL (database) and Lua (complex/dynamic effect scripting). As for what IDE to use, hopefully Firaxis will release something similar to the Civ 5 SDK we can use in the near future, but short of that, I'd go for a text editor that can reliably and effectively edit XML/SQL and Lua files. Sublime Text and Notepad++ are the names I see tossed around most often, but there are certainly other options.

If only Firaxis could release a very different tool than the previous one for Civ V ....................................................................... :D
 
The process will become much easier when Firaxis releases its modding tools (which should be "soon").
Similar to Civ5, view the databases in the user "cache" folder in a SQLite Browser program.

My cached DB is acting funny. Even after deleting the caches and verifying the game data, various changes are still there that are different than what the source files say. But the changes are not in effect in the game. This leaves me with no way to check if all of my changes are working. It also doesn't seem to update when I try to enable/disable mods.
 
Can I ask something here?
I'm trying to make a civilization traits that give me a unit whenever I create a city.
My idea is, because every city will have City Center district, I use <ModifierType>MODIFIER_PLAYER_DISTRICT_CREATE_UNIT</ModifierType> which point to DISTRICT_CITY_CENTER. But it didn't work. Do anyone have another idea or find better modifier for that purpose?
If you could post the full code, that'd be helpful. But I'd suggest checking GameEffects.log and searching for the name of your modifier.
 
I have made mini mod on my local pc, which I like and would also like to share.

Nutty has given already some information in this thread how to make a mod. Thank you for that.
But I would still need some more help please.
I can see that the threads about mod packs and mod components are locked. So there is some procedure to get your stuff there. Where do I find information about these details?

My mini mod so far modifies 3 xml files only.
But the effect on the game play are significant:
1.) I have switched off Great prophets and with that it is impossible to found religions and it is also impossible to win a religious victory. While I find the idea of the religious victory and its implementation appealing, I think it should be possible to switch it off. This mod does that.
2.) I have switched off the scaling of the districts. Districts always cost the base price which is only scaled / modified by the game speed but no longer by tech progression. I like it a lot more if your later cities can also build a district in a reasonable time.

As I like the way the game plays a lot more with this modification (only 1 incomplete test game so far) it would be nice to share this mini mod.
 
In leaders.xml you can find
<Row>
<ModifierId>STANDARD_DIPLOMATIC_NEAR_BORDER_WARNING</ModifierId>
<Name>InitialValue</Name>
<Value>-2</Value>
</Row>
<Row>
<ModifierId>STANDARD_DIPLOMATIC_NEAR_BORDER_WARNING</ModifierId>
<Name>ReductionTurns</Name>
<Value>10</Value>
</Row>
<Row>
<ModifierId>STANDARD_DIPLOMATIC_NEAR_BORDER_WARNING</ModifierId>
<Name>ReductionValue</Name>
<Value>-1</Value>
</Row>
<Row>
<ModifierId>STANDARD_DIPLOMATIC_NEAR_BORDER_WARNING</ModifierId>
<Name>DiplomacyKey</Name>
<Value>WARNING_TOO_MANY_TROOPS_NEAR_ME</Value>
</Row>
<Row>
<ModifierId>STANDARD_DIPLOMATIC_NEAR_BORDER_WARNING</ModifierId>
<Name>MessageThrottle</Name>
<Value>20</Value>
</Row>
<Row>
<ModifierId>STANDARD_DIPLOMATIC_NEAR_BORDER_WARNING</ModifierId>
<Name>SimpleModifierDescription</Name>
<Value>LOC_DIPLO_MODIFIER_NEAR_BORDER_WARNING</Value>
</Row>

My guess is
1.) you start at -2
2.) if you get to 20 or more the other guy is upset.
3.) it takes 10 turns to reduce the value by 1
4.) each unit near the border for 1 turn adds 1 point (I don't see this here, I am just guessing)
5.) that changing these values might get you somewhere.

6.) This is probably the consequence of upsetting the other guy (3 points lost in the relationship)
<Row>
<ModifierId>STANDARD_DIPLOMATIC_NO_PROMISE</ModifierId>
<Name>ModifierPerTransgression</Name>
<Value>-3</Value>
</Row>
 
Last edited:
In leaders.xml you can find
<Row>
<ModifierId>STANDARD_DIPLOMATIC_NEAR_BORDER_WARNING</ModifierId>
<Name>InitialValue</Name>
<Value>-2</Value>
</Row>
<Row>
<ModifierId>STANDARD_DIPLOMATIC_NEAR_BORDER_WARNING</ModifierId>
<Name>ReductionTurns</Name>
<Value>10</Value>
</Row>
<Row>
<ModifierId>STANDARD_DIPLOMATIC_NEAR_BORDER_WARNING</ModifierId>
<Name>ReductionValue</Name>
<Value>-1</Value>
</Row>
<Row>
<ModifierId>STANDARD_DIPLOMATIC_NEAR_BORDER_WARNING</ModifierId>
<Name>DiplomacyKey</Name>
<Value>WARNING_TOO_MANY_TROOPS_NEAR_ME</Value>
</Row>
<Row>
<ModifierId>STANDARD_DIPLOMATIC_NEAR_BORDER_WARNING</ModifierId>
<Name>MessageThrottle</Name>
<Value>20</Value>
</Row>
<Row>
<ModifierId>STANDARD_DIPLOMATIC_NEAR_BORDER_WARNING</ModifierId>
<Name>SimpleModifierDescription</Name>
<Value>LOC_DIPLO_MODIFIER_NEAR_BORDER_WARNING</Value>
</Row>

My guess is
1.) you start at -2
2.) if you get to 20 or more the other guy is upset.
3.) it takes 10 turns to reduce the value by 1
4.) each unit near the border for 1 turn adds 1 point (I don't see this here, I am just guessing)
5.) that changing these values might get you somewhere.

6.) This is probably the consequence of upsetting the other guy (3 points lost in the relationship)
<Row>
<ModifierId>STANDARD_DIPLOMATIC_NO_PROMISE</ModifierId>
<Name>ModifierPerTransgression</Name>
<Value>-3</Value>
</Row>

thanks :D how can i put this is mod? i only know is like this
<Improvements>
<Update>
<Where ImprovementType="IMPROVEMENT_GREAT_WALL"/>
<Set BuildInLine="true" BuildOnFrontier="false" CanBuildOutsideTerritory="true"/>
</Update>
</Improvements>

is this correct? i think this is wrong it crashes the game

<ModifierArguments>
<Update>
<Where ModifierId="STANDARD_DIPLOMATIC_NEAR_BORDER_WARNING" AND Name="InitialValue"/>
<Set Value="0"/>
</Update>
<Update>
<Where ModifierId="STANDARD_DIPLOMATIC_NEAR_BORDER_WARNING" AND Name="ReductionValue"/>
<Set Value="0"/>
</Update>
<Update>
<Where ModifierId="STANDARD_DIPLOMATIC_NEAR_BORDER_WARNING" AND Name="ReductionTurns"/>
<Set Value="20"/>
</Update>
</ModifierArguments>

EDIT: I removed the AND and it doesnt crash. going to test if its working

Edit: I think its working gonna upload in the reseource later

EDITL Near Border Penalty is working. but another problem is "Moving forces near their cities" penalty.
 
Last edited:
Hey guys , what program do I need to do basic mods ? Like ones that are just update , to save me from editing the base files ?

I'm getting the feeling I'm missing something reading through these posts !
 
@Littlebob86:

the most basic mods are made by writing xml files which update some properties. You can do that with a simple text editor or use an xml editing tool like xml spy or visual studio (and there are many others). These xml editing tools just display the xml in a nicer way. If we had the xml schema the xml tools could do some additional miracles but that is not happening yet.

If you write your own mod your baseline is the vanilla civ6. In the xml file you write something similar to an sql update statement but formatted in a specfic xml format. Look at one of the examples to get started.

If you do not want to share your mod or for most basic tests you can alternatively backup your civ6 files and change them. But this is the ugly hacking way.
 
With Civ5 it was possible to write SQL queries directly to update the game database. Mods using SQL loaded faster than mods using XML. Does someone know whether it's still possible or not?
 
Hello, Guys!

I want to ask you a question:

How to add another leader to a already existing civ?

I try to add another two leaders for China for the YnAMP Greatest earth map (to make the map more interesting to play).

Do you guys know how to do that?
 
Has anyone figured out how to replace or even view the textures in the game? I managed to find the directory under Base/Platforms/Windows/BLPs.

It seems there are BLP files, and another directory, BLPs/SHARED_DATA, with files without any extension. The BLPs seem general and the files with no extension for specific units etc.

I remembered WoW used BLP files but none of the converters or plugins for editing them seem to work with these blps.

I'm trying to make a mod for having the map's Fog of War change with the era (google maps in information, cave drawings ancient etc.) but no one else seems to have looked into this aspect of Civ 6 yet.
 
A few bits on graphics that may help people figure things out further:
  • There is a component type <ModArt> that can be used in the modinfo files. I gather this will be the entry point for art files. There are no current examples of its use in any file I have found and the only time a reference can up in grep search was within EXE game file (maybe C++ gurus might be able to help with their searches).
  • Fonticons are stored in a <FontIcons> table which does not seem to be in any accessible DBs from what I can tell. The method however is still the same in that you reference the 'start' x,y position and give it the icon size (in this case 22 pixels)
 
Back
Top Bottom