Jump to content

Surrender #2 Scripts


Recommended Posts

Funny you should ask, since I've been debugging the Italy surrender scripting in my A3R mod. Use Type 0 or 1. Once the specified conditions are met the script should trigger.

The issue I saw using Type 2 recurring check was that after Italy surrendered, German units occupying Italian cities went from being in supply to being out of supply and city control reverted to Allies even with German units still occupying. I'm fixing this for an update to the mod after the WaW patch is released.

Link to comment
Share on other sites

Type 1 will check each turn once conditions are satisfied until triggered, then stop. So for a 50% trigger it should on average execute in about 2 turns.

Type 2 will keep checking each turn once conditions are satisfied until a cancel condition is satisfied. So for that 50% trigger it should then on average eceute every 2 turns.

For surrender_2, you want it to trigger one time and then stop. Apparently the recurring checks do not help.

Link to comment
Share on other sites

#TYPE= 2 is not generally needed as you only need a country to surrender once. The error Bill encountered with a #TYPE= 2 event was, as far as I could tell, an anomaly in AI vs. AI games... i.e. not something most gamers will encounter.

ebitt, why don't you post your surrender_2 event and maybe we can spot what the problem is?

Note, I have fixed a surrender_2 script interpretation error for the first patch and can suggest a workaround if this is indeed the problem you are encountering but I'll need to see your event to know for sure.

Link to comment
Share on other sites

This is the script that I tried. The intent was to dissolve Vichy France. There were no German units in Vichy France (Germany never did declare war).

#NAME= Vichy France Surrenders after D-Day

#POPUP= France Reunited - Vichy France Dissolved

#IMAGE=

#SOUND= italy_surrender.wav

#FLAG= 1

#TYPE= 2

#AI= 0

#COUNTRY_ID= 44

#TRANSFER_ID= 2

#TRIGGER= 100

#DATE= 1941/11/01

; Set variable conditions:

; 1st Line - France politically aligned with Allies and not surrendered

; 2nd Line - Vichy polically aligned with Axis and not surrendered

#VARIABLE_CONDITION= 2 [2] [100] [0]

#VARIABLE_CONDITION= 44 [1] [100] [0]

; 1st Line - No German units in Marseilles

; 2nd Line - Alles Hold Paris

#CONDITION_POSITION= 70,27 [0,0] [1,1] [1] [5]

#CONDITION_POSITION= 69,22 [0,0] [1,1] [2] [0]

}

I think the problem is the variable condition relating to Vichy France. They were Axis leaning, but not at 100. I'll try the setup again and if it doesn't work try to save all the turns around the event date. The early date is because it is unpredictable when you will be able to invade France after the 1940 surrender.

Thank you for the help and excellent support. If some of the other games I liked had been supported this way they would still be around and on my machine

Link to comment
Share on other sites

If Vichy was not 100% then it definitely will not trigger, try setting it to 0% and this will help unless of course you expect Vichy to be fully active for the script to trigger.

Also the bug has to do with this line:

#CONDITION_POSITION= 70,27 [0,0] [1,1] [1] [5]

Change this to the following and it will work for now but of course not be a problem after the first patch:

#CONDITION_POSITION= 70,27 [0,0] [1,1] [1] [0]

Link to comment
Share on other sites

I constructed a simple test and I think I have found my problem. If Vichy France is not fully active, then they don't surrender. Makes sense, as if you are not at war how can you surrender. However, if Vichy France is fully active surrender occurs just fine. Thanks, I think I can work around this

Link to comment
Share on other sites

#TYPE= 2 is not generally needed as you only need a country to surrender once. The error Bill encountered with a #TYPE= 2 event was, as far as I could tell, an anomaly in AI vs. AI games... i.e. not something most gamers will encounter.
I can verify this is working OK now after I changed to #TYPE= 1. What I was seeing before in both AI-AI and AI games was that when Italy surrendered in my A3R mod, the northern Italian cities changed to Allied control even with German units occupying them. If there were no German occupiers, Allies could simply op move to north Italy, and I did this myself when playing as Allies to verify the effect. No Gothic Line battles! :mad:

Like I said, I think I have this fixed now, plus several other fixes and enhancements for a v1.01 update which should be ready about the same time as the WaW patch.

Link to comment
Share on other sites

OK, I've been wrestling with this surrender_2 scripting issue for past two weeks. Along with lots of other tweaks and adjustments which have been distarctors along the way. But... here's an example in an AI-AI game of Italy surrendering in January 1944, actually at end of Allies turn in December 1943 but this is the Axis player turn. Note German garrisons control northern Italian cities but rest of Italy and Albania becomes Allied controlled.

A3RJan1944Italy.jpg

Link to comment
Share on other sites

In the February 1944 turn, German units have moved to occupy Rome and Tirane in Albania. Note that German tile control is beginning to extend from the occupied Italian cities in the north. This is a much better simulation now of the Italian campaign than what I had scripted before.

A3RFeb1944Italy.jpg

I'll add that I tried two different surrender_2 scripts at one point, one for a 75% chance and another for a 90% chance based on additional Allied units in range of Rome. This did not work. While one triggered, the other was left to trigger again; thus I saw the same problem I had before with the TYPE= 2 event; ie, the German occupied Italian cities still reverted to Allied control and supply dropped to zero. The key is to have only one surrender_2 script and it must be TYPE= 0 or 1.

As seen in the screenshots above, when it does work it works very nicely. I should have these updates to my A3R mod ready soon.

Link to comment
Share on other sites

Here's something else to consider regarding surrender_2 scripting, for those who are interested. In my screenshots above, Germany moves to occupy and garrison Rome. OK. Well, now Italy is "liberated" and technically not surrendered. Italy loses all of its units and those on the P/Q so it effectively starts at scratch. But any scripts that assume "Italy politically aligned with Axis and surrendered" as a variable condition are no longer triggered.

I've been busy revising various scripts to deal with this issue. Checking for Allied unit in Taranto is a better indicator of Italian surrender than Italy's actual surrender state, which cannot be guaranteed until Allies capture Rome. Isn't this fun?

Link to comment
Share on other sites

Isn't this fun?
Yes it is! I have nearly as much fun playing with the editor as the game itself. Based on your observations and my limited tests, I don't think I can do what I want with Vichy France. I suppose a game engine change is necessary. Vichy should just dissolve and become part of France upon liberation. Any Vichy units and any Free French units should also rejoin France. Right now it is the worst of both worlds, as the Free French units can only upgrade based on French tech advances and the cost is borne by the UK. Looking at Free French units, they were mostly US equipment, so the cost (if not France) should be to the US. Also, if France pays the bill you need to move MPP's to both France and UK but you only have one convoy possibility. I'll probably have to wait for SC3. smile.gif
Link to comment
Share on other sites

Yeah a couple of game engine changes would be good for the next expansion pack. Right now, a surrender_2 surrender is not the same as a plain vanilla surrender, as I've been discovering the hard way. Surrender_1 and Free_unit event scripts which work with normal surrenders do not work with surrender_2. So beware of this limitation.

For free units, it would be ideal to have them rejoin their country upon liberation. Also some way to script arrival of free units after surrender would be ideal. Then we could have some Free French units upon surrender, some arrivals later per scripting, and then upon liberation they all become regular French again.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...