Help with inputting script

Discussion in 'RGSSx Script Support' started by Jakalu, Feb 14, 2015.

  1. Jakalu

    Jakalu Villager Member

    Messages:
    23
    Likes Received:
    0
    First Language:
    English
    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
     
    #1
  2. Shaz

    Shaz Veteran Veteran

    Messages:
    37,552
    Likes Received:
    11,260
    Location:
    Australia
    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.
     
    #2
  3. Jakalu

    Jakalu Villager Member

    Messages:
    23
    Likes Received:
    0
    First Language:
    English
    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.
     
    #3
  4. Andar

    Andar Veteran Veteran

    Messages:
    28,311
    Likes Received:
    6,437
    Location:
    Germany
    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
     
    #4
  5. Shaz

    Shaz Veteran Veteran

    Messages:
    37,552
    Likes Received:
    11,260
    Location:
    Australia
    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.
     
    #5
  6. Jakalu

    Jakalu Villager Member

    Messages:
    23
    Likes Received:
    0
    First Language:
    English
    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: Feb 14, 2015
    #6
  7. Andar

    Andar Veteran Veteran

    Messages:
    28,311
    Likes Received:
    6,437
    Location:
    Germany
    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.
     
    #7
  8. Jakalu

    Jakalu Villager Member

    Messages:
    23
    Likes Received:
    0
    First Language:
    English
    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?
     
    #8
  9. Engr. Adiktuzmiko

    Engr. Adiktuzmiko Chemical Engineer, Game Developer, Using BlinkBoy' Veteran

    Messages:
    14,471
    Likes Received:
    2,862
    Location:
    Philippines
    First Language:
    Tagalog
    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: Feb 14, 2015
    #9
  10. Andar

    Andar Veteran Veteran

    Messages:
    28,311
    Likes Received:
    6,437
    Location:
    Germany
    First Language:
    German
    Primarily Uses:
    RMMV
    So far that is correct
    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.
     
    #10
  11. Matchitza

    Matchitza Finally Inspired! Veteran

    Messages:
    296
    Likes Received:
    28
    Location:
    :3
    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?
     
    #11
    Jakalu likes this.
  12. Jakalu

    Jakalu Villager Member

    Messages:
    23
    Likes Received:
    0
    First Language:
    English
    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: Feb 15, 2015
    #12
  13. Andar

    Andar Veteran Veteran

    Messages:
    28,311
    Likes Received:
    6,437
    Location:
    Germany
    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.
     
    #13
  14. Shaz

    Shaz Veteran Veteran

    Messages:
    37,552
    Likes Received:
    11,260
    Location:
    Australia
    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.
     
    #14
  15. Jakalu

    Jakalu Villager Member

    Messages:
    23
    Likes Received:
    0
    First Language:
    English
    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.
     
    #15

Share This Page