• We have updated our Community Code of Conduct. Please read through the new rules for the forum that are an integral part of Paradox Interactive’s User Agreement.

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.
 
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.​
 
While I will keep an open mind, I always like the "=" and such. It made it mathematical and orderly to me. :D
 
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... :)
 
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).​
 
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.​
 
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.
 
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?
 
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.
 
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
 
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 !
 
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?
 
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" ?
 
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.
 
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
 
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?