Merging units - How?
Moderators: Slitherine Core, BA Moderators
-
- Lieutenant-General - Do 217E
- Posts: 3151
- Joined: Fri Apr 06, 2012 6:18 pm
- Location: Palau
Merging units - How?
Hi there, Does anyone know if we can merge similar infantry units? Say I've got an Infantry 3/5 and another Infantry 1/5, can I merge them to get an Infantry 4/5 instead of the two weaker units?
SCENARIO LINKS
Seelow'45 -> www.slitherine.com/forum/viewtopic.php?f=313&t=55132
Normandy'44 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42094
Dieppe'42 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42347
Seelow'45 -> www.slitherine.com/forum/viewtopic.php?f=313&t=55132
Normandy'44 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42094
Dieppe'42 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42347
-
- Site Admin
- Posts: 13558
- Joined: Fri Apr 01, 2005 10:19 am
Re: Merging units - How?
No there is no way to do this currently. Someone could create a mod to do it.
-
- Lieutenant-General - Do 217E
- Posts: 3151
- Joined: Fri Apr 06, 2012 6:18 pm
- Location: Palau
Re: Merging units - How?
Thanks Ian, This would be a great mod to have. Anyone? =)
SCENARIO LINKS
Seelow'45 -> www.slitherine.com/forum/viewtopic.php?f=313&t=55132
Normandy'44 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42094
Dieppe'42 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42347
Seelow'45 -> www.slitherine.com/forum/viewtopic.php?f=313&t=55132
Normandy'44 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42094
Dieppe'42 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42347
-
- Site Admin
- Posts: 9878
- Joined: Wed Mar 23, 2005 10:35 pm
Re: Merging units - How?
Something like this is on my wishlist, along with the ability to swap units (helpful if there are traffic jams!).
Cheers
Pip
Cheers
Pip
Re: Merging units - How?
That, and/or some sort of "pass-through" movement at an increased movement cost to show it's slower going getting through the traffic jam.pipfromslitherine wrote: along with the ability to swap units (helpful if there are traffic jams!).
-Mark R.
Re: Merging units - How?
When you say "merge" units. Do you mean more than one sharing the same tile and creating the stack of doom like civilization revolution or R.U.S.E?
Please don't do this. It would kill the strategy in the game. Placement of troops, using the environment.
When all you have to do is stack your units onto one tile and roll them out together - everyone will start doing this.
Please don't do this. It would kill the strategy in the game. Placement of troops, using the environment.
When all you have to do is stack your units onto one tile and roll them out together - everyone will start doing this.
-
- Lieutenant-General - Do 217E
- Posts: 3151
- Joined: Fri Apr 06, 2012 6:18 pm
- Location: Palau
Re: Merging units - How?
Agreed Odion, definitely not a stack of doom... We mean taking two damaged infantry units of the same type, for example, a 1/5 ranger and a 3/5 ranger, to merge them together to create a single healthier, stronger 4/5 ranger. Merging would never result in more than the original 5/5 strength... It's the game equivalent of real world combining of divisions that have become understrength through losses... Might be handy for scenarios where there's no heal button
SCENARIO LINKS
Seelow'45 -> www.slitherine.com/forum/viewtopic.php?f=313&t=55132
Normandy'44 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42094
Dieppe'42 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42347
Seelow'45 -> www.slitherine.com/forum/viewtopic.php?f=313&t=55132
Normandy'44 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42094
Dieppe'42 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42347
Re: Merging units - How?
Ok. Gotcha. I am definitely all for that. Thanks for explaining.
A logical troop amass movement. I am sure a fire team/platoon would do this if faced with diminished circumstances (strength in numbers). Hopefully this can filter down to the iPad version as well one day in a update slitherine?
A logical troop amass movement. I am sure a fire team/platoon would do this if faced with diminished circumstances (strength in numbers). Hopefully this can filter down to the iPad version as well one day in a update slitherine?
Re: Merging units - How?
For the merging part, although I have just started looking at the scripts:
Override the move limitation, maybe using part of the loading in truck logic
Check that is the same unit type (and infantry)
Check that the number in each added will no exceed the ManCount variable
Apply the heal effect X number of times to the target unit (X been the number of men the selected one has)
Destroy the first selected unit
Will have to see what to do with promotions, probably they get the lower of both or an average
Was looking for ideas to mod, thanks
Override the move limitation, maybe using part of the loading in truck logic
Check that is the same unit type (and infantry)
Check that the number in each added will no exceed the ManCount variable
Apply the heal effect X number of times to the target unit (X been the number of men the selected one has)
Destroy the first selected unit
Will have to see what to do with promotions, probably they get the lower of both or an average
Was looking for ideas to mod, thanks
-
- Lieutenant-General - Do 217E
- Posts: 3151
- Joined: Fri Apr 06, 2012 6:18 pm
- Location: Palau
Re: Merging units - How?
Hi RF, that looks like a really smart way to code it. Iain would this work?
On promotions, I'd keep the maximum of the two, ie. if one of them was already elite they'd become snipers for the new merged/healed unit.
Games are too short to lose hard won promotions you've got... and it might become a disincentive to merging...
On promotions, I'd keep the maximum of the two, ie. if one of them was already elite they'd become snipers for the new merged/healed unit.
Games are too short to lose hard won promotions you've got... and it might become a disincentive to merging...
SCENARIO LINKS
Seelow'45 -> www.slitherine.com/forum/viewtopic.php?f=313&t=55132
Normandy'44 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42094
Dieppe'42 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42347
Seelow'45 -> www.slitherine.com/forum/viewtopic.php?f=313&t=55132
Normandy'44 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42094
Dieppe'42 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42347
Re: Merging units - How?
I have started working on the script, this is my first attempt so it will take a long time to debug, but in theory it should be simple. I still need to look how to change the promotions.
WIP in the modders forum:
http://slitherine.com/forum/viewtopic.php?f=104&t=35219
You can download the merge mod from that post in the modders forum. I am taking a look at the swap positions, there is an easy way to do it, but I am not sure the AI could have a reaction fire to it, which IMO it should to avoid abuses.
WIP in the modders forum:
http://slitherine.com/forum/viewtopic.php?f=104&t=35219
You can download the merge mod from that post in the modders forum. I am taking a look at the swap positions, there is an easy way to do it, but I am not sure the AI could have a reaction fire to it, which IMO it should to avoid abuses.
-
- Lieutenant-General - Do 217E
- Posts: 3151
- Joined: Fri Apr 06, 2012 6:18 pm
- Location: Palau
Re: Merging units - How?
Hi RF, Forgive me being a supernewbie if this is a v foolish question, but is there a way that I can drop your mod code into a scenario? I've updated the Meeting Engagement map to even the odds for the Allies (giving them combined US & Brit kit, including the 17 pdr and Sherman Fireflies). It also plays as a faster game (with up to 8 transports each side). I'd love to include your script on combining units, if there's a way to do that? Meeting Engagement Fast N Sneaky is here -> viewtopic.php?f=87&t=35532
SCENARIO LINKS
Seelow'45 -> www.slitherine.com/forum/viewtopic.php?f=313&t=55132
Normandy'44 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42094
Dieppe'42 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42347
Seelow'45 -> www.slitherine.com/forum/viewtopic.php?f=313&t=55132
Normandy'44 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42094
Dieppe'42 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42347
-
- Site Admin
- Posts: 9878
- Joined: Wed Mar 23, 2005 10:35 pm
Re: Merging units - How?
You can absolutely include new functionality in custom missions. I'm not sure in my head what it need though, in truth. The script include functionality has gotten a little out of hand! But in theory all you would need to do would be add a DATA/BATTLE/SCRIPTS folder with the new order, and a new $DEFAULT.BSF file which mirrored the existing one, but added the new order to all units.
If you run into any issues then post a thread in the modding forum and we can dig down into it.
Cheers
Pip
If you run into any issues then post a thread in the modding forum and we can dig down into it.
Cheers
Pip
-
- Lieutenant-General - Do 217E
- Posts: 3151
- Joined: Fri Apr 06, 2012 6:18 pm
- Location: Palau
Re: Merging units - How?
RF, Did Pip's reply make sense to you? (Thanks Pip!
). I'm a total coding dweeb (ie. I couldn't do it well to save my life). But if your script's ready, would you be willing to let us trial it directly with the Meeting Engagement Fast N Sneaky scenario? It would be great to include your "unit merge" functionality. "Unit swap places" would be a nice to have but it's such a large map, with no single lane bridges, that the "unit merge" would be more useful earlier (and I don't want to give you pressure despite your coding brilliance
).


SCENARIO LINKS
Seelow'45 -> www.slitherine.com/forum/viewtopic.php?f=313&t=55132
Normandy'44 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42094
Dieppe'42 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42347
Seelow'45 -> www.slitherine.com/forum/viewtopic.php?f=313&t=55132
Normandy'44 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42094
Dieppe'42 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42347
Re: Merging units - How?
You can add the script to your scenario as Pip said, just copy the merge.bsf file to the DATA\Battle\Scripts path in your scenario and edit the $DEFAULT.BSF file to include the reference to it. I have added a couple of texts that you will need to add to your text file, anyway download the mod should be straightforward to apply it to your scenario, if you need help let me know.
-
- Lieutenant-General - Do 217E
- Posts: 3151
- Joined: Fri Apr 06, 2012 6:18 pm
- Location: Palau
Re: Merging units - How?
Hi RF/Pip,
I'd like to use your merge code in the latest update to Fast N Sneaky, viewtopic.php?f=105&t=36004.
Is it correct that all I need to do is create a \Scripts folder in my \Data\Battle folder for the MP scenario... and then copy your $DEFAULT.BSF and MERGE.BSF files into that \Scripts folder? Nothing to change anywhere else?
Do I need your text1.txt file too? What does this do? Most of it seems to come from another (Afrika Korps?) scenario but the last two lines look relevant to your merge.
Thanks guys,
GL88
I'd like to use your merge code in the latest update to Fast N Sneaky, viewtopic.php?f=105&t=36004.
Is it correct that all I need to do is create a \Scripts folder in my \Data\Battle folder for the MP scenario... and then copy your $DEFAULT.BSF and MERGE.BSF files into that \Scripts folder? Nothing to change anywhere else?
Do I need your text1.txt file too? What does this do? Most of it seems to come from another (Afrika Korps?) scenario but the last two lines look relevant to your merge.
Thanks guys,
GL88
SCENARIO LINKS
Seelow'45 -> www.slitherine.com/forum/viewtopic.php?f=313&t=55132
Normandy'44 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42094
Dieppe'42 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42347
Seelow'45 -> www.slitherine.com/forum/viewtopic.php?f=313&t=55132
Normandy'44 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42094
Dieppe'42 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42347
Re: Merging units - How?
hi, yes, just copy the merge.bsf file. In the default.bsf only add a line to include that new file. And for the texts you only need the new lines at the end so that the texts appear when merging the units.
I am working on an improved version, it will take into account carryover units, and will drop promotions less when merging different experienced units.
I am working on an improved version, it will take into account carryover units, and will drop promotions less when merging different experienced units.
-
- Lieutenant-General - Do 217E
- Posts: 3151
- Joined: Fri Apr 06, 2012 6:18 pm
- Location: Palau
Re: Merging units - How?
Thanks RF, I'll copy your MERGE.BSF into \DATA\BATTLE\SCRIPTS. My scenario doesn't have a $DEFAULT.BSF yet, so I'll just copy yours exactly as it is and add the last two lines of your TEXT1.TXT file to mine. Really appreciate your help. Will update to your improved version when you release it (although I'm sure you'll persuade Pip to make it standard for all games soon
).

SCENARIO LINKS
Seelow'45 -> www.slitherine.com/forum/viewtopic.php?f=313&t=55132
Normandy'44 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42094
Dieppe'42 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42347
Seelow'45 -> www.slitherine.com/forum/viewtopic.php?f=313&t=55132
Normandy'44 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42094
Dieppe'42 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42347
-
- Lieutenant-General - Do 217E
- Posts: 3151
- Joined: Fri Apr 06, 2012 6:18 pm
- Location: Palau
Re: Merging units - How?
RF, I've used your code in the latest release of Fast N Sneaky for the Meeting Engagement MP/FS map -> viewtopic.php?f=87&t=36065. Your infantry merging works really well. THANK YOU
SCENARIO LINKS
Seelow'45 -> www.slitherine.com/forum/viewtopic.php?f=313&t=55132
Normandy'44 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42094
Dieppe'42 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42347
Seelow'45 -> www.slitherine.com/forum/viewtopic.php?f=313&t=55132
Normandy'44 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42094
Dieppe'42 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42347
-
- Lieutenant-General - Do 217E
- Posts: 3151
- Joined: Fri Apr 06, 2012 6:18 pm
- Location: Palau
Re: Merging units - How?
RF, Question on your unit merge code... Usually it works great, but sometimes it loses a man... Example: I "load" a 2-man infantry into a 3-man infantry and the result is a 4-man infantry... How does your code perform the addition of the two units values? Are both of these numbers integers? I don't suppose this could be BA adding 1.6 (for the 2-man) to 2.7 (for the 3-man) to get 4.3 (for the 5-man) which becomes a 4-man, could it? Thanks for all wisdoms 

SCENARIO LINKS
Seelow'45 -> www.slitherine.com/forum/viewtopic.php?f=313&t=55132
Normandy'44 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42094
Dieppe'42 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42347
Seelow'45 -> www.slitherine.com/forum/viewtopic.php?f=313&t=55132
Normandy'44 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42094
Dieppe'42 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42347