Why would you use a SURRENDER 1 when a SURRENDER 2 would work just as well

Post bug reports and ask for help with other issues here.
Post Reply
User avatar
Elessar2
Posts: 1440
Joined: Wed Nov 30, 2016 12:35 am

Why would you use a SURRENDER 1 when a SURRENDER 2 would work just as well

Post by Elessar2 »

...and not necessitate putting ALL of those hexes into the SURRENDER 1? [for the uninitiated, SURRENDER 1 scripts have you designate each hex to flip control, as do TERRITORY scripts. SURRENDER 2's simply let you put in the correct country codes and flip the entire country in one shot.] Right now I am simply following your work and copying over every base script into my baby, but for several government transfers (e.g. UK to Canada) you went with SURRENDER 1's, so I hope (since my map is bigger and has different coordinates) that I can make do with SURRENDER 2's (5 seconds of work vs. more than an hour).

SURRENDER 1's only seem necessary for when a country is being split, such as with Poland and Vichy. Am I missing something?
User avatar
Hubert Cater
Posts: 5986
Joined: Mon Jul 22, 2013 11:42 am
Contact:

Re: Why would you use a SURRENDER 1 when a SURRENDER 2 would work just as well

Post by Hubert Cater »

From memory, SURRENDER_1 is typically used after a normal surrender has been determined by the engine, and only in the case where you want to split up some territory, e.g. Poland where it is divided between Germany and the USSR, or for when let's say the UK is set to surrender, e.g. the capitals have been taken and the game engine decides it is the UK's time to leave the war, but you want it to keep fighting so you transfer territory to Canada, and keep it going by using the rules of the SURRENDER_1 event to set a new Capital and so on.

SURRENDER_2 is typically used to 'force' a surrender event, or a withdrawl from the war for a certain country under the pre-determined and desired conditions by the campaign/scenario designer.

In a nutshell, SURRENDER_1 will run only when the game engine determines a country is actually surrendering. SURRENDER_2 will only run when you want a country to surrender, and is not triggered by the game engine normal surrender process.

Hope this helps!
User avatar
Elessar2
Posts: 1440
Joined: Wed Nov 30, 2016 12:35 am

Re: Why would you use a SURRENDER 1 when a SURRENDER 2 would work just as well

Post by Elessar2 »

OK that is what I thought, and hoped. This is an issue with (A) SURRENDER1's where you didn't make the territory a separate country with its own capital (the 5 colonies in North Africa most crucially, tho Egypt does have its own capital), but I made them all such so I can run convoys from them.

(B) The other set was for when the UK shifted its capital to one of its colonies/allies (Egypt/Canada), but you had them in SURRENDER1 despite both having capitals, and Canada especially has oodles of hexes with an insanely long coastline in the Arctic. If you are correct I should be able to redo them as SURRENDER2's without having to collate ALL those hexes.

I also did the same with Iceland and Greenland (the latter's "capital" I named "Shangri-La" and put in the far north), tho I hope this doesn't mess up how certain scripts work even after I change the country codes...
User avatar
Elessar2
Posts: 1440
Joined: Wed Nov 30, 2016 12:35 am

Re: Why would you use a SURRENDER 1 when a SURRENDER 2 would work just as well

Post by Elessar2 »

Hmm. May be no way for me to answer my original question (by myself) until playtesting is in full swing, so asking for clarification here in the (likely vain) hope I can avoid a ton of work. All the "moving capitals to another allied minor country to stay in the war" surrender scripts are in SURRENDER1, not SURRENDER2, which makes me think that the game engine won't do so if I try to use SURRENDER2's for that purpose.

There are 3 such, 1 where France moves their capital to Algeria, and 2 for the UK, one for moving to Egypt, another for going to Canada. Does the game engine "know" to change the original capital to the new parent country's capital in both script types, automatically? I'd hate to run a SURRENDER2 only to find that Canada and the UK both end up surrendering (because Canada technically lost its capital and the UK never took it over because the game engine doesn't understand to switch the capital as well-in this case Ottawa).

Appreciate the clarification. I'm worried since you put the Canadian switcheroo into SURRENDER1 (given that Canada is a separate country at start in 1939 and not a mere colony like Algeria) that implicitly means this kind of switching only works in SURRENDER1.
User avatar
BillRunacre
Posts: 6514
Joined: Mon Jul 22, 2013 2:57 pm
Contact:

Re: Why would you use a SURRENDER 1 when a SURRENDER 2 would work just as well

Post by BillRunacre »

You will have to use SURRENDER_1 if you want the capital to move, because SURRENDER_2 does not give that information, i.e. you cannot specify hexes in it.

That said, it should only require a small SURRENDER_1 script to test it out in your mod.

Although whether you actually want to remove all of Canada is another question you may want to consider.
Follow us on Twitter: https://twitter.com/FurySoftware

We're also on Facebook! https://www.facebook.com/FurySoftware/
El_Condoro
Posts: 597
Joined: Sat Aug 03, 2019 4:35 am

Re: Why would you use a SURRENDER 1 when a SURRENDER 2 would work just as well

Post by El_Condoro »

I did this for my mod that had many hex references - use Excel (or Sheets) to write the script. All you need to do is concatenate the row and column hex reference into a formula. It still takes some time but nowhere near as much.

="#MAP_CONDITION= "&[column, filled down]&","&[row, series filled down]

Copy and paste results into script.
ORB & CROWN Fantasy Warfare Mod for Strategic Command
Download for War in Europe or World at War - YouTube - Discord
User avatar
Elessar2
Posts: 1440
Joined: Wed Nov 30, 2016 12:35 am

Re: Why would you use a SURRENDER 1 when a SURRENDER 2 would work just as well

Post by Elessar2 »

Sigh, thanks, that is what I was afraid of. Add 3+ more days to my completion date, fellas... :cry:

I simply copy the previous row over and manually change the digit that usually needs to be changed. I'll explore how to use a spreadsheet for such then I guess-Greenland wasn't too bad, North Africa will be pretty easy peasy; it's the northern Canadian coast that looms high over my head...
User avatar
Hubert Cater
Posts: 5986
Joined: Mon Jul 22, 2013 11:42 am
Contact:

Re: Why would you use a SURRENDER 1 when a SURRENDER 2 would work just as well

Post by Hubert Cater »

In the Editor you can highlight the desired hexes, e.g. when in the 'tile' layer, using the 'select items' tool, and do a left mouse button down + drag, while also holding down the CTRL key, and it will select a wide batch of hexes for you.

After that, go to File->Export Map Positions, and it will export those positions to a file called 'map_positions.txt' that can be found in the USER folder for the game, e.g. typically here:

\Users\<username>\Documents\My Games\Strategic Command WWII - War in Europe

Then you can copy/paste the contents of the folder to your desired script event.

Note, that file is not 'rewritten', it should save cumulative exports, so you might want to delete the contents or the file if you want a fresh batch of 'positions'
El_Condoro
Posts: 597
Joined: Sat Aug 03, 2019 4:35 am

Re: Why would you use a SURRENDER 1 when a SURRENDER 2 would work just as well

Post by El_Condoro »

That's probably even better - thanks, Bill.
ORB & CROWN Fantasy Warfare Mod for Strategic Command
Download for War in Europe or World at War - YouTube - Discord
User avatar
Elessar2
Posts: 1440
Joined: Wed Nov 30, 2016 12:35 am

Re: Why would you use a SURRENDER 1 when a SURRENDER 2 would work just as well

Post by Elessar2 »

The scream you just heard is me as MANY HOURS of work could have been done in c. 1-2. :(

I knew about the export thang, but didn't put 2 and 2 together. Heh I've already done N Africa already and 15 columns of Canada, but I'll play with that tonight, thanks Bill you da man. :o
User avatar
BillRunacre
Posts: 6514
Joined: Mon Jul 22, 2013 2:57 pm
Contact:

Re: Why would you use a SURRENDER 1 when a SURRENDER 2 would work just as well

Post by BillRunacre »

I have to say this, as you can thank Hubert for pointing this out! :)

Still, it's great to hear that your future design work will be a lot quicker now!
Follow us on Twitter: https://twitter.com/FurySoftware

We're also on Facebook! https://www.facebook.com/FurySoftware/
Post Reply

Return to “Tech Support”