Closed Pychnight closed 7 months ago
This system seems fairly complex, however it's just a magic casting system that is heavy on the scripting side / skill learning system
So I'm putting in Exp costs, and stumbled on a source of confusion with the costs being deducted. I'm losing experience at rates higher than the Exp cost in my current test skill. I thought this was a bug, but it is in fact an ugly side effect of the overall weirdness between how currencies and exp are linked.
Since Currencies can act as a class's "Exp", its possible that if your skill has both a Currency Cost, and an Exp cost, and the Currency is also the class's currency, it'll create some weird deductions.
Just letting you know right now, you're going to have to be UBER careful with this stuff. Really, I'd recommend you pick either exp or a currency for a skill cost, but not both at the same time.
10 Custom items requires features out of this plugin
Skills System
Due to how radically different the skills system is from Custom items, it might be better to create this as a standalone plugin.
Main Features [Custom Skills Plugin]
[x] Support for Custom items Build the plugin with the intention of the user that should be able to attach "custom skills" to custom items if desired.
[x] Scripting system Skills can be Magic Spells, Melee Skills or any assortment of abilities Define each skill and skill levels and it’s lua files for each level…
[x] Spell level system Spells will automatically upgrade after a specific amount of uses.
Each level can have a new script if desired by the end user (such as magic becoming stronger each level and setting cast times)
[x] Cast and Charge Events Ability to define Cast and Charge times (see below) Permissions to use the skill.
[ ] Projectile spawn locations Ability to easily to define where projectile fire from (from player, sky) Player, Sky, X, Y, Random (will randomly spawn around the players center) Sky should act like falling stars.
Ability to easily define where the projectile is firing towards (will take from location as Values Player Direction (fire towards the direction is facing) & HostileNPC or Player, X,Y.
[x] Scripting power Allow timed abilities such giving players buffs, causing debuffs to all nearby players / hostile monsters / healing players for period of time.
[x] Skill Learning System commands / etc Skill Learning System Ability to define Learning Skill costs (Banking and level requirements )
[x] Categories system and permissions Ability to sort skills into Custom named Categories. (category will be specified in json file) Permissions to learn the skill / use the skills
[x] Skill Learning Commands Commands /skill learn (category) (name) learns the skill /skill category list all current skills you can learn if the skill has no category then simply /skill learn name will work And /skill list will list all skills without a category specified. Gain levels though using the Skill (if you can do exp gain though killing or mining blocks, that should be supported)
[x] Skill Info command Use /skill info (name) to see level, Damage Range, MP Cost, Charge time of the skill Damage would be very hard to calculate since we are using custom projectiles. So, entering a damage range in the skill json is rough guess entered by the manually user.
Custom Casting System (aka magic system)
Cast Time Cast time will prevent the skill from being spammed think of this as a cooldown for skills You will be able to reduce or increase cooldown depending on Skill Level.
Casting Cost Specify ether MP, HP, EXP, Banking to cast the skill (deducts each time you cast the spell
Charging Cost | should support HP, MP, EXP Specifying a charging cost will cause the skill to constantly deduct whatever you specify here Note: if user runs out of mp or hp before skill enters the firing phase it should automatically cancel the skill.
Charging Cost Seconds (defaults: 5) The amount of seconds per deduction
Charging Time (defaults: 7) The amount of time spent charging the skill up before entering firing phase of the skill. Charge Time will constantly drain mp or whatever the charge cost of the skill is set Example : skill will charge for 7 seconds before entering Fire Phase of the skill.
Notify User on cooldown Automatically send a message to the user about the skill being ready to be used again (true or false option)
Added option: Interruption cancels skill (Make this a config option for each level of the skill) Added option: Allow Manual Cancel (/skill cancel) Added option: Allow caster movement during skill usage (Make this a config option for each level of the skill)
projectile fired should be owned by the player that fired by it and fire in the direction ther facing Unless otherwise specified in the spell boo file
*projectile should try to fire towards any enemy monster or player (if pvp is on) that’s nearby (closest player / monster (ensure the monster is hostile))
Support Long Spells (such as causing meteors to repeatedly Fall for 20 seconds around the caster, this is a skill without a firing phase just a really really long charge phase skill)
Easily teleport the player to the last hit npc for (limit break type skills) Allow skills that can temporarily disable the AI of the monster that was hit.
Support Trigger Words
Ensure trigger words are smart and always fire the current level of the spell even if it levels.
What the scripting side of the skills system might look like?
Events : OnCast, OnChargePhase, OnFirePhase
OnCast: Executes code when the skill starts (Only executes once) OnCharge: Repeatedly executes code during the Charging Phase of the skill. OnFire: Executes code when the spell is done charging and enters the firing phase.
Firing Phase code is kept active into user uses endskill function within boo to end the skill otherwise it will keep executing code into ether the user runs out of MP or HP or whatever might be defined within the fire phase or if user manually cancels the skill.