just for shits and giggles im gonna try both ways to see what is faster, but im not really sure what i need to do glitches way...
edit:something like this?
[rgss]RPG::Item = Struct.new
id, :name, :icon_name , :description, :scope,
ccasion , :animation1_id, :animation2_id, :menu_se, :common_event_id, :price, :consumable, :parameter_type, :parameter_points, :recover_hp_rate, :recover_hp, :recover_sp_rate, :recover_sp, :hit, :pdef_f , :mdef_f, :variance, :element_set, :plus_state_set, :minus_state_set , :sort_order)
module RPG
class Item
def initialize
@id = 0
@name = ""
@icon_name = ""
@description = ""
@scope = 0
@occasion = 0
@animation1_id = 0
@animation2_id = 0
@menu_se = RPG::AudioFile.new("", 80)
@common_event_id = 0
@price = 0
@consumable = true
@parameter_type = 0
@parameter_points = 0
@recover_hp_rate = 0
@recover_hp = 0
@recover_sp_rate = 0
@recover_sp = 0
@hit = 100
@pdef_f = 0
@mdef_f = 0
@variance = 0
@element_set = []
@plus_state_set = []
@minus_state_set = []
@sort_order = 0
end
attr_accessor :id
attr_accessor :name
attr_accessor :icon_name
attr_accessor :description
attr_accessor :scope
attr_accessor
ccasion
attr_accessor :animation1_id
attr_accessor :animation2_id
attr_accessor :menu_se
attr_accessor :common_event_id
attr_accessor :price
attr_accessor :consumable
attr_accessor :parameter_type
attr_accessor :parameter_points
attr_accessor :recover_hp_rate
attr_accessor :recover_hp
attr_accessor :recover_sp_rate
attr_accessor :recover_sp
attr_accessor :hit
attr_accessor :pdef_f
attr_accessor :mdef_f
attr_accessor :variance
attr_accessor :element_set
attr_accessor :plus_state_set
attr_accessor :minus_state_set
attr_accessor :sort_order
end
end
if true
$data_items = [nil]
RPG::Item.new(1,"test","001-Weapon01,","",3,0,0,0,"001-System01",0,0,false,0,0,0,100,0,0,100,0,0,0,[],[],[],1)
save_data($data_items, "Data/Items.rxdata")
else
$data_items = [nil]
$data_items = load_data("Data/Items.rxdata")
end
[/rgss]