Page 2 of 2

Re: Merging units - How?

Posted: Thu Jul 26, 2012 9:05 am
by rf900
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.

Re: Merging units - How?

Posted: Thu Jul 26, 2012 11:04 am
by GottaLove88s
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...

Re: Merging units - How?

Posted: Thu Jul 26, 2012 11:31 am
by rf900
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.

Re: Merging units - How?

Posted: Thu Jul 26, 2012 5:04 pm
by rf900
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)

Re: Merging units - How?

Posted: Thu Jul 26, 2012 5:14 pm
by GottaLove88s
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! :-)

Re: Merging units - How?

Posted: Thu Jul 26, 2012 5:16 pm
by GottaLove88s
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?

Re: Merging units - How?

Posted: Thu Jul 26, 2012 5:17 pm
by GottaLove88s
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!

Re: Merging units - How?

Posted: Thu Jul 26, 2012 6:43 pm
by rf900
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.

Re: Merging units - How?

Posted: Fri Jul 27, 2012 5:46 am
by GottaLove88s
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? :-)

Re: Merging units - How?

Posted: Fri Jul 27, 2012 6:29 am
by rf900
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.

Re: Merging units - How?

Posted: Fri Jul 27, 2012 8:16 am
by GottaLove88s
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?
merge and swap icon ideas.tiff
merge and swap icon ideas.tiff (13.35 KiB) Viewed 1949 times

Re: Merging units - How?

Posted: Sat Jul 28, 2012 11:54 am
by pk867
Hi Where do these images go? Where do I find the ones used in the game?
THX

Re: Merging units - How?

Posted: Sun Jul 29, 2012 8:41 am
by GottaLove88s
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! :-)