free_unit.txt TYPE= 2 does not work

Post bug reports and ask for help with other issues here.
Post Reply
User avatar
Lothos
Posts: 1282
Joined: Tue May 23, 2006 8:22 pm

free_unit.txt TYPE= 2 does not work

Post by Lothos »

If you have the command below as TYPE= 0 when Poland surrenders then any navy that Poland had will keep fighting. If you change this event to TYPE= 2 then it never fires and the Navy vanishes.

The reason to change it to TYPE= 2 is if Poland gets liberated but then re-conquered. This can happen through Partisans or by in game mechanics like Russia attacking etc...

{
#NAME= Allies - Poland
#POPUP=
#IMAGE=
#SOUND=
#FLAG= 1
#TYPE= 2
#AI= 0
#LEVEL= 0
#GV= 1[1,100]
#LINK= 0[0]
#COUNTRY_ID= 85
#RECIPIENT_ID= 112
#TRIGGER= 100
#LAND_PERCENTAGE= 0
#NAVAL_PERCENTAGE= 100
}
User avatar
Hubert Cater
Posts: 6026
Joined: Mon Jul 22, 2013 11:42 am
Contact:

Re: free_unit.txt TYPE= 2 does not work

Post by Hubert Cater »

Just checked on my end and a TYPE=2 event should still fire, ran a quick test as well to confirm, and should not be removed if it is set to '0' as well.
User avatar
Lothos
Posts: 1282
Joined: Tue May 23, 2006 8:22 pm

Re: free_unit.txt TYPE= 2 does not work

Post by Lothos »

Hubert Cater wrote: Mon Jan 01, 2024 7:13 pm Just checked on my end and a TYPE=2 event should still fire, ran a quick test as well to confirm, and should not be removed if it is set to '0' as well.
Hi Hubert

Thanks for responding, the issue is that it never fires.

As a test do the following,

- have Germany take Poland and make them surrender
- Their is an event just before Poland surrenders to give a polish destroyer to the UK you will notice that if Type= 2 that the destroyer will vanish if type= something else it will remain

This is ofcourse setting the free unit variable to give its ships to the UK

EDTIED: My goal here is to not have the fleet vanish. It was reported as a bug that if a Polish Partisan shows up in Warsaw it then liberates them and when the Germans take it back they surrender a second time causing the Polish fleet to disapear. I was trying to resolve this by making it a type=2 so it would fire each time Poland surrenders.
User avatar
Hubert Cater
Posts: 6026
Joined: Mon Jul 22, 2013 11:42 am
Contact:

Re: free_unit.txt TYPE= 2 does not work

Post by Hubert Cater »

If you have a test campaign you can send me I'll take a look, as mentioned I did test it with TYPE=2 on my end and it works fine, and I don't see anything in the code to indicate that it would not fire if it was a TYPE=2 either.
User avatar
Lothos
Posts: 1282
Joined: Tue May 23, 2006 8:22 pm

Re: free_unit.txt TYPE= 2 does not work

Post by Lothos »

Hubert Cater wrote: Tue Jan 02, 2024 5:12 pm If you have a test campaign you can send me I'll take a look, as mentioned I did test it with TYPE=2 on my end and it works fine, and I don't see anything in the code to indicate that it would not fire if it was a TYPE=2 either.
Hmm, I am not sure why but it seems to be working now. I have tried to duplicate it with no success, but it was happening and the Polish destroyer has vanished in a few of my solo games and in one of my current PBEM games.
User avatar
Hubert Cater
Posts: 6026
Joined: Mon Jul 22, 2013 11:42 am
Contact:

Re: free_unit.txt TYPE= 2 does not work

Post by Hubert Cater »

Sounds good and it might be a different issue then that made you think it was the TYPE=2 problem, if it happens again, let me know.
User avatar
Lothos
Posts: 1282
Joined: Tue May 23, 2006 8:22 pm

Re: free_unit.txt TYPE= 2 does not work

Post by Lothos »

Hubert Cater wrote: Tue Jan 02, 2024 7:26 pm Sounds good and it might be a different issue then that made you think it was the TYPE=2 problem, if it happens again, let me know.
Ok I am bringing this up again because I finally figured out why the Polish Destroyer will vanish

I have the following command in the surrender_2.txt file to help force Poland surrender for the AI

{
#NAME= DE 2[1] - Poland Surrender Helper
#POPUP=
#IMAGE=
#SOUND=
#FLAG= 1
#TYPE= 1
#AI= 0
#LEVEL= 0
#GV= 1[1,100]
#LINK= 2[1]
#COUNTRY_ID= 85
#RECIPIENT_ID= 45
#ARMISTICE= 0
#REMOVE= 3
#TRIGGER= 100
#DATE= 1939/09/01
; - Germany - Axis - War - Not Surrendered
#VARIABLE_CONDITION= 45 [1] [100] [0]
; - USA, USSR - Allies - Neutral - Not Surrendered
#VARIABLE_CONDITION= 115 [2] [0] [0]
#VARIABLE_CONDITION= 116 [2] [0] [0]
; - UK, Poland - Allies - War - Not Surrendered
#VARIABLE_CONDITION= 112 [2] [100] [0]
#VARIABLE_CONDITION= 85 [2] [100] [0]
#CONDITION_POSITION= 0,0 [0,0] [0,0] [0] [0]
}


When that fires then the free_unit.txt is not used and that is why the Polish destroyer vanishes
Post Reply

Return to “Tech Support”