Page 1 of 1

reinforcements on the Editor

Posted: Thu Apr 17, 2014 2:55 pm
by benjam250
hi,

Yesterday I purchased battle academy off steam and after completing the North African Campaign I decided to try the editor.

I am half way through my map and I am beginning to add units and VP points.

After 4 VP's have been captured by the player, I want a few reinforcements to enter the battle, but I do not know how to do reinforcements.

Could someone please tell me how to do Reinforcements and maybe how to do counter-attacks.

Thank you

Ben McGregor

Re: reinforcements on the Editor

Posted: Thu Apr 17, 2014 3:26 pm
by pipfromslitherine
I think I answered your query on the Steam forums? If not then I will be happy to answer it here :)

You can't do reinforcements directly via and editor tool - you'll need to script them. There isn't an example that specifically shows how to do reinforcements, but I would suggest taking a look at the template project below, and then looking at some of the game mission scripts (such as DDay in CAMPAIGNS/2Normandy/Scenarios/dday.bsf)

viewtopic.php?f=105&t=18286

the game wiki is here

http://www.slitherinebravo.net/GameWiki/doku.php

and some good tips on setting up Notepad++ etc are part of it here:

http://www.slitherinebravo.net/GameWiki ... ne#notepad

Any more questions let me know. The Slitherine forums also contain a lot of modders who might have helpful hints! :)

Cheers

Pip

Re: reinforcements on the Editor

Posted: Thu Apr 17, 2014 3:48 pm
by Navaronegun
As Pip said, read those site first.

When you have dug into coding in the .bsf files (you will find what that means here soon enough. :) ) My preferred method is:

"
FUNCTION AlliedReinforcements (force)
{
int facing;
int id;
int loadedid;

facing = 4;
if ( GetTurn() == 6 )
{
PlaceUnit(50, 70, facing, 0, 0, "british_truck");
PlaceUnit(50, 71, facing, 0, 0, "british_truck");
PlaceUnit(50, 72, facing, 0, 0, "british_truck");
PlaceUnit(50, 73, facing, 0, 0, "british_truck");
PlaceUnit(50, 74, facing, 0, 0, "british_truck");
PlaceUnit(50, 75, facing, 0, 0, "british_truck");
PlaceUnit(50, 76, facing, 0, 0, "british_truck");
PlaceUnit(50, 77, facing, 0, 0, "british_truck");
PlaceUnit(50, 78, facing, 0, 0, "british_truck");
PlaceUnit(50, 79, facing, 0, 0, "british_truck");
PlaceUnit(51, 70, facing, 0, 0, "COMMANDO");
PlaceUnit(51, 71, facing, 0, 0, "COMMANDO");
PlaceUnit(51, 72, facing, 0, 0, "COMMANDO");
PlaceUnit(51, 73, facing, 0, 0, "COMMANDO");
PlaceUnit(51, 74, facing, 0, 0, "COMMANDO");
PlaceUnit(51, 75, facing, 0, 0, "COMMANDO");
PlaceUnit(51, 76, facing, 0, 0, "COMMANDO");
PlaceUnit(51, 77, facing, 0, 0, "COMMANDO");
PlaceUnit(51, 78, facing, 0, 0, "COMMANDO");
PlaceUnit(51, 79, facing, 0, 0, "COMMANDO");
PlaceUnit(49, 70, facing, 0, 0, "COMMANDO");
PlaceUnit(49, 71, facing, 0, 0, "COMMANDO");
PlaceUnit(49, 72, facing, 0, 0, "CDOVICKERS");
PlaceUnit(49, 73, facing, 0, 0, "CDOVICKERS");
PlaceUnit(49, 74, facing, 0, 0, "CDOVICKERS");
PlaceUnit(49, 75, facing, 0, 0, "CDOMORTAR");
PlaceUnit(49, 76, facing, 0, 0, "CDOMORTAR");
PlaceUnit(49, 77, facing, 0, 0, "CDOMORTAR");
PlaceUnit(49, 78, facing, 0, 0, "British_leader");
PlaceUnit(49, 79, facing, 0, 0, "Airborne_jeep");
}
if ( GetShowSide() == GetCurrentSide() )
{
AddVizCamCenter(50, 73);
ShowUIScreenX( "BattleHead0", "Anim1", "IDS_REINF", "BHead0Image:us_tanker_head") ;
}

}

"

Re: reinforcements on the Editor

Posted: Mon Apr 21, 2014 12:17 pm
by benjam250
hi,

thanks for all the replies.

For the reinforcements do i need to place the unit on the map or do I just have to type this into notepad and the unit will pop up?


Thanks

Re: reinforcements on the Editor

Posted: Mon Apr 21, 2014 1:47 pm
by Navaronegun
The latter.

Nav