Modding Guide - Scripted Events Cold War

Note: New event types have been added throught the develoment phase.  Whatch for section headers.

In the SCENARIO directory, look for any file "scenario_name.csv"

Look for the section like this example.

&&SEVENTS 324000, 43200, 17, 634, 2303, 2306, False, False, False, False, False, , , , , , , , ,

Columns are as follows...

  • eventtime,
    • Integer value, minimum number of days before event can occur
    • days are multiples of 1440. 7200=5 days
  • eventtimewind,
    • Integer value, maximum number of days past eventtime that event might occur
    • days are multiples of 1440. 7200=5 days
  • eventid,
    • See table below
  • eventparam,
  • eventdbregion,
  • eventotherdbregion,
  • eventbnotally,
  • eventbnotneutral,
  • eventbnotwary,
  • eventbnotifhuman,
  • eventbnotifotherhu,
  • eventparami0,
  • eventparami1,
  • eventparami2,
  • eventparami3,
  • eventparamf0,
  • eventparamf1,
  • eventparamf2,
  • eventparamf3,

Example

This is what it would look like in the file:

324000, 43200, 17, 634, 2303, 2306, False, False, False, False, False, , , , , , , , ,

Breakdown of the above example.

eventtime eventtimewind eventID eventparam eventdbregion eventotherdbregion eventbnotally eventbnotneutral eventbnotwary eventbnotifhuman eventbnotifotherhu eventparami0 eventparami1 eventparami2 eventparami3 eventparamf0 eventparamf1 eventparamf2 eventparamf3
324000 43200 17 634 2303 2306 False False False False False              

Event ID Listing

ID Event Main Param Additional Params Notes
1 Send Email/News Email/News #
  • i0-i3,
  • f0-f3: Bodyfills sent to email msg
If no 'otherregion', or email createtype is not 2/AI, then sent from minister
2 Declare War Email/News # (optional)   Minister will send War Declared on Us email automatically; mainparam is for optional additional email
3 Force Neutral Email/News # (optional)   Cancel Alliance/transit/los or end War; To send a Peace offer use the 'Send Diplomatic Offer' instead
4 Force Alliance Email/News # (optional)   Force Alliance/transit/los; To send a Alliance offer use the 'Send Diplomatic Offer' instead
5 Set or Reset Treaty Treaty Number
  • i0: 0=Reset, 1=Set;
  • i1: 0=No Effects, 1=Approval Effects,
  • i2: 0=Two Way Treaty, 1=One Way Only
Forces a treaty (one way or both ways)
6 Send Diplomatic Offer Treaty Number (or 0)

(-ve for 'Cancel')

  • i0: Tech Design # or 0
  • i1: Unit Design # or 0
  • i2: Product # offer 0-10 [1] (sub 1!)
  • i3: Num Daily Payments ($ and Prod)
  • f0: Offer Cash
  • f1: Ask Cash
  • f2: Offer Prod Quan
  • Treaties with this are both ways
  • Continuous payments not allowed
  • Asking for product not allowed
7 Send Diplomatic Treaty Offer Email/News # (optional)
  • i0: Treaty # to offer; -ve to Revoke
  • i1: Treaty # to request; -ve to Revoke
  • i2: Product # offer 0-10 [2] (sub 1!)
  • i3: Num Daily Payments ($ and Prod)
  • f0: Offer Cash
  • f1: Ask Cash
  • f2: Offer Prod Quan
  • Treaties with this can be one way
  • Supports asking for 'Cancel Treaty'
8 Surrender/Elimination Email/News # (optional)
  • i0: 1=Group/Unify
  • i1: 1=Loyalty Merge;
  • i2: 1=Research Merge
Other Region = Who to Surrender to, or 0 for 'Elimination'

If not 'Group/Unify', then standard Surrender will be used and Region Falls email will be generated

9 UN Diplomatic Offer Units Unit Design #
  • i0: Quantity
  • f0: Amount of cash to Request
Will be sent to bases/capital

This Event does not issue Newsitem 473 ('UN Supplied Units...' news)

10 Create Units Unit Design #
  • i0: Quantity
  • i1: 0=Reserve; 1=Deployd; 2=Dep/Supplied; 3=Dep/Strong
  • i2: Map x-location
  • i3: Map y-location
  • If no location is provided, will be sent to bases/capital
  • Default Deployed (1) units are without fuel or ammo
  • 'Deployed/Strong' (3) creates special High Efficiency/Experience units
11 Set a Victory Hex Email/News # (optional)
  • i0: Map x-location
  • i1: Map y-location
Replaces any prior victory hex
12 Set an AI-Hotspot Request Type [3]
  • i0: Importance 0-10000
  • i1: Number of Units Requested
  • i2: Map x-location
  • i3: Map y-location
 
13 Set Defcon Level New Defcon Level 0-4  
  • Requires Defcon Reversed Number: 0=Peace, 4=War
  • Will prevent invalid defcons due to war/peace.
14 Change Relationships Email/News # (optional)
  • i0: 1=Set Diplo as ABSOLUTE value (otherwise just adjust +/-)
  • i1: 1=Set Civ as ABSOLUTE value (otherwise just adjust +/-)
  • i2: 1=Set Belli as ABSOLUTE value (otherwise just adjust +/-)
  • i3: 1=Apply to BOTH regions (otherwise just 1st)
  • f0: Diplo Relations Value
  • f1: Civilian Relations Value
  • f2: Belli Value
  • Diplo and Civ Relations are usually in -1.0 to +1.0 Range (though may be higher/lower)
  • Belli is usually in 0.0 to 1.0 Range (though may be higher)
15 Adjust Treasury  
  • f0: Amount (+ve or -ve)
Gives or takes away money
16 Adjust Product Stock Which Prod# 0-10
  • f0: Amount (+ve or -ve)
Gives or takes away product stock
17 Set War Email/News # (optional)   Sets a war without any other countries relationships changing - no approval effects, no forced emails, nothing.
Added for Cold War      
18 Set Independence Email/News # (optional)   Colony will declare independence from its parent.

No effect if no longer a colony. 'otherregion' can be specified for 'NOT' conditions (doesn't have to be parent etc) Email is sent with region#, parent# params

19 Coup de'tat Email/News # (optional)   This is a change of leadership by the military. So the leader changes, the gov't is a military dictatorship, and it MAY be funded by an outside source - the 2nd region field, which would draw this country closer to that source in both sphere and relations. (Generic Email is 570)

Email param is region#

20 Leadership change Email/News # (optional) i0: New Leader #; if 0 then random

Deaths, etc... This is so that specific leaders can be put in charge at specific times. Will coincide with an appropriate newsitem. Use Event32 for Elections. Email param is region#, selected leader #

22 Research Email/News # (optional) i0: Tech ID to give finished

i1: Tech ID to start in queue i2: Unit ID to give finished i3: Unit ID to start in queue Gives a Region a Specific tech at a specific time (includes prerequisites) Does not trigger regular discovery emails. Email param is region#, tech#

24 Change Approvals Email/News # (optional) f0: change in DAR or 0

f1: change in MAR or 0 0.90 is 90% of previous value (ie DAR 20% to 18%) 1.2 is 120% of previous (up 20%, ie DAR 20 to 24) Can be up or down. Email param is region#

25 Theatre Settings i0: Theatre priority, -1 for no change

i1: Theatre focus, -1 for no change i2: Map x-location i3: Map y-location

Priority for the country listed, if 0 then for hex owner

Military Priority: 0 to 3 (none to high) Military Focus: 1=Defensive, 2=Balanced (Default), 3=Offensive

26 Flag Change Email/News # (optional) i0: New Flag #

New Flag Email param is region#

29 Move Capital Email/News # (optional) i0: Map x-location

i1: Map y-location Location to move capital to; only successful if new location belongs to region.

30 Change Leader Profile Email/News # (optional) i0: Primary Race

i1: Secondary Race i3: religionstate F0: fanaticism

Change to the default settings in the region database for a leader ex. South Africa Caucasian till the end of Apartheid. This does not automatically do a leadership change to select a new leader that matches new profile.
31 Change Gov't Type Email/News # (optional) i0: New Leader #; if 0 then random

i1: New govtype (1=Democ, 3=Comm etc)

Changes the gov't type cleanly, without civil war.

(No world relations shifts)

32 Election Leader Change Email/News # (optional) i0: New Leader #; if 0 then random

i1: # of days to next election; 0= 4 years

Similar to Event20 but this sets the next election date (for democracies). Default is to set 4 years away.

Email param is region#, selected leader#

33 BattleZone Setting   i0: Battlezone priority, -1 for no change

i1: Battlezone focus, -1 for no change i2: Map x-location i3: Map y-location

Priority for the country listed, if 0 then for hex owner

Military Priority: 0 to 3 (none to high) Military Focus: 1=Defensive, 2=Balanced (Default), 3=Offensive

34 Create Facility Facil Design # i0: (Unused)

i1: 0=Start Constr, 1=Full Strength i2: Map x-location i3: Map y-location

Facility is created, with appropriate complex if needed
35 Influence Change Email/News # (optional) f0: +/- change to world integrity of nation

f1: +/- change versus other regions f2: +/- change in other region belli -ve for worse (higher) belli f3: 1.0: only in our sphere, -1.0: only othsph 0.0 for entire world; partial ok Only affects f1/f2

Signifies an event that has a significant +/- effect on a country's world wide Influence (ex. Kennedy creates Peace Corp gives US a slight influence bump)

Values given in actual %age +/-; -ve is bad/worse Our sphere/other sphere only with other region f1/f2

36 Damage Facilities Email/News # (optional) i0: Map x-location

i1: Map y-location f0: Amount of damage 0.0 - 1.0 (0-100%)

100% (1.0) is completely eliminated, 99% or less leaves damaged. All facilities in hex are damaged.
37 Minister Priority   i0: Cabinet Department

i1: Priority # i2: 0=Off, 1=On

0=Production, 1=Research, 2=Finance, 3=State, 4=NotUsed, 5=Defense
38 Strategic Pool Launch Email/News # (optional) i0: level 0-3 (25%-100%) Region is who pushes Red Button
39 Military Buildup Email/News # (optional)   Trigger AI region to Start military buildup (deploy units, increase alert etc); Optional vs region for target of buildup
Added in 7.3.1      
40 Loyalty Annex Email/News # (optional) i0: Set Capital x-location
i1: Set Capital y-location
Surrenders an area of a region based on Loyalty, to another region.  First region is region surrendering, 2nd region is to.  (2nd region back to life if needed)
If dbregion is zero, then force-transfer to other regardless of owner 
41 Damage Facility (single facility) Facil Design # i0: Map x-location
i1: Map y-location
f0: Amount of Damage - 0.0-1.0 (100%) 
If x/y are zero, then auto-locate
Use 1.0 to remove Facility (100% damage)
Done only if hex=eventregion, if 0 then for hex owner
42 Create Transportation 0: Road, 1:Rail i0: Start Map x-location
i1: Start Map y-location
i2: End Map x-location
i3: End Map y-location
f0: 0.0 - start constr, 1.0 - full str (no tween)
Done only if hexes=eventregion, if 0 then hex owner
43 Transfer BZ Owner Email/News # (optional) i0: Map x-location
i1: Map y-location
All hexes in battlezone owned by dbregion are transferred to otherdbregion
(hex is used to determine what BZ to use).
If dbregion is zero, then force-transfer to other regardless of owner 
44 Transfer Hex Owner Email/News # (optional) i0: Map x-location
i1: Map y-location
Transfer owner of single hex owned by dbregion transferred to otherdbregion
If dbregion is zero, then force-transfer to other regardless of owner 

Special Note regarding Email : Emails are either sent from an AI leader or from a Minister - this is set in the NEWSITEMS list (createdby of '2' for AI leader).

  • When Sent by AI leader: sent FROM 'region' TO 'otherregion'; appears in email of 'otherregion'
  • When Sent by Minister: sent FROM Minister of 'region' ABOUT 'otherregion'; appears in email of 'region'