Editing/Adding Corporations

Game_Addy

Chieftain
Joined
Jun 6, 2005
Messages
85
I haven't been able to find a while lot about this topic, so I appologize if it has already been covered.

I've been trying to find where I can modify/edit/add corporations for a mod, and I think I've finally found the place at
...\Beyond the Sword\Assets\XML\GameInfo\CIV4CorporationInfo.XML

Within the spoiler is a section from the above file, which I'm going to be modifying. I want to modify what it takes to produce the corporation, what it gives out, and how many there are in the game(I'm thinking around 15 or so total...more in a bit).
Spoiler :

<CorporationInfo>
<Type>CORPORATION_7</Type>
<Description>TXT_KEY_CORPORATION_7</Description>
<Civilopedia>TXT_KEY_CORPORATION_7_PEDIA</Civilopedia>
<TechPrereq>NONE</TechPrereq>
<FreeUnitClass>NONE</FreeUnitClass>
<iSpreadFactor>200</iSpreadFactor>
<iSpreadCost>50</iSpreadCost>
<iMaintenance>100</iMaintenance>
<PrereqBonuses>
<BonusType>BONUS_GOLD</BonusType>
<BonusType>BONUS_SILVER</BonusType>
<BonusType>BONUS_GEMS</BonusType>
</PrereqBonuses>
<HeadquarterCommerces>
<iHeadquarterCommerce>5</iHeadquarterCommerce>
<iHeadquarterCommerce>0</iHeadquarterCommerce>
<iHeadquarterCommerce>0</iHeadquarterCommerce>
</HeadquarterCommerces>
<BonusProduced>NONE</BonusProduced>
<CommercesProduced>
<iCommerceProduced>100</iCommerceProduced>
<iCommerceProduced>0</iCommerceProduced>
<iCommerceProduced>400</iCommerceProduced>
</CommercesProduced>
<YieldsProduced>
<iYieldProduced>0</iYieldProduced>
</YieldsProduced>
<Button>,Art/Interface/Buttons/TechTree/Corporation.dds,Art/Interface/Buttons/Beyond_the_Sword_Atlas.dds,7,6</Button>
<MovieFile>NONE</MovieFile>
<MovieSound>NONE</MovieSound>
<Sound>AS2D_BUILD_BANK</Sound>
</CorporationInfo>

It seems pretty straightforward, but I'm sure there's atleast one more file I'll need to modify.

Now for the part where I say why I want to mess with Civ:
I wanted to mod the game in such a way that mateials can be "manufactured." Say you don't have Iron, but you do have Copper and Tin(or something else), you would create the corporation which converts Copper/tin to Iron. These may be like World Wonders(make it impossible to build an executive), or similar to normal corporations in that they can spread. Is it possible to require a resource AND another, instead of one OR the other? Not all resources would not be buildable, such as Uranium, horses, and a few others. But on the whole, most would be. I believe this will give civs a chance to make a comeback if a certain resource is missing. It also allows corporations to build-upon one another to make resources unavailable otherwise.

My problem is I don't know which files I need to modify. First thoughts would be the 'pedia, and the city-view(though I think it may be best to avoid adding more icons in that box), and finally under the Corporation Advisor window(however, the 7, 6 could indicate the x-y position of the marker). What does iHeadquartersCommerce indicate, and why are there 3 values? Possibly HQ city, foreign and domestic values?

Any help is appreciated!
 
Well, in your mod you'll need 4 folder under assets :
- Art
- res
- XML
- Python

In the art folder you'll find 4 new folders :
- Interface/Buttons where you put "corporationX".dds and "corporationX"HQ.dds
- Shared where you put "corporationX"_A.dds
- Structures where you put your modified nif files for corporate headquarters
- Units where you put your modified nif files for corporate CEO


In the res folder you will put your 2 edited gamefonts files where they belong.


In the XML folder you will find 5 folders :
- Art where you adjust artdefines for buildings and for units
- GameInfo where you adjust CIV4CorporationInfo.xml
- Text where you adjust text for civilopedia and other screen
- Buildings where you adjust your building infos
- Units where you adjust your unit infos

The python folder is there to adjust city screen and corporation screen to show your new corporation properly.
 
Are there any modifications to the corporation screen. I guess you can take a religion one so you can add more corporations. But what I'd like to see is:

- how much money the HQ is generating on the corporation screen

- what cities, foreign and domestic, have the corporation. The current city list tells me nothing.
 
snipperrabbit,

was is the differnce between headquarterscommerce, commerceproduced, and yieldproduced?

HQCommerce is what you get :)gold:) from having your corp spread to multiple cities i.e. 4 :gold: per city with :corp: [BUILDINGINFO]

Commerce produced is what you get :
( :gold:, :culture:, :science:, :espionage: ) from having a :corp: in a city [CORPORATIONINFO]

Yield produced is what you get :
( :food:, :hammers: ) from having a :corp: in a city [CORPORATIONINFO]
 
Now for the part where I say why I want to mess with Civ:
I wanted to mod the game in such a way that mateials can be "manufactured." Say you don't have Iron, but you do have Copper and Tin(or something else), you would create the corporation which converts Copper/tin to Iron. These may be like World Wonders(make it impossible to build an executive), or similar to normal corporations in that they can spread. Is it possible to require a resource AND another, instead of one OR the other? Not all resources would not be buildable, such as Uranium, horses, and a few others. But on the whole, most would be. I believe this will give civs a chance to make a comeback if a certain resource is missing. It also allows corporations to build-upon one another to make resources unavailable otherwise.

Production chains are something I have long wanted to see included in Civ, but sadly, I do not believe that is possible with the corporation system as it stands. You could create an output resource with an "input," but remember that corporations do not really "consume" resources - they only "use" them. Hence, if you want 1 unit of your iron supply to be diminished in order to create 1 unit of steel... well, it's not that simple.

BUT.......... I always have a few good ideas. :D

This is how I'd plan to do it: make a building that requires a corporation. From my example above, let's say it's called a Steel Mill. This building would produce the Steel resource (like the Hollywood wonder does), but it would also work like the National Park in that it would remove access to iron from that city using <NoBonus>BONUS_IRON</NoBonus>. Now, the corporation itself would require iron, so you'd have to have it present in that city in order to build the building. This simulates the effect of production, but it has its own drawbacks.

I have not tested this in game, so I do not know what the effect would be of removing a prereq for a corporation in a city, but you could give it a try. :)
 
snipperrabbit thanks!

Sorry, some follow up questions :D

HQCommerce is what you get :)gold:) from having your corp spread to multiple cities i.e. 4 :gold: per city with :corp: [BUILDINGINFO]

why does HQ have three lines though?

i.e.
- <HeadquarterCommerces>
<iHeadquarterCommerce>5</iHeadquarterCommerce>
<iHeadquarterCommerce>0</iHeadquarterCommerce>
<iHeadquarterCommerce>0</iHeadquarterCommerce>
</HeadquarterCommerces>

what do the other two represent?

Commerce produced is what you get :
( :gold:, :culture:, :science:, :espionage: ) from having a :corp: in a city [CORPORATIONINFO]

Yield produced is what you get :
( :food:, :hammers: ) from having a :corp: in a city [CORPORATIONINFO]

Can we put negative values in these so I can make it cost culture or spy points?
 
Answered in the other thread. I believe it is still working if you delete the 2 later lines. Or, you can have a corpHQ get 1 :espionage: per city with corp if you ADD this line : <iHeadquarterCommerce>1</iHeadquarterCommerce> after the 3 already being there.

Understood ? ;)

I presume negative numbers might work as well, need to see it done and tested. Do you want to report me back on this one ?
 
@Gaius Octavius : I wonder if a mighty SDK modder will take the challenge to copy the tag for corp output from corporationinfos to buildinginfos so that everyone can make awesome new buildings ( or even UBs ) that uses the resources in the same fashion as corporations but not being corporation i.e. no real concurrence, just the corp will remove the resource effect of a building if there is an overlap. In this case, the player will have to spread a concurrent corp to the city in order to restore the building might.
Am I clear ?
 
snipperrabbit!!, thanks a ton for the info you've posted here. Almost every question I had about the edits I'm trying to make to our corporations is answered.

I know this thread is a year old, but on the off chance that you (or anyone else expierienced with corps) are still around...

One thing I can't find, can you make a corporation work without involving resources? We basically want our banking/financial corps to simply take money away from the cities and give it to the capital. No resources used or bonuses other than gold. I apologize if this has been covered elsewhere. Which is the "other thread" you referred to?


P.S. I will play around with negative numbers and report here, obviously if this doesn't work we will have to rethink our bank corps.
 
Have you tried creating a corp with no resource requirements to see what happens? I wonder if the check for founding a corp is "any resource requirements are met", with zero requirements allowing the corp to be founded in any city.

Heck, you should be able to just remove the resources from an existing corp to test quickly.
 
I'm trying things, but we don't have a map yet to really see how it works.

The problem I see is, if it is not consuming resources, it is not going to give the bonuses to any cities, negative or positive. In the civilopedia it says "per resource consumed". No resources consumed = no bonuses I would assume.


Negative bonuses proved simple enough btw.
 
I understood you to mean that you wanted no bonuses to the cities with the corporation offices. Instead, they would pay the standard corporation maintenance fees, and the city with the headquarters would receive the standard X :gold: per city with a corporation office. This shouldn't depend on any resources being consumed.

Of course, it's entirely possible I don't entirely understand how corporations work. Does the city with the headquarters get more :gold: from cities that are consuming more resources?
 
You're right, I can just increase the maintenance fees. But then they can get no benefits.


"Does the city with the headquarters get more from cities that are consuming more resources?"

I don't know the answer to that either.
 
Here are our seven custom corporations if anyone is interested or has suggestions for improvements.
 
Top Bottom