FreeSpace Releases > Scripting Releases

[Alpha Release] Ability Management Framework

<< < (3/6) > >>

Admiral MS:
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.

X3N0-Life-Form:

--- Quote ---It seems to track a bunch of conditions and checks wether an ability could be used.
--- End quote ---
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.
--- End quote ---
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.

X3N0-Life-Form:
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.

X3N0-Life-Form:
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.

X3N0-Life-Form:
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

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version