FreeSpace Releases > Scripting Releases
[Alpha Release] Ability Management Framework
X3N0-Life-Form:
Ability Management Framework
Version 1.0 "Alpha"
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: ---$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)
--- End code ---
--- End quote ---
mjn.mixael:
This will be inserted into JAD in 3...2...1...
General Battuta:
Axem's madness runs far deeper
Axem:
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.
X3N0-Life-Form:
--- Quote from: Axem on June 09, 2016, 12:14:03 pm ---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.)
--- End quote ---
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.
--- End quote ---
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.
--- End quote ---
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.
Navigation
[0] Message Index
[#] Next page
Go to full version