Files covering the foundation of corporations

Joined
Jul 21, 2003
Messages
7,819
Location
Adelaide, South Australia
Hi guys. So I'm not very familiar with the way the SDK handles the foundation of Corporations in BtS. I obviously know that the buildings that found Corporations are handled in CvBuildingInfos (in the CvInfos file), but are there any other files in the SDK that deal with the foundation of Corporation? I've looked in both CvPlayer & CvCity, & can't find anything that specifically refers to Corporation founding. I'm going to look in CvTeam next, but if anyone knows the answer, it would save me a lot of potentially fruitless searching.

For those who want to know about what I'm intending, I'm writing a mod which will make religions work more like corporations-i.e. they require both a Tech Prerequisite & Great Prophet to Found it. I've made the necessary alterations to CvBuildingInfos, but I just simply can't believe that its that simple! Would be great if it was though ;)!

Aussie.
 
Please see the CvCorporationInfo class in cvinfos.{h,cpp}. Most of the small classes are defined in this file. Only large, complex classes get their own files.
 
Hey David, I have looked at CvCorporationInfo-that's how I figured out that building the Corporation building founded the Corporation for you. Beyond that, though, I don't entirely understand the mechanism.

What I've done so far is to simply add a <foundsReligion> tag to the CvBuilding XML schema (in the SDK), using the <FoundsCorporation> tag as a model. The question is this-do I need to make any further alterations to the SDK to make this work? The change I've made just seems way too easy ;)!

Aussie.
 
The question is -- does your change work? Lots of times figuring out *where* to put new code is the hard part, and putting the code is the easy part.
 
I already have corporations and guilds that now spread like Religions in my mod. Perhaps you should just *borrow* my source code?
 
Cool Afforess :). It is not so much that I need to "borrow" code, so much as that I need to see which files need modification in order to get Religions behaving like Corporations (in terms of being founded). Where can I find this source code though?

Aussie.
 
OK, that definitely helps. I take it the source code you're referring to is Rise of Mankind?

Aussie.
 
My source code is here. Try looking for GAMEOPTION_REALISTIC_CORPORATIONS.

Hey Afforess, thanks for the help, but I must be missing something right in front of my face!! What I'm looking for is the code which handles the foundation of Religion &/or the foundation of Corporations. My hope is to make Religion Founding work *exactly* like Corporations Founding (namely, you require both a tech & an appropriate Great Person-a Great Prophet in this Case)!
Hope that makes sense.

Aussie.
 
Back
Top Bottom