Quick Modding Questions Thread

Some error in logs?
No errors that I could find, no. I will check again tonight just in case.

Edit: nope, no errors in the logs.

Don't know if it's relevant, but when I select my leader (without GS), the color of the civ icon isn't working, it just takes the color of the last selected leader, so there is definitely some issue.

Edit2: Ok, I don't know what I did but it is working perfectly now, no idea what the problem was.
 
Last edited:
Quick question as I explore what can and can not be done as modding: is it possible to draw on, duplicate, or make a minimap-like graph? Say I'd want to make a minimap that only draws landmasses vs ocean or something to that degree?
 
Anyone have any luck adding CO2 to other resources? I've tried:

Code:
    <Resource_Consumption>
        <Update>
            <Where ResourceType="RESOURCE_HORSES"/>
                <Set>
                    <CO2perkWh>2</CO2perkWh>
                </Set>
        </Update>
        <Update>
            <Where ResourceType="RESOURCE_IRON"/>
                <Set>
                    <CO2perkWh>4</CO2perkWh>
                </Set>
        </Update>
        <Update>
            <Where ResourceType="RESOURCE_NITER"/>
                <Set>
                    <CO2perkWh>6</CO2perkWh>
                </Set>
        </Update>
        <Update>
            <Where ResourceType="RESOURCE_ALUMINUM"/>
                <Set>
                    <CO2perkWh>10</CO2perkWh>
                </Set>
    </Resource_Consumption>
Which doesn't give me any errors, but I'm not seeing any C02 from units that consume those as resources.

Do I need to add in a power provided line too maybe?

Edit: that doesn't seem to do anything unfortunately.

Edit 2: Got it to work using a full replace line. Added the power line too for good measure, haven't tested it with it out yet.
 
Last edited:
When you use modd buddy, it prompts you to load Visual Studio (VS). If you load Civ V or BE-RT to prompt is for VS 2010, which is no longer available. There are over 50 VS apps. Which one(s) do I need to load? I assume that the apps for Civ VI would work for BERT.
 
When you use modd buddy, it prompts you to load Visual Studio (VS). If you load Civ V or BE-RT to prompt is for VS 2010, which is no longer available. There are over 50 VS apps. Which one(s) do I need to load? I assume that the apps for Civ VI would work for BERT.

You need to download the Civ 6 SDK from the tools section of your steam library and use the version of ModBuddy from there. When you run it the first time it'll install whatever extra ~stuff~ you need.
 
I'm wondering if it's possible a new personnal type of modifier argument, something like LinearScaleFromDefaultHandicap as I have no idea how it is working. (Was thinking of ScaleFromEra). I
 
Make sure you mod is dependent on Gathering Storm. Update on XP2 tables will work then.
That shouldn't matter. Making it dependent on GS would only disable the mod if GS is not enabled. As long as GS is active and the correct table is written to, dependencies shouldn't matter.
 
@Siuwa I see where you got that now. Firaxis has done that in a handful of places. It's really odd-duck stuff for a database, which generally wants one argument per column per row. Firaxis however is writing the DLL which reads the data added to the database so they can add special-case-handling of the text entered into the database anywhere they choose.

Petra's original setup was adding it's modifier to all player cities and then making an additional requirement that the city have the Petra Building, which was a real roundabout way of doing things.


MODIFIER_PLAYER_ADJUST_PLOT_YIELD should ought to work so long as you then use requirements that the extra yield is only applied to Desert and Non-Floodplain tiles, as Firaxis did in the original Buildings.xml file.

Since SQL won't like to see the comma character within an insert "VALUE" you will want to treat the three settings as a unified text string I would think:
Code:
INSERT INTO ModifierArguments (ModifierId, Name, Value)
VALUES	('PETRA_YIELD_MODIFIER', 'YieldType', 'YIELD_FOOD,YIELD_GOLD,YIELD_PRODUCTION'),
('PETRA_YIELD_MODIFIER', 'Amount', 	'2,2,1');
Don't be suprised if the database rejects this however, since Firaxis also writes the "parser" for Civ6 that translates XML code and inserts it into SQL language in the database.

Bear in mind tho that PETRA_YIELD_MODIFIER has already been defined by the Base XML file, so all you would really need to do is alter the ModifierType in table Modifiers, and the requirements so that there is no requirement that the city also have the Petra Wonder.
 
I was trying to do updates on the Resource_Consumption table and the data would not changed when I ran CIV until I added the dependency.
When you alter the contents of a modinfo file you also re-assert mod loading order since when all else is equal mods actions are loaded in the order the mods were enabled. But because of this auto-enabling, auto-updating of mods subscribed on Steam Workshop, and of the odd way code is loaded re starting a new game vs reloading a saved game, relying on the order mods were enabled is unstable, as is relying on the apparent Load Order linking that only seems to apply when Refereneces and Dependancies are added.

Testing reveals as I suspected it was a load order issue for the <Update> code in post # 105. The Update did not seem to take effect because when the Update was executed Gathering Storm had not yet added any info to the table.

The Table Schema added by Gathering Storm is added under a LoadOrder setting of -100, which means that the game tables are defined at that early Load Order setting, but the new tables are empty. So if a mod loads before Gathering Storm fills the new game-tables, there is nothing for an Update statement to match to, and it seems as if the Update failed. No Database error is reported in Database.log because the syntax is correct, the table-names are valid, and the column-names are valid: Database.log does not get reports for Update statements which fail because the "Where" clause of the Update did not match to anything at the time the Update was executed.

I executed the Update code @Logicsol posted with an action LoadOrder setting of +150 and everything executed properly for the Update.
 
Last edited:
I want to give Spanish missionaries 1 building charge so they will be the only unit capable of building Missions. However I don't want them to be consumed after doing so and I don't want that missionaries from other civs has the build charge shown in their UI. Do you guys know how can I achive this?
 
Is it possible to mod/edit mods downloaded through Steam? They don't show up on the mods folder where you would download a mod from CivFanatics to. Are they located elsewhere?
 
Is it possible to mod/edit mods downloaded through Steam? They don't show up on the mods folder where you would download a mod from CivFanatics to. Are they located elsewhere?
Very very posible indeed. C:\Program Files (x86)\Steam\steamapps\workshop\content . Then if I were looking for a specific mod I would go to its steam page and copy the long number in the final section of its URL. Then I would put that number in the search box of my file browser and et voilà, you have found your mod.
 
Is it possible to mod/edit mods downloaded through Steam?
Additionally, if you plan on editing Steam mods understand that any changes you make will likely be overwritten when/if that mod is updated. It's a good idea to copy the Steam mod folder over to your regular Mods folder, rename it, then unsubscribe on Steam, then make your changes to the copied mod. You'll have to repeat this process if the mod is ever updated, but at least you'll have your changes saved and can update the newer version more easily.
 
Nice method @Laurana Kanan .. to maintain some sort of persistent set of files even if a mod gets updated often or less-so. Although, here's mine...

1) I copy/paste target files (XML/LUA, etc) for every "Modded originals".. mostly when updates roll-in. Those now have a "- Copy" suffix.
2) From that set.. i alter whatever i need on another personal but renamed Copy.. with a prefix "_MY_......"
3) Perform a direct Compare task to verify what's being changed -- on any subsequent changes authored via fresh updates.
4) If anything must be corrected accordingly on _MY_ (previously recorded anyway) file, do it, save as the new version.
5) Send that corrected custom (My) file straight into the mod location.
6) Delete the original.. rename mine as the official "Modded+Corrected" with the proper name. Only the suffix is required to remove.
7) Done.

May look a bit cumbersome or complex at first.. but it's very rapid & reliable enough once you get the hang of it. ;)
 
I'm kind of obsessive about keeping backups & records. :crazyeye:

I like to keep copies of all my Steam mods in a backup folder whether I plan on editing them or not with the mod name, version # (where available), and date released. I also keep backups of all the ones I've edited that I've kept in the Steam folder or moved to the regular mods folder. I also have the pages of all mods bookmarked and a spreadsheet with all the mods I use with a list of changes I've made if they're not my own. Definitely a bit obsessive!!! :lol:
 
It's a good idea to copy the Steam mod folder over to your regular Mods folder, rename it, then unsubscribe on Steam, then make your changes to the copied mod.
I copy some mods from Steam and also change their ID. That way I don’t need to unsubscribe.
 
Would it be possible to make units interact with tile yields? I want to make a mod where units take 10 damage a turn, while healing 5 per turn per food on the tile. Is that even possible with the breadth of modding?
 
Top Bottom