This a list of the things I've identified that are missing in order to enable a proper 3DEN multiplayer mod.
Need:
1.1 3DEN event handler that triggers when mission attributes are confirmed/saved or are set using script commands.
add3DENEventHandler ["OnMissionAttibutesChanged", { params ["_section"]; // attribute section (class name) }];
1.2 3DEN event handler that triggers when an entity's attributes are confirmed/saved or are set using script commands.
Basically the already existing object AttributesChanged3DEN but then editor wide for all entities (object, group, trigger, system, waypoint, marker, layer, comment).
add3DENEventHandler ["OnEntityAttibutesChanged", { params ["_entity"]; // either Eden Entity or Eden ID }];
1.3 3DEN event handler that triggers when an entity's layer changes.
add3DENEventHandler ["OnEntityLayerChanged", { params ["_entity", "_newLayerId", "_oldLayerId"]; }];
1.4 3DEN event handler that triggers when a context menu action is used/pressed (triggers before action happens):
This is the more future proof out of two solutions, the other being, that there are only 6 problematic context menu actions currently enabled which could be fixed by:
Adding a scripted event handler to BIS_fnc_3DENEntityMenu that includes _mode.
Move to formation, snap to surface, orient to terrain normal and orient to sea normal should all trigger an AttributesChanged event. (should be fixed either way :P)
Edit: seems I had a bit of a brain fart here, this is not required. These actions can edited in the config to be compatible.
1.5 Command to load or start a new 3DEN scenario, I imagine something like:
Syntax: load3DENScenario missionPath where missionPath is the relative path to the mission's folder from the current profile directory. Returns bool based on success.
When instead of a valid mission path a valid world name is specified it creates a new scenario:
Examples:
load3DENScenario "missions\test.VR" Loads the mission: "C:\Users\Username\Documents\Arma 3\missions\test.VR".
load3DENScenario "mpmissions\specialOps\test.VR" Loads the mission: "C:\Users\Username\Documents\Arma 3\mpmissions\specialOps\test.VR".
load3DENScenario "VR" Creates an new VR scenario.
Nice To Have: (ordered from most to least wanted)
These are more of a Hail Mary, any of these would be a nice bonus but don't in anyway impede the core functionality if not taken on board.
2.1 3DEN event handler that triggers when an entity is dragged, triggers for everything except layers.
Basically the already existing object Dragged3DEN but then editor wide for all entities except layers (object, group, trigger, system, waypoint, marker, comment).
add3DENEventHandler ["OnEntityDragged", { params ["_entity"]; }];
Why: this one I'm kinda iffy about since Dragged3DEN already works for objects and systems (can also add it to triggers tho it never triggers) and the rest would still properly update if 1.1 (OnEntityAttibutesChanged) is added. I think it'd be better to have around than to not have around.
2.2 3DEN event handler that triggers before mission preview is launched, and if it returns true prevents the mission preview from happening.
add3DENEventHandler ["PreMissionPreview", { params ["_isMp"]; // true if about to start MP preview true // Prevent mission preview from happening }];
Instead passing an _isMp could add action state to MissionPreview, MissionPreviewBriefing and MissionPreviewMP.
Why: I'd use this to both prevent accidental mission previews and to have players automatically join the hosts server when they start an MP preview.
2.3 3DEN OnEntityCreated event; existing ticket: https://feedback.bistudio.com/T170168 (Maybe call it OnCreatedUnits to stay consistent with naming of OnDeleteUnits? )
2.4 Update 3DEN OnDeleteUnits event to include deleted entity and trigger just before the entity is deleted.
Why: right now I have to detect entity creation and deletion by using all3DENEntities and have their ID which is quite slow.
2.5 Show chat in Multiplayer 3DEN
Why: to allow systemChat debugging but also to later maybe add a chat system
2.6 Allow 1.5 (load3DENScenario) to be used from main menu
Why: I'd use it to smoothly transition players back to the 3DEN Collab session after an MP 3DEN preview ended.
2.7 Commands to get all entity/mission attributes in a given category, something like:
Syntax: entity get3DENAttributes category and section get3DENMissionAttributes category, return name value pairs: [[name1, value1], [name2, value2]] (or maybe hashMap?)
There are also class specific attributes, they should only be returned if category is "" and maybe allow to only get these by passing in "#specific#" as the category?
Examples:
player get3DENAttributes "" Gets all attributes (including class specific) from player unit
player get3DENAttributes "Init" Gets all attributes from Init category, e.g: [["Init", ""], ["Name", "CoolPlayer"]]
player get3DENAttributes "#specific#" Gets all attributes specific to the unit's class
"Multiplayer" get3DENMissionAttributes "" Gets all multiplayer mission attributes
"Multiplayer" get3DENMissionAttributes "Type" Gets all attributes from multiplayer Type category, e.g: [["GameType", "TDM"], ["MinPlayers", 1], ["MaxPlayers", 16]]
Why: would be nice QOL functionality
2.8 Command to tell entity type from Eden Entity or Eden ID, something like:
Syntax: get3DENEntityType entity where entity is either Eden Entity or Eden ID. Returns: "OBJECT", "GROUP", "TRIGGER", "LOGIC", "WAYPOINT", "MARKER", "LAYER", "COMMENT" or nil (Or maybe number? Prob faster but less descriptive).
Examples:
get3DENEntityType player returns "OBJECT"
get3DENEntityType group player returns "GROUP"
get3DENEntityType -1 returns nil
Why: would be nice QOL functionality