Is it possible to mod the following...

BG ModGod

Chieftain
Joined
Apr 18, 2020
Messages
4
Hi all,

I am wanting to mod some aspects of the game but am not entirely sure if these things are possible. It would be great if someone could let me know if they are, and perhaps even where I could find some of these things. I have tried to find some of these things but with no success.

Here are the things I would like to be able to change:

1) Increase the food requirement per citizen in a city from 2 per turn to 3.
2) Increase the food yield of the city tile from 2 to 3.
3a) New buildings that require a certain resource be present in the cities borders. eg/ Blacksmith needing iron within city radius.
3b) Have that building stop working if the requirement is not met at any time. eg/ Blacksmith stops to operate if you remove the resource iron.
4) Have a builder (or potentially a new unit) be able to copy a resource (say wheat) and plant it on a new tile.

Any help would be appreciated.

Thanks.
 
1) GlobalParameters table "CITY_FOOD_CONSUMPTION_PER_POPULATION" - simple to change.
2) Same table "YIELD_FOOD_CITY_TERRAIN_REPLACE"
3) iirc it's possible, but would be complicated and only would work with 'improved' resources, not just present ones. I could be remembering wrong - a few people have asked about that on Discord in the past.
4) See here: Botanist mod.
 
  1. #1 & #2) Found in file "GlobalParameters.xml" in folder "C:\Program Files (x86)\Steam\steamapps\common\Sid Meier's Civilization VI\Base\Assets\Gameplay\Data"
    Code:
    <GameInfo>
    	<GlobalParameters>
    		….. a bunch of other stuff
    		<Replace Name="CITY_FOOD_CONSUMPTION_PER_POPULATION" Value="2" />
    		….. a bunch of other stuff
    		<Replace Name="YIELD_FOOD_CITY_TERRAIN_REPLACE" Value="2" />
    		….. a bunch of other stuff
    	</GlobalParameters>
    </GameInfo>
    I'm pretty sure but have never experimented to verify that the city center food is controlled by the second one
  2. #3a) This is possible but requires a lot of work arounds. It is not available in the Modifiers system. Complicated lua code is generally required as well as a dummy building of some type that will act as a prerequisite building when the conditions are met. The methods to accomplish this are further complicated by the need to make the dummy not available to purchase or construct in a city by any player including the AI. And if very many dummy buildings are added to the game, it is also necessary to take lua User Interface measures to keep these unobtainable buildings from cluttering the production menus. In fact my Buildings Are Fun and Dummy Buildings Systems mods do these very sorts of things, though I am still in the process of re-writing them so they work correctly in Rise and Fall and Gathering Storm.
  3. #3b) Is just a hugely more complicated version of the previous.
  4. #4) Again possible but not through any method available through the game's modifiers system. Lua again would be required, and again a bit complicated lua at that since new items would be needed in the Unit Panel "orders" box, and linkage of these click-buttons to the effects desired.
 
Thank you so much for your quick responses! I have managed the find what I am looking for, yay! So much time spent looking in the wrong places :(

I will have to change the scope of my mod for the time being, maybe I'll return to points 3 and 4 once I have a lot more experience modding.

Do you know if it possible to have a building give a luxury resource? Rather than just having the building give +4 amenities.

Thank you.
 
Top Bottom