I figured this out the hard way you cannot do:
class Scene_Guild_Shop < Scene_Schopendand then do:
SceneManager.call(Scene_Guild_Shop)And expect it to work - especially when your calling it as a script call, with out first passing items. to populate the window. I get the following error:
Which happens to be:
def make_item_list @data = [] @price = {} @shop_goods.each do |goods| ## throwing the error case goods[0] when 0; item = $data_items[goods[1]] when 1; item = $data_weapons[goods[1]] when 2; item = $data_armors[goods[1]] end if item @data.push(item) @price[item] = goods[2] == 0 ? item.price : goods[3] end end endAll because, I have not populate the list with items, weapons or armor. Now maybe I am in over my head with understanding the shop. but the goal here is to create my own shop while using many of the functions provided by the default shop. This shop could then be populated via script call and opened the same way.
So My question is:
How do you extend the scene_shop, keep much of the same functionality yet call the new shop via script call and populate via script call? I assume @shop_goods must have some kind of call I can do on it to say add item of type, with these id's at this cost per id?
class Scene_Guild_Shop < Scene_Schopendand then do:
SceneManager.call(Scene_Guild_Shop)And expect it to work - especially when your calling it as a script call, with out first passing items. to populate the window. I get the following error:
Which happens to be:
def make_item_list @data = [] @price = {} @shop_goods.each do |goods| ## throwing the error case goods[0] when 0; item = $data_items[goods[1]] when 1; item = $data_weapons[goods[1]] when 2; item = $data_armors[goods[1]] end if item @data.push(item) @price[item] = goods[2] == 0 ? item.price : goods[3] end end endAll because, I have not populate the list with items, weapons or armor. Now maybe I am in over my head with understanding the shop. but the goal here is to create my own shop while using many of the functions provided by the default shop. This shop could then be populated via script call and opened the same way.
So My question is:
How do you extend the scene_shop, keep much of the same functionality yet call the new shop via script call and populate via script call? I assume @shop_goods must have some kind of call I can do on it to say add item of type, with these id's at this cost per id?