Jump to content
duda123

AI Command (High Command Replacement)

Recommended Posts

 

command.jpg

 


 

I'm working on a full replacement of High Command. My goal is to make a map-based interface that's cleaner, more intuitive and more powerful than the existing high command module. It should also provide full MP support.

 

Here's what I have working so far:

 

The map-based ai controls are given to player(s) who have picked up a "command radio" (an object on the groud). There can be multiple command radios, and multiple players can view + control the same ai groups at the same time.

 

Groups and waypoints are identified by custom icons. They all all can support mouse over, drag/drop and select animations. Colors can be changed in-game by the player. See the video of this working.

 

The player can set "go codes" at waypoints. This means that the group will stop at the waypoint and wait for the player to issue a "go code" (Alpha go, Bravo go..) using the command radio they've picked up.

 

Everything syncs between clients. E.g, if you drag drop a waypoint, change a color of a group, etc, all other players will see the change immediately on their map (if they're holding a command radio).

 

The player can "remote control" any of the groups' leaders. If the remote controlled unit dies, or the player presses delete, remote control terminates and the player go back to their own unit. Works great in MP.

 

Does not depend on any other addons. You can simply drop the code into a mission directory and modify description.ext + init.sqf, and it will be up and running.

 

Let me know if you have experience with Arma scripting - looking for others to contribute!

It's currently playable (I have it running on a coop server), but still work to be done to create group icons and add support for other actions besides move and wait - (e.g. land, get out, get in, etc).

 

Here's a short video:

 


 


 

Source:

 


  • Like 5

Share this post


Link to post
Share on other sites

PM me if anyone would like to test this out. I can either send the scripts or can point you at a server with this running. Just let me know what you'd prefer.

Share this post


Link to post
Share on other sites

I like some of the ideas like being able to see and color code the waypoints, but why not just add them as a add-on to the current high command system?

Share this post


Link to post
Share on other sites

This is the high level organization of the code:

 

Command Control -- uses --> Group Controls -- uses --> Interactive Icons -- uses --> Map Icons

 

Map Icon: Represents an icon that can be drawn on the map. These are local to the client only.

 

Interactive Icon: A collection of map icons (unselected icon, selected icon, mouse over icon, etc) and mouse/key event handlers. The mouse/key events determines the "state" of the interactive icon. (e.g. mouse over, selected, etc) The state drives which map icon from its collection of icons is shown when drawn on a map. These are local to the client only.

 

Group Control: A collection of interactive icons (one for the group icon, and one for each waypoint) associated to one group. Also includes a bunch of event handlers. These are local to the client only.

 

Command Control: A collection of groups controlled via the map. Any group in a command control will be shown + will be controllable via the map when the Command Control is drawn. These are network global.

 

Also, all of the waypoint creation is done on the server side. As you draw the "waypoints" on the map, it's not actually creating arma "waypoints" at the same time. The server a few seconds later will create them at the same position that you've drawn. In the case of the "go code" way point, the server only creates waypoints up to the go code waypoint and stops. Once the go code is issued, the server starts creating the rest of the waypoints.

 

Also, most of the data transmitted between the server/clients maintains a revision number. For example, when you draw a new waypoint, an array of waypoint positions gets updated along with a revision number. Other clients then use that revision number to figure out if they need to update their local set of drawn waypoints. Same thing happens for the collection of command control groups, colors, etc.

 

Overall, I want to keep this pretty high level. It's not my intention to give you unit level control over groups as it will get really complex. I'd really just like an easy way to direct and move groups around and change their behavior/combat mode.

 

In term of actions, I'm thinking of the following:

 

Group Actions:

  1. Assign Vehicle - Assigns a group to a vehicle. Player chooses vehicle on map. Group gets into vehicle. If multiple vehicles assigned, group divides between vehicles evenly.
     

  2. Unassign Vehicle - Unassigns a vehicle from a group. Player chooses vehicle on map (if assigned multiple). When vehicle is unassigned, the group gets out and will divided up remaining vehicles (if any remaining).

Waypoint Actions (also can be used as group actions):

  1. Board Transport - Only for ground troops. Will board the cargo of the closest group's vehicle as long as there's space. Once on board, the group's icon is removed from the map.
     

  2. Unload Transport - Only for groups assigned to a vehicle with other groups currently in their cargo. Will force all other groups to exit the vehicle. Once other groups exit, the other group's icons reappear on the map.
     

  3. Wait - For all groups. Options might include, wait for amount of time, wait indefinitely, wait for go code, wait for cargo board, etc.
     

  4. Land - For heli groups only. Will land near the waypoint marker.

Configuration:
 

The server creates one or more command controls when the the mission starts. Example creating two command controls - one for all east groups, and one for all west groups. Note: These "default" command controls (ALL_EAST, ALL_WEST) are created automatically. You can create new ones with specific groups assigned, or use these defaults.

["ALL_EAST"] call AIC_fnc_createCommandControl;
["ALL_WEST"] call AIC_fnc_createCommandControl;

{
if(side _x == east) then {
["ALL_EAST",_x] call AIC_fnc_commandControlAddGroup;
} else {
["ALL_WEST",_x] call AIC_fnc_commandControlAddGroup;
};
} forEach allGroups;

On the client side, you then can show/hide the command controls on the map using this function:

["ALL_WEST",true] call AIC_fnc_showCommandControl;

or

["ALL_EAST",true] call AIC_fnc_showCommandControl;
  • Like 2

Share this post


Link to post
Share on other sites

I have a some scripts in my rts3 that sorta does this in a way but its all still sqs, .. I can turn on 4 different waypoints and set different ai or ai groups to these 4 different waypoint ..

but I have a list of things to fix..

wish I could add yours.

Share this post


Link to post
Share on other sites

duda123 , do you know High Command Extensions addon from Arma 2? If you can do something like this in your addon it would be great.

  • Like 1

Share this post


Link to post
Share on other sites

duda123 , do you know High Command Extensions addon from Arma 2? If you can do something like this in your addon it would be great.

Is this what you're referring to? http://www.armaholic.com/page.php?id=14961

I've never used it. Are there specific features from that addon you would recommend implementing?

  • Like 1

Share this post


Link to post
Share on other sites

duda123 Yes , that is it! There are many features in it and they all needed, try to play with it in A2 and you'll see. I think it's the best addon of High Command mode.It's simply and quick in use. Hope, you will make such a thing.

Share this post


Link to post
Share on other sites

I've started to work on vehicle assignment. Here's a demo of it in action. Let me know what you think:

 

  • Like 3

Share this post


Link to post
Share on other sites

I've started to work on vehicle assignment. Here's a demo of it in action. Let me know what you think:

 

Good idea. Quite conveniently function.

Share this post


Link to post
Share on other sites

I've started to work on vehicle assignment. Here's a demo of it in action. Let me know what you think:

 

That looks awesome. Will it work for already piloted vehicles also?

I've been waiting for a mod like this for a long time. I mainly play SP and use high command a lot. This will be really helpful.

Share this post


Link to post
Share on other sites

That looks awesome. Will it work for already piloted vehicles also?

I've been waiting for a mod like this for a long time. I mainly play SP and use high command a lot. This will be really helpful.

 

Yes, that's the plan! You would assign a small transport squad to a heli, and then tell another large squad to get in the cargo of the transport squad's heli. Then you'd have the ability to unload the group(s) from the cargo.

Share this post


Link to post
Share on other sites

If you could make them little pixel guys to get in a car and set 50.mg and so on,but do this on a level surface,it will be a great mod.

 

That seems to be broke now,sometimes.

I would like to be able to place and syncronize all things on a map,without any modules,or anything I need to do my self.

 

A better way to make them watch a sector.And a way to choose with what weapon to go about it.

And a way to add 2 weapons in Inventory,and to use this one now,sniper weapon at Wp 5 or so.

 

A way to make them search for items in cargo of car.

Or lase a target,one after the other.1,2,3 and so on.

 

A way to form a 360* protection zone,or shadow and be used as a bodyguard.

 

Does this work Vicom-better driving?  That is almost essential.

 

Maybe,tell it to set-up a landing zone,using IR-strobes .

 

Looks great,keep adding stuff for this!  Would like to see that resupply by parachute,lands right next to you in arma 3.It won`t do that now.

 

Could you make the action be delayed until Go-code is given? Somehow,make a AA-gunner,shoot down planes,not helicopters? 

Make helicopters Not use their lights?  Maybe useful.

 

What if we could assign an area of operations,and randomly put up a OP-Base?  Or use some sort of template to place AA-gun position,or simply ,make patrols be set next to a base,randomly, on Server,like MCC.

Share this post


Link to post
Share on other sites

Latest development work:

 

These demos look really impressive mate, well done! Looking forward to seeing how this progresses. 

Share this post


Link to post
Share on other sites

Hi Duda, do you think this is stable enough to put in a mission for a dedicated server (private) as is or does it still have a few bugs that need ironing out? It looks brilliant! 

Share this post


Link to post
Share on other sites

Hi Duda, do you think this is stable enough to put in a mission for a dedicated server (private) as is or does it still have a few bugs that need ironing out? It looks brilliant! 

 

Yes - it's stable enough to be used. Been running on our dedicated server for a few weeks. Seen a few glitches assigning squads to vehicles, but overall it's working pretty well.

 

Here's how to get it working with the command radio that you pick up:

 

1. Add the AICommand folder to your mission's main directory (from here: https://github.com/sethduda/AIC)

 

2. Configure your mission's description.ext file to use this:

 

class cfgFunctions {
    #include "AICommand\cfgfunctions.hpp"
};
 
class CfgNotifications
{
    #include "AICommand\cfgnotifications.hpp"
};
 
3. Create an invisible marker in your mission called "hc1" - you'll see this referenced in the init.sqf file. This is where the command radio will appear.
 
4. Copy the code in the init.sqf here (https://github.com/sethduda/AIC/blob/master/init.sqf) into your init.sqf file. If you want more than one command radio on the map, you can modify the first line in the init.sqf file to be (e.g. for 2 command radios):
 
[markerPos "hc1", [[1,"Take High Command","FUNC_takeHC",true,true,false],[2,"Release High Command","FUNC_releaseHC",true,false,true],[3,"Alpha Go","FUNC_alphaGo",true],[4,"Bravo Go","FUNC_bravoGo",true]], false, 2] call AIC_fnc_createCommandRadio;
  • Like 1

Share this post


Link to post
Share on other sites

Thanks Duda! Looking forward to using it. Is there a way to keep the high command radio in a player's inventory, for persistent missions for example?

Share this post


Link to post
Share on other sites

I believe this is a highly ambitious addon and I (and the rest of the community i''m sure) is very thankful of your gracious sharing of the early development editions of your progress so when you are satisfied with your final release the players that will use this the most will already be familiar with the basics of its usage and therefore eliminating  most of the learning curve. It would be nice to see more talented addon authors like yourself follow this model of release. 

 

user *Igitur mentioned the idea of you collaborating with the author of the HCC converter mod listed here https://forums.bistudio.com/topic/185710-hcc-high-command-converter-141/

I would like to add that there is another addon author that is currently slaving away as well to bring an addon of similiar functionality [not the same, but the different perspectives and joint brainstorming i think could maximize the impact of all of the three of your addons to benefit the Arma experience in the most profound release imaginable]  This authors handle is 'Mad_Cheese' and here is his addon page with full detailed attributes https://forums.bistudio.com/topic/177967-c2-command-and-control-form-asm/ 

 

We are seeing these collaboration projects more and more in the Arma community and the resulting end products are absolutely game-changing. It is of course completely up to you and the aforementioned authors as to how you all wish to go about planing and working on your seperate creations and in no way am i intending to infer than ANY one of you needs the others help, regardless of the route you decide to take this will be a very useful and productive addition to our little world of war here in the armaverse and I thank you greatly for your time, dedication, and selfless hard work.  GODspeed :)

Share this post


Link to post
Share on other sites

Awesome idea, I subscribed to the mod on the Steam Workshop and loaded the game up with the mod.  I can't seem to actually command other units though.  The dialogue box pops up, but when I select an option like add waypoints nothing happens.  Any idea what could be going on?

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×