Matrix Games Forums

Forums  Register  Login  Photo Gallery  Member List  Search  Calendars  FAQ 

My Profile  Inbox  Address Book  My Subscription  My Forums  Log Out

AI vs AI

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
  Printable Version
All Forums >> [New Releases from Matrix Games] >> Close Combat – The Bloody First >> AI vs AI Page: [1]
Login
Message << Older Topic   Newer Topic >>
AI vs AI - 2/3/2020 5:30:29 PM   
ineffable


Posts: 408
Joined: 12/13/2019
From: Fishers Ferry
Status: offline
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 //.

Attachment (1)

< Message edited by ineffable -- 2/3/2020 5:33:55 PM >


_____________________________

Quid si
Post #: 1
RE: AI vs AI - 2/3/2020 5:54:28 PM   
ineffable


Posts: 408
Joined: 12/13/2019
From: Fishers Ferry
Status: offline
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.

_____________________________

Quid si

(in reply to ineffable)
Post #: 2
No plan survives enemy contact - 2/4/2020 12:02:57 AM   
ineffable


Posts: 408
Joined: 12/13/2019
From: Fishers Ferry
Status: offline
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.

Attachment (1)

< Message edited by ineffable -- 2/4/2020 12:34:04 AM >


_____________________________

Quid si

(in reply to ineffable)
Post #: 3
RE: No plan survives enemy contact - 2/4/2020 12:14:15 AM   
ineffable


Posts: 408
Joined: 12/13/2019
From: Fishers Ferry
Status: offline
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.

_____________________________

Quid si

(in reply to ineffable)
Post #: 4
Page:   [1]
All Forums >> [New Releases from Matrix Games] >> Close Combat – The Bloody First >> AI vs AI Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts


Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI

0.156