Modification questions

Matsuda123

Prince
Joined
Jan 1, 2012
Messages
519
So I'm trying to modify RFC Civilizations in abundance, by adding the trade company mod from DOC to it, and also an auto spawn red turban rebellion in china if the mongols conquer it, but, i dont know how. Id also like to speed up the research rate just a bit, add units to civ spawns and such. But Im clueless as to where to begin. any tips...?
 
Okay, in order:

Trading Company conquerors: they're quite complicated and scattered around several Python files. At the core, they're random events that trigger with 100% probability if you own the Trading Company building (i.e. immediately), so a good point to start would be CIV4Events.xml and CIV4EventTriggers.xml, respectively. The events do nothing via XML, but trigger Python functions found in CvEventInterface.py, which then refer to further Python functions in RiseAndFall.py and RFCUtils.py.

Spawning a rebellion on collapse: that depends on what exactly you want to happen. To trigger something based on someone's collapse, it's a good idea to write a new Python function that is called in killAndFragmentCiv() in RFCUtils.py. You can create units in Python; simply take a look into the files to see how to do so (e.g. createStartingUnits() in RiseAndFall.py).

Changing research speed: you can modify the research speed for everyone by changing the modifiers for the game speeds in XML\GameInfo\CIV4GameSpeedInfo.xml. If you want to change specific civs, you need to edit CvRhyes.cpp and recompile the DLL.

Changing starting units: see createStartingUnits() or createStartingUnits600AD() in RiseAndFall.py.
 
Actually, I was wondering if I could make an if and then statement, like if the mongols conquer all of china, then in say 1365, chinese musketmen and others spawn near nankjing or Hangzhou, trying to restart the chinese civ. Then, whenever I tried to add units to 600ad starting date, it either, gave me no new units, or, after copying and pasting chinas 600 ad from DOC, told me i was defeated. Its clear to me that I know nothing of python now..
 
You should start by enabling Python exceptions to see what you did wrong (likely indentation errors).
 
the complete list of stuff you want to do is rather advanced. as an example it took me, going from zero modding or programming experience, about a year to get to where I could do something like the trading company events. of the stuff you listed, the Red Turban Rebellion is probably a good project for learning since it is all python. I'd be happy to help you with that. if you want to do it get Notepad++ and download every working RFC mod (old RFCM, DoC, SoI, RFCA, RFCE, RFCCW, RFC Synthesis) for ideas and examples.

also: there is a thread for this stuff and we should talk there probably. its the RFC Modding Central thread in RFC modmods
 
Yeah, I'd appreciate th help, it would be quite useful.. I'll look into those.:) So, where can I change starting governments?
 
Open the map file and go to the civ you are looking to change. It should be fairly obvious after that I think.
 
Additionally, i tried installing an american indian city set, mongol city set, and norse city set. None of them work. I changed the civ infos xml file to match what i told it in citylsystem, but yet, it gives me a very random mixture of buildings instead. Why is this?
 
It's hard to tell what exactly you did. Usually a new city set should come with its own artstyle type, like ARTSTYLE_NORSE. It also should have its own CityLSystem file where the ARTSTYLE_NORSE tag occurs in various places for certain buildings and eras. This CityLSystem file then has to be manually merged with the one that already exists in the mod (modular loading is impossible). Repeat for every city artstyle you want to add.

I suggest you don't bother and simply download my Varietas Delectat and Ethnic City Art module, which includes all of these artstyles already.
 
Ok, I fixed it. Is there any way to emulate the way you have the mongols take over cities, but not transform them to yertvilles?
 
That's done in the DLL, so not without being able to recompile it.
 
Back
Top Bottom