Author Topic: [Alpha Release] Ability Management Framework  (Read 2574 times)

0 Members and 1 Guest are viewing this topic.

[Alpha Release] Ability Management Framework
Ability Management Framework


Download link.

Modpack includes :
- All the framework scripts
- Sample config files
- A user manual
- A sample mission that uses a number of abilities, including player-triggered ones
- A bunch of mostly irrelevant stuff due to me ripping this modpack out of another and not bothering to clean up too much


I've written a user manual that details a bit how things work, but here is the abridged version of it :

Required files
- data/scripts
   * parse.lua
   * abilityManager.lua
   * abilityLibrary.lua (--> new ability templates go there)
   * shipVariant.lua
   * shipVariantMissionWide.lua
- data/tables
- data/config
   * abilities.tbl
   * ship_variants.tbl (--> not actually related to abilities (for now))
   * ship_variants_mission_wide.tbl (aka SVMW.tbl)

SEXP calls
- Set abilities for everybody = setShipVariant('some category name from SVMW.tbl')
- Set ability for someone = ability_attachAbility(className, shipName, isManuallyFired)
- Manual trigger = ability_trigger(' AWAXEM::DISCO FURY') (-->ship name::ability name)


The full version of the user manual is located in the doc folder of the modpack.

Outside the user manual itself, each script has its own documentation, with further explainations & specs.

Keep in mind that I am classifying the as an "Alpha" version, meaning that there's still a lot of room for improvement and it hasn't been thoroughly tested yet.
I'm still honing my lua skills, and some areas are likely to get refactored down the line.


Still, I'm kind of proud of what I've done so far, and I hope I'll get more time to work on it next year.

Please feel comment, criticise, report bugs, offer suggestions, cookies, or post whatever crazy ability you come with :)



============ Original post ============
Quote
Hello folks,

For a little while now, I've been toying with the idea of making some sort of generic ability manager framework.

Basically, have something that loads up all sorts of data regarding special abilities (name, cooldown, valid target types, etc.), that would allow a modder to specify either through a script-eval or a custom table that a specific ship has an ability and determine when that ship is allowed to cast that ability.

A modder would then only have to plug in his/her own script that fires up that ability.

I'm still thinking up about use cases, but here is the table spec I have so far, along with a couple of note :

Code: [Select]
$Name: string
$Target Type:   list of string (self, fighter, corvette, tagged, buff:buffType)
$Target Team: list of string (hostile, friendly, neutral, relative to the caster)
$Range: integer (optional)
  +Min: integer (minimum range) (optional)
$Target change condition: string (destroyed, every shot, target no longer valid)
$Cost: integer/list of integer (tied to diffculty level) (optional)
  +Cost type: string (weapon energy reserve, "ammo" specific to that ability, "mana" reserve shared by all abilities) (optional)
$Buff: list of string (optional)

« Last Edit: November 30, 2016, 04:52:41 pm by X3N0-Life-Form »

 

Offline mjn.mixael

  • Cutscene Master
  • 212
  • Anims: 418, Cutscenes: 8, Mainhalls: 7, Logos: 52
    • Steam
    • Twitter
    • Mix-Hai Productions
Re: [CONCEPTION] Ability Management Framework
This will be inserted into JAD in 3...2...1...
Cutscene Upgrade Project - Mainhall Remakes - MixaelANITools - Between the Ashes - MjnMixael's Render Boutique - Mix-Hai Productions
Youtube Channel - P3D Model Box - Photobucket Albums - Model Releases - Downloads
Between the Ashes is looking for committed testers, PM me for details.
Report MediaVP issues, now on the MediaVP Mantis! Read all about it Here!

 

Offline General Battuta

  • Poe's Law In Action
  • 214
  • i wonder when my postcount will exceed my iq
Re: [CONCEPTION] Ability Management Framework
Axem's madness runs far deeper

 

Offline Axem

  • Administrator
  • 211
Discussing scripting vs sexps in missions
Heh, I've actually made my own already, but it's heavily intwined with my powerup system right now (so it can do stuff like regenerating health or unlimited weapon energy over a period of time). A perfectly generic system was on my to-do list but I can see it's already being handled nicely. ;) (You can check it out in the JAD2.22 demo release, itemdrop2-sct.tbm or something.)

My suggestion would be instead of Buff, call it Action so you can have abilities like calling in newly spawned fighters or instant teleport or anything else.

And what is $Target change condition: supposed to do? Destroyed/Target no longer valid are basically identical conditions.

 
Re: [CONCEPTION] Ability Management Framework
Heh, I've actually made my own already, but it's heavily intwined with my powerup system right now (so it can do stuff like regenerating health or unlimited weapon energy over a period of time). A perfectly generic system was on my to-do list but I can see it's already being handled nicely. ;) (You can check it out in the JAD2.22 demo release, itemdrop2-sct.tbm or something.)
I figured you must have had to build something in that spirit for JAD. I'll be sure to check that out.

Quote
My suggestion would be instead of Buff, call it Action so you can have abilities like calling in newly spawned fighters or instant teleport or anything else.
I'm still not too clear on what I want buffs to do or be handled, I vaguely envisioned them as some sort of status effect or TAG-like thing that could then be used to trigger other abilities. Kinda like the stuff you'd do in say, Warcraft 3 when building new spells : have a spell apply a buff that does nothing on its target, then have a trigger handle the actual effect.

Quote
And what is $Target change condition: supposed to do? Destroyed/Target no longer valid are basically identical conditions.
That one's related to target management, which I'm still not clear on how to handle, so there's bound to be some redundancy related to that while in the design phase :). The idea was to provide more targetting conditions unrelated to target type, but without a clear use case in mind, it's probably better to shelve it.


Speaking of use cases, since I'm still in the design phase, I'm in dire need of those. For the moment, I've got 1 specific ability in mind, automated SSM strikes, with possibly a couple of others in the fog (short jumps, cloaking), but since I want the thing to be as generic as possible, I need clear boundaries for it.

 
Re: [CONCEPTION] Ability Management Framework
Alright, I've had some more time to think about all this and started implementing the basics (emphasis on started).

I'm still not sure how to handle always on or global abilities and a few other details, but I've got a clearer idea of what I want to do.

On the technical side, I seem to have gotten over my multi-dimensional array madness and started using proper data structures, so that's a plus (although it does make me want to go back to my parsing script and fix the giant table blob -_-).

It's going slowly, but I'm hoping to have some sort of basic working prototype by the end of July.


Anyway, here is the table prototype:
Code: [Select]
#Abilities

; $Name: string
; $Target Type:   list of string (self, fighter, corvette, tagged, buff:buffType)
; $Target Team: list of string (hostile, friendly, neutral, relative to the caster)
; $Range: integer (optional)
;   +Min: integer (minimum range) (optional)
; $Cost: integer/list of integer (tied to diffculty level) (optional)
;   +Cost type: string (weapon energy reserve, "ammo" specific to that ability, "mana" reserve shared by all abilities) (optional)
; $Buff: list of string (optional)
; $Duration: list of int (optional)
; $Ability Data: metadata used by whatever script actually uses the ability

$Name:          SSM-moloch
$Target Type:   big ship
$Target Team:   Hostile
$Cost:          1
  +Cost Type:   global-ammo:SSM-moloch-ammo/ammo
;; how about having multiple cost types ?
$Ability Data:
  +Strike Type: Shivan SSM Strike

$Name:          Shivan Command aura ;; TODO: ai buff ?
$Target Type:   fighter, bomber
$Target Team:   Friendly
$Range:         4000
$Buff:          command aura
$Ability Data:
  +Max AI:      Colonel

$Name:          Energy Dampening Field ;; TODO : energy drain thingy
$Target Type:   fighter, bomber
$Target Team:   Hostile
$Range:         1500
$Cost:          70
  +Cost Type:   energy:weapon
$Cooldown:      90
$Duration:      15


#End

The script itself so far:
Code: [Select]

------------------------
--- Global Variables ---
------------------------

ability_classes = {}
ability_instances = {}


-- set to true to enable prints
ability_enableDebugPrints = true

----------------------
--- ??? Functions ---
----------------------


function ability_fireAllPossible()
-- TODO : cycle through ability instances & fire them
end

-------------------------
--- Utility Functions ---
-------------------------

function dPrint_ability(message)
if (ability_enableDebugPrints) then
ba.print("[abilityManager.lua] "..message)
end
end

--[[
Return the specified class as a string.

@param className : name of the class
]]
function ability_getClassAsString(className)
--TODO
end

----------------------
--- Core Functions ---
----------------------


function ability_createClass(name, attributes)
-- Initialize the class
ability_classes[name] = {
  Name = name,
  TargetType = attributes['Target Type']['value'],
  TargetTeam = attributes['Target Team']['value'],
  Cooldown = nil,
  Duration = nil,
  Range = -1,
  Cost = 0,
  CostType = nil
}

if not (attributes['Cooldown'] == nil) then
ability_classes[name].Cooldown = attributes['Cooldown']['value']
end

if not (attributes['Range'] == nil) then
ability_classes[name].Range = attributes['Range']['value']
end

if not (attributes['Cost'] == nil) then
ability_classes[name].Cost = attributes['Cost']['value']
if not (attributes['Cost']['sub'] == nil) then --TODO : utility function to grab a sub attributes' value ???
if not (attributes['Cost']['sub']['Cost Type'] == nil) then
ability_classes[name].CostType = attributes['Cost']['sub']['Cost Type']
end
end
end

if not (attributes['Duration'] == nil) then
ability_classes[name].Duration = attributes['Duration']['value']
end

-- Print class
dPrint_ability(ability_getClassAsString(name))
end

--[[
Reset the instance array. Should be called $On Gameplay Start.
]]
function ability_resetInstances()
ability_instances = {}
end


--[[
Create an instance of the specified ability and tie it to the specified shipName.

@param instanceId : unique identifier for this instance
@param className : name of the ability
@param shipName : ship to tie the ability to. Can be nil.
]]
function ability_createInstance(instanceId, className, shipName)
ability_instances[instanceId] = {
Class = className,
Ship = shipName,
LastFired = 0,
Active = true,
Manual = false, --if that instance must be fire manually
Ammo = -1 --needs to be set after creation if necessarys
}
end

--[[
Verify that this ability instance can be fired

@param instanceId : id of the ability instance to test
@return true if it can
]]
function ability_canBeFired(instanceId)
-- Check that this is a valid idea
if (ability_instances[instanceId] == nil) then
ba.warning("[abilityManager.lua] Unknown instance id : "..instanceId)
return false
end

local instance = ability_instances[instanceId]
local class = ability_classes[instance.Class]
-- Verify that this instance is active
if (instance.Active) then
-- Verify cooldown
local missionTime = mn.getMissionTime()
local cooldown = class.Cooldown
if (instance.LastFired + cooldown >= missionTime) then
--TODO : Verify cost
return true
end
end

-- Default
return false
end

------------
--- main ---
------------

abilityTable = parseTableFile("data/config/", "abilities.tbl")

ba.print(getTableObjectAsString(abilityTable))


for name, attributes in pairs(abilityTable['Abilities']) do
ability_createClass(name, attributes)
end

 

Offline Axem

  • Administrator
  • 211
Re: [CONCEPTION] Ability Management Framework
The only thing that leaps out at me right now is...

abilityTable = parseTableFile("data/config/", "abilities.tbl")

Beware, while it may work for you in testing, FreeSpace will not look for a tbl file in /config/ in a VP file. FS will only look at cfg files in config, and tbl/tbm in tables. (Atleast if I'm correct in guessing that first argument is what directory to look in?)

 

Offline AdmiralRalwood

  • 211
  • Mister Subspace Strikes
    • Skype
    • Steam
    • Twitter
Re: [CONCEPTION] Ability Management Framework
Code: [Select]
$Name:          Energy Dampening Field ;; TODO : energy drain thingy
$Target Type:   fighter, bomber
$Target Team:   Hostile
$Range:         1500
$Cost:          70
  +Cost Type:   energy:weapon
$Cooldown:      90
$Duration:      15
Wouldn't the cost be paid by the caster, not the targets? It would be rather odd if an energy dampening field drained its bearer's weapon energy for every hostile strikecraft in range...
Ph'nglui mglw'nafh Codethulhu GitHub wgah'nagl fhtagn.

schrödinbug (noun) - a bug that manifests itself in running software after a programmer notices that the code should never have worked in the first place.

When you gaze long into BMPMAN, BMPMAN also gazes into you.

"I am one of the best FREDders on Earth" -General Battuta

<Aesaar> literary criticism is vladimir putin

<MageKing17> "There's probably a reason the code is the way it is" is a very dangerous line of thought. :P
<MageKing17> Because the "reason" often turns out to be "nobody noticed it was wrong".
(the very next day)
<MageKing17> this ****ing code did it to me again
<MageKing17> "That doesn't really make sense to me, but I'll assume it was being done for a reason."
<MageKing17> **** ME
<MageKing17> THE REASON IS PEOPLE ARE STUPID
<MageKing17> ESPECIALLY ME

<MageKing17> God damn, I do not understand how this is breaking.
<MageKing17> Everything points to "this should work fine", and yet it's clearly not working.
<MjnMixael> 2 hours later... "God damn, how did this ever work at all?!"
(...)
<MageKing17> so
<MageKing17> more than two hours
<MageKing17> but once again we have reached the inevitable conclusion
<MageKing17> How did this code ever work in the first place!?

<@The_E> Welcome to OpenGL, where standards compliance is optional, and error reporting inconsistent

<MageKing17> It was all working perfectly until I actually tried it on an actual mission.

<IronWorks> I am useful for FSO stuff again. This is a red-letter day!
* z64555 erases "Thursday" and rewrites it in red ink

<MageKing17> TIL the entire homing code is held up by shoestrings and duct tape, basically.

 
Re: [CONCEPTION] Ability Management Framework
Well obviously firing the thing is supposed to have a cost. I'm still far away from having the abilities actually do anything, so I haven't put anything related to the "Energy Dampening Field"'s actual effects.

Basically, the script is meant to determine when an ability can be fired, then call the actual function meant to apply the effects, and finally do a bit of book keeping like draining the caster's energy reserve/ammo/whatever.

EDIT - Stuff related to ability's effects would go under $Ability Data:

The only thing that leaps out at me right now is...

abilityTable = parseTableFile("data/config/", "abilities.tbl")

Beware, while it may work for you in testing, FreeSpace will not look for a tbl file in /config/ in a VP file. FS will only look at cfg files in config, and tbl/tbm in tables. (Atleast if I'm correct in guessing that first argument is what directory to look in?)

Huh, I wasn't aware of that. Well I guess that it's something else I need to put on my TODO list ...
« Last Edit: June 30, 2016, 01:22:59 am by X3N0-Life-Form »

 
Re: [CONCEPTION] Ability Management Framework
Hello folks, it's time to post a small update.

The thing's really starting to take shape :
- The core data structures are close to final, along with all sorts of utility functions to help debug things as I go along.
- This also allowed me to stress test my old parsing script a bit and fix a couple of bugs, the most notable one being sub-attributes not being parsed. I've also added a couple of utility functions + improved the debugging messages in there as well. (Which means that it might be a good idea to post a new release of the parsing script as soon as things stabilize a bit.)
- Data parsing is basically done (see updated table below).
- Ability instanciation is working
- Preliminary tests indicate that the canBeFired function seems to be working


So, the next big steps are:
- Target handling
- Write a basic fire function
- Write a function that loops through all active instances and fires the abilities that can be fired
- Complete cost type handling
- Store ability data properly
- Write a basic ability function to test all of the above


The next big milestone's gonna be target handling, the rest should be fairly trivial in comparison.


Updated table:
Code: [Select]
#Abilities

; $Name: string
; $Target Type:   list of string (self, fighter, corvette, tagged, buff:buffType)
; $Target Team: list of string (hostile, friendly, neutral, relative to the caster)
; $Range: integer (optional)
;   +Min: integer (minimum range) (optional)
; $Cost: integer/list of integer (tied to diffculty level) (optional)
;   +Cost type: string (weapon energy reserve, what ammo consumption system is to be used) (optional)
; $Buff: list of string (optional)
; $Cooldown:      90
; $Duration: list of int (optional)
; $Ability Data: metadata used by whatever script actually uses the ability

$Name: SSM-moloch-std
$Target Type:   big ship
$Target Team:   Hostile
$Cooldown: 24, 20, 17, 15, 13
$Ability Data:
  +Strike Type: Shivan SSM Strike

$Name:          SSM-moloch-std-global ;; concept : global ammo
$Target Type:   big ship
$Target Team:   Hostile
$Cost:          1
  +Cost Type:   global:SSM-moloch-ammo
  +Starting Reserve: 15;;TODO : handle + add to the spec above
$Cooldown: 24, 20, 17, 15, 13
$Ability Data:
  +Strike Type: Shivan SSM Strike

$Name:          Shivan Command aura ;; concept : passive ability
$Target Type:   fighter, bomber
$Target Team:   Friendly
$Range:         4000
$Buff:          command aura
$Ability Data:
  +Max AI:      Colonel

$Name:          Energy Dampening Field ;; concept : energy cost type
$Target Type:   fighter, bomber
$Target Team:   Hostile
$Range:         1500
$Cost:          70
  +Cost Type:   energy:weapon
$Cooldown:      90
$Duration:      15


#End

Latest version of the script is here.

 
Re: [CONCEPTION] Ability Management Framework
So I'm not 100% sure what exactly this script can do and what not (I didn't look at the script itself). It seems to track a bunch of conditions and checks wether an ability could be used.
What I don't see is how the player gets to know that he can fire something and what triggers any skill activation, either for the player or an ai controlled ship. The exception are automatic activation abilities like the passive ability in your list.

Why I'm asking: The RTS script contains something similar but not as modular and tied to the interface. So there are ability - interface element (like a button or menu element) combinations and any ship fulfilling the conditions for an ability, like microjumps, will have the activation interface element usable/displayed when selected. I was thinking about replacing some parts of it with your scirpt so it is easier to add new ship abilities and stuff that is not player controlled or needs no interface element.
Here goes scripting and copy paste coding
Freespace RTS Mod
Checkpoint/Shipsaveload script

 
Re: [CONCEPTION] Ability Management Framework
Quote
It seems to track a bunch of conditions and checks wether an ability could be used.
This in a nushell covers my initial needs for this script : provide a basic set of functions that I could rely on when designing special abilities elsewhere.

To try to sum up my use case : "Hey can this ship fire this ability ?" --> "Sure" --> "Can he fire it at that target ?" --> "Sure" --> "OK, let's fire it then" --> "OK, I'll pass your demand to ability_fire(), if it knows what your ability is, it'll call the right guy"

Quote
What I don't see is how the player gets to know that he can fire something and what triggers any skill activation, either for the player or an ai controlled ship. The exception are automatic activation abilities like the passive ability in your list.
With this script alone ? The player doesn't, although whipping up a custom HUD gauge or lua display giving the status of the ability would probably not be too difficult. My initial need was for automated SSM calls while certain ships are present (now that I think about it, I'm pretty sure I forgot the "is that ship in mission" condition in the canBeFired function  :banghead:), so I didn't have any kind of player interaction in mind.

How is an ability triggered ? I'm gonna have a fireIfPossible() function to wrap the use case detailed above. Skill activation is probably gonna be done through SEXPs at first, but I'd like to be able to automate target selection + firing for AI ships.

 
Re: [CONCEPTION] Ability Management Framework
So, it's been two weeks of doing mostly nothing due to busy week-ends, but there has been some tiny progress script-wise :
- aside from an IFF check, canBeFiredAt() is done and ready for testing
- implemented the "energy" cost type, making an ability drain a ship's weapon energy (I'm thinking about adding AB & shield)

I've also added a bunch of small TODOs to make the framework a bit more reliable & usable.

 
Re: [CONCEPTION] Ability Management Framework
So, this morning I woke up with a bunch of things to do. Near the bottom of that list was 'get some work done on the ability manager script'. Surprisingly, I got most of what was on that list done, and was feeling motivated enough to work on Freespace-related matters.

Even more surprisingly, I managed to get it to actually work. Sure, I've still got about a dozen features I'd like to get in, and it needs a lot more testing, but the ground work is now done. Next step is making sure it is as modder-friendly as possible, implement missing features and write up some crazy abilities.


Notable features I'd like to get in next :
- More sensible targeting options. Right now, I'm iterating through the mission ship list and grabbing the first valid target I can find. I'd love to be able to specify a list of target, or maybe pick the closest target. Some targeting persistence could be nice too, like "keep firing at target while it's valid

- Go through all the remaining TODOs related to ammo/energy management.

- Figure out the best way to automate the firing cycle. Right now, I have to set up repeating event in FRED that call the "fireAllPossible" function. I'd like to make it so that the function gets called at regular intervals without having to set it up every mission.
Done.

- Integrate into the ship variant script. I'm already using part of it actually to instanciate abilities on a per-mission basis. I'd like to be able to instanciate on a per-variant basis, like "all standard AWACS can use X", "SOC variants can use X & Y", etc.

- Put a basic showcase mod together and release that.



I'll post updated specs & scripts at a later date.
« Last Edit: September 10, 2016, 04:22:54 pm by X3N0-Life-Form »

 
Re: [CONCEPTION] Ability Management Framework
Alpha stage + demo mod coming soon(ish) !

I've had the chance to a couple more proof-of-concept abilities, which allowed me to uncover & fix a number of bugs. I've also made a number of under-the-hood improvements to make the code more robust and more extendable.

I've streamlined the ability definition process a bit so that modders wouldn't have to mess with the core framework file at all, and the only function in there that should be of any interest is ability_trigger(), which is to be used for manually fired abilities.

Here are the things I want to do before putting together a demo mod :
- Proof of concept : ability targetting friendlies
- Proof of concept : ability targetting the caster itself
- (optional) Write up some quick-and-dirty hud feedback regarding an ability's status

Next steps:
- Over-time effects
- Allow multiple targets per cast
- More ability concepts
- Any other smaller feature on my TODO-list

 
Re: [Work in Progress] Ability Management Framework
Quote
Here are the things I want to do before putting together a demo mod :
- Proof of concept : ability targetting friendlies
- Proof of concept : ability targetting the caster itself
- (optional) Write up some quick-and-dirty hud feedback regarding an ability's status

Aaand done :


Alpha + demo mod out before the end of the month !

I've got all I need feature-wise now for an "alpha" release.

I'd like to have more thorough documentation describing how all the **** works and what function might be of interest to modders, but that's a bonus at this point. I've already written up an updated table spec + 6 simple abilities using 3 different archetypes, so what I need to do now is : make a prettier version of my test mission, make a pretty diagram explaining how to get started, put together a bare-bone mod, and finally write up a release post.


For reference, here are the features on my TODO list after that:
- Duration & Over-time effects
- Support for sound effects
- Allow multiple targets per cast
- Add more target selection algorithms

Also, if anyone has cool ability concepts in mind, please do share :)

 

Offline T-Man

  • 210
  • I came... I saw... I had a cuppa!
Re: [Work in Progress] Ability Management Framework
This is looking awesome X3N0, huge congrats on the progress so far :yes:. I sense a 'Command an AWACS' mission in our near future :pimp:. Out of interest can the targeting work for objects other than ships? (could you have an ability targeting nearby secondaries/plasma bolts etc?



Can think of a few potential ability types/ideas this could branch off into, for later on down the line when your thinking;

Beam overloads may make a nice ability to first work in and seem to be a cap-ship mission rage; for a period a beam cannon is swapped for a specified alternative weapon. Perhaps the ability could have a 'heat danger' rating that you need to keep an eye on while using it; if you use it too much or for too long the weapon melts down or the ship guts itself?

Another might be ships that have different 'modes' they can switch between at a button press, like a fighter that switches it's power grid from an 'interceptor mode' (powering an extra set of engines) to an 'Assault mode' (diverts the power to an extra set of weapons instead)?

Could you have abilities that interact with one-another positively or negatively? Like ECM/ECCM duels or an ability that aids other ships using their own abilities?

Far far down the line am thinking a big potential for this might be strike craft management on cap missions; the system stores info on the wings the player has on board and you can select wings to launch and recall, and it can track how long wings will take to land/launch etc. Would probably be a complex code but if capship missions become the rage may be useful for mission-makers.


Regardless though, what you have so far is quite the achievement in itself! Nice one. :yes:
« Last Edit: October 21, 2016, 05:45:19 pm by T-Man »
CAUTION: Rabid Imagination!

self-confessed UEF fanboy.

 
Re: [Work in Progress] Ability Management Framework
Thanks for the feedback, that's exactly the kind of thing I need ! :)


Out of interest can the targeting work for objects other than ships? (could you have an ability targeting nearby secondaries/plasma bolts etc?
That's one of the big points on my TODO list, right after over-time effects & multi-targetting. Right now, it's limited to ships, with valid targets determined by ship types, but I want to expand on this down the line to include other object types and ship flags.


Nice bunch of ideas, The first two should be fairly straightforward, the third sounds similar to stuff I've had in mind for a while, but would probably require a couple more features to be doable.

Strike craft management would be a much more complex endeavour, it would basically require writing a strikecraft management framework, and then have abilities that interact with it. Food for thought...

  
Re: [Work in Progress] Ability Management Framework
So, continuing in the theme of sitting on **** that's 90% complete, all I have left on my TODO list is to clean the modpack of irrelevant **** & have the user manual proof-read...

Obviously, since I have not done either of those over the past 3 weeks or so, I figured that if I want to release something before the end of the year, I might as well go for it now.

So, here it is, have fun  :) :
Ability Management Framework


Download link.

Modpack includes :
- All the framework scripts
- Sample config files
- A user manual
- A sample mission that uses a number of abilities, including player-triggered ones
- A bunch of mostly irrelevant stuff due to me ripping this modpack out of another and not bothering to clean up too much


I've written a user manual that details a bit how things work, but here is the abridged version of it :

Required files
- data/scripts
   * parse.lua
   * abilityManager.lua
   * abilityLibrary.lua (--> new ability templates go there)
   * shipVariant.lua
   * shipVariantMissionWide.lua
- data/tables
- data/config
   * abilities.tbl
   * ship_variants.tbl (--> not actually related to abilities (for now))
   * ship_variants_mission_wide.tbl (aka SVMW.tbl)

SEXP calls
- Set abilities for everybody = setShipVariant('some category name from SVMW.tbl')
- Set ability for someone = ability_attachAbility(className, shipName, isManuallyFired)
- Manual trigger = ability_trigger(' AWAXEM::DISCO FURY') (-->ship name::ability name)


The full version of the user manual is located in the doc folder of the modpack.

Outside the user manual itself, each script has its own documentation, with further explainations & specs.

Keep in mind that I am classifying the as an "Alpha" version, meaning that there's still a lot of room for improvement and it hasn't been thoroughly tested yet.
I'm still honing my lua skills, and some areas are likely to get refactored down the line.


Still, I'm kind of proud of what I've done so far, and I hope I'll get more time to work on it next year.

Please feel comment, criticise, report bugs, offer suggestions, cookies, or post whatever crazy ability you come with :)




 
Re: [Alpha Release] Ability Management Framework
Wow, I am definitely going to have to check this out in detail. It's a good thing I did not finish my glorious tangled mess of SEXP-based spaceship abilities, which I intended to copy & paste into every mission of my upcoming campaign.

SEXP's are restricted to only the host, but if my understanding is correct, this ability manager wouldn't have that limitation? Meaning that it's even multiplayer-compatible?

I need to jump on this leading edge of coding awesomeness.

One of the biggest features of my upcoming campaign is that all the player-flyable Shivan fighters can do tactical subspace jumps. Can your ability manager handle teleportation? Getting reusable & combat-useful player subspace jumps with SEXP's was a bit of a challenge.

Most of the other abilities I have planned are pretty straightforward, and rely on playing with weapon energy, afterburner energy, armor types, and switching weapons around.

EDIT:
Oh, there are a few oddballs, like the shivan stealth fighter that needs to be able to switch the stealth flag on & off, and designate SSM strike targets. There is also a bomber that gets the invulnerable flag for one of its abilities.
« Last Edit: December 02, 2016, 12:53:54 am by Erebus Alpha »
"Obviously the meson bomb is a form of cat-toast-device, with the buttered toast inverted, so that the cat and toast both fly in the direction of gravity much faster than expected. By introducing artificial gravity, a pair of cat-toast perpetual motion accelerator units can be made to collide with one another, and they produce an unimaginably devastating explosion. Both cats are named 'Meson'."

 - Wikileaks 2383