mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-07 21:24:59 +00:00
Added compiler schema letter "m" which makes the value a symbol, refactored many PBS file compilers, removed support for old PBS formats/properties
This commit is contained in:
@@ -14,15 +14,15 @@ module GameData
|
||||
DATA_FILENAME = "types.dat"
|
||||
|
||||
SCHEMA = {
|
||||
"Name" => [0, "s"],
|
||||
"InternalName" => [0, "s"],
|
||||
"IsSpecialType" => [0, "b"],
|
||||
"IsPseudoType" => [0, "b"],
|
||||
"Flags" => [0, "*s"],
|
||||
"Weaknesses" => [0, "*s"],
|
||||
"Resistances" => [0, "*s"],
|
||||
"Immunities" => [0, "*s"],
|
||||
"IconPosition" => [0, "u"]
|
||||
"SectionName" => [:id, "m"],
|
||||
"Name" => [:real_name, "s"],
|
||||
"IsSpecialType" => [:special_type, "b"],
|
||||
"IsPseudoType" => [:pseudo_type, "b"],
|
||||
"Flags" => [:flags, "*s"],
|
||||
"Weaknesses" => [:weaknesses, "*m"],
|
||||
"Resistances" => [:resistances, "*m"],
|
||||
"Immunities" => [:immunities, "*m"],
|
||||
"IconPosition" => [:icon_position, "u"]
|
||||
}
|
||||
|
||||
extend ClassMethodsSymbols
|
||||
@@ -30,7 +30,7 @@ module GameData
|
||||
|
||||
def initialize(hash)
|
||||
@id = hash[:id]
|
||||
@real_name = hash[:name] || "Unnamed"
|
||||
@real_name = hash[:real_name] || "Unnamed"
|
||||
@special_type = hash[:special_type] || false
|
||||
@pseudo_type = hash[:pseudo_type] || false
|
||||
@flags = hash[:flags] || []
|
||||
|
||||
@@ -12,16 +12,17 @@ module GameData
|
||||
include InstanceMethods
|
||||
|
||||
SCHEMA = {
|
||||
"Name" => [:name, "s"],
|
||||
"Description" => [:description, "q"],
|
||||
"Flags" => [:flags, "*s"]
|
||||
"SectionName" => [:id, "m"],
|
||||
"Name" => [:real_name, "s"],
|
||||
"Description" => [:real_description, "q"],
|
||||
"Flags" => [:flags, "*s"]
|
||||
}
|
||||
|
||||
def initialize(hash)
|
||||
@id = hash[:id]
|
||||
@real_name = hash[:name] || "Unnamed"
|
||||
@real_description = hash[:description] || "???"
|
||||
@flags = hash[:flags] || []
|
||||
@real_name = hash[:real_name] || "Unnamed"
|
||||
@real_description = hash[:real_description] || "???"
|
||||
@flags = hash[:flags] || []
|
||||
end
|
||||
|
||||
# @return [String] the translated name of this ability
|
||||
|
||||
@@ -19,21 +19,19 @@ module GameData
|
||||
DATA_FILENAME = "moves.dat"
|
||||
|
||||
SCHEMA = {
|
||||
"Name" => [:name, "s"],
|
||||
"Type" => [:type, "e", :Type],
|
||||
"Category" => [:category, "e", ["Physical", "Special", "Status"]],
|
||||
"Power" => [:base_damage, "u"],
|
||||
"Accuracy" => [:accuracy, "u"],
|
||||
"TotalPP" => [:total_pp, "u"],
|
||||
"Target" => [:target, "e", :Target],
|
||||
"Priority" => [:priority, "i"],
|
||||
"FunctionCode" => [:function_code, "s"],
|
||||
"Flags" => [:flags, "*s"],
|
||||
"EffectChance" => [:effect_chance, "u"],
|
||||
"Description" => [:description, "q"],
|
||||
# All properties below here are old names for some properties above.
|
||||
# They will be removed in v21.
|
||||
"BaseDamage" => [:base_damage, "u"]
|
||||
"SectionName" => [:id, "m"],
|
||||
"Name" => [:real_name, "s"],
|
||||
"Type" => [:type, "e", :Type],
|
||||
"Category" => [:category, "e", ["Physical", "Special", "Status"]],
|
||||
"Power" => [:base_damage, "u"],
|
||||
"Accuracy" => [:accuracy, "u"],
|
||||
"TotalPP" => [:total_pp, "u"],
|
||||
"Target" => [:target, "e", :Target],
|
||||
"Priority" => [:priority, "i"],
|
||||
"FunctionCode" => [:function_code, "s"],
|
||||
"Flags" => [:flags, "*s"],
|
||||
"EffectChance" => [:effect_chance, "u"],
|
||||
"Description" => [:real_description, "q"]
|
||||
}
|
||||
|
||||
extend ClassMethodsSymbols
|
||||
@@ -42,19 +40,19 @@ module GameData
|
||||
def initialize(hash)
|
||||
convert_move_data(hash)
|
||||
@id = hash[:id]
|
||||
@real_name = hash[:name] || "Unnamed"
|
||||
@type = hash[:type] || :NONE
|
||||
@category = hash[:category] || 2
|
||||
@base_damage = hash[:base_damage] || 0
|
||||
@accuracy = hash[:accuracy] || 100
|
||||
@total_pp = hash[:total_pp] || 5
|
||||
@target = hash[:target] || :None
|
||||
@priority = hash[:priority] || 0
|
||||
@function_code = hash[:function_code] || "None"
|
||||
@flags = hash[:flags] || []
|
||||
@real_name = hash[:real_name] || "Unnamed"
|
||||
@type = hash[:type] || :NONE
|
||||
@category = hash[:category] || 2
|
||||
@base_damage = hash[:base_damage] || 0
|
||||
@accuracy = hash[:accuracy] || 100
|
||||
@total_pp = hash[:total_pp] || 5
|
||||
@target = hash[:target] || :None
|
||||
@priority = hash[:priority] || 0
|
||||
@function_code = hash[:function_code] || "None"
|
||||
@flags = hash[:flags] || []
|
||||
@flags = [@flags] if !@flags.is_a?(Array)
|
||||
@effect_chance = hash[:effect_chance] || 0
|
||||
@real_description = hash[:description] || "???"
|
||||
@effect_chance = hash[:effect_chance] || 0
|
||||
@real_description = hash[:real_description] || "???"
|
||||
end
|
||||
|
||||
# @return [String] the translated name of this move
|
||||
|
||||
@@ -9,27 +9,28 @@ module GameData
|
||||
attr_reader :real_description
|
||||
attr_reader :field_use
|
||||
attr_reader :battle_use
|
||||
attr_reader :consumable
|
||||
attr_reader :flags
|
||||
attr_reader :consumable
|
||||
attr_reader :move
|
||||
|
||||
DATA = {}
|
||||
DATA_FILENAME = "items.dat"
|
||||
|
||||
SCHEMA = {
|
||||
"Name" => [:name, "s"],
|
||||
"NamePlural" => [:name_plural, "s"],
|
||||
"Pocket" => [:pocket, "v"],
|
||||
"Price" => [:price, "u"],
|
||||
"SellPrice" => [:sell_price, "u"],
|
||||
"Description" => [:description, "q"],
|
||||
"FieldUse" => [:field_use, "e", { "OnPokemon" => 1, "Direct" => 2, "TM" => 3,
|
||||
"HM" => 4, "TR" => 5 }],
|
||||
"BattleUse" => [:battle_use, "e", { "OnPokemon" => 1, "OnMove" => 2, "OnBattler" => 3,
|
||||
"OnFoe" => 4, "Direct" => 5 }],
|
||||
"Consumable" => [:consumable, "b"],
|
||||
"Flags" => [:flags, "*s"],
|
||||
"Move" => [:move, "e", :Move]
|
||||
"SectionName" => [:id, "m"],
|
||||
"Name" => [:real_name, "s"],
|
||||
"NamePlural" => [:real_name_plural, "s"],
|
||||
"Pocket" => [:pocket, "v"],
|
||||
"Price" => [:price, "u"],
|
||||
"SellPrice" => [:sell_price, "u"],
|
||||
"Description" => [:real_description, "q"],
|
||||
"FieldUse" => [:field_use, "e", { "OnPokemon" => 1, "Direct" => 2, "TM" => 3,
|
||||
"HM" => 4, "TR" => 5 }],
|
||||
"BattleUse" => [:battle_use, "e", { "OnPokemon" => 1, "OnMove" => 2, "OnBattler" => 3,
|
||||
"OnFoe" => 4, "Direct" => 5 }],
|
||||
"Flags" => [:flags, "*s"],
|
||||
"Consumable" => [:consumable, "b"],
|
||||
"Move" => [:move, "e", :Move]
|
||||
}
|
||||
|
||||
extend ClassMethodsSymbols
|
||||
@@ -82,15 +83,15 @@ module GameData
|
||||
|
||||
def initialize(hash)
|
||||
@id = hash[:id]
|
||||
@real_name = hash[:name] || "Unnamed"
|
||||
@real_name_plural = hash[:name_plural] || "Unnamed"
|
||||
@pocket = hash[:pocket] || 1
|
||||
@price = hash[:price] || 0
|
||||
@sell_price = hash[:sell_price] || (@price / 2)
|
||||
@real_description = hash[:description] || "???"
|
||||
@field_use = hash[:field_use] || 0
|
||||
@battle_use = hash[:battle_use] || 0
|
||||
@flags = hash[:flags] || []
|
||||
@real_name = hash[:real_name] || "Unnamed"
|
||||
@real_name_plural = hash[:real_name_plural] || "Unnamed"
|
||||
@pocket = hash[:pocket] || 1
|
||||
@price = hash[:price] || 0
|
||||
@sell_price = hash[:sell_price] || (@price / 2)
|
||||
@real_description = hash[:real_description] || "???"
|
||||
@field_use = hash[:field_use] || 0
|
||||
@battle_use = hash[:battle_use] || 0
|
||||
@flags = hash[:flags] || []
|
||||
@consumable = hash[:consumable]
|
||||
@consumable = !is_important? if @consumable.nil?
|
||||
@move = hash[:move]
|
||||
|
||||
@@ -9,6 +9,7 @@ module GameData
|
||||
DATA_FILENAME = "berry_plants.dat"
|
||||
|
||||
SCHEMA = {
|
||||
"SectionName" => [:id, "m"],
|
||||
"HoursPerStage" => [:hours_per_stage, "v"],
|
||||
"DryingPerHour" => [:drying_per_hour, "u"],
|
||||
"Yield" => [:yield, "uv"]
|
||||
|
||||
@@ -73,70 +73,50 @@ module GameData
|
||||
|
||||
def self.schema(compiling_forms = false)
|
||||
ret = {
|
||||
"FormName" => [0, "q"],
|
||||
"Category" => [0, "s"],
|
||||
"Pokedex" => [0, "q"],
|
||||
"Types" => [0, "eE", :Type, :Type],
|
||||
"BaseStats" => [0, "vvvvvv"],
|
||||
"EVs" => [0, "*ev", :Stat],
|
||||
"BaseExp" => [0, "v"],
|
||||
"CatchRate" => [0, "u"],
|
||||
"Happiness" => [0, "u"],
|
||||
"Moves" => [0, "*ue", nil, :Move],
|
||||
"TutorMoves" => [0, "*e", :Move],
|
||||
"EggMoves" => [0, "*e", :Move],
|
||||
"Abilities" => [0, "*e", :Ability],
|
||||
"HiddenAbilities" => [0, "*e", :Ability],
|
||||
"WildItemCommon" => [0, "*e", :Item],
|
||||
"WildItemUncommon" => [0, "*e", :Item],
|
||||
"WildItemRare" => [0, "*e", :Item],
|
||||
"EggGroups" => [0, "*e", :EggGroup],
|
||||
"HatchSteps" => [0, "v"],
|
||||
"Height" => [0, "f"],
|
||||
"Weight" => [0, "f"],
|
||||
"Color" => [0, "e", :BodyColor],
|
||||
"Shape" => [0, "e", :BodyShape],
|
||||
"Habitat" => [0, "e", :Habitat],
|
||||
"Generation" => [0, "i"],
|
||||
"Flags" => [0, "*s"],
|
||||
"BattlerPlayerX" => [0, "i"],
|
||||
"BattlerPlayerY" => [0, "i"],
|
||||
"BattlerEnemyX" => [0, "i"],
|
||||
"BattlerEnemyY" => [0, "i"],
|
||||
"BattlerAltitude" => [0, "i"],
|
||||
"BattlerShadowX" => [0, "i"],
|
||||
"BattlerShadowSize" => [0, "u"],
|
||||
# All properties below here are old names for some properties above.
|
||||
# They will be removed in v21.
|
||||
"Type1" => [0, "e", :Type],
|
||||
"Type2" => [0, "e", :Type],
|
||||
"Rareness" => [0, "u"],
|
||||
"Compatibility" => [0, "*e", :EggGroup],
|
||||
"Kind" => [0, "s"],
|
||||
"BaseEXP" => [0, "v"],
|
||||
"EffortPoints" => [0, "*ev", :Stat],
|
||||
"HiddenAbility" => [0, "*e", :Ability],
|
||||
"StepsToHatch" => [0, "v"]
|
||||
"FormName" => [:real_form_name, "q"],
|
||||
"Category" => [:real_category, "s"],
|
||||
"Pokedex" => [:real_pokedex_entry, "q"],
|
||||
"Types" => [:types, "eE", :Type, :Type],
|
||||
"BaseStats" => [:base_stats, "vvvvvv"],
|
||||
"EVs" => [:evs, "*ev", :Stat],
|
||||
"BaseExp" => [:base_exp, "v"],
|
||||
"CatchRate" => [:catch_rate, "u"],
|
||||
"Happiness" => [:happiness, "u"],
|
||||
"Moves" => [:moves, "*ue", nil, :Move],
|
||||
"TutorMoves" => [:tutor_moves, "*e", :Move],
|
||||
"EggMoves" => [:egg_moves, "*e", :Move],
|
||||
"Abilities" => [:abilities, "*e", :Ability],
|
||||
"HiddenAbilities" => [:hidden_abilities, "*e", :Ability],
|
||||
"WildItemCommon" => [:wild_item_common, "*e", :Item],
|
||||
"WildItemUncommon" => [:wild_item_uncommon, "*e", :Item],
|
||||
"WildItemRare" => [:wild_item_rare, "*e", :Item],
|
||||
"EggGroups" => [:egg_groups, "*e", :EggGroup],
|
||||
"HatchSteps" => [:hatch_steps, "v"],
|
||||
"Height" => [:height, "f"],
|
||||
"Weight" => [:weight, "f"],
|
||||
"Color" => [:color, "e", :BodyColor],
|
||||
"Shape" => [:shape, "e", :BodyShape],
|
||||
"Habitat" => [:habitat, "e", :Habitat],
|
||||
"Generation" => [:generation, "i"],
|
||||
"Flags" => [:flags, "*s"]
|
||||
}
|
||||
if compiling_forms
|
||||
ret["PokedexForm"] = [0, "u"]
|
||||
ret["Offspring"] = [0, "*e", :Species]
|
||||
ret["Evolutions"] = [0, "*ees", :Species, :Evolution, nil]
|
||||
ret["MegaStone"] = [0, "e", :Item]
|
||||
ret["MegaMove"] = [0, "e", :Move]
|
||||
ret["UnmegaForm"] = [0, "u"]
|
||||
ret["MegaMessage"] = [0, "u"]
|
||||
ret["SectionName"] = [:id, "ev", :Species]
|
||||
ret["PokedexForm"] = [:pokedex_form, "u"]
|
||||
ret["Offspring"] = [:offspring, "*e", :Species]
|
||||
ret["Evolutions"] = [:evolutions, "*ees", :Species, :Evolution, nil]
|
||||
ret["MegaStone"] = [:mega_stone, "e", :Item]
|
||||
ret["MegaMove"] = [:mega_move, "e", :Move]
|
||||
ret["UnmegaForm"] = [:unmega_form, "u"]
|
||||
ret["MegaMessage"] = [:mega_message, "u"]
|
||||
else
|
||||
ret["InternalName"] = [0, "n"]
|
||||
ret["Name"] = [0, "s"]
|
||||
ret["GrowthRate"] = [0, "e", :GrowthRate]
|
||||
ret["GenderRatio"] = [0, "e", :GenderRatio]
|
||||
ret["Incense"] = [0, "e", :Item]
|
||||
ret["Offspring"] = [0, "*s"]
|
||||
ret["Evolutions"] = [0, "*ses", nil, :Evolution, nil]
|
||||
# All properties below here are old names for some properties above.
|
||||
# They will be removed in v21.
|
||||
ret["GenderRate"] = [0, "e", :GenderRatio]
|
||||
ret["SectionName"] = [:id, "m"]
|
||||
ret["Name"] = [:real_name, "s"]
|
||||
ret["GrowthRate"] = [:growth_rate, "e", :GrowthRate]
|
||||
ret["GenderRatio"] = [:gender_ratio, "e", :GenderRatio]
|
||||
ret["Incense"] = [:incense, "e", :Item]
|
||||
ret["Offspring"] = [:offspring, "*s"]
|
||||
ret["Evolutions"] = [:evolutions, "*ses", nil, :Evolution, nil]
|
||||
end
|
||||
return ret
|
||||
end
|
||||
@@ -145,10 +125,10 @@ module GameData
|
||||
@id = hash[:id]
|
||||
@species = hash[:species] || @id
|
||||
@form = hash[:form] || 0
|
||||
@real_name = hash[:name] || "Unnamed"
|
||||
@real_form_name = hash[:form_name]
|
||||
@real_category = hash[:category] || "???"
|
||||
@real_pokedex_entry = hash[:pokedex_entry] || "???"
|
||||
@real_name = hash[:real_name] || "Unnamed"
|
||||
@real_form_name = hash[:real_form_name]
|
||||
@real_category = hash[:real_category] || "???"
|
||||
@real_pokedex_entry = hash[:real_pokedex_entry] || "???"
|
||||
@pokedex_form = hash[:pokedex_form] || @form
|
||||
@types = hash[:types] || [:NORMAL]
|
||||
@base_stats = hash[:base_stats] || {}
|
||||
|
||||
@@ -13,11 +13,12 @@ module GameData
|
||||
DATA_FILENAME = "species_metrics.dat"
|
||||
|
||||
SCHEMA = {
|
||||
"BackSprite" => [0, "ii"],
|
||||
"FrontSprite" => [0, "ii"],
|
||||
"FrontSpriteAltitude" => [0, "i"],
|
||||
"ShadowX" => [0, "i"],
|
||||
"ShadowSize" => [0, "u"]
|
||||
"SectionName" => [:id, "eV", :Species],
|
||||
"BackSprite" => [:back_sprite, "ii"],
|
||||
"FrontSprite" => [:front_sprite, "ii"],
|
||||
"FrontSpriteAltitude" => [:front_sprite_altitude, "i"],
|
||||
"ShadowX" => [:shadow_x, "i"],
|
||||
"ShadowSize" => [:shadow_size, "u"]
|
||||
}
|
||||
|
||||
extend ClassMethodsSymbols
|
||||
|
||||
@@ -9,9 +9,10 @@ module GameData
|
||||
DATA_FILENAME = "shadow_pokemon.dat"
|
||||
|
||||
SCHEMA = {
|
||||
"GaugeSize" => [:gauge_size, "v"],
|
||||
"Moves" => [:moves, "*s"], # Not enumerated when compiled
|
||||
"Flags" => [:flags, "*s"]
|
||||
"SectionName" => [:id, "e", :Species],
|
||||
"GaugeSize" => [:gauge_size, "v"],
|
||||
"Moves" => [:moves, "*m"], # Not enumerated when compiled
|
||||
"Flags" => [:flags, "*s"]
|
||||
}
|
||||
HEART_GAUGE_SIZE = 4000 # Default gauge size
|
||||
|
||||
@@ -20,8 +21,8 @@ module GameData
|
||||
|
||||
def initialize(hash)
|
||||
@id = hash[:id]
|
||||
@moves = hash[:moves] || []
|
||||
@gauge_size = hash[:gauge_size] || HEART_GAUGE_SIZE
|
||||
@moves = hash[:moves] || []
|
||||
@flags = hash[:flags] || []
|
||||
end
|
||||
|
||||
|
||||
@@ -10,10 +10,11 @@ module GameData
|
||||
DATA_FILENAME = "ribbons.dat"
|
||||
|
||||
SCHEMA = {
|
||||
"Name" => [:name, "s"],
|
||||
"IconPosition" => [:icon_position, "u"],
|
||||
"Description" => [:description, "q"],
|
||||
"Flags" => [:flags, "*s"]
|
||||
"SectionName" => [:id, "m"],
|
||||
"Name" => [:real_name, "s"],
|
||||
"IconPosition" => [:icon_position, "u"],
|
||||
"Description" => [:real_description, "q"],
|
||||
"Flags" => [:flags, "*s"]
|
||||
}
|
||||
|
||||
extend ClassMethodsSymbols
|
||||
@@ -21,10 +22,10 @@ module GameData
|
||||
|
||||
def initialize(hash)
|
||||
@id = hash[:id]
|
||||
@real_name = hash[:name] || "Unnamed"
|
||||
@icon_position = hash[:icon_position] || 0
|
||||
@real_description = hash[:description] || "???"
|
||||
@flags = hash[:flags] || []
|
||||
@real_name = hash[:real_name] || "Unnamed"
|
||||
@icon_position = hash[:icon_position] || 0
|
||||
@real_description = hash[:real_description] || "???"
|
||||
@flags = hash[:flags] || []
|
||||
end
|
||||
|
||||
# @return [String] the translated name of this ribbon
|
||||
|
||||
@@ -14,17 +14,18 @@ module GameData
|
||||
DATA_FILENAME = "trainer_types.dat"
|
||||
|
||||
SCHEMA = {
|
||||
"Name" => [:name, "s"],
|
||||
"Gender" => [:gender, "e", { "Male" => 0, "male" => 0, "M" => 0, "m" => 0, "0" => 0,
|
||||
"Female" => 1, "female" => 1, "F" => 1, "f" => 1, "1" => 1,
|
||||
"Unknown" => 2, "unknown" => 2, "Other" => 2, "other" => 2,
|
||||
"Mixed" => 2, "mixed" => 2, "X" => 2, "x" => 2, "2" => 2 }],
|
||||
"BaseMoney" => [:base_money, "u"],
|
||||
"SkillLevel" => [:skill_level, "u"],
|
||||
"Flags" => [:flags, "*s"],
|
||||
"IntroBGM" => [:intro_BGM, "s"],
|
||||
"BattleBGM" => [:battle_BGM, "s"],
|
||||
"VictoryBGM" => [:victory_BGM, "s"]
|
||||
"SectionName" => [:id, "m"],
|
||||
"Name" => [:real_name, "s"],
|
||||
"Gender" => [:gender, "e", { "Male" => 0, "male" => 0, "M" => 0, "m" => 0, "0" => 0,
|
||||
"Female" => 1, "female" => 1, "F" => 1, "f" => 1, "1" => 1,
|
||||
"Unknown" => 2, "unknown" => 2, "Other" => 2, "other" => 2,
|
||||
"Mixed" => 2, "mixed" => 2, "X" => 2, "x" => 2, "2" => 2 }],
|
||||
"BaseMoney" => [:base_money, "u"],
|
||||
"SkillLevel" => [:skill_level, "u"],
|
||||
"Flags" => [:flags, "*s"],
|
||||
"IntroBGM" => [:intro_BGM, "s"],
|
||||
"BattleBGM" => [:battle_BGM, "s"],
|
||||
"VictoryBGM" => [:victory_BGM, "s"]
|
||||
}
|
||||
|
||||
extend ClassMethodsSymbols
|
||||
@@ -81,7 +82,7 @@ module GameData
|
||||
|
||||
def initialize(hash)
|
||||
@id = hash[:id]
|
||||
@real_name = hash[:name] || "Unnamed"
|
||||
@real_name = hash[:real_name] || "Unnamed"
|
||||
@gender = hash[:gender] || 2
|
||||
@base_money = hash[:base_money] || 30
|
||||
@skill_level = hash[:skill_level] || @base_money
|
||||
|
||||
@@ -17,17 +17,18 @@ module GameData
|
||||
DATA_FILENAME = "metadata.dat"
|
||||
|
||||
SCHEMA = {
|
||||
"StartMoney" => [1, "u"],
|
||||
"StartItemStorage" => [2, "*e", :Item],
|
||||
"Home" => [3, "vuuu"],
|
||||
"StorageCreator" => [4, "s"],
|
||||
"WildBattleBGM" => [5, "s"],
|
||||
"TrainerBattleBGM" => [6, "s"],
|
||||
"WildVictoryBGM" => [7, "s"],
|
||||
"TrainerVictoryBGM" => [8, "s"],
|
||||
"WildCaptureME" => [9, "s"],
|
||||
"SurfBGM" => [10, "s"],
|
||||
"BicycleBGM" => [11, "s"]
|
||||
"SectionName" => [:id, "u"],
|
||||
"StartMoney" => [:start_money, "u"],
|
||||
"StartItemStorage" => [:start_item_storage, "*e", :Item],
|
||||
"Home" => [:home, "vuuu"],
|
||||
"StorageCreator" => [:real_storage_creator, "s"],
|
||||
"WildBattleBGM" => [:wild_battle_BGM, "s"],
|
||||
"TrainerBattleBGM" => [:trainer_battle_BGM, "s"],
|
||||
"WildVictoryBGM" => [:wild_victory_BGM, "s"],
|
||||
"TrainerVictoryBGM" => [:trainer_victory_BGM, "s"],
|
||||
"WildCaptureME" => [:wild_capture_ME, "s"],
|
||||
"SurfBGM" => [:surf_BGM, "s"],
|
||||
"BicycleBGM" => [:bicycle_BGM, "s"]
|
||||
}
|
||||
|
||||
extend ClassMethodsIDNumbers
|
||||
@@ -55,10 +56,10 @@ module GameData
|
||||
|
||||
def initialize(hash)
|
||||
@id = hash[:id]
|
||||
@start_money = hash[:start_money] || 3000
|
||||
@start_money = hash[:start_money] || 3000
|
||||
@start_item_storage = hash[:start_item_storage] || []
|
||||
@home = hash[:home]
|
||||
@real_storage_creator = hash[:storage_creator]
|
||||
@real_storage_creator = hash[:real_storage_creator]
|
||||
@wild_battle_BGM = hash[:wild_battle_BGM]
|
||||
@trainer_battle_BGM = hash[:trainer_battle_BGM]
|
||||
@wild_victory_BGM = hash[:wild_victory_BGM]
|
||||
|
||||
@@ -9,15 +9,16 @@ module GameData
|
||||
DATA_FILENAME = "player_metadata.dat"
|
||||
|
||||
SCHEMA = {
|
||||
"TrainerType" => [1, "e", :TrainerType],
|
||||
"WalkCharset" => [2, "s"],
|
||||
"RunCharset" => [3, "s"],
|
||||
"CycleCharset" => [4, "s"],
|
||||
"SurfCharset" => [5, "s"],
|
||||
"DiveCharset" => [6, "s"],
|
||||
"FishCharset" => [7, "s"],
|
||||
"SurfFishCharset" => [8, "s"],
|
||||
"Home" => [9, "vuuu"]
|
||||
"SectionName" => [:id, "u"],
|
||||
"TrainerType" => [:trainer_type, "e", :TrainerType],
|
||||
"WalkCharset" => [:walk_charset, "s"],
|
||||
"RunCharset" => [:run_charset, "s"],
|
||||
"CycleCharset" => [:cycle_charset, "s"],
|
||||
"SurfCharset" => [:surf_charset, "s"],
|
||||
"DiveCharset" => [:dive_charset, "s"],
|
||||
"FishCharset" => [:fish_charset, "s"],
|
||||
"SurfFishCharset" => [:surf_fish_charset, "s"],
|
||||
"Home" => [:home, "vuuu"]
|
||||
}
|
||||
|
||||
extend ClassMethodsIDNumbers
|
||||
|
||||
@@ -28,28 +28,29 @@ module GameData
|
||||
DATA_FILENAME = "map_metadata.dat"
|
||||
|
||||
SCHEMA = {
|
||||
"Name" => [1, "s"],
|
||||
"Outdoor" => [2, "b"],
|
||||
"ShowArea" => [3, "b"],
|
||||
"Bicycle" => [4, "b"],
|
||||
"BicycleAlways" => [5, "b"],
|
||||
"HealingSpot" => [6, "vuu"],
|
||||
"Weather" => [7, "eu", :Weather],
|
||||
"MapPosition" => [8, "uuu"],
|
||||
"DiveMap" => [9, "v"],
|
||||
"DarkMap" => [10, "b"],
|
||||
"SafariMap" => [11, "b"],
|
||||
"SnapEdges" => [12, "b"],
|
||||
"Dungeon" => [13, "b"],
|
||||
"BattleBack" => [14, "s"],
|
||||
"WildBattleBGM" => [15, "s"],
|
||||
"TrainerBattleBGM" => [16, "s"],
|
||||
"WildVictoryBGM" => [17, "s"],
|
||||
"TrainerVictoryBGM" => [18, "s"],
|
||||
"WildCaptureME" => [19, "s"],
|
||||
"MapSize" => [20, "us"],
|
||||
"Environment" => [21, "e", :Environment],
|
||||
"Flags" => [22, "*s"]
|
||||
"SectionName" => [:id, "u"],
|
||||
"Name" => [:real_name, "s"],
|
||||
"Outdoor" => [:outdoor_map, "b"],
|
||||
"ShowArea" => [:announce_location, "b"],
|
||||
"Bicycle" => [:can_bicycle, "b"],
|
||||
"BicycleAlways" => [:always_bicycle, "b"],
|
||||
"HealingSpot" => [:teleport_destination, "vuu"],
|
||||
"Weather" => [:weather, "eu", :Weather],
|
||||
"MapPosition" => [:town_map_position, "uuu"],
|
||||
"DiveMap" => [:dive_map_id, "v"],
|
||||
"DarkMap" => [:dark_map, "b"],
|
||||
"SafariMap" => [:safari_map, "b"],
|
||||
"SnapEdges" => [:snap_edges, "b"],
|
||||
"Dungeon" => [:random_dungeon, "b"],
|
||||
"BattleBack" => [:battle_background, "s"],
|
||||
"WildBattleBGM" => [:wild_battle_BGM, "s"],
|
||||
"TrainerBattleBGM" => [:trainer_battle_BGM, "s"],
|
||||
"WildVictoryBGM" => [:wild_victory_BGM, "s"],
|
||||
"TrainerVictoryBGM" => [:trainer_victory_BGM, "s"],
|
||||
"WildCaptureME" => [:wild_capture_ME, "s"],
|
||||
"MapSize" => [:town_map_size, "us"],
|
||||
"Environment" => [:battle_environment, "e", :Environment],
|
||||
"Flags" => [:flags, "*s"]
|
||||
}
|
||||
|
||||
extend ClassMethodsIDNumbers
|
||||
@@ -84,7 +85,7 @@ module GameData
|
||||
|
||||
def initialize(hash)
|
||||
@id = hash[:id]
|
||||
@real_name = hash[:name]
|
||||
@real_name = hash[:real_name]
|
||||
@outdoor_map = hash[:outdoor_map]
|
||||
@announce_location = hash[:announce_location]
|
||||
@can_bicycle = hash[:can_bicycle]
|
||||
|
||||
@@ -15,8 +15,8 @@ module GameData
|
||||
DATA_FILENAME = "dungeon_tilesets.dat"
|
||||
|
||||
SCHEMA = {
|
||||
"Autotile" => [:autotile, "us"],
|
||||
"Tile" => [:tile, "us"],
|
||||
"Autotile" => [:autotile, "um"],
|
||||
"Tile" => [:tile, "um"],
|
||||
"SnapToLargeGrid" => [:snap_to_large_grid, "b"],
|
||||
"LargeVoidTiles" => [:large_void_tiles, "b"],
|
||||
"LargeWallTiles" => [:large_wall_tiles, "b"],
|
||||
@@ -56,7 +56,7 @@ module GameData
|
||||
[hash[:autotile], hash[:tile]].each_with_index do |array, i|
|
||||
array.each do |tile_info|
|
||||
next if !tile_info
|
||||
tile_type = tile_info[1].downcase.to_sym
|
||||
tile_type = tile_info[1]
|
||||
if tile_type == :walls
|
||||
if @double_walls
|
||||
if @large_wall_tiles
|
||||
|
||||
@@ -30,12 +30,13 @@ module GameData
|
||||
DATA_FILENAME = "dungeon_parameters.dat"
|
||||
|
||||
SCHEMA = {
|
||||
"SectionName" => [:id, "mV"],
|
||||
"DungeonSize" => [:dungeon_size, "vv"],
|
||||
"CellSize" => [:cell_size, "vv"],
|
||||
"MinRoomSize" => [:min_room_size, "vv"],
|
||||
"MaxRoomSize" => [:max_room_size, "vv"],
|
||||
"CorridorWidth" => [:corridor_width, "v"],
|
||||
"ShiftCorridors" => [:shift_corridors, "b"],
|
||||
"ShiftCorridors" => [:random_corridor_shift, "b"],
|
||||
"NodeLayout" => [:node_layout, "s"],
|
||||
"RoomLayout" => [:room_layout, "s"],
|
||||
"RoomChance" => [:room_chance, "v"],
|
||||
@@ -76,7 +77,7 @@ module GameData
|
||||
@room_max_width = (hash[:max_room_size]) ? hash[:max_room_size][0] : @cell_width - 1
|
||||
@room_max_height = (hash[:max_room_size]) ? hash[:max_room_size][1] : @cell_height - 1
|
||||
@corridor_width = hash[:corridor_width] || 2
|
||||
@random_corridor_shift = hash[:shift_corridors]
|
||||
@random_corridor_shift = hash[:random_corridor_shift]
|
||||
@node_layout = hash[:node_layout]&.downcase&.to_sym || :full
|
||||
@room_layout = hash[:room_layout]&.downcase&.to_sym || :full
|
||||
@room_chance = hash[:room_chance] || 70
|
||||
|
||||
Reference in New Issue
Block a user