I checked the ablity to modify an event at https://www.galciv2.com/mods/gc2modsdoc.htm#Events and will outline what changes I wish in stages from (what I think is) the most simple to the most complicated. I don't know of course, I haven't seen cold hard code to tell what's possible. Here's what I have to propose:
Phase 0: GOOD THINGS TO HAVE FOR ANY PHASE OF THIS MODIFICATION
0.1 NEXT EVENT TURN Use this line to set when the next event will fire. Can use any positive integer, any positive integer range (eg. 3-10) or the word RANDOM which will use the current random timer to divine when the next event fires. Note that it may not be a good idea to keep RANDOM, as your plot might then hang in more complicated implementations of this plot device.
0.2 Change GOOD/NEUTRAL/EVIL-OPTION to GOOD/NEUTRAL/EVIL-OPTION# eg. GoodOption01, NeutralOption03 The only thing that these will do now is set the icon (just in case you can't figure out which is an evil act) and keep the VALUE, ATTRIBUTE, WEIGHT, AND POPCHANGE working correctly... or with less modification... maybe? The idea is here to allow more than 1 of each morality choice, and perhaps even allow more than 3 choices.
0.3 Name tokens in dialogue. PLAYERRACE# and PLAYERNAME# (# if randoms allowed in multiplayer), and AIRACE# AINAME# for each AI in play, whatever their race and name may be. Will help in making generic, interracial randoms.
0.4 Replace values with keywords where possible. This will make things longer to type out, but easier to check and therefore modify.
Phase 1: LINEAR, LINKED, PLOTLINE EVENTS.
Though the controls are complete for a single, encapsulated event, a linked number of events require 2 things:
1.1 NEXT EVENT This line will dictate which event to fire next time there is a random event; Use the internal name or RANDOM if there is no specific event to fire after this one
1.2 RANDOM EVENT? Set this to NO if you don't want it fired on a RANDOM event selection. Ensures you don't start a set of linked events within the middle of a linked set, causing chaos and confusion.
Phase 2: MULTILINEAR, LINKED PLOTLINE EVENTS.
2.1 Discard NEXT EVENT as a part of EVENT. And change to GOOD/NEUTRAL/EVIL-OPTION NEXT EVENT, or if you've managed to follow 0.2, GOOD/NEUTRAL/EVIL-OPTION# NEXT EVENT. Now, each choice has a next event attached to it, and therefore you can control the next event as a result of the previous event's choice. Choose-your-own-adventure here we come!
Phase 3: A MORE COMPLICATED AND DISCRIMINATING EVENTTYPE
3.1 EVENTTYPE becomes a group, rather than a single number. This number (the type of event that triggers the random) is now known as SITUATIONS.
3.1.1 SITUATIONS should obtain a lot of additional values.
-For instance, colonizing a world might be broken down into 3 values, one for a 5-9 class world, another for a 10-14 class world, and so on. Ideally, there should be a value/keyword for the following:
-colonizing a world (preferably in a class grouping)
-Invading a world, AND if that invasion succeeded or failed. (preferably, it should also be known who the defending race was, if it was a major race, or MINOR if it was a minor race)
-Defending a world from Invasion, and if that defense succeeded or failed. (again, knowing the other player involved would be a good thing to know)
-Discovering an anomaly (classed by anamoly type would be preferable)
-establishing a Starbase (its type and the territory its in is useful information.)
-ANY, for those generic end-of-turn events that are the norm right now.
3.1.2 Instead of reading a single number, SITUATIONS should be able to read any number of numbers and use them as if it was a large, block IF statement. For instance, a event might trigger due to a planetary defense OR planetary attack.
3.2 OTHER RACE INVOLVED could be sent as an alternative to lumping the type of event with who else was involved. In fact, it would be the better way to do it, from a design standpoint. Or my standpoint. Anyway, values for all major races and one value for when another race isn't involved, such as with minor races, uninhabited planets or things done in neutral space. If something is done in your own space, It may be a good idea to make this respond with your own empire, to help preq. internally triggered plotlines.
3.3 RACE RELATIONS WITH is a set of two values, one being the race, the other the required relationship. All areas from AT WAR to ALLIANCE should be covered, one value for UNKNOWN (haven't found them yet) and one extra value for active trading or embargoing.
So, now we have a plot that develops according to the player's choice and can be triggered by any number of specific events. What's left?
phase 4: Multiple plots at once.
4.1 Take any small number, and make an 2 arrays out of it. Let us say...4. Each cell of the array has one of three values:
-A specific event to play.
-choose any random event, or any event that matches prerequisites.
-a Event complete flag.
How this works is like a randomized playlist; It moves through ONE of the arrays. Whenever it plays an event, it flags the cell. If any event calls for another event, it is sent to a random cell that has random in it as its event play in the inactive array. Once the active array is complete, it resets the array to all random values and switches active and inactive arrays.
The reason to do this is to limit the amount of time to the next plot point to a reasonable level, while allowing multiple plots to be played at once.
There. That's my idea. Or the beginning of one. It'd be great if there was more links between events, the UP and the actual gameworld. For instance, an anomaly that triggers a random event that in turn places a ship, or gives a otherwise unavailable technology, in turn discussed in the UP. Or even a UP decision that causes a plot within one's empire on how you implemented that solution, or the problems it caused. More on that when I think on how actual, bona fide scripts would work.