Merging units - How?
Moderators: Slitherine Core, BA Moderators
Re: Merging units - How?
It uses the revive code, calling it x number of times. It would be good to try and reproduce cases in which it fails all the time in a consistent way. Right now I cannot see how it can fail.
-
GottaLove88s
- Lieutenant-General - Do 217E

- Posts: 3151
- Joined: Fri Apr 06, 2012 6:18 pm
- Location: Palau
Re: Merging units - How?
Interesting... it's happened about 3 times in 10 merges so far... the first time, i almost didn't notice it during a game, but it didn't feel like it added right... the next two times, i deliberately reduced my own units to 2 and 3-men, to merge and see what happened... both times the result was 4... most times it works, occasionally it doesn't... odd eh? would it help if i checked whether it happens with smallest unit moving into largest, or vice versa? let me know what you need to know, and i'll watch carefully and report back...
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?
Interesting... If you can send me a savegame I can find the problem better, a merge from 2 to 3 vs 3 to 2 could give some tips if one works and the other not.
Forget the savegame, I will try to reproduce different situations myself.
Forget the savegame, I will try to reproduce different situations myself.
Re: Merging units - How?
Thanks for testing it, it was indeed buggy... I think I have it now fixed. Updated the version in the other thread, here it is:
It now wont lower promotions as much, just one level if one of the units is of lower experience. It also takes into account carryover units mechanic, the resulting unit will be in the carryover list (maybe a bit unfair)
It now wont lower promotions as much, just one level if one of the units is of lower experience. It also takes into account carryover units mechanic, the resulting unit will be in the carryover list (maybe a bit unfair)
- Attachments
-
MergeInfantry.zip- Merge Infantry
- (8.74 KiB) Downloaded 111 times
-
GottaLove88s
- Lieutenant-General - Do 217E

- Posts: 3151
- Joined: Fri Apr 06, 2012 6:18 pm
- Location: Palau
Re: Merging units - How?
Thanks RF, Much appreciated. I'll leave the current games that are running as they are, and will drop your new code into the final version on Sunday, to pass onto Pip for uploading as user content... Nice work monsieur! 
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
-
GottaLove88s
- Lieutenant-General - Do 217E

- Posts: 3151
- Joined: Fri Apr 06, 2012 6:18 pm
- Location: Palau
Re: Merging units - How?
PS. To be clear, I'll just replace my existing $DEFAULT.BSF and MERGE.BSF with your new replacements, and copy the last few lines of your TEXT1.TXT into mine. That should be ok, right?
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
-
GottaLove88s
- Lieutenant-General - Do 217E

- Posts: 3151
- Joined: Fri Apr 06, 2012 6:18 pm
- Location: Palau
Re: Merging units - How?
PPS. Hang on... I see you've also added SWAP text to your TEXT1.TXT. Is the unit swap function enabled too? If you're happy to share your SWAP.BSF code, I'd love to add that to the final version? You're going to be a v popular man!
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?
Sure you can get it here, viewtopic.php?f=104&t=35241&p=339600#p339600
I have just update it, the AI now gets a reaction fire. Probably for merging it should get it also. The problem with the swapping is that there in no animation, they just change positions and a message appears, would like to make it nicer, but there is no way that I know to move into a current occupied tile. Will need to look at the runover code to see if I may get something from it.
I have just update it, the AI now gets a reaction fire. Probably for merging it should get it also. The problem with the swapping is that there in no animation, they just change positions and a message appears, would like to make it nicer, but there is no way that I know to move into a current occupied tile. Will need to look at the runover code to see if I may get something from it.
-
GottaLove88s
- Lieutenant-General - Do 217E

- Posts: 3151
- Joined: Fri Apr 06, 2012 6:18 pm
- Location: Palau
Re: Merging units - How?
Thanks RF, Have dropped this into the final version of Fast N Sneaky. Your code works really well. I like your funky new "merge" icon too. Nice. Are you going to make one for swapping? 
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?
That icon is an ingame icon used in one of the expansions, I would like to make one for Merge and one for Swap, but my graphic skills are very bad, will give a try at it.
-
GottaLove88s
- Lieutenant-General - Do 217E

- Posts: 3151
- Joined: Fri Apr 06, 2012 6:18 pm
- Location: Palau
Re: Merging units - How?
Ah, I see, cunning, that makes sense... I have no idea how to turn graphics into BA icons, but it's easy to knock up basic stuff with MS Office... Simple arrows might work for Merge or Swap... What do you reckon?
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 Where do these images go? Where do I find the ones used in the game?
THX
THX
-
GottaLove88s
- Lieutenant-General - Do 217E

- Posts: 3151
- Joined: Fri Apr 06, 2012 6:18 pm
- Location: Palau
Re: Merging units - How?
Thanks PK, Good question. I'm not sure. RF seems to use SetUnitIconMask and SetIconMask commands in his Merge.bsf code, but these call up an existing BA icon that's currently unused. I'm hoping Pip or Iain will explain how to swap to new icons, such as those above. I believe RF may also be playing with this... See viewtopic.php?f=87&t=36065 to download the Merge.bsf, Swap1.bsf commands and Squads.csv changes to make mortars walk. Please share if you figure it out! 
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

