Compare commits

...

924 Commits

Author SHA1 Message Date
Martin Michelsen 2dc2f85b1a don't disconnect on duplicate EXP requests 2023-12-10 21:45:13 -08:00
Martin Michelsen 6ef5b59724 fix log level on ItemCreator 2023-12-10 21:31:51 -08:00
Martin Michelsen 2f32e8ab7d fix BB inventory desync when buying consumables from shop 2023-12-10 21:16:42 -08:00
Martin Michelsen 60c1aa71dc fix ToolV4 structure 2023-12-10 17:35:57 -08:00
Martin Michelsen a315f6d011 expand metadata comments in q058 2023-12-10 15:22:40 -08:00
Martin Michelsen a42594afd3 fix implicit signed conversion 2023-12-10 14:54:30 -08:00
Martin Michelsen 04445dabd0 fix default BB key config 2023-12-10 14:52:17 -08:00
Martin Michelsen 16cddd28b2 add quest script compiler 2023-12-10 14:24:30 -08:00
Martin Michelsen b53bde9046 expand comment on expand_rate 2023-12-10 09:16:59 -08:00
Martin Michelsen afd63ca1dd make ep2 quests have orange icon on non-BB versions 2023-12-09 19:21:31 -08:00
Martin Michelsen 8ae7696b51 fix $exit when v3 quests are loaded in ep3 games 2023-12-09 19:21:31 -08:00
Martin Michelsen 81d03738da enable $quest to load v3 quests on ep3 2023-12-09 19:10:54 -08:00
Martin Michelsen beb87b546f clean up map logging 2023-12-09 18:32:17 -08:00
Martin Michelsen 12572ed2d4 hide inventory/bank log messages if disabled in config.json 2023-12-09 10:56:58 -08:00
Martin Michelsen bb3d4ac847 disable $bank when character overlay is present 2023-12-09 10:38:48 -08:00
Martin Michelsen 0ded423c84 treat enemy type 0100 as NPC 2023-12-08 23:34:36 -08:00
Martin Michelsen 414ef0d825 don't send card search results if searcher is blocked 2023-12-08 23:34:32 -08:00
Martin Michelsen b54b32b461 reformat DAT constructor tables 2023-12-08 20:39:50 -08:00
Martin Michelsen 67e2428daa don't load Challenge map data on quest start 2023-12-08 20:22:04 -08:00
Martin Michelsen 8654555777 recreate map on challenge mode restart 2023-12-08 18:08:47 -08:00
Martin Michelsen 83166f1eff fix multi-area challenge enemy generation 2023-12-08 17:39:00 -08:00
Martin Michelsen fbf170ef12 fix slime enemy types 2023-12-08 17:38:42 -08:00
Martin Michelsen b7bc148e09 implement solo quest progression flags 2023-12-08 17:01:11 -08:00
Martin Michelsen 009a0fc93d fix Monest child_type 2023-12-08 10:02:36 -08:00
Martin Michelsen 5a98b48521 don't set floor if it's negative 2023-12-08 10:01:01 -08:00
Martin Michelsen bf17ec0943 add unknown enemy type 0118 2023-12-08 09:51:57 -08:00
Martin Michelsen e901f5e681 don't save licenses for replay sessions 2023-12-07 20:27:46 -08:00
Martin Michelsen 6136f8dfb3 implement $edit on v1/v2 2023-12-07 20:08:46 -08:00
Martin Michelsen 0c18656e03 update note about get_game_version 2023-12-07 17:05:26 -08:00
Martin Michelsen 317c9fd616 implement Simple Mail auto-reply when recipient is offline 2023-12-07 12:46:01 -08:00
Martin Michelsen 6d16f8095a factor ClientGameData into Client to reduce data duplication 2023-12-07 12:23:21 -08:00
Martin Michelsen 072ebe81bf add $savechar and $loadchar commands 2023-12-06 23:54:53 -08:00
Martin Michelsen 7db761f181 fix attribute upgrade in Gallon's Shop 2023-12-06 15:57:37 -08:00
Martin Michelsen 7211205e55 fix meseta and material import in $bbchar 2023-12-06 09:55:33 -08:00
Martin Michelsen 85d0bac5cb assign bank item IDs at game join time 2023-12-06 09:46:57 -08:00
Martin Michelsen 713327b0ae fix double language marker on BB 2023-12-05 23:31:16 -08:00
Martin Michelsen 0ce5210c22 add v4 ItemPT data 2023-12-05 23:31:16 -08:00
Martin Michelsen 4ccbb2f683 don't disconnect when no combinations apply 2023-12-05 23:31:16 -08:00
Martin Michelsen 3075370975 add $qcheck command 2023-12-05 23:31:16 -08:00
Matt Swift 9dfdbc624b Add fixed BB Gallon's Shop 2023-12-05 23:07:07 -08:00
Martin Michelsen 027956876d fix episode 3 tests 2023-12-04 22:40:07 -08:00
Martin Michelsen cd1cc43cb3 update to-do list 2023-12-04 22:40:07 -08:00
Martin Michelsen 77798e09be prevent player from joining game if a quest they don't have access to is in progress 2023-12-04 22:40:07 -08:00
Martin Michelsen da0ffea7e0 prevent player from joining game if a quest they don't have access to is in progress 2023-12-04 21:42:51 -08:00
Martin Michelsen 330dbecada rewrite $bbchar implementation 2023-12-04 19:38:42 -08:00
Martin Michelsen 2360beb77b sort bank contents before sending to client 2023-12-04 18:43:37 -08:00
Martin Michelsen 33bbb15bf0 fix stacked item bank deposit bug 2023-12-04 18:23:41 -08:00
Martin Michelsen c25569c688 implement shared bank 2023-12-04 16:59:03 -08:00
Martin Michelsen 01b83044dc cache loaded player files between sessions 2023-12-04 12:38:26 -08:00
Martin Michelsen e05dcb6e70 update rare enemy rates 2023-12-04 10:37:02 -08:00
Martin Michelsen 501a048af0 allow specifying minimum levels for difficulties 2023-12-03 23:35:38 -08:00
Martin Michelsen f605a21c1a add option to specify BB rare enemy rates 2023-12-03 21:44:56 -08:00
Martin Michelsen 8e1edbc34e update notes about DC prototypes 2023-12-03 21:44:56 -08:00
Martin Michelsen 83549fe8e4 update compatibility table 2023-12-03 16:59:05 -08:00
Martin Michelsen fbda7a2a48 fix GC NTE proxy behavior 2023-12-03 16:34:09 -08:00
Martin Michelsen b8d4ab589e update compatibility table 2023-12-03 00:06:32 -08:00
Martin Michelsen e49e159eee implement HDLC/PPP in IPStackSimulator 2023-12-03 00:06:32 -08:00
Martin Michelsen 0442f6e579 fix Ep3 card trade sequence 2023-12-02 18:24:07 -08:00
Martin Michelsen 3160d86eaa only use language from quest header if it's valid 2023-12-01 22:27:58 -08:00
Martin Michelsen 4cd82caa5f fix GC NTE episode number when creating games 2023-12-01 21:34:51 -08:00
Martin Michelsen d943364c29 use DC quest download semantics for GC NTE 2023-12-01 21:00:10 -08:00
Martin Michelsen cddd8007c7 fix 6x75 on GC NTE 2023-12-01 20:29:11 -08:00
Martin Michelsen 039786b2f8 handle GC NTE character data struct 2023-12-01 20:05:12 -08:00
Martin Michelsen 5de53391db disable rare mag evolution logic on v1/v2 2023-12-01 17:34:16 -08:00
Martin Michelsen 5f8e0bd6bd add XB voice chat command structs 2023-12-01 17:32:55 -08:00
Martin Michelsen 3e83669138 update to-do list 2023-12-01 17:32:45 -08:00
Martin Michelsen 5593dc0ecd add PSOBB connection instructions 2023-11-30 10:59:31 -08:00
Martin Michelsen 956e890ad6 use make_shared where appropriate 2023-11-30 10:24:27 -08:00
Martin Michelsen c833b575e4 fix item table reloading 2023-11-30 10:24:11 -08:00
Martin Michelsen 4b3be7eee3 add fallback for undecodable text in quest disassembler 2023-11-30 09:48:40 -08:00
Martin Michelsen f7b6f602cd update to-do list 2023-11-30 09:48:24 -08:00
Martin Michelsen 695f14e3fb implement 6xD8 subcommand 2023-11-30 09:48:12 -08:00
Martin Michelsen 77906b7a57 update example config 2023-11-29 22:51:02 -08:00
Martin Michelsen 14fc0996bd fix team reward keys on quests 2023-11-29 22:48:20 -08:00
Martin Michelsen 3743d0a156 implement quest unlock flags 2023-11-29 22:22:19 -08:00
Martin Michelsen 3d2d96eb7e fix BB bank withdraw conditions 2023-11-29 18:45:30 -08:00
Martin Michelsen ba8917e50d implement team item rewards 2023-11-29 18:28:54 -08:00
Martin Michelsen b09269eabc update to-do list 2023-11-29 17:19:48 -08:00
Martin Michelsen d1ce010d06 make user flag that allows cheating even if cheats are disabled 2023-11-29 17:19:37 -08:00
Martin Michelsen 1e3ca4111a add TODO item about F94D quest opcode 2023-11-29 16:45:02 -08:00
Martin Michelsen 6a052722c9 load V1 rare tables 2023-11-29 16:44:53 -08:00
Martin Michelsen acb9c656c5 implement 6xCB subcommand 2023-11-29 16:42:24 -08:00
Martin Michelsen f5ebf6fdcd fix comment in rare-table-v1.json 2023-11-29 12:55:36 -08:00
Martin Michelsen 9ea84d7101 implement most remaining BB team functions 2023-11-29 11:35:15 -08:00
Martin Michelsen 556360c993 implement choice search 2023-11-28 18:38:43 -08:00
Martin Michelsen 4008d7f4ff remove history/future sections from readme 2023-11-28 18:38:43 -08:00
Matt e47b72dd72 Add Chinese/Korean download quests for PCv2 2023-11-28 14:06:21 -08:00
Martin Michelsen 613d0c6d36 update windows build instructions 2023-11-27 22:54:42 -08:00
Martin Michelsen 2d8de65dd0 fix initial lobby position commands across NTE/proto boundary 2023-11-27 22:50:44 -08:00
Martin Michelsen 33ef130098 allow word select across NTE/proto boundary 2023-11-27 22:50:23 -08:00
Martin Michelsen 3370d9c940 allow symbol chats to cross 11/2000 version boundary 2023-11-27 22:09:38 -08:00
Martin Michelsen 2c24cce740 send 15EA commands upon request 2023-11-27 21:34:28 -08:00
Martin Michelsen 26685ab32c save team config when points are earned 2023-11-27 21:31:10 -08:00
Martin Michelsen 1a5e56c0b2 fix team metadata in lobbies 2023-11-27 21:30:59 -08:00
Martin Michelsen 8e2a58ccaa eliminate ServerBehavior::DATA_SERVER_BB 2023-11-27 21:30:41 -08:00
Martin Michelsen 5192b5f615 hide some unnecessary data from log output 2023-11-27 21:29:48 -08:00
Martin Michelsen 9e55cd228c fix quest opcode flags constants 2023-11-27 16:02:58 -08:00
Martin Michelsen 65417749b2 don't send text messages to 11/2000 clients 2023-11-27 15:58:56 -08:00
Martin Michelsen 9a0ce6c131 update compatibility table in readme 2023-11-27 14:41:10 -08:00
Martin Michelsen d86b41daab update quest disassembler for 11/2000 prototype 2023-11-27 14:40:59 -08:00
Martin Michelsen 0a522e6ac4 add support for 12/2000 DC prototype 2023-11-27 14:40:42 -08:00
Martin Michelsen f2c3d256f3 fix quest disassembler opcode flags 2023-11-27 11:49:24 -08:00
Martin Michelsen dfb1249efc add comment about 11/2000 symbol chat 2023-11-27 11:49:20 -08:00
Martin Michelsen 7feb11b6a7 fix notes in compatibility table 2023-11-27 00:32:12 -08:00
Martin Michelsen 20b66a7a58 improve support for 11/2000 prototype 2023-11-27 00:29:26 -08:00
Martin Michelsen 9b6a023d38 preserve original disp if client is v1 or v2 2023-11-26 22:37:26 -08:00
Martin Michelsen ea83935dc4 implement BB EXP requests properly 2023-11-26 16:21:09 -08:00
Martin Michelsen 654132b5d2 fix BB team chat 2023-11-26 16:18:51 -08:00
Martin Michelsen e484ad72e0 rewrite quest category menu system 2023-11-26 14:52:37 -08:00
Martin Michelsen 64ac199730 fix battle map reloading 2023-11-26 11:46:10 -08:00
Martin Michelsen f4e9b4c60a fix error message when CatchHandlerExceptions is off 2023-11-26 11:45:59 -08:00
Martin Michelsen a4039fa9cd update to-do list 2023-11-25 23:43:54 -08:00
Martin Michelsen 6af0527498 implement team points and member ranking 2023-11-25 23:12:09 -08:00
Martin Michelsen 1cd0092a41 use client's ignore_def value when it doesn't match server's 2023-11-25 22:15:08 -08:00
Martin Michelsen 62d4c65a7d fix help text formatting 2023-11-25 22:13:13 -08:00
Martin Michelsen 220259b093 fix BB quest map loading bug 2023-11-25 21:12:03 -08:00
Martin Michelsen 0f8d88bb58 remove debugging messages 2023-11-25 21:02:53 -08:00
Martin Michelsen 4a3716191b update compatibility notes in readme 2023-11-25 21:02:44 -08:00
Martin Michelsen 5c58c500c1 fix DCNTE smoke test 2023-11-25 19:37:28 -08:00
Martin Michelsen a3d677316a fix DC NTE game join sync commands 2023-11-25 19:35:09 -08:00
Martin Michelsen 0f45ced3e9 add DC NTE map variations 2023-11-25 19:23:25 -08:00
Martin Michelsen ccfdbf2faf use 6x1F instead of 6F to unlock DC NTE games 2023-11-25 16:53:05 -08:00
Martin Michelsen 9c403e9107 remove unneeded debug prints 2023-11-25 16:26:19 -08:00
Martin Michelsen 46c3a44b41 fix uninitialized memory bug in UTF16 encoder 2023-11-25 16:12:11 -08:00
Martin Michelsen bc82594a26 add debugging prints for failure that only happens in GH Actions 2023-11-25 15:54:36 -08:00
Martin Michelsen e3ce4edede fix 8-bit challenge rank encryption 2023-11-25 15:33:33 -08:00
Martin Michelsen 61c37d86c1 fix signedness issue on linux 2023-11-25 13:16:45 -08:00
Martin Michelsen ff12a9aaca fix AR code translator stub 2023-11-25 12:41:24 -08:00
Martin Michelsen b5dbf25254 fix bug that causes long char names to disappear on BB 2023-11-25 12:30:27 -08:00
Martin Michelsen 10e5dc4708 clear arrow color when changing lobbies 2023-11-25 12:30:27 -08:00
Martin Michelsen 1b499ab953 fix spacing in help message 2023-11-25 12:30:27 -08:00
Martin Michelsen 011eedb855 add extra languages on PC v2 2023-11-25 12:30:27 -08:00
Martin Michelsen 897cca83cf add ability to disassemble DC NTE quests 2023-11-25 12:30:27 -08:00
Martin Michelsen fe6e957c92 add DC and GC NTE smoke tests 2023-11-25 12:30:27 -08:00
Martin Michelsen de4cb26c34 refactor GameVersion and QuestScriptVersion into a single enum 2023-11-25 12:30:27 -08:00
Martin Michelsen 9097abf307 fix starting inventory on new BB chars 2023-11-25 12:30:27 -08:00
Matt 14a86610ed Add download quests for V1 and PC 2023-11-25 10:26:33 -08:00
Matt 9e34ce6f49 Add official download quests for DC 2023-11-24 17:56:37 -08:00
Matt 7f1846013d Add missing DC version of MU3 2023-11-24 14:03:19 -08:00
Martin Michelsen 05d6d495a5 work around Tethealla bug in proxy 2023-11-21 23:04:20 -08:00
Martin Michelsen 5991a5a894 rewrite unit generation logic to fix v2/bb behavior 2023-11-21 22:11:41 -08:00
Martin Michelsen b0c481ed62 fix xbox 64 command on schtserv 2023-11-21 20:27:25 -08:00
Martin Michelsen 3712574784 minor style adjustment 2023-11-21 17:09:31 -08:00
Martin Michelsen e738f7f089 update to-do list 2023-11-21 17:09:18 -08:00
Martin Michelsen 8eba207a6b add BFR1 BB key 2023-11-21 13:31:22 -08:00
Martin Michelsen 67ed70082c rewrite 6x6D bug comment 2023-11-21 11:51:06 -08:00
Martin Michelsen 35aa6fba01 fix area number for specialized box item drops 2023-11-21 11:38:24 -08:00
Martin Michelsen 267c2ca00b fix invalid tool class on v3/v4 2023-11-21 11:25:25 -08:00
Martin Michelsen 1d8ae0b4d9 use constructor tables from GC and BB client in map parsing 2023-11-20 23:43:40 -08:00
Martin Michelsen 30ad83fa67 fix incorrect team metadata command target 2023-11-20 17:13:10 -08:00
Martin Michelsen 11880ecc05 fix v2 challenge mode overlays 2023-11-20 17:12:58 -08:00
Martin Michelsen a62b7dad26 fix warning in Map.cc 2023-11-19 23:20:14 -08:00
Martin Michelsen f8280e5f97 fix 6xC6 format 2023-11-19 23:18:31 -08:00
Martin Michelsen c1bf5ebb43 completely reset item creator when a quest loads 2023-11-19 23:07:21 -08:00
Martin Michelsen d1866c9bbf fix Ep2 Sinow child entity handling 2023-11-19 23:06:53 -08:00
Martin Michelsen 42e927caa9 add basic quest map disassembler 2023-11-19 23:06:30 -08:00
Martin Michelsen cd4c06231f fix challenge overlay creation on non-BB versions 2023-11-19 21:42:37 -08:00
Martin Michelsen 4588a71e5a implement 6xD1 command for BB challenge mode 2023-11-19 21:41:51 -08:00
Martin Michelsen 9476a3fc27 show rare seed and variations at game join time if $debug is on 2023-11-19 16:02:01 -08:00
Martin Michelsen b03ccc7e3e fix bug that leaves units equipped after armor item is destroyed 2023-11-19 16:01:24 -08:00
Martin Michelsen bc4092fb75 clean up switch block in team command handler 2023-11-19 13:13:55 -08:00
Martin Michelsen 261cefc8b1 name the unknown grave field in PlayerRecords_Challenge 2023-11-19 13:13:37 -08:00
Martin Michelsen 34666ee220 add missing challenge mode restart commands 2023-11-19 12:38:34 -08:00
Martin Michelsen c918596850 update to-do list 2023-11-19 12:38:22 -08:00
Martin Michelsen 976610705a fix wrap item bug 2023-11-18 23:13:34 -08:00
Martin Michelsen 5758f8dba1 remove in-game enemy drop debug message 2023-11-18 23:13:34 -08:00
Martin Michelsen 8d83b941d0 add debug messages in tekker adjustment code 2023-11-18 23:13:34 -08:00
Martin Michelsen 7ab98f41da fix challenge overlays for non-leaders 2023-11-18 23:13:34 -08:00
Martin Michelsen 5499d29cc2 add AR code translator shell 2023-11-18 23:13:34 -08:00
Martin Michelsen dd5873266d update sub_version notes 2023-11-18 23:13:34 -08:00
Martin Michelsen c1e225847e initial implementation of BB teams (WIP) 2023-11-18 23:13:34 -08:00
Matt 99d1a3272a Add English versions of JP-only BB quests 2023-11-18 15:13:19 -08:00
Martin Michelsen d316d2e260 fix game menu entry flags on v1/v2 2023-11-16 23:37:33 -08:00
Martin Michelsen 2f99a3760a fix visual.version field 2023-11-16 23:27:24 -08:00
Martin Michelsen 6b1a3e615b fix UTF-16 decoding bug again 2023-11-16 23:22:51 -08:00
Martin Michelsen 132395a53a fix DC NTE lobby interactions 2023-11-16 23:22:26 -08:00
Martin Michelsen 9cbcd09be0 fix UTF-16 decoding bug 2023-11-16 21:02:00 -08:00
Martin Michelsen 35f48cbd8f fix default in 18EA struct 2023-11-16 21:01:42 -08:00
Martin Michelsen db6578d57c move color encoding functions to GVMEncoder header 2023-11-16 21:01:06 -08:00
Martin Michelsen 4a5ea63f4a update 6xAC notes 2023-11-16 15:44:00 -08:00
Martin Michelsen 27608d9c11 implement 6xE1 2023-11-16 15:43:53 -08:00
Martin Michelsen c84d4b134f add BB global EXP multiplier 2023-11-15 22:38:37 -08:00
Martin Michelsen 722010c0f7 add $save command 2023-11-15 22:38:36 -08:00
Martin Michelsen 82c651a3ad implement BB trade window 2023-11-15 22:38:36 -08:00
Martin Michelsen 5834a41cec update to-do list 2023-11-15 21:34:27 -08:00
Martin Michelsen f48b5ac8b2 update notes on 8A command 2023-11-15 20:57:09 -08:00
Martin Michelsen 1b29f20541 fix incorrect object lists in quest 2023-11-15 20:01:45 -08:00
Martin Michelsen b492a2fac6 handle rejected tekker results properly 2023-11-15 18:14:04 -08:00
Martin Michelsen c896c11f57 fix duplicate pick up disconnections on BB 2023-11-15 17:29:09 -08:00
Martin Michelsen 6aef245eab fix item ID inconsistencies between server and client due to shops and tekker in BB 2023-11-15 17:18:46 -08:00
Martin Michelsen 8ae6500fb5 add extra aliases for m&y in $item 2023-11-15 17:17:59 -08:00
Martin Michelsen 768bdb5b05 fix variance on specialized boxes 2023-11-15 16:02:31 -08:00
Martin Michelsen f997376819 fix equip slot check 2023-11-15 15:24:54 -08:00
Martin Michelsen 3d7b6837ec disable equip tracking in non-BB games 2023-11-15 14:41:13 -08:00
Martin Michelsen 533ee04443 fix join command queue bug 2023-11-15 13:33:34 -08:00
Martin Michelsen 6e1691d023 fix mag stat adjustments during level up 2023-11-15 12:47:24 -08:00
Martin Michelsen be6fd25190 implement proper equip/unequip tracking 2023-11-15 12:47:14 -08:00
Martin Michelsen ac57fb16a4 fix unit modifiers in $item command 2023-11-15 11:39:50 -08:00
Martin Michelsen 687a4515a2 fix bug that caused sorting inventory to delete extended tech levels 2023-11-15 11:34:53 -08:00
Martin Michelsen 0705b4d155 don't filter by episode at government counter 2023-11-15 00:03:21 -08:00
Martin Michelsen 2818b4ac2f clean up bit cast 2023-11-14 23:50:46 -08:00
Martin Michelsen ab5536d554 add more quest debugging commands 2023-11-14 23:27:40 -08:00
Martin Michelsen fbb053883b implement 6xDE command 2023-11-14 23:27:27 -08:00
Martin Michelsen d1161dd8e4 fix cheat mode check on proxy 2023-11-14 22:25:03 -08:00
Martin Michelsen 91b54b635d fix bug that caused boxes to never be empty 2023-11-14 21:52:38 -08:00
Martin Michelsen 2e89cfa8d6 use server's rt_index for enemy item drops 2023-11-14 21:52:38 -08:00
Martin Michelsen 62d484472f implement 6xE0 command 2023-11-14 21:52:38 -08:00
Martin Michelsen ba3016f89c filter non-download quests by episode 2023-11-14 21:52:38 -08:00
Martin Michelsen c5605c8685 fix some missing client ID bounds checks 2023-11-14 21:52:38 -08:00
Martin Michelsen 126e5944f4 refine 6x70 structure 2023-11-14 21:52:38 -08:00
Martin Michelsen 1531f4dad2 work around data race during game join 2023-11-14 21:52:38 -08:00
Martin Michelsen 82d0539c31 also blank name_color_checksum during $bbchar 2023-11-14 12:29:35 -08:00
Martin Michelsen 5c47385bee fix some $bbchar bugs 2023-11-14 12:25:19 -08:00
Martin Michelsen e3956a0a09 improve specialized box log messages 2023-11-14 12:24:59 -08:00
Martin Michelsen 6568ba7e32 unset x bit on everything in system/ 2023-11-13 22:18:22 -08:00
Martin Michelsen 4fe238a01a track specialized boxes server-side 2023-11-13 22:07:21 -08:00
Martin Michelsen 4b4627d3e5 fix material tracking bug 2023-11-13 22:06:49 -08:00
Martin Michelsen a1b457a5e6 make EXP computation match the client 2023-11-13 18:16:59 -08:00
Martin Michelsen 1ca0e928a4 rename area -> floor in most places 2023-11-13 17:25:16 -08:00
Martin Michelsen 8d4c9ca93a add Ep3 EU in handler-tables 2023-11-13 16:49:46 -08:00
Martin Michelsen 83b8f1a87c delete now-unused player data templates 2023-11-13 16:21:35 -08:00
Martin Michelsen 33a6e307e9 add support for v1 rare item tables 2023-11-13 16:18:20 -08:00
Martin Michelsen 08fbbd50ad fix various battle mode behaviors 2023-11-13 15:42:17 -08:00
Martin Michelsen c5f047dc0d don't check missing categories during quest indexing 2023-11-13 14:25:49 -08:00
Martin Michelsen d976452e00 update readme for new quest directory structure 2023-11-13 14:25:49 -08:00
Martin Michelsen cbe69c6ada fix pvr codepath in quest loading 2023-11-13 14:25:49 -08:00
Martin Michelsen 201676be5c fix REG32_SET_FIXED disassembly 2023-11-13 14:25:49 -08:00
Martin Michelsen 5e6a5355f5 fix load condition for non-BB clients 2023-11-13 14:00:59 -08:00
Martin Michelsen 18ddfa4ef4 use .psochar format for BB characters 2023-11-13 13:00:22 -08:00
Martin Michelsen f5bfd4a3c6 fix signed/unsigned comparison 2023-11-12 20:16:29 -08:00
Martin Michelsen 9c821b2988 organize quests directory by category 2023-11-12 16:30:03 -08:00
Martin Michelsen afba337575 clean up random enemy generation 2023-11-12 12:19:37 -08:00
Martin Michelsen 53451c2d45 add both Ep3 EU ports in config.json 2023-11-12 12:16:48 -08:00
Matt 884653d41c Fix Xbox symlink for q240 2023-11-12 12:14:47 -08:00
Matt 5304fff790 Fix incorrect names for Episode 2 Challenge J 2023-11-12 12:14:47 -08:00
Matt 4316afc137 Add Xbox login and lobby ports 2023-11-12 12:14:47 -08:00
Matt 616f8ad827 Add J versions of BB side story quests 2023-11-12 12:14:47 -08:00
Matt f0f9171acd Add various BB quests 2023-11-12 12:14:47 -08:00
Matt 049135bd2d test commit 2023-11-12 12:14:47 -08:00
Matt 4e68e6a48c Add J versions of Challenge/Battle 2023-11-12 00:26:00 -08:00
Matt 272e757315 Add various BB quests 2023-11-12 00:26:00 -08:00
Matt 768c07b99a test commit 2023-11-12 00:26:00 -08:00
Martin Michelsen 4de1495c31 fix categories on updated Ep3 maps 2023-11-12 00:12:32 -08:00
Martin Michelsen 7872fea6ab send rare enemy list again after loading a quest 2023-11-12 00:01:41 -08:00
Martin Michelsen d33709f4a2 make quests appear in the menu even if they don't exist in player's language 2023-11-12 00:01:41 -08:00
Martin Michelsen 43d7815165 fix some item-related debug messages 2023-11-12 00:01:41 -08:00
Martin Michelsen 3057c31d01 update notes on Ep3 EU 50Hz 2023-11-12 00:01:41 -08:00
Martin Michelsen cce42c4165 add $quest command for debugging 2023-11-12 00:01:41 -08:00
Martin Michelsen 3e735fcea4 implement BB challenge mode random enemy generation 2023-11-11 23:58:24 -08:00
Martin Michelsen 779d32d20f fix $matcount on v2 2023-11-11 22:32:10 -08:00
Martin Michelsen 1fa3d3a56d add other languages for Ep3 maps 2023-11-11 21:44:00 -08:00
Martin Michelsen b2a22522d2 unset x bit on ep3 maps 2023-11-11 21:39:49 -08:00
Martin Michelsen 4e93b2fc8b fix S-rank weapon name encoding/decoding 2023-11-11 15:45:59 -08:00
Martin Michelsen 90b7f0d0c0 add $ping command 2023-11-10 17:59:43 -08:00
Martin Michelsen a0f0230700 forbid rare enemies in challenge mode 2023-11-10 12:41:41 -08:00
Martin Michelsen a0505176ec get quest episode number from start function instead of header 2023-11-10 12:41:29 -08:00
Martin Michelsen 51ba23faa6 exempt solo-mode games from $debug client placement 2023-11-10 11:57:58 -08:00
Martin Michelsen d8e35b021f fix disconnect message when Quit Game is selected 2023-11-09 10:33:08 -08:00
Martin Michelsen a966696d9d fix used_chars_16 error message 2023-11-09 09:18:32 -08:00
Martin Michelsen 72d0047634 fix incorrect parray usage 2023-11-09 09:18:21 -08:00
Martin Michelsen cabd03a82e implement BB challenge param commands 2023-11-08 22:44:59 -08:00
Martin Michelsen 3ea65ccc75 fix missing 6x1B handler 2023-11-08 19:01:01 -08:00
Martin Michelsen 38c0d975cc fix missing 6xDC handler 2023-11-08 15:47:56 -08:00
Martin Michelsen 77799d1a37 add comment about 9F command timing 2023-11-08 15:47:43 -08:00
Martin Michelsen 7d0438f149 fix area_norm for Episode 4 2023-11-07 22:51:44 -08:00
Martin Michelsen c9a61afa62 fix BB $edit name 2023-11-07 22:51:27 -08:00
Martin Michelsen 2da235caf7 don't print BB character name language markers to terminal 2023-11-07 22:24:54 -08:00
Martin Michelsen aa577b4b63 fix HP/TP results in $matcount 2023-11-07 21:50:46 -08:00
Martin Michelsen af43756899 fix typo in comment 2023-11-07 18:51:52 -08:00
Martin Michelsen 696fb8377e re-record XB test 2023-11-07 18:01:09 -08:00
Martin Michelsen cb0e9ba0b2 fix ending proxy session on non-virtual connections 2023-11-07 17:53:31 -08:00
Martin Michelsen 01f3ed7bc6 fix some endianness differences on GC/XB 2023-11-07 17:53:31 -08:00
Martin Michelsen d46e6de4f0 fix xbox redirect command 2023-11-07 17:53:31 -08:00
Martin Michelsen 71cfced5ee add xbox support 2023-11-06 23:09:09 -08:00
Martin Michelsen 4b1f5420f2 save player stats on external level up 2023-11-06 23:09:09 -08:00
Martin Michelsen 0de169e474 fix overlay creation log message 2023-11-06 23:09:09 -08:00
Matt bc8010d704 Add info about setting DNS info to DC flash
Should probably ask Flycast to do this automatically with zero values.
2023-11-06 08:50:04 -08:00
Matt 05b5998a62 Update README.md 2023-11-06 08:50:04 -08:00
Matt 7a5a3deb4d Update Flycast instructions 2023-11-06 08:50:04 -08:00
Martin Michelsen f2e84dbf78 add logging for BB bank actions 2023-11-05 18:37:11 -08:00
Martin Michelsen f0cbb08742 show item price in encode-item action 2023-11-05 18:36:57 -08:00
Martin Michelsen 1deb5e0708 fix tech disk price computation 2023-11-05 18:36:40 -08:00
Martin Michelsen 5326c1d888 fix comment on Ep3 tournament command struct 2023-11-05 18:36:23 -08:00
Martin Michelsen 519565760f add to-do list for PSOX 2023-11-05 18:36:04 -08:00
Martin Michelsen d0dbffb364 add PSOX login port 2023-11-05 12:36:01 -08:00
Martin Michelsen 5957fd62e3 add missing include 2023-11-04 22:10:52 -07:00
Martin Michelsen e8d605afe3 implement v1-encoding for v2 items 2023-11-04 21:30:24 -07:00
Martin Michelsen 25c0aa21dc remove client ID check for externally-generated item IDs 2023-11-04 09:20:42 -07:00
Martin Michelsen b06bfc13b4 don't enforce grind limits on v1/v2 2023-11-03 23:42:44 -07:00
Martin Michelsen a7e478780e deal with invalid 6x59 commands 2023-11-03 23:10:07 -07:00
Martin Michelsen f63b4bd88b don't send blank 6x5F commands when items are skipped 2023-11-03 22:15:43 -07:00
Martin Michelsen cbfcbe16f9 fix $inftp text message 2023-11-03 21:23:00 -07:00
Martin Michelsen 6b812520bc refine ObjectEntry structure 2023-11-02 23:20:00 -07:00
Martin Michelsen f1b00d3ee0 fix unit modifiers in ItemData 2023-11-02 23:19:24 -07:00
Martin Michelsen 008e59b892 fix DC QST decoder 2023-11-02 14:26:06 -07:00
Martin Michelsen 482bc5fbad use client's language when generating download quests 2023-11-02 12:07:11 -07:00
Martin Michelsen 983c6e1ebc fix English language quest fallback in menu generation 2023-11-01 23:19:49 -07:00
Martin Michelsen 1888ab61d4 add ItemRT conversion action 2023-11-01 23:19:49 -07:00
nolrinale ef5350f69b Fixing redaction 2023-10-31 11:59:59 -07:00
nolrinale 5a518c9980 Adding PSOBB localization resources 2023-10-31 11:59:59 -07:00
Martin Michelsen d97db987cd fix BB joinable quest loading bug 2023-10-31 11:04:08 -07:00
Martin Michelsen 8c85868e08 add force English flag for Tethealla BB client 2023-10-31 11:00:54 -07:00
Martin Michelsen 9e682e7c13 add TODO about quest progress flags 2023-10-31 11:00:32 -07:00
Martin Michelsen 96e478192a fix missing value in name_for_enum<EnemyType> 2023-10-31 10:08:17 -07:00
Martin Michelsen 724186a8c0 make $edit level also set stats 2023-10-31 09:57:29 -07:00
Martin Michelsen 4158f4a42a don't double-clear destroyed entity set during quest load 2023-10-30 15:27:08 -07:00
Martin Michelsen 14e6111448 remove redirection feature 2023-10-30 15:19:41 -07:00
Martin Michelsen add46095c3 document BB 0101 command 2023-10-30 14:48:02 -07:00
Martin Michelsen 5e2e38f1b5 rewrite client config; use BB state from login command 2023-10-30 13:15:41 -07:00
Martin Michelsen 47198779b7 add more info to log prefixes 2023-10-29 18:29:34 -07:00
Martin Michelsen 5ff2694ded split information menu across v1+v2 / v3 2023-10-29 18:14:09 -07:00
Martin Michelsen 138c563a40 add v2 challenge templates 2023-10-29 18:01:47 -07:00
Martin Michelsen 5ec969ece3 ignore duplicate item pickup requests 2023-10-29 18:01:44 -07:00
Martin Michelsen 4e2e423a4b fix duplicate entity ids in ItemCreator; add decision logging 2023-10-29 15:28:23 -07:00
Martin Michelsen 632af03a3f fix unidentified flag logic on v2 2023-10-29 14:39:21 -07:00
Martin Michelsen 025fc154d4 refine some BB structures 2023-10-29 13:32:29 -07:00
Martin Michelsen 1ca3d3b27f fix Anti max level on v2 2023-10-29 13:32:29 -07:00
Martin Michelsen 1b839520c9 delete unused SJIS table 2023-10-29 13:32:29 -07:00
Martin Michelsen 293df2b73a fix license autocreation 2023-10-29 13:32:29 -07:00
Martin Michelsen c496abc2bf fix flags argument to add-license shell command 2023-10-28 16:52:56 -07:00
Martin Michelsen 45c2b792f7 fix range check bug in non-v4 ItemParameterTable 2023-10-28 14:50:31 -07:00
Martin Michelsen 50a594ec60 fix logic for EXP-stealing weapons 2023-10-28 13:23:32 -07:00
Martin Michelsen b5739fff68 annotate special name table with types/amounts 2023-10-28 13:23:16 -07:00
Martin Michelsen 2c6df68af3 fix unit table in v2/v3 ItemCreator 2023-10-28 13:23:00 -07:00
Martin Michelsen 8a1c4f5f8b PhysicalData and PlayerStats are the same structure 2023-10-28 10:45:59 -07:00
Martin Michelsen 87cae99326 add default values for all command structs 2023-10-28 10:29:37 -07:00
Martin Michelsen ef939075ef fix some text handling with DC NTE 2023-10-28 01:06:43 -07:00
Martin Michelsen a6a1647801 add missing include again 2023-10-28 00:16:59 -07:00
Martin Michelsen 3ebe7dd3e2 fix camera zone layout in ep3 map disassembly 2023-10-28 00:10:55 -07:00
Martin Michelsen cc1ce099e5 fix constexpr global 2023-10-28 00:10:55 -07:00
Martin Michelsen 62dde991df add missing include 2023-10-28 00:03:59 -07:00
Martin Michelsen 75c11aeba5 refine BattleParamEntry format 2023-10-27 23:58:34 -07:00
Martin Michelsen ed05a5f6ec convert schtserv rare table to json 2023-10-27 23:04:02 -07:00
Martin Michelsen 1c2786ef43 support v2 and v3 ItemPMT files 2023-10-27 21:08:34 -07:00
Martin Michelsen 7651922dc9 add notes about mag effect activation 2023-10-27 21:08:34 -07:00
Martin Michelsen 3a21cb29fd refine PlayerInventoryItem 2023-10-27 21:08:34 -07:00
Matt 005eeb3a3f Change HUcast and RAcast shorthand to the more commonly accepted standard 2023-10-27 12:37:22 -07:00
Martin Michelsen 582fd84f5e rewrite CommonItemSet to support v2 2023-10-26 17:40:26 -07:00
Martin Michelsen 067c28dee5 fix luck material usage on v2 2023-10-26 14:41:28 -07:00
Martin Michelsen 12fbdbbcdd restrict externally-generated item ID range further 2023-10-26 11:25:27 -07:00
Martin Michelsen 700b1497d6 don't use format_data_string to serialize non-English strings 2023-10-26 00:48:29 -07:00
Martin Michelsen 20d709686a require cheats to be allowed on the server for $rand and $secid commands 2023-10-26 00:24:27 -07:00
Martin Michelsen 5c2564336e fix unicode text set codec 2023-10-26 00:03:36 -07:00
nolrinale ee4dade7ad Adding Vanilla PSOBB Rare Item Drop Data Files 2023-10-25 20:20:55 -07:00
Martin Michelsen 7476eb62d3 allow server item tables to be enabled by default 2023-10-25 18:48:22 -07:00
Martin Michelsen 6466eec106 fix externally-generated item IDs in item tracking code 2023-10-25 17:14:04 -07:00
Martin Michelsen 5f0a6f3d8e factor FloorItem struct into 6x5F format 2023-10-25 17:14:04 -07:00
Martin Michelsen 5d251361b0 fix negative bonuses in item descriptions 2023-10-25 17:14:04 -07:00
Martin Michelsen 554edf6edf don't force personal cheat flags off when cheat mode is disabled in a game 2023-10-25 17:14:04 -07:00
Martin Michelsen 0c53a0dc41 rewrite text encoding to handle non-English properly 2023-10-25 17:14:04 -07:00
Matt 6b97c628ef Update DC Serial Generator instructions once again 2023-10-22 20:31:23 -07:00
Martin Michelsen 85125a5569 add override section ID name to confirmation message 2023-10-22 09:43:02 -07:00
Martin Michelsen 1a2be3ab11 update DC serial generator instructions again 2023-10-22 09:43:02 -07:00
Martin Michelsen c0740fd21f fix v2 visual checks again 2023-10-22 09:13:29 -07:00
Martin Michelsen d2d96d9c0a get client language from login command instead of player data 2023-10-22 08:55:09 -07:00
Martin Michelsen ba7a3fc4c6 move item tables to a separate directory 2023-10-21 22:48:27 -07:00
Martin Michelsen 8f2f7670b2 make $item disk:reverser work 2023-10-21 22:17:29 -07:00
Martin Michelsen c579e47354 fix exception handling in $patch command 2023-10-21 22:17:29 -07:00
Martin Michelsen c4790068ef fix cross-version lobby appearance and name colors 2023-10-21 22:01:38 -07:00
Martin Michelsen 7b035d311f fix identified item flag during item generation 2023-10-21 20:34:59 -07:00
Martin Michelsen 713e8ff7c1 fix android skin color change for v2 limits 2023-10-21 18:51:58 -07:00
Martin Michelsen 53ebd42612 add unitxt encode/decode actions 2023-10-21 16:40:19 -07:00
Martin Michelsen 81edf93e3b handle V2 mag encoding properly 2023-10-21 11:48:31 -07:00
Martin Michelsen 05d508230b remove unneeded include 2023-10-20 16:27:55 -07:00
Martin Michelsen 27734a6944 use correct ItemPT table in Challenge mode 2023-10-20 16:23:23 -07:00
Martin Michelsen bf346d3f95 fix Word Select mapping across versions 2023-10-20 16:19:03 -07:00
Martin Michelsen 6933a4338b fix early idle timeout in IP stack simulator 2023-10-19 23:16:16 -07:00
Martin Michelsen 08361ad597 add extract-afs command 2023-10-19 18:55:11 -07:00
Martin Michelsen fbefb1fb21 fix comment about enemy DAR 2023-10-19 18:43:08 -07:00
Matt 08dd67d894 Correct EU Episode III connection port 2023-10-19 18:28:35 -07:00
Martin Michelsen de0e56f37c fix EXP multiplier command 2023-10-19 17:24:16 -07:00
Martin Michelsen 57a5476ff8 remove some done items from to-do list 2023-10-19 15:54:46 -07:00
Martin Michelsen a211bd07ac implement 6xD2 command 2023-10-19 15:45:32 -07:00
Martin Michelsen 5a30272869 implement some BB quest commands 2023-10-19 15:34:06 -07:00
Martin Michelsen 4bc5f1b90f describe entire battle rules structure 2023-10-18 23:30:27 -07:00
Martin Michelsen c0c7bf9b16 fix incorrect game base_version setting 2023-10-18 21:15:45 -07:00
Martin Michelsen 6ec41a279e add more missing includes 2023-10-18 17:33:46 -07:00
Martin Michelsen 519933c44d add missing include 2023-10-18 17:27:14 -07:00
Martin Michelsen 9d0ba3a97b fix class replacement for v3/v2 compatibility 2023-10-18 17:22:26 -07:00
Martin Michelsen 2e36cebbcc implement redirect destinations 2023-10-18 17:22:07 -07:00
Martin Michelsen e8d8b94ffa implement character overlays for challenge mode 2023-10-18 17:16:51 -07:00
Martin Michelsen 8c2ce5210d implement battle rules and character replacement 2023-10-18 11:57:13 -07:00
Martin Michelsen 13dacc013a document CardDefinition and a few other things 2023-10-17 15:51:29 -07:00
Martin Michelsen 85ef84a6d5 fix wording in Ep3 card transformation comment 2023-10-17 10:24:11 -07:00
Martin Michelsen 08a1bf3238 implement server drop tables 2023-10-16 23:10:13 -07:00
Martin Michelsen d66c1f5de9 add ItemRT.afs decoder 2023-10-16 21:14:38 -07:00
Martin Michelsen ba09188b82 add TODO about Ep3 ranks 2023-10-16 19:37:38 -07:00
Martin Michelsen 0bb9718da3 add JSON rare table conversion 2023-10-16 19:37:29 -07:00
Martin Michelsen 04d92d93e5 don't show weapon percents if they're all zero 2023-10-16 19:36:39 -07:00
Martin Michelsen e2f72f3088 split Ep3 and Ep1&2 quest indexes 2023-10-16 17:54:04 -07:00
Martin Michelsen 22ceb2d1f7 fix cross-language quest loading 2023-10-16 11:43:06 -07:00
Martin Michelsen 112896bb34 add non-English versions of several GC quests 2023-10-16 11:34:11 -07:00
Martin Michelsen 5d71b66f84 implement quest version separation 2023-10-16 00:20:38 -07:00
Martin Michelsen 7005b573f5 add names to IPS listen sockets 2023-10-14 21:28:02 -07:00
Martin Michelsen 7d95efa803 don't warn for DHCP release commands 2023-10-13 10:07:43 -07:00
Martin Michelsen 0a3528b978 explicitly clear unused_bootp_legacy 2023-10-13 00:54:46 -07:00
Martin Michelsen 78698a0a89 implement DHCP in IPStackSimulator 2023-10-13 00:45:27 -07:00
Martin Michelsen 01033287f2 add AITalk.bin format notes 2023-10-13 00:37:32 -07:00
Martin Michelsen 1d8c78166d allow trap cards to be customized 2023-10-12 17:55:37 -07:00
Martin Michelsen 4e29f22655 rename Leader/Group function in Ep3 server 2023-10-12 11:46:33 -07:00
Martin Michelsen 31c0a35bb6 reorganize and expand save file tests 2023-10-12 10:57:47 -07:00
Martin Michelsen 9fd19d2676 name more fields in save structs 2023-10-12 10:55:42 -07:00
Martin Michelsen bb89bc9b7b document flags field in character save file struct 2023-10-10 23:53:56 -07:00
Martin Michelsen 76ad50886f add $matcount command 2023-10-10 23:53:33 -07:00
Martin Michelsen 8b1fab916d update some effect names and descriptions 2023-10-10 15:45:27 -07:00
Martin Michelsen 16bb320ed8 add yet another spectator metadata send 2023-10-10 15:14:20 -07:00
Martin Michelsen 453a05fb8c reformat comment 2023-10-10 11:50:33 -07:00
Martin Michelsen c33af99ae5 name some previously-unknown fields 2023-10-10 10:55:49 -07:00
Martin Michelsen 8ad27e9001 fix trial quest for downloading 2023-10-09 21:41:38 -07:00
Martin Michelsen 132daf2c0e retitle Pinz's Shop code appropriately 2023-10-09 20:53:36 -07:00
Martin Michelsen d39f1eb74c add Ep3 proxy option for infinite time 2023-10-09 18:51:19 -07:00
Martin Michelsen 9da756cc14 fix control characters in text-english.json 2023-10-09 18:39:54 -07:00
Martin Michelsen a693fcd48e update note on simple mail command 2023-10-09 18:06:15 -07:00
Martin Michelsen 462f4842aa add unused sound effects code 2023-10-09 18:05:53 -07:00
Martin Michelsen 99fff5baf2 add default dice text files 2023-10-09 11:07:18 -07:00
Martin Michelsen 40da9e5604 add TextDice to disassembly 2023-10-09 11:06:47 -07:00
Martin Michelsen 41c07a3da8 update format of cards.html and make generation faster 2023-10-09 10:00:00 -07:00
Martin Michelsen 9677d0fca4 add default text archive for ep3 card disassembly 2023-10-09 09:10:39 -07:00
Martin Michelsen a674721727 add text archive encoder/decoder 2023-10-08 23:00:18 -07:00
Martin Michelsen aa76631073 update some comments 2023-10-08 17:57:40 -07:00
Martin Michelsen 3902c64424 fix $spec in tournaments 2023-10-08 17:57:24 -07:00
Martin Michelsen 226140deb7 load correct version of quest in cross-play games 2023-10-08 15:45:42 -07:00
Martin Michelsen 812310054c fix 6x70 handling in dc/pc cross-play 2023-10-08 15:20:48 -07:00
Martin Michelsen 5673de78be fix up to-do list 2023-10-08 15:20:15 -07:00
Martin Michelsen 32af88cd9b undo accidental language tag change 2023-10-08 14:53:52 -07:00
Martin Michelsen 3bb8ac5c43 fix BB play_time handling with long char names 2023-10-08 14:50:32 -07:00
Martin Michelsen ea7f655408 implement Episode 3 download quest categories 2023-10-08 14:19:31 -07:00
Martin Michelsen 948985b057 describe card effect name_index field 2023-10-08 12:35:34 -07:00
Martin Michelsen 8df36ea3c2 index quests by number, then by version 2023-10-08 11:14:46 -07:00
Martin Michelsen e723e80171 fix show-ep3-maps 2023-10-08 09:25:01 -07:00
Martin Michelsen 29dd0caaab fix QST encoding issues 2023-10-08 09:15:19 -07:00
Martin Michelsen 30394e7120 consolidate args in quest disassembler 2023-10-07 22:38:51 -07:00
Martin Michelsen eee420f2e1 update to-do list 2023-10-07 21:51:02 -07:00
Martin Michelsen 065c11ac90 only show leader change if player notifs are on 2023-10-07 21:51:02 -07:00
Martin Michelsen 6bebcc841e implement overflow lobbies 2023-10-07 21:10:08 -07:00
Martin Michelsen c2b2239df0 bring back patch_flycast_memory.py 2023-10-07 21:10:08 -07:00
Martin Michelsen abd87054ac add cross-play options 2023-10-07 20:43:35 -07:00
Martin Michelsen 07b1e9cde3 enforce 6x command size limit 2023-10-07 18:22:58 -07:00
Martin Michelsen d5cc91a9bf handle inventory extension data properly 2023-10-07 18:17:54 -07:00
Martin Michelsen 9fd90ee324 update names used in Ep3 disassembly 2023-10-07 13:59:48 -07:00
Martin Michelsen 8a6a7fb47f update some command notes 2023-10-07 12:27:23 -07:00
Martin Michelsen f77e21800c fix QST encoder 2023-10-07 08:38:06 -07:00
Martin Michelsen 2478f18298 don't forward Ep3 server commands sent by clients 2023-10-07 08:38:06 -07:00
Martin Michelsen bb1c0f1d1a add shell server TODO 2023-10-07 08:38:06 -07:00
Matt 9cf53c85a2 pls work 2023-10-07 08:36:38 -07:00
Matt ab5d8e4522 Correct Readme spacing 2023-10-07 08:36:38 -07:00
Matt e4bb5bc28c Remove patch_flycast_memory.py 2023-10-07 08:36:38 -07:00
Matt 1cb0d5bcec Update Flycast connection instructions 2023-10-07 08:36:38 -07:00
Martin Michelsen 88d887a58a combine maps-free and maps-quest into one directory 2023-10-05 22:49:54 -07:00
Martin Michelsen 77f64d3496 document PC save encrypt/decrypt actions 2023-10-05 22:49:54 -07:00
Martin Michelsen cdb3943d9f rename and document DC serial number functions 2023-10-05 22:49:54 -07:00
Martin Michelsen 532bcab0b6 add debug messages for previously-unused CAx commands 2023-10-05 10:38:40 -07:00
Martin Michelsen ab3c27772e document more Ep3 battle subcommands 2023-10-05 10:28:34 -07:00
Martin Michelsen 682632f1c5 implement GBA file not found command 2023-10-05 10:28:04 -07:00
Martin Michelsen 6850bc0e06 update some command notes 2023-10-05 10:27:38 -07:00
Martin Michelsen 6368ebcd71 use spectator text field for something 2023-10-05 00:06:34 -07:00
Martin Michelsen a23dabd58e fix spectator count on joining a spectator team 2023-10-05 00:00:18 -07:00
Martin Michelsen da37fc1fee document spectator message in 6xB4x52 command 2023-10-05 00:00:18 -07:00
Martin Michelsen 15c08c0101 add more info to 6xB4x46 version messages 2023-10-05 00:00:18 -07:00
Martin Michelsen 7e84a5cb6a update some comments 2023-10-04 10:40:18 -07:00
Martin Michelsen 3c4019f705 add simulator AR code 2023-10-04 10:40:05 -07:00
Martin Michelsen 040356d365 fix silly gcc warning 2023-10-03 21:20:06 -07:00
Martin Michelsen f0c339e040 make tournament deck selection start at the same time for all players 2023-10-03 21:13:09 -07:00
Martin Michelsen 38aaffd4bd add TODO for DC/PC crossplay 2023-10-03 21:13:09 -07:00
Matt e81e60b543 Unhide VR category for V1/2 2023-10-03 19:40:06 -07:00
Martin Michelsen da48712449 absolve myself of some longstanding laziness 2023-10-03 19:35:39 -07:00
Martin Michelsen ceefe44b96 add some to-do items 2023-10-03 19:35:39 -07:00
Martin Michelsen bc22327361 add support for all DC versions 2023-10-03 17:58:24 -07:00
Martin Michelsen 37c4cbd8f3 undo battle table fast loading change 2023-10-02 16:58:14 -07:00
Martin Michelsen d90fc2a543 make encryption objects serializable 2023-10-01 22:44:56 -07:00
Martin Michelsen 2dca523a4b clean up comment about Ep3 reverse-engineering 2023-10-01 22:44:56 -07:00
Martin Michelsen 4aa156a322 only show recording messages if Ep3 debug messages are on 2023-10-01 19:27:59 -07:00
Martin Michelsen e9b6b681bd fix Ep3 spectator test 2023-10-01 15:51:53 -07:00
Martin Michelsen 8cf0b9f947 add initializer for SpectatorEntry::name_color 2023-10-01 08:55:08 -07:00
Martin Michelsen bbe42b765c fix spectators not seeing each other's names when joining spectator team 2023-10-01 08:45:13 -07:00
Martin Michelsen 507b2fbcac fix disconnect when viewing Ep3 team info with missing player 2023-10-01 07:52:38 -07:00
Martin Michelsen 5fe21b8eec add initializers to ClientConfig structs 2023-09-30 09:40:50 -07:00
Martin Michelsen d488ccd100 fix type in GVM entry struct 2023-09-30 00:45:28 -07:00
Martin Michelsen 403c17b42d show defeat status in tournament team info 2023-09-29 23:36:08 -07:00
Martin Michelsen a0ff0cf8e7 add some reloading TODOs 2023-09-29 19:00:34 -07:00
Martin Michelsen feded3e891 make tournament and battle table matches load faster 2023-09-29 19:00:25 -07:00
Martin Michelsen 74307ea7a2 maybe fix multiplayer tournament matches 2023-09-29 18:20:36 -07:00
Martin Michelsen 45ea21860d fix spectator list in game details display 2023-09-28 23:19:02 -07:00
Martin Michelsen 6a6fb91acb explain overall_time_limit more clearly 2023-09-28 15:44:18 -07:00
Martin Michelsen 8aaadf81ac update notes about before_message 2023-09-28 14:51:16 -07:00
Martin Michelsen 1f34b6bb90 add TODO for nonblocking reloads 2023-09-28 14:51:07 -07:00
Martin Michelsen fbdfdb085a add learnings from Ep3 Trial Edition download quest 2023-09-28 14:50:52 -07:00
Martin Michelsen 5c5da8e10b add converted Ep3 Trial Edition download quest 2023-09-28 14:46:24 -07:00
Martin Michelsen 103e5325a3 fix CAx1B client ID check 2023-09-27 10:51:18 -07:00
Martin Michelsen 02584e4458 add card list HTML generator 2023-09-27 10:00:33 -07:00
Martin Michelsen 263e9114c5 add TODO for detector encryption 2023-09-26 20:11:34 -07:00
Martin Michelsen fed50aec6b fix typo in readme 2023-09-26 20:11:21 -07:00
Martin Michelsen b9057cf562 add DC NTE UDP-off variants 2023-09-26 12:17:53 -07:00
Martin Michelsen 63f6aff4ed add decoder for Ep3 trial download quests 2023-09-26 12:12:41 -07:00
Martin Michelsen a4961ad69d fix DCv1 login with UDP off 2023-09-26 12:10:04 -07:00
Martin Michelsen f0bd2c7aa6 make incorrect password errors let you re-enter your password 2023-09-26 10:47:16 -07:00
Martin Michelsen ac13bf13b2 update readme 2023-09-26 10:46:57 -07:00
Martin Michelsen 98dc2af278 support decompressed card text archives 2023-09-26 10:46:46 -07:00
Martin Michelsen b7ceeb029a fix battle record loading 2023-09-25 22:37:44 -07:00
Martin Michelsen f036f137f7 fix some wording in example config 2023-09-25 22:28:55 -07:00
Martin Michelsen 187bfa1756 fix download quests on proxy server 2023-09-25 22:28:39 -07:00
Martin Michelsen 5e14a8449c add $meseta command 2023-09-25 21:42:36 -07:00
Martin Michelsen 65f8dea0da add $call command 2023-09-25 09:47:56 -07:00
Martin Michelsen 995a05c409 prefix battle record filenames with serial number 2023-09-25 09:26:48 -07:00
Martin Michelsen 885d125fc4 eliminate the concept of temporary licenses 2023-09-25 09:26:48 -07:00
Martin Michelsen 949ad0d260 fix minor isses in battle replays 2023-09-24 23:17:22 -07:00
Martin Michelsen 9272feff8f add json licenses to gitignore 2023-09-24 16:38:12 -07:00
Martin Michelsen 058b040975 implement Episode 3 meseta 2023-09-24 16:29:58 -07:00
Martin Michelsen 8b544830a0 delete unused enum 2023-09-24 16:29:58 -07:00
Martin Michelsen 0c2ecd4ebb save player names along with tournament entries and show them in info window 2023-09-24 16:29:58 -07:00
Martin Michelsen 6b5e672ebb move VMS structure into SaveFileFormats 2023-09-24 16:29:58 -07:00
Martin Michelsen 7f7aaf920b make reload config affect welcome message and information menu 2023-09-24 09:22:49 -07:00
Martin Michelsen 5c48c75fdc fix decode_sjis 2023-09-24 08:57:07 -07:00
Martin Michelsen 2846e73710 rewrite default information menu contents 2023-09-23 22:33:06 -07:00
Martin Michelsen 2ee1891153 fix PC system filename 2023-09-23 18:06:49 -07:00
Martin Michelsen cc70280761 add PC save file formats and encrypt/decrypt functions 2023-09-23 17:08:37 -07:00
Martin Michelsen 85897baaeb ignore client rules in tournament matches 2023-09-23 09:11:22 -07:00
Martin Michelsen 14973f7453 don't allow multiple simultaneous tournaments with the same name 2023-09-23 08:47:17 -07:00
Martin Michelsen fe984a4284 fix pending match state when loading in-progress tournament 2023-09-23 08:46:58 -07:00
Martin Michelsen 99b508a256 allow tournament matches to start at any battle table 2023-09-23 08:18:36 -07:00
Martin Michelsen 6e522459ae add ability to specify separate DEF dice range 2023-09-22 22:00:17 -07:00
Martin Michelsen be0e616df7 allow players to register for another tournament if they lose their current tournament 2023-09-22 18:11:05 -07:00
Martin Michelsen 1bf3e6869d fix dice option in create-tournament 2023-09-22 17:50:10 -07:00
Martin Michelsen 0df670893f fix log settings not applying to command data 2023-09-22 17:45:31 -07:00
Martin Michelsen de9d52b352 make card drop rate explanation easier to read 2023-09-22 10:58:19 -07:00
Martin Michelsen 3542200379 improve random loading sounds code 2023-09-21 22:43:12 -07:00
Martin Michelsen 82c877f55d document how card transformation works 2023-09-21 21:18:13 -07:00
Martin Michelsen 19499bf23d update notes about D3 rank 2023-09-21 21:14:52 -07:00
Martin Michelsen 4cf1895f4d enforce ep3 lobby restrictions during Meet User 2023-09-21 18:13:01 -07:00
Martin Michelsen aa25f7e79a make compression tests not fail when run in parallel 2023-09-21 17:08:18 -07:00
Martin Michelsen 93906f8ff3 default-clear all converted_endian parrays to zero 2023-09-21 17:07:58 -07:00
Martin Michelsen 931258e8ac fix uninitialized memory in E8 command 2023-09-21 10:39:02 -07:00
Martin Michelsen 5b907d4413 add Ep3 battle test with spectator 2023-09-21 10:22:00 -07:00
Martin Michelsen a8c7da70e0 fix patch ping event case 2023-09-20 23:11:24 -07:00
Martin Michelsen 3682c082ea fix some struct notes 2023-09-20 18:27:43 -07:00
Martin Michelsen de110a1c88 don't repeat ping and idle timeout events 2023-09-20 08:28:05 -07:00
Martin Michelsen 7e4664ea25 handle ping exceptions 2023-09-20 08:03:19 -07:00
Martin Michelsen 3d0a842496 don't allow *this to be destroyed too early on idle timeout 2023-09-19 23:40:31 -07:00
Martin Michelsen 64bbeb0f70 add $stat for live ep3 battle stats 2023-09-19 22:37:19 -07:00
Martin Michelsen 2eb429436f add parent pointers to eliminate code duplication in many places 2023-09-19 22:15:41 -07:00
Martin Michelsen adad870aff annotate more fields in PlayerConfig 2023-09-19 10:05:56 -07:00
Martin Michelsen ecaea3fe49 extend full dressing room codes 2023-09-19 10:05:56 -07:00
Martin Michelsen 4f16243e41 fix incorrect type in Ep3 PlayerConfig 2023-09-19 09:16:10 -07:00
Martin Michelsen 7706adc7cb document more fields in Ep3PlayerConfig 2023-09-19 00:11:13 -07:00
Martin Michelsen 3cf39887e8 add offset comments in CameraSpec 2023-09-18 13:39:26 -07:00
Martin Michelsen c65b012ea5 add full dressing room codes 2023-09-18 13:29:14 -07:00
Martin Michelsen ed97279436 add comment about snapshot format 2023-09-18 11:06:09 -07:00
Martin Michelsen 9cb9e8064a make Rules debug string show open cases 2023-09-18 10:22:22 -07:00
Martin Michelsen 80b9af46db write a bit more about AI params 2023-09-18 09:37:09 -07:00
Martin Michelsen 83ecbf77ab add information about Ep3 camera and AI data in map files 2023-09-18 00:20:49 -07:00
Martin Michelsen 8952a4d56b don't allow toggling spectator flag in a spectator team 2023-09-17 20:47:58 -07:00
Martin Michelsen 4575adea11 fix chat message forwarding to spectators 2023-09-17 19:20:18 -07:00
Martin Michelsen 9e8a59798c explain more about how card drops work 2023-09-17 16:27:34 -07:00
Martin Michelsen bb92feb9a5 add disable chat filter AR code 2023-09-17 16:22:51 -07:00
Martin Michelsen 72155939d5 don't send spectator join commands if battle is already finished 2023-09-17 12:49:18 -07:00
Martin Michelsen 3c1c63f24e make spectator joining more robust 2023-09-17 12:36:05 -07:00
Martin Michelsen ef7f5fb798 maybe fix spectator team map loading 2023-09-17 12:02:58 -07:00
Martin Michelsen 49be421ff4 add wchat shell command 2023-09-17 11:43:35 -07:00
Martin Michelsen e27bce9313 fix spectator count when joining an existing spectator team 2023-09-17 11:43:23 -07:00
Martin Michelsen fbe621173f use correct credentials in test 2023-09-17 10:36:49 -07:00
Martin Michelsen ae518eaaf6 fix accidentally-switched tables in drop rate explanation 2023-09-17 10:33:44 -07:00
Martin Michelsen e858b79b33 use latest official card definitions file 2023-09-17 10:26:13 -07:00
Martin Michelsen 04c34e1b22 update TODO.md 2023-09-17 10:04:46 -07:00
Martin Michelsen f799cfe87c add TODO.md 2023-09-16 11:51:00 -07:00
Martin Michelsen 24f3ddef40 add puyo_j 2023-09-16 11:51:00 -07:00
Martin Michelsen 30e1aacaf0 fix tournament commands on Ep3 trial edition 2023-09-16 10:22:25 -07:00
Martin Michelsen 4741091b9f fix client crash when creating spectator team 2023-09-16 10:00:36 -07:00
Martin Michelsen 4ddc4fce1d add shuffle and resize options in tournaments 2023-09-16 10:00:36 -07:00
Martin Michelsen 1d45c18ce8 keep tournament state consistent on clients 2023-09-16 10:00:36 -07:00
Martin Michelsen 5caa21bccb disband spectator teams when primary players go to results screen 2023-09-15 20:27:23 -07:00
Martin Michelsen 9cef4a14f8 add a tournament option to disable COM entries 2023-09-15 20:27:23 -07:00
Martin Michelsen 27081bd3da add comments for better searchability 2023-09-13 18:22:57 -07:00
Martin Michelsen 2115f188d1 minor formatting 2023-09-13 12:24:18 -07:00
Martin Michelsen bf55da55bf fix segfault on insufficient level for game creation 2023-09-12 20:33:39 -07:00
Martin Michelsen 550b62dec9 add cheat command to remove an FC in an Ep3 battle 2023-09-12 19:49:38 -07:00
Martin Michelsen 215c181798 add fallback map loading in BB solo mode 2023-09-12 19:49:38 -07:00
Martin Michelsen 2f663ef2b3 add missing BB maps 2023-09-12 19:49:38 -07:00
Martin Michelsen b07748d07f fix Madness not skipping HUNTERS_SC with items equipped 2023-09-12 17:54:57 -07:00
Martin Michelsen f708ecc035 strip trailing whitespace from card text 2023-09-12 17:31:11 -07:00
Martin Michelsen fb52047e7c revert card definitions file again 2023-09-12 14:59:27 -07:00
Martin Michelsen a8d09363f1 add Ep3 flag to allow interference for human teams 2023-09-12 14:53:16 -07:00
Martin Michelsen 15566f7143 fix chained action card conditions not applying 2023-09-12 10:30:33 -07:00
Martin Michelsen 7657d4f2fc update Ep3 BB command format 2023-09-11 17:24:13 -07:00
Martin Michelsen d843a54245 update comment on map_category 2023-09-11 12:33:25 -07:00
Martin Michelsen df013784fc document map_category field in MapDefinition 2023-09-11 11:24:57 -07:00
Martin Michelsen 1f6f76a6dc fix uninitialized value used in attack env stats computation 2023-09-10 22:06:24 -07:00
Martin Michelsen b885442a4b remove client ID checks during registration phase 2023-09-10 14:56:06 -07:00
Martin Michelsen e64fa10a58 fix Raspberry Pi build 2023-09-10 13:52:49 -07:00
Martin Michelsen 66ca3ed6dd update to-do list 2023-09-10 10:50:53 -07:00
Martin Michelsen 013e099f50 update to-do list 2023-09-10 10:25:04 -07:00
Martin Michelsen debc920997 update Dolphin connection instructions 2023-09-10 09:48:46 -07:00
Martin Michelsen 80f79aa13c fix name behavior on BB/GC lobby interactions 2023-09-10 09:27:56 -07:00
Martin Michelsen 7585eaeae5 name some unknown Ep3 enum values 2023-09-10 09:27:28 -07:00
Martin Michelsen 52ed062ed9 add comment on AssistFlag enum 2023-09-09 20:06:01 -07:00
Martin Michelsen 753b89c78d give names to assist_flags 2023-09-09 19:21:33 -07:00
Martin Michelsen fa48b58773 fix invalid array access 2023-09-09 17:55:28 -07:00
Martin Michelsen aa48dd5e15 delete hard_reset_flag 2023-09-09 17:55:06 -07:00
Martin Michelsen 0863c4f27c fix CPU replacement on player disconnect 2023-09-09 12:50:41 -07:00
Martin Michelsen f12fdaf165 bounds-check input client IDs 2023-09-09 12:48:12 -07:00
Martin Michelsen e890bfad63 fix multiple array index bugs 2023-09-09 12:48:08 -07:00
Martin Michelsen f8198580dd merge Ep3 ServerBase and Server into one class 2023-09-09 10:13:51 -07:00
Martin Michelsen a40d1ad851 add reload config shell command 2023-09-09 00:06:30 -07:00
Martin Michelsen 901b2b78d2 add missing include 2023-09-08 23:58:10 -07:00
Martin Michelsen 24439a9dc3 re-record Episode 3 battle test 2023-09-08 23:54:02 -07:00
Martin Michelsen 4498fe1232 rename ep3 game command handlers 2023-09-08 23:35:16 -07:00
Martin Michelsen b9fc225786 add Ep3 $inftime command 2023-09-08 23:32:47 -07:00
Martin Michelsen c430340c9d hide Ep3 maps that don't have enough player slots for the game 2023-09-08 23:32:47 -07:00
Martin Michelsen 9c3f764cd9 fix all-players range gathering bug 2023-09-08 23:32:47 -07:00
Martin Michelsen 9dcdece1f9 fix UNKNOWN_07 and NOT_SC condition codes 2023-09-08 20:09:49 -07:00
Martin Michelsen d663472aae delete some TODO items which are now done 2023-09-08 11:30:21 -07:00
Martin Michelsen 245ebd92c6 don't send Ep3 lobby banners again after ending a proxy session 2023-09-08 10:50:16 -07:00
Martin Michelsen c1ed1afa5b add more info about Ep3 lobby banners 2023-09-08 09:38:00 -07:00
Martin Michelsen 39e491eb1e split field in 6x70 command 2023-09-07 23:54:15 -07:00
Martin Michelsen 15b9c05004 add some more AR codes 2023-09-07 22:34:18 -07:00
Martin Michelsen cfa4e3b8b0 implement Episode 3 lobby banners 2023-09-07 22:34:07 -07:00
Martin Michelsen bd6102a894 add another loading screen AR code 2023-09-06 23:55:26 -07:00
Martin Michelsen c45b4cced7 fix rules not serializing properly in tournament state 2023-09-06 23:55:06 -07:00
Martin Michelsen 548aca8cc0 fix Ep3 card auction 2023-09-06 16:39:32 -07:00
Martin Michelsen 75fab887e1 make tournament state parsing more robust 2023-09-06 09:46:33 -07:00
Martin Michelsen d2a589d968 update MapDefinition comments 2023-09-06 09:46:16 -07:00
Martin Michelsen 71d3d4e27c add offline maps and quests 2023-09-05 23:21:36 -07:00
Martin Michelsen 74ff094012 Revert "increase read timeout during log replay"
This reverts commit bbab6968d1.
2023-09-05 23:18:03 -07:00
Martin Michelsen bbab6968d1 increase read timeout during log replay 2023-09-05 23:07:18 -07:00
Martin Michelsen af781dbc09 re-record Episode 3 battle test 2023-09-05 23:00:30 -07:00
Martin Michelsen f771643880 fix rounding in division expressions 2023-09-05 23:00:30 -07:00
Martin Michelsen 2b2d8dfb3d make Episode 3 EX results configurable 2023-09-05 23:00:30 -07:00
Martin Michelsen 66f584d475 fix condition apply using incorrect criterion for non-item checks 2023-09-05 23:00:30 -07:00
Martin Michelsen 3b69d3484d bring back the $ln command 2023-09-05 23:00:30 -07:00
Matt 013a19885f Update Tournament Explainer
Explains which 4-player battle table to use more clearly
2023-09-04 17:58:52 -07:00
Matt 3a7277bc5d Update README for tournament table location
To make it less ambiguous
2023-09-04 17:58:52 -07:00
Martin Michelsen 9f943cf5d8 add $surrender command 2023-09-03 22:44:36 -07:00
Martin Michelsen c3edb93248 fix tests after name marker update 2023-09-03 22:08:07 -07:00
Martin Michelsen 5712ff3e3e fix long name truncation on non-BB versions 2023-09-03 21:33:00 -07:00
Martin Michelsen 2cb2dd3b24 fix creature summon are computation on left/right-oriented maps 2023-09-03 21:25:33 -07:00
Martin Michelsen da431cc174 add details about Ep3 rank text 2023-09-02 10:10:14 -07:00
Martin Michelsen 7c6a1e730e fix fields in Ep3 card definitions footer struct 2023-09-02 08:46:19 -07:00
Martin Michelsen 85dbea215b document Ep3 assist AI parameters 2023-09-01 20:37:54 -07:00
Martin Michelsen 8449a6d21a describe how ep3 card drop rates actually work 2023-09-01 11:08:23 -07:00
Martin Michelsen 2eda283f8f revert accidentally-committed card defs file 2023-08-31 14:03:05 -07:00
Martin Michelsen ba7951a9f4 make CardAuctionPool name matching more lenient 2023-08-31 14:00:02 -07:00
Martin Michelsen e566a247e4 fix card names in example config auction pool 2023-08-31 13:36:05 -07:00
Martin Michelsen 5b038364a1 be more aggressive when reducing size of card defs file 2023-08-31 13:35:02 -07:00
Martin Michelsen ee7c574fdf fix meseta transaction command 2023-08-31 09:37:12 -07:00
Martin Michelsen 02b0bf622c fix error in example config 2023-08-30 18:59:34 -07:00
Martin Michelsen 39d1b338b7 make CardAuctionPool not required 2023-08-30 18:55:24 -07:00
Martin Michelsen b27b458557 always send tournament entry state command if client doesn't have card defs 2023-08-30 18:55:15 -07:00
Martin Michelsen f642e2f5a8 fix invisible players in lobby bug 2023-08-30 18:45:46 -07:00
Martin Michelsen 50ded155ed add option to disable Ep3 infinite meseta 2023-08-30 18:45:46 -07:00
Martin Michelsen eab453413e fix tournament metadata linking through server restarts 2023-08-30 18:45:46 -07:00
Martin Michelsen 2304a17dd0 use new JSON helpers 2023-08-30 18:45:36 -07:00
Martin Michelsen be4837cccf set AllowUnregisteredUsers to true by default 2023-08-30 11:21:55 -07:00
Martin Michelsen 2235103efe resolve auction card IDs at load time 2023-08-28 22:18:17 -07:00
Martin Michelsen 466eb49c55 use new phosg JSON interface 2023-08-28 22:18:05 -07:00
Martin Michelsen a842880123 update comments in config.example.json 2023-08-26 21:34:13 -07:00
Martin Michelsen 897ff4c9ff fix inefficiency in prs_compress_indexed 2023-08-26 21:00:16 -07:00
Martin Michelsen d93866146a make DOLFileIndex support both compressed and uncompressed files simultaneously 2023-08-26 21:00:01 -07:00
Martin Michelsen 1d0c0088d6 add notes from GameJam demo 2023-08-24 23:16:59 -07:00
Martin Michelsen 99a8ab3a21 support big-endian pr2 files 2023-08-22 12:05:27 -07:00
Martin Michelsen c944c7bca0 make archive output filenames more reasonable 2023-08-22 12:05:27 -07:00
Martin Michelsen 39330bc6f2 sort DOL files in Programs menu 2023-08-21 13:35:04 -07:00
Martin Michelsen 300d3cd825 fix some edge-case bugs in ep3 server 2023-08-20 20:42:13 -07:00
Martin Michelsen 8adbe38617 fix differentiation between Episode 3 Trial Edition and final JP version 2023-08-20 13:03:43 -07:00
Martin Michelsen dd5ef0c8a4 add unusable SC card IDs in comments 2023-08-20 09:26:28 -07:00
Martin Michelsen 27b368c2fb update comments in Editors patch 2023-08-18 22:20:36 -07:00
Martin Michelsen 107ffb0997 add decks from ep3 debug menu 2023-08-18 11:54:02 -07:00
Martin Michelsen 36186578f8 add $ep3battledebug command 2023-08-18 09:02:21 -07:00
Martin Michelsen 52b21f8b88 remove unneeded check in generate_weapon_shop_contents 2023-08-16 09:49:13 -07:00
Martin Michelsen b9912ad80f remove meseta when buying shop items 2023-08-16 09:12:45 -07:00
Martin Michelsen 666464dd06 add PSO GC snapshot decoder 2023-08-15 22:12:49 -07:00
Martin Michelsen c0f4f7af5f add Ep3 trial map format 2023-08-15 09:03:10 -07:00
Martin Michelsen 102fe92c3a add note about Ep3 trial B8 command 2023-08-14 11:32:54 -07:00
Martin Michelsen 87118049ab split Episode3::DataIndex into multiple structures 2023-08-13 23:12:27 -07:00
Martin Michelsen 7e55719983 split IS_TRIAL_EDITION into three flags and recognize Ep3 Trial Edition 2023-08-13 19:30:58 -07:00
Martin Michelsen 9b66e07c06 don't send tournament state to Ep3 trial edition clients 2023-08-13 19:11:17 -07:00
Martin Michelsen f657012d8e update comment about TEffIndirectEditor 2023-08-11 18:39:08 -07:00
Martin Michelsen 1f674b9c34 remove debugging prints 2023-08-10 21:28:41 -07:00
Martin Michelsen 6192270040 add default JudgeItem file 2023-08-10 21:12:28 -07:00
Martin Michelsen 2574c74e6b implement tekker variances 2023-08-10 21:06:02 -07:00
Martin Michelsen 0ea3993103 minor optimizations in ItemCreator 2023-08-10 21:05:27 -07:00
Martin Michelsen 2cd1038468 write ItemParameterTable::get_special 2023-08-10 21:04:25 -07:00
Martin Michelsen c7c2d54183 minor style fixes 2023-08-10 21:03:58 -07:00
Martin Michelsen c57b031156 rename 6xB8 command on BB 2023-08-10 21:02:18 -07:00
Martin Michelsen 6d4430da13 remove unused card rank name 2023-08-08 19:02:19 -07:00
Martin Michelsen 7d37a58e6e add comment about Ep3 D1 and D2 card ranks 2023-08-08 10:55:22 -07:00
Martin Michelsen a3f3608f76 make prs_compress_optimal faster 2023-08-06 17:36:56 -07:00
Martin Michelsen f13609c02b fix Ep3 test for new card defs 2023-08-05 12:04:29 -07:00
Martin Michelsen d2b2e1f978 recompress PRS files in system with --optimal 2023-08-05 11:29:21 -07:00
Martin Michelsen 825cd1fcb7 add action to recompress a PRS file optimally 2023-08-05 11:24:47 -07:00
Martin Michelsen 48a6dae50c fix catch by value 2023-08-04 22:51:41 -07:00
Martin Michelsen 911b17df7e improve ep3 data formatting 2023-08-04 22:40:18 -07:00
Martin Michelsen 308c58e761 fix comment on card drop rate field 2023-08-03 12:22:16 -07:00
Martin Michelsen 6c69828f1a restrict GBA quest opcodes to GC game versions 2023-07-27 17:58:35 -07:00
Martin Michelsen 194f7b6275 add encode-qst action 2023-07-22 16:03:58 -07:00
Martin Michelsen 132b8b071f add position comments to ep3 structs 2023-07-22 11:08:06 -07:00
Martin Michelsen f563d5d873 split XB quest file header struct 2023-07-17 09:05:39 -07:00
Martin Michelsen 668c9f9457 add some extra proxy options 2023-07-15 22:52:06 -07:00
Martin Michelsen 8cd1106818 add some PSOX notes 2023-07-15 22:29:39 -07:00
Martin Michelsen 4858ccd812 use QuestScriptVersion to index quests 2023-07-15 22:29:18 -07:00
Martin Michelsen 64e637dbfb add PSOX quest opcodes to handler-tables 2023-07-15 22:26:57 -07:00
Martin Michelsen 419d3500bd add DC NTE and GC NTE quest disassembly 2023-07-15 14:18:33 -07:00
Martin Michelsen 0d9bfa966d add DC NTE and GC NTE quest opcode handlers 2023-07-15 12:14:50 -07:00
Martin Michelsen acba5c670f update quest F8C3 name 2023-07-15 11:06:47 -07:00
Martin Michelsen 73a68911e8 document challenge mode time encoding 2023-07-09 21:04:36 -07:00
Martin Michelsen b1531139c0 implement player records command 2023-07-09 17:08:37 -07:00
Martin Michelsen 7dd00c75a9 write battle/challenge records structures 2023-07-09 10:43:35 -07:00
Martin Michelsen 4284d163d8 don't disassemble unknown labels as raw data 2023-07-07 11:31:49 -07:00
Martin Michelsen ba5aad0296 add offsets in disassembled structs 2023-07-07 11:31:34 -07:00
Martin Michelsen ea60cfb507 add npc_action_string data formatting 2023-07-07 11:31:20 -07:00
Martin Michelsen b6052620be add info about GBA quest opcodes 2023-07-07 09:23:46 -07:00
Martin Michelsen 0df83632d0 rename product_is_valid to product_is_valid_slow 2023-07-07 09:23:46 -07:00
Martin Michelsen b8f7d8f554 require --seed when encrypting trivial data 2023-07-07 09:23:46 -07:00
Martin Michelsen 01d0203de6 rewrite help text 2023-07-07 09:23:46 -07:00
Martin Michelsen 97daebdf83 add option to require item descriptions instead of data 2023-07-07 09:23:46 -07:00
Martin Michelsen acfa708332 unify compression progress_fns 2023-07-06 20:55:01 -07:00
Martin Michelsen 3e22d31c42 update some quest opcode comments 2023-07-04 14:29:12 -07:00
Martin Michelsen d2d1ae723d support disassembling uncompressed quests 2023-07-04 14:28:58 -07:00
Martin Michelsen e34c9856ec add more opcode names 2023-07-04 13:52:32 -07:00
Martin Michelsen ff9305144b fix quest opcode float args 2023-07-04 11:57:32 -07:00
Martin Michelsen 12c4e66cc2 replace bit_cast with as_type 2023-07-04 11:32:15 -07:00
Martin Michelsen 1c9239bade use bit_cast instead of reinterpret_cast 2023-07-04 11:20:40 -07:00
Martin Michelsen 80ae6ecac8 add stack argument disassembly in quest script 2023-07-04 11:11:36 -07:00
Martin Michelsen 90f1df105b update quest opcode descriptions 2023-07-04 09:09:37 -07:00
Martin Michelsen a409ee696c update quest opcode table; disassemble structures in data labels 2023-07-02 23:46:46 -07:00
Martin Michelsen 81049d2765 add some notes files 2023-07-01 22:56:27 -07:00
Martin Michelsen a81793f695 use JSON rare table for BB 2023-07-01 22:45:49 -07:00
Martin Michelsen 9916fb946d update quest opcode table 2023-07-01 18:23:43 -07:00
Martin Michelsen 4442ca0250 support JSON rare item sets 2023-06-29 22:20:39 -07:00
Martin Michelsen b324173d8e add pr2 compression and decompression 2023-06-29 22:20:00 -07:00
Martin Michelsen b5635f50f8 fix weird formatting in ItemCreator 2023-06-29 22:19:08 -07:00
Martin Michelsen a8e7caa0b3 fix comment in compression 2023-06-29 22:18:53 -07:00
Martin Michelsen de14d61835 fix empty-set case in quest disassembly 2023-06-27 11:12:23 -07:00
Martin Michelsen 9acb542689 make quest disassemble robust against invalid inputs 2023-06-27 00:27:04 -07:00
Martin Michelsen af56b6d2c6 describe how extension data works 2023-06-27 00:26:47 -07:00
Martin Michelsen aced59ea7a use default valuse for CharacterStats 2023-06-27 00:25:19 -07:00
Martin Michelsen 42c5c496dc fix tech level description bug 2023-06-27 00:25:03 -07:00
Martin Michelsen cd367fe5bd remove unneeded template parameter 2023-06-27 00:24:50 -07:00
Martin Michelsen 160cf24642 add TODO about extension data in inventories 2023-06-27 00:23:57 -07:00
Martin Michelsen 8656222be3 split disp data into stats and visual substructures 2023-06-26 21:25:24 -07:00
Martin Michelsen e1b4bd32c9 add quest script disassembler 2023-06-25 22:51:09 -07:00
Martin Michelsen fcc43e24c5 don't test optimal compression; it's too slow 2023-06-25 22:51:09 -07:00
Martin Michelsen 12f8e44cb4 update 6xD0 command note 2023-06-25 22:18:48 -07:00
Martin Michelsen 4793b072ae update some documentation 2023-06-25 22:18:48 -07:00
Martin Michelsen 4190a9e03d add more BB game command formats 2023-06-24 09:04:29 -07:00
Martin Michelsen 9602773021 handle unsealable items on BB 2023-06-23 17:32:10 -07:00
Martin Michelsen d6f8fb8917 add EXP multipliers 2023-06-23 17:16:50 -07:00
Martin Michelsen fba31bfc8d do some long-standing TODOs 2023-06-23 17:08:40 -07:00
Martin Michelsen 8b4f353182 simplify bc0_compress a bit 2023-06-23 11:58:28 -07:00
Martin Michelsen a3a1396e6c remove some debugging prints 2023-06-23 11:15:21 -07:00
Martin Michelsen fd4138c7cc make LZSSInterleavedWriter not a template 2023-06-22 21:26:18 -07:00
Martin Michelsen 476e22b368 write optimal prs and bc0 compressors 2023-06-22 21:22:18 -07:00
Martin Michelsen 40ed4c9c9a don't use SIZE_T_MAX macro 2023-06-21 21:41:14 -07:00
Martin Michelsen 13c061323c rewrite bc0_compress 2023-06-21 21:37:03 -07:00
Martin Michelsen 16bfaf8910 fix wrapped descriptions for units and tools 2023-06-21 14:28:45 -07:00
Martin Michelsen 4bbb31b0c6 support partial mag levels in ItemData description + parser 2023-06-21 10:19:53 -07:00
Martin Michelsen cbe6480da6 add debug note after rebuilding 6x6D data 2023-06-20 09:25:14 -07:00
Martin Michelsen 63538088d2 fix generating blank mags by description 2023-06-20 09:24:44 -07:00
Martin Michelsen 0d3da65ca7 add some BB team command notes 2023-06-20 09:24:30 -07:00
Martin Michelsen d65615da16 fix bc0_compress early memo search 2023-06-20 09:22:57 -07:00
Martin Michelsen d7b1e66f88 fix error message 2023-06-19 22:54:31 -07:00
Martin Michelsen 912fec458f don't send 6xBE if 6xC9 requests nothing 2023-06-19 19:32:58 -07:00
Martin Michelsen 5c9242a156 fix 6xC9 command format 2023-06-19 19:32:20 -07:00
Martin Michelsen 15954c9576 fix signed/unsigned comparison in map parser 2023-06-19 19:26:24 -07:00
Martin Michelsen 52e6dafad1 update some command notes 2023-06-19 19:20:40 -07:00
Martin Michelsen 5842d70094 implement meseta/item reward commands on BB 2023-06-19 19:20:40 -07:00
Martin Michelsen 9a6c0b6c9a load quest enemies when starting BB quest 2023-06-19 19:20:40 -07:00
Martin Michelsen 8db058871f implement BB rare monster determination 2023-06-19 18:33:05 -07:00
Martin Michelsen 26dc50930b handle joinable quests 2023-06-19 18:29:54 -07:00
Martin Michelsen 6468af6eb7 fix $item with names that are also specials 2023-06-19 16:03:59 -07:00
Martin Michelsen e8fcf2884a add TODOs for BB rare monsters 2023-06-19 16:03:59 -07:00
Martin Michelsen 8926c22eae handle incorrect mag endianness in PSO GC 2023-06-19 15:52:59 -07:00
Martin Michelsen 46dd11fab0 update chat command descriptions in readme 2023-06-19 12:15:19 -07:00
Martin Michelsen 2b3cc6bcdf fix map loading mismatches 2023-06-19 12:07:03 -07:00
Martin Michelsen 2de37a4733 add EnemyType enum 2023-06-18 22:58:24 -07:00
Martin Michelsen 10dfd8aa5c move BattleParamsIndex to a separate file 2023-06-18 22:58:24 -07:00
Martin Michelsen 1291de4387 improve player position tracking 2023-06-18 22:58:24 -07:00
Martin Michelsen d7bb3b3576 implement Ep3 spectator sound forwarding 2023-06-18 22:58:24 -07:00
Martin Michelsen 24c5ad1d06 handle multiple subcommands in one top-level command 2023-06-18 22:58:24 -07:00
Martin Michelsen dcbfeebc37 change exception type when no item is equipped 2023-06-18 22:58:24 -07:00
Martin Michelsen bcaa2a493e update map loader 2023-06-18 22:58:24 -07:00
Martin Michelsen f2f8d64d44 remove some debug messages 2023-06-18 22:58:24 -07:00
Martin Michelsen 7ac7d7c360 implement JSON rare tables 2023-06-18 22:58:24 -07:00
Martin Michelsen 9995f9cca8 update subcommand format notes 2023-06-18 22:58:24 -07:00
Martin Michelsen 10ab688207 allow creating items by name instead of by data 2023-06-18 22:58:24 -07:00
Martin Michelsen f333a88aaf clean up check_size 2023-06-18 22:58:24 -07:00
Martin Michelsen aead8aae71 fix alignment in CMakeLists 2023-06-18 22:39:56 -07:00
Martin Michelsen 3226efab1e implement general form of drop item request 2023-06-17 21:43:34 -07:00
Martin Michelsen 036049a13f add encrypt-trivial-data 2023-06-15 11:45:53 -07:00
Martin Michelsen 5ebf73779c update config documentation 2023-06-14 17:09:11 -07:00
Martin Michelsen bfe8391cc9 update some debug messages 2023-06-14 09:11:44 -07:00
Martin Michelsen 4904c356f7 update TODOs in readme 2023-06-13 21:52:09 -07:00
Martin Michelsen 71ebf01b0b implement BB item usage and mag feeding 2023-06-13 21:52:09 -07:00
Martin Michelsen 1a72f7c90a fix some item names 2023-06-13 21:52:09 -07:00
Martin Michelsen 6224479d76 fix $exit area tracking bug 2023-06-13 21:52:09 -07:00
Martin Michelsen e18c3fc43d add default cheat mode behavior flag 2023-06-13 21:52:09 -07:00
Martin Michelsen 276284cd39 update quest state TODO item 2023-06-13 21:52:09 -07:00
Martin Michelsen 8c183a6f0c implement warpme/warpall commands 2023-06-13 21:52:09 -07:00
Jake Probst 8c6ccd1cfe only disable drops for normal mode 2023-06-11 14:19:12 -07:00
Jake Probst 47f07bbc51 clarifying comments 2023-06-11 14:19:12 -07:00
Jake Probst c053d87a6c small clarifying comment 2023-06-11 14:19:12 -07:00
Jake Probst 9f78790e14 formatting 2023-06-11 14:19:12 -07:00
Reason 148d327d9f Fixing more formatting
A few ugly things to fix

Format fix v2
2023-06-11 14:19:12 -07:00
Reason 53a9b527e4 Fixing item toggle
Now the toggle is set via per room.
2023-06-11 14:19:12 -07:00
Reason 3ef2f76705 Fixing code style
Cleaning up this code.
2023-06-11 14:19:12 -07:00
Reason 95346118f0 Toggle drops.
Through txt command in-game, or through the config file.

White space fix.

Forgot this part.
2023-06-11 14:19:12 -07:00
Martin Michelsen a963c3316c make drop_item less confusing 2023-06-11 12:21:01 -07:00
Martin Michelsen 0c12e6c4bc add formats for state sync commands 2023-06-11 12:20:41 -07:00
Martin Michelsen 65c08667cc decode download quests during proxy save-files 2023-06-10 10:49:53 -07:00
Martin Michelsen 0386d14638 don't recreate random state for sequential ep3 battles 2023-06-10 10:49:53 -07:00
Martin Michelsen ee837712aa document proxy options in readme 2023-06-09 22:26:11 -07:00
Martin Michelsen 27e95ee343 detect specific_version without using a patch 2023-06-08 21:00:19 -07:00
Martin Michelsen 25b6c594bd make quest categories configurable 2023-06-08 20:43:46 -07:00
Martin Michelsen d6eee92645 hardcode cache patch hook location 2023-06-07 10:01:38 -07:00
Martin Michelsen d60404ff0a wait for responses before sending chains of function calls 2023-06-07 00:38:46 -07:00
Martin Michelsen e1f584984f disable dol compression by default 2023-06-05 09:40:31 -07:00
Martin Michelsen 368d6ad93b reset Ep3 Editors patch to default behavior 2023-06-05 09:31:12 -07:00
Martin Michelsen 615ea8d7b0 use correct types on JSON for Ep3 rules 2023-06-05 09:29:55 -07:00
Martin Michelsen 5ab2a215b5 rewrite shell help text 2023-05-29 18:44:04 -07:00
Martin Michelsen db282cb533 add generate-all-products 2023-05-29 18:44:04 -07:00
Martin Michelsen 5e93076243 fix default flags for versions with encrypted send_function_call 2023-05-28 10:35:37 -07:00
Martin Michelsen c4153f5f6e add DCv1 EU sub_version 2023-05-28 09:49:19 -07:00
Martin Michelsen 2c95782687 support DC NTE and DCv1 Dec 2000 prototype 2023-05-27 19:33:38 -07:00
Martin Michelsen 3cd13863cb fix menu info fallthrough 2023-05-27 13:53:32 -07:00
Martin Michelsen bdb0c05220 add missing include 2023-05-27 13:49:25 -07:00
Martin Michelsen afd93047c1 support compression levels in prs 2023-05-27 13:39:57 -07:00
Martin Michelsen 54a734e049 compress DOL files before sending them to clients 2023-05-27 09:57:36 -07:00
Martin Michelsen 9ec72212cf make patch filenames consistent 2023-05-26 21:25:29 -07:00
Martin Michelsen 5cba72934f re-record tests 2023-05-26 16:40:54 -07:00
Martin Michelsen cf3a09a241 fix uninitialized memory bug in Ep3 server 2023-05-26 16:08:16 -07:00
Martin Michelsen 4ae23f4eff fix DOL loader 2023-05-26 11:30:10 -07:00
Martin Michelsen de3ea6b850 fix info menu bug on DC/PC 2023-05-26 10:58:17 -07:00
Martin Michelsen dbd6c59a0b implement version-specific patches; clean up menu abstraction 2023-05-26 09:55:12 -07:00
Martin Michelsen 03c26b587a send tournament result before battle end command 2023-05-23 21:53:45 -07:00
Martin Michelsen 7ae87f9949 add some command notes 2023-05-21 22:59:30 -07:00
Martin Michelsen 81d0353144 fix $auction command 2023-05-19 09:21:45 -07:00
Martin Michelsen 780dbd769c update episode 3 documentation 2023-05-16 22:25:45 -07:00
Martin Michelsen 695e53a714 qualify all calls to std::move 2023-05-15 23:46:19 -07:00
Martin Michelsen f813ed68df make $exit command work in games 2023-05-12 23:24:41 -07:00
Martin Michelsen a7b3c496d0 update readme 2023-05-11 14:31:08 -07:00
Martin Michelsen 65813b7170 remove memcpy call 2023-05-10 22:51:33 -07:00
Martin Michelsen fc672978d8 fix patch cache clear behavior on GC versions that need it 2023-05-10 22:47:07 -07:00
Martin Michelsen 90a3be7803 add salvage-gci action 2023-05-10 22:47:07 -07:00
Martin Michelsen 8dc5e9f281 add describe-item action 2023-05-10 22:47:00 -07:00
Martin Michelsen 6654030bd3 reformat some files after clang-format option change 2023-05-02 09:27:34 -07:00
Martin Michelsen 4f2e333d6c update some Ep3 format notes 2023-05-02 09:21:48 -07:00
Martin Michelsen 617cf73c5e use new JSONObject::serialize 2023-04-30 10:04:06 -07:00
Martin Michelsen 42fa3955d8 fix .nsk file size mismatches 2023-04-23 22:31:48 -07:00
Martin Michelsen 4509d9f37b move test scripts into tests/ directory 2023-04-19 16:45:23 -07:00
Martin Michelsen 91e484e514 clang-format everything 2023-04-16 15:44:12 -07:00
Martin Michelsen b733f4e199 update some command notes 2023-04-16 10:56:52 -07:00
Martin Michelsen 31ecf917af add generate-product command 2023-04-16 10:49:13 -07:00
Martin Michelsen f954a7f834 update some command notes 2023-04-05 13:52:38 -07:00
Martin Michelsen 42e2301a8e refine command 93 format 2023-04-04 23:14:24 -07:00
Martin Michelsen 35845ea49b more save file format refinement 2023-04-03 00:27:21 -07:00
Martin Michelsen c4e3eb238f specify actual GCI header fields 2023-04-02 15:04:45 -07:00
Martin Michelsen e98d01d7e9 further refine save file format 2023-04-01 23:46:59 -07:00
Martin Michelsen b6f71fffbf document what 96 command's value actually represents 2023-04-01 22:41:43 -07:00
Martin Michelsen 38469119ad refine some parts of save file format 2023-04-01 20:07:03 -07:00
Martin Michelsen e56d572585 define most of the GC save file format 2023-04-01 18:21:58 -07:00
Martin Michelsen 58011c5a00 add zero-based offsets in Episode3::PlayerConfig 2023-04-01 10:49:48 -07:00
Martin Michelsen 42a4a599dc fix executable path in gci test script 2023-04-01 10:36:18 -07:00
Martin Michelsen 5e05b3d11f add comment about gci format 2023-04-01 10:29:43 -07:00
Martin Michelsen a06aa2f1fa reogranize tests directory 2023-04-01 10:27:05 -07:00
Martin Michelsen 3b9a76eec8 implement save file decryption/encryption 2023-04-01 10:16:15 -07:00
Martin Michelsen 06ba95ed97 fix help text typo 2023-03-31 09:16:21 -07:00
Martin Michelsen be83cafe0d check for BB restoration items in ItemCreator 2023-03-30 17:49:21 -07:00
Martin Michelsen 0007a1af56 remove unused argument 2023-03-30 09:49:32 -07:00
Martin Michelsen a7dbfd9781 minor cleanup in ItemCreator 2023-03-30 09:45:36 -07:00
Martin Michelsen 2ed6427773 fix some names in ItemCreator 2023-03-30 09:39:21 -07:00
Martin Michelsen dd1c5a2d0c add note about char save file encryption 2023-03-29 10:40:12 -07:00
Martin Michelsen b4946f5f1e rename unsealable handler function in ItemCreator 2023-03-29 10:39:57 -07:00
Martin Michelsen 4c248c5ee5 fix notes on 44/A6 commands 2023-03-28 20:40:50 -07:00
Martin Michelsen b58f354c41 add extract-bml action 2023-03-27 10:26:53 -07:00
Martin Michelsen dcebc61b13 write Quest::export_qst 2023-03-23 22:34:38 -07:00
Martin Michelsen c48a998750 update some format notes 2023-03-21 22:47:17 -07:00
Martin Michelsen b281eecfee add TOC to readme 2023-03-18 16:48:08 -07:00
Martin Michelsen 40ca249b8a use battle rule names in ItemRestrictions 2023-03-18 15:37:08 -07:00
Martin Michelsen 077bfb2e7d make join/leave notifs always 2 lines 2023-03-18 15:11:51 -07:00
Martin Michelsen fadc0e9f71 autodetect .bin/.dat/.mnm files in (de)compress-prs actions 2023-03-18 15:11:43 -07:00
Martin Michelsen 3dda420c3a allow uneven command sizes in sc/ss command data 2023-03-18 15:08:04 -07:00
Martin Michelsen 618d9180cd fix comflict between Ep3-Editors patch and widescreen AR code 2023-03-17 10:47:18 -07:00
Martin Michelsen 032f0bb2c5 refine Ep3 map definition struct 2023-03-17 10:47:02 -07:00
Martin Michelsen f92822fff0 fix tests after reloading semantic changes 2023-03-16 16:41:01 -07:00
Martin Michelsen 7426c5ad1f make reloading more stable and add more options 2023-03-15 14:47:06 -07:00
Martin Michelsen 45cac5a084 more details on unused 80 command 2023-03-14 17:48:37 -07:00
Martin Michelsen 5ef5ddcbae add decode-vms to help output 2023-03-12 12:55:34 -07:00
Martin Michelsen 59bfa66dad clean up compatibility table 2023-03-12 12:47:32 -07:00
Martin Michelsen 711bbf0a21 add player notifications on proxy server 2023-03-12 00:09:59 -08:00
Martin Michelsen 2291d758ac rewrite quest format table 2023-03-11 11:37:57 -08:00
Martin Michelsen dc7277a2a4 support GCI and DLQ files in Ep3 maps folders 2023-03-11 11:23:41 -08:00
Martin Michelsen 2f19f5ce0b fix VMS decoder 2023-03-11 10:23:13 -08:00
Martin Michelsen cf0902b6ed update format notes from DC disassembly 2023-03-11 10:18:25 -08:00
Martin Michelsen eebffc0d13 fix BB data server proxy behavior 2023-03-09 21:07:57 -08:00
Martin Michelsen 60dd22a7f6 fix cat-client CLI arguments 2023-03-09 11:38:20 -08:00
Martin Michelsen dc9112dfdd make name_for_item output colors consistent with game client 2023-03-09 10:00:01 -08:00
Martin Michelsen f45a76af13 add BB EF structure 2023-03-09 09:59:43 -08:00
Martin Michelsen 47ac90ea6b document BB EF and F0 commands 2023-03-09 00:40:24 -08:00
Martin Michelsen f05641a8b9 fix BB shops + sale prices 2023-03-08 23:21:52 -08:00
Martin Michelsen cfcdd6acad name unknown functions in ItemCreator 2023-03-08 14:41:59 -08:00
Martin Michelsen a3249ab19b split compression tests and skip executable recompression 2023-03-08 10:48:22 -08:00
Martin Michelsen 7af363fec4 update to-do list 2023-03-08 10:44:41 -08:00
Martin Michelsen 4ba5689b25 fix memcpy usage in chat commands and server shell 2023-03-07 23:23:57 -08:00
Martin Michelsen 838e53a91e use GC logic for BB nonrare item drop generation and shops 2023-03-07 23:19:30 -08:00
Martin Michelsen 6cdbc3e8e0 update some readme text 2023-03-07 23:19:30 -08:00
Martin Michelsen 30cc5fbb44 add TODO for quest enemy lists 2023-03-04 15:56:20 -08:00
Martin Michelsen b935760d64 split GameMode into enum class 2023-03-04 15:55:59 -08:00
Martin Michelsen 2932488d00 fix $what output in tests 2023-03-04 11:42:20 -08:00
Martin Michelsen 612f305c3a fix battle param header text 2023-03-04 11:42:04 -08:00
Martin Michelsen 61a9a0ce8d add TODOs for BB to readme 2023-03-04 11:41:50 -08:00
Martin Michelsen 159f80cce3 make episode an enum class 2023-03-04 11:41:37 -08:00
Martin Michelsen a35d835f31 add BattleParamEntry debug functions 2023-03-03 23:17:08 -08:00
Martin Michelsen 3418afcc66 fix episode 1 enemy indexes 2023-03-03 22:57:44 -08:00
Martin Michelsen d5ececfa87 add in-game debug messages 2023-03-03 22:57:28 -08:00
Martin Michelsen aea43781ea print item description when modifying inventories/grounds 2023-03-03 19:35:19 -08:00
Martin Michelsen 707b021c88 fix enemy_id usage in 6xC8 2023-03-03 19:34:53 -08:00
Martin Michelsen 5e07075977 fix patch metadata cache write on startup 2023-03-03 18:25:38 -08:00
Martin Michelsen 85072e9db9 implement DC NTE change ship/block 2023-03-03 18:12:29 -08:00
Martin Michelsen 2fcc77772f minor readme updates 2023-03-03 09:47:19 -08:00
Martin Michelsen 8b4785eb36 update B9 notes 2023-03-02 23:01:45 -08:00
Martin Michelsen ef0f33351a update readme for windows build 2023-03-02 22:31:03 -08:00
Martin Michelsen c5f05de082 set up windows build 2023-03-02 22:17:07 -08:00
Martin Michelsen 2c5f0ea904 fix client object memory leak 2023-03-02 22:17:07 -08:00
Martin Michelsen f45516d359 set up map loading at quest load time 2023-03-02 22:17:07 -08:00
Martin Michelsen be6cff7b89 make MapDefinition easier to read 2023-03-02 17:28:46 -08:00
Martin Michelsen 6fde0f186f update ep3 section in readme 2023-03-02 17:20:24 -08:00
3683 changed files with 227326 additions and 50372 deletions
+28
View File
@@ -0,0 +1,28 @@
Standard: c++20
BasedOnStyle: LLVM
IndentWidth: 2
ColumnLimit: 0
AccessModifierOffset: -2
NamespaceIndentation: None
BreakBeforeBraces: Custom
PointerAlignment: Left
IndentCaseLabels: true
PackConstructorInitializers: CurrentLine
BraceWrapping:
AfterEnum: false
AfterStruct: false
AfterClass: false
SplitEmptyFunction: false
AfterControlStatement: false
AfterNamespace: false
AfterFunction: false
AfterUnion: false
AfterExternBlock: false
BeforeCatch: false
BeforeElse: false
SplitEmptyRecord: false
SplitEmptyNamespace: false
AlignTrailingComments: false
AlignAfterOpenBracket: DontAlign
AlignOperands: DontAlign
AlignEscapedNewlines: Left
+7 -6
View File
@@ -15,13 +15,15 @@ Testing
# Files modified by the user and/or server that don't have defaults
system/config.json
system/ep3/battle-records/*.mzrd
system/ep3/tournament-state.json
system/ep3/maps-free/*.bind
system/ep3/maps-quest/*.bind
system/licenses.nsi
system/players/player_*
system/players/account_*
system/players/bank_*
system/licenses/*.json
system/players/*.psochar
system/players/*.psosys
system/players/*.psocard
system/players/*.nsc
system/players/*.nsa
system/patch-pc/.metadata-cache.json
system/patch-bb/.metadata-cache.json
@@ -29,7 +31,6 @@ system/patch-bb/.metadata-cache.json
# repository
files
make_release.py
notes
old-khyller
old-newserv
release
+99 -70
View File
@@ -33,75 +33,102 @@ set (LIBEVENT_LIBRARIES
${LIBEVENT_CORE})
find_package(phosg REQUIRED)
find_package(Iconv REQUIRED)
find_package(resource_file QUIET)
# Executable definition
add_executable(newserv
src/CatSession.cc
src/Channel.cc
src/ChatCommands.cc
src/Client.cc
src/Compression.cc
src/DNSServer.cc
src/Episode3/AssistServer.cc
src/Episode3/BattleRecord.cc
src/Episode3/Card.cc
src/Episode3/CardSpecial.cc
src/Episode3/DataIndex.cc
src/Episode3/DeckState.cc
src/Episode3/MapState.cc
src/Episode3/PlayerState.cc
src/Episode3/PlayerStateSubordinates.cc
src/Episode3/RulerServer.cc
src/Episode3/Server.cc
src/Episode3/Tournament.cc
src/FileContentsCache.cc
src/FunctionCompiler.cc
src/GSLArchive.cc
src/IPFrameInfo.cc
src/IPStackSimulator.cc
src/Items.cc
src/LevelTable.cc
src/License.cc
src/Lobby.cc
src/Loggers.cc
src/Main.cc
src/Map.cc
src/Menu.cc
src/NetworkAddresses.cc
src/PatchFileIndex.cc
src/Player.cc
src/ProxyCommands.cc
src/ProxyServer.cc
src/PSOEncryption.cc
src/PSOGCObjectGraph.cc
src/PSOProtocol.cc
src/Quest.cc
src/RareItemSet.cc
src/ReceiveCommands.cc
src/ReceiveSubcommands.cc
src/ReplaySession.cc
src/SendCommands.cc
src/Server.cc
src/ServerShell.cc
src/ServerState.cc
src/Shell.cc
src/StaticGameData.cc
src/Text.cc
src/Version.cc
set(SOURCES
src/AFSArchive.cc
src/BattleParamsIndex.cc
src/BMLArchive.cc
src/CatSession.cc
src/Channel.cc
src/ChatCommands.cc
src/ChoiceSearch.cc
src/Client.cc
src/CommonItemSet.cc
src/Compression.cc
src/DCSerialNumbers.cc
src/DNSServer.cc
src/EnemyType.cc
src/Episode3/AssistServer.cc
src/Episode3/BattleRecord.cc
src/Episode3/Card.cc
src/Episode3/CardSpecial.cc
src/Episode3/DataIndexes.cc
src/Episode3/DeckState.cc
src/Episode3/MapState.cc
src/Episode3/PlayerState.cc
src/Episode3/PlayerStateSubordinates.cc
src/Episode3/RulerServer.cc
src/Episode3/Server.cc
src/Episode3/Tournament.cc
src/FileContentsCache.cc
src/FunctionCompiler.cc
src/GSLArchive.cc
src/GVMEncoder.cc
src/IPFrameInfo.cc
src/IPStackSimulator.cc
src/ItemCreator.cc
src/ItemData.cc
src/ItemNameIndex.cc
src/ItemParameterTable.cc
src/Items.cc
src/LevelTable.cc
src/License.cc
src/Lobby.cc
src/Loggers.cc
src/Main.cc
src/Map.cc
src/Menu.cc
src/NetworkAddresses.cc
src/PatchFileIndex.cc
src/PlayerFilesManager.cc
src/PlayerSubordinates.cc
src/ProxyCommands.cc
src/ProxyServer.cc
src/PSOEncryption.cc
src/PSOGCObjectGraph.cc
src/PSOProtocol.cc
src/Quest.cc
src/QuestAvailabilityExpression.cc
src/QuestScript.cc
src/RareItemSet.cc
src/ReceiveCommands.cc
src/ReceiveSubcommands.cc
src/ReplaySession.cc
src/SaveFileFormats.cc
src/SendCommands.cc
src/Server.cc
src/ServerShell.cc
src/ServerState.cc
src/Shell.cc
src/StaticGameData.cc
src/TeamIndex.cc
src/Text.cc
src/TextArchive.cc
src/UnicodeTextSet.cc
src/Version.cc
src/WordSelectTable.cc
)
target_include_directories(newserv PUBLIC ${LIBEVENT_INCLUDE_DIR})
target_link_libraries(newserv phosg ${LIBEVENT_LIBRARIES} pthread)
if(resource_file_FOUND)
target_compile_definitions(newserv PUBLIC HAVE_RESOURCE_FILE)
target_link_libraries(newserv resource_file)
message(STATUS "libresource_file found; enabling patch support")
set(SOURCES ${SOURCES} src/ARCodeTranslator.cc)
endif()
add_executable(newserv ${SOURCES})
target_include_directories(newserv PUBLIC ${LIBEVENT_INCLUDE_DIR} ${Iconv_INCLUDE_DIRS})
target_link_libraries(newserv phosg ${LIBEVENT_LIBRARIES} ${Iconv_LIBRARIES} pthread)
if(resource_file_FOUND)
target_compile_definitions(newserv PUBLIC HAVE_RESOURCE_FILE)
target_link_libraries(newserv resource_file)
message(STATUS "libresource_file found; enabling patch support")
else()
message(WARNING "libresource_file not found; disabling patch support")
message(WARNING "libresource_file not found; disabling patch support")
endif()
@@ -110,21 +137,23 @@ endif()
enable_testing()
file(GLOB TestCases ${CMAKE_SOURCE_DIR}/tests/*.test.txt)
file(GLOB LogTestCases ${CMAKE_SOURCE_DIR}/tests/*.test.txt)
foreach(TestCase IN ITEMS ${TestCases})
add_test(
NAME ${TestCase}
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
COMMAND ${CMAKE_BINARY_DIR}/newserv replay-log ${TestCase} --config=${CMAKE_SOURCE_DIR}/tests/config.json --require-password=password --require-access-key=111111111111)
foreach(LogTestCase IN ITEMS ${LogTestCases})
add_test(
NAME ${LogTestCase}
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
COMMAND ${CMAKE_BINARY_DIR}/newserv --replay-log=${LogTestCase} --config=${CMAKE_SOURCE_DIR}/tests/config.json)
endforeach()
add_test(
NAME compression
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
COMMAND ${CMAKE_SOURCE_DIR}/test-compression.sh ${CMAKE_BINARY_DIR}/newserv)
file(GLOB ScriptTestCases ${CMAKE_SOURCE_DIR}/tests/*.test.sh)
foreach(ScriptTestCase IN ITEMS ${ScriptTestCases})
add_test(
NAME ${ScriptTestCase}
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
COMMAND ${ScriptTestCase} ${CMAKE_BINARY_DIR}/newserv)
endforeach()
# Installation configuration
+244 -167
View File
@@ -1,171 +1,181 @@
# newserv <img align="right" src="s-newserv.png" />
newserv is a game server and proxy for Phantasy Star Online (PSO).
newserv is a game server, proxy, and reverse-engineering tool for Phantasy Star Online (PSO).
This project includes code that was reverse-engineered by the community in ages long past, and has been included in many projects since then. It also includes some game data from Phantasy Star Online itself, which was originally created by Sega.
## History
Feel free to submit GitHub issues if you find bugs or have feature requests. I'd like to make the server as stable and complete as possible, but I can't promise that I'll respond to issues in a timely manner, because this is a personal project undertaken primarily for the fun of reverse-engineering. If you want to contribute to newserv yourself, pull requests are welcome as well.
The history of this project essentially mirrors my development as a software engineer from the beginning of my hobby until now. If you don't care about the story, skip to the "Compatibility" or "Usage" sections below.
See TODO.md for a list of known issues and future work I've curated, or go to the GitHub issue tracker for issues and requests submitted by the community.
I originally purchased PSO GC when I heard about PSUL, and wanted to play around with running homebrew on my GameCube. This pathway eventually led to [GCARS-CS](https://github.com/fuzziqersoftware/gcars-cs), but that's another story.
<img align="left" src="s-khyps.png" /> After playing PSO for a while, both offline and online, I wrote a proxy called Khyps sometime in 2003. This was back in the days of the official Sega servers, where vulnerabilities weren't addressed in a timely manner or at all. It was common for malicious players using their own proxies or Action Replay codes (a story for another time) to send invalid commands that the servers would blindly forward, and cause the receiving clients to crash. These crashes were more than simply inconvenient; they could also corrupt your save data, destroying the hours of work you may have put into hunting items and leveling up your character.
For a while it was essentially necessary to use a proxy to go online at all, so the proxy could block these invalid commands. Khyps was designed primarily with this function in mind, though it also implemented some convenient cheats, like the ability to give yourself or other players infinite HP and allow you to teleport to different places without using an in-game teleporter.
<img align="left" src="s-khyller.png" /> After Khyps I took on the larger challenge of writing a server, which resulted in Khyller sometime in 2005. This was the first server of any type I had ever written. This project eventually evolved into a full-featured environment supporting all versions of the game that I had access to - at the time, PC, GC, and BB. (However, I suspect from reading the ancient source files that Khyller's BB support was very buggy.) As Khyller evolved, the code became increasingly cumbersome, littered with debugging filth that I never cleaned up and odd coding patterns I had picked up over the years. My understanding of the C++ language was woefully incomplete as well (as opposed to now, when it is still incomplete but not woefully so), which resulted in Khyller being essentially a C project that had a couple of classes in it.
<img align="left" src="s-aeon.png" /> Sometime in 2006 or 2007, I abandoned Khyller and rebuilt the entire thing from scratch, resulting in Aeon. Aeon was substantially cleaner in code than Khyller but still fairly hard to work with, and it lacked a few of the more arcane features I had originally written (for example, the ability to convert any quest into a download quest). In addition, the code still had some stability problems... it turns out that Aeon's concurrency primitives were simply incorrect. I had derived the concept of a mutex myself, before taking any real computer engineering classes, but had implemented it incorrectly. I made the race window as small as possible, but Aeon would still randomly crash after running seemingly fine for a few days.
At the time of its inception, Aeon was also called newserv, and you may find some beta releases floating around the Internet with filenames like `newserv-b3.zip`. I had released betas 1, 2, and 3 before I released the entire source of beta 5 and stopped working on the project when I went to college. This was around the time when I switched from writing software primarily on Windows to primarily on macOS and Linux, so Aeon beta 5 was the last server I wrote that specifically targeted Windows. (newserv, which you're looking at now, is a bit tedious to compile on Windows but does work.)
<img align="left" src="s-newserv.png" /> After a long hiatus from PSO and much professional and personal development in my technical abilities, I was reminiscing sometime in October 2018 by reading my old code archives. Somehow inspired when I came across Aeon, I spent a weekend and a couple more evenings rewriting the entire project again, cleaning up ancient patterns I had used eleven years ago, replacing entire modules with simple STL containers, and eliminating even more support files in favor of configuration autodetection. The code is now suitably modern and stable, and I'm not embarrassed by its existence, as I am by Aeon beta 5's source code and my archive of Khyller (which, thankfully, no one else ever saw).
## Future
newserv is many things - a server, a proxy, an encryption and decryption tool, a decoder of various PSO-related formats, and more. Primarily, it's a reverse-engineering project in which I try to unravel the secrets of a 20-year-old video game, for honestly no reason. Solving these problems and documenting them in code has been fun, and I'll continue to do it when my time allows.
With that said, I offer no guarantees on how or when this project will advance. Feel free to submit GitHub issues if you find bugs or have feature requests; I'd like to make the server as stable and complete as possible, but I can't promise that I'll respond to issues in a timely manner. If you feel like contributing to newserv yourself, pull requests are welcome as well.
Current known issues / missing features / things to do:
- Episode 3 battles are implemented but are not well-tested.
- Fix behavior when joining a spectator team after the beginning of a battle.
- PSOBB is not well-tested and likely will disconnect or misbehave when clients try to use unimplemented features.
- Enemy indexes also desync slightly in most games, often in later areas, leading to incorrect EXP values being given for killed enemies.
- Fix some edge cases on the BB proxy server (e.g. make sure Change Ship does the right thing, which is not the same as what it should do on V2/V3).
- PSOX is not tested at all.
- Memory patches currently are platform-specific but not version-specific. This makes them quite a bit harder to write and use properly.
- Find a way to silence audio in RunDOL.s. Some old DOLs don't reset audio systems at load time and it's annoying to hear the crash buzz when the GC hasn't actually crashed.
- Implement private and overflow lobbies.
- Enforce client-side size limits (e.g. for 60/62 commands) on the server side as well. (For 60/62 specifically, perhaps transform them to 6C/6D if needed.)
- Encapsulate BB server-side random state and make replays deterministic.
- VMS decoding doesn't work. Complete this reverse-engineering project.
- Code style
- The internal menu abstraction is ugly and hard to work with. Rewrite it.
- Add default values for all commands (like we use for Episode 3 battle commands).
- Clean up the way proxy session options are passed to the session from the client object (and add user-settable options for e.g. chat filter, which currently doesn't appear in the menu).
- Episode 3 bugs
- Disconnecting during a match turns you into a COM if there are other humans in the match, even if the match is part of a tournament. This may be incorrect behavior for tournaments.
- Disconnecting during a tournament when there are no other humans in the match simply cancels the match (so it can be replayed) instead of forfeiting, which is almost certainly incorrect behavior. (Then again, no one likes losing tournaments to COMs...)
- Tournament deck restrictions aren't enforced when populating COMs at tournament start time. This can cause weird behavior if, for example, a COM deck contains assist cards and the tournament rules forbid them.
- There is a rare failure mode during battles that causes one of the clients to be disconnected.
**Table of contents**
* [Compatibility](#compatibility)
* Setup
* [Configuration](#configuration)
* [Installing quests](#installing-quests)
* [Episode 3 features](#episode-3-features)
* [Client patch directories for PC and BB](#client-patch-directories)
* [Memory patches and DOL files for GC](#memory-patches-and-dol-files)
* [Using newserv as a proxy](#using-newserv-as-a-proxy)
* [Chat commands](#chat-commands)
* How to connect
* Connecting local clients
* [PSO DC](#pso-dc)
* [PSO DC on Flycast](#pso-dc-on-flycast)
* [PSO PC](#pso-pc)
* [PSO GC on a real GameCube](#pso-gc-on-a-real-gamecube)
* [PSO GC on Dolphin](#pso-gc-on-dolphin)
* [PSO BB](#pso-bb)
* [Connecting external clients](#connecting-external-clients)
* [Non-server features](#non-server-features)
## Compatibility
newserv supports several versions of PSO. Specifically:
| Version | Basic commands | Lobbies | Games | Proxy |
|----------------------|----------------|---------------|---------------|---------------|
| Dreamcast Trial | Partial (6) | Not supported | Not supported | Not supported |
| Dreamcast V1 | Supported (1) | Supported | Supported | Supported |
| Dreamcast V2 | Supported (1) | Supported | Supported | Supported |
| PC | Supported | Supported | Supported | Supported |
| GameCube Ep1&2 Trial | Untested (2) | Untested (2) | Untested (2) | Untested (2) |
| GameCube Ep1&2 | Supported | Supported | Supported | Supported |
| GameCube Ep1&2 Plus | Supported | Supported | Supported | Supported |
| GameCube Ep3 Trial | Supported | Supported | Supported (3) | Supported |
| GameCube Ep3 | Supported | Supported | Supported (3) | Supported |
| XBOX Ep1&2 | Untested (4) | Untested (4) | Untested (4) | Untested (4) |
| Blue Burst | Supported | Supported | Partial (5) | Supported |
newserv supports several versions of PSO, including various development prototypes. Specifically:
| Version | Lobbies | Games | Proxy |
|----------------|--------------|--------------|--------------|
| DC Trial | Yes | Yes | No |
| DC 11/2000 | Yes | Yes | No |
| DC 12/2000 | Yes | Yes | Yes |
| DC 01/2001 | Yes | Yes | Yes |
| DC V1 | Yes | Yes | Yes |
| DC 08/2001 | Yes | Yes | Yes |
| DC V2 | Yes | Yes | Yes |
| PC | Yes | Yes | Yes |
| GC Ep1&2 Trial | Yes | Yes | Yes |
| GC Ep1&2 | Yes | Yes | Yes |
| GC Ep1&2 Plus | Yes | Yes | Yes |
| GC Ep3 Trial | Yes | Partial (1) | Yes |
| GC Ep3 | Yes | Yes | Yes |
| Xbox Ep1&2 | Yes | Yes | Yes |
| BB (vanilla) | Yes | Yes (2) | Yes |
| BB (Tethealla) | Yes | Yes (2) | Yes |
*Notes:*
1. *DC support has only been tested with the US versions of PSO DC. Other versions probably don't work, but will be easy to add. Please submit a GitHub issue if you have a non-US DC version, and can provide a log from a connection attempt.*
2. *This version only supports the modem adapter, which Dolphin does not currently emulate, so it's difficult to test.*
3. *See the following section about Episode 3 functionality.*
4. *newserv's implementation of PSOX is based on disassembly of the client executable; it has never been tested with a real client and most likely doesn't work.*
5. *Some basic features are not implemented in Blue Burst games, so the games are not very playable. A lot of work has to be done to get BB games to a playable state.*
6. *Support for PSO Dreamcast Trial Edition is very incomplete and probably never will be complete. This is really just exploring a curiosity that sheds some light on early network engineering done by Sega, not an actual attempt at supporting this version of the game.*
1. *Players can create games, edit decks, trade cards, and participate in auctions, but CARD battles don't work on Episode 3 Trial Edition on newserv.*
2. *Some BB-specific features are not well-tested (for example, some quests that use rare commands may not work properly). Please submit a GitHub issue if you find something that doesn't work.*
### Episode 3
## Setup
The following Episode 3 features are well-tested and work normally:
* Downloading quests.
* Creating and joining games.
* Trading cards.
* Participating in card auctions. (The auction contents must be configured in config.json.)
* Tournaments. (See below)
### Configuration
The following Episode 3 features are implemented, but only partially tested:
* CARD battles. If you find a feature or card ability that doesn't work, please make a GitHub issue and describe the situation (including the attacking card(s), defending card(s), and ability that didn't work).
* Spectator teams are partially implemented, but are not well-tested. There is a known issue that prevents viewing battles unless you're in the spectator team when the battle begins.
* Battle replays sometimes cause the client to crash during the replay. Using the $playrec command is therefore not recommended.
Tournaments work differently than they did on Sega's servers. Tournaments can be created with the `create-tournament` shell command, which enables players to register for them. (Use `help` to see all the arguments - there are many!) The `start-tournament` shell command starts the tournament, but this doesn't schedule any matches. Instead, players who are ready to play their next match can all stand at the rightmost 4-player battle table in the same CARD lobby, and the tournament match will start automatically. (This also means that, for example, not all matches in round 1 must be complete before round 2 can begin - only the matches preceding each individual match must be complete for that match to be playable.)
Because newserv gives all players 1000000 meseta, there is no reward for winning a tournament. This may change in the future.
Episode 3 state and game data is stored in the system/ep3 directory. The files in there are:
* card-definitions.mnr: Compressed card definition list, sent to Episode 3 clients at connect time. Card stats and abilities can be changed by editing this file.
* card-definitions.mnrd: Decompressed version of the above. If present, newserv will use this instead of the compressed version, since this is easier to edit.
* card-text.mnr: Compressed card text archive. Generally only used for debugging.
* com-decks.json: COM decks used in tournaments. The default decks in this file come from logs from Sega's servers, so the file doesn't include every COM deck Sega ever made - the rest are probably lost to time.
* maps-free/ and maps-quest/: Online free battle and quest maps (.mnm/.bin/.mnmd/.bind files). Free battle and quest files have exactly the same format; the only difference between the files in these directories is which section of the menu they will appear in on the client.
* tournament-state.json: State of all active tournaments. This file is automatically written when any tournament changes state for any reason (e.g. a tournament is created/started/deleted or a match is resolved).
## Usage
Currently newserv should build on macOS and Ubuntu. It will likely work on other Linux flavors too. It should work on Windows as well, but I haven't tested it recently - the build process could be very manual. Cygwin is likely the easiest Windows environment in which to build newserv.
Currently newserv works on macOS, Windows, and Ubuntu Linux. It will likely work on other Linux flavors too.
There is a fairly recent macOS ARM64 release on the newserv GitHub repository. You may need to install libevent manually even if you use this release (run `brew install libevent`).
If you're using an older AMD64 Mac, you're running Linux, or you just want to build newserv yourself, here's what you do:
1. Make sure you have CMake and libevent installed. (`brew install cmake libevent` on macOS, `sudo apt-get install cmake libevent-dev` on most Linuxes)
2. Build and install phosg (https://github.com/fuzziqersoftware/phosg).
3. Optionally, install resource_dasm (https://github.com/fuzziqersoftware/resource_dasm). This will enable newserv to send memory patches and load DOL files on PSO GC clients. PSO GC clients can play PSO normally on newserv without this.
4. Run `cmake . && make` in the newserv directory.
There is a fairly recent Windows release on the newserv GitHub repository also. It's built with Cygwin, and all the necessary DLL files should be included. That said, I've only tested it on my own machine and there is no CI for Windows builds like there is for macOS and Linux, so if it doesn't work for you, please open a GitHub issue to let me know.
If you're not using a release from the GitHub repository, do this to build newserv:
1. If you're on Windows, install Cygwin. While doing so, install the `cmake`, `gcc-core`, `gcc-g++`, `git`, `libevent2.1_7`, `make`, `libiconv-devel`, and `zlib` packages. Do the rest of these steps inside a Cygwin shell (not a Windows cmd shell or PowerShell).
2. Make sure you have CMake, libevent, and libiconv installed. (On macOS, `brew install cmake libevent libiconv`; on most Linuxes, `sudo apt-get install cmake libevent-dev`; on Windows, you already did this in step 1.)
3. Build and install phosg (https://github.com/fuzziqersoftware/phosg).
4. Optionally, install resource_dasm (https://github.com/fuzziqersoftware/resource_dasm). This will enable newserv to send memory patches and load DOL files on PSO GC clients. PSO GC clients can play PSO normally on newserv without this.
5. Run `cmake . && make` in the newserv directory.
After building newserv or downloading a release, do this to set it up and use it:
1. In the system/ directory, make a copy of config.example.json named config.json, and edit it appropriately.
2. If you plan to play PSO Blue Burst on newserv, set up the patch directory appropriately. See the "Client patch directories" section below.
2. If you plan to play PSO Blue Burst on newserv, set up the patch directory. See the "Client patch directories" section below.
3. Run `./newserv` in the newserv directory. This will start the game server and run the interactive shell. You may need `sudo` if newserv's built-in DNS server is enabled.
4. Use the interactive shell to add a license. Run `help` in the shell to see how to do this.
4. If you set AllowUnregisteredUsers to false in config.json, use the interactive shell to add your license. Run `help` in the shell to see how to do this.
5. Set your client's network settings appropriately and start an online game. See the "Connecting local clients" or "Connecting remote clients" section to see how to get your game client to connect.
To use newserv in other ways (e.g. for translating data), see the end of this document.
### Installing quests
newserv automatically finds quests in the system/quests/ directory. To install your own quests, or to use quests you've saved using the proxy's set-save-files option, just put them in that directory and name them appropriately.
newserv automatically finds quests in the subdirectories of the system/quests/ directory. To install your own quests, or to use quests you've saved using the proxy's Save Files option, just put them in one of the subdirectories there and name them appropriately. The subdirectories and their behaviors (e.g. in which game modes they should appear and for which PSO versions) is defined in the QuestCategories field in config.json.
Standard quest files should be named like `q###-CATEGORY-VERSION.EXT`, battle quests should be named like `b###-VERSION.EXT`, challenge quests should be named like `c###-VERSION.EXT`, and Episode 3 download quests should be named like `e###-gc3.EXT`. The fields in each filename are:
- `###`: quest number (this doesn't really matter; it should just be unique for the PSO version)
- `CATEGORY`: ret = Retrieval, ext = Extermination, evt = Events, shp = Shops, vr = VR, twr = Tower, gov = Government (BB only), dl = Download (these don't appear during online play), 1p = Solo (BB only)
- `VERSION`: d1 = Dreamcast v1, dc = Dreamcast v2, pc = PC, gc = GameCube Episodes 1 & 2, gc3 = Episode 3, bb = Blue Burst
Within the category directories, quest files should be named like `q###-VERSION-LANGUAGE.EXT` (although the `q` is ignored, and can be any letter). The fields in each filename are:
- `###`: quest number (this doesn't really matter; it should just be unique across the PSO version)
- `VERSION`: dn = Dreamcast NTE, dp = Dreamcast 11/2000 prototype, d1 = Dreamcast v1, dc = Dreamcast v2, pc = PC, gcn = GameCube Trial Edition, gc = GameCube Episodes 1 & 2, gc3 = Episode 3 (see below), xb = Xbox, bb = Blue Burst
- `LANGUAGE`: j = Japanese, e = English, g = German, f = French, s = Spanish
- `EXT`: file extension (see table below)
For example, the GameCube version of Lost HEAT SWORD is in two files named `q058-ret-gc.bin` and `q058-ret-gc.dat`. newserv knows these files are quests because they're in the system/quests/ directory, it knows they're for PSO GC because the filenames contain `-gc`, and it puts them in the Retrieval category because the filenames contain `-ret`.
For .dat files, the `LANGUAGE` token may be omitted. If it's present, then that .dat file will only be used for that language of the quest; if omitted, then that .dat file will be used for all languages of the quest.
There are multiple PSO quest formats out there; newserv supports most of them. It can also decode any known format to standard .bin/.dat format. Specifically:
Some quests (mostly battle and challenge mode quests) have additional JSON metadata files that describe how the server should handle them. This includes flags that can be used to hide the quest unless a preceding quest has been cleared, or to hide the quest unless purchased as a team reward. These metadata files are generally named similarly to their .bin and .dat counterparts, except the `VERSION` token may also be omitted if the metadata applies to all languages of the quest on all PSO versions. See system/quests/battle/b88001.json for documentation on the exact format of the JSON file.
| Format | Extension | Supported | Decode action |
|---------------------------|-----------------------|---------------|------------------|
| Compressed | .bin and .dat | Yes | None (1) |
| Compressed Ep3 | .bin or .mnm | Yes (4) | None (1) |
| Uncompressed | .bind and .datd | Yes | compress-prs (2) |
| Uncompressed Ep3 | .bind or .mnmd | Yes (4) | compress-prs (2) |
| Unencrypted GCI | .bin.gci and .dat.gci | Yes | decode-gci |
| Encrypted GCI with key | .bin.gci and .dat.gci | Yes | decode-gci |
| Encrypted GCI without key | .bin.gci and .dat.gci | No | decode-gci (3) |
| Ep3 GCI | .bin.gci or .mnm.gci | Download only | decode-gci |
| Encrypted DLQ | .bin.dlq and .dat.dlq | Yes | decode-dlq |
| Ep3 DLQ | .bin.dlq or .mnm.dlq | Download only | decode-dlq |
| Online QST | .qst | Yes | decode-qst |
| Download QST | .qst | Yes | decode-qst |
Some quests may also include a .pvr file, which contains an image used in the quest. These files are named similarly to their .bin and .dat counterparts.
For example, the GameCube version of Lost HEAT SWORD is in two files named `q058-gc-e.bin` and `q058-gc.dat`. newserv knows these files are quests because they're in the system/quests/ directory, it knows they're for PSO GC because the filenames contain `-gc`, it knows this is the English version of the quest because the .bin filename ends with `-e` (even though the .dat filename does not), and it puts them in the Retrieval category because the files are within the retrieval/ directory within system/quests/.
The GameCube and Xbox quest formats are very similar, but newserv treats them as different. If you want to use the same quest file for GameCube and Xbox clients, you can make one a symbolic link to the other.
There are multiple PSO quest formats out there; newserv supports all of them. It can also decode any known format to standard .bin/.dat format. Specifically:
| Format | Extension | Supported | Decode action |
|------------------|-----------------------|------------|------------------|
| Compressed | .bin and .dat | Yes | None (1) |
| Compressed Ep3 | .bin or .mnm | Yes (4) | None (1) |
| Uncompressed | .bind and .datd | Yes | compress-prs (2) |
| Uncompressed Ep3 | .bind or .mnmd | Yes (4) | compress-prs (2) |
| Source | .bin.txt and .dat | Yes | None (5) |
| VMS (DCv1) | .bin.vms and .dat.vms | Yes | decode-vms |
| VMS (DCv2) | .bin.vms and .dat.vms | Decode (3) | decode-vms (3) |
| GCI (decrypted) | .bin.gci and .dat.gci | Yes | decode-gci |
| GCI (with key) | .bin.gci and .dat.gci | Yes | decode-gci |
| GCI (no key) | .bin.gci and .dat.gci | Decode (3) | decode-gci (3) |
| GCI (Ep3) | .bin.gci or .mnm.gci | Yes | decode-gci |
| GCI (Ep3 Trial) | .bin.gci or .mnm.gci | Decode (3) | decode-gci (3) |
| DLQ | .bin.dlq and .dat.dlq | Yes | decode-dlq |
| DLQ (Ep3) | .bin.dlq or .mnm.dlq | Yes | decode-dlq |
| QST (online) | .qst | Yes | decode-qst |
| QST (download) | .qst | Yes | decode-qst |
*Notes:*
1. *This is the default format. You can convert these to uncompressed format by running `newserv decompress-prs FILENAME.bin FILENAME.bind` (and similarly for .dat -> .datd)*
2. *Similar to (1), to compress an uncompressed quest file: `newserv compress-prs FILENAME.bind FILENAME.bin` (and likewise for .datd -> .dat)*
3. *If you know the encryption seed (serial number), pass it in as a hex string with the `--seed=` option. If you don't know the encryption seed, newserv will find it for you, which will likely take a long time.*
4. *Episode 3 online quests don't go in the system/quests directory; they instead go in the system/ep3/maps-free or system/ep3/maps-quest directory. If you want an Episode 3 quest to be available for both online play and for downloading, the file must exist in both system/quests and in one of the map directories in system/ep3.*
3. *Use the decode action to convert these quests to .bin/.dat format before putting them into the server's quests directory. If you know the encryption seed (serial number), pass it in as a hex string with the `--seed=` option. If you don't know the encryption seed, newserv will find it for you, which will likely take a long time.*
4. *Episode 3 quests don't go in the system/quests directory. See the Episode 3 section below.*
5. *Quest source can be assembled into a .bin or .bind file with `newserv assemble-quest-script FILENAME.txt`. See system/quests/retrieval/q058-gc-e.bin.txt for an annotated example; this is the English GameCube version of Lost HEAT SWORD.*
Episode 3 download quests consist only of a .bin file - there is no corresponding .dat file. Episode 3 download quest files may be named with the .mnm extension instead of .bin, since the format is the same as the standard map files (in system/ep3/). These files can be encoded in any of the formats described above, except .qst. There are no encrypted Episode 3 GCI formats because the game doesn't encrypt quests saved to the memory card, unlike Episodes 1&2.
Episode 3 download quests consist only of a .bin file - there is no corresponding .dat file. Episode 3 download quest files may be named with the .mnm extension instead of .bin, since the format is the same as the standard map files (in system/ep3/). These files can be encoded in any of the formats described above, except .qst.
When newserv indexes the quests during startup, it will warn (but not fail) if any quests are corrupt or in unrecognized formats.
If you've changed the contents of the quests directory, you can re-index the quests without restarting the server by running `reload quests` in the interactive shell. The new quests will be available immediately, but any games with quests already in progress will continue using the old versions of the quests until those quests end.
Quest contents are cached in memory, but if you've changed the contents of the quests directory, you can re-index the quests without restarting the server by running `reload quests` in the interactive shell. The new quests will be available immediately, but any games with quests already in progress will continue using the old versions of the quests until those quests end.
All quests, including those originally in GCI or DLQ format, are treated as online quests unless their filenames specify the dl category. newserv allows players to download all quests, even those in non-download categories.
### Episode 3 features
newserv supports many features unique to Episode 3:
* CARD battles. Not every combination of abilities has been tested yet, so if you find a feature or card ability that doesn't work like it's supposed to, please make a GitHub issue and describe the situation (the attacking card(s), defending card(s), and ability or condition that didn't work).
* Spectator teams.
* Tournaments. (But they work differently than Sega's tournaments did - see below)
* Downloading quests.
* Trading cards.
* Participating in card auctions. (The auction contents must be configured in config.json.)
* Decorations in lobbies. Currently only images are supported; the game also supports loading custom 3D models in lobbies, but newserv does not implement this (yet).
#### Battle records
After playing a battle, you can save the record of the battle with the $saverec command. You can then replay the battle later by using the $playrec command in a lobby - this will create a spectator team and play the recording of the battle as if it were happening in realtime. Note that there is a bug in older versions of Dolphin that seems to be frequently triggered when playing battle records, which causes the emulator to crash with the message `QObject::~QObject: Timers cannot be stopped from another thread`. To avoid this, use the latest version of Dolphin.
#### Tournaments
Tournaments work differently than they did on Sega's servers. Tournaments can be created with the `create-tournament` shell command, which enables players to register for them. (Use `help` to see all the arguments - there are many!) The `start-tournament` shell command starts the tournament (and prevents further registrations), but this doesn't schedule any matches. Instead, players who are ready to play their next match can all stand at the 4-player battle table near the lobby warp in the same CARD lobby, and the tournament match will start automatically.
These tournament semantics mean that there can be multiple matches in the same tournament in play simultaneously, and not all matches in a round must be complete before the next round can begin - only the matches preceding each individual match must be complete for that match to be playable.
The Meseta rewards for winning tournament matches can be configured in config.json.
#### Episode 3 files
Episode 3 state and game data is stored in the system/ep3 directory. The files in there are:
* card-definitions.mnr: Compressed card definition list, sent to Episode 3 clients at connect time. Card stats and abilities can be changed by editing this file.
* card-definitions.mnrd: Decompressed version of the above. If present, newserv will use this instead of the compressed version, since this is easier to edit.
* card-text.mnr: Compressed card text archive. Generally only used for debugging.
* card-text.mnrd: Decompressed card text archive; same format as TextCardE.bin. Generally only used for debugging.
* com-decks.json: COM decks used in tournaments. The default decks in this file come from logs from Sega's servers, so the file doesn't include every COM deck Sega ever made - the rest are probably lost to time.
* maps/: Online free battle and quest maps (.mnm/.bin/.mnmd/.bind files). newserv comes with all the original online and offline maps, including Story Mode quests. If you don't want the offline maps and quests to be playable online, delete the .bind files system/ep3/maps.
* maps-download/: Download maps and quests (.mnm/.bin/.mnmd/.bind files). There are two subcategories by default (download maps and Trial Edition download maps), but you can add more by editing QuestCategories in config.json. Categories that have flag 0x40 (Ep3 download) set are indexed from this directory; all others are indexed from system/quests/. Files in maps-download/ subdirectories have the same format as those in the maps/ directory, but should be named like `e###-gc3-LANGUAGE.EXT` (similar to how non-Episode 3 quests are named in the system/quests/ directory). If you want a map to be available for online play and for downloading, the file must exist in both maps/ and in a maps-download/ subdirectory (a symbolic link is acceptable).
* tournament-state.json: State of all active tournaments. This file is automatically written when any tournament changes state for any reason (e.g. a tournament is created/started/deleted or a match is resolved).
There is no public editor for Episode 3 maps and quests, but the format is described fairly thoroughly in src/Episode3/DataIndexes.hh (see the MapDefinition structure). You'll need to use `newserv decompress-prs ...` to decompress .bin or .mnm files before editing them, but you don't need to compress the files again to use them - just put the .bind or .mnmd file in the maps directory and newserv will make it available.
Like quests, Episode 3 card definitions, maps, and quests are cached in memory. If you've changed any of these files, you can run `reload ep3` in the interactive shell to make the changes take effect without restarting the server.
### Client patch directories
If you're not playing PSO Blue Burst on newserv, you can skip these steps.
@@ -178,6 +188,8 @@ For BB clients, newserv reads some files out of the patch data to implement game
Specifically, the patch-bb directory should contain at least the data.gsl file and all map_*.dat files from the version of PSOBB that you want to play on newserv. You can copy these files out of the client's data directory from a clean installation, and put them in system/patch-bb/data.
Patch directory contents are cached in memory. If you've changed any of these files, you can run `reload patches` in the interactive shell to make the changes take effect without restarting the server.
### Memory patches and DOL files
Everything in this section requires resource_dasm to be installed, so newserv can use the PowerPC assembler and disassembler from its libresource_file library. If resource_dasm is not installed, newserv will still build and run, but these features will not be available.
@@ -193,6 +205,8 @@ You can put memory patches in the system/ppc directory with filenames like Patch
You can also put DOL files in the system/dol directory, and they will appear in the Programs menu. Selecting a DOL file there will load the file into the GameCube's memory and run it, just like the old homebrew loaders (PSUL and PSOload) did. For this to work, ReadMemoryWord.s, WriteMemory.s, and RunDOL.s must be present in the system/ppc directory. This has been tested on Dolphin but not on a real GameCube, so results may vary.
Like other kinds of data, functions and DOL files are cached in memory. If you've changed any of these files, you can run `reload functions` or `reload dol-files` in the interactive shell to make the changes take effect without restarting the server.
I mainly built the DOL loading functionality for documentation purposes. By now, there are many better ways to load homebrew code on an unmodified GameCube, but to my knowledge there isn't another open-source implementation of this method in existence.
### Using newserv as a proxy
@@ -205,24 +219,50 @@ To use the proxy for PSO BB, set the ProxyDestination-BB entry in config.json. I
When you're on PSO DC, PC, or GC and are connected to a remote server through newserv's proxy, choosing the Change Ship or Change Block action from the lobby counter will send you back to newserv's main menu instead of the remote server's ship or block select menu. You can go back to the server you were just on by choosing it from the proxy server menu again.
There are many options available when starting a proxy session. All options are off by default unless otherwise noted. The options are:
* **Chat commands**: enables chat commands in the proxy session (on by default).
* **Chat filter**: enables escape sequences in chat messages and info board (on by default).
* **Player notifications**: shows a message when any player joins or leaves the game or lobby you're in.
* **Block pings**: blocks automatic pings sent by the client, and responds to ping commands from the server automatically. This works around a bug in Sylverant's login server.
* **Infinite HP**: automatically heals you whenever you get hit. An attack that kills you in one hit will still kill you, however.
* **Infinite TP**: automatically restores your TP whenever you use any technique.
* **Switch assist**: attempts to unlock doors that require two players in a one-player game.
* **Infinite Meseta** (Episode 3 only): gives you 1,000,000 Meseta, regardless of the value sent by the remote server.
* **Block events**: disables holiday events sent by the remote server.
* **Block patches**: prevents any B2 (patch) commands from reaching the client.
* **Save files**: saves copies of several kinds of files when they're sent by the remote server. The files are written to the current directory (which is usually the directory containing the system/ directory). These kinds of files can be saved:
* Online quests and download quests (saved as .bin/.dat files)
* GBA games (saved as .gba files)
* Patches (saved as .bin files, and disassembled into PowerPC assembly if newserv is built with patch support)
* Player data from BB sessions (saved as .bin files, which are not the same format as .nsc files)
* Episode 3 online quests and maps (saved as .mnmd files)
* Episode 3 download quests (saved as .mnm files)
* Episode 3 card definitions (saved as .mnr files)
* Episode 3 media updates (saved as .gvm, .bml, or .bin files)
The remote server will probably try to assign you a Guild Card number that doesn't match the one you have on newserv. On PSO DC, PC and GC, the proxy server rewrites the commands in transit to make it look like the remote server assigned you the same Guild Card number as you have on newserv, but if the remote server has some external integrations (e.g. forum or Discord bots), they will use the Guild Card number that the remote server believes it has assigned to you. The number assigned by the remote server is shown to you when you first connect to the remote server, and you can retrieve it in lobbies or during games with the $li command.
Some chat commands (see below) have the same basic function on the proxy server but have different effects or conditions. In addition, there are some server shell commands that affect clients on the proxy (run 'help' in the shell to see what they are). All proxy commands in the server shell only work when there's exactly one client connected through the proxy, since there isn't (yet) a way to say via the shell which session you want the command to apply to.
Some chat commands (see below) have the same basic function on the proxy server but have different effects or conditions. In addition, there are some server shell commands that affect clients on the proxy (run `help` in the shell to see what they are). If there's only one proxy session open, the shell's proxy commands will affect that session. Otherwise, you'll have to specify which session to affect with the `on` prefix - to send a chat message in LinkedSession:17205AE4, for example, you would run `on 17205AE4 chat ...`.
### Chat commands
The server's shell supports a variety of administration commands. If the interactive shell is enabled, you can enter these commands at any time, even if the prompt isn't visible. Run `help` in the server's shell to see all of the commands and how to use them.
newserv also supports a variety of commands players can use via the chat interface. Any chat message that begins with `$` is treated as a chat command. (If you actually want to send a chat message starting with `$`, type `$$` instead.)
newserv supports a variety of commands players can use by chatting in-game. Any chat message that begins with `$` is treated as a chat command. (If you actually want to send a chat message starting with `$`, type `$$` instead.)
Some commands only work on the game server and not on the proxy server. The chat commands are:
* Information commands
* `$li`: Shows basic information about the lobby or game you're in. If you're on the proxy server, shows information about your connection instead (remote Guild Card number, client ID, etc.).
* `$ping` (game server only): Shows round-trip ping time from the server to you.
* `$what` (game server only): Shows the type, name, and stats of the nearest item on the ground.
* `$matcount` (game server only): Shows how many of each type of material you've used.
* Debugging commands
* `$dbgid` (game server only): Enable or disable high ID preference. When enabled, you'll be placed into the latest available slot in lobbies and games instead of the earliest. Can be useful for finding commands for which newserv doesn't handle client IDs properly.
* `$debug` (game server only): Enable or disable debug. You need the DEBUG permission in your user license to use this command. When debug is enabled, you'll see in-game messages from the server when you take certain actions. You'll also be placed into the highest available slot in lobbies and games instead of the lowest, which is useful for finding commands for which newserv doesn't handle client IDs properly. This setting also disables certain safeguards and allows you to do some things that might crash your client.
* `$quest <number>`: Load a quest by quest number. Can be used to load battle or challenge quests with only one player present.
* `$qcall <function-id>`: Call a quest function on your client.
* `$qcheck <flag-num>`: Show the value of a quest flag.
* `$qset <flag-num>` or `$qclear <flag-num>`: Set or clear a global quest flag for everyone in the game.
* `$qsync <reg-num> <value>`: Set a quest register's value on your client. `<reg-num>` should be either rXX (e.g. r60) or fXX (e.g. f60); if the latter, `<value>` is parsed as a floating-point value instead of as an integer.
* `$gc` (game server only): Send your own Guild Card to yourself.
* `$persist` (game server only): Enable or disable persistence for the current lobby or game. This determines whether the lobby/game is deleted when the last player leaves. You need the DEBUG permission in your user license to use this command because there are no game state checks when you do this. For example, if you make a game persistent, start a quest, then leave the game, the game can't be joined by anyone but also can't be deleted.
* `$sc <data>`: Send a command to yourself.
@@ -230,30 +270,47 @@ Some commands only work on the game server and not on the proxy server. The chat
* Personal state commands
* `$arrow <color-id>`: Changes your lobby arrow color.
* `$secid <section-id>`: Sets your override section ID. After running this command, any games you create will use your override section ID for rare drops instead of your character's actual section ID. To revert to your actual section id, run `$secid` with no name after it.
* `$rand <seed>`: Sets your override random seed (specified as a 32-bit hex value). This will make any games you create use the given seed for rare enemies. This also makes item drops deterministic in Blue Burst games hosted by newserv. On the proxy server, this command can cause desyncs with other players in the same game, since they will not see the overridden random seed. To remove the override, run `$rand` with no arguments.
* `$exit`: If you're in a lobby, sends you to the main menu (which ends your proxy session, if you're in one). If you're in an Episode 3 game or spectator team, sends you to the lobby (but does not end your proxy session if you're in one).
* `$secid <section-id>`: Sets your override section ID. After running this command, any games you create will use your override section ID for rare drops instead of your character's actual section ID. To revert to your actual section id, run `$secid` with no name after it. On the proxy server, this will not work if the remote server controls item drops (e.g. on BB, or on Schtserv with server drops enabled). If the server does not allow cheat mode anywhere (that is, "CheatModeBehavior" is "Off" in config.json), this command does nothing.
* `$rand <seed>`: Sets your override random seed (specified as a 32-bit hex value). This will make any games you create use the given seed for rare enemies. This also makes item drops deterministic in Blue Burst games hosted by newserv. On the proxy server, this command can cause desyncs with other players in the same game, since they will not see the overridden random seed. To remove the override, run `$rand` with no arguments. If the server does not allow cheat mode anywhere (that is, "CheatModeBehavior" is "Off" in config.json), this command does nothing.
* `$ln [name-or-type]`: Sets the lobby number. Visible only to you. This command exists because some non-lobby maps can be loaded as lobbies with invalid lobby numbers. See the "GC lobby types" and "Ep3 lobby types" entries in the information menu for acceptable values here. Note that non-lobby maps do not have a lobby counter, so there's no way to exit the lobby without using either `$ln` again or `$exit`. On the game server, `$ln` reloads the lobby immediately; on the proxy server, it doesn't take effect until you load another lobby yourself (which means you'll like have to use `$exit` to escape). Run this command with no argument to return to the default lobby.
* `$exit`: If you're in a lobby, sends you to the main menu (which ends your proxy session, if you're in one). If you're in a game or spectator team, sends you to the lobby (but does not end your proxy session if you're in one). Does nothing if you're in a non-Episode 3 game and no quest is in progress.
* `$patch <name>`: Run a patch on your client. `<name>` must exactly match the name of a patch on the server.
* Character data commands
* `$savechar <slot>`: Saves your current character data on the server in the specified slot (each serial number has 4 slots, numbered 1-4). These slots are separate from BB character slots; using this command does not affect BB characters.
* `$loadchar <slot>` (v1 and v2 only): Loads your character data from the specified slot. The changes will be undone if you join a game - to save your changes, disconnect from the lobby.
* `$bbchar <username> <password> <slot>`: Use this command when playing on a non-BB version of PSO. If the username and password are correct, this command converts your current character to BB format and saves it on the server in the given slot (1-4). Any character already in that slot is overwritten. (This command is similar to `$savechar`, except it overwrites a BB character slot, and can transfer characters across accounts.) Note that the character's chat data, quick menu config, and bank contents are not copied, since there is no way for the server to request those types of data.
* `$edit <stat> <value>`: Modifies your character data. If you are on V3 (GameCube/Xbox), or if the server does not allow cheat mode anywhere (that is, "CheatModeBehavior" is "Off" in config.json), this command does nothing. If you are on V1 or V2 (DC or PC, not BB), your changes will be undone if you join a game - to save your changes, disconnect from the lobby.
* Blue Burst player commands (game server only)
* `$bbchar <username> <password> <1-4>`: Use this command when playing on a non-BB version of PSO. If the username and password are correct, this command converts your current character to BB format and saves it on the server in the given slot. Any character already in that slot is overwritten.
* `$edit <stat> <value>`: Modifies your character data.
* `$bank [number]`: Switches your current bank, so you can access your other character's banks (if `number` is 1-4) or your shared account bank (if `number` is 0). If `number` is not given, switches back to your current character's bank.
* `$save`: Saves your character, system, and Guild Card data immediately. (By default, your character is saved every 60 seconds while online, and your account and Guild Card data are saved whenever they change.)
* Game state commands (game server only)
* `$maxlevel <level>`: Sets the maximum level for players to join the current game.
* `$maxlevel <level>`: Sets the maximum level for players to join the current game. (This only applies when joining; if a player joins and then levels up past this level during the game, they are not kicked out, but won't be able to rejoin if they leave.)
* `$minlevel <level>`: Sets the minimum level for players to join the current game.
* `$password <password>`: Sets the game's join password. To unlock the game, run `$password` with nothing after it.
* `$spec`: Toggles the allow spectators flag. If any players are spectating when this flag is disabled, they will be sent back to the lobby.
* `$saverec <name>`: Save the recording of the last Episode 3 battle.
* `$playrec <name>`: Play a battle recording. This command creates a spectator team and replays the specified battle log within it. There is a known issue which causes spectators to crash in some cases, so use of this command is currently not recommended.
* `$itemtable`: Switches between using the client's or the server's drop table. No effect on BB (the server's drop table is always used). The server's rare tables are defined in JSON files in the system/item-tables directory.
* `$drop`: Enables or disables all item drops from boxes and enemies in the current game.
* Episode 3 commands (game server only)
* `$spec`: Toggles the allow spectators flag for Episode 3 games. If any players are spectating when this flag is disabled, they will be sent back to the lobby.
* `$inftime`: Toggles infinite-time mode. Must be used before starting a battle. If infinite-time mode is enabled, the overall and per-phase time limits will be disabled regardless of the values chosen during battle setup. After completing a battle, infinite-time mode is reset to the server's default value (which can be set in Episode3BehaviorFlags in config.json).
* `$defrange <min>-<max>`: Sets the DEF dice range for the next battle. If this is used, the dice range set during battle rules setup will apply only to ATK dice; DEF dice will use this range instead. Assist cards and other dice effects will still apply. Dice exchange also still applies if it is enabled.
* `$stat <what>`: Shows a statistic about your player or team in the current battle. `<what>` can be `duration`, `fcs-destroyed`, `cards-destroyed`, `damage-given`, `damage-taken`, `opp-cards-destroyed`, `own-cards-destroyed`, `move-distance`, `cards-set`, `fcs-set`, `attack-actions-set`, `techs-set`, `assists-set`, `defenses-self`, `defenses-ally`, `cards-drawn`, `max-attack-damage`, `max-combo`, `attacks-given`, `attacks-taken`, `sc-damage`, `damage-defended`, or `rank`.
* `$surrender`: Causes your team to immediately lose the current battle.
* `$saverec <name>`: Saves the recording of the last battle.
* `$playrec <name>`: Plays a battle recording. This command creates a spectator team and replays the specified battle log within it. There is a bug in Dolphin that makes use of this command unstable in emulation (see the "Battle records" section above).
* Cheat mode commands
* `$cheat`: Enables or disables cheat mode for the current game. All other cheat mode commands do nothing if cheat mode is disabled. This command does nothing on the proxy server - cheat commands are always available there.
* `$cheat`: Enables or disables cheat mode for the current game. All other cheat mode commands do nothing if cheat mode is disabled. By default, cheat mode is off in new games but can be enabled; there is an option in config.json that allows you to disable cheat mode entirely, or set it to on by default in new games.
* `$infhp` / `$inftp`: Enables or disables infinite HP or TP mode. Applies to only you. In infinite HP mode, one-hit KO attacks will still kill you.
* `$warp <area-id>`: Warps yourself to the given area.
* `$next`: Warps yourself to the next area.
* `$warpme <floor-id>`: Warps yourself to the given floor.
* `$warpall <floor-id>`: Warps everyone in the game to the given floor. You must be the leader to use this command, unless you're on the proxy server.
* `$next`: Warps yourself to the next floor.
* `$swa`: Enables or disables switch assist. When enabled, the server will attempt to automatically unlock two-player doors in solo games if you step on both switches sequentially.
* `$item <data>` (or `$i <data>`): Create an item. Item codes are 16 hex bytes; at least 2 bytes must be specified, and all unspecified bytes are zeroes. If you are on the proxy server, you must not be using Blue Burst for this command to work. On the game server, this command works for all versions.
* `$item <desc>` (or `$i <desc>`): Create an item. `desc` may be a description of the item (e.g. "Hell Saber +5 0/10/25/0/10") or a string of hex data specifying the item code. Item codes are 16 hex bytes; at least 2 bytes must be specified, and all unspecified bytes are zeroes. If you are on the proxy server, you must not be using Blue Burst for this command to work. On the game server, this command works for all versions.
* `$unset <index>`: In an Episode 3 battle, removes one of your set cards from the field. `<index>` is the index of the set card as it appears on your screen - 1 is the card next to your SC's icon, 2 is the card to the right of 1, etc. This does not cause a Hunters-side SC to lose HP, as they normally do when their items are destroyed.
* Configuration commands
* `$event <event>`: Sets the current holiday event in the current lobby. Holiday events are documented in the "Using $event" item in the information menu. If you're on the proxy server, this applies to all lobbies and games you join, but only you will see the new event - other players will not.
@@ -275,18 +332,25 @@ Some versions of PSO DC will connect to a private server if you just set their D
If you're emulating PSO DC or have a disc image, you can patch the appropriate files within the disc image to make it connect to any address you want. Creating such a patch is also beyond the scope of this document.
Finally, if you're emulating PSO DC, you can modify the loaded executable in memory to make it connect anywhere you want. There is a script included with newserv that can do this for Flycast. The script only works on macOS because it uses memwatch, which is specifically for macOS, but a similar technique could be done manually using scanmem on Linux or Cheat Engine on Windows. (The script is fairly short, and what it does should be easy to understand so you can duplicate its effects with scanmem or Cheat Engine.)
#### PSO DC on Flycast
To use the script, do this:
If you're emulating PSO DC, all versions will connect to newserv by setting the following options in Flycast's `emu.cfg` file under `[network]`:
- DNS = Your newserv's server address (newserv's DNS server must be running on port 53)
- EmulateBBA = yes
- Enable = yes
It is also necessary to save any DNS information to the flash memory of the Dreamcast to use the BBA - the easiest way to do this is to use the website option in USv2 and then choose the save to flash option.
Once set up, the EU and US versions will work without any extra set up (other than the HL Check Disable code for USv2), while the JP versions require HL Check Disable codes to be running.
If the server is running on the same machine as Flycast, this might not work, even if you point Flycast's DNS queries at your local IP address (instead of 127.0.0.1). In this case, you can modify the loaded executable in memory to make it connect anywhere you want. There is a script included with newserv that can do this on macOS; a similar technique could be done manually using scanmem on Linux or Cheat Engine on Windows. To use the script, do this:
1. Build and install memwatch (https://github.com/fuzziqersoftware/memwatch).
2. Start Flycast and run PSO. (You must run the script below after PSO is loaded - it won't work if you run it before loading the game.)
2. Start Flycast and run PSO. (You must start PSO before running the script; it won't work if you run the script before loading the game.)
3. Run `sudo patch_flycast_memory.py <original-destination>`. Replace `<original-destination>` with the hostname that PSO wants to connect to (you can find this out by using Wireshark and looking for DNS queries). The script may take up to a minute; you can continue using Flycast while it runs, but don't start an online game until the script is done.
4. Run newserv and start an online game in PSO.
If you use this method, you'll have to run the script every time you start PSO in Flycast, but you won't have to run it again if you start another online game without restarting emulation.
Finally, the script takes an optional second argument that allows you to redirect the connection elsewhere (instead of the local machine). THis allows you to connect directly to remote servers if desired.
#### PSO PC
The version of PSO PC I have has the server addresses starting at offset 0x29CB34 in pso.exe. Using a hex editor, change those to "localhost" (without quotes) if you just want to connect to a locally-running newserv instance. Alternatively, you can add an entry to the Windows hosts file (C:\Windows\System32\drivers\etc\hosts) to redirect the connection to 127.0.0.1 (localhost) or any other IP address.
@@ -299,36 +363,49 @@ If you have PSO Plus or Episode III, it won't want to connect to a server on the
#### PSO GC on Dolphin
If you have BBA support via a tap interface, you may be able to just set the DNS server address (as you would on a real GameCube, above) and it may work. This does not work on macOS, but you can use the tapserver interface instead (below).
If you're using the HLE BBA type, set the BBA's DNS server address to newserv's IP address and it should work. (If newserv is on the same machine as Dolphin, try your local IP address or 127.0.0.1.) In PSO, use the example values below in PSO's network configuration.
If you're using a version of Dolphin with tapserver support (currently only the macOS version), you can make it connect to a newserv instance running on the same machine via the tapserver interface. You do not need to install or run tapserver, and this works for all PSO versions without any of the dual-interface trickery described above. To do this:
If you're using the TAP BBA type, you'll have to set PSO's network settings appropriately for your tap interface. Set the DNS server address in PSO's network settings to newserv's IP address.
If you're using a version of Dolphin with tapserver support, you can make it connect to a newserv instance running on the same machine via the tapserver interface. You do not need to install or run tapserver. To do this:
1. Set Dolphin's BBA type to tapserver (Config -> GameCube -> SP1).
2. Enable newserv's IP stack simulator according to the comments in config.json and start newserv.
3. In PSO, you have to configure the network settings manually (DHCP doesn't work), but the actual values don't matter as long as they're valid IP addresses. Example values:
- IP address: `10.0.1.5`
- Subnet mask: `255.255.255.0`
- Default gateway: `10.0.1.1`
- DNS server address 1: `10.0.1.1`
- Leave everything else blank
3. In PSO's network settings, enable DHCP ("Automatically obtain an IP address"), set DNS server address to "Automatic", and leave DHCP Hostname as "Not set". Leave the proxy server settings blank.
4. Start an online game.
#### PSO BB
The PSO BB client has been modified and distributed in many different forms. newserv supports most, but not all, of the common distributions. Unlike other versions, it's important that the client and server have the same map files, so make sure to set up the patch directory based on the client you'll be using with newserv. (See the "Client patch directories" section for instructions on setting this up.)
The original Japanese and US versions of PSO BB should work, but you'll have to modify your hosts file or edit psobb.exe to point to your newserv instance. The original versions are packed, so this is a more involved process than simply opening the executable in a hex editor and finding/replacing some strings.
Alternatively, you can use the Tethealla client (https://archive.org/details/psobb-tethealla-client); you can find the connection addresses starting at 0x56D724 in psobb.exe. Overwrite these addresses with your server's hostname or IP address, and you should be able to connect.
### Connecting external clients
If you want to accept connections from outside your local network, you'll need to set ExternalAddress to your public IP address in the configuration file, and you'll likely need to open some ports in your router's NAT configuration - specifically, all the TCP ports listed in PortConfiguration in config.json.
For GC clients, you'll have to use newserv's built-in DNS server or set up your own DNS server as well. If you want external clients to be able to use your DNS server, you'll have to forward UDP port 53 to your newserv instance. Remote players can then connect to your server by entering your DNS server's IP address in their client's network configuration.
### Non-server usage
### Non-server features
newserv has many CLI options, which can be used to access functionality other than the game/proxy server. Run `newserv help` to see these options and how to use them. The non-server things newserv can do are:
newserv has many CLI options, which can be used to access functionality other than the game and proxy server. Run `newserv help` to see these options and how to use them. The non-server things newserv can do are:
* Compress or decompress data in the PRS and BC0 formats
* Compute the decompressed size of compressed PRS data without decompressing it
* Encrypt or decrypt data using any PSO version's network encryption scheme
* Encrypt or decrypt data using Episode 3's trivial scheme
* Run a brute-force search for a decryption seed
* Decode Shift-JIS text to UTF-16
* Convert quests in .gci, .dlq, or .qst format to .bin/.dat format
* Extract the contents of a .gsl archive
* Connect to another PSO server and pretend to be a client
* Format Episode 3 game data in a human-readable manner
* Compress or decompress data in PRS, PR2, or BC0 format (`compress-prs`, `compress-pr2`, `compress-bc0`, `decompress-prs`, `decompress-pr2`, `decompress-bc0`)
* Compute the decompressed size of compressed PRS data without decompressing it (`prs-size`)
* Encrypt or decrypt data using any PSO version's network encryption scheme (`encrypt-data`, `decrypt-data`)
* Encrypt or decrypt data using Episode 3's trivial scheme (`encrypt-trivial-data`, `decrypt-trivial-data`)
* Encrypt or decrypt data using the Challenge Mode text algorithm (`encrypt-challenge-data`, `decrypt-challenge-data`)
* Encrypt or decrypt PSO GC save data (.gci files) (`encrypt-gci-save`, `decrypt-gci-save`)
* Convert a PSO GC or Episode 3 snapshot file to a BMP image (`decode-gci-snapshot`)
* Find the likely round1 or round2 seed for a corrupt save file (`salvage-gci`)
* Run a brute-force search for a decryption seed (`find-decryption-seed`)
* Convert quests in .gci, .vms, .dlq, or .qst format to .bin/.dat format (`decode-gci`, `decode-vms`, `decode-dlq`, `decode-qst`)
* Convert quests in .bin/.dat to .qst format (`encode-qst`)
* Convert text archives (e.g. TextEnglish.pr2) to JSON and vice versa (`decode-text-archive`, `encode-text-archive`)
* Compile or disassemble quest scripts (`assemble-quest-script`, `disassemble-quest-script`)
* Format Episode 3 game data in a human-readable manner (`show-ep3-maps`, `show-ep3-cards`)
* Convert item data to a human-readable description, or vice versa (`describe-item`, `encode-item`)
* Connect to another PSO server and pretend to be a client (`cat-client`)
* Replay a session log for testing (`replay-log`)
* Extract the contents of a .gsl or .bml archive (`extract-gsl`, `extract-bml`)
+29
View File
@@ -0,0 +1,29 @@
## General
- Encapsulate BB server-side random state and make replays deterministic
- Write a simple status API
- Implement per-game logging
- Make reloading happen on separate threads so compression doesn't block active clients
- Implement decrypt/encrypt actions for VMS files
- Make UI strings localizable (e.g. entries in menus, welcome message, etc.)
- Figure out what causes the corruption message on PC proxy sessions and fix it
- Add an idle connection timeout for proxy sessions
## Episode 3
- Enforce tournament deck restrictions (e.g. rank checks, No Assist option) when populating COMs at tournament start time
- Add support for recording battles on the proxy server (both in primary and spectator teams)
- Make `reload licenses` not vulnerable to online players' licenses overwriting licenses on disk somehow
- Implement ranks (based on total Meseta earned)
## PSO XBOX
- Fix receiving Guild Cards from non-Xbox players
- Research the F94D quest opcode
## PSOBB
- Test all quest item subcommands
- Check if Commander Blade effect works and implement it if not
- Figure out which quest flags are required for solo quests and write appropriate JSON files
- Figure out why Pouilly Slime EXP doesn't work
+16
View File
@@ -0,0 +1,16 @@
struct AITalkBin {
be_uint32_t num_scs;
be_uint32_t sc_offsets[num_scs];
struct SCDialogueEntry {
be_uint32_t num_entries;
be_uint32_t unknown_a1;
be_uint32_t size; // in bytes
struct WhenEntry {
be_uint32_t when;
be_uint32_t percent_chance; // 0-100
be_uint32_t count;
be_uint32_t string_ids[count];
} __attribute__((packed));
} __attribute__((packed));
} __attribute__((packed));
+266
View File
@@ -0,0 +1,266 @@
(Ep1&2 USA) Unlock all songs in BGM test
(Note: sadly, there are no secret/unused ones)
04368960 38600001
04368964 4E800020
(Ep1&2 USA v1.01) Play lobby (and event) music on Pioneer 2 also
0417E0F0 60000000
(Ep3 USA) Play lobby (and event) music in Morgue also
040B7028 60000000
(Ep3 USA) Skip white logo screens during startup
0409D774 38000007
(Episodes 1&2 USA v1.01) Skip white logo screens during startup
0413F190 38000007
(Ep3 USA) Skip agreement prompts before online game
041B50C8 38000003
(Episodes 1&2 USA v1.01) Skip agreement prompt before online game
04327D80 38000003
(Ep3 USA) Disable rate limit for pressing A during loading screens
042F9B30 38000000
(Ep3 USA) Auto-press A as fast as possible during loading screens
042F9AC0 60000000
(Ep3 USA) Replace loading screen A button sounds with random sounds
042F9B18 4804BB19
042F9B1C 5463063E
042F9B20 60631400
042F9B24 64630005
042F9B28 38800000
(Ep3 USA) Change color of loading screens
(Replace AA, RR, GG, BB appropriately)
042FA704 3CC0AARR
042FA708 60C6GGBB
(Ep3 USA) Use 16:9 aspect ratio
04383DC8 4BC87F99
0400BD60 C042DED0
0400BD64 EC5D00B2
0400BD68 4E800020
(Ep3 USA) Disable darkening effect during battle details mode
042F951C 4E800020
(Ep3 USA) Unlock all COM decks
042CA908 38600001
(Ep3 USA) Enable all lobby counter options in non-CARD lobbies
04096A8C 480000C0
04096B4C 38800007
04096BFC 4BFFFF2C
(Ep3 USA) Change HUD color mask
0438CA8C 3C00RRGG
0438CA90 6000BBAA
(Ep3 USA) Disable lobby event music (but keep the visuals)
040B705C 38000000
(Ep3 USA) Enable Pinz's Shop Super Card Capsule Machine as a fourth option
043101C0 38800004
04310238 2C1D0004
04487E8C 000000C8
(Ep3 USA) Change color of pulsing orange text (e.g. card ability names)
0457EE18 RRRRRRRR // Phase 1 (long) red component as 32-bit float (0.0-255.0)
0457EE20 GGGGGGGG // Phase 1 (long) green component as 32-bit float (0.0-255.0)
0457EE10 BBBBBBBB // Phase 1 (long) blue component as 32-bit float (0.0-255.0)
0457EE1C RRRRRRRR // Phase 2 (short) red component as 32-bit float (0.0-255.0)
0457EE24 GGGGGGGG // Phase 2 (short) green component as 32-bit float (0.0-255.0)
0457EE14 BBBBBBBB // Phase 2 (short) blue component as 32-bit float (0.0-255.0)
(Ep3 USA) Change color of pulsing orange text to be random every frame
04155D78 7CA802A6
04155D7C 7C661B78
04155D80 481EF8B1
04155D84 7C671B78
04155D88 481EF8A9
04155D8C 50677822
04155D90 64E7FF00
04155D94 90E60024
04155D98 7CA803A6
04155D9C 4E800020
(Ep3 USA) Enable color and symbol codes in info board text
(Use codes like e.g. $CG to change text colors, as described in CommandFormats.hh)
040F2E80 4BF0D41D
040F0274 4BF10025
040EFC58 4BF10641
04000298 38810008
0400029C 38C3FFFF
040002A0 8CA60001
040002A4 28050024
040002A8 4082000C
040002AC 38000009
040002B0 98060000
040002B4 28050000
040002B8 4082FFE8
040002BC 7C633050
040002C0 4E800020
(Ep3 USA) Unlock all offline free battle maps
042CAA00 38600001
(This unlocks ALL maps, including a bunch of maps with garbage names that crash if you try to play them)
(Ep3 USA) Talk to auction counter offline to get all cards
042F5D18 4BD160E8
0400BE00 9421FFE0
0400BE04 7C0802A6
0400BE08 90010024
0400BE0C 93E10010
0400BE10 93C10014
0400BE14 93A10018
0400BE18 9381001C
0400BE1C 3C60802A
0400BE20 60631BAC
0400BE24 7C6903A6
0400BE28 38600000
0400BE2C 4E800421
0400BE30 7C7F1B78
0400BE34 3C60802A
0400BE38 606315BC
0400BE3C 7C6903A6
0400BE40 7FE3FB78
0400BE44 4E800421
0400BE48 3F80802A
0400BE4C 639C17AC
0400BE50 3BC00001
0400BE54 3BA00063
0400BE58 7FE3FB78
0400BE5C 7FC4F378
0400BE60 7F8903A6
0400BE64 4E800421
0400BE68 3BBDFFFF
0400BE6C 281D0000
0400BE70 4082FFE8
0400BE74 3BDE0001
0400BE78 281E02F0
0400BE7C 4081FFD8
0400BE80 3C60802A
0400BE84 6063160C
0400BE88 7C6903A6
0400BE8C 7FE3FB78
0400BE90 4E800421
0400BE94 83E10010
0400BE98 83C10014
0400BE9C 83A10018
0400BEA0 8381001C
0400BEA4 80010024
0400BEA8 38210020
0400BEAC 7C0803A6
0400BEB0 482E9FC0
(Episodes 1&2 USA v1.01) Press L for enemy debug; enable various other debug messages
040FD9D8 38600001 # Various enemy debug messages
00153E53 00000001 # Poison fog debug 1
00153E4B 00000001 # Poison fog debug 2
040FDA18 60000000 # TObjRoomId
025CB6AA 00000000
4A588EA0 00000040
025CB6AA 00000001
TODO: Figure out more debug message conditionals (vars/functions) and add them here
(Episode 3 USA) Able to find VIP cards offline (but they're still rare)
042C0B20 4800000C
(Ep3 USA) Hold L when starting battle to enter debug menu
042C5460 4BD3AF78
040003D8 3C60804A
040003DC 60630518
040003E0 3C800002
040003E4 480C9F35
040003E8 2C030000
040003EC 4082000C
040003F0 8801001A
040003F4 48000008
040003F8 3800001A
040003FC 482C5068
(Ep3 USA) Dressing room always accessible
041A16FC 38600001
(Ep3 USA) Full dressing room v1
Can't change your class, but you start with your existing appearance
Go online with this code on after using the dressing room to fully save changes
0418EB5C 60000000
042A0184 389D0370
042A0188 387E2120
(Ep3 USA) Full dressing room v2
Can change your class, but you start with the default appearance
Go online with this code on after using the dressing room to fully save changes
04186ECC 4BFFFFD8
042A0184 389D0370
042A0188 387E2120
(Ep3 USA) Replace Options menu with debug menu
04149E70 38600019
(Ep3 USA) Jukebox is free
0430D1DC 48000024
(Ep3 USA) Use own character in battle (online only)
041FFAB0 4800001C
042A54D8 4BD5B0F9
04200A34 4BDFFB9D
041FFA9C 4BE00B35
040005D0 38600000
040005D4 3CA08049
040005D8 80A54160
040005DC 2805000F
040005E0 41820008
040005E4 481E8E24
040005E8 80ADA448
040005EC 7C042800
040005F0 41820008
040005F4 481E8E14
040005F8 38600001
040005FC 4E800020
(Ep3 USA) Disable chat smut filter
0412F8B8 7D0802A6
0412F8BC 7C661B78
0412F8C0 7C872378
0412F8C4 48217285
0412F8C8 38A30001
0412F8CC 7CE33B78
0412F8D0 7CC43378
0412F8D4 7D0803A6
0412F8D8 4BEDEBF4
(Ep3 USA) Metal tiles don't appear in Simulator map
04296904 4E800020
(Ep3 USA) Enable Boooo and Laughter soundchat sounds
Note: Without a TextEnglish.pr2/pr3 patch, the menu items for these sounds will be blank (but they will still work)
0430B734 38800029
0430B770 2C1F0029
0430B59C 2C030029
0430B5A8 5460083C
0430B5B4 7C63022E
0442B690 80258026
0442B694 8227852D
0442B698 80308031
0442B69C 8A3F8532
0442B6A0 8A408533
0442B6A4 8A418A28
0442B6A8 8A388A29
0442B6AC 8A39852E
0442B6B0 802F853D
0442B6B4 85348535
0442B6B8 853B8536
0442B6BC 8537852B
0442B6C0 853A853C
0442B6C4 853E8044
0442B6C8 80458046
0442B6CC 80478048
0442B6D0 8049804A
0442B6D4 804B804C
0442B6D8 804D804E
0442B6DC 804F802A
0442B6E0 802C0000
File diff suppressed because one or more lines are too long
+5
View File
@@ -0,0 +1,5 @@
DC NTE: pso02.dricas.ne.jp
Nov 2000 proto: test1.st-pso.games.sega.net
Dec 2000 proto: sg107634.csrd.sega.co.jp OR master.pso.dream-key.com
Jan 2001 proto: master.pso.dream-key.com
Aug 2001 proto (v2): game01.st-pso.games.sega.net
+45
View File
@@ -0,0 +1,45 @@
Ep3 card text corrections (from THG Discord):
- AP Absorption: Does not block Tech attacks, instead they deal 2 extra damage.
- Assault: Adds 5 AP minus the number of FCs on your field, not in your deck.
- Assist Return: If this replaces an Assist card that was not in its owner's own Assist slot, that card gets re-played in to that slot.
- Barble: His "Unfilial" ability does 3 damage, not 1.
- Berdysh: Equip requirements are Hunter and Humanoid, not either one.
- Black King Bar: "Machine Influence" doesn't need the opponent to be an attacker.
- Blade Dance: "Insanity" doesn't exist. Has "Steady Damage".
- Combo/Explosion: Adds +(# of Combo cards played in phase squared) AP, but the effect only applies once per attacker.
- EGM: "Timed EXP Sacrifice" gives 9 EXP, not 6.
- Fix: Sets all FC attacks to 2 damage, not FC attackers to 2 AP.
- Flatland: Allows summoning in any space on the board, not summoning for free.
- Ghost Blast: Damage added is 1/3 death count, not 1x.
- Gibbles +: Curse' sets MV to 1 for 6 turns, not permanently.
- Govulmer: His "AP Silence" reduces AP by 3, not to 0.
- Guil Shark: +2 damage per Guil for the "Group" ability, not +1.
- Gulgus: His "Copy" ability gives full AP and TP, not 1/2.
- Holy Ray: Doesn't have the "Enemy Bonus" ability.
- Kaladbolg: "Attack AC Unable" was a lie.
- Lock on 3: Also has the ability "DEF Cost 4 Disable".
- Mighty Knuckle: Adds 1.5x points spent as damage, not those points +1.
- Migium: Gains TP from it's "Combo" ability, not AP.
- Orland: "Sword AP Count" looks at your team, not the whole field.
- Pofuilly Slime: His "Copy" ability gives 1/2 AP and TP, not full.
- Rainbow Baton: Correctly reads as Tech OK.
- Red Slicer: "Native Influence" doesn't need the opponent to be an attacker.
- Rufina: She doubles the AP of action cards used, not her own.
- Unit Blow: Adds +3 AP per Unit Blow played in the entire Combat Phase, but the effect only applies once per attacker.
List of changes Sega made to Ep3 cards online (from THG Discord):
- Rebalanced Vanilla Cards (E rank is gone, so some cards nerfed b/c they arent locked to 1x)
- Meteor Cudgel: [Cost]5 ---> [Cost]4
- Frozen Shooter: Frozen Target now only freezes self for 2 Turns, on a 20% chance.
- Snow Queen: Frozen Target now only freezes self for 2 Turns, on a 25% chance.
- Hand Break: Hand Disruptor added (old card description is now accurate)
- Rush: [Cost]6 [AP]+0 ---> [Cost]4 [AP]+1
- Explosion: [Cost]5 ---> [Cost]4
- Resta: Range changed to Antis range (hits all ally SCs and FCs)
- Dice Half: [Cost]5 ---> [Cost]4
- Resistance: [Cost]5 ---> [Cost]4
- Independant: [Cost]4 ---> [Cost]3
- Dreamaga: [Cost]1 ---> [Cost]2
- Dengeki: [Cost]1 ---> [Cost]2
- EGM: [Cost]1 ---> [Cost]2
- Beat: [AP]+5 ---> [AP]+4
+127
View File
@@ -0,0 +1,127 @@
0457EE18 437F0000 CG_color_r_phase1
0457EE20 00000000 CG_color_g_phase1
0457EE10 00000000 CG_color_b_phase1
0457EE1C 00000000 CG_color_r_phase2
0457EE24 437F0000 CG_color_g_phase2
0457EE14 00000000 CG_color_b_phase2
437F0000 == 255.0f
(Ep3 USA) Change color of pulsing orange text (e.g. card ability names)
0457EE18 RRRRRRRR // Phase 1 (long) red component as 32-bit float (0.0-255.0)
0457EE20 GGGGGGGG // Phase 1 (long) green component as 32-bit float (0.0-255.0)
0457EE10 BBBBBBBB // Phase 1 (long) blue component as 32-bit float (0.0-255.0)
0457EE1C RRRRRRRR // Phase 2 (short) red component as 32-bit float (0.0-255.0)
0457EE24 GGGGGGGG // Phase 2 (short) green component as 32-bit float (0.0-255.0)
0457EE14 BBBBBBBB // Phase 2 (short) blue component as 32-bit float (0.0-255.0)
(Ep3 USA) Change color of pulsing orange text to be random every frame
04155D78 7CA802A6
04155D7C 7C661B78
04155D80 481EF8B1
04155D84 7C671B78
04155D88 481EF8A9
04155D8C 50677822
04155D90 64E7FF00
04155D94 90E60024
04155D98 7CA803A6
04155D9C 4E800020
color codes in info board
patch 800F2E80 48253CC9 bl strlen
./m68kdasm --assemble-ppc32 --ppc32 --start-address=800F2E80
bl [8000029C]
040F2E80 4BF0D41D bl -0x000F2BE4 /* 8000029C */
patch/preserve 800f0274 38810008 addi param_2,r1,0x8
./m68kdasm --assemble-ppc32 --ppc32 --start-address=800F0274
bl [80000298]
040F0274 4BF10025 bl -0x000EFFDC /* 80000298 */
patch/preserve 800efc58 38810008 addi r4,r1,0x8
./m68kdasm --assemble-ppc32 --ppc32 --start-address=800EFC58
bl [80000298]
040EFC58 4BF10641 bl -0x000EF9C0 /* 80000298 */
./m68kdasm --assemble-ppc32 --ppc32 --start-address=80000298
entry_from_send_61_and_send_98:
addi r4, r1, 8
entry_from_send_D8:
subi r6, r3, 1
again:
lbzu r5, [r6 + 1]
cmplwi r5, 0x24
bne skip_char
li r0, 0x09
stb [r6], r0
skip_char:
cmplwi r5, 0
bne again
sub r3, r6, r3
blr
04000298 38810008 addi r4, r1, 0x0008
0400029C 38C3FFFF subi r6, r3, 0x0001
040002A0 8CA60001 lbzu r5, [r6 + 0x0001]
040002A4 28050024 cmplwi r5, 36
040002A8 4082000C bne +0x0000000C /* 800002B4 */
040002AC 38000009 li r0, 0x0009
040002B0 98060000 stb [r6], r0
040002B4 28050000 cmplwi r5, 0
040002B8 4082FFE8 bne -0x00000018 /* 800002A0 */
040002BC 7C633050 subf r3, r3, r6
040002C0 4E800020 blr
Ep1&2 v1.01 version of the above code
send_D9
./m68kdasm --assemble-ppc32 --ppc32 --start-address=801DA398
bl [800002D4]
041DA398 4BE25F3D bl -0x001DA0C4 /* 800002D4 */
send_61
./m68kdasm --assemble-ppc32 --ppc32 --start-address=801DC2AC
bl [800002D0]
041DC2AC 4BE24025 bl -0x001DBFDC /* 800002D0 */
send_98
./m68kdasm --assemble-ppc32 --ppc32 --start-address=801DC144
bl [800002D0]
041DC144 4BE2418D bl -0x001DBE74 /* 800002D0 */
./m68kdasm --assemble-ppc32 --ppc32 --start-address=800002D0
entry_from_send_61_and_send_98:
addi r4, r1, 8
entry_from_send_D8:
subi r6, r3, 1
again:
lbzu r5, [r6 + 1]
cmplwi r5, 0x24
bne skip_char
li r0, 0x09
stb [r6], r0
skip_char:
cmplwi r5, 0
bne again
sub r3, r6, r3
blr
040002D0 38810008 addi r4, r1, 0x0008
040002D4 38C3FFFF subi r6, r3, 0x0001
040002D8 8CA60001 lbzu r5, [r6 + 0x0001]
040002DC 28050024 cmplwi r5, 36
040002E0 4082000C bne +0x0000000C /* 800002EC */
040002E4 38000009 li r0, 0x0009
040002E8 98060000 stb [r6], r0
040002EC 28050000 cmplwi r5, 0
040002F0 4082FFE8 bne -0x00000018 /* 800002D8 */
040002F4 7C633050 subf r3, r3, r6
040002F8 4E800020 blr
File diff suppressed because it is too large Load Diff
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

+3
View File
@@ -0,0 +1,3 @@
.\data\help2-0-ja.png
.\data\help0-4-ja.png
.\data\help0-5-ja.png
+6
View File
@@ -0,0 +1,6 @@
.\data\help2-0-ja.png
.\data\help0-0-ja.png
.\data\help0-1-ja.png
.\data\help0-2-ja.png
.\data\help0-3-ja.png
.\data\help0-7-ja.png
+1
View File
@@ -0,0 +1 @@
.\data\help1-1-ja.png
+1
View File
@@ -0,0 +1 @@
.\data\help1-0-ja.png
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+39
View File
@@ -0,0 +1,39 @@
PSOBB SUPPORT FILES, NOTES & RESOURCES
--------------------------------------------------------------------------------
CLIENT LOCALIZATION
By default PSOBB loads everything in Japanese so it requires some extra files
to properly implement the English localization from SOA, these files are offered
here inside the usbb-resources folder for your convenience they are the same ones
from the old official USBB client
To use them, you just need to drag and drop all its contents into your client's
data folder. Then if the client's internal lang flag is set correctly to English
will load all the correct texts from these files.
In case you want to play in Japanese, just use the default Tethealla client and
delete all the files including _e or _eng in the names and then the game will
default everything to its original Japanese language.
Just in case, there's the jpbb-resources folder with the latest localization
changes made on the official JPBB for an extra backup.
---------------------------------------------------------------------------------
PSOBB EP1,2,4 ORIGINAL VANILLA DROP TABLES/RATES
Included in the vanilla-tables folder I placed the original files I created for the
Schtserv vanilla for backup purposes as they are already implemented into the main
newserv logic.
These tables will offer you the experience as close as possible to the original SEGA
servers for PSOBB JP up to the latest patch before the servers shutdown, so besides a
fully functional Episode IV experience, the tables also include the latest special items
which where added to some Episode 1 and Episode 2 in Ultimate for certain section ID's
Vanilla Tables and rates are the same ones as the Schtserv Wiki for reference:
https://bbwiki.schtserv.com/index.php/Drops-ep1
https://bbwiki.schtserv.com/index.php/Drops-ep2
https://bbwiki.schtserv.com/index.php/Drops-ep4
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

After

Width:  |  Height:  |  Size: 9.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

+3
View File
@@ -0,0 +1,3 @@
.\data\help2-0-en.png
.\data\help0-4-en.png
.\data\help0-5-en.png
+6
View File
@@ -0,0 +1,6 @@
.\data\help2-0-en.png
.\data\help0-0-en.png
.\data\help0-1-en.png
.\data\help0-2-en.png
.\data\help0-3-en.png
.\data\help0-7-en.png
+1
View File
@@ -0,0 +1 @@
.\data\help1-1-en.png
+1
View File
@@ -0,0 +1 @@
.\data\help1-0-en.png
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+1538
View File
File diff suppressed because it is too large Load Diff
+11
View File
@@ -0,0 +1,11 @@
star value tables
psobb [B1-437]
00010203 04090909 01020304 05090909 01020304 05090909 01020304 05090909 01020304 05090909 00010203 04090909 01020304 05090909 01020304 05090909 01020304 05090909 00010203 09090901 02030409 09090102 03040909 09090A0A 090A0A09 0A0A090C 0B0A0A0A 0A0A0A0B 0A090A0A 0A0A0A09 0A0A0A0A 0A0A0A0A 0A0A0B0A 0C0C0B0A 0A090A09 090A0A0A 0A0C090C 0B0A090A 090C0A0B 0A0A0A0A 0A0A0A0B 0B0A0A0A 09090A09 0C0A0A0A 0B0A0B09 0A0A090A 0A0B090B 0A0B0B0A 090A090A 0B090A0A 0A0A0A0A 0A0A0A09 090C0C0C 0C0C0C0C 0C0C0C0C 0C0C0C0C 0C0C0C0C 0C0C0C0C 0C0C0009 0A0A0A0B 090A0A09 0A0A0B0A 0A0A0A0A 0A0A0A0A 0A0A0A0A 0A0A0A0A 0A0A0A0A 0B0B0B0B 0B0B0B0B 0B0B0B0A 0C0A0C0B 0A0A0A0A 0A0B0A0B 0B0B0B0B 0A0A090A 0A0A090B 0B0B0B0C 0C0C0C0C 0A0A0C0A 090A0C09 0A0B0A0A 0A0A0C0A 0A0A0A09 0A0C0A09 0A0A0A0A 0A090C0B 09090909 09090909 09090909 09090909 0909090B 0A0C0A0B 0B0C0A0A 0A090A0A 0A0A0B0A 0A0A0A0A 0909090A 0A090C0A 0C0C0C0C 0C0C0C0C 0C0C0C0C 0C0C0C0C 0C0C0C0C 0C0C0C0C 0C0C0C0C 0C0C0102 03040102 03040203 04020304 01020304 01020304 01020304 01020304 01020304 01020304 03040000 00010102 02030304 04050506 06070707 07080808 08080809 09090A0A 0A0A0A0A 0B0C0A0A 0A0A0A0A 0B0B0B0A 0B0B0C0B 0B0B0B0B 0A0A0A0A 0A0A0C09 0909090A 0A0B0C09 0B0A0A0A 0A0A0A0A 0A0A0A0B 0A0A0A0A 0A0A0A00 00010203 03040405 05050606 07070808 08080808 0A0A0A0A 0A0A0909 090A0A0A 0A0A0A0A 0A0A0B0A 0A0B0A09 0909090A 0B0B0000 0B000000 00080808 08080808 09080808 09080808 09070707 07070909 090C0909 09090909 09090909 09090909 09090909 09090909 09090909 09090909 09090909 09090909 09090909 09090909 09090909 0A0A0B0A 0B0A0909 0B0B0B0C 0A0A0A09 0A0A0A0A 090A0A0A 0A0A0A0A 0A0A0A0A 0203050B 0203050B 0203050B 0203050B 0204060B 0204060B 0203050B 080B080A 0B020305 02030502 03050304 06030405 07080B04 06090406 09040609 06090B06 090B0909 09090909 0A0B0B0B 0B0B0B0B 0B0B0B0B 0B0B0B0B 0B0B0B0B 0A0B0B0B 0B0B0B0B
psogc [94-2F7]
00010203 04090909 01020304 05090909 01020304 05090909 01020304 05090909 01020304 05090909 00010203 04090909 01020304 05090909 01020304 05090909 01020304 05090909 00010203 09090901 02030409 09090102 03040909 09090A0A 090A0A09 0A0A090C 0B0A0A0A 0A0A0A0B 0A090A0A 0A0A0A09 0A0A0A0A 0A0A0A0A 0A0A0B0A 0C0C0B0A 0A090A09 090A0A0A 0A0C090C 0B0A090A 090C0A0B 0A0A0A0A 0A0A0A0B 0B0A0A0A 09090A09 0C0A0A0A 0B0A0B09 0A0A090A 0A0B090B 0A0B0B0A 090A090A 0B090A0A 0A0A0A0A 0A0A0A09 090C0C0C 0C0C0C0C 0C0C0C0C 0C0C0C0C 0C0C0C0C 0C0C0C0C 0C0C0009 0A0A0A0B 090A0A09 0A0A0B0A 0A0A0A0A 0A0A0A0A 0A0A0A0A 0A0A0A0A 0A0A0A0A 0B0B0B0B 0B0B0B0B 0B0B0B0A 0C0A0C0B 0A0A0A0A 0A0B0A0B 0B0B0B0B 0A0A090A 0A0A090B 0B0B0B0C 0C0C0C0C 01020304 01020304 02030402 03040102 03040102 03040102 03040102 03040102 03040102 03040304 00000001 01020203 03040405 05060607 07070708 08080808 08090909 0A0A0A0A 0A0A0B0C 0A0A0A0A 0A0A0B0B 0B0A0B0B 0C0B0B0B 0B0B0000 01020303 04040505 05060607 07080808 0808080A 0A0A0A0A 0A090909 0A0A0A0A 0A0A0A0A 0A0B0A0A 0B0A0909 09090A0B 0B000000 00000000 08080808 08080809 08080809 08080809 07070707 07090909 0C090909 09090909 09090909 09090909 09090909 09090909 09090909 09090909 09090909 09090909 09090909 09090909 09090902 03050B02 03050B02 03050B02 03050B02 04060B02 04060B02 03050B08 0B080A0B 02030502 03050203 05030406 03040507 080B0406 09040609 04060906 090B0609 0B090909 090909
0203050B0203050B0203050B0203050B
BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 364 B

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 364 B

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 442 B

+86
View File
@@ -0,0 +1,86 @@
#include "AFSArchive.hh"
#include <stdio.h>
#include <string.h>
#include <phosg/Encoding.hh>
#include <phosg/Filesystem.hh>
#include <phosg/Strings.hh>
using namespace std;
AFSArchive::AFSArchive(shared_ptr<const string> data)
: data(data) {
struct FileHeader {
be_uint32_t magic;
le_uint32_t num_files;
} __attribute__((packed));
struct FileEntry {
le_uint32_t offset;
le_uint32_t size;
} __attribute__((packed));
StringReader r(*this->data);
const auto& header = r.get<FileHeader>();
if (header.magic != 0x41465300) { // 'AFS\0'
throw runtime_error("file is not an AFS archive");
}
while (this->entries.size() < header.num_files) {
const auto& entry = r.get<FileEntry>();
this->entries.emplace_back(Entry{.offset = entry.offset, .size = entry.size});
}
}
pair<const void*, size_t> AFSArchive::get(size_t index) const {
const auto& entry = this->entries.at(index);
if (entry.offset > this->data->size()) {
throw out_of_range("entry begins beyond end of archive");
}
if (entry.offset + entry.size > this->data->size()) {
throw out_of_range("entry extends beyond end of archive");
}
return make_pair(this->data->data() + entry.offset, entry.size);
}
string AFSArchive::get_copy(size_t index) const {
auto ret = this->get(index);
return string(reinterpret_cast<const char*>(ret.first), ret.second);
}
StringReader AFSArchive::get_reader(size_t index) const {
auto ret = this->get(index);
return StringReader(ret.first, ret.second);
}
string AFSArchive::generate(const vector<string>& files, bool big_endian) {
return big_endian ? AFSArchive::generate_t<true>(files) : AFSArchive::generate_t<false>(files);
}
template <bool IsBigEndian>
string AFSArchive::generate_t(const vector<string>& files) {
using U32T = typename std::conditional<IsBigEndian, be_uint32_t, le_uint32_t>::type;
StringWriter w;
w.put_u32b(0x41465300); // 'AFS\0'
w.put<U32T>(files.size());
// It seems entries are aligned to 0x800-byte boundaries, and the file's
// header is always 0x80000 (!) bytes, most of which is unused
uint32_t data_offset = 0x80000;
for (const auto& file : files) {
w.put<U32T>(data_offset);
w.put<U32T>(file.size());
data_offset = (data_offset + file.size() + 0x7FF) & (~0x7FF);
}
w.extend_to(0x80000);
for (const auto& file : files) {
w.write(file);
w.extend_to((w.size() + 0x7FF) & (~0x7FF));
}
return std::move(w.str());
}

Some files were not shown because too many files have changed in this diff Show More