[TUTORIAL] Civ4Col Random Events

TC01

Deity
Joined
Jun 28, 2009
Messages
2,216
Location
Irregularly Online
Yes, it's possible to do this. Pretty easy, in fact, since the event code is actually still in the game, it's used for the tutorial.

If you know how to make random events, which you can learn here, at "8.0 Events", for general information and "15.0 Appendix B: Event Guide" for specifics, which explains what to do, you should be able to do this- this is really just an explanation of what in the event guide is not accurate for Civilization 4 Colonization (schema changes). It's divided into two sections, what was added to the file and what was removed. For the removed code, if tags were removed in a block from one section (for instance, iUnhealthy is under iAngry), they are grouped together. Finally, at the bottom of the page, I have a section on some other important stuff that I found out when adding an event from BTS.

You should read this tutorial if:

1. You're trying to move a BTS event over to Colonization.

2. You're new to making events or modding in general, and have just finished the event guide in the link I provided. This information should help you understand the differences.

CIV4EventTriggerInfos.xml: Event Triggers

Added:

bTutorial- Added under "TriggerTexts", can be set to 0 or 1. If set to 1, the event becomes part of the in-game tutorial.

bOtherPlayerNative- Added under bOtherPlayerAI, can be set to 0 or 1. If set to 1, the trigger only activates if the other player (from bPickPlayer) is a Native civ.

bOtherPlayerPlayable- Added under bOtherPlayerNative, can be set to 0 or 1. If set to 1, the trigger only activates if the other player (from bPickPlayer) is playable.

bFrontPopup- Added to the game under bShowPlot, can be set to 0 or 1. I'm not sure what it does, none of the Col tutorial events use it.

Removed:

iAngry- Removed. Under MinDifficulty.
iUnhealthy- Removed.

BonusesRequired- Removed. Under ImprovementsRequired.

ReligionsRequired- Removed. Under RoutesRequired.
iNumReligions- Removed.
CorporationsRequired- Removed.
iNumCorporations- Removed.
bPickReligion- Removed.
bStateReligion- Removed.
bHolyCity- Removed.
bPickCorporation- Removed.
bPickHeadquarters- Removed.

OrPreReqs- Removed. Under bPrereqEventPlot.
AndPreReqs- Removed. Under OrPreReqs.
ObsoleteTechs- Removed.

bOtherPlayerHasReligion- Removed. Under bOtherPlayerWar.
bOtherPlayerHasOtherReligion- Removed.

OtherPlayerHasTech- Removed. Under iOtherPlayerShareBorders.

CIV4EventInfos.xml: Event Infos

No code was added to the EventInfos.xml file.

Removed:

iEspionagePoints- Removed. Under iCulture.
bGoldenAge- Removed.
iFreeUnitSupport- Removed.
iInflationMod- Removed.
iSpaceProductionMod- Remvoed.
Tech- Removed.
TechFlavors- Removed.
iTechPercent- Removed.
iTechCostPercent- Removed.
iTechMinTurnsLeft- Removed.
PrereqTech- Removed.

BuildingExtraCommerces- Removed. Under BuildingExtraYields.
BuildingExtraHappies- Removed.
BuildingExtraHealths- Removed.
iHappy- Removed.
iHealth- Removed.
iHurryAnger- Removed.
iHappyTurns- Removed.

BonusType- Removed. Under iImprovementChange.
iBonusChange- Removed.

BonusGift- Removed. Under BonusRevealed.

iConvertOwnCities- Removed. Under PlotExtraYields.
iConvertOtherCities- Removed.
iMaxNumReligions- Removed.

Transferring a BTS Event

There are several things you should keep in mind if you are trying to port a BTS event to Colonization.

1. All BTS events have a button tag looking something like this:

Code:
<Button>,Art/Interface/Buttons/Process/Blank.dds,Art/Interface/Buttons/Beyond_the_Sword_Atlas.dds,8,5</Button>

At the very bottom of the Event Info. For Colonization, you must remove the first half of that so it comes out looking like this:

Code:
<Button>,Art/Interface/Buttons/Beyond_the_Sword_Atlas.dds,8,5</Button>

Otherwise all of your buttons will appear as solid red/pink boxes.

2. BTS event triggers that refer to a specific era for different text will have to be changed. The eras in BTS are:

Ancient
Classical
Medieval
Renaissance
Industrial
Modern
Future

The eras in Colonization are:

Discovery
Expansion
Colonial
Independence

So, a BTS event may use different text for their trigger depending on if they are in the Ancient or Modern Era, but you need to change those to eras that are actually in Coloniation.

3. Many BTS events deal with features not in Colonization, such as religion, corporation, research, espionage, great people, and so on. So some events you port over won't work. For instance, when I tested this by moving the Forest Fire event over, I had to change the 1 anger to 1 turn of revolt to make it work.
 
This is awesome. Thanks a lot!

One of the main things that has bothered me about Colonization is that it doesn't simulate those small, random events that triggered historically significant events. Now, simulating things like the single murder that sparked King Philip's War (it devastated New England in the mid-1600s) is actually possible.
 
Top Bottom