SRPG Studio

SRPG Studio

Not enough ratings
Custom Skill Creation
By SapphireSoft
This guide will show you how to create custom skills for your game only.
   
Award
Favorite
Favorited
Unfavorite
Setting custom parameters
1. Create a skill that increases attack power when activated. First, select "Custom" and then "Skill Effects".


2. In the "Skill Effects" dialog, set the name that identifies this custom skill with Plugin. The name is arbitrary, but in this guide it is set to "myskill".


3. Set the value that increases attack power with "Custom Parameters" button.


4. In the custom parameter dialog, be sure to describe {}. "rate: 150" means that the increasing rate is 1.5 times. If you want to double, change it to 200.


5. Set the created skill to unit or class.

Create Plugin
1. Skill setting is completed. Next we will create a plugin and activate the skill. Copy the following program code.

(function() { var alias1 = SkillRandomizer.isCustomSkillInvokedInternal; SkillRandomizer.isCustomSkillInvokedInternal = function(active, passive, skill, keyword) { if (keyword === 'myskill') { return this._isSkillInvokedInternal(active, passive, skill); } return alias1.call(this, active, passive, skill, keyword); }; var alias2 = AttackEvaluator.HitCritical.calculateDamage; AttackEvaluator.HitCritical.calculateDamage = function(virtualActive, virtualPassive, entry) { var skill; var damage = alias2.call(this, virtualActive, virtualPassive, entry); // Add custom skill. skill = SkillControl.checkAndPushCustomSkill(virtualActive.unitSelf, virtualPassive.unitSelf, entry, true, 'myskill'); if (skill !== null) { // Increase damage. damage = Math.floor(damage * (skill.custom.rate / 100)) } return damage; }; })();

2. Create a text file and paste the above code. Place the file in the Plugin folder. The file name can be determined freely.

Let's run the map test
1. Make sure that the custom skill activates correctly. The damage displayed is 10.


2. The skill was activated by Plugin.


3. Damage has become 1.5 times.

3 Comments
Alice_Ravenholm 8 Oct, 2024 @ 11:14am 
would it be possible to make a skill that simple adds to you stats only when it's equiped? ie the defense +2 skill from awakening?
Dungeonmind 25 May, 2020 @ 6:59pm 
Thanks for showing us this.
Phoenix Jam 4 May, 2020 @ 3:54pm 
Nice