Quick Modding Questions Thread

Thank you for the reply and the hints! So the MaxPlayerInstances=0 prevented the building to be added via the modifier described and the rest is all right? Gonna try that out! Thank you! :)
 
Hey again!
Merry Christmas to y'all!!! :)

Another short question. I want to modify the AI's settling behavior. Haven't been playing around with AI changes yet. In AiLists I find ListTypes like 'DefaultCitySettlement' and 'ExpansionistCitySettlement' with System='SettlementPreferences'. However, I can't find a table that modifies the different parameters? Do you have any hint for me?

Thank you in advance! :)

Edit: Figuered it out. I missed the AiFavoredItems table! ^_^
 
Last edited:
Hey again :D

I want to use an existing icon for a new building. In order to make the icon of my building BUILDING_EXAMPLE look like the monument, is there anything except the following to be done?

File: Icons/ExampleIcons.sql
Code:
INSERT OR REPLACE INTO IconDefinitions (Name, Atlas, 'Index') VALUES
('ICON_BUILDING_EXAMPLE', 'ICON_ATLAS_BUILDINGS', '0'),
('ICON_BUILDING_EXAMPLE_FOW', 'ICON_ATLAS_BUILDINGS_FOW', '0');

File: Example.modinfo
Code:
<?xml version="1.0" encoding="utf-8"?>
<Mod id="my-guid" version="11">
  <Properties>
    ...
  </Properties>
  <Dependencies>
    <Mod id="4873eb62-8ccc-4574-b784-dda455e74e68" title="Expansion: Gathering Storm" />
    <Mod id="1B28771A-C749-434B-9053-D1380C553DE9" title="Expansion: Rise and Fall" />
    <Mod id="A3F42CD4-6C3E-4F5A-BC81-BE29E0C0B87C" title="Vietnam" />
  </Dependencies>
  <InGameActions>
    <UpdateIcons id="Icons">
      <File>Icons/ExampleIcons.sql</File>
    </UpdateIcons>
  </InGameActions>
  <Files>
    <File>Icons/ExampleIcons.sql</File>
  </Files>
</Mod>

Seems like I am missing something here? :/
 
Hello! I see that the forum is stagnating, but may be someone can answer, what are the ways to change units resource upgrade cost? For example, upgrading Horseman into Courser would take 10 horses.
 
Lua question!!!!
Where all lua moders scripters get the Events.
like- Events.LocalPlayerTurnEnd
i need event of flooding tile not from river but from ocean ...pls pls pls
See OP here for different lists, and the thread itself for the "how":
https://forums.civfanatics.com/threads/lua-objects.601146/

(the "how" may still be useful if there is a last civ6 patch with new modding content, of for civ7 if it still uses Lua)
 
Is there any tool, to make <criteria> on language?
I mean, I want to <updatetext> if 'ru_RU' language is choosed in the game.
 
Is there any tool, to make <criteria> on language?
I mean, I want to <updatetext> if 'ru_RU' language is choosed in the game.
I don't think there is a way to do that, but you don't need that actually.

Texts in the "LocalizedText" Table have a "Language" Tag, the Game automaticaly choses the Text in the Language of it (the Game). So you just need to specify the Language Tag (ru_RU in your case) when you include the text in "LocalizedText", and the Game will use that Text if Russian is the language chosen in the Game.
 
I don't think there is a way to do that, but you don't need that actually.

Texts in the "LocalizedText" Table have a "Language" Tag, the Game automaticaly choses the Text in the Language of it (the Game). So you just need to specify the Language Tag (ru_RU in your case) when you include the text in "LocalizedText", and the Game will use that Text if Russian is the language chosen in the Game.
Yeah, I know it. Already translated 50 mods by this way.
But I also change some original civ files, like styles.xml, loadscreen.xml, advancedsetup.xml by <importFiles>. I need them to load only if 'ru_RU' language is enabled. Should be some way to do that, may be some RuleSet or GameDependency parameters?
 
Yeah, I know it. Already translated 50 mods by this way.
But I also change some original civ files, like styles.xml, loadscreen.xml, advancedsetup.xml by <importFiles>. I need them to load only if 'ru_RU' language is enabled. Should be some way to do that, may be some RuleSet or GameDependency parameters?
I see.
Though, I don't have any idea how to do that tbh. Good Luck figuring it out!
 
Do you have any info source about StrategyConditions.ConditionFunction? Is there a list of available functions and is it possible to add custom condition functions?
TIA :)
 
Hi everyone! It's been ages since I've been back here. I had a lot of good times modding with Civ 4 back in the day. Now I'm wondering about Civ 6. I have 2 quick questions...

1. Is modding in Civ 6 the same as it was modding with civ 4? (Using XML)?

2.Has any one made a modern Russia mod for all the expansion packs in Civ 6? I would love to nuke Putin in the game to relieve some pent up emotions LOL.

There seems to be way too much material to sift through on the website and it's a bit disorienting and disorganized.
 
1. Is modding in Civ 6 the same as it was modding with civ 4? (Using XML)?
If you mean database modding, then Civ6, I think, is one of the most moddable games in the franchise if not the most moddable one (you can use either xml or sql for database modding). Though, unfortunately we don't have access to the DLL, only lua scripting. On the other hand, in terms of Graphics/Asset modding, Civ6 stands above all previous Games (but it's not easy tho).
2.Has any one made a modern Russia mod for all the expansion packs in Civ 6? I would love to nuke Putin in the game to relieve some pent up emotions LOL.
https://steamcommunity.com/sharedfiles/filedetails/?id=1310706235
I haven't played with it, so I don't know if it works, but if it does; NUKE HIM TO HELL!!!
 
If you mean database modding, then Civ6, I think, is one of the most moddable games in the franchise if not the most moddable one (you can use either xml or sql for database modding). Though, unfortunately we don't have access to the DLL, only lua scripting. On the other hand, in terms of Graphics/Asset modding, Civ6 stands above all previous Games (but it's not easy tho).

https://steamcommunity.com/sharedfiles/filedetails/?id=1310706235
I haven't played with it, so I don't know if it works, but if it does; NUKE HIM TO HELL!!!


Thanks! Looking forward to it.:c5angry: :c5strength::c5war: :D
 
Oh hey, I didn't realize I was the OP of this thread.

Anyway, got a question.

I actually did a major write-up, then figured I actually had an idea for a possible cause, so I'm just going to ask whether that might be a problem and spoiler the message in case that's not the problem.

When updating content as part of a mod, can you do multiple updates in the same block of code? For example:
<Update>
<Where DistrictType="DISTRICT_HOLY_SITE"/>
<Set Cost="60"/>
<Set CostProgressionParam1="20"/>
</Update>

Or should, instead, every set cost and set costprogressionparam1 be part of it's own <Update></Update> block?

See here the message I'd typed before having that thought:
Spoiler :
I've finally gone ahead and actually made a mod (rather than editing the base game's files). It's just simple balance changes, mostly production costs, and most parts work fine; settler cost scaling reduction, some yield changes, building production cost changes, and that's about it. So the mod itself is working.

However, there's one major exception: I'm pretty sure my changes to district production costs haven't gone through. It's a bit difficult to say because of how I changed it, but I loaded a save that doesn't use my mod from when I was technologically in a similar position, and district production costs were practically identical in both saves. Most notably, dams are still very expensive, which was one of the main driving factors for me to make a mod in the first place (I haven't unlocked canals yet).

For reference, this is the code I've used to try and change the district production costs:
<snip; see above>
I understood this to mean that first of all I'm slightly increasing the base cost (from 54 to 60), but halving the progression, which is 40 in the regular game. However, as said above, this doesn't seem effective. Did I code something wrong, or is there a mistake elsewhere?

(note that in the case of districts which use game speed progression, like dams, I changed the 1000 to 500, and for dams and canals I reduced the base cost to 60, matching regular districts instead of making their base cost 50% more expensive; this does not seem to work either)

Some more things that might be relevant:
-I used modbuddy and Lee's modding guide to create the mod.
-Actions were set up correctly in modbuddy.
-I checked the <Districts> tags for typos.
-There are no strange production cost disparities between different districts, implying that it doesn't work for any district. Most notably, in the base game dams are more than twice the price of aquaducts, whereas in my mod they should only be 50% more expensive.
 
When updating content as part of a mod, can you do multiple updates in the same block of code?

Or should, instead, every set cost and set costprogressionparam1 be part of it's own <Update></Update> block?

I'm a bit rusty with XML as I almost entirely use SQL, but this should be correct.
Code:
<Districts>
   <Update>
      <Where DistrictType="DISTRICT_HOLY_SITE"/>
      <Set>
         <Cost>60</Cost>
         <CostProgressionParam1>20</CostProgressionParam1>
      </Set>
   </Update>
</Districts>
 
I'm a bit rusty with XML as I almost entirely use SQL, but this should be correct.
Code:
<Districts>
   <Update>
      <Where DistrictType="DISTRICT_HOLY_SITE"/>
      <Set>
         <Cost>60</Cost>
         <CostProgressionParam1>20</CostProgressionParam1>
      </Set>
   </Update>
</Districts>

Huh, I'll try rewriting it that way then. Perhaps the one-line version only works if a single thing gets changed. Will test, if it works I'll edit this message with an update, if it doesn't I'll make a new post.
 
Huh, I'll try rewriting it that way then. Perhaps the one-line version only works if a single thing gets changed. Will test, if it works I'll edit this message with an update, if it doesn't I'll make a new post.

Okay, I made the changes, checked in the files of the mod whether they'd gone through, which they did, but after a while of playing (close to 100 turns) I did some math and found that a chop gave exactly 1/3 of a district, which as far as I'm aware is how it works in the base game, meaning it still isn't working.

Edit: I should note that at least in the Civilopedia, the base production cost is updated.
 
Last edited:
Update: I decided to go and test things, I changed CostProgressionParam1 in the actual base game file, from 40 to 0, only for Holy Site, and disabled all mods. It has no effect on the district cost scaling. Holy Site and Campus both cost 68 production by the point where I'd unlocked them both in my test game.

So I guess the question becomes: How do you affect district cost scaling?
 
Top Bottom