AI vs AI (Full Version)

All Forums >> [New Releases from Matrix Games] >> Close Combat The Bloody First


ineffable -> AI vs AI (2/3/2020 5:30:29 PM)

The .bsf files use an EnableAI(side,on/off) function that can allow the player to share unit control with a friendly AI or let the friendly AI run the whole battle. In effect this acts like the Initiative game setting on steroids as the friendly AI battles the enemy AI. See the attached zip containing the AIvsAI.bsf.

The SetAIStanceLimit(side, attackstance, defensestance) function imits the range of stances the AI can select to a given range. 0 = All Out Attack, 1 = Attack, 2 = Probe, 3 = Defend, 4 = Delay Hold, 5 = Delay Withdraw, 6 = Retreat. By default this is turned off in the AIvsAI.bsf. To enable change -1 to 0=Allied or 1=Axis and choose attack/defend stance variables.

Additionally, the SetAllowedOrderUnit(n) function limits the player to giving orders to only one unit. Replace (-1) in the AIvsAI.bsf with (0), (1), (2) etc. These values count down the Unit List on the top left of the screen. (0) is the first unit at the top of the Unit List, usually a command unit.

Finally, the BeginBattle() function starts the battle as soon as you enter the Deploy phase. It forces the player to accept the Default deployment as determined by the game AI or a PlaceUnit(unitid, x, y, facing) function in the .bsf file. To use this function, delete the two slashes (//) at beginning of the line.

After copying the attached AIvsAI.bsf to \Close Combat - The Bloody First\Campaigns\MAIN\DATA\BATTLES\ and setting the script variables as desired, it can be used with any scenario by adding opening the scenario file in Notepad and adding- SCRIPT AIvsAI -as the last line in the file. By default the SetAllowedOrderUnit(n) and SetAIStanceLimit functions are turned off (-1) and the BeginBattle() function is disabled with remark slashes //.

ineffable -> RE: AI vs AI (2/3/2020 5:54:28 PM)

Some other interesting functions that are available are:

Add a unit to the map. AddUnit(unitTypeIndex, side, x, y, facing) This might be used as a method to generate in-battle replacements.

ImmobilizeUnit(unitID), makes a vehicle unit unable to move. Good scenario making possibilities here.

SetAllowedOrders(orders bitfield) Limits player orders to only these orders. -1 to clear. Could be a radical way of playing - the player could be limited only to giving Defend/Ambush commands while the friendly AI does everything else.

ineffable -> No plan survives enemy contact (2/4/2020 12:02:57 AM)

The attached custom scenario and associated .bsf file are a fun look at CC as it hasnt been seen outside of development. A peak into the AI's tactical thought process and a taste of what's possible with scripting. The AI will play both sides no matter which side you choose. Player can select game settings, units, sub-units and gear. Battle will start immediately upon entering the Deploy phase.

At your option you can control only the command unit on either side. Although many tactical 'themes' in each battle will be similar, this scenario is guaranteed to have a different result each time its played.

With a few dev tweaks, potentially a new way to play - players could create battle plans (unit selection, deployment and any individual or sequential pre-battle orders), save and upload the file. Other players could download the save, create their battleplans for the opposing side, and play out a player-designed, AI-controlled battles.

Unfortunately, saved versions of scripted scenarios dont link correctly to their .bsf script. And the byte that determines which side is available to be played in a save file would need to be toggled between Allied<->Axis as has been possible in previous CC versions.

Copy AvA.bsf to \Close Combat - The Bloody First\Campaigns\MAIN\DATA\BATTLES\

Copy AvA.txt to \Documents\My Games\CloseCombatTheBloodyFirst\Scenarios\

Play the AvA scenario, a meeting engagement in Caumont. Enjoy the spectacle.

ineffable -> RE: No plan survives enemy contact (2/4/2020 12:14:15 AM)

If my instincts are correct - its possible to create a script to output reports on players battle plans (unit id, placement location and orders). Multiple .bsf files could be created from these 'battleplan' reports for, say, all the stock battle scenarios. Then different sets of campaign scenarios and their associated .bsf files could be swapped into the game to create diverse campaigns with different player-made battle set-ups, instead of the same deployments each time the stock battles are played.

Page: [1]

Valid CSS!

Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI