I've moved this thread to RGSSx Script Support. Please be sure to post your threads in the correct forum next time. Thank you.
So it looks like you've just got to modify the script. He's got some examples for you in there already, which are meant to remain just until you know what you're doing, and then you're meant to remove them.
You need to add a when clause for the skill id, and a cost = and/or a percent = after it, to indicate how much HP or % of max HP the skill will use.
If you can't figure it out, tell us what your skill id is, and how much HP you want it to use, and we'll give you the lines to put into the script.
I suppose I could figure out how to put in the skill id and others. The main problem is that I don't know exactly where do I need to put the little script to make it work. So, do I put it in the note box in the database? The main script? I don't know.
Also, thank you for moving this topic. I'll take note of where to put these types of questions next time.
If I read your question correctly, your problem is one step before the one Shaz answered - how to get the script into the game.
In all cases this is identical for all scripts, and that is one of the few where it was forgotten to be placed in the script description - probably because it's simple and always identical...
1) In the editor, go to the menu "Tools" - "Script editor".
2) In the script editor, scroll the left list down until you see two lines "Materials" "( insert here )".
3) Click on the insert line and hit the insert key on your keyboard to create a new line/slot there and select that.
4) In the name field below the list, fill the empty field with the name of the script
5) copy/paste the script into the large right area (should also be empty before you do that)
6) configure the script (if needed) by editing it in the large right area
I also initially thought it was "where do I put the script", but then the OP said "the little part to give the skill the ability to use HP" and thought it must have been a "how do I configure" question, because the entire script is about using HP for skills, so "the little part" would be defining a single skill.
"The little script" was also misleading, kind of pointing me in the same direction 🙂
Sorry - I should have added that bit, but I'd gone off on a tangent after taking a look at it and thought you meant something else.
I'm sorry, I'll be more clear in the future.
Does anyone know where to put the little editable script, however?
you have to put in the full script - unless you're a programmer/scripter, you can't select part of a script for use, because that will require rewriting that part of the script.
And then you edit the configuration inside the full script placed in the script editor like I said above.
I have inserted the full script into the RM. But, this part right here:
class RPG::Skill #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # * HP Cost #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ def hp_cost # Default value for skills with undefined HP cost cost, percent = 0, 0 case @id #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # * Editable Region #----------------------------------------------------------------------------------------------------------------------- # For each skill to which you want to assign an hp_cost, set it up like so: # when skill ID # cost = <the amount of HP that you want to subtract from the user. If the number is # negative, then the user of the skill will be healed by that amount> # percent = <the percentage of max HP you wish to subtract from the user. If negative, # then the user of the skill will be healed by that percentage> # # There are a couple of examples below. Feel free to delete them once you understand # what is required of you #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ when 1 # Skill #1 in database cost = 10 # The amount of HP to subtract from user percent = 20 # The % of maxhp to subtract from user when 5 cost = 100 when 33 percent = 10 end percent = percent.to_f / 100 return cost, percent endendI'm pretty sure I'm suppose to copy and paste, then modify it somewhere. The problem is I don't know where. Am I suppose to put it in the Database>Skills>Notes box? Or one of the main codings, like Game_Actor or something else?
On the script editor of course... One does not put a whole script into the notebox...
You will paste the FULL script into the editor, in a blank space below Materials... And also do that for that shorter script, assuming that's a different script...
If that's an edit of the original, I suggest just editing the copy-pasted full script.
yes, and the commands you asked about are there to change the values given from human-readable to computer-usable. Don't think about that unless you want to learn how to program something yourself, and in that case you better start with some basic programming tutorials instead of trying to read full scripts.
All of this is exactly what I said to do in my first post 😉
That little section of script is where you define your skills that have a HP cost. You need to set up the skill id in a when line, and add the cost on the next line.
Once you've got your own set up, it is expected that you remove the original ones. They are just there as examples, and you probably do not want those skills used as examples to have a HP cost.
Alright! Thank you! I got that problem solved! Thank you so much everyone!
I'll look more into scripts to make sure problems like this don't pop up anymore often.