Pychnight / TshockRpgToolKit

Master Controller for distrubtion of quests, custom npcs, custom items and skills, housing, leveling, npcshops, etc.
GNU General Public License v2.0
11 stars 1 forks source link

[Custom Skills] Back Log of features #11

Closed Pychnight closed 7 months ago

Pychnight commented 6 years ago

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]

Each level can have a new script if desired by the end user (such as magic becoming stronger each level and setting cast times)

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.


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.

 IF no trigger word is specified only way to fire the skill will be /skill “name”

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.

Pychnight commented 6 years ago

This system seems fairly complex, however it's just a magic casting system that is heavy on the scripting side / skill learning system

tbarela commented 5 years ago

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.