Help - Search - Members - Calendar
Full Version: Attribute System
RPG RPG Revolution Forums > Scripting > Script Submissions > RGSS2-Submissions
Pages: 1, 2, 3, 4, 5
poke96
hey yours script is so cool.I looking for this.But when i want to use this script there are some error in line 640 "undefined menthod 'req_attribute'
for nil class" how can i solve this prob.I use many script to like KGC and WGB script is that not compatible.Maybe it's just dump question but
didn't any thing about script so help me.
QuoVadis
Thanks for the script, it's awesome.
Also, I have a question, whenever I try to get my new attribute, I get an error in the folowing string:
CODE
  def refresh
    @item_max = @actor.attributes.keys.size
    create_contents
    for a in 0...@item_max
      draw_attribute(a)
    end
  end


To be more specific in
CODE
@item_max = @actor.attributes.keys.size


I'd like to know, what can I do to solve it, thanks a lot in advance

And then, when I change the attribute it's gonna give to my party, it gives me an error in the following sentence:
CODE
    index = @attributes.index(Attribute.new(id))

Also, if it's needed to know, I'm using the demo's version script.
Thanks in advance
Kread-EX
Can I see what you did, exactly?
QuoVadis
Basicly, I created an item that should give me atribute [1], then used it and threw me an error, then, whenever I press the menu so I can see my attributes, give me the error in the first place
Kread-EX
Two possibilities.

1 - You made an error with the notetag. The correct syntax is this:
CODE
<teach attribute 1>

2 - The 1 you specified is an attribute that doesn't exist. You need to create it. If you only have one attribute created in your game, its number is 0 not 1.
QuoVadis
I see, I will try, I will post any errors, thanks a lot for all your help!


----------------Edit:
Well, I did things like you said (In case of the item error)
and I got an error, following line:
CODE
      return true if !user.attributes.include?(t)

In the following string:
CODE
  def item_effective?(user, item)
    item.start_attr_cache
    return false if item.non_usable.include?(user.class.id)
    for t in item.teach_attributes
      return true if !user.attributes.include?(t)
    end
    attr_item_effective?(user, item)
  end

  alias attr_item_effect item_effect


The screenshot is this:
Kread-EX
Yeah, it seems that the attribute you want to learn doesn't exist.
QuoVadis
QUOTE (Kread-EX @ Jan 7 2011, 12:22 AM) *
Yeah, it seems that the attribute you want to learn doesn't exist.

That's quite odd, since I made the attribute...

Also, I solved the other problem, but another one comes to my mind, whenever I translate the word "Attribute", it tells me that I have an error in the script, is there a way to translate it or change the attributes serction name??

-------------------------------------Edit
Ok, I have the exact scripts now and when I make an event to teach an attribute, it throws me an error in the next string:
CODE
def start_attribute(id)
    index = @attributes.index(Attribute.new(id))
    @attributes[id] = Attribute.new(id) if index.nil?
  end
  
  def remove_attribute(id)
    reset_attribute(id)
    @attributes.delete(id)
  end
  
  def reset_attribute(id)
    while @attributes[d].level > 0
      attribute_down(id)
    end
  end

To be specific:
CODE
   index = @attributes.index(Attribute.new(id))


Thanks for everything and sorry to bother, I'm making the whole game by myself and it's quite hard...
ps: the screen shot of the error is in the attached file.
Kread-EX
Please, post a demo. That will be much easier to fix like this.
Rexwolf
umm ok so i being a newbie and all does not know how to make actors get the specific element/skill in this script can you please explain?
victorinno
I´m making two extras Status in my game:
ACV and DCV, they are used to check the combat results

I´m interested in adding them to the script as new attribute bonus but i got this error:
nil can´t be coerced to aFixnum

I think the error talks about the change si had done here:
QUOTE
def start_attribute(id)
index = @attributes.index(Attribute.new(id))
@attributes[id] = Attribute.new(id) if index.nil?
end

def remove_attribute(id)
reset_attribute(id)
@attributes.delete(id)
end

def reset_attribute(id)
while @attributes[d].level > 0
attribute_down(id)
end
end

def attribute_up(id)
return if @attributes[id].level == @attributes[id].max_level
#----------------------------------------
@maxhp_plus -= @attributes[id].bonus[0]
@maxmp_plus -= @attributes[id].bonus[1]
@atk_plus -= @attributes[id].bonus[2]
@def_plus -= @attributes[id].bonus[3]
@spi_plus -= @attributes[id].bonus[4]
@agi_plus -= @attributes[id].bonus[5]
@acv_plus -= @attributes[id].bonus[6]
@dcv_plus -= @attributes[id].bonus[7]
#----------------------------------------
@attributes[id].upgrade
#----------------------------------------
@maxhp_plus += @attributes[id].bonus[0]
@maxmp_plus += @attributes[id].bonus[1]
@atk_plus += @attributes[id].bonus[2]
@def_plus += @attributes[id].bonus[3]
@spi_plus += @attributes[id].bonus[4]
@agi_plus += @attributes[id].bonus[5]
@acv_plus -= @attributes[id].bonus[6]
@dcv_plus -= @attributes[id].bonus[7]
#----------------------------------------
for skill in @attributes[id].skills
learn_skill(skill)
end
end

def attribute_down(id)
return if @attributes[id].level == 0
#----------------------------------------
@maxhp_plus -= @attributes[id].bonus[0]
@maxmp_plus -= @attributes[id].bonus[1]
@atk_plus -= @attributes[id].bonus[2]
@def_plus -= @attributes[id].bonus[3]
@spi_plus -= @attributes[id].bonus[4]
@agi_plus -= @attributes[id].bonus[5]
@acv_plus -= @attributes[id].bonus[6]
@dcv_plus -= @attributes[id].bonus[7]
#----------------------------------------
for skill in @attributes[id].skills
forget_skill(skill)
end
@attributes[id].downgrade
#----------------------------------------
@maxhp_plus += @attributes[id].bonus[0]
@maxmp_plus += @attributes[id].bonus[1]
@atk_plus += @attributes[id].bonus[2]
@def_plus += @attributes[id].bonus[3]
@spi_plus += @attributes[id].bonus[4]
@agi_plus += @attributes[id].bonus[5]
@acv_plus -= @attributes[id].bonus[6]
@dcv_plus -= @attributes[id].bonus[7]
#----------------------------------------
end


They allawya indicate the @acv.

Someone can help me?
victorinno
Sorry for teh spam
DoctorTodd
I get an error on 643 when trying to change classes.
darkangel034
ok noob question but how do u different attributes for different characters....do i use one script for each one?
Lil Jbm
I don't understand this script at all. I really want it but just can't seem to open the screen. I can't open it from menu to look at my attributes, and I can't seem to find out how to activate it with an even call script. I mean there really should be an actual tutorial in the script or on the forum post telling you how to do this. And if there is in the script, what line should I look at?
maniak2221
how do I access the attribute screen? My character levels up and nothing happens....-_-
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2013 Invision Power Services, Inc.