Hey,
I'm looking for a script in which I can combine items together. Not so much as a crafting script, but more like in adventures? Using two unique items together or seperating them again. I already tried to start with a script, where you have a new item menu (with bigger icons, too) and in which you can select one item from the list and do one of four things: examine, equip, combine and seperate. Examine should open a new window, having an item description or something the like. Equip would equip the item (every item is sorted in the weapons category right now), when I would click combine, you should be able to select a second item and then those two would either combine (if they can) or you would get a message that it isn't possible. Lastly, seperate would seperate a combined item back into the two previous items (if possible - e.g. you shouldn't been able to seperate a poisoned wine back into wine and poison).
I already started on a script, but I have little to no idea what I'm doing and had a lot of help, too:
And you can see the whole thing more or less in action in this project: https://dl.dropboxusercontent.com/u/1576581/Adventure%20Engine.exe
(open the chest, then talk to the old man to open the special item menu - still having some problems with the icons).
If someone wants to help me, making this a better script, I would be very grateful. I especially need help getting this "combining" function sorted out. I'm also wondering, if I can make it so that an equipped item remains in the item list (but maybe greyed out or with a hand symbol)
As thank you, I can offer everyone that substantially helps with this script, to make a (parallax or normal) map or make some tile edits for you.
I'm looking for a script in which I can combine items together. Not so much as a crafting script, but more like in adventures? Using two unique items together or seperating them again. I already tried to start with a script, where you have a new item menu (with bigger icons, too) and in which you can select one item from the list and do one of four things: examine, equip, combine and seperate. Examine should open a new window, having an item description or something the like. Equip would equip the item (every item is sorted in the weapons category right now), when I would click combine, you should be able to select a second item and then those two would either combine (if they can) or you would get a message that it isn't possible. Lastly, seperate would seperate a combined item back into the two previous items (if possible - e.g. you shouldn't been able to seperate a poisoned wine back into wine and poison).
I already started on a script, but I have little to no idea what I'm doing and had a lot of help, too:
######## Module #######module KombosRezepte = {"Enterhaken" => [[4,5],[3]],"Schwert" => [[11,12],[10]],"Wurfanker" => [[4,24],[23]],"Federkiel m. Tinte" => [[17,19],[18]],"Brief" => [[9,18],[16,18]],"Speer" => [[5,6],[2]],"Vergifteter Wein" => [[14,15],[13]]}end######## Windows #######class Quest_Items < Window_ItemListdef initialize super(0, 0, Graphics.width, 250) self.category = :weapon end def col_max return 6 enddef item_height return 48end def draw_item(index) item = @data[index] if item rect = item_rect(index) rect.width -= 4 draw_big_icon(item.icon_index, rect.x, rect.y, true) end end def current_item_enabled? true enddef draw_big_icon(icon_index, x, y, enabled = true)bitmap = Cache.system("IconSet2")iw, nw = 48, 48icon_rect = Rect.new(icon_index % 6 * 48, icon_index / 6 *iw, iw, iw)new_rect = Rect.new(x, y, nw, nw)contents.stretch_blt(new_rect, bitmap, icon_rect, enabled ? 255 : translucent_alpha)endendclass Item_Kommandos < Window_HorzCommand def initialize super(0,320) self.x = (Graphics.width/2) - (500/2) end def window_width return 500 end def make_command_list add_command("Examine", :examine) add_command("Equip", :equip) add_command("Combine", :combine) add_command("Separate", :separate) end end ######## Scenes ###########class Scene_Adventure < Scene_Basedef startsupercreate_backgroundcreatehelpwindowcreatelistwindowenddef create_background@background_sprite = Sprite.new@background_sprite.bitmap = SceneManager.background_bitmap@background_sprite.color.set(16, 16, 16, 128)end def dispose_background @background_sprite.dispose enddef createhelpwindow @itemdescription = Window_Help.new(3) @itemdescription.y = 250 enddef createlistwindow@listwindow = Quest_Items.new@listwindow.viewport = @viewport@listwindow.help_window = @itemdescription@listwindow.set_handler
ok, method
on_ok))@listwindow.set_handler
cancel, method
return))@listwindow.activate@listwindow.select(0)enddef createkommandoswindow @kommandowindow = Item_Kommandos.new @kommandowindow.viewport = @viewport @kommandowindow.set_handler
ok, method
on_ok2)) @kommandowindow.set_handler
cancel, method
return2)) @kommandowindow.set_handler
examine, method
on_examine)) @kommandowindow.set_handler
equip, method
on_equip)) @kommandowindow.set_handler
combine, method
on_combine)) @kommandowindow.set_handler
separate, method
on_separate)) @kommandowindow.activate @kommandowindow.select(0) enddef on_ok @listwindow.deactivate createkommandoswindow enddef return dispose_background SceneManager.return enddef on_ok2 @kommandowindow.activateenddef on_examine @kommandowindow.activateenddef on_equip Sound.play_equip @actor = $game_actors[1] @actor.change_equip(0, @listwindow.item) @listwindow.unselect @listwindow.refresh @kommandowindow.close @listwindow.activate enddef on_combine @kommandowindow.activateenddef on_separate item = @listwindow.item for key in Kombos::Rezepte.keys if item.id == Kombos::Rezepte[key][1][0] for gefunden in Kombos::Rezepte[key][0] $game_party.gain_item($data_weapons[gefunden], 1) end RPG::SE.new("Equip1", 80, 100).play $game_party.lose_item($data_weapons[item.id], 1) @listwindow.unselect @listwindow.refresh @kommandowindow.close @listwindow.activate else @kommandowindow.close @listwindow.activate end endenddef return2 @kommandowindow.close @listwindow.activateendend
(open the chest, then talk to the old man to open the special item menu - still having some problems with the icons).
If someone wants to help me, making this a better script, I would be very grateful. I especially need help getting this "combining" function sorted out. I'm also wondering, if I can make it so that an equipped item remains in the item list (but maybe greyed out or with a hand symbol)
As thank you, I can offer everyone that substantially helps with this script, to make a (parallax or normal) map or make some tile edits for you.
Last edited by a moderator:


