add BB global EXP multiplier

This commit is contained in:
Martin Michelsen
2023-11-15 22:37:56 -08:00
parent 722010c0f7
commit c84d4b134f
6 changed files with 11 additions and 1 deletions
-1
View File
@@ -33,7 +33,6 @@
## PSOBB
- Find any remaining mismatches in enemy indexes / experience
- Support EXP multipliers in config.json
- Fix some edge cases on the BB proxy server (e.g. Change Ship)
- Implement less-common subcommands
- 6xAC: Sort inventory
+3
View File
@@ -3715,6 +3715,9 @@ shared_ptr<Lobby> create_game_generic(
game->battle_player = battle_player;
battle_player->set_lobby(game);
}
if (game->base_version == GameVersion::BB) {
game->base_exp_multiplier = s->bb_global_exp_multiplier;
}
for (size_t x = 0; x < 4; x++) {
game->next_item_id[x] = (0x00200000 * x) + 0x00010000;
+3
View File
@@ -38,6 +38,7 @@ ServerState::ServerState(const char* config_filename, bool is_replay)
ep3_behavior_flags(0),
run_shell_behavior(RunShellBehavior::DEFAULT),
cheat_mode_behavior(BehaviorSwitch::OFF_BY_DEFAULT),
bb_global_exp_multiplier(1),
ep3_card_auction_points(0),
ep3_card_auction_min_size(0),
ep3_card_auction_max_size(0),
@@ -724,6 +725,8 @@ void ServerState::parse_config(const JSON& json, bool is_reload) {
} catch (const out_of_range&) {
}
this->bb_global_exp_multiplier = json.get_int("BBGlobalEXPMultiplier", this->bb_global_exp_multiplier);
set_log_levels_from_json(json.get("LogLevels", JSON::dict()));
if (!is_reload) {
+1
View File
@@ -116,6 +116,7 @@ struct ServerState : public std::enable_shared_from_this<ServerState> {
// Indexed as [type][difficulty][random_choice]
std::vector<std::vector<std::vector<ItemData>>> quest_F95E_results;
std::vector<ItemData> secret_lottery_results;
uint16_t bb_global_exp_multiplier;
std::shared_ptr<Episode3::TournamentIndex> ep3_tournament_index;
+3
View File
@@ -547,6 +547,9 @@
"010132", "010133", "010221", "010224", "010229", "01022B", "010235",
"031000",
],
// EXP multiplier for BB games. This must be an integer due to a client
// limitation, and must be at least 1.
"BBGlobalEXPMultiplier": 1,
// Cheat mode behavior. There are three values:
// "Off": Cheat mode is disabled on the entire server. Cheat mode cannot be
+1
View File
@@ -177,4 +177,5 @@
"010132", "010133", "010221", "010224", "010229", "01022B", "010235",
"031000",
],
"BBGlobalEXPMultiplier": 1,
}