-
Notifications
You must be signed in to change notification settings - Fork 0
/
event standards.txt
55 lines (36 loc) · 2.83 KB
/
event standards.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
Event Standards:
1) Separate mod-specific events from vanilla files. Mod-specific events should go in their own file, the filename having the prefix "CK2Plus_".
2) Put a header at the top of the event file so we know what's inside, including the range of any namespace events reserved for that file:
namespace = FemRule
#reserved: FemRule.100 to FemRule.199
#######################################
# FEMALE RULER EVENTS
#######################################
3) If the event is part of a group, include a capitalized comment with three pound signs, such as "### FACTION MEETING EVENTS"
4) At the top of the event, include a single comment as to the purpose for that event. Also group the id, title, desc, and picture together. Note that events don't need titles--they're optional.
# an older ruler has a daughter as his/her heir
character_event = {
id = FemRule.100
title = EVTNAME_FemRule_100
desc = EVTDESC_FemRule_100
picture = GFX_evt_noblewoman
5) Use pre-triggers for MTTH events (only--they're not needed for is_triggered_only events). These are included above the trigger on their own, and reduce the # of characters that the event will be considered eligible for (and thus the number of characters that the event will be processed on). So the more pre-triggers which will be valid, the better. You don't have to use pre-triggers in the actual trigger (and note also that, other than the "prisoner" condition, none of them will even work inside the actual trigger).
Valid pre-triggers:
only_rulers = yes
min_age = X
max_age = X
only_playable = yes
capable_only = yes
prisoner = yes/no
only_women = yes
only_men = yes
6) For the trigger, make sure the checks that would eliminate the larger number of characters are put higher than the others. This will reduce processing power.
Example -- the following would take less processing:
culture = english
opinion = { who = ROOT value = 20 }
Than this:
opinion = { who = ROOT value = 20 }
culture = english
7) If possible, put checks for opinions, flags and character modifiers last in the trigger, as they are quite CPU intensive.
8) For namespace events, use "EVTNAME_(namespace)_(eventid)" for the title, "EVTDESC_(namespace)_(eventid)" for the desc, and "EVTOPTA_(namespace)_(eventid)" for any options. These should be grouped together in the localisation file (in the old mod, the entire localisation file separated them so that the entire file was in alphabetical order... don't do this, please). The events in the file should overall be first in alphabetical order for the namespace, and secondly in numerical order for the eventid. That's it.
9) If there's more than one option for an event, try to include a comment by the option saying what it does (I usually put a comment next to the "name" field saying what that option actually reads).