Neon Black

The Classy Prostitute
Veteran
Joined
Mar 17, 2012
Messages
1,149
Reaction score
376
First Language
Sarcasm
Primarily Uses
Skill Costs Script V1.1




Created By Neon Black


What is it?

This script allows you to define additional skill costs using tags in skill's notebox. There are numerous different conditions you can add aside from the standard MP and TP costs and all of them will need to be fulfilled in order for the skill to be available.

How can I use it?

To use it, just add any of the following tags to a skill's notebox.

  • cost[5 mp] - This requires the user to have a certain amount of mp and will consume that much mp. mp can be substituted with hp, tp, or gold. Note that hp can not go below 1, so if the cost is 15 hp, the user must have at least 16 hp to use the skill.
  • cost[10% mp] - This requires the user to have a certain percentage of their mp remaining and will consume that amount. mp can be replaced with hp, or tp. This will be added to the base stat cost, for example, you can have a skill require 7 + 5% of mp by using both tags.
  • cost[all tp] - This does not require the user to have any tp, but will consume all remaining tp after the skill has been used. This is not like using cost[100% tp] for that reason. Also, tp would be removed after all damage has been dealt so you can use the current tp in the damage calculation. tp can be replaced with mp or hp in this one. Also, using cost[all hp] WILL kill the user.
  • cost[4 i3 item] - Requires the party to have 4 of item number 3 in the inventory. The item is consumed on use. You can also replace "i" with "w" or "a" to require a weapon or armour to be in the inventory. More than one of this tag can be used at a time.
  • cost[state 3] - Requires the user be inflicted with state 3. Upon use, the required state will be removed from the user. More than one of this tag can be used at a time.
  • need[state 3] - Same as above except the state is not removed.
  • need[w 8] - Requires the user to be equipped with weapon 8. "w" can be replaced with "a" to require an armour be equipped. More than one of this tag can be used at a time.
  • need[actor 2] - Requires actor 2 to be present in the BATTLE party. More than one of this tag can be used at a time.
  • need[switch 6] - Requires switch 6 to be turned on. More than one of this tag can be used at a time.
  • need[variable 6 5+] - Requires variable 6 be greater than or equal to 5. You can also use need[variable 6 5-] for less than or equal to, or use need[variable 6 5] to require variable 6 be equal to 5. More than one of this tag can be used at a time.
  • need[type 4] - Requires a weapon of type 4 to be equipped. This tag works exactly like the weapon type requirement drop downs on the bottom of a skill and was added in case you want a skill to work with 3 or more weapon types. You can have more than one of this tag in a skill, but the weapon type must only match one.
What does it work with?

This script overwrites several of the methods used to check if a skill can be used and for that reason is not likely to work with other skill cost scripts. If you would like me to add skill cost requirements or would like me to make it compatible with another script, just post here or PM me.

How can I get it?

Version 1.1 (base script, 7.19.2012) is available from my pastebin account here.

I would like to use this code.



This work is licensed under a Creative Commons Attribution-NonCommercial 3.0 Unported License.

Permissions beyond the scope of this license may be available at http://cphouseset.wo...d-terms-of-use/.

Author's disclaimer:

Little late on script 4 for my week of scripts (yup, I'm still doing that). I made this script first because I wanted to be able to use HP as a skill requirement. Then I just kept adding possibilities as I came up with them. Mainly I just wanted HP as a skill cost, more than just 2 weapon type requirements, and some way to set TP to 0 AFTER the skill was used so I could do a cool calculation like "damage = 5000 * a.tp". Anyway, I may have gone a little overboard and had a bit of trouble explaining how stuff works in a concise manner, so if you have any questions, feel free to ask them. Any requests, please ask them. As always, enjoy!
 
Last edited by a moderator:

Neon Black

The Classy Prostitute
Veteran
Joined
Mar 17, 2012
Messages
1,149
Reaction score
376
First Language
Sarcasm
Primarily Uses
Whoops, forgot about the colours section that was supposed to be in the config. If you grabbed this script before I posted this, you'll need to grab it again or you could possibly get an error. Anyway, pushed the colour settings up a little higher so they can be edited. These are lines 115 and 116 in the script.
 

Neon Black

The Classy Prostitute
Veteran
Joined
Mar 17, 2012
Messages
1,149
Reaction score
376
First Language
Sarcasm
Primarily Uses
And once again, found another fairly critical issue that somehow eluded me. Enemies would not attack at all because of how "equip_cost_met" was handled. What's really odd is I had no issue with this during testing initially, but got issues with it after someone else spotted it. Should be fixed now.
 

Archael

Villager
Member
Joined
Apr 17, 2013
Messages
8
Reaction score
0
First Language
English
Primarily Uses
I don't see why more people are interested in this. This script is amazing.

I'd really appreciate it if you could find a way to make this compatible with Yanfly's Skill Cost script.

Both of yours are very useful. But it's a shame that I have to either sacrifice convenience (his script) or skill potential (yours).

This is his script: http://yanflychannel.wordpress.com/rmvxa/gameplay-scripts/skill-cost-manager/
 

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,564
Reaction score
3,878
First Language
English
What makes yanfly's more convenient? They both look like they do the same thing to me, except one of them has more visual stuff.
 

Archael

Villager
Member
Joined
Apr 17, 2013
Messages
8
Reaction score
0
First Language
English
Primarily Uses
The visual stuff is the exact reason to have his, along with the ability to have hp cost as well. And sometimes, I'd want things to cost hp, mp and tp  or even gold(or any combination of two). The default system will only show one of them three, so you don't know what happens to your other stats when that happens.
 

Ice Cluster

Veteran
Veteran
Joined
Feb 4, 2013
Messages
68
Reaction score
6
First Language
German
Primarily Uses
RMMV
Hey, I'm using this script with your battle engine and whenever I use the "Switch" command from the battle engine, I get this error:

c7g0.png


When I use the "Switch" command without the Skill Cost script it works.
 

vindaca

CEO of Tales of the Valiant
Veteran
Joined
Dec 11, 2012
Messages
534
Reaction score
77
First Language
English
Primarily Uses
Wheew... I saw the name and got scared. I thought it was just like the one I just released.

This doesn't display the vars instead though, and it just check their values right?
 

Neon Black

The Classy Prostitute
Veteran
Joined
Mar 17, 2012
Messages
1,149
Reaction score
376
First Language
Sarcasm
Primarily Uses
The issue with switching is being fixed once the battle engine and this script are updated.  I have a few other changes I'm making to this script so I'll be pushing it out later this month.
 

Siul

Veteran
Veteran
Joined
Nov 19, 2012
Messages
86
Reaction score
17
First Language
Spanish
Primarily Uses
Hello there, I'm testing the scripts but there's something wrong about the "all" option: any skill I type as "all" (mp, tp or w/e) doesn't remove that cost from the stats so it becomes "free".

I'm checking about all my scripts but there's none else about costs (at least I guess so) so I don't know what the hell is going on.

Any helps? Am I wrong with something? 
 

edgarox

Villager
Member
Joined
Jan 9, 2014
Messages
9
Reaction score
0
First Language
Brazil
Primarily Uses
I'm having the same problem as Siul. I made a Asura Strike skill, from Ragnarok, and i put cost[all mp], however in game it don't consume All MP!!! And if i put cost[100% mp], it consumes all mp, but in damage formula, the total mp becomes 0!!
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,006
First Language
Tagalog
Primarily Uses
RMVXA
well, for asura strike, since it deals damage based on MP, a better and no-script method is to just do this in the damage formula


x=a.mp;a.mp=0;damage_formula_here


and use x in the damage formula to incorporate the mp


example: if you want AS to deal damage as 10 times of mp used


x=a.mp;a.mp=0;x*10


because if you use MP as a cost, then it will always be used up before the skill's damage is calculated which you don't want if ur making Asura strike
 
Last edited by a moderator:

edgarox

Villager
Member
Joined
Jan 9, 2014
Messages
9
Reaction score
0
First Language
Brazil
Primarily Uses
Doesn't work, i tried here, but the damage is the same as if it ignores the x=a.mp;a.mp=0.

Look: x = a.mp; a.mp=0; (a.atk * ((10 + x) / 10)) + 1000

Using the script, it does more or less 4000 damage, but not using, and not consuming MP, it does over 1 million damage
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,006
First Language
Tagalog
Primarily Uses
RMVXA
it deals over 1M damage and doesn't reduce MP to 0?
 

edgarox

Villager
Member
Joined
Jan 9, 2014
Messages
9
Reaction score
0
First Language
Brazil
Primarily Uses
If i don't put the command to reduce 100% MP (cost [100% mp]) then yes. But that's strange, in the documentation, it says that the comand " cost[all tp] " would do the reduction after the damage, and then allowing the damage calculation be perfect. I have tried with TP and MP, but it doesn't work, because no one reduce...
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,006
First Language
Tagalog
Primarily Uses
RMVXA
what if you do it like this?


x = (a.atk * ((10 + a.mp) / 10)) + 1000; a.mp=0; x


and just use 0 for mp cost using the normal way...


btw, if it doesn't work, can you post a screenie of the skill set-up?
 
Last edited by a moderator:

edgarox

Villager
Member
Joined
Jan 9, 2014
Messages
9
Reaction score
0
First Language
Brazil
Primarily Uses
WOW, it worked like a charm!! :)
And it does the damage perfectly, like the skill in the online game, the less mp/sp, the less damage it does(i have tested this) :)

Thank you soooo much :)

I'm doing a Ragnarok Online game in RPG Maker, so I'm doing the closest possible to the online game, with the engine limitations of couse, but still, the game is very good!
 
Last edited by a moderator:

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,006
First Language
Tagalog
Primarily Uses
RMVXA
I figured... else, you won't be wanting to make Asura Strike...
 

Siul

Veteran
Veteran
Joined
Nov 19, 2012
Messages
86
Reaction score
17
First Language
Spanish
Primarily Uses
Well, I'm not used to use those kind of formula there. Whatever, I still want to a skill that cost all tp or all hp to kill the character. Indeed that's what I really wanted with that script, to make a "kamikaze" skill.

If you say there's a non-script based way, let me know or let me know where to learn about that 'cause I'm null about that at the moment.

Thx, anyways
 
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,006
First Language
Tagalog
Primarily Uses
RMVXA
You can use the damage formula...

Code:
a.hp=0;damage_formula here
if you wanna use his hp in the formula, try this one:
Code:
x=damage_formula;a.hp=0;x
 
Last edited by a moderator:

Latest Threads

Latest Posts

Latest Profile Posts

doodled a poring today :kaoluv:
uc
Fire-Emblem Style Level Up System, Boost on Class Change, And Animated Arrows | RPG Maker News #115

Why keyboards don't sleep? Because they have two shifts.
I realized a while ago my game was toooo big in scope. even now I wonder am I trying to do too much by myself. and that's after completely changing the format of the game.
Last week at SLC. Cali awaits. TBH I love SLC more than SF.

Forum statistics

Threads
113,939
Messages
1,078,538
Members
148,045
Latest member
gamegialap
Top