Page 1 of 1

War Entry Script

Posted: Sun Jan 06, 2019 11:17 pm
by dhucul2011
Similar to the three scripts to create Croatia.....I have a decision script that fires perfectly and when desired. When YES is chosen then a territory script fires perfectly and creates the new country on the map with its capital. However, the war entry script does NOT fire. The new country remains at 0% allied as it started out in the editor when it did not have a capital.

I tried to follow the exact procedure as there is for Croatia.

Can anyone see an issue with this script? The decision script date is 1939/09/01 to trigger as soon as it meets its conditions. The Territory and War Entry scripts are dated 1940/08/23 so as not to fire until at least that date. Is this a problem? Does the war entry script have to fire immediately after the decision?

{
#NAME= MOD: DE 100 - Free France Joins The Allies
#POPUP= The Free French Mobilize
#IMAGE=
#SOUND=
#FLAG= 1
#TYPE= 1
#AI= 0
#LEVEL= 0
; Set global variable condition to always trigger (dummy value)
#GV= 1[1,100]
; Set link value to always trigger (dummy value)
#LINK= 100[1]
#COUNTRY_ID= 43
#TRIGGER= 100
#ALIGNMENT= 2
#DATE= 1940/09/23
;Set variable conditions:
;1st Line - UK politically aligned with Allies and not surrendered
#VARIABLE_CONDITION= 112 [2] [100] [0]
}


RE: War Entry Script

Posted: Mon Jan 07, 2019 6:00 pm
by BillRunacre
What happens if you reset the #LINK= 100[1] to #LINK= 0[0] and set the date for all of them to be 1939/09/01?

In principle it should then fire as soon as the UK has reached 100% mobilization.

RE: War Entry Script

Posted: Tue Jan 08, 2019 1:17 am
by dhucul2011
Thanks Bill. This is a strange one. I tried it your way and they work.

I also tried linking the territory and war entry scripts to the BEF decision and they work.

The War Entry script just does not work when linked to the Support Free France DE 100 decision.

DE 100...YES

This territory script then works fine to create the country and the capital. (Country 42 already set up in Greenland, country 43 is Free France)

{
#NAME= MOD: DE 100 - Free French Seize French Equatorial Africa
#POPUP= The Free French Seize French Gabon, Congo and the Cameroons
#IMAGE=
#SOUND= battle2.ogg
#FLAG= 1
#TYPE= 1
#AI= 0
#LEVEL= 0
#GV= 1[1,100]
#LINK= 100[1]
#COUNTRY_ID= 42
#RECIPIENT_ID= 43
#REMOVE= 0
#TRIGGER= 100
#DATE= 1939/09/01
#VARIABLE_CONDITION= 112 [2] [100] [0]
#MAP_POSITION= 2,1
#MAP_POSITION= 2,2
#MAP_POSITION= 2,0
#MAP_POSITION= 3,0
#MAP_POSITION= 3,1
}

This War Entry script does NOT work.

{
#NAME= MOD: DE 100 - Free France Joins The Allies
#POPUP= The Free French Mobilize
#IMAGE=
#SOUND=
#FLAG= 1
#TYPE= 1
#AI= 0
#LEVEL= 0
; Set global variable condition to always trigger (dummy value)
#GV= 1[1,100]
; Set link value to always trigger (dummy value)
#LINK= 100[1]
#COUNTRY_ID= 43
#TRIGGER= 100
#ALIGNMENT= 2
#DATE= 1939/09/01
;Set variable conditions:
;1st Line - UK politically aligned with Allies and not surrendered
#VARIABLE_CONDITION= 112 [2] [100] [0]
}


RE: War Entry Script

Posted: Tue Jan 08, 2019 1:44 am
by dhucul2011
A little more info I have seen. Hubert may have to have a look.

After DE 100 YES the territory script works to create Free France 43 with its capital and a few hexes in Greenland.

However, while the capital and the hexes show as Free France Allied 0% on the game map it does NOT show as a country that can be DOW'd on the war map by the Axis. It doesn't show up on the war map at all!

Any ideas?


RE: War Entry Script

Posted: Tue Jan 08, 2019 1:29 pm
by BillRunacre
That is a strange one!

Try changing the variable condition on the war entry script to this:

;1st Line - Free France politically neutral
#VARIABLE_CONDITION= 43 [0] [0] [0]

I'm not promising anything, but it might be worth a shot.

RE: War Entry Script

Posted: Tue Jan 08, 2019 1:30 pm
by BillRunacre
I don't know why it wouldn't appear in the War Maps area. Maybe if it had a Mobilization script moving it slightly towards the Allies it would?

RE: War Entry Script

Posted: Tue Jan 08, 2019 5:01 pm
by dhucul2011
No luck.

After the territory script creates the country with its capital it does not appear on the War Map nor does it appear in the diplomacy screen as it should if its 0% Allied.

The hexes correctly show on the general map so I am thinking that though the territory script added it to the map the game engine is not recognizing the country.

Could I send a save game to you or Hubert? I think it may be a game engine problem.

RE: War Entry Script

Posted: Tue Jan 08, 2019 5:50 pm
by sPzAbt653
I been looking at this since you posted it and I don't know either. I also have a Free France with Territory and the following War Entry scripts and it works. I used 42 for Free France's Country ID.
Link 602[1] is for the DE for Vichy, so I also have a Link for 602[0].

; Free French War Entry:
{
#NAME= Free France Joins The Allies - Vichy Formed
#POPUP=
#IMAGE=
#SOUND= war1.ogg
#FLAG= 1
#TYPE= 1
#AI= 0
#LEVEL= 0
; Set global variable condition to always trigger (dummy value)
#GV= 1[1,100]
; Set link value to always trigger (dummy value)
#LINK= 602[1]
#COUNTRY_ID= 42
#TRIGGER= 100
#ALIGNMENT= 2
#DATE= 1939/09/10
;Set variable conditions:
;1st Line - France politically aligned with Allies and surrendered AND
;2nd Line - Germany politically aligned with Axis and not surrendered
#VARIABLE_CONDITION= 40 [2] [100] [1]
#VARIABLE_CONDITION= 45 [1] [100] [0]
}

RE: War Entry Script

Posted: Tue Jan 08, 2019 5:52 pm
by sPzAbt653
I used an area in NW Africa as Free France, and it shows up in the War Maps.

EDIT: This is with WiE v1.15.

Image

RE: War Entry Script

Posted: Tue Jan 08, 2019 8:47 pm
by dhucul2011
Here is the map after the territory script has run. Notice that Free France has a capital and associated hexes and is Allied 0%.



Image

RE: War Entry Script

Posted: Tue Jan 08, 2019 8:48 pm
by dhucul2011
Notice now that the country does not appear in the War Map. I have zoomed in to make sure its just not under the British Empire one.



Image

RE: War Entry Script

Posted: Tue Jan 08, 2019 8:49 pm
by dhucul2011
And finally, if it is 0% Allied then it should appear in the diplomacy screen.....



Image

RE: War Entry Script

Posted: Wed Jan 09, 2019 8:28 am
by sPzAbt653
I haven't seen this exact thing, and I hope I'm not being annoying, but I have had some similar goofiness in the past and suggest to check this screen, especially the 'Flags'. I'm not saying yours should look like this, but maybe it will put you onto what the issue is.

Image

RE: War Entry Script

Posted: Wed Jan 09, 2019 8:29 am
by sPzAbt653
Something bothers me about your screen shot in Post #10. It is showing two different countries, while I think it might should show the same on both sides, as seen below.

In my case, the FEA [circled blue] is just a label. It starts the scenario as part of France, and when France surrenders the 'FEA' becomes Free France.


Image

RE: War Entry Script

Posted: Wed Jan 09, 2019 4:01 pm
by dhucul2011
My screen is identical to yours (except UK is the Allied parent).

I named the city (that becomes the capital) French Eq Africa. Its just the city name.

The game engine is not recognizing that the territory script created a new country.

I have emailed Hubert.


RE: War Entry Script

Posted: Wed Jan 09, 2019 5:30 pm
by sPzAbt653
I named the city (that becomes the capital) French Eq Africa. Its just the city name.
Ahah, thanks. I thought so but wondered why name a city that, so I brought it up [:)]

RE: War Entry Script

Posted: Wed Jan 09, 2019 7:57 pm
by dhucul2011
Thanks for the ideas. I think that I have tried everything.

I even moved the capital and the hexes away from edge of the map just in case the territory script didn't like the fact that there were a couple of those map edge "half" hexes....nope.

Anyway, hopefully Hubert can help. It's probably something ridiculously simple. [8|]

RE: War Entry Script

Posted: Tue Jan 15, 2019 1:17 am
by dhucul2011
I have figured it out....partly.

The Territory script to transfer French Equatorial Africa to a new country called Free France did not like the fact that it was being asked to transfer a capital to a new capital. It transferred the hexes on the game map but did not register the new country in the game engine. Thus the War Entry did not fire. I am not sure if this is WAD but Hubert may want to look at this.

I don't believe there is a way (and no in game example) to transfer an entire country to a new country with the same capital and hexes. All transfers via Surrender or Territory scripts are transferring all or part of a country to another country with a different capital.

Anyway, I used the Surrender script to transfer the hexes from France directly to Free France, just like the Vichy scripts and then the War Entry worked.




RE: War Entry Script

Posted: Tue Jan 15, 2019 2:20 pm
by BillRunacre
Ah yes, glad to see you've got it working now.