Scripts Bug

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

Scripts Bug

Post by Isoko »

I check events scripts.
I added the following events scripts.

$GiveUnit
if_Date=9/15/1939
actionCountry=6
lifespan=tillTrigger
advancement=4
unitID=11
xyArea=149,59
text=Test1
$End

$GiveUnit
if_Date=9/15/1939
actionCountry=1
lifespan=tillTrigger
advancement=4
unitID=11
xyArea=133,60
text=Test2
$End

Bug1 German unit is placed on the Allied turn.
Bug2 Advancement has not been fixed yet.
Bug3 The text is not displayed.

I want you to fix it as soon as possible.
I want the scripts of _giveUnit to be enabled in the player.
User avatar
AlvaroSousa
Posts: 12107
Joined: Mon Jul 29, 2013 7:13 pm
Contact:

RE: Scripts Bug

Post by AlvaroSousa »

text= needs to be name= to name the unit.

text= is only for messaging in the event scripting.

$GiveUnit is only for the A.I.

I'll look at the other items. Thanks.
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: Scripts Bug

Post by Isoko »

Thank you Alvaro.
I want Turn Report to display that a new unit is deployed.
I found addReportTo= needed.
Again I add the following scripts to _events.txt.

$GiveUnit
if_Date=9/15/1939
actionCountry=6
lifespan=tillTrigger
advancement=4
unitID=11
xyArea=149,59
addReportTo=Axis
text=abc
$End

$GiveUnit
if_Date=9/15/1939
actionCountry=1
lifespan=tillTrigger
advancement=4
unitID=11
xyArea=133,60
addReportTo=Allies
text=efg
$End

Select Your Side Hotseat

Result.

9/15/1939
Axis Turn
Turn Report
NoReportsAvailable
abc is not displayed.
German unit is not deployed.

Allies Turn.
Turn Report
efg is displayed.
UK unit is deployed.Unit Advancement is Anti-Tank 1943.
German unit is deployed.Unit Advancement is Anti-Tank 1943.

9/29/1939
Axis Turn
Turn Report
abc is desplayed.

German unit is not deployed at Axis turn.
I think when Axis scripts and Allies scripts are on the same turn, Axis scripts are processed on Allies turn and next Axis turn.
User avatar
AlvaroSousa
Posts: 12107
Joined: Mon Jul 29, 2013 7:13 pm
Contact:

RE: Scripts Bug

Post by AlvaroSousa »

$GiveUnit is ONLY for A.I. not human players. In the event.txt you can use "addReportTo=???" and "Text=???"

But there is no reason to send a report to the A.I. because it doesn't look at them.

If you want to give a human player a unit use the events. Technically you could use give unit in events and make it AI only. Like I noticed I did it accidentally for the A.I. in the events script not the giveUnit script.
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: Scripts Bug

Post by Isoko »

I understand your answer.
I want to give a human player a unit use the events.
I add the following scripts to _events.txt.

$GiveUnit
if_Date=9/15/1939
actionCountry=6
lifespan=tillTrigger
advancement=4
unitID=11
xyArea=149,59
addReportTo=Axis
text=abc
$End

$GiveUnit
if_Date=9/15/1939
actionCountry=1
lifespan=tillTrigger
advancement=4
unitID=11
xyArea=133,60
addReportTo=Allies
text=efg
$End

I thought German units would be deployed in 9/15/1939 Axis Turn.
I thought the text would also be displayed in 9/15/1939 Axis Turn.
But it was in 9/15/1939 Allies Turn that German units were deployed.
The text was displayed in 9/29/1939 Axis Turn..
I think it's a bug.
User avatar
AlvaroSousa
Posts: 12107
Joined: Mon Jul 29, 2013 7:13 pm
Contact:

RE: Scripts Bug

Post by AlvaroSousa »

BTW units are always given at the end of the turn because that is when events take place.
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: Scripts Bug

Post by Isoko »

I think that the process should be changed.
Because Axis units are placed in 9/15/1939 Allies Turn, Axis units will move on the next turn(9/29/1939 Axis turn).
Allies units are placed in 9/15/1939 Allies Turn and Allies units can be moved in 9/15/1939 Allies Turn.
Axis is disadvantageous.

The order of events is strange.
I play Europe 1939.
Axis Turn is first.
Allies Turn is second.

9/1/1939Axis Turn
9/1/1939Allies Turn
9/15/1939Axis Turn
9/15/1939Allies Turn
9/29/1939Axis Turn
9/29/1939Allies Turn
Continue

In other words, there is an event in the middle of the turn, not at the end of the turn.
I understand if it is as follows.

9/1/1939Axis Turn
9/15/1939Allies Turn
9/15/1939Axis Turn
9/29/1939Allies Turn
9/29/1939Axis Turn
10/13/1939Allies Turn
Continue

Axis Turn is first but second.
User avatar
AlvaroSousa
Posts: 12107
Joined: Mon Jul 29, 2013 7:13 pm
Contact:

RE: Scripts Bug

Post by AlvaroSousa »

Then set the date back 2 weeks for the event if it is that important. Simple solution.
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: Scripts Bug

Post by Isoko »

Ok,Alvaro.
Axis event is 2 weeks ago.
The player who makes the scenario is very annoying.
But you will not fix this bug.
This game is very good, but the script is very bad.
User avatar
AlvaroSousa
Posts: 12107
Joined: Mon Jul 29, 2013 7:13 pm
Contact:

RE: Scripts Bug

Post by AlvaroSousa »

It has to be this way for internal coding. Events have to happen at the end of the turn for various reasons.
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
User avatar
Zovs
Posts: 9276
Joined: Sun Feb 22, 2009 11:02 pm
Location: United States

RE: Scripts Bug

Post by Zovs »

ORIGINAL: Isoko

Ok,Alvaro.
Axis event is 2 weeks ago.
The player who makes the scenario is very annoying.
But you will not fix this bug.
This game is very good, but the script is very bad.


Alvaro made the scenario, scripts and game.

Your opinion of why its "very bad" is backed up by what? Your feelings? Your imagination? Your personal opinion?
Image
Beta Tester for: War in the East 1 & 2, WarPlan & WarPlan Pacific, Valor & Victory, Flashpoint Campaigns: Sudden Storm, Computer War In Europe 2
SPWW2 & SPMBT scenario creator
Tester for WDS games
Post Reply

Return to “WarPlan”