Help with inputting script

Jakalu

Villager
Member
Joined
Feb 14, 2015
Messages
23
Reaction score
0
First Language
English
Primarily Uses
I have no idea where to put this script. Can someone show me please?

And by script I mean the little part to give the skill the ability to use HP instead of MP.

modern algebra's script : http://rmrk.net/index.php?topic=24999.0
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
38,310
Reaction score
11,911
First Language
English
Primarily Uses
RMMV
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.
 

Jakalu

Villager
Member
Joined
Feb 14, 2015
Messages
23
Reaction score
0
First Language
English
Primarily Uses
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.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
29,005
Reaction score
6,684
First Language
German
Primarily Uses
RMMV
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
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
38,310
Reaction score
11,911
First Language
English
Primarily Uses
RMMV
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.
 

Jakalu

Villager
Member
Joined
Feb 14, 2015
Messages
23
Reaction score
0
First Language
English
Primarily Uses
I'm sorry, I'll be more clear in the future.

Does anyone know where to put the little editable script, however?
 
Last edited by a moderator:

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
29,005
Reaction score
6,684
First Language
German
Primarily Uses
RMMV
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.
 

Jakalu

Villager
Member
Joined
Feb 14, 2015
Messages
23
Reaction score
0
First Language
English
Primarily Uses
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?
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,642
Reaction score
2,972
First Language
Tagalog
Primarily Uses
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.
 
Last edited by a moderator:

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
29,005
Reaction score
6,684
First Language
German
Primarily Uses
RMMV
I have inserted the full script into the RM.
So far that is correct
I'm pretty sure I'm suppose to copy and paste, then modify it somewhere.
And that is where you are wrong.
You do NOT copy that part anywhere - you need to MODIFY ONLY, at the place where you put it on the first step.
 

Matchitza

Finally Inspired!
Veteran
Joined
Jan 17, 2015
Messages
296
Reaction score
28
First Language
English
Primarily Uses
N/A
Just copy the FULL script into a blank space in the script editor.. And then do what is instructed by the script's author..

Click spoiler for a lil' bit more info on what is ToU (Terms of use)

Every script maker has their ToU (Terms Of Use), i suggest you take a little more good look on that script.. Check modern algebra's terms of use with his script, most people ask credits if used on commercial
project, some people ask free game copies when their script is used for commercial games, and the worst part is.. Greedy peoples, who ask to pay licenses for their script. I don't suggest using scripts that needs to be paid.. Just a suggestion, mkay?
 

Jakalu

Villager
Member
Joined
Feb 14, 2015
Messages
23
Reaction score
0
First Language
English
Primarily Uses
If I understand correctly, I do something like this:

Screenshot (8).png
I'm sorry if it's small, but I all I did was add my skill, 83, and the amount of the HP cost, which is percent = 30.

Also, what does this   

  percent = percent.to_f / 100    return cost, percentmean?
 
Last edited by a moderator:

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
29,005
Reaction score
6,684
First Language
German
Primarily Uses
RMMV
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.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
38,310
Reaction score
11,911
First Language
English
Primarily Uses
RMMV
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.
 

Jakalu

Villager
Member
Joined
Feb 14, 2015
Messages
23
Reaction score
0
First Language
English
Primarily Uses
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.
 

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

Latest Threads

Latest Posts

Latest Profile Posts

So trying our Ultra Mode 7 was a bad idea. How do I not include this in my game? XD
Stumbled upon an RPG Maker game on Steam called 'Boobs vs Zombies' while looking for a zombie themed fantasy RTS. lol
There's a new born faction in my country called "Sunda Empire" claiming they have right to rule over the earth and sun... I don't know what to feel...
Quon is watching you
Quon blessed your good efforts
I have tried, several times to understand how Markiplier is popular. You can't deny his popularity. I can only get through a few minutes of his vids, though. He's cringier than ANY cringe comp I've ever watched. When I was a kid, if you acted like that, 0 friends and 100% no dates for you. Times have changed XD

Forum statistics

Threads
93,546
Messages
913,383
Members
123,079
Latest member
plytha
Top