Is scripting(_events.txt) working?

Warplan is a World War 2 simulation engine. It is a balance of realism and playability incorporating the best from 50 years of World War 2 board wargaming.

Moderator: AlvaroSousa

Post Reply
Isoko
Posts: 84
Joined: Fri May 19, 2017 1:43 pm

Is scripting(_events.txt) working?

Post by Isoko »

Europe 1939

_events.txt

//##########################################
//UK give A.I. transports and landing craft
$ModifyCountry
if_Date=3/1/1942
actionCountry=1
lifespan=tillTrigger
AIOnlyEvent=Allies
transports=35
landingCraft=20
$End

I changed as follows

$ModifyCountry
if_Date=9/15/1939
actionCountry=1
lifespan=tillTrigger
transports=35
landingCraft=20
$End

I played Allies.
I checked UK(9/15/1939 turn)
Transports and landingcraft were not increased.

Is $ModifyCountry AI only?

_events.txt

//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

I played Allies.
I checked UK(9/15/1939 turn)
The message is not displyed.
Manpower is not increased.

I checked output_log.txt.

Excerpt
(Filename: Line: 216)

Unloading 2 Unused Serialized files (Serialized files now loaded: 0)
UnloadTime: 5.992800 ms

Unloading 3882 unused Assets to reduce memory usage. Loaded Objects now: 575.
Total: 63.655000 ms (FindLiveObjects: 0.880600 ms CreateObjectMapping: 0.282600 ms MarkObjects: 26.008900 ms DeleteObjects: 36.482500 ms)

Unloading 4 Unused Serialized files (Serialized files now loaded: 0)
UnloadTime: 1.451600 ms

Unloading 33 unused Assets to reduce memory usage. Loaded Objects now: 1199.
Total: 30.278100 ms (FindLiveObjects: 0.735500 ms CreateObjectMapping: 0.041400 ms MarkObjects: 27.976600 ms DeleteObjects: 1.524500 ms)

Unloading the last loaded scene Assets/game.unity(build index: 1), is not supported. Please use SceneManager.LoadScene()/EditorSceneManager.OpenScene() to switch to another scene.

(Filename: Line: 216)

Please tell me.
What should I do?
Isoko
Posts: 84
Joined: Fri May 19, 2017 1:43 pm

RE: Is scripting(_events.txt) working?

Post by Isoko »

I understand the cause.
I did not follow the steps below.
Change scripts(I only did this)
Open editer
Push File/Quit
Push Load All Scripts
Save File
User avatar
AlvaroSousa
Posts: 12107
Joined: Mon Jul 29, 2013 7:13 pm
Contact:

RE: Is scripting(_events.txt) working?

Post by AlvaroSousa »

Why not just add the values directly to the countries?
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
Isoko
Posts: 84
Joined: Fri May 19, 2017 1:43 pm

RE: Is scripting(_events.txt) working?

Post by Isoko »

I think this event(UK give A.I. transports,landing craft and Give Allied A.I. escorts,etc)is Lend-Lease Acts.
So I dont add the values directly to the contries.
Post Reply

Return to “WarPlan”