Jump to content
New account registrations are disabed. This website is now an archive. Read more here.
  • 0
bcolema61

Scripting - Adding Variables to stats

Question

Hello,

 

I started playing around with RGSS just recently and I'm still trying to figure a lot of it out. I added my own custom stats and got them all working how I want them to, however I'm trying to add code in to increase these stats on certain weapons. For example, I have "Mind" which increases the magic attack of the actor. I want certain weapons and pieces of armor to have different values of "Mind" on them.

 

Right now I have:

 

def base_mind
   # use this array as multipliers
   mval = [0, 1.2, 1.1, 0.25, 2.4]
       weapon_mod = { 31 => 30, 45 => 10 }
   # mulitply current level * array element for this actor
   mvalue = @level * mval[@actor_id]
   # give weapons mind attribute here
       if weapon_mod.has_key?(@weapon_id)
           mvalue += weapon_mod(@weapon_id)
       end
   return [mvalue, 999].min
 end

 

Am I doing something wrong here? It's saying undefined method for weapon_mod...

 

Thanks!

Share this post


Link to post
Share on other sites

1 answer to this question

Recommended Posts

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...