1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

Preview of an unofficial “Events” Expansion!

Discussion in 'Civ4 - Creation & Customization' started by primem0ver, Apr 9, 2007.

  1. primem0ver

    primem0ver Emperor

    Joined:
    Jun 16, 2006
    Messages:
    1,140
    Gender:
    Male
    Location:
    Peoria, AZ
    With the announcement of the new expansion pack I have decided to break this news a little ahead of schedule.

    Firaxis released an announcement a couple weeks ago that they would be including some natural and random events as part of their new expansion pack. Well I am here to tell you that my own expansion has been in the works for some time now. About 8 months ago I began toying with the “disasters” concept as a programmer/designer for the Genetic Era Mod. About two and a half months ago I came up with my final model for a complete events “expansion” and decided that I would make it a separate component that I would release independently. Genetic Era players will get the first experience with it as it was originally conceived as a part of that particular mod and they will hopefully be helping me play test this new addition to the game but soon after it will appear as a separate expansion. I was planning to announce it upon its release but with the new expansion I have decided (with some help from woodelf) that it would be best to announce it early.

    Part of the reason for this early release is that I hope that Firaxis will make their new addition compatible with this because I have put a LOT of effort into its creation and in the end I hope that it works with what Firaxis adds (even if there isn’t much in common) and not in conflict with their expansion. To do what I can to help that occur, I hope to release the technical info soon.

    I have added several new files and classes to the SDK, several XML files, and a new XML folder for this mod. I decided to call it the “events” expansion because it allows for several different types of events and these events have a significant impact on game play. First, events are not just random or natural, they can be environmental and caused by certain units. Each “great” unit has its own event that it can cause (except currently the great general. Also, the great prophet can actually cause 3 events but all affect other players rather than the player with the prophet). There is also a new type of special unit that has its own new AI type that is specifically for generating events which can help bring happiness (among other things) to your cities. This is an issue because during certain periods of the game, plenty of harm will be done by certain events like the “bubonic plague.” Events units are there to combat the effects of the more disastrous events that can happen throughout the game (I suppose in a way to answer the “cry for help” that Firaxis has said will be part of their disaster additions).

    What this "preview" includes
    • Description of mod
    • Screenshots
    • List of features
    • The anticipated events list with all the details (coming soon)
    • Technical details of how the mod is organized and what it entails (coming soon)

    So with this preamble, here is a look at the new features (taken from the introduction file shipped with the expansion). I have left in comments about things that are not yet done (and I may also add that I could really use some help with AI programming… but designing a new and fairly complex AI isn’t easy! Especially since I am a beginner to AI.)

    The Events Engine: Introduction
    An “Expansion” mod by primem0ver


    Explanation (What is an “expansion” mod?)

    I am going to call this an “expansion” mod rather than an ordinary mod. No, it does not mean that it is bigger and better than many of the mods that exist out there, it simply is a completely different kind of mod. Many mods focus on expanding or changing things that already exist in the game. This mod adds something that did not exist in the game before and makes that something expandable and/or changeable (moddable) like everything else in the game. In other words it was built with the intention of making it moddable. You could say it is both a “component” and a mod in and of itself.

    This expansion adds both random and not-so-random events to the game (events that are based on civilization management choices AND events that units can cause). 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 gives some help on how to play the game with 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 XML files are:
    • Events\CIV4EventClassInfos.xml
    • Events\CIV4EventAgeInfos.xml
    • Events\CIV4EventEffectInfos.xml
    • Events\CIV4EventInfos.xml
    • Events\CIV4EventTriggerInfos.xml
    • Events\CIV4EventEngineInfos.xml (kind of an ini file with settings for the engine itself)
    • (And the new schema file: Events\CIV3EventInfoSchema.xml)


    Introduction (What does this mod do?)

    This mod is an important and useful (especially to modders.) addition to the game that contributes many new features and changes to gameplay. Here is a list of what it changes about the game:

    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!).
    • 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.
    • There are new kinds of special buildings and improvements. Weather stations (building) and seismic stations (improvement) 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). When large disasters occur, a new events screen can give you all the gory details [NOT YET DONE];
    • 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!
    • 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 way of making peace. If you appease an enemy enough, he may try to make peace with you [NOT YET DONE].

    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 need to 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.


    Overview (focuses on important technical information):

    Here is a description of what parts of the game will be changed/added to in terms of affected components.

    First and foremost, this is an SDK mod. Several changes have been made to the SDK ranging from over 6 new classes/structs to some major and minor changes to existing classes and methods. A description of all major changes, a list of all changes, and information on how to use them can be found in the documentation.

    Second, this is a Python mod. All of the new info types and parts of the event engine and related classes have access through python. As with much of the screens in the original game, I have used python to code these aspects of the event engineInformation on Python access and changes can be found in the XML and python documentation

    Third, this is an XML addition and mod (of course). An entire folder containing six new XML files has been added to the game through this mod. Information on XML files and tags and changes can be found in the XML documentation.

    List of new items introduced through the Events Mod:
    • 6 new info classes
    • 2 new game level CvClasses
    • Several new helper level Cv structs and classes
    • A new XML folder
    • 7 new XML files (1 schema and 6 new info files)

    Scroll to the next post for some screenshots!
     
  2. primem0ver

    primem0ver Emperor

    Joined:
    Jun 16, 2006
    Messages:
    1,140
    Gender:
    Male
    Location:
    Peoria, AZ
    Before I get into screenshots, an explanation is in order.

    In addition to "events" I have added a concept which I have called "event ages".

    Whether based in history, legend, personal belief, or wherever, there have been certain periods of history that have seemed more prone to certain types of events. When designing the events engine I wanted to emulate this "fact" or "legend" or "personal truth" (for those of us with religious convictions) and I could not use eras because eras are somewhat dependent on a player's (actually a team's) position in the tech tree and I wanted these periods to hit ALL players at the same time. So with this expansion I am introducing "Event Ages." The most notorious of these is the "dark ages" because this was a period of unusual low health, poverty, and disease, especially among those not of a noble class.

    "Ages" are defined by game year (based on game turn and type of game... i.e. normal, epic, etc...). Ages do not cover the entire span of the game (though they cover most of it). There are certain periods of years that are not part of any "event age". The current list of event ages are listed below:

    Age of Civilization
    Age of Prophets
    Age of Reason
    Dark Ages
    Colonial Age
    Age of Revival (instead of "last days" or "modern")
    Information Age
    And for mods that go into the future... the space age!

    This introduces our first screenshot! (The rest will have very brief explanations). At the beginning of a new age you will see a popup such as this first one that appears as soon as you build your first settlement:



    As said in the introductory post, great persons each have their own event they can cause. Here is one of one of the curses a prophet can bring on enemies!


    The UI lets you know if your events have helped or hurt your status with other civs...


    You are warned when moving into an environment that can cause trouble... (gives you the odds of an event in percent chance)


    And told when you were too careless!


    Events are part of the civilopedia. Green means good event!


    ... and RED means BAD!!! (Beware of the bubonic plague of the dark ages... it is not very nice!)


    The next post is reserved for the additions I said I would make in the first post
     
  3. primem0ver

    primem0ver Emperor

    Joined:
    Jun 16, 2006
    Messages:
    1,140
    Gender:
    Male
    Location:
    Peoria, AZ
    Reserved for future use!
     
  4. ripple01

    ripple01 Emperor

    Joined:
    Mar 7, 2006
    Messages:
    1,250
    Location:
    New York City
    Wow! Impressive. Most impressive.

    You've obviously put a TON of work into this, and I can't wait to try it out. I hope Firaxis does make their code be able to work with yours somehow...

    Cheers,
    ripple01
     
  5. ww2commander

    ww2commander Emperor

    Joined:
    Aug 23, 2003
    Messages:
    1,243
    Location:
    Australia
    This is excellent work.

    I will see if I can use this mod in my scenario and change the events around to suit the season events that occured during ww2. This mod has amazing potential :)

    Good Job :goodjob:
     
  6. woodelf

    woodelf Bard

    Joined:
    Jun 12, 2003
    Messages:
    15,036
    Location:
    Gallery
    Sweet. It's finally announced.

    I hope to use it with SotM. :thumbsup:
     
  7. primem0ver

    primem0ver Emperor

    Joined:
    Jun 16, 2006
    Messages:
    1,140
    Gender:
    Male
    Location:
    Peoria, AZ
    Thanks for the vote of confidence guys.

    As long as you don't mean spring, winter, fall, etc... yes, it can do that.
     
  8. ww2commander

    ww2commander Emperor

    Joined:
    Aug 23, 2003
    Messages:
    1,243
    Location:
    Australia
    I am hoping to represent frostbite effects on troops and other events relating to conditions on the frontline.
     
  9. Gaius Octavius

    Gaius Octavius Deity

    Joined:
    Jul 28, 2006
    Messages:
    4,016
    Good grief, very few times have I seen something of such complexity and thoroughness. Three cheers to you primem0ver for doing this! I can already see major possibilities.
     
  10. Ultraman

    Ultraman Warlord

    Joined:
    Feb 27, 2002
    Messages:
    137
    Location:
    Singapore
    Waay cool, dude, waay cool ....
     
  11. Dom Pedro II

    Dom Pedro II Modder For Life

    Joined:
    Apr 3, 2002
    Messages:
    6,811
    Location:
    Exit 16, New Jersey
    This is an extremely ambitious project! :eek:

    I'm very impressed... but I was impressed since the first mod component you put out.

    When is this supposed to be completed?

    I have just been working on a very simple version of some of this to have terrain inflict damage on units... I guess there's no reason to finish it now if this will be out in the relatively near future however.
     
  12. primordial stew

    primordial stew Emperor

    Joined:
    Sep 1, 2005
    Messages:
    1,219
    Location:
    a puddle
    Sounds great :goodjob:

    This plus the Revolutions mod and civilization is done for :mischief:
     
  13. asioasioasio

    asioasioasio Fallout Scrubber

    Joined:
    Mar 4, 2006
    Messages:
    3,058
    Location:
    Poland, EU
    Wow really amazing :) keep it up - it's really great and i think it's much grater that those disasters we will see in next expansion.
     
  14. NeverMind

    NeverMind Proud to be Russian

    Joined:
    Apr 29, 2005
    Messages:
    618
    Gender:
    Male
    Location:
    Moscow, Russia
  15. Wyz_sub10

    Wyz_sub10 CIV Gold - Project Lead

    Joined:
    Nov 26, 2001
    Messages:
    2,425
    Wow. I love this!

    "Out of the box," it's going to be awesome. But I can also see myself playing with it a tonne.

    Is it possible to set civ-specific events?
     
  16. Dom Pedro II

    Dom Pedro II Modder For Life

    Joined:
    Apr 3, 2002
    Messages:
    6,811
    Location:
    Exit 16, New Jersey
    You can't mod the ages to function like seasons of the year for scenarios that move in increments of days/weeks/months?
     
  17. Dubmetender

    Dubmetender Dub's the way of the life

    Joined:
    Feb 27, 2006
    Messages:
    193
    Location:
    Toulouse/france
    harrrghhh !!!

    you put it online before i test it !!! :D :D :D :lol: :lol: :lol:

    This is the "big addon" to the GeneticEra mod, with combination of "graded invisibility" and "vision improvement" !!!

    :goodjob: PrimemOver :goodjob: !!!

    EDIT : it's not online :lol: :lol: :lol: just an announcement
     
  18. primem0ver

    primem0ver Emperor

    Joined:
    Jun 16, 2006
    Messages:
    1,140
    Gender:
    Male
    Location:
    Peoria, AZ
    LOL x 100! Don't forget though that there are good events too!

    Currently all of these types of events affect ALL units. (Though you can specify an event to affect only a certain domain like the "lost at sea" event). Only worker units are immune to environmental events. I don't have a tag that allows for immunity to any particular class of unit though I am considering doing this in a future version.

    About "other conditions"... hmmm... what do you mean? Something like health? (current hitpoints?)... no, but it is an interesting idea.

    I'm fairly certain I could and for something like a WWII scenerio that might come in very handy. But I cannot see it being much for for anything else. The trouble is that with this game the turns at the end are very long and having to wade through years a month (or event a season) at a time might get a little old because of the length of turns.

    By the way, currently the mod has one weakness: turn times (wait between turns) get significantly lengthened earlier in the game. Currently, the length significanlty increases around the beginning of the medieval era and are as long as 10 seconds or more. Some increase is unavoidable with the level of complexity and if it stays at 1-4 seconds longer I don't think it will matter much. But currently some turns in the mid game take a lot longer then I would like. As soon as I get the technical details up, if anyone is a decent programmer I could use some help with this (and with the AI). But I will say it takes a lot less time then my original model would have (which would have cycled through all units on the board). I don't think that this will last through the whole game because as one gets closer to the end of the game, turn time due to events should decrease because towards the end of the game "watch" events become obsolete. ("Watch" events are environmental events because the engine puts units that meet the criteria for a particular event on a "watch list" to keep the engine from having to cycle through every single unit on the world every turn) This should cut down on turn time for units and events as soon as one discovers refrigeration (which is when frostbite and heat exhaustion become obsolete).

    LOL... don't worry about that ;)
     
  19. primem0ver

    primem0ver Emperor

    Joined:
    Jun 16, 2006
    Messages:
    1,140
    Gender:
    Male
    Location:
    Peoria, AZ
    P.S. primordial stew, I will have to check out your revolutions mod.
     
  20. woodelf

    woodelf Bard

    Joined:
    Jun 12, 2003
    Messages:
    15,036
    Location:
    Gallery
    The Moon is in dire need of Events. :D

    No pressure. ;)
     

Share This Page