#============================================================================== # EVENT TRANSMUTTER # Author Molegato # Version 1.0 #------------------------------------------------------------------------------ # Lets you place event clones from a 'gallery' map. #------------------------------------------------------------------------------ # INSTRUCTIONS # # In the config module you have to set the name for each gallery map. # A gallery map is a map from where events can be copied. # You just have to assign the map ID to a name. # # To place in any map an event that copies another from a gallery map # You just have to set its name to 'name_number' # For example: If you added a map with shops with # 'shops' => 27 # And you can copy an event with ID 12 from that map, you'll have to name # the event 'shops_12' #============================================================================== $imported = {} if $imported.nil? $imported['Molegato-Event_transmutter'] = true #============================================================================== # CONFIGURATION, YOU CAN TOUCH THIS #============================================================================== module TRANSMUTTER_MODULE MAPS={ 'Event'=> 3, 'Npc'=> 4, 'Others'=> 5, } end #============================================================================== # END OF CONFIGURATION. EVERYTHING UNDER HERE IS A HELLISH MESS OF DEFICIENT # AMATEUR SCRIPTING. BE AWARE THAT MESSING WITH IT CAN RESULT IN DISASTER #============================================================================== #============================================================================== # ** Game_Event #============================================================================== class Game_Event < Game_Character #-------------------------------------------------------------------------- # * Public Instance Variables #-------------------------------------------------------------------------- attr_accessor :event attr_accessor :id end #============================================================================== # ** Game_Map #============================================================================== class Game_Map alias event_transmutter_setup_events setup_events def setup_events event_transmutter_setup_events for i in @map.events.keys initstring = @map.events[i].name map = -1 if TRANSMUTTER_MODULE::MAPS.keys.include?(initstring.split("_")[0]) map = TRANSMUTTER_MODULE::MAPS[initstring.split("_")[0]] end if map != -1 new_id = String.new(@map.events[i].name.split("_")[1]) data = load_data(sprintf("Data/Map%03d.rvdata2", map)) dum_event = Game_Event.new(17, data.events[new_id.to_i].clone) dum_event.event = Game_Event.new(17, data.events[new_id.to_i]).event.clone dum_event.id = @map.events[i].id dum_event.event.id = @map.events[i].id @events[i] = Game_Event.new(@map_id, @map.events[i]) @events[i].event = dum_event.event @events[i].refresh else @events[i] = Game_Event.new(@map_id, @map.events[i]) end end refresh_tile_events end end