Okay, I haven't re-scripted the events yet because I'm trying to figure out a way to make the system as flexible as possible. Right now what I have is this:
- only three nations can attempt it: Saxony, Bavaria, and Brandenburg.
- each of these three nations must own six specific German provinces to declare themselves 'The Grand Duchy of Germany', the first step in the process. These provinces are essential contiguous groupings in the area of the nation in question.
- if the ai manages to get all six provinces for one country by accident (normal in-game conquest) then the event fires and changes the ai file, as it's assumed that the power in question is actually interested in attempting unification. Essentially the ai must get the right grouping by accident to embark on the series on its own, which it'll almost never do.
Now the problem at this point is that while I think it's reasonable to require local groupings for the 'Grand Duchy', I don't think it's reasonable to require specific groupings after that to achieve the next step, or the step after, etc. Far too deterministic to my way of thinking.
On the other hand, there's no way to actually count nations up and see if you hold, say, another six German provinces to satisfy the next step. Well, that is, there *wasn't* a way to do this....
Consider this:
An event after the Grand Duchy only fires after a certain time period, if you still hold the relevant initial six provinces, and if your badboy is 5 or less. If so, the event progresses through a series which does the following:
- if badboy is 5, set a flag 'badboy5' and continue.
- if badboy is 4, set a flag 'badboy4' and continue.
- etc.
Once the proper flag is set we reduce the badboy of the nation in question to 0.
Now we move on to a chained series of events for every German province that's part of the series. In essence, these events say 'if owned then add 1 to badboy'. So for every province you own, 1 is added to the badboy score.
After all province events are checked, we move on to the event which takes a look at the badboy. If badboy is 12 or greater (you own the initial six provinces plus at least six more) then fire the next event in the German unification series. If not, go directly to another series of events which checks the flags we set above. So if your flag is 'badboy5' then the event would reset your badboy to 5, moving on; if 'badboy4' then your badboy is reset to 4, and so forth.
In essence, I'm temporarily removing the badboy of the nation in order to use it to count up all of your German holdings to see if you qualify for the next unification event, then resetting your badboy to whatever it was before I mucked with it.
Convoluted, I know, but it's the only way I can think of to actually count up a bunch of provinces. Can anyone see any glaring holes in this logic?
A P.S.: my initial solution was to set relations with a nation that didn't exist to 0, then add one to those relations for each hit (I'd rather not mess with badboy). But if I'm not mistaken, the computer doesn't keep track of relations with powers that don't exist, even within the context of a single series of fired events. Could someone more knowledgeable than myself comment on this?
Max
- only three nations can attempt it: Saxony, Bavaria, and Brandenburg.
- each of these three nations must own six specific German provinces to declare themselves 'The Grand Duchy of Germany', the first step in the process. These provinces are essential contiguous groupings in the area of the nation in question.
- if the ai manages to get all six provinces for one country by accident (normal in-game conquest) then the event fires and changes the ai file, as it's assumed that the power in question is actually interested in attempting unification. Essentially the ai must get the right grouping by accident to embark on the series on its own, which it'll almost never do.
Now the problem at this point is that while I think it's reasonable to require local groupings for the 'Grand Duchy', I don't think it's reasonable to require specific groupings after that to achieve the next step, or the step after, etc. Far too deterministic to my way of thinking.
On the other hand, there's no way to actually count nations up and see if you hold, say, another six German provinces to satisfy the next step. Well, that is, there *wasn't* a way to do this....
Consider this:
An event after the Grand Duchy only fires after a certain time period, if you still hold the relevant initial six provinces, and if your badboy is 5 or less. If so, the event progresses through a series which does the following:
- if badboy is 5, set a flag 'badboy5' and continue.
- if badboy is 4, set a flag 'badboy4' and continue.
- etc.
Once the proper flag is set we reduce the badboy of the nation in question to 0.
Now we move on to a chained series of events for every German province that's part of the series. In essence, these events say 'if owned then add 1 to badboy'. So for every province you own, 1 is added to the badboy score.
After all province events are checked, we move on to the event which takes a look at the badboy. If badboy is 12 or greater (you own the initial six provinces plus at least six more) then fire the next event in the German unification series. If not, go directly to another series of events which checks the flags we set above. So if your flag is 'badboy5' then the event would reset your badboy to 5, moving on; if 'badboy4' then your badboy is reset to 4, and so forth.
In essence, I'm temporarily removing the badboy of the nation in order to use it to count up all of your German holdings to see if you qualify for the next unification event, then resetting your badboy to whatever it was before I mucked with it.
Convoluted, I know, but it's the only way I can think of to actually count up a bunch of provinces. Can anyone see any glaring holes in this logic?
A P.S.: my initial solution was to set relations with a nation that didn't exist to 0, then add one to those relations for each hit (I'd rather not mess with badboy). But if I'm not mistaken, the computer doesn't keep track of relations with powers that don't exist, even within the context of a single series of fired events. Could someone more knowledgeable than myself comment on this?
Max
Last edited: