Merge pull request #327 from lhearachel/libnarc
Some checks failed
build / build (push) Has been cancelled

Replace knarc with libnarc
This commit is contained in:
Rachel 2025-01-03 13:14:30 -08:00 committed by GitHub
commit 568e212e4b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
33 changed files with 129 additions and 127 deletions

1
.gitignore vendored
View File

@ -17,6 +17,7 @@
/subprojects/constgen/
/subprojects/SDATTool/
/subprojects/knarc/
/subprojects/narc/
# CLion folders
.idea/

View File

@ -484,11 +484,11 @@ pl_waza_tbl_narc = custom_target('pl_waza_tbl.narc',
depends: [ py_consts_generators ],
command: [
movedata_py,
'--knarc', knarc_exe,
'--narc', narc_exe,
'--source-dir', '@CURRENT_SOURCE_DIR@',
'--private-dir', '@PRIVATE_DIR@',
'--output-dir', '@OUTDIR@',
]
)
nitrofs_files += pl_waza_tbl_narc
nitrofs_files += pl_waza_tbl_narc

View File

@ -22,9 +22,9 @@ be_seq_narc = custom_target(be_seq_target_name,
extra_args: ['--out-dir', be_seq_private_dir]
),
command: [
knarc_exe,
'-d', '@PRIVATE_DIR@',
'-p', '@OUTPUT@'
narc_exe, 'create',
'--output', '@OUTPUT@',
'@PRIVATE_DIR@',
]
)
@ -38,11 +38,11 @@ sub_seq_narc = custom_target(sub_seq_narc_name,
extra_args: ['--out-dir', sub_seq_private_dir]
),
command: [
knarc_exe,
'-d', '@PRIVATE_DIR@',
'-p', '@OUTPUT0@',
'-o', sub_seq_narc_order,
'-n'
narc_exe, 'create',
'--naix',
'--order', sub_seq_narc_order,
'--output', '@OUTPUT0@',
'@PRIVATE_DIR@',
]
)
@ -53,9 +53,9 @@ waza_seq_narc = custom_target(waza_seq_target_name,
extra_args: ['--out-dir', waza_seq_private_dir]
),
command: [
knarc_exe,
'-d', '@PRIVATE_DIR@',
'-p', '@OUTPUT@'
narc_exe, 'create',
'--output', '@OUTPUT@',
'@PRIVATE_DIR@',
]
)

View File

@ -200,10 +200,10 @@ pl_enc_tbl_narc = custom_target('pl_enc_data.narc',
],
depends: [ py_consts_generators ],
command: [
knarc_exe,
'-d', '@PRIVATE_DIR@',
'-p', '@OUTPUT@',
'-o', pl_enc_data_order,
narc_exe, 'create',
'--order', pl_enc_data_order,
'--output', '@OUTPUT@',
'@PRIVATE_DIR@',
]
)
@ -258,10 +258,10 @@ encdata_ex_narc = custom_target('encdata_ex.narc',
env: json2bin_env,
depends: [ py_consts_generators ],
command: [
knarc_exe,
'-d', '@PRIVATE_DIR@',
'-p', '@OUTPUT@',
'-o', encdata_ex_order,
narc_exe, 'create',
'--order', encdata_ex_order,
'--output', '@OUTPUT@',
'@PRIVATE_DIR@',
]
)
@ -278,7 +278,7 @@ pokedex_enc_platinum_narc = custom_target('zukan_enc_platinum.narc',
depends: [ py_consts_generators ],
command: [
make_pokedex_enc_platinum_py,
'--knarc', knarc_exe,
'--narc', narc_exe,
'--source-dir', '@CURRENT_SOURCE_DIR@',
'--private-dir', '@PRIVATE_DIR@',
'--output-dir', '@OUTDIR@',

View File

@ -550,11 +550,11 @@ events_narc = custom_target('zone_event.narc',
input: event_bin_gen.process(events_files, env: json2bin_env),
depends: [ py_consts_generators ],
command: [
knarc_exe,
'-d', '@PRIVATE_DIR@',
'-p', '@OUTPUT0@',
'--order', events_order,
narc_exe, 'create',
'--naix',
'--order', events_order,
'--output', '@OUTPUT0@',
'@PRIVATE_DIR@',
]
)

View File

@ -1143,11 +1143,11 @@ scr_seq_narc = custom_target('scr_seq.narc',
extra_args: ['--out-dir', scr_seq_private_dir]
),
command: [
knarc_exe,
'-d', '@PRIVATE_DIR@',
'-p', '@OUTPUT0@',
'-o', scr_seq_narc_order,
'-n'
narc_exe, 'create',
'--naix',
'--order', scr_seq_narc_order,
'--output', '@OUTPUT0@',
'@PRIVATE_DIR@',
],
depends: [
trdata_narc,

View File

@ -100,12 +100,12 @@ pl_font_narc = custom_target('pl_font.narc',
pl_font_ignore,
],
command: [
knarc_exe,
'-d', current_build_dir,
'-p', '@OUTPUT0@',
narc_exe, 'create',
'--naix',
'--order', pl_font_order,
'--ignore', pl_font_ignore,
'--naix',
'--output', '@OUTPUT0@',
'@OUTDIR@',
],
)

View File

@ -20,11 +20,11 @@ config_gra_narc = custom_target('config_gra.narc',
config_gra_order,
],
command: [
knarc_exe,
'-d', '@PRIVATE_DIR@',
'-p', '@OUTPUT0@',
'--order', config_gra_order,
narc_exe, 'create',
'--naix',
'--order', config_gra_order,
'--output', '@OUTPUT0@',
'@PRIVATE_DIR@',
]
)

View File

@ -227,11 +227,11 @@ pokemon_summary_screen_narc = custom_target('pl_pst_gra.narc',
pokemon_summary_screen_order,
],
command: [
knarc_exe,
'-d', '@PRIVATE_DIR@',
'-p', '@OUTPUT0@',
'--order', pokemon_summary_screen_order,
narc_exe, 'create',
'--naix',
'--order', pokemon_summary_screen_order,
'--output', '@OUTPUT0@',
'@PRIVATE_DIR@',
]
)

View File

@ -80,11 +80,11 @@ field_board_narc = custom_target('field_board.narc',
field_board_order,
],
command: [
knarc_exe,
'-d', '@PRIVATE_DIR@',
'-p', '@OUTPUT0@',
'--order', field_board_order,
narc_exe, 'create',
'--naix',
'--order', field_board_order,
'--output', '@OUTPUT0@',
'@PRIVATE_DIR@',
]
)

View File

@ -78,11 +78,11 @@ pl_winframe_narc = custom_target('pl_winframe.narc',
pl_winframe_order,
],
command: [
knarc_exe,
'-d', '@PRIVATE_DIR@',
'-p', '@OUTPUT0@',
'--order', pl_winframe_order,
narc_exe, 'create',
'--naix',
'--order', pl_winframe_order,
'--output', '@OUTPUT0@',
'@PRIVATE_DIR@',
]
)

View File

@ -628,7 +628,7 @@ wotbl_narc = custom_target('wotbl.narc',
depends: [ py_consts_generators ],
command: [
pokemon_wotbl_data_py,
'--knarc', knarc_exe,
'--narc', narc_exe,
'--source-dir', '@CURRENT_SOURCE_DIR@',
'--private-dir', '@PRIVATE_DIR@',
'--output-dir', '@OUTDIR@',
@ -642,7 +642,7 @@ pl_personal_narc = custom_target('pl_personal.narc',
depends: [ py_consts_generators ],
command: [
pokemon_personal_data_py,
'--knarc', knarc_exe,
'--narc', narc_exe,
'--source-dir', '@CURRENT_SOURCE_DIR@',
'--private-dir', '@PRIVATE_DIR@',
'--output-dir', '@OUTDIR@',
@ -656,7 +656,7 @@ evo_narc = custom_target('evo.narc',
depends: [ py_consts_generators ],
command: [
evo_py,
'--knarc', knarc_exe,
'--narc', narc_exe,
'--source-dir', '@CURRENT_SOURCE_DIR@',
'--private-dir', '@PRIVATE_DIR@',
'--output-dir', '@OUTDIR@',
@ -672,7 +672,7 @@ pl_poke_icon_narc = custom_target('pl_poke_icon.narc',
command: [
make_pl_poke_icon_py,
'--nitrogfx', nitrogfx_exe,
'--knarc', knarc_exe,
'--narc', narc_exe,
'--shared-dir', '@CURRENT_SOURCE_DIR@/.shared',
'--private-dir', '@PRIVATE_DIR@',
'--output-dir', '@OUTDIR@',
@ -686,7 +686,7 @@ pl_pokegra_narc = custom_target('pl_pokegra.narc',
command: [
make_pl_pokegra_py,
'--nitrogfx', nitrogfx_exe,
'--knarc', knarc_exe,
'--narc', narc_exe,
'--source-dir', '@CURRENT_SOURCE_DIR@',
'--private-dir', '@PRIVATE_DIR@',
'--output-dir', '@OUTDIR@',
@ -703,7 +703,7 @@ pl_otherpoke_narc = custom_target('pl_otherpoke.narc',
command: [
make_pl_otherpoke_py,
'--nitrogfx', nitrogfx_exe,
'--knarc', knarc_exe,
'--narc', narc_exe,
'--private-dir', '@PRIVATE_DIR@',
'--output-dir', '@OUTDIR@',
'--sprite-entries', '154',
@ -720,7 +720,7 @@ height_narc = custom_target('height.narc',
depends: [ py_consts_generators ],
command: [
make_height_py,
'--knarc', knarc_exe,
'--narc', narc_exe,
'--source-dir', '@CURRENT_SOURCE_DIR@',
'--private-dir', '@PRIVATE_DIR@',
'--output-dir', '@OUTDIR@',
@ -735,7 +735,7 @@ pl_poke_data_narc = custom_target('pl_poke_data.narc',
depends: [ py_consts_generators ],
command: [
pl_poke_data_py,
'--knarc', knarc_exe,
'--narc', narc_exe,
'--source-dir', '@CURRENT_SOURCE_DIR@',
'--private-dir', '@PRIVATE_DIR@',
'--output-dir', '@OUTDIR@',
@ -748,7 +748,7 @@ pl_pokezukan_narc = custom_target('pl_pokezukan.narc',
env: json2bin_env,
command: [
make_pl_pokezukan_py,
'--knarc', knarc_exe,
'--narc', narc_exe,
'--source-dir', '@CURRENT_SOURCE_DIR@',
'--private-dir', '@PRIVATE_DIR@',
'--output-dir', '@OUTDIR@',
@ -762,7 +762,7 @@ shinzukan_narc = custom_target('shinzukan.narc',
env: json2bin_env,
command: [
make_shinzukan_py,
'--knarc', knarc_exe,
'--narc', narc_exe,
'--source-dir', '@CURRENT_SOURCE_DIR@',
'--private-dir', '@PRIVATE_DIR@',
'--output-dir', '@OUTDIR@',
@ -775,7 +775,7 @@ pl_growtbl_narc = custom_target('pl_growtbl.narc',
input: pl_growtbl_files,
command: [
make_pl_growtbl_py,
'--knarc', knarc_exe,
'--narc', narc_exe,
'--source-dir', '@CURRENT_SOURCE_DIR@',
'--private-dir', '@PRIVATE_DIR@',
'--output-dir', '@OUTDIR@',
@ -795,7 +795,7 @@ pokedex_data_narc = custom_target('zukan_data.narc',
depends: [ py_consts_generators ],
command: [
make_pokedex_data_py,
'--knarc', knarc_exe,
'--narc', narc_exe,
'--source-dir', '@CURRENT_SOURCE_DIR@',
'--private-dir', '@PRIVATE_DIR@',
'--output-dir', '@OUTDIR@',
@ -811,7 +811,7 @@ pokedex_data_giratina_altered_narc = custom_target('zukan_data_gira.narc',
depends: [ py_consts_generators ],
command: [
make_pokedex_data_py,
'--knarc', knarc_exe,
'--narc', narc_exe,
'--source-dir', '@CURRENT_SOURCE_DIR@',
'--private-dir', '@PRIVATE_DIR@',
'--output-dir', '@OUTDIR@',

View File

@ -4,9 +4,9 @@ mmodel_narc = custom_target('mmodel.narc',
output: 'mmodel.narc',
input: mmodel_files_targets,
command: [
knarc_exe,
'-d', '@OUTDIR@/mmodel',
'-p', '@OUTPUT0@'
narc_exe, 'create',
'--output', '@OUTPUT0@',
'@OUTDIR@/mmodel',
]
)

View File

@ -773,11 +773,11 @@ message_banks_narc = custom_target('pl_msg.narc',
output: 'pl_msg.narc',
input: gmm_to_bin_gen.process(message_bank_files),
command: [
knarc_exe,
'-d', '@PRIVATE_DIR@',
'-p', '@OUTPUT0@',
'-o', message_banks_narc_order,
'-n'
narc_exe, 'create',
'--naix',
'--order', message_banks_narc_order,
'--output', '@OUTPUT0@',
'@PRIVATE_DIR@',
]
)

View File

@ -951,11 +951,12 @@ trdata_narc = custom_target('trdata.narc',
input: trainer_data_gen.process(trainer_data_files, env: json2bin_env),
depends: [ py_consts_generators ],
command: [
knarc_exe,
'-d', '@PRIVATE_DIR@',
'-p', '@OUTPUT0@',
narc_exe,
'create',
'--order', trainers_order,
'--output', '@OUTPUT0@',
'--naix',
'@PRIVATE_DIR@',
],
)
@ -967,11 +968,11 @@ trpoke_narc = custom_target('trpoke.narc',
input: trainer_party_gen.process(trainer_data_files, env: json2bin_env),
depends: [ py_consts_generators ],
command: [
knarc_exe,
'-d', '@PRIVATE_DIR@',
'-p', '@OUTPUT0@',
'--order', trainers_order,
narc_exe, 'create',
'--naix',
'--order', trainers_order,
'--output', '@OUTPUT0@',
'@PRIVATE_DIR@',
]
)

View File

@ -1,7 +0,0 @@
[wrap-git]
url = https://github.com/lhearachel/knarc.git
revision = 2.0
depth = 1
[provide]
program_names = knarc

8
subprojects/narc.wrap Normal file
View File

@ -0,0 +1,8 @@
[wrap-git]
url = https://github.com/lhearachel/narc.git
revision = v0.1.0
depth = 1
[provide]
program_names = narc
dependency_names = libnarc

View File

@ -129,4 +129,4 @@ j2b.json2bin(args.source_dir,
indexer,
glob_pattern='**/data.json',
narc_name='evo',
narc_packer=args.knarc)
narc_packer=args.narc)

View File

@ -14,7 +14,7 @@ ARGPARSER = ArgumentParser(
prog='json2bin.py',
description='Tool for converting a collection of JSON documents into\na NARC via a constructed parsing schema'
)
ARGPARSER.add_argument('--knarc', required=True,
ARGPARSER.add_argument('--narc', required=True,
help='Path to the knarc executable')
ARGPARSER.add_argument('--source-dir', required=True,
help='Source directory with subdirs for each data element')
@ -236,7 +236,7 @@ def json2bin(target: str,
_write(merged, 0, private_dir)
subprocess.run([
pathlib.Path(narc_packer),
'-d', private_dir,
'-p', output_dir / f'{narc_name}.narc'
pathlib.Path(narc_packer), 'create',
'--output', output_dir / f'{narc_name}.narc',
private_dir,
])

View File

@ -42,4 +42,4 @@ j2b.json2bin(args.source_dir,
indexer,
glob_pattern='**/data.json',
narc_name='pl_waza_tbl',
narc_packer=args.knarc)
narc_packer=args.narc)

View File

@ -52,6 +52,6 @@ j2b.json2bin(args.source_dir,
indexer,
glob_pattern='**/sprite_data.json',
narc_name='pl_poke_data',
narc_packer=args.knarc,
narc_packer=args.narc,
output_mode=j2b.OutputMode.SINGLE_FILE,
skip_stems=['forms'])

View File

@ -102,4 +102,4 @@ j2b.json2bin(args.source_dir,
indexer,
glob_pattern='**/data.json',
narc_name='pl_personal',
narc_packer=args.knarc)
narc_packer=args.narc)

View File

@ -81,4 +81,4 @@ j2b.json2bin(args.source_dir,
indexer,
glob_pattern='**/data.json',
narc_name='wotbl',
narc_packer=args.knarc)
narc_packer=args.narc)

View File

@ -19,6 +19,6 @@ arm_none_eabi_objcopy_exe = find_program('arm-none-eabi-objcopy', native: true)
# External tools
nitrogfx_exe = find_program('nitrogfx', native: true)
knarc_exe = find_program('knarc', native: true)
narc_exe = find_program('narc', native: true)
constgen_py = find_program('constgen_py', native: true)
SDATTool_py = find_program('SDATTool_py', native: true)

View File

@ -11,9 +11,9 @@ argparser = argparse.ArgumentParser(
prog='pl_poke_icon.narc packer',
description='Packs the archive containing Pokemon icons'
)
argparser.add_argument('-k', '--knarc',
argparser.add_argument('-n', '--narc',
required=True,
help='Path to knarc executable')
help='Path to narc executable')
argparser.add_argument('-s', '--source-dir',
required=True,
help='Path to the source directory (res/pokemon)')
@ -65,4 +65,4 @@ for i, subdir in enumerate(args.subdirs):
j += 1
subprocess.run([args.knarc, '-d', private_dir, '-p', output_dir / 'height.narc'])
subprocess.run([args.narc, 'create', '--output', output_dir / 'height.narc', private_dir])

View File

@ -9,9 +9,9 @@ argparser = argparse.ArgumentParser(
prog='make_pl_growtbl',
description='Packs the archive containing pokemon exp tables'
)
argparser.add_argument('-k', '--knarc',
argparser.add_argument('-', '--narc',
required=True,
help='Path to knarc executable')
help='Path to narc executable')
argparser.add_argument('-s', '--source-dir',
required=True,
help='Path to the source directory (res/pokemon)')
@ -48,4 +48,4 @@ with open(args.table) as data_file:
target_file.write(out)
count += 1
subprocess.run([args.knarc, '-d', private_dir, '-p', output_dir / 'pl_growtbl.narc'])
subprocess.run([args.narc, 'create', '--output', output_dir / 'pl_growtbl.narc', private_dir])

View File

@ -11,9 +11,9 @@ argparser = argparse.ArgumentParser(
argparser.add_argument('-n', '--nitrogfx',
required=True,
help='Path to nitrogfx executable')
argparser.add_argument('-k', '--knarc',
argparser.add_argument('-k', '--narc',
required=True,
help='Path to knarc executable')
help='Path to narc executable')
argparser.add_argument('-p', '--private-dir',
required=True,
help='Path to the private directory (where binaries will be made)')
@ -103,4 +103,4 @@ subprocess.run([
'-comp', '10'
])
subprocess.run([args.knarc, '-d', private_dir, '-p', output_dir / 'pl_otherpoke.narc'])
subprocess.run([args.narc, 'create', '--output', output_dir / 'pl_otherpoke.narc', private_dir])

View File

@ -2,7 +2,6 @@
import argparse
import pathlib
import shutil
import subprocess
argparser = argparse.ArgumentParser(
@ -12,9 +11,9 @@ argparser = argparse.ArgumentParser(
argparser.add_argument('-n', '--nitrogfx',
required=True,
help='Path to nitrogfx executable')
argparser.add_argument('-k', '--knarc',
argparser.add_argument('-k', '--narc',
required=True,
help='Path to knarc executable')
help='Path to narc executable')
argparser.add_argument('-s', '--shared-dir',
required=True,
help='Path to the .shared directory')
@ -56,4 +55,4 @@ for i, input_fname in enumerate(args.icon_files):
'-version101'
])
subprocess.run([args.knarc, '-d', bin_dest_dir, '-p', output_dir / 'pl_poke_icon.narc'])
subprocess.run([args.narc, 'create', '--output', output_dir / 'pl_poke_icon.narc', bin_dest_dir])

View File

@ -12,9 +12,9 @@ argparser = argparse.ArgumentParser(
argparser.add_argument('-n', '--nitrogfx',
required=True,
help='Path to nitrogfx executable')
argparser.add_argument('-k', '--knarc',
argparser.add_argument('-k', '--narc',
required=True,
help='Path to knarc executable')
help='Path to narc executable')
argparser.add_argument('-s', '--source-dir',
required=True,
help='Path to the source directory (res/pokemon)')
@ -83,4 +83,4 @@ for i, subdir in enumerate(args.subdirs):
'-comp', '10'
])
subprocess.run([args.knarc, '-d', private_dir, '-p', output_dir / 'pl_pokegra.narc'])
subprocess.run([args.narc, 'create', '--output', output_dir / 'pl_pokegra.narc', private_dir])

View File

@ -11,9 +11,9 @@ argparser = argparse.ArgumentParser(
prog='make_pl_pokezukan_py',
description='Packs the archive containing NatDex->SinnohDex number mapping'
)
argparser.add_argument('-k', '--knarc',
argparser.add_argument('-n', '--narc',
required=True,
help='Path to knarc executable')
help='Path to narc executable')
argparser.add_argument('-s', '--source-dir',
required=True,
help='Path to the source directory (res/pokemon)')
@ -42,7 +42,7 @@ with open(args.pokedex) as data_file:
for i, mon in enumerate(dex_data):
pokedex[PokemonSpecies[mon].value] = i
target_fname = private_dir / f'pl_pokezukan_0.bin'
target_fname = private_dir / 'pl_pokezukan_0.bin'
with open(target_fname, 'wb+') as target_file:
pl_pokezukan = [0 for i in range(NUM_POKEMON * 2)]
for i in range(NUM_POKEMON):
@ -50,4 +50,4 @@ with open(target_fname, 'wb+') as target_file:
pl_pokezukan[i*2 + 1] = (pokedex[i] >> 8) & 0xff
target_file.write(bytes(pl_pokezukan))
subprocess.run([args.knarc, '-d', private_dir, '-p', output_dir / 'pl_pokezukan.narc'])
subprocess.run([args.narc, 'create', '--output', output_dir / 'pl_pokezukan.narc', private_dir])

View File

@ -13,9 +13,9 @@ argparser = argparse.ArgumentParser(
prog='make_pokedex_data_py',
description='Packs the archive containing Pokedex sorting'
)
argparser.add_argument('-k', '--knarc',
argparser.add_argument('-n', '--narc',
required=True,
help='Path to knarc executable')
help='Path to narc executable')
argparser.add_argument('-s', '--source-dir',
required=True,
help='Path to the source directory (res/pokemon)')
@ -80,7 +80,7 @@ for i, file in enumerate(args.src_files):
if pk_name == 'giratina':
if args.giratina_form == 'giratina_origin':
pkdexdata = pkdexdata[0]
if args.giratina_form == 'giratina_altered':
else:
pkdexdata = pkdexdata[1]
for j in range(11):
@ -154,7 +154,7 @@ for idx in shortest:
# save data
if args.giratina_form == 'giratina_origin':
output_name = 'zukan_data'
if args.giratina_form == 'giratina_altered':
else:
output_name = 'zukan_data_gira'
numDigits = len(str(NUM_FILES))
@ -164,4 +164,4 @@ for i in range(NUM_FILES):
with open(target_fname, 'wb+') as target_file:
target_file.write(binData[i])
subprocess.run([args.knarc, '-d', private_dir, '-p', str(output_dir / output_name) + '.narc'])
subprocess.run([args.narc, 'create', '--output', str(output_dir / output_name) + '.narc', private_dir])

View File

@ -11,9 +11,9 @@ argparser = argparse.ArgumentParser(
prog='make_pokedex_enc_platinum_py',
description='Packs the archive containing Pokedex encounter data'
)
argparser.add_argument('-k', '--knarc',
argparser.add_argument('-n', '--narc',
required=True,
help='Path to knarc executable')
help='Path to narc executable')
argparser.add_argument('-s', '--source-dir',
required=True,
help='Path to the source directory (res/field/encounters)')
@ -438,4 +438,4 @@ for species in range(NUM_POKEMON):
with open(target_fname, 'wb+') as target_file:
target_file.write(bin_data)
subprocess.run([args.knarc, '-d', private_dir, '-p', str(output_dir / output_name) + '.narc'])
subprocess.run([args.narc, 'create', '--output', str(output_dir / output_name) + '.narc', private_dir])

View File

@ -11,7 +11,7 @@ argparser = argparse.ArgumentParser(
prog='make_shinzukan_py',
description='Packs the archive containing SinnohDex->NatDex number mapping'
)
argparser.add_argument('-k', '--knarc',
argparser.add_argument('-n', '--narc',
required=True,
help='Path to knarc executable')
argparser.add_argument('-s', '--source-dir',
@ -42,7 +42,7 @@ with open(args.pokedex) as data_file:
for i, mon in enumerate(dex_data):
pokedex[i] = PokemonSpecies[mon].value
target_fname = private_dir / f'shinzukan_0.bin'
target_fname = private_dir / 'shinzukan_0.bin'
with open(target_fname, 'wb+') as target_file:
shinzukan = [0 for i in range(NUM_SINNOH * 2)]
for i in range(NUM_SINNOH):
@ -50,4 +50,4 @@ with open(target_fname, 'wb+') as target_file:
shinzukan[i*2 + 1] = (pokedex[i] >> 8) & 0xff
target_file.write(bytes(shinzukan))
subprocess.run([args.knarc, '-d', private_dir, '-p', output_dir / 'shinzukan.narc'])
subprocess.run([args.narc, 'create', '--output', output_dir / 'shinzukan.narc', private_dir])