During the design of a historical scenario I face the following problem – here the planned message:
Herr General! On turn “X” the Division “AB” will be withdrawn to the Reich for the purpose of reequipment. You will receive the Division “CD” on turn “X-1” for taking the positions.
Is it possible to remove units simply off the map with a trigger?
Greetings
Neubaufahrzeug
Unit withdraw
Moderators: Slitherine Core, Panzer Corps Moderators, Panzer Corps Design
-
Neubaufahrzeug
- Lance Corporal - Panzer IA

- Posts: 19
- Joined: Wed Dec 21, 2011 7:12 pm
- Location: Germany
Re: Unit withdraw
Did you try a trigger > unit action > set unit strength to zero? This could get rid of units. You can specify branch (air, land, sea), areas (AI zones), side, core/aux etc. there to further refine this to your liking. Might be worth a try.
Re: Unit withdraw
I tried that once yesterday for my new map.
It did not work. Doesn't mean if I try a few more time I can get it to work. Used name of unit and tried the set action but no success.
You can force a player to withdraw a unit by giving them the reward, I have done that in one of my maps. Withdraw and you receive X
It did not work. Doesn't mean if I try a few more time I can get it to work. Used name of unit and tried the set action but no success.
You can force a player to withdraw a unit by giving them the reward, I have done that in one of my maps. Withdraw and you receive X
-
captainjack
- Brigadier-General - 15 cm Nblwf 41

- Posts: 1912
- Joined: Thu Sep 13, 2012 7:42 am
Re: Unit withdraw
I'd been looking at a way to upgrade units and I last weekend found one of Nikki's mods does just what I was after. This should meet the intent of what you want to do, though through a different path.
In summary, put in a message that says move the unit to a specific hex or area (for several units at once a zone would probably be easier) before the end of Turn X. At the end of Turn X, you set a unit action to change a unit on the hex to another kind of unit - in the box marked unit type you enter the code from the equipment file of the new unit. You can restrict the change so that only a core infantry unit an be upgraded, or you could convert any unit. So theoretically you could convert your Stug 3B into a Stug 3F or vice versa.
So instead of leaving and returning with a different unit, you simply convert the units while on the map.
I haven't tried it out yet (except when playing Nikki's game) but it looks very straightforward. I'm thinking of setting up a bonus scenario only accessible through a DV so you can upgrade one or more units to an experimental unit between combats.
Be warned that although it worked in Nikki's mod, I am much less experienced at modding and I haven't actually tested it out yet, so tread carefully.
In summary, put in a message that says move the unit to a specific hex or area (for several units at once a zone would probably be easier) before the end of Turn X. At the end of Turn X, you set a unit action to change a unit on the hex to another kind of unit - in the box marked unit type you enter the code from the equipment file of the new unit. You can restrict the change so that only a core infantry unit an be upgraded, or you could convert any unit. So theoretically you could convert your Stug 3B into a Stug 3F or vice versa.
So instead of leaving and returning with a different unit, you simply convert the units while on the map.
I haven't tried it out yet (except when playing Nikki's game) but it looks very straightforward. I'm thinking of setting up a bonus scenario only accessible through a DV so you can upgrade one or more units to an experimental unit between combats.
Be warned that although it worked in Nikki's mod, I am much less experienced at modding and I haven't actually tested it out yet, so tread carefully.
Re: Unit withdraw
I tried a couple of more times and set unit strength to Zero works and the unit is removed off the map.
-
captainjack
- Brigadier-General - 15 cm Nblwf 41

- Posts: 1912
- Joined: Thu Sep 13, 2012 7:42 am
Re: Unit withdraw
I just tried setting a script to create a Unit action to change the unit type and it worked fine.
You can also use it to change from one unit class to another (ie Stug 3b to Stug 3F would work, though if you had range heroes on the 3b you might get some odd results with your 3f).
This could allow you to have a tank force head for Zone X. Then replace all surviving units with a pile of heavily entrenched AT guns, for example to give pursuing forces a nasty surprise, or to change what looked like PaK37 with a PaK50 with a message "Looks like your recon forces need to take a bit more care!".
It wouldn't quite do what you described but may be a bit more efficient if you didn't want the delay between one leaving and the other returning.
You can also use it to change from one unit class to another (ie Stug 3b to Stug 3F would work, though if you had range heroes on the 3b you might get some odd results with your 3f).
This could allow you to have a tank force head for Zone X. Then replace all surviving units with a pile of heavily entrenched AT guns, for example to give pursuing forces a nasty surprise, or to change what looked like PaK37 with a PaK50 with a message "Looks like your recon forces need to take a bit more care!".
It wouldn't quite do what you described but may be a bit more efficient if you didn't want the delay between one leaving and the other returning.
-
Neubaufahrzeug
- Lance Corporal - Panzer IA

- Posts: 19
- Joined: Wed Dec 21, 2011 7:12 pm
- Location: Germany
Re: Unit withdraw
bebro wrote:Did you try a trigger > unit action > set unit strength to zero? This could get rid of units. You can specify branch (air, land, sea), areas (AI zones), side, core/aux etc. there to further refine this to your liking. Might be worth a try.
Razz1 wrote:I tried a couple of more times and set unit strength to Zero works and the unit is removed off the map.
That sounds fine!
Due to the large scale of the map this idea unfortunalety does not work. Additionally the new division ("CD") has more units than the weak withdrawing divison ("AB").captainjack wrote:In summary, put in a message that says move the unit to a specific hex or area (for several units at once a zone would probably be easier) before the end of Turn X. At the end of Turn X, you set a unit action to change a unit on the hex to another kind of unit - in the box marked unit type you enter the code from the equipment file of the new unit. You can restrict the change so that only a core infantry unit an be upgraded, or you could convert any unit. So theoretically you could convert your Stug 3B into a Stug 3F or vice versa.
So instead of leaving and returning with a different unit, you simply convert the units while on the map.
Thanks for your answers - more later!

