Modeling Events, & Notes For Additional Events

Ozymandias

In Terra Fantasia
Supporter
Joined
Nov 5, 2001
Messages
10,826
Location
The lone and level sands
An “Event” can be defined as:

• An algorithmically defined change to any "Game State," with or without an RNG.
Spoiler Game States :
"Game State" refers to the specific conditions which are in place, both before and after, an Event is Triggered. An Event can thereby be considered as a , "Game State Transformation."

• Belongs to an “Event Type.”
Spoiler Event Types :
However ineptly conceived and implemented, Civ3 does have numerous Events. Of course, I am not suggesting that any of these be mimicked: nonetheless, the existing Events do suggest a useful, overall organization -

Terrain Transformations -
  • Volcano Eruptions
  • Global Warming
  • (“Atlantis” in Civ2; etc.)
Economic Transformations -
  • Corruption
  • Production Efficiency
  • City Growth
  • [etc.]
Political Transformations
  • Choice Of Government
  • Managing Happiness / Civil Disorder
  • [etc.]
Cultural
  • Flipping Cities
  • Golden Age
  • [etc.]
Note how many otherwise generally "taken for granted" features can be modeled as Events, which I imagine might be helpful from a design/coding POV.

  • Has a Trigger, or set of Triggers, with or without an RNG, which are required for the Event to happen.
  • Has an outcome which alters the predefined Game State, in whatever manner is specified by he Event.
 
Last edited:
Possible Diplomatic Events & Triggers -

The "Diplomacy" features in Civ 3 are notoriously broken, from the ROP exploit to the "negotiating table" itself. I think it would be easy to borrow Events (and Event features) from both SMAC and Europa Universalis IV. Many of these address "diplomatic" relations between Civs, and could be significant factors for modeling "Diplomatic Events" ("First Contact;" Treaties; "Demand," as in, "Do x, or we're at war.")

From SMAC: Each faction has a set number of "Values," some of which are antithetical to each other. Paraphrasing, here are a few:
  • "Communalist" vs "Capitalism"
  • "Fascist" (Totalitarianism) vs "Democratic"
  • "Religious Devotion" vs ... pretty much anything else - including other religions:
    • NB: This schema allows a ready implementation of both "Religion" and "Religion Type" - and there have been far too many of wars, since the global "implementation" of monotheism, between the latter.
  • "Aggressive" vs "Pacifistic"
From EU4, there can be "condensed" a factor we can call, "Trustworthiness," based upon the likes of:
  • How many wars a Civ has started.
  • How many Treaties it has violated.
  • (There are many more interesting ideas in EU4, but these can wait.)
"Retained" from Civ 3 might be "Favorite/Shunned Government Types."

Combinations of the above might lead to any possible Diplomatic (or other - perhaps "Golden Age") Event, from Trade, to "simple" Demands, to "Ultimatums" - "Change your Religion or it's Holy War time."

Note that this model readily accommodates Religion into the overall scheme of things.
 
Other possible Events / Event Types:
  1. From Civ 2 -
    • Partisans (if a City is captured.)
    • As already mentioned, Terrain Transformations along the lines of "Atlantis."
    • Splitting one Civ into two if a Civil War occurs (in Civ 2, this is triggered by the capture of a City with a Palace in it.
  2. Truly "forking" Tech Trees, being Triggered/ allowed by, e.g., "Traits," or an earlier choice of Tech selections.
    • I implicitly "indicted" monotheism, above, as there have been very few religious wars between polytheistic Civs. Therefore ... ;)
  3. "Forced Government Changes," driven by:
    • "Happiness" (aka, "Torches and pitchforks time.")
    • Corruption (over-extension)
    • (etc.)
- So, now it's "Poll & Comments" time!

:D

 
P.S. - My earlier OO proposal was intended for diagrammatic/task definitions only. A revised one - still for the same intentions - might look something like this:

EVENTS SCHEMATIC.jpg
 
This seems pretty consistent with what I've been mulling over in the architecture thread, but I've been more down in the weeds trying to categorize them all. It occurs to me that there are two notions of an "event": the actual game state change (or trigger) which is an event in C# terms; and the scripted parameters to do something in response which is what players would think of as a game event. The latter would be a function (likely in a mod script) triggered by one or more of the former.
One thing is not clear to me, in your diagram what does a "class" represent? Obviously the "BIQ" needs to define content but it seems like classes should be templates defined in the engine, and the BIQ defines instances of each.
 
One thing is not clear to me, in your diagram what does a "class" represent?

I'm using Class in the traditional OO definition of a set of Objects, set in a "top down" hierarchy. The "top-most" Class contains every possible Attributes for that Class; each level "downwards" inherits all relevant Attributes from the Class "above" it. So:
  • "Class = Units"
    • "Sub Class" = "Unit Type" '
      • Unit Types =
        • Land Unit
        • Sea Unit
        • Air Unit
          • An individual Unit inherit Attributes from its Unit Type, with Values assigned to each Attribute.
A simple example:
  • "Class = Units" contains an "Attribute = Movement Factor "
    • "Sub Class" = "Unit Type" '
      • Unit Types =
        • Land Unit
        • Sea Unit
        • Air Unit
          • An individual Unit inherits its inherited Movement Factor from its Unit Type, and is assigned a Value accordingly

A little more detailed, for the Legionary:

  • "Class = Units" contains every Set of Attributes possible of all Units, including both Movement Factor (as above) and Worker Jobs (recalling that in, Rise Of Rome, a Legionary can build both Roads and Forts.)
  • "Sub Class" = "Unit Type;" in this case Land (which inherits all Attributes for Land, e.g., "Cannot Walk On Water.") The Legionary will inherit the Attributes:
    • Movement Factor
    • Worker Job = Build Roads.*
    • Worker Job = Build Roads Fort
This seems pretty consistent with what I've been mulling over in the architecture thread, but I've been more down in the weeds trying to categorize them all. It occurs to me that there are two notions of an "event": the actual game state change (or trigger) which is an event in C# terms; and the scripted parameters to do something in response which is what players would think of as a game event. The latter would be a function (likely in a mod script) triggered by one or more of the former.

In revisiting my thoughts on modelling Events, it occurred to me that pretty much every game interaction can be defined that way, thereby giving us a near universal template. Examples:
  • Event = "Build Road."
    • Starting State = A Unit on a Tile where no Road exists; Road can be built; and the Unit has the Attribute "Build Road."
      • Trigger = Order to, "Build Road."
    • Ending State = "Road Built" (after N number of turns.)
Obviously the "BIQ" needs to define content but it seems like classes should be templates defined in the engine, and the BIQ defines instances of each.

Agreed! My "example" was meant to be more diagrammatic than "definitive."

---
* Addendum: I put "Worker Jobs" in the "Units" Class, rather than the "Land Units" Category, so that these Attributes can be inherited by the "Sea Unit" category, as well
 
Last edited:
Top Bottom