# Unleash Skills

##### Warper
Introduction

If you've ever played a game like Golden Sun, you might be familiar with the concept of unleash skills. This script allows you to give weapons and skills a chance to activate a different skill in its place when used.

Features

- Allows you to specify one or more skills that can activate when using a weapon or skill.

- The chance of activation can be affected by the user's luck.

- You can create your own formula for calculating how luck (or other attributes!) affect activation chance.

How to Use

In the notes of a weapon or skill, you can specify one or more skills that have a chance of activating using the following notetag format:

<unleash: id, chance>

Where id is the id of the skill, and chance is the percent chance of it activating. For instance, <unleash: 10, 50> on a weapon would mean that there is a 50% chance of activating skill 10 in place of making a normal attack.

If you specify more than one skill, then the unleash skills are checked in order until one succeeds (or if none do, then the normal attack / skill is used instead). When making a normal attack, unleash skills for each weapon are checked (in the order that they are equipped).

Luck Factor

If you want luck to play a role in determining how often an unleash skill activates, you can instead use the following notetag format:

<unleash: id, chance, difficulty>

Where difficulty is an integer used in the following relative difference formula below:

activation_chance = base_chance * (1 + (luck - difficulty) / (luck + difficulty))

Custom Luck Factor

If you would like to use your own formula for calculating how luck affects unleash chance, you can use the Luck Eval parameter to evaluate it. The following variables might be useful to you when doing so:

user: refers to the actor using the unleash skill. You can access attributes such as user.luk from this.

diff: the difficulty of the unleash skill (0 if none is given in the notetag)

chance: the base chance of activating the skill (represented as a fraction).

Note that your final evaluated chance should probably be between 0 and 1 (where 0.0 = 0%, 0.5 = 50%, etc.).

As an example, you could enter the following in Luck Eval:

chance + user.luk * 0.01 - diff * 0.01

This would increase the base chance by 1% per point of luck, minus 1% per point of difficulty that the unleash skill has.

Compatibility

As far as I can tell, this is compatible with Yanfly's plugins. Try to have this plugin at the top if you have problems.

Update Log

(1.1) Will now also look for unleash notetags in Actor and Class Notes

(1.1) Added ability to have unleash skill only activated if they are learned by actor (see learned_unleash)

You are free to use this script for any commercial or non-commercial game. Credit is not necessary, but it is appreciated!

Disclaimer

This is my first time writing in JavaScript, so bear with me!

Last edited by a moderator:

#### baxolo

##### Warper
I was looking for this script, perfect for my project. It allow me to assign a diferent skill of #1 Attack for each kind of weapon to make each weapon type have diferent attack formula, and i can assign also a unleash skill for some weapons and change his damage formula at same time.

Very good job.

#### Phoenix Flame

##### Warper
Is it possible to make the skill to be only unleashed if the actor already learned it?

#### dragonhart2

##### Villager
Can this be used with Actors or classes?

Last edited by a moderator:

##### Warper
Is it possible to make the skill to be only unleashed if the actor already learned it?
It does't check by default, I can look into making that an option if you'd like.

Can this be used with Actors or classes?
It currently does not check the notes of the actor / class. Is it that you would like certain actors / classes to have a chance to unleash a different skill when using normal attacks?

#### Aidensmercy

##### Veteran
I have an issue, it doesn't work for me, I don't know what could be the problem.

In my weapons notes box i have <unleash: 10, 99> just so i could see it work right away, and it still just does a normal attack instead of skill 10.

I even turned off every other plugin i have, and there's no error code.

if you could help me out some how, i would love to be able to use this, i just dont know what else to try to make it work.

Last edited by a moderator:

#### dragonhart2

##### Villager
It currently does not check the notes of the actor / class. Is it that you would like certain actors / classes to have a chance to unleash a different skill when using normal attacks?

Thanks for the response. es the actor/class himself has the ability to unleash a skill. I would like that the skill be activated randomly at the start of the actor's turn. I want to use this for buffs instead of offensive skills.

But this idea might be an entirely different thing for this plugin's purpose.

Last edited by a moderator:

##### Warper
Is it possible to make the skill to be only unleashed if the actor already learned it?
I have now added the option to have unleash skills only activate if an actor has learned them. See the learned_unleash notetag for info. It looks like it's working, but let me know if you have any trouble!

Can this be used with Actors or classes?
I've now added support for unleash notetags in actor / class notes. I hope that helps!

Thanks for the response. es the actor/class himself has the ability to unleash a skill. I would like that the skill be activated randomly at the start of the actor's turn. I want to use this for buffs instead of offensive skills.

But this idea might be an entirely different thing for this plugin's purpose.
That's a really cool idea! Unfortunately, my script doesn't mess around with any functions involved in the start of the turn, so I don't have something like that currently. If I'm feeling ambitious, I'll try to expand into new directions later.

I have an issue, it doesn't work for me, I don't know what could be the problem.

In my weapons notes box i have <unleash: 10, 99> just so i could see it work right away, and it still just does a normal attack instead of skill 10.

I even turned off every other plugin i have, and there's no error code.

if you could help me out some how, i would love to be able to use this, i just dont know what else to try to make it work.
Sure, I'll do my best to help. First try this: add the same notetag to the class and actor fields and see if it kicks in. I've had this weird bug where, for some reason, a character ends up wielding a different weapon than the one I specified during a Battle Test. If the unleash skill works in the actor / class field, then it might be that issue.

Also, try setting Debug to 1 (in the parameters of the plugin), and then open the console with F8 during combat. Do you see anything being printed?

#### dragonhart2

##### Villager
I've now added support for unleash notetags in actor / class notes. I hope that helps!

That's a really cool idea! Unfortunately, my script doesn't mess around with any functions involved in the start of the turn, so I don't have something like that currently. If I'm feeling ambitious, I'll try to expand into new directions later.

Thanks! Let me try this work of yours out.

At times I am worried that skills activate randomly in any of the different phases of the battle. I'll try if this works with Yanfly's engine. Thanks again and keep it up!

EDIT:

I found this error from the console once the battle has commenced:

Uncaught SyntaxError: Unexpected token <

It also displays the local address of the plugin you made in my game folder. The same thing happens when I put the notetags in my weapon notes.

Last edited by a moderator:

#### Aidensmercy

##### Veteran
Sure, I'll do my best to help. First try this: add the same notetag to the class and actor fields and see if it kicks in. I've had this weird bug where, for some reason, a character ends up wielding a different weapon than the one I specified during a Battle Test. If the unleash skill works in the actor / class field, then it might be that issue.

Also, try setting Debug to 1 (in the parameters of the plugin), and then open the console with F8 during combat. Do you see anything being printed?
Alright, before this last update, it wouldn't work at all, on actor, class, or weapon, and nothing would show up on the console for it.

But now after i just downloaded the updated plugin, it works on actor and class, but still not for the weapons, and still nothing in the console for this plugin.

I really would like to have this only on the weapons.

##### Warper
@dragonhart2

Can you give an example of a note field for a weapon/skill where this error is happening? I'm going to test it when I get home.

@Aidensmercy

Okay, so that's narrowing down the issue, good! Have you been testing the weapons out on only one character? If you haven't yet, can you do me a favor and make a new weapon and plop it onto a different character and test it out again? If that doesn't work, is there some sort of trimmed down version of your game that I can test to see if I can replicate the bug?

#### LuLight

##### Veteran
this plugin great, simple & easy to use!!

#### Raven Burns

##### Villager
I've tried abosutely everything for the passed two days, I'm not an amateur what so ever and this script isnt working at all. Even on a new project file. I'm getting extremely annoyed.

#### ramza

##### Lunatic Coder
I've tried abosutely everything for the passed two days, I'm not an amateur what so ever and this script isnt working at all. Even on a new project file. I'm getting extremely annoyed.
I mean, the plugin is several years old, basically now. Gotta wonder why you're not using the improved yanfly version of this? YEP_WeaponUnleash. Does the same thing, with more features, and works. (not that I'm saying this doesn't work... I actually have no idea.)

### Latest Profile Posts

Waiting
I drew one of my chars! The man with 100 kids and a lot of love to give
Me: *about to stalk someone's posts*
Forum: "This member limits who may view their full profile."
Me: *bummer*
Also forum: Advanced search > Posted by ...

Starting a fly by the night dev studio. Anyone want in? Excellent working conditions with onsite lodging. LOL
I finally got all the walk animations done! I mean, I gotta reskin it for the actual characters since this is a character from another project, but still! Doesn't look like a mess now! ;v;
[IMG]https://s3.gifyu.com/images/kalirr-movement-animation-showoff.gif[/IMG]