eu 2 event scripting

eu 2 event scripting - Europa Universalis 2 Event Manual...

Info iconThis preview shows pages 1–5. Sign up to view the full content.

View Full Document Right Arrow Icon
Europa Universalis 2 Event Manual 2001-11-06, Henrik Fåhraeus, (c) Paradox Entertainment 1 Introduction In EU 2, it is possible to implement complicated events by using a custom script language. The events can be set to happen for a certain country at or between certain dates, with optional condition triggers. 2 The Event Files Events are separated into major and flavour events. Although they are scripted exactly the same way, the convention is to place minor events, such as scientists and cultural personalities, in the flavour event files whereas major events go in the major event files. This is just a convention; the event files can be called anything as long as they are included in DB\EVENTS.TXT (whose name is also a convention – it is just included in all of the scenario .EUG files). 2.1 Major Events Major events should be scripted in the files called: DB\EVENTS\MAJOR_XXX.TXT (Where XXX is the country tag.) 2.2 Flavour Events Flavour events should be scripted in the files called: DB\EVENTS\FLAVOR_XXX.TXT (Where XXX is the country tag.) 2.3 Random Events The random events reside in two files: DB\EVENTS\RANDOMEVENTS.TXT
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
and DB\EVENTS\RANDOMRELIGIOUSEVENTS.TXT 2.4 Huge events Some events affect all countries in the world. These are stored in: DB\EVENTS\HUGEEVENTS.TXT and DB\EVENTS\RELIGIOUSEVENTS.TXT 2.5 Event texts The texts for the events reside in the file called: CONFIG\TEXT.CSV This is a comma-separated resource file containing all the in-game text. 3 Event Structure Example event = { id = 3704 trigger = {} random = no country = CHI name = "EVENTNAME3704" desc = "EVENTHIST3704" style = 1 date = { day = 1 month = october year = 1773 } offset = 150 deathdate = { day = 2 month = may year = 1820 } action_a ={ name = "ACTIONNAME3704A" command = { } command = { } command = { }
Background image of page 2
} action_b ={ name = "ACTIONNAME3704B" command = { } command = { } command = { } } action_c ={ name = "ACTIONNAME3704C" command = { } command = { } command = { } } action_d ={ name = "ACTIONNAME3704D" command = { } command = { } command = { } } } This is an empty event that will do nothing, but it will happen sometime from Oct 1, 1773 and 150 days forward. We will now go through each of the commands outlined in the example, in order. 3.1 Id Every event in the game must have a unique id. It is very important that there are no id conflicts. The number of possible ids is 256^4 (4,294,967,296). 1-15000 is reserved by Paradox. Example id = 0300 3.2 Trigger The trigger condition statement is optional. If left out the event will happen on the dates specified, or if directly triggered by another event. Example trigger = { atwar = yes } It is also possible to set several conditions for the trigger.
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Example trigger = { exists = TUR event = 3549 atwar = no } In this case, all three conditions must be true; the default Boolean operator is AND. However, it is also possible to use OR and NOT. Example
Background image of page 4
Image of page 5
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

Page1 / 16

eu 2 event scripting - Europa Universalis 2 Event Manual...

This preview shows document pages 1 - 5. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online