The RPG Maker Resource Kit

RMRK RPG Maker Creation => Requests => Script Request => Topic started by: meiko_suzuki on October 13, 2010, 07:21:00 PM

Title: [NAMKCOR's Weapon Training System Question]
Post by: meiko_suzuki on October 13, 2010, 07:21:00 PM
I didn't want to necropost on the original topic,  (found here: http://rmrk.net/index.php/topic,25798.0.html (http://rmrk.net/index.php/topic,25798.0.html)) so here's my question.

Quote#==================================================
    # @WTSweapon_experience
    #---------------------------------------------------------------------------
    # by modifying the case-when, adding whens for every actor, you are able to
    # set what amount of experience with a given weapon type teh character has
    # at the start of your game.  That way a swordsman could be good with swords
    # or a sniper with rifles etc...
    #------------------------------------------------------------------
    # default: @WTSweapon_experience = [0,0,0,0]
    #                @WTSweapon_levels = [0,0,0,0]
    # template when [actor_id] then
    #                             @WTSweapon_experience = [0,0,0,...]
    #                             @WTSweapon_levels = [0,0,0,...]
    #                 end
    # !!! WARNING !!! be sure to add an element to these arrays for every weapon
    # element type used, or you may encounter bugs later on; and try to line up
    # weapon levels with the appropriate amount of experience, or when it
    # auto-corrects, it will appear very buggy
    #=============================================
    case actor_id
      when 1 then
        @WTSweapon_experience = [0,0,0,0]
        @WTSweapon_levels = [0,0,0,0]
      when 2 then
        @WTSweapon_experience = [0,0,0,0]
        @WTSweapon_levels = [0,0,0,0]
      end
    end

So, how do I make it so actor 1 is, say, level 2 with the 22nd weapon element? o_O
Title: Re: [NAMKCOR's Weapon Training System Question]
Post by: modern algebra on October 13, 2010, 08:01:16 PM
Well, from what I read there, I would assume the following would work:


      when 1 then
        @WTSweapon_experience = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
        @WTSweapon_levels = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2]


EDIT::

Nevermind, after looking at the topic I don't think that's correct. The first thing you need to do is go to this line:


    $WTSelements = [17, 18, 19, 20]


Change it to add 22 as an element, so:


    $WTSelements = [17, 18, 19, 20, 22]


Then, to start it at level 2, all you'd need to do is:


      when 1 then
        @WTSweapon_experience = [0,0,0,0,30]
        @WTSweapon_levels = [0,0,0,0,2]


The 30 comes from this line:


    $WTSexp_levels = [10, 30, 60, 100, 150, 210, 280]


since NAM says to try to get exp to match to level.
Title: Re: [NAMKCOR's Weapon Training System Question]
Post by: meiko_suzuki on October 13, 2010, 09:20:47 PM
I see! That worked, thank you very much!

I don't suppose anyone's made a way for the players to see how much EXP they have per weapon?