From ab2a8d5fa90f3e0d7b7aa0474e9e590798ff7e5e Mon Sep 17 00:00:00 2001 From: Martin Michelsen Date: Sat, 5 Apr 2025 11:31:24 -0700 Subject: [PATCH] document item/level table format commands --- README.md | 1 + src/ItemNameIndex.cc | 14 -------------- src/Main.cc | 11 +++++++++-- 3 files changed, 10 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index cd6b8f18..90b3c7b6 100644 --- a/README.md +++ b/README.md @@ -760,6 +760,7 @@ There are several actions that don't fit well into the table above, which let yo * Format Episode 3 game data in a human-readable manner (`show-ep3-maps`, `show-ep3-cards`, `generate-ep3-cards-html`) * Format Blue Burst battle parameter files in a human-readable manner (`show-battle-params`) * Convert item data to a human-readable description, or vice versa (`describe-item`) +* Show the server's item and level tables (`show-item-tables`, `show-level-tables`) * Connect to another PSO server and pretend to be a client (`cat-client`) * Generate or describe DC serial numbers (`generate-dc-serial-number`, `inspect-dc-serial-number`) diff --git a/src/ItemNameIndex.cc b/src/ItemNameIndex.cc index 4b68d763..e3341ac8 100644 --- a/src/ItemNameIndex.cc +++ b/src/ItemNameIndex.cc @@ -886,20 +886,6 @@ void ItemNameIndex::print_table(FILE* stream) const { fprintf(stream, "\n"); } - fprintf(stream, "CLASS => F GF RF B GB RB Z GZ RZ GR DB JL ZL SH RY RS AT RV MG\n"); - for (size_t char_class = 0; char_class < 12; char_class++) { - fprintf(stream, "%9s =>", name_for_char_class(char_class)); - for (size_t tech_num = 0; tech_num < 0x13; tech_num++) { - uint8_t max_level = pmt->get_max_tech_level(char_class, tech_num) + 1; - if (max_level == 0x00) { - fprintf(stream, " "); - } else { - fprintf(stream, " %2hhu", max_level); - } - } - fprintf(stream, "\n"); - } - for (size_t table_index = 0; table_index < 8; table_index++) { static const char* names[11] = { "Monomate", "Dimate", "Trimate", "Monofluid", diff --git a/src/Main.cc b/src/Main.cc index b3cc1e18..aeaadf43 100644 --- a/src/Main.cc +++ b/src/Main.cc @@ -2301,7 +2301,10 @@ Action a_name_all_items( }); Action a_print_level_stats( - "print-level-stats", nullptr, +[](phosg::Arguments& args) { + "show-level-tables", "\ + show-level-tables\n\ + Print the level tables for each version in a semi-human-reatable format.\n", + +[](phosg::Arguments& args) { auto s = make_shared(get_config_filename(args)); s->load_config_early(); s->clear_file_caches(false); @@ -2388,7 +2391,11 @@ Action a_print_level_stats( }); Action a_print_item_parameter_tables( - "print-item-tables", nullptr, +[](phosg::Arguments& args) { + "show-item-tables", "\ + show-item-tables\n\ + Print the item parameter tables for each version in a semi-human-reatable\n\ + format.\n", + +[](phosg::Arguments& args) { auto s = make_shared(get_config_filename(args)); s->load_all(); for (Version v : ALL_VERSIONS) {