How to use a script [XP]

Discussion in 'RGSSx Script Support' started by Gluttony, Jun 27, 2012.

  1. Gluttony

    Gluttony Villager Member

    Messages:
    20
    Likes Received:
    0
    Location:
    Canada
    First Language:
    English
    This is probably one of the noobier questions that'll ever come along here, but please bear with me, as I've never used scripts or coded before and I honestly don't know what I'm doing:

    A member in another topic here pointed me towards a script that seems to accomplish what I was trying to do in my game (create 2-handed weapons), but I don't know how to actually make use of the script now that I have it.

    If anyone's willing to help, it's probably best to assume I don't know anything about scripting. Because I don't really.

    The script itself is here: http://www.rmxpunlimited.net/forums/topic/7838-cursed-weapons-unequippable-script-for-rmxp/page__p__67404#entry67404. The three things I'm most concerned with are that it works, that I'm giving proper credit (I don't know if that's in the script somewhere or I have to manually put it somewhere myself), and that I'm only using the Two-handed weapons/gauntlets part of the script (if I understand correctly, the other features can be turned off so that I only use the parts I want).

    Again, sorry for not knowing how to do all this...
     
    #1
  2. Yato

    Yato (aka Racheal) Veteran

    Messages:
    826
    Likes Received:
    345
    Location:
    Canada
    Let's see if I can help.


    -The first step with any script is it goes just above Main. I'm assuming you're not using any other scripts, so we don't have to worry about script order.


    -For turning off unused features, there is a section in the script from lines ~123 to ~169. Make sure they are all set to false except the one you want.


    -The script portion you're using starts at line ~846. There is one bug noted in that section, though it seems minor and visual.


    -As far as setting it up, you simply need to list the IDs of weapons that are two-handed into the array on line ~876 called TWO_HANDED_IDS. So if the first three weapons in your database were two-handed, you would go TWO_HANDED_IDS = [1, 2, 3] Same goes for the gauntlet set-up if you're using that.


    As to if it works, it would appear so? But I no longer have XP to test it with. And for credit, it is in the script at the top (ForeverZer0), but seeing as how not everyone can access the scripts, I would suggest keeping a separate credits file.


    Any other questions or anything I missed, feel free to shoot my way.
     
    Last edited by a moderator: Jun 29, 2013
    #2
  3. Gluttony

    Gluttony Villager Member

    Messages:
    20
    Likes Received:
    0
    Location:
    Canada
    First Language:
    English
    Excellent, it seems to work (and the bug that's mentioned doesn't actually seem to happen).

    Where would I put a separate credits file?
     
    Last edited by a moderator: Jun 28, 2012
    #3
  4. Gluttony

    Gluttony Villager Member

    Messages:
    20
    Likes Received:
    0
    Location:
    Canada
    First Language:
    English
    Oh, wait, I'm getting a pretty bad error. After fleeing from a battle the following error message occurs:

    Script 'Main' line 1137: NoMethodError occurred.

    unidentified method 'any?' for nil:NilClass

    And then the game closes.
     
    #4
  5. Yato

    Yato (aka Racheal) Veteran

    Messages:
    826
    Likes Received:
    345
    Location:
    Canada
    I generally keep a credits txt file in the main folder of the program. As far as the error, I think I might know what's causing it? I have a question first. Does it only occur when you have no armor equipped?
     
    #5
  6. Gluttony

    Gluttony Villager Member

    Messages:
    20
    Likes Received:
    0
    Location:
    Canada
    First Language:
    English
    When it was occurring both of the 2 party members had armor, shields, and weapons, and one had an accessory. Neither had a helmet.

    ...But now the error isn't happening at all. And I didn't change anything.
     
    #6
  7. Gluttony

    Gluttony Villager Member

    Messages:
    20
    Likes Received:
    0
    Location:
    Canada
    First Language:
    English
    New, important issue that I've noticed (and would like help with if possible). Single-use items like potions no longer disappear from my inventory when I use them. They don't immediately indicate that they've had any effect either, but in fact can be used repeatedly, taking effect as many times as they were clicked on once the item menu is closed. This is definitely not how it used to work.

    (This problem only occurs outside of combat)
     
    Last edited by a moderator: Jun 30, 2012
    #7

Share This Page