astruyk / Ares

An arma3 mod that adds some extra functionality to Zeus
51 stars 11 forks source link

Add ability to extend Ares functionality on the fly #176

Closed astruyk closed 9 years ago

astruyk commented 9 years ago

The goal here is to have a way for people to add their own custom modules without having add them here and do a new release every time (though, if people want to have them included that'd be awesome). Right now it's kind of hacked into the 'Spawn Custom Mission Object' functionality - where a mission can define some specific items to be added to a drop-down dialog. I'd like to extend the concept to be able to add full-fledged modules to Ares from mission scripts - basically turning Ares into a framework for adding new menu entries in the Zeus menu.

This would make it easier to include functions from other scripts the mission might be running (e.g. #173 ) or by taking advantage of mod stuff (e.g. a module that would perform AGM medical/capture tasks).

Ideally you could do something like this:

[{ (_this select 0) call Foo_fnc_DoSomething; }, "My Module Name", "My Category"] call Ares_fnc_RegisterExtension;

That would add a new 'My Category' entry in the Zeus UI with a module called 'My Module Name'. When dropped in the world it would callback into the code and pass parameters about the location and the unit (if any) that it was dropped on - essentially allowing people to write their own modules.

As a test of the system, a large portion of current core modules (maybe equipment and behaviour scripts?) should be converted over.

senshi-x commented 9 years ago

This would be incredibly awesome. I love Ares, but I always find myself with "If only I could add that one particular function I always need in this mission as an additional module without defining an entire new Ares submod...". Doing it manually in the debug console all the time is tedious and dangerous.

astruyk commented 9 years ago

Seems like this is working satisfactorily. Being used for all new functionality in 1.6.0. Still need to do the 'convert other things' pass. Will do as other things get modified. Moving off of milestone to reflect new status.

astruyk commented 9 years ago

Meh. Going to just do this as changes are made to old systems. Not going to do a bunch of work that isn't reflected in any new behaviours. All new modules will be of this type.