i would like to add an attribute to all items called sort_order, for my custom sort method im writing. however no matter what i try i cant seem to get it to work. mostly because im not sure how to set the new attribute for every item. could some one please exsplain to me? ive tried searching but nothing i found was what i was looking for. i got this, not sure if it is right.
[rgss]class RPG::Item
alias_method :plague180_rpg_item_init, :initialize
attr_accessor :sort_order
def initialize()
plague180_rpg_item_init
@sort_order
end
end
[/rgss]