RFC Modding Central

Linkman226

#anarchy
Joined
Sep 14, 2007
Messages
2,493
For the benefit of new modders, I think the RFC modding community should have some sort of central database for RFC modding resources and to a list of common RFC modding mistakes already made by other modders. This thread is for that purpose.

Resources

A Guide to Adding New Civilizations to RFC- by Jarkov (at the bottom of the post)

Technical Documentation for RFC: Sword of Islam- by EmbryoDead- A great guide if you want to create your own RFC total conversion mod or import SoI features into your mod

Description of Each RFC Python File

Overlay Maps Information

How to Call Python Functions from the DLL- Case Study: Calling Civilization Modifiers from Python

That's all I have for now. If you guys have anything else, post the link, that'd be greatly appreciated

Common Mistakes

Python

The first thing you should do is enable python exceptions and logging. See this guide.

-When adding buildings/ units/ civilizations/ techs- you need to make sure you modify the Consts.py value. Moreover, if the building is added before the values for the religious buildings are, you need to modify the generic values iTemple, iCathedral, and iMonastery by setting them equal to the first building of that type. Lastly, if you are adding a new type of religious building, you need to do a search for iReligion*4 in the python files and replace it with iReligion*5

-I would recommend you go through the Consts.py file and the CvRhyes.h file and find oddities- namely, places where Rhye has given a building more than one name, and mark them via a comment sign to the right so that when you add units/buildings/civs, you know to skip numbers accordingly

-When adding minor civs, you DO need to increase the CvDefines value for the max number of civs

If you guys could help with this, that'd be fantastic. Thanks.
 
Great initiative! Sadly I have no time to contribute right now, but I might revisit the subject at a later date. :)
 
I've also noticed that many people don't know how to properly enable logging and read the log files afterwards. So maybe it's a good idea to include a little guide of what goes where etc.
 
Great initiative! Sadly I have no time to contribute right now, but I might revisit the subject at a later date. :)

Cool :)

I've also noticed that many people don't know how to properly enable logging and read the log files afterwards. So maybe it's a good idea to include a little guide of what goes where etc.

A link to such a guide is now in the OP
 
I think I know what this [thread] might be based on ;)

It's a really good idea, though, and I can see it being really helpful :) so subbed.
 
I thought you might have based it off of S&T Central :D

The assumption was based off the name, however, and they're definitely very different in terms of content.
 
Oh oh ok lol

No it wasn't based off of that, sorry. At least not consciously.
 
Just wondered :)
 
Will anyone create a guide about what each Python file is used to?
Like what is Victory.py, Const.py etc..?
 
I have some spare time this weekend. I'll write a Consts.py guide I suppose.
 
Will anyone create a guide about what each Python file is used to?
Like what is Victory.py, Const.py etc..?
Easy :D

Spoiler :
AIWars - scripting AI war declaration
Barbs - spawning units and cities for the minor players
CityNameManager - naming cities according to Civ/geography
Communications - connects/disconnects contact between players, embassies
Congresses - World Congresses
Conts - settings and global values (constants)
CvEventManager - part of the core game mechanisms
CvGameUtils - also part of the core game mechanisms
CvRFCEventHandler - main hub for Python calls in RFC
CvRFCEventManager - another event management module, not really in use
Plague - plagues? :rolleyes:
Religions - spreading of religions, holy shrines
Resources - scripted spreading of Bonuses and terrain
RFCUtils - collection of useful Python code for RFC, shared by several modules
RiseAndFall - central module for main RFC features (like Rise and Fall, secessions, collapse of minor Civs)
Stabilty - calculation and handling of stability, stability based collapse of Civs
StoredData - custom stored data for RFC
UniquePowers - some of the Unique Power code (rest in DLL)
Victory - Unique Historical Victories
 
I was planning on writing a more in-depth guide. However my installation of civ has stopped working- it keeps on hanging at init python- so until I get that fixed I don't plan on doing much else.
 
I was planning on writing a more in-depth guide.
Yeah, write a Python guide while you're at it. ;) Otherwise no-one will be able to do much of anything with the information. And anyone who already knows Python can probably read the modules as clear as English. :p

I once intended to rework all Python in RFC - in order to make the bulk of it more moddable. But of course I don't have the time for anything like that. :lol:
 
Yeah, write a Python guide while you're at it. ;) Otherwise no-one will be able to do much of anything with the information. And anyone who already knows Python can probably read the modules as clear as English. :p

You're right :lol:

BTW, edead has reworked a lot of the python already to make it more moddable.
 
BTW, edead has reworked a lot of the python already to make it more moddable.
Yeah, but I was thinking like *1000 more reworking. There is a lot of weird stuff in the code, but as long as it works its alright. But it makes modding less accessible, and I'd like RFC modding to be as accessible as possible. Ever heard of PyScenario? ;)
 
A lot of work then. Which would require a lot of time.

Of course I've heard of it. ;)
 
Thanks to both of you ;)
IMO the Const.py is quite easy to read, just some information that I missed --
Looking forward for your guide, Linkman.

By the way,
where can I find file that control which one is historical area etc?
I found the Core area TL BR Coordinates in Const.py but I can't find the one for historical, foreign etc :)

And Linkman or anyone else could you create a guide how to read AIWars?
I presume the column and row is a map like in CNM?
 
The stability values for each tile are controlled by the Settler Maps, which is in the DLL

And AIWars works the same way as CNM, but the value of each tile indicates how likely it is that the given civ will go to war with the civ that controls that tile.
 
One important thing to know about AIWars is that it only controls against whom war is declared, not on which area the AI focuses its military efforts during these wars.
 
Top Bottom