Jump to content

! Menu API of the SSE improvement requested


FlightControl

Recommended Posts

The Menu API of DCS should be improved a bit, the way menus work.

 

It is great that the SSE provides methods to set menus to:

 

- All players: Path missionCommands.addCommand(string name, Path or nil path, CommandFunction сommandFunction, any argument)

- Only players to a coalition: Path missionCommands.addCommandForCoalition(enum coalition.side coalition, string name, Path or nil path, CommandFunction сommandFunction, any argument)

- Only players to a group: Path missionCommands.addCommandForGroup(GroupId groupId, string name, Path or nil path, CommandFunction сommandFunction, any argument)

 

The menu system calls the commandFunction, passing the given argument.

However, by design, there is a big functionality that is missing in this design.

 

The menu system is not providing to the commandFunction as a parameter the Unit object of the player who selected the menu option.

If the Unit object would be passed, that would be a great help.

 

Right now, the only way to know which group has used which menu, is to set

a menu option for each group specifically!!!! And this is very bad!

That requires a system to remove/add/replace menus constantly when players move

from plane to plane in different tasking scenarios.

 

It provides an overkill of menu API calls.

 

 

We suspect that DCS in a MP environment is not able to handle all these menu

relays correctly. On the client side, we see menus disappearing which should be there.

 

 

So the requirement is that in these menu APIs, if the Unit object (or Group object) would be passed, that would be a great help.

It would allow for a much more stable menu system.

 

I suggest to provide as the 2nd parameter to the commandFunction, to pass the Unit object that used the menu option!

FC

[TABLE][sIGPIC][/sIGPIC]|

[/TABLE]

Link to comment
Share on other sites

You can get the unit object by sending the unitName as one of the any arguments, then in the function you're calling use Unit.getByName or immediately send the unit object as a parameter.


Edited by Coug4r

-

If man were meant to fly he'd be filled with helium.

Link to comment
Share on other sites

You can get the unit object by sending the unitName as one of the any arguments, then in the function you're calling use Unit.getByName or immediately send the unit object as a parameter.
I know, but this does not make sense for a coalition level menu.

 

Sent from my SM-N950F using Tapatalk

[TABLE][sIGPIC][/sIGPIC]|

[/TABLE]

Link to comment
Share on other sites

Provides a lot of flexibility though and i bet you can create some 'higher level' functions to deal with the menu maintenance.
These flexible functions have already been made and the result is highly inefficient, although the logic behind those functions are highly efficient including refresh logic that works with tagging and time stamps.

 

Why?

 

When you change for a large amount of group(s) the menu items, you need to remove those menus and create new ones... but for all those groups... If you have 20 clients connected to the host, then all these menu updates need to be synched over the network too...

 

Sent from my SM-N950F using Tapatalk

[TABLE][sIGPIC][/sIGPIC]|

[/TABLE]

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...