Matrix Games Forums

Forums  Register  Login  Photo Gallery  Member List  Search  Calendars  FAQ 

My Profile  Inbox  Address Book  My Subscription  My Forums  Log Out

How do I change the events script?

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
  Printable Version
All Forums >> [New Releases from Matrix Games] >> WarPlan >> MODS and Scenarios >> How do I change the events script? Page: [1]
Login
Message << Older Topic   Newer Topic >>
How do I change the events script? - 3/13/2020 6:41:25 AM   
Nachtmahr667

 

Posts: 24
Joined: 11/1/2019
Status: offline
Hello all,

I have a problem. I wanted to add a few annexation events in the "_events" text file of the 1939 scenario. I copy-pasted the event "Germany Annexes Poland" (see 1. below) and only changed the numbers and descriptions in the event I added (see 2. below). In the game, the Poland annexation event works, but my added annexation event doesn't. I don't understand why. Can somebody help me? Thanks in advance!

1.
//Germany Annexes Poland
$Annex
if_Date=1/1/1939
if_Country=42
if_Surrender=true
actionCountry=42
targetCountry=6
lifespan=tillTrigger
xyArea=allHexes
changeBorders
addReportTo=All
text=Germany annexes Western Poland into Greater Germany.
$End

2.
//Germany Annexes North Schleswig
$Annex
if_Date=1/1/1939
if_Country=17
if_Surrender=true
actionCountry=17
targetCountry=6
lifespan=tillTrigger
xyArea=152,67
xyArea=153,67
xyArea=153,66
xyArea=154,67
changeBorders
addReportTo=All
text=Germany Annexes North Schleswig
$End
Post #: 1
RE: How do I change the events script? - 3/17/2020 4:46:21 PM   
AlvaroSousa


Posts: 9927
Joined: 7/29/2013
Status: offline
Should work. I'll test it out and let you know.

_____________________________

Creator Kraken Studios
- WarPlan
- WarPlan Pacific

Designer Strategic Command
- Brute Force (mod) SC2
- Assault on Communism SC2
- Assault on Democracy SC2
- Map Image Importer SC3

(in reply to Nachtmahr667)
Post #: 2
RE: How do I change the events script? - 3/17/2020 4:58:08 PM   
AlvaroSousa


Posts: 9927
Joined: 7/29/2013
Status: offline
The issue is 3 of the 4 hexes Germany already owns. The 4th one does convert. It works.

xyArea=153,67



_____________________________

Creator Kraken Studios
- WarPlan
- WarPlan Pacific

Designer Strategic Command
- Brute Force (mod) SC2
- Assault on Communism SC2
- Assault on Democracy SC2
- Map Image Importer SC3

(in reply to AlvaroSousa)
Post #: 3
RE: How do I change the events script? - 3/18/2020 4:28:40 AM   
Nachtmahr667

 

Posts: 24
Joined: 11/1/2019
Status: offline

quote:

ORIGINAL: Alvaro Sousa

The issue is 3 of the 4 hexes Germany already owns. The 4th one does convert. It works.

xyArea=153,67




Thanks for your reply, Alvaro.

However, it doesn't work for me. Not only does the hex not convert, I also do not get a report in the "turn report" overview. It's as if my added event wasn't there at all. Do I have to make more changes than just add a few lines in that text file? Here is my text flow in that file:

[...]

//UK gets manpower from Poland's fall
$ModifyCountry
if_Date=9/15/1939
if_Country=42
if_Surrender=true
actionCountry=1
lifespan=tillTrigger
manpower=20
text=Polish prime minister and commander Wladyslaw Sikorski, evacuates Polish forces to Allied controlled territory as his country falls to the German invasion. England gains 20 manpower.
addReportTo=Allies
$End

//Germany Annexes North Schleswig
$Annex
if_Date=1/1/1939
if_Country=17
if_Surrender=true
actionCountry=17
targetCountry=6
lifespan=tillTrigger
xyArea=153,67
changeBorders
addReportTo=All
text=Germany Annexes North Schleswig
$End

//Remove Maginot Line
$GiveResource
if_Date=1/1/1939
if_Country=2
if_Surrender=true
actionCountry=6
lifespan=tillTrigger
//no resource
xyArea=146,53,0
xyArea=147,53,0
xyArea=148,53,0
xyArea=149,52,0
xyArea=150,49,0
xyArea=150,50,0
xyArea=150,51,0
xyArea=150,52,0
addReportTo=Axis
text=Germany dismantles the Maginot line for 50 production points.
$End

[...]

(in reply to AlvaroSousa)
Post #: 4
RE: How do I change the events script? - 3/18/2020 10:14:00 AM   
Nachtmahr667

 

Posts: 24
Joined: 11/1/2019
Status: offline
Actually...

I have just noticed something.

In version 1.05, the event "Germany annexes Poland" is no longer an $Annex action, but a $ChangeTerritory action. In my game, the result of this is that Germany no longer acquires those hexes and no border changes take place. The event still contains the line "changeBorders", but that has no effect in game. I manually overwrote this and changed it back to an $Annex action, but that did not result in any change.

By contrast, the event "Germany and USSR split Poland" is still an $Annex action in v1.05 and happens as written, border changes and all.

I reinstalled version 1.04, where the event "Germany annexes western Poland" is still an $Annex action from the start, and the annexation and border changes happen as written.

I have come to the conclusion that any manual changes to the "_events" file are ignored by the game. There must be some other, deeper place that also requires change. But that exceeds my knowledge.

Funnily enough, manual changes in the "scenarioDescription" and the "scenarioGamePlay" files ARE recognized by the game. But not changes in the "_events" file.

Slightly sad,

Alex

(in reply to Nachtmahr667)
Post #: 5
RE: How do I change the events script? - 3/18/2020 11:05:02 AM   
Nachtmahr667

 

Posts: 24
Joined: 11/1/2019
Status: offline
Ok, one final experiment brought certainty: Any manual changes to the "_events" file get indeed completely ignored. First, I completely deleted the "Germany and USSR split Poland" event and the "Germany annexes Poland" event, and then I even renamed the whole file. The game didn't care at all. It was as if I hadn't done anything at all. The game obviously does not access the file. The information it accesses must be stored somewhere else.

I am obviously missing a step. But I don't know what it could be. Something in the scenario file? Something I have to do in the editor? But I don't find anything along the lines of "import" or "update" events in the editor...

Help!

< Message edited by Nachtmahr667 -- 3/18/2020 11:17:51 AM >

(in reply to Nachtmahr667)
Post #: 6
RE: How do I change the events script? - 3/18/2020 6:39:45 PM   
AlvaroSousa


Posts: 9927
Joined: 7/29/2013
Status: offline
Are you forgetting to import scripts before saving?
Read the modding manual.

File/Quit -> Load All Scripts (lower right) -> pick name to save -> Save

_____________________________

Creator Kraken Studios
- WarPlan
- WarPlan Pacific

Designer Strategic Command
- Brute Force (mod) SC2
- Assault on Communism SC2
- Assault on Democracy SC2
- Map Image Importer SC3

(in reply to Nachtmahr667)
Post #: 7
RE: How do I change the events script? - 3/19/2020 12:43:45 AM   
Nachtmahr667

 

Posts: 24
Joined: 11/1/2019
Status: offline
Oops... >.<;; That was it. Thank you!

Now that I know there is a modding manual I hope I will never make such a rookie mistake >.<;;

(in reply to AlvaroSousa)
Post #: 8
Page:   [1]
All Forums >> [New Releases from Matrix Games] >> WarPlan >> MODS and Scenarios >> How do I change the events script? Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts


Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI

1.688