Add ABP requirement to menu
This commit is contained in:
parent
4460a4863c
commit
d1bb23b0f3
|
@ -26,7 +26,7 @@ tbl_charlevels_hp_base 0x115129 99 of u16
|
|||
tbl_charlevels_mp_base 0x1151EF 99 of u16
|
||||
ptrs_job_ability_lists 0x1152C0 21 of u16
|
||||
job_ability_counts 0x1152EA 22 of u8
|
||||
job_ability_lists 0x115300 length 0x12C - u16 ABP required, u8 ID.
|
||||
job_ability_lists 0x115300 length 0x12C - u16 ABP required, u8 ID. Pointers are from bank 0x110000 and start at $5300
|
||||
tbl_char_stat_bonuses 0x11551E 5 of 4 of u8
|
||||
tbl_job_base_stats 0x1156B0 22 of 4 of u8
|
||||
tbl_job_default_equipment 0x115708 22 of 4 of u8
|
||||
|
|
|
|
@ -57,6 +57,18 @@ func load_snes_rom(filename: String):
|
|||
snes_data[k0][k1] = s.get_value(buffer, [0, 0])
|
||||
else:
|
||||
snes_data[key] = s.get_value(buffer, [0, 0])
|
||||
snes_data['job_levels'] = []
|
||||
for job_id in 21:
|
||||
var ability_list_ptr: int = snes_data.ptrs_job_ability_lists[job_id]
|
||||
var num_abilities: int = snes_data.job_ability_counts[job_id]
|
||||
var ability_list := []
|
||||
buffer.seek(0x110000 + ability_list_ptr)
|
||||
for i in num_abilities:
|
||||
var abp_requirement: int = buffer.get_u16()
|
||||
var ability_learned: int = buffer.get_u8()
|
||||
ability_list.append({'ABP': abp_requirement, 'ability': ability_learned})
|
||||
snes_data.job_levels.append(ability_list)
|
||||
print(snes_data.job_levels)
|
||||
SpriteLoader.load_from_structs(snes_data)
|
||||
MapLoader.load_snes_rom(rom_snes)
|
||||
|
||||
|
|
|
@ -14,12 +14,15 @@ theme = ExtResource( 6 )
|
|||
script = ExtResource( 3 )
|
||||
|
||||
[node name="audio_system" parent="." instance=ExtResource( 5 )]
|
||||
visible = false
|
||||
position = Vector2( 0, 160 )
|
||||
|
||||
[node name="worldmap_system" parent="." instance=ExtResource( 2 )]
|
||||
visible = false
|
||||
position = Vector2( -600, -550 )
|
||||
|
||||
[node name="battle_sprites" parent="." instance=ExtResource( 4 )]
|
||||
visible = false
|
||||
|
||||
[node name="PartyMenu" parent="." instance=ExtResource( 1 )]
|
||||
visible = false
|
||||
margin_right = 320.0
|
||||
|
|
|
@ -16,8 +16,8 @@ func update_labels(data: Dictionary, i: int):
|
|||
$ref0/lbl_lv_cur.text = '%d' % c.level
|
||||
$ref1/lbl_job.text = StringLoader.tables.job_names[job]
|
||||
$ref1/lbl_abp_lv_cur.text = '%d-' % c.current_job_level
|
||||
$ref1/lbl_abp_progress.text = '%d/' % c.current_job_abp
|
||||
$ref1/lbl_abp_next.text = '%d' % c.current_job_abp # Revisit
|
||||
$ref1/lbl_abp_progress.text = '' if job == 21 else ('%d/' % c.current_job_abp)
|
||||
$ref1/lbl_abp_next.text = '' if job == 21 else ('%d' % RomLoader.snes_data.job_levels[job][c.current_job_level].ABP)
|
||||
$ref1/lbl_hp_cur.text = '%d/' % c.hp_current
|
||||
$ref1/lbl_hp_max.text = '%d' % c.hp_max
|
||||
$ref1/lbl_mp_cur.text = '%d/' % c.mp_current
|
||||
|
|
Loading…
Reference in New Issue