Reading data¶
In this tutorial, we will show you how to read data from the game’s ROM file using the Simple Data API.
Loading the ROM¶
First you will need to load in the ROM by creating a Rom object using the filepath where the ROM file is located.
For this it is recommended to use the North American version of the game.
import dqmj1_util as dqmj
rom = dqmj.Rom("my_roms_folder/your_DQMJ1_NA_ROM_here.nds")
Note
If you get a FileNotFoundError, double check that the filepath to your ROM file is correct.
Reading specific data types¶
Once you have a ROM loaded, you can read specific types of data from the game by accessing specific attributes of the Rom object.
Encounters¶
By accessing the encounters attribute, you can see information on each of the encounters in the game (enemy monster, gift monsters, starters, etc.).
>>> rom.encounters[1]
Encounter(species='Dr Snapped', species_id=318, skills=['Attack', 'Uncarnate', 'Kaboom', 'Disruptive Wave', 'Kazammle', 'Meditation'], skill_ids=[0, 100, 7, 171, 24, 181], item_drops=[], item_drop_item_ids=[], gold=0, exp=0, level=40, scout_chance=0, max_hp=4065, max_mp=255, attack=336, defense=154, agility=92, wisdom=256, skill_sets=[], skill_set_ids=[])
>>> rom.encounters[1].species
'Dr Snapped'
>>> rom.encounters[1].skills
['Attack', 'Uncarnate', 'Kaboom', 'Disruptive Wave', 'Kazammle', 'Meditation']
Skill sets¶
By accessing the skill_sets attribute, you can see information on each of the skill sets in the game (ex. Frizz & Bang, Dark Knight, Attack Boost Ⅲ).
>>> rom.skill_sets[0]
SkillSet(name='Frizz & Bang', can_upgrade=True, category=1, max_skill_points=50, rewards=[SkillSet.Reward(skill_point_requirement=3, skill='Frizz', skill_id=1, trait=None, trait_id=None), SkillSet.Reward(skill_point_requirement=8, skill='Flame Slash', skill_id=84, trait=None, trait_id=None), SkillSet.Reward(skill_point_requirement=15, skill='Bang', skill_id=5, trait=None, trait_id=None), SkillSet.Reward(skill_point_requirement=24, skill='Bomb Slash', skill_id=86, trait=None, trait_id=None), SkillSet.Reward(skill_point_requirement=36, skill='Frizzle', skill_id=2, trait=None, trait_id=None), SkillSet.Reward(skill_point_requirement=50, skill='Boom', skill_id=6, trait=None, trait_id=None), SkillSet.Reward(skill_point_requirement=50, skill=None, skill_id=None, trait=None, trait_id=None), SkillSet.Reward(skill_point_requirement=50, skill=None, skill_id=None, trait=None, trait_id=None), SkillSet.Reward(skill_point_requirement=50, skill=None, skill_id=None, trait=None, trait_id=None), SkillSet.Reward(skill_point_requirement=50, skill=None, skill_id=None, trait=None, trait_id=None)], species_learnt_by=[243, 201], species_learnt_by_ids=[])
>>> rom.skill_sets[0].name
'Frizz & Bang'
>>> rom.skill_sets[0].rewards[0]
SkillSet.Reward(skill_point_requirement=3, skill='Frizz', skill_id=1, trait=None, trait_id=None)