Page 1 of 1

surrender_1.txt clarification please

Posted: Tue Oct 25, 2022 12:18 am
by Lothos
The way I am reading the description below is that the this file is suppose to block the default code for a country surrendering automatically if both the country_id and recipient_id are equal.

I have tested this by trying to use this code on Luxemburg and have the german core take their capital but they keep surrendering no matter what I do.

The goal of my test is the following

- When a country is about to surrender under normal in game circumstances I want to block it and then have them switch sides
- surrender_2.txt has the commands to have the country switch sides but that code never fire if a country surrenders. This seems to only fire if all the conditions are true BUT even if I make it so all the conditions are true it never fires because the country will surrender before ever calling it.

From the files this is the description in surrender_1.txt

Code: Select all

; If you set the #COUNTRY_ID equal to the #RECIPIENT_ID this can be used to prevent outright surrender when
; the surrender checks are performed by the game engine. In this case if the #MAP_POSITION items are set to
; another friendly country (which must be fully active when this event is checked) then a new territory will be
; created for #COUNTRY_ID with the first #MAP_POSITION designated as its new capital if that position is a 
; Town, City, etc.  For example, this might be useful to handle a movement of the British government to Egypt,
; with Alexandria as its new Capital, after a successful Sealion by Germany.
I also tried to have Luxemburg territory handed to Germany after annexation. I then had Germany try to release them as a country (like Croatia) but what happen was they were released again but were immediately marked as surrendered and occupied by Germany. I then tried to have a mobilization event change their mobilization from 100 toward the allies to 100 toward the Axis (200 point swing) but mobilization events do not fire for surrendered countries and countries that do not have any territory on the map.

So it would seem that once a country surrenders they are completely locked.

Re: surrender_1.txt clarification please

Posted: Tue Oct 25, 2022 9:08 am
by BillRunacre
We generally use SURRENDER_1 to have a country move its capital and territory elsewhere when it is overrun, rather than to have it switch sides. Or to divide up its territory, e.g. forming Vichy France's territories, or dividing Poland up between its conquerors.

It only prevents surrender in the first instance, but this cannot apply here as Luxembourg is so small and has no external territories where its government could move to.

A SURRENDER_2 script could in theory be used, but it would have to fire before the country actually surrenders to enable it to switch sides, e.g. have a check for there being a German unit being in Luxembourg.

This might work if there is a Decision set to fire at the end of a turn, with it using that CONDITION_POSITION, which then triggers the SURRENDER_2 script.

I'd suggest giving this a try, as I think it should work.

If it does not work then you might have to have it simply annexed to Germany. I recall that was a possibility, and would be a lot easier. Perhaps more likely than the Luxembourgeois switching sides too.