Quick Modding Questions Thread

IIRC my old tests, if the city has taken more damage than the threshold value, it can't fire anymore.
 
If you mean a 3d model that shows on the map, then the answer is no. There's no easypeasy method to add a new 3d-animated wonder to the game. For World Wonders you need the completed version 3d model and you may also need a pillaged or uncompleted version. I'm not sure for World Wonders whether we can borrow the 3d assets that are already part of the game. We can do so for other 3d elements, but the process is still not easy and requires creating an artdef with all the somewhat complicated editing required of an artdef "xml-like" file, as well as the modbuddy actions to get the artdef registered and used by the game. @Deliverator knows far more about this than I but I don't know that any detailed and meaningful answer is really appropo to a "quick answers" thread.
 
Quick (I think) question: how would one add a civilization/leader to the civ 6 true start location maps?
 
Quick (I think) question: how would one add a civilization/leader to the civ 6 true start location maps?

This is from one of Gedemo's City State mods:

Code:
CREATE TABLE IF NOT EXISTS TSL
    (
    MapType       TEXT   DEFAULT NULL,
    Civ           TEXT   DEFAULT NULL,
    LeaderType   TEXT   DEFAULT NULL,
    X           INTEGER   DEFAULT   NULL,
    Y           INTEGER   DEFAULT NULL
    );

INSERT INTO TSL
       (MapType,       Civ,                           LeaderType,               X,   Y   )
VALUES   ('40sw4rmOW',   'GEDEMO_CIVILIZATION_CARNAC',   'GEDEMO_LEADER_MINOR_CIV_CARNAC',       8,   57   );

I assume you just need to figure out the XY co-ordinates for your leader / civ and plug in the relevant names for those.

In the .modinfo file, the file containing the above is under InGameActions > UpdateDatabase.
 
This is from one of Gedemo's City State mods:

Code:
CREATE TABLE IF NOT EXISTS TSL
    (
    MapType       TEXT   DEFAULT NULL,
    Civ           TEXT   DEFAULT NULL,
    LeaderType   TEXT   DEFAULT NULL,
    X           INTEGER   DEFAULT   NULL,
    Y           INTEGER   DEFAULT NULL
    );

INSERT INTO TSL
       (MapType,       Civ,                           LeaderType,               X,   Y   )
VALUES   ('40sw4rmOW',   'GEDEMO_CIVILIZATION_CARNAC',   'GEDEMO_LEADER_MINOR_CIV_CARNAC',       8,   57   );

I assume you just need to figure out the XY co-ordinates for your leader / civ and plug in the relevant names for those.

In the .modinfo file, the file containing the above is under InGameActions > UpdateDatabase.
Just gonna issue a fair warning. It's more complicated than that. I'm still working at figuring it out.
You do need to add them to the map's leader table first. I'm working on figuring out the TSL thing now.
 
Is there a way of universally increasing the number of Woods features placed on new maps? Like a lua script that applies after the chosen map script(s)?
 
Hello.

I want to change the cost of settler and builder. So I changed their lines in units.xml file in ...Base\Assets\Gameplay\Data\ directory. I changed settler and builder base costs. But when I loaded the game and started a new game nothing had changed.

I did the same thing for districts using the Districts.xml file in the same folder. The district costs change did take effect. Whats the deal?

I also changed some items in Globalparameters.xml in the same directory (base assets). Will that work?

Thanks for the help.
 
Hello.

I want to change the cost of settler and builder. So I changed their lines in units.xml file in ...Base\Assets\Gameplay\Data\ directory. I changed settler and builder base costs. But when I loaded the game and started a new game nothing had changed.

I did the same thing for districts using the Districts.xml file in the same folder. The district costs change did take effect. Whats the deal?

I also changed some items in Globalparameters.xml in the same directory (base assets). Will that work?

Thanks for the help.

You're much better off writing a mod to update those tables. For one thing, any Firaxis updates will overwrite the changes the way you're currently doing it (so will verifying your local files if you ever need to do that).
 
You're much better off writing a mod to update those tables. For one thing, any Firaxis updates will overwrite the changes the way you're currently doing it (so will verifying your local files if you ever need to do that).
I understand that, but those aren't my concerns atm. im not doing a big mod, just a few changes, and i want to not have to start over my saves. i want it to change my already running game. i also never play online, so, just sp.

but aside from that, i just dont understand why some changes are taking effect and some not! that's perplexing.
 
I don't know if the fact that they're saved games is the reason, but I do know that modding certain things appears to be either a) broken or b) bizarrely verboten. For example, I have a mod that changes a bunch of stuff in the advanced setup screen. Some of it works, but some of it refuses to despite making the changes in the database - I can make it set my preferences for temperature, rainfall, etc, but *cannot* make pangea the default map type, nor huge the default map size.

There are also things that you can change that the game will then ignore under certain circumstances. For example, you can set a minimum distance for civs to start away from natural wonders and still have them spawn right on top of one because whatever part of the code deals with that can't find enough locations to do what you've told it. Roll another map and you might get the desired result.

As far as cost of units / districts goes, if you're still including cost progression then would you actually notice if your changes are working?
 
I figured it out. I ended up having to add <update> code and making the changes that way. I added update code to one of the civ DLCs, piggy backing, in order to force it in the base game. It worked, though not ideal. It'll do.

I still don't understand why changing the main files from base and expansions isn't working. I suspect some sql or other xml code is overwriting the changes somewhere down the loading path. Down river.



Another question. Perhaps someones knows this. I changed "GAME_COST_ESCALATION" Value="1000" to value 200. This is in GlobalParameters in Base folder. The argument doesn't seem to be updated in the expansions or DLCs. It seems to affect the harvest costs(rewards) but didn't seem to affect the plot gold buy cost. but it's hard to be sure, I can't tell for sure if its had an effect. Cost of unlocking the policy card after 12% game progress time was 20 gold. Which is odd cause it's supposed to start at 25.

Anybody know how I can control the plot buy cost and policy unlock cost? I'd like to reduce them from default. would appreciate any info on that.
 
I'm having trouble navigating the community lua documentation. How do I create a new building, if I know its name in the database?
 
most functions use IDs as parameters, to get the ID of a building of which you know the type name you can use the GameInfo table:
Code:
GameInfo.Buildings["BUILDING_LIGHTHOUSE"].Index

and to create a lighthouse:
Code:
city:GetBuildQueue():CreateIncompleteBuilding(GameInfo.Buildings["BUILDING_LIGHTHOUSE"].Index, 100)
 
Is there a way to change city ownership between players using .lua in Civ 6?

I found this example from Civ 5, hoping that it would work in Civ 6, but it did not work for me:
Players[newOwnerID]:AcquireCity(City, true, false);

I'm hoping there is something similar in Civ 6 though!
 
Making a big mod by combining smaller unit mods. Is it neccessary to combine once separate codes into unified ones? like the following

Code:
<Row Tag="LOC_UNIT_SLASHER_NAME" Language="en_US"> <Text>Slasher</Text> </Row>
       <Row Tag="LOC_UNIT_SLASHER_DESCRIPTION" Language="en_US">
           <Text>Ancient Era advanced melee shock unit, upgrades from Warrior. Requires no strategic resources.</Text>
       </Row>

(Actually a small part came from an xml file for civilopedia entry) Does the following simplifications produces the same results as above?

Code:
<Row Tag="LOC_UNIT_SLASHER_NAME" Language="en_US Text="Slasher" />
<Row Tag="LOC_UNIT_SLASHER_DESCRIPTION" Language="en_US" Text="Ancient Era advanced melee shock unit, upgrades from Warrior. Requires no strategic resources." />

Does XML Code Simplifications works this way?
 
Yes. Except that you forgot a set of " in the first row
Code:
<Row Tag="LOC_UNIT_SLASHER_NAME" Language="en_US Text="Slasher" />
Needs to be
Code:
<Row Tag="LOC_UNIT_SLASHER_NAME" Language="en_US" Text="Slasher" />
 
Back
Top Bottom