Sure! As I said I just created an array with the proper ordering I want, and then I create an empty hash that is then populated using this array. I also have removed HeadbuttHigh because I'm not using it in my game, but you can customize the order/number of encounters as you wish. This is the initialize method for the EncounterList_Scene class btw.Do you think you could share that little bit of script? It sounds very interesting to organize them.
I wanted to try to create a method on my own, but it was not possible :(
Ruby:
def initialize
@viewport = Viewport.new(0, 0, Graphics.width, Graphics.height)
@viewport.z = 99999
@sprites = {}
mapid = $game_map.map_id
@encounter_data = GameData::Encounter.get(mapid, $PokemonGlobal.encounter_version)
if @encounter_data
@encounter_tables = Marshal.load(Marshal.dump(@encounter_data.types))
#EDIT: Create new empty hash and fill it using order array.
order =Array.new
order = [:Land,:LandDay,:LandNight,:HeadbuttLow,:Cave,:CaveDay,:CaveNight,:Water,:OldRod,:GoodRod,:SuperRod,:PokeRadar,:BugContest]
@ordered_table = Hash.new
for j in 0...order.length
for k in 0...@encounter_tables.keys.length
if @encounter_tables.keys[k] == order[j]
@ordered_table[order[j]]=@encounter_tables[@encounter_tables.keys[k]]
end
end
end
@max_enc, @eLength = getMaxEncounters(@ordered_table)
else
@max_enc, @eLength = [1, 1]
end
@index = 0
end