• We are currently performing site maintenance, parts of civfanatics are currently offline, but will come back online in the coming days. For more updates please see here.

Modmodding Q&A Thread

Do you know where I can find the script for the Trading Company events? (Specifically wondering about the France, Spain, Portugal, England events), I'm wondering if I could make my own one.
 
Do you know where I can find the script for the Trading Company events? (Specifically wondering about the France, Spain, Portugal, England events), I'm wondering if I could make my own one.

Assets/Python/History.py
 
It's based on the plots with the highest war map values for the colonizing civ.
 
Assert Failed

File: .\.\CvGlobals.cpp
Line: 3599
Expression: strcmp(szType, "NONE")==0 || strcmp(szType, "")==0
Message: info type WHITE not found, Current XML file is: xml\GameInfo/CIV4EspionageMissionInfo.xml

Does anyone have a clue what this error message indicates? It happened as soon as I went onto the civics screen, as an unmodded nation...

(This is a debug exclusive error message, when I run the game on “Release”, it doesn’t pop up at all and the game runs perfectly fine.)

I also got errors on Advanced Start being activated and where I had an excess amount of wonders by having a Toltecs-Aztec type situation where the civ clears another civ and founds a city adjacent. Apparently they inherit the wonders, which means that there's 2 instances of the same wonder in the files, even if the city is razed?

The latter two are probably only tangentially related, but I'll bring them up in case it's relevant.
 
Last edited:
Does anyone know what the prereq tech for capturing slaves is, and how can I change it?

EDIT: I figured out it's compass, but I still don't know how to change it...

EDIT 2: It's in the "Rules" python script, if anyone wishes to change it.
 
Last edited:
So I tried to change America's UHV in HistoricalVictory.py and I noticed something weird. I edited it like so:

iAmerica: (
ControlledResourceCount(
(improvement_resources(iFarm, iPasture), 20),
(improvement_resources(iPlantation, iOrchard), 15),
(improvement_resources(iMine, iQuarry), 35),
subject=VASSALS,
by=1880,
),
All(
Wonders(iStatueOfLiberty, iHollywood, iEmpireStateBuilding, iPentagon, iUnitedNations),
Project(iLunarLanding),
by=1970,
),

All(
CommercePercent(75, subject=ALLIES),
PowerPercent(75, subject=ALLIES),
by=1990,
),

But when I checked in-game in the Civilopedia the required project was "Man in Space". I tested with other space projects and they get the project above it in CIV4ProjectInfo.xml, but others like iManhattanProject or iTheInternet get the correct description. Am I missing something here or is this a bug?
 
So I tried to change America's UHV in HistoricalVictory.py and I noticed something weird. I edited it like so:



But when I checked in-game in the Civilopedia the required project was "Man in Space". I tested with other space projects and they get the project above it in CIV4ProjectInfo.xml, but others like iManhattanProject or iTheInternet get the correct description. Am I missing something here or is this a bug?
I assume this is a bug, and the order of the two projects may be switched around in the “Consts” file. Try swapping it for iLunarLanding, and see if it gives Man in Space.
 
I have generated this map with the latest git. Adding Aqua Apia or Flavius Amphitheater to the city of Roma via PlatyBuilder causes multiple Python Exceptions upon entering Roma's city screen. And then you are stuck in the loop and have to kill the game from outside. For the life of me I don't get what can possibly be the reason?
 

Attachments

I think it's in CvGameTextUtils.cpp (?), something like that. I recommend using Search All if you use VS Code, just look for CALENDAR (all caps, turn on Match Case).
 
Hello , as we all know, Varietas Delectat is no longer effective after the doc 1.18 big map version. It is too troublesome to modify the appearance of civilized models one by one. I want to know what principle VD is based on to take effect? Or is there a way to make a VD-like tool.
 
The basic principle is that you can define unit art styles and then for every unit define a look for a given art style. Then you can define which civilization uses which art style. So far when new civilizations have been added to DoC they have been set to use an existing art style, without adding new unit specific art for them.
 
Hey Leoreth ― Re: VD, I'd like to mention that I've actually opened a pull request at the start of the year to update VD to v1.18. I have also pushed a commit earlier today which syncs it to the latest version as of today. I'll keep it updated every now and then as you push more updates to the civilizations. You can check it out if you have time, or even after you officially release 1.18. Thanks!
 
How come the game crashes whenever I try to use my giant Ireland map? I made it in Mapview with Pic2Map, and did the requisite copy/paste for the beginning of the file that allows me to run a similar Ireland map with 50% the dimensions. I edited the grid with, grid height, and num plots written to make it accurate for this bigger map. I'm probably gonna move Cape Clear 1N so that a city founded on the south of it can have its full BFC
 

Attachments

Hmm maybe it results in inconsistency with the definitions of landmasses for things like UHV goals? Or maybe if the software you used to make the edit is for vanilla BTS it would cause errors given there are extra terrain types and other values (such as starting units that don't exist in vanilla) in the map files for DoC.
 
There are a lot of aspects of the game code that you need to edit. If you're using the DoC codebase, you will need to update the world size, for example. And a bunch of Python stuff, as well.
 
Back
Top Bottom