The "Unofficial" Events Expansion

primem0ver

Emperor
Joined
Jun 16, 2006
Messages
1,158
Location
Peoria, AZ
Yup... its finally here. And not a moment too soon! This is an expansion that allows events for warlords and maybe in the future vanilla. I have some comments below about how Beyond the Sword will affect this mod but, first with a description:

CONTENTS OF THIS POST:
Here are the sections of this post in case you are looking for something specific:

Introduction to Events
Event ages
Modding
New Features for game play
New Features for modding
Known issues
Downloads (AT THE BOTTOM!)

Events: An Introduction

Events are a new concept to Civilization 4 and are introduced by this “expansion” mod (which was concieved of for the Genetic Era Mod back in October or November, long before the BtS announcement). Events can be both positive and negative. They can affect many things but most specifically they can affect units, population, buildings, cities in general, improvements, and the terrain (both features and terrain). Some events are completely random. Some events (natural events) may happen every turn but do not usually affect you. Other events depend on things like city health, unit location, and other non-random situations that can lead to events. Specifics for all included “vanilla*” events are included in this documentation. Finally, certain units can cause events. An example is the Great Prophet. In the Events engine expansion, a prophet can cause a “great plague” in an enemy city.

*IMPORTANT NOTE: Events are completely moddable like everything else in this game so they may vary if the mod you have downloaded has created custom or altered events. This documentation is for the standard “vanilla” version of the mod.

Event Ages

Another new concept that comes with this expansion are event ages. Ages are similar to Eras. One might even wonder why they were added except that Eras depend on a players position in the technology tree and Ages do not. Ages depend on game year and so they affect all players at the same time. The main purpose of ages is to allow for variations in the number of events that happen during certain time periods in the game. For example, one age is titled the “dark ages” and during this time you will experience a heightened period of plagues. See below for more information about this important time in history. Other ages also exist in the game. See the charts at the end of this document for more information.

Modding: (more specifics below... this is just an overview)
Events are completely XML defined and may be changed, added to, or removed by any modder who can alter XML files and knows how to make XML mod changes to the game (though it helps to be able to create buttons as well!). I STRONGLY RECOMMEND however that before you alter these files, you read the Modders Guide so that you know how events (and related infos) are defined.

I have included both a players guide and a modders guide with this “expansion” that help with the following:

The Players guide: is an “instruction manual” addition that should be included with any mod that uses this expansion and explains how to play the game with random events (important playing information and tips).

The Modders guide: is a handbook on how to use the new XML files, Python access, and SDK classes to enhance your own mods. There is also a technical reference to accompany this that includes technical details that may help SDK modders to understand how the Event Engine works.

A “standard” set of events has been shipped with this mod that I will call the “default” or “vanilla” events. Events and the concepts they rely on are defined in a new “Events” XML folder with 5 new XML info files (+1 new XML schema).

The new files are:
Events\CIV4EventClassInfos.xml
Events\CIV4EventAgeInfos.xml
Events\CIV4EventEffectInfos.xml
Events\CIV4EventInfos.xml
Events\CIV4EventTriggerInfos.xml
Events\CIV4EventEngineInfos.xml (basically an ini file for the engine)
(And the new schema file: Events\CIV3EventInfoSchema.xml)

Changes to game and game play:

  • New MAIN Concept: Events. There are four types of events that can occur: natural, conditional (often environmental), random, and “triggered” (caused by special units).
  • Natural events can occur anywhere on the map and most have an “intensity” associated with them such as the Richter scale for earthquakes. They don’t necessarily affect players unless a player is near where they happen. Just like in real nature, less intense natural events happen more frequently than more intense ones (though the actual time off occurrence varies unpredictably). You may not even experience the BIG one at all…but then again… you just might!
  • Cities and Units can be affected by their location and circumstances such as terrain, by environment, by things such as the cold, and the lack of water in the desert. Cities can suffer from disease if their health gets too low (conditional events).
  • Random events such as drought, a wealthy landlord joining your empire, an extra great person, and “good” harvests can occur at any time.
  • Some events cause effects that last for multiple turns: such as the “revel” or “world fair” raising your happiness or culture rate, or any number of seven different factors (i.e. happiness, health, food, production, gold, research, and culture). Some bad events can have effects that last multiple turns as well. For example, a plague will cause unhealthiness and unhappiness in your city for a few turns.
  • There is a new type of “special” unit: the Events unit. Events units (such as the jester) can cause positive events in your cities that raise happiness, health, commerce, and possibly other things as they go around lifiting your kingdoms spirits. Each great person unit can also cause their own event, some good, some bad (such as the prophet plague!).
  • There is a new Great Unit (Which still needs some work): Great Explorers Details about this unit will wait for another post.
  • New MAIN concept: Event ages. Event ages are period of increased (or decreased) events. Beware of some of them and make sure you are prepared with event units when certain ones come: they will spread suffering across the land unless you have event units prepared to help with your kingdoms morale! Beware especially of the Bubonic plague during the dark ages!
  • Exploration and cirvumnavigation are affected by events! Because your units can now die of exposure (frostbite), heat exhaustion (in deserts), and simply getting lost at sea (stuck in the doldrums zone), so you must be careful when exploring, particularly the sea in the early game.
  • Certain techs are key to exploration. The compass and astronomy are vital to not getting lost at sea.
  • There are new uses for several bonuses (also called resources). For example: sheep, cotton, and/or especially fur will be a significant advantage in the early game because they reduce your chances for frostbite. Frostbite can keep you from circumnavigating the globe without this bit of help. (NOTE: uses are not currently reported in bonus help)
  • There are new kinds of special buildings and improvements. Weather stations (building) and seismic stations (improvement not yet implemented but possible) can be built to minimize effects of earthquakes, hurricanes, and other natural disasters.
  • The Interface is event friendly, telling you when events occur, the chance an event will occur when moving into a new spot, telling you what events are affecting your cities well being (in the city screen). This still needs to be improved some.
  • You can automate special events units. By automating event units, they will go around looking at where they can improve your empire’s well being by hosting events. They will also consider helping and hurting your enemies so be careful!
  • New way to attack opponents. You may unleash the fury of prophets and other units capable of triggering “bad” events on your opponents cities. Watch out, because they can do the same! You can also use this to get them to go to war with you!
  • New approach to appeasing an enemy: You may now do missions of peace by causing good events in enemy cities. Even when you are at war! But be VERY careful, your event units can be attacked. [MUST IMPROVE AI FOR THIS]

New approaches and changes to modding:

  • ALL ASPECTS OF EVENTS, EVENT AGES, and EVENT EFFECTS that have been defined by the original version of this mod ARE MODDABLE THROUGH XML. See the modders guide for more information.
  • All event XML is located in a new XML folder: Events.
  • You can add (or remove) events (and anything having to do with events such as event ages) in your own mod.
  • Each event can have its own sound and icon added. There is a default that is used if one is not defined [NEED TO ADD THE DEFAULT ICON]. If you add your own, you must be able to add your own sounds and sound scripts to the XML.
  • There is a separate folder for each of these new sets of sounds and icons.
  • Events help streamline missions: because “anything” can be considered an event and many “mod” missions do what events now do, and particularly because the event engine provides an interface for custom events affects, new missions can now be added without much SDK development. For regular “event” missions with effects already defined in the standard event XML, adding new missions is as simple as adding the appropriate XML and a new mission enum to specially marked places in the events version of the SDK.
  • For special case missions where the effects are not in the standard event XML the procedure is the same as above except that you must also add an EVENTEFFECT_ enum to both the eventinfo in XML and to the event effect handler in the SDK. Then all you must do is add your special EVENTEFFECT_ procedure (either in the handler itself or in your own custom procedure). (More details in the Modders guide).
  • EVENT MISSIONS: IMPORTANT NOTE: if you are adding your own event missions, one thing must be considered: Any unit that has an excessive amount of event missions (say more that 3) will cause a significant amount of AI time per turn, particularly if the missions are different in their nature. The reason is because the AI must decide on three things when picking the next mission: 1. What kind of event will we do? (ie. Help our own team, hurt a team, try peacemaking with a team?) 2. Who should I attack/help (if not helping self)? 3. Which of my missions is the best for what I want to do? The best plot (city) for the mission is already decided for him once he has decided which mission to try, but he will still cycle through all missions if he does not find a best plot for each mission he tries in turn. The best way to avoid this is to have the unit only perform one kind of mission. In other words… have a war unit only do war missions (not self help or peace). The same goes for the other options.
  • Their is a full Events SDK that you may download for your use

Known Issues
  • There is a crash that occurs when the Great Explorer dies. **FIXED!**
  • For some reason, many windows Vista users have had difficulty getting this mod to load. It crashes during XML load. SDK USERS WITH VISTA: I COULD USE SOME HELP WITH THIS... please let me know if you can help because I do not currently have vista.
  • There is one situation where event text is not working properly (when the event is reported to the human player).
  • Hurricanes are either too many or too few. There is a bug with getting the right balance because of the way they are generated. Right now there are too few.

Downloads

Currently the Acrobat version of the help files are not available. To read the events list, you will need MS Word. [WILL FIX SOON!]

The EventsForWarlords download contains the playable mod for warlords, the changed (and added) SDK files, and all the current documentation. If you use the SDK files in this download, there is some important information regarding SDK merging in the Modders Guide. (There are some pre-processor defines you must add).
The Full EventsForWarlords SDK download contains the entire SDK with all things needed for events added to the project and solution files.
 
The day before I posted this expansion, I read through Kaels post about the new events xml files that will be part of the Beyond the Sword expansion. It looks like Firaxis has done a better job than I was led to believe by their sketchy information about events. As a result, I am not certain if or where I plan on taking this expansion since much of it is effectively being replace (and therefore a "waste of time") by the expansion. I will wait for feedback before I make a final decision.

I suppose it will be useful for those of you who don't want BtS but from the looks of things, I can't see why people wouldn't want this expansion.

I plan on doing a merge of the things that Firaxis missed that are part of my expansion so that combined, this will be a comprehensive addition to the game. In the end, I have mixed feelings about my spending so much time to complete this addition when effectively, much of what I did has been done by Firaxis in an official capacity, but I will still make an effort to make up for what they missed as they have undoubtedly done the same for my magnanimous effort.

So far, it looks like Firaxis events do not include what I call "Watch events" and I also think that my natural events "engine" is a little more realistic, and true to life than BtS and so at least these things will be something I can add
with the merged version.
 
Reserved for Future Use
 
Woodelf time again... :mischief:

This looks fantastic. I'm sure the community will get a lot of use out of it. Thanks very much! :thumbsup:
 
excellent mod. even with the coming of BtS, many features here can be implemented into BtS... perhaps you can do a BtS Events: Improved.
 
I love the addition of Events in BtS, but there are definitely some areas that your mod covers which Firaxis left out. Your Event Ages, for example, are a stroke of genius, as is your ability to stage events such as festivals via special units and buildings.

I would love it if you adapted your mod to BtS, letting them use the word "events" to describe one-time things (weddings, inventions, etc), while you choose another title for your festivals (perhaps 'Festivals' is the best word). Natural disasters then could fall into another category. The concept of Ages also really ought to be carried over.

Bottom line, I really like a lot of this and would hate to lose it. Please don't get depressed because Firaxis made some of your ideas officially possible through a different format. Use their format for the things it's best at and use yours for the areas it excels in. Thanks.
 
I appreciate the comments. I took a brief look at the Xml file tags for the BtS expansion and I saw a lot of my own ideas... a lot more than I thought I would. But yes, once I figure out what is there and what isn't, and how to integrate it all, I will probably make this happen. I may also work with the other guy who is interested in expansiong BtS events.... here is his thread.
 
Some helpful bug reporting:

1) The Jester unit has a wierd name as if the unit was never completely finished. It also is missing a Civlopedia article.

2) The Great Explorer is mis-sized, huge compared to other units, and its picture is larger than the unit picture slot.

3) The Great Explorer says that it can conduct trading missions (like the Great Merchant) but when I try to, I get a crash to desktop.

On the other hand, the festivals work nicely and the small events are nicely done in that they are noticable without taking me out of the game too much.

To add onto my earlier suggestion post, perhaps you could use your current event notification system for minor events (things like Good Harvests and other outside incidents). You could use the Firaxis event system for policy changing events (the multiple choice things). You could use a pop-up for natural disasters (they really should get more attention from the player). Finally, you could keep the ability to stage events via certain units.

I would suggest perhaps reducing some of the options for staged events though, or differentiating them more. Why have both a Revel and a Festival? Why have three types of prophetic curses? Just a thought though. This mod is an ambitious and delightful piece of work.
 
I would definitely say that this wasn't a waste of time at all. Warlords mods will be able to integrate it and hopefully so will Vanilla eventually. I think that older scenarios will see a huge benefit.
 
Vrenir said:
3) The Great Explorer says that it can conduct trading missions (like the Great Merchant) but when I try to, I get a crash to desktop.

This was very likely due to the fact that it dies and when the explorer dies, it causes a crash. I have fixed this issue. If you want to download again and write over your old files, it should work.

Your other suggestions are noted. Thanks!

The Explorer death bug has been fixed. The files in the first post contain the updated version.
 
I'd invite you to add your additional Event code into the CCCP, along with some of your other nice mods. In particular your Event viewing Pedia page is a desperately needed as BtS doesn't have anything remotely like that.

Once BtS hits shelves the BtS version of the CCCP will get uploaded to SourceForge and I'll grant you write access if you would like to use it as a base for work.
 
Hmm... I don't know if I'd want all of the BtS events to have pedia entries. I mean, one of the things about primem0ver's events is that they are somewhat general. The BtS events, on the other hand, seem on the whole more specific and narrative in nature. Perhaps a tag to block an event from appearing in the civilopedia would be good... so that way frequently-occurring general events like natual disasters, damage to units from terrain, and events from unit actions and such will be in there, but maybe not the political marriages and the ice sculptures....
 
I agree with Dom Pedro. Not only is it a hassle to have to write pedia entries for lots of events, it takes away from the element of surprise that often accompanies them. A bGraphicalOnly toggle would suffice.
 
What are those?

"Watch events" are so called because when cities or units meet certain conditions for an event, they are put on a "watch list" for that specific event so that I do not have to cycle through each event for ALL units in the game during a turn to see if an event happens to them.

This was done because if a unit does not move, then the conditions do not change.

I am no longer convinced this is the most efficient way to do things since I believe each unit and city does a turn anyway... if any of you are SDK developers, what do you think?

Anyway, lets say a unit moves above 60 deg (or below 60 deg south). When that happens, he gets added to the unit watch list for that specific event.

Each turn, the event engine cycles through the watch list to see if the event happens. If it does, then the affect is done. If not, the chances for next turn get increased so that the longer the conditions are met, the higher the chance.

So if your unit stays to long in the cold, he will inevitably freeze to death (frostbite) until you either have the fur or cotton and sheep.

Any event that results in a unit or city (for health reasons) being added to the watch list is what I call a watch event.

Basically a watch event is an event that only happens if conditions are met (such as a unit moving into a specific environment), and the chances for that event increase the longer the unit or city meet those conditions.
 
Lovely mod! :)

I tried it, some observations

I played large map, marathon

By BC 800 I had

6 times a good harvest
4 time landlord giving money
6 time population boom (My captal became size 8)

I see this is too often...
 
Yes, marathon will mess with the odds because there are more turns. The odds are per turn. So I will eventually have to add modifiers for each game speed. I appreciate the compliments.
 
I just purchased BtS today and I am soon going to be looking into merging this mod with BtS's events capabilities as well as finishing the Events page for the Civilopedia. I may also start working with the BtS Events thread... but we will see what they say.

Soon after that I hope to use the new Civ Vanilla patch 1.72 (if it comes with the SDK) to get started on merging this with Vanilla... though I can see little reason besides money not to buy BtS from the looks of it!
 
Back
Top Bottom