Proposal regarding the event descriptions

kelumden

Second Lieutenant
11 Badges
Jan 4, 2004
104
0
  • Arsenal of Democracy
  • Darkest Hour
  • Europa Universalis III Complete
  • For The Glory
  • Europa Universalis III Complete
  • Europa Universalis III Complete
  • Rome Gold
  • Sword of the Stars
  • Victoria 2
  • 500k Club
  • Pride of Nations
Ever since I played EU2, I believe that the event description language (together with the part describing scenarios and countries) can be made more expressive. The proposal I made here is for the purpose of easing the creation of events.

I think that the language must be made simpler in writing (not necessarily simpler in its potentials). I know perfectly well that this proposal wil require writing a new parser but I believe the work of modders can be facilited. Based on the work of Harvard, I introduce a revised language. Nothing revolutionnary here, but just relying on my knowledge of programming languages.

The current syntax is given in blue, the proposed one in red. Keywords will be in bold.

The proposal appears in following messages.
 

kelumden

Second Lieutenant
11 Badges
Jan 4, 2004
104
0
  • Arsenal of Democracy
  • Darkest Hour
  • Europa Universalis III Complete
  • For The Glory
  • Europa Universalis III Complete
  • Europa Universalis III Complete
  • Rome Gold
  • Sword of the Stars
  • Victoria 2
  • 500k Club
  • Pride of Nations
Including an event file

event = "edit\my_events_eng.txt"

becomes

include "edit\my_events_eng.txt"

The difference lies in the use of the keyword « include » and the suppression of the superfluous equal sign.
The same syntax is used to include the events into the scenario.
Event definition

The structure of the definition of an event will not change much:

event = {
id = 99999
...
}


becomes

event 99999 {
...
}


The id of the event appears here because every event must have an id. I reckongnize that this is not a big change.

For the purpose of clarity and information of the player, an event is given a name and a description.

name = "EVENTNAME3704"
desc = "EVENTHIST3704"


becomes

name "EVENTNAME3704"
desc "EVENTHIST3704"


The same rules for the definition of the name and the description as exist in EU2 apply. However, now, they are optional if the event is strictly reserved to the AI.

Frequency of occurences


Actually, en event happens only once excepted when it is random.

random = yes | no

becomes

random every 99 days | weeks | monthes | years | centuries

By not specifying the keyword random, the event occurs only once. When random is specified, the event can occurs many times with the same rules as are applied now.
The keyword every introduces a minimum interval between occurences of the event. The interval is expressed in days, weeks, monthes, years or even centuries.This interval is optional.​
 

Jayavarman

★ ★ ★ ★ ★
83 Badges
Feb 8, 2002
11.164
1.578
  • Crusader Kings III
  • Surviving Mars
  • Europa Universalis IV
  • Hearts of Iron IV: Expansion Pass
  • Rome: Vae Victis
  • Crusader Kings II: Horse Lords
  • Europa Universalis: Rome Collectors Edition
  • Europa Universalis III: Collection
  • Europa Universalis IV: Pre-order
  • Victoria 2 Beta
  • Elven Legacy Collection
  • Crusader Kings II: Holy Knight (pre-order)
  • Cities: Skylines
  • 500k Club
  • 200k Club
  • Heir to the Throne
  • Europa Universalis III Complete
  • For The Glory
  • Rise of Prussia
  • Victoria 2: Heart of Darkness
  • Victoria 2: A House Divided
  • Achtung Panzer
  • Supreme Ruler 2020
  • Victoria: Revolutions
  • Deus Vult
  • Arsenal of Democracy
  • Imperator: Rome
  • Crusader Kings II: Jade Dragon
  • Crusader Kings II: Monks and Mystics
  • Semper Fi
  • Crusader Kings II: Reapers Due
  • Cities: Skylines - After Dark
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Way of Life
  • Crusader Kings II: Sunset Invasion
  • East India Company Collection
  • Diplomacy
  • Commander: Conquest of the Americas
  • Divine Wind
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Rajas of India
  • Crusader Kings II
  • Hearts of Iron II: Armageddon
  • Hearts of Iron III: Their Finest Hour
  • Europa Universalis III Complete
  • Lost Empire - Immortals
  • Lead and Gold
  • Hearts of Iron Anthology
  • Hearts of Iron III
  • Europa Universalis IV: Call to arms event
While I will keep an open mind, I always like the "=" and such. It made it mathematical and orderly to me. :D
 

Hallsten

Hairloss Ninja
36 Badges
Mar 17, 2001
5.273
62
  • Crusader Kings II
  • 500k Club
  • Europa Universalis: Rome
  • Europa Universalis IV: Res Publica
  • Europa Universalis III Complete
  • Europa Universalis III Complete
  • Heir to the Throne
  • Hearts of Iron III
  • Europa Universalis IV: Call to arms event
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Conquest of Paradise
  • Divine Wind
  • Deus Vult
  • Crusader Kings II: Sword of Islam
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: The Republic
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: Charlemagne
  • Europa Universalis III
  • Hearts of Iron II: Armageddon
  • Crusader Kings II: Horse Lords
  • 200k Club
  • Crusader Kings II: Conclave
  • Crusader Kings II: Reapers Due
  • Crusader Kings II: Monks and Mystics
  • Crusader Kings II: Jade Dragon
  • Crusader Kings II: Holy Fury
  • Crusader Kings II: Way of Life
  • Europa Universalis: Rome Collectors Edition
  • Europa Universalis III: Collection
  • Crusader Kings II: Holy Knight (pre-order)
  • Rome: Vae Victis
  • Europa Universalis IV
Jayavarman said:
While I will keep an open mind, I always like the "=" and such. It made it mathematical and orderly to me. :D
Seconded. The "=" adds a sense of decisiveness... :)
 

kelumden

Second Lieutenant
11 Badges
Jan 4, 2004
104
0
  • Arsenal of Democracy
  • Darkest Hour
  • Europa Universalis III Complete
  • For The Glory
  • Europa Universalis III Complete
  • Europa Universalis III Complete
  • Rome Gold
  • Sword of the Stars
  • Victoria 2
  • 500k Club
  • Pride of Nations
Area of applicability

Those statement tell which country is affected by the event, stating a province implies that the event affect the country owning the province.

country = BUR
becomes country BUR

and

province = 9
becomes province 9

Both keywords can be extended to specify a list of countries or a list of provinces. More refinement is needed here.​

Period of applicability

The period during which the event can occur is currently stated by three instructions:

date = { day = 1 month = october year = 1773 }
offset = 30
deathdate = { day = 1 month = october year = 1820 }


The proposal is:

from 01-10-1773 till 01-1-1820 during 5 days every 30 days

The meaning is slightly altered: it states a period (during), between the two dates, that will repeat at regular interval (every).​
 

kelumden

Second Lieutenant
11 Badges
Jan 4, 2004
104
0
  • Arsenal of Democracy
  • Darkest Hour
  • Europa Universalis III Complete
  • For The Glory
  • Europa Universalis III Complete
  • Europa Universalis III Complete
  • Rome Gold
  • Sword of the Stars
  • Victoria 2
  • 500k Club
  • Pride of Nations
Trigger condition

The trigger condition statement will not change very much.

trigger = {
atwar = yes
}


becomes

trigger {
atwar = yes
}


Here, the equal sign remains as it denotes the fact the condition is met.

The grouping statement (and, or, not) may (or not) stay the same, excepted the '=' will disappear.​
 

unmerged(6777)

Field Marshal
Dec 10, 2001
12.470
5
Not wishing to rain on your parade, or take away your enjoyment of thinking up a slightly different system; but your suggestions will bear little or no resemblance to the EU3 event syntax.
 

Jayavarman

★ ★ ★ ★ ★
83 Badges
Feb 8, 2002
11.164
1.578
  • Crusader Kings III
  • Surviving Mars
  • Europa Universalis IV
  • Hearts of Iron IV: Expansion Pass
  • Rome: Vae Victis
  • Crusader Kings II: Horse Lords
  • Europa Universalis: Rome Collectors Edition
  • Europa Universalis III: Collection
  • Europa Universalis IV: Pre-order
  • Victoria 2 Beta
  • Elven Legacy Collection
  • Crusader Kings II: Holy Knight (pre-order)
  • Cities: Skylines
  • 500k Club
  • 200k Club
  • Heir to the Throne
  • Europa Universalis III Complete
  • For The Glory
  • Rise of Prussia
  • Victoria 2: Heart of Darkness
  • Victoria 2: A House Divided
  • Achtung Panzer
  • Supreme Ruler 2020
  • Victoria: Revolutions
  • Deus Vult
  • Arsenal of Democracy
  • Imperator: Rome
  • Crusader Kings II: Jade Dragon
  • Crusader Kings II: Monks and Mystics
  • Semper Fi
  • Crusader Kings II: Reapers Due
  • Cities: Skylines - After Dark
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Way of Life
  • Crusader Kings II: Sunset Invasion
  • East India Company Collection
  • Diplomacy
  • Commander: Conquest of the Americas
  • Divine Wind
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Rajas of India
  • Crusader Kings II
  • Hearts of Iron II: Armageddon
  • Hearts of Iron III: Their Finest Hour
  • Europa Universalis III Complete
  • Lost Empire - Immortals
  • Lead and Gold
  • Hearts of Iron Anthology
  • Hearts of Iron III
  • Europa Universalis IV: Call to arms event
MrT said:
Not wishing to rain on your parade, or take away your enjoyment of thinking up a slightly different system; but your suggestions will bear little or no resemblance to the EU3 event syntax.
Why? What does the EU3 event syntax look like?
 

kelumden

Second Lieutenant
11 Badges
Jan 4, 2004
104
0
  • Arsenal of Democracy
  • Darkest Hour
  • Europa Universalis III Complete
  • For The Glory
  • Europa Universalis III Complete
  • Europa Universalis III Complete
  • Rome Gold
  • Sword of the Stars
  • Victoria 2
  • 500k Club
  • Pride of Nations
Action

Most changes will happen here.

action_a ={ #Ok
name = "Crush the rebellion!"
...​
}

becomes

action "Crush the rebellion!" {
...
}

As a corrollary of the new syntax, the number of actions is no more restricted to 4. However, a practical limit can always be inforced to avoid overly long lists of options.

Frequency of selection of options remains as is with EU2, the first appearing option being granted 85 parts, the others 5 parts. However, the frequency can be altered by the introduction of the keyword frequency, followed by an integer:

action "Crush the rebellion!" {
frequency 50
...​
}


Commands will also be simplified. I will not go here into details of each and every command. I take an example of what can happen:

command = { type = casusbelli which = FRA value = 12 }


becomes

casusbelli with FRA 12 monthes

However, additional instructions can be introduced:

if { condition } { ... }
This introduces an additional level of control in the actions where some commands can occur or not depending on specific conditions (the same as for triggers ?).

desc "Description"
A short description of the effects of what would occur when this course of actions is taken. I never feel that the information provided about the in-game effects of the choice is a good thing (the pop-up window, telling you what will change).
I favour a short description of the possible consequence of the choice. In the above example, this can be something like: "The population will not be happy with this course of action, fearing further repressions. Beware of potential revolts in your realm !", while the now hidden in-game effects are really an increase of the risk of revolt in one or more provinces and a drop in stability.
 

Ayeshteni

Jehanne's Slave
102 Badges
Jul 31, 2002
6.274
94
  • 500k Club
  • Europa Universalis III Complete
  • March of the Eagles
  • Europa Universalis III Complete
  • Penumbra - Black Plague
  • Europa Universalis IV: Res Publica
  • Europa Universalis: Rome
  • Semper Fi
  • Sengoku
  • Victoria 2
  • Victoria 2: A House Divided
  • Rome: Vae Victis
  • 200k Club
  • Heir to the Throne
  • Cities: Skylines
  • Crusader Kings II: Holy Knight (pre-order)
  • Europa Universalis III: Collection
  • Europa Universalis IV: El Dorado
  • Europa Universalis IV: Pre-order
  • Pride of Nations
  • Rise of Prussia
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Cossacks
  • Stellaris: Necroids
  • Europa Universalis III
  • Hearts of Iron II: Armageddon
  • Crusader Kings II
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sword of Islam
  • Darkest Hour
  • Deus Vult
  • A Game of Dwarves
  • Divine Wind
  • Europa Universalis IV
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Call to arms event
  • For The Glory
  • For the Motherland
  • Hearts of Iron III
  • Hearts of Iron III: Their Finest Hour
Aaaaaaaaaaaaaaaaaaaggg no.

It just wouldn't be EU series. Writing out new event sequences for mods and so forth will require me to recheck EVERYTHING to the new system, I'll forget which is the new, which is the old, which is unchanged.

Shudder. :D

Ayeshteni
 

kelumden

Second Lieutenant
11 Badges
Jan 4, 2004
104
0
  • Arsenal of Democracy
  • Darkest Hour
  • Europa Universalis III Complete
  • For The Glory
  • Europa Universalis III Complete
  • Europa Universalis III Complete
  • Rome Gold
  • Sword of the Stars
  • Victoria 2
  • 500k Club
  • Pride of Nations
About compatibility

I am aware of the problem of compatibility between the events in EU2 and the ones that could be devised using those proposal.

Most of the current events can be translated by source-to-source translation (you can find more information on this topic by searching the Web). The few differences taht can not be handled by an automated process will have to be dealt with by hand !
 

Registered

Procrastinator extraordinaire
40 Badges
Oct 23, 2003
3.516
7
  • Europa Universalis IV: Mare Nostrum
  • 200k Club
  • 500k Club
  • Cities: Skylines
  • Cities: Skylines Deluxe Edition
  • Europa Universalis III: Collection
  • Europa Universalis IV: El Dorado
  • Europa Universalis IV: Pre-order
  • Europa Universalis IV: Common Sense
  • Europa Universalis IV: Cossacks
  • Victoria 2: Heart of Darkness
  • Stellaris
  • Europa Universalis IV: Rights of Man
  • Steel Division: Normandy 44
  • Europa Universalis IV: Mandate of Heaven
  • Europa Universalis IV: Third Rome
  • Europa Universalis IV: Cradle of Civilization
  • Europa Universalis IV: Rule Britannia
  • Europa Universalis IV: Dharma
  • Europa Universalis IV: Golden Century
  • For the Motherland
  • Crusader Kings II
  • East India Company
  • Europa Universalis III
  • Europa Universalis III Complete
  • Divine Wind
  • Europa Universalis IV
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Wealth of Nations
  • For The Glory
  • Hearts of Iron II: Armageddon
  • Hearts of Iron III
  • Hearts of Iron III: Their Finest Hour
  • Heir to the Throne
  • Europa Universalis III Complete
  • Europa Universalis III Complete
  • Europa Universalis IV: Res Publica
  • Semper Fi
  • Victoria 2
  • Victoria 2: A House Divided
MrT said:
Not wishing to rain on your parade, or take away your enjoyment of thinking up a slightly different system; but your suggestions will bear little or no resemblance to the EU3 event syntax.
Does the EUIII syntax resemble the EUII syntax or have they overhauled it completely?
 

kelumden

Second Lieutenant
11 Badges
Jan 4, 2004
104
0
  • Arsenal of Democracy
  • Darkest Hour
  • Europa Universalis III Complete
  • For The Glory
  • Europa Universalis III Complete
  • Europa Universalis III Complete
  • Rome Gold
  • Sword of the Stars
  • Victoria 2
  • 500k Club
  • Pride of Nations
MrT said:
Not wishing to rain on your parade, or take away your enjoyment of thinking up a slightly different system; but your suggestions will bear little or no resemblance to the EU3 event syntax.
No offense taken !

The idea behind my proposal is to simplify the language. I will wait to see what happen with EU3.

BTW, if I was the one who design EU3, I would stay with the same syntax as for EU2 because it means (1) that the parsing engine already exists (and must therefore not be rewritten) and (2) that the current set of events can be recycled with few or no change. Who said "reuse" ?
 

kelumden

Second Lieutenant
11 Badges
Jan 4, 2004
104
0
  • Arsenal of Democracy
  • Darkest Hour
  • Europa Universalis III Complete
  • For The Glory
  • Europa Universalis III Complete
  • Europa Universalis III Complete
  • Rome Gold
  • Sword of the Stars
  • Victoria 2
  • 500k Club
  • Pride of Nations
Hallsten said:
Seconded. The "=" adds a sense of decisiveness... :)
It may make sense in a mathematical way where it means equality, but here we deal with a domain-specific language and I feel that the whole bunch of "=" and "{" ... "}" is unnecessary and error prone.
 

unmerged(6777)

Field Marshal
Dec 10, 2001
12.470
5
Let's just say that it almost certainly won't look like this.

Code:
[ID]	 MAIN
         LCLC  &P(5)
         LCLA  &I,&N,&X
&I       SETA  0
&N       SETA  1
&X       SETA  1
.LOOP1   ANOP
&I       SETA  &I+1
         AIF   (&I GT K'&SYSPARM.LOOP1X
         AIF   ('&SYSPARM'(&I,1) NE ',').LOOP1
&P(&X)   SETC  '&SYSPARM'(&N,&I-&N)
&N       SETA  &I+1                
&X       SETA  &X+1                
         AGO   .LOOP1              
.LOOP1X  ANOP                      
&P(&X)   SETC  '&SYSPARM'(&N,&I-&N) 
&I       SETA  0                   
.LOOP2   ANOP
&I       SETA  &I+1                
         AIF   (&I GT &X).LOOP2X   
         AIF   ('.&P(&I)' EQ '.').LOOP2
         AIF   ('.&P(&I)' EQ '.OPT').OPT
         AIF   ('.&P(&I)' EQ '.NOOPT').NOOPT
         AIF   ('.&P(&I)' EQ '.DEBUG').DEBUG
         AIF   ('.&P(&I)' EQ '.NODEBUG').NODEBUG
         AGO   .LOOP2            
.*
.OPT     ANOP
&OPT     SETB  1
         MNOTE 0,'Text to follow'
         AGO   .LOOP2
.*
.NOOPT   ANOP
&OPT     SETB  0
         MNOTE 0,'Text to follow'
         AGO   .LOOP2
.*
.DEBUG   ANOP
&DBG     SETB  1
         MNOTE 0,'Text to follow'
         AGO   .LOOP2
.*
.NODEBUG ANOP
&DBG     SETB  0
         MNOTE 0,'Text to follow'
         AGO   .LOOP2
.*
.LOOP2X  ANOP      
.EXIT    ANOP       
         MEND

:D
 

Hallsten

Hairloss Ninja
36 Badges
Mar 17, 2001
5.273
62
  • Crusader Kings II
  • 500k Club
  • Europa Universalis: Rome
  • Europa Universalis IV: Res Publica
  • Europa Universalis III Complete
  • Europa Universalis III Complete
  • Heir to the Throne
  • Hearts of Iron III
  • Europa Universalis IV: Call to arms event
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Conquest of Paradise
  • Divine Wind
  • Deus Vult
  • Crusader Kings II: Sword of Islam
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: The Republic
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: Charlemagne
  • Europa Universalis III
  • Hearts of Iron II: Armageddon
  • Crusader Kings II: Horse Lords
  • 200k Club
  • Crusader Kings II: Conclave
  • Crusader Kings II: Reapers Due
  • Crusader Kings II: Monks and Mystics
  • Crusader Kings II: Jade Dragon
  • Crusader Kings II: Holy Fury
  • Crusader Kings II: Way of Life
  • Europa Universalis: Rome Collectors Edition
  • Europa Universalis III: Collection
  • Crusader Kings II: Holy Knight (pre-order)
  • Rome: Vae Victis
  • Europa Universalis IV
MrT said:
Let's just say that it almost certainly won't look like this.

Code:
[ID]	 MAIN
         LCLC  &P(5)
         LCLA  &I,&N,&X
&I       SETA  0
&N       SETA  1
&X       SETA  1
.LOOP1   ANOP
&I       SETA  &I+1
         AIF   (&I GT K'&SYSPARM.LOOP1X
         AIF   ('&SYSPARM'(&I,1) NE ',').LOOP1
&P(&X)   SETC  '&SYSPARM'(&N,&I-&N)
&N       SETA  &I+1                
&X       SETA  &X+1                
         AGO   .LOOP1              
.LOOP1X  ANOP                      
&P(&X)   SETC  '&SYSPARM'(&N,&I-&N) 
&I       SETA  0                   
.LOOP2   ANOP
&I       SETA  &I+1                
         AIF   (&I GT &X).LOOP2X   
         AIF   ('.&P(&I)' EQ '.').LOOP2
         AIF   ('.&P(&I)' EQ '.OPT').OPT
         AIF   ('.&P(&I)' EQ '.NOOPT').NOOPT
         AIF   ('.&P(&I)' EQ '.DEBUG').DEBUG
         AIF   ('.&P(&I)' EQ '.NODEBUG').NODEBUG
         AGO   .LOOP2            
.*
.OPT     ANOP
&OPT     SETB  1
         MNOTE 0,'Text to follow'
         AGO   .LOOP2
.*
.NOOPT   ANOP
&OPT     SETB  0
         MNOTE 0,'Text to follow'
         AGO   .LOOP2
.*
.DEBUG   ANOP
&DBG     SETB  1
         MNOTE 0,'Text to follow'
         AGO   .LOOP2
.*
.NODEBUG ANOP
&DBG     SETB  0
         MNOTE 0,'Text to follow'
         AGO   .LOOP2
.*
.LOOP2X  ANOP      
.EXIT    ANOP       
         MEND

:D
Somehow I'm not sorry for that... ;)

What is that anyway?