Custom cost script by YANFLY

gabrielledc

Villager
Member
Joined
Jul 23, 2015
Messages
11
Reaction score
0
First Language
English
Primarily Uses
Good day!

I am so sorry because I have so many questions and I'm new to RPG Maker VX Ace. I downloaded a script by Yanfly which can make a skill have customized settings such as ur hp/mp/gold will diminish when using the skill. It was easy when I tried the minus hp tag on the skill notes but now I can't find out how I can make someone use an item when the actor uses a skill.

I am planning to make an alchemist class and I'm planning to make skills which uses potions and etcetera required for them to cast the skill. I am a complete idiot on these things I don't even know what string means.

Thanks in advance for people who will reply.

Thanks admins.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,355
Reaction score
7,669
First Language
German
Primarily Uses
RMMV
Please give a link to yanfly's script page (which also contains several pictures on how to make different costs).


I've moved this thread to Script Support. Please be sure to post your threads in the correct forum next time. Thank you.
 

Kai Monkey

Veteran
Veteran
Joined
Apr 3, 2012
Messages
166
Reaction score
119
First Language
RGSS3
Primarily Uses
Hi ♫

Strings, in computer science and programming, basically just means text. For example "Hello World", "I am a fish" and "1007" are strings.  (Sometimes you need the quotes sometimes you don't- normally when you are configuring a script you do not). Note that the string "1007" and the number 1007 are completely different as far as the computer is concerned.

As far as what the strings represent in Yanfly's script, they are the label that goes next to the string to tell the user what the custom cost is. For example:

<custom cost: 1ˢᵗ Born Child>Would have the words 1ˢᵗ Born Child next to the skill, showing the player what that skill costs. 

The other strings, are actually ruby code. These are a little bit more involved, as these strings do not represent text shown to the player, but instead code which is executed by the computer:

<custom cost requirement>

 #Code which is used to see if the player can use the skill or not
</custom cost requirement>


and

<custom cost perform>

 #Code which is used once the player uses the skill

</custom cost perform>

This code is written in Ruby, using the RGSS3 commands. If this sounds intimidating, have a look at this great artical, which explains various ways to use Damage Formulars, which use the same code which you can use with this script. 

An example:

<custom cost: 1ˢᵗ Born Child><custom cost requirement> $game_party.members.include?(2) && $game_actors[2].alive? #Is the 2nd actor in the party, and are they alive?</custom cost requirement><custom cost perform> $game_actors[2].hp = 0 #Kill the 2nd actor</custom cost perform>If you need some code for a particular custom formula and you can't figure it out yourself, don't hesitate to send me a PM.

/Kai 
 
Last edited by a moderator:

gabrielledc

Villager
Member
Joined
Jul 23, 2015
Messages
11
Reaction score
0
First Language
English
Primarily Uses
Hi guys! Hello again Admin Andar and hi Kai!


Here is the scipt I downloaded. I'm hoping I can make a custom cost edit on just the skill note. THANKS GUYS u are all amazing!
 
Last edited by a moderator:

Kai Monkey

Veteran
Veteran
Joined
Apr 3, 2012
Messages
166
Reaction score
119
First Language
RGSS3
Primarily Uses
Hi ♫

While having to write a few lines of Ruby code is more difficult, I agree, it is a very useful skill to try and develop as it allows you to create much more interesting skills (and other game content) and use Scripts to a much more advanced level. Without scripting (Writing code) you would not be able to create entirely new mechanics, (Such as the "sacrificing another actor" example). 

I really would recommend reading through the article I linked, as it does a very good job of explaining how to write these sorts of code.

/Kai 
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,355
Reaction score
7,669
First Language
German
Primarily Uses
RMMV
gabrielledc, please avoid double posting, as it is against the forum rules. You can review our forum rules here. Thank you.


No, for custom costs Yanfly's script requires some basic knowledge of ruby code.


Please do not post other people's scripts, but link to their site - that has a lot of reasons from keeping the updates in one place to respecting scripter wishes and having one place to check for previously known errors and more...
 

gabrielledc

Villager
Member
Joined
Jul 23, 2015
Messages
11
Reaction score
0
First Language
English
Primarily Uses
Im very sorry sir ok will keep this in mind and will read the rules.

I understood the Gold/hp/mp cost, what i dont get is the custom cost.

Thanks guys
 

gabrielledc

Villager
Member
Joined
Jul 23, 2015
Messages
11
Reaction score
0
First Language
English
Primarily Uses
This is what im trying to figure out, i know i must place this script on the notes swction of my skill but i dont know which "strings" to replace.

I would like to make a skill which uses maybe a potion or an elixir then it will disappear from the inventory after the skill is used.
 

gabrielledc

Villager
Member
Joined
Jul 23, 2015
Messages
11
Reaction score
0
First Language
English
Primarily Uses
this i mean ph my god i didnt know double post is like this i dunno how to delete it im using mobile
 
Last edited by a moderator:

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,355
Reaction score
7,669
First Language
German
Primarily Uses
RMMV
gebrielledc, please avoid double posting, as it is against the forum rules. You can review our forum rules here. Thank you.


Doubleposting is if your own post is the last one and you still post under it. So above you effectively triple-posted.


Please do not do this, edit your post instead.


As I said above, for yanfly's custom cost formulae to work, you need to learn the basics of ruby code/scripting. There is a reason why he said in that picture that "Lunatics" can use those formulae ;-)


You might try one of the other skill cost scripts and check if they're better for you. There should be three or four different scripts, but unfortunately I only found a second one at the moment.


But I know that there were more available, just not on the master script list...


http://forums.rpgmakerweb.com/index.php?/topic/3345-skill-costs/
 

gabrielledc

Villager
Member
Joined
Jul 23, 2015
Messages
11
Reaction score
0
First Language
English
Primarily Uses
Sorry again oh my god thanks for not giving me the ban hammer i was so scared I need this forum so much huhu :(

Thanks for replying and helping me always you guys are amazing! I will check this script maybe this is easier thanks!
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,355
Reaction score
7,669
First Language
German
Primarily Uses
RMMV
You'll need to do a lot more mistakes before we ban someone. It takes 100 warning points or one of the instaban offenses like pirating software or credit theft to get you banned.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

How many parameters is 'too many'??
Yay, now back in action Happy Christmas time, coming back!






Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c
So I was playing with filters and this looked interesting...

Versus the normal look...

Kind of gives a very different feel. :LZSexcite:
To whom ever person or persons who re-did the DS/DS+ asset packs for MV (as in, they are all 48x48, and not just x2 the pixel scale) .... THANK-YOU!!!!!!!!! XwwwwX

Forum statistics

Threads
105,853
Messages
1,016,990
Members
137,562
Latest member
tamedeathman
Top