From 08c897cbeaeabcc8338ee563ade62be1d3b9a342 Mon Sep 17 00:00:00 2001 From: James Osborne Date: Fri, 5 Jun 2026 19:19:48 -0400 Subject: [PATCH] Rename Blueballz mode to Brutal Peeps --- src/Client.hh | 2 +- src/Lobby.cc | 6 +- src/Lobby.hh | 4 +- src/Menu.hh | 2 +- src/ReceiveCommands.cc | 130 ++++++++++++++++++++--------------------- src/SendCommands.cc | 28 ++++----- src/ServerState.cc | 28 ++++----- src/ServerState.hh | 12 ++-- 8 files changed, 106 insertions(+), 106 deletions(-) diff --git a/src/Client.hh b/src/Client.hh index ff392179..467f625f 100644 --- a/src/Client.hh +++ b/src/Client.hh @@ -152,7 +152,7 @@ public: uint8_t override_lobby_event = 0xFF; // FF = no override uint8_t override_lobby_number = 0x80; // 80 = no override int64_t override_random_seed = -1; - int8_t selected_blueballz_tier = -1; // -1 = normal lobby/game; 0..10 = requested Blueballz tier + int8_t selected_brutal_peeps_tier = -1; // -1 = normal lobby/game; 0..10 = requested Brutal Peeps tier std::unique_ptr override_variations; VectorXYZF pos; uint32_t floor = 0x0F; diff --git a/src/Lobby.cc b/src/Lobby.cc index a96c8ab7..39318ef4 100644 --- a/src/Lobby.cc +++ b/src/Lobby.cc @@ -228,10 +228,10 @@ void Lobby::create_item_creator(Version logic_version) { effective_section_id, rand_crypt, this->quest ? this->quest->meta.battle_rules : nullptr); - if (this->blueballz_tier >= 0) { - double rare_mult = 1.25 + (static_cast(this->blueballz_tier) * 0.25); + if (this->brutal_peeps_tier >= 0) { + double rare_mult = 1.25 + (static_cast(this->brutal_peeps_tier) * 0.25); this->item_creator->set_rare_drop_rate_multiplier(rare_mult); - this->log.info_f("Blueballz +{} rare drop rate multiplier set to {:g}x", this->blueballz_tier, rare_mult); + this->log.info_f("Brutal Peeps +{} rare drop rate multiplier set to {:g}x", this->brutal_peeps_tier, rare_mult); } if (s->use_legacy_item_random_behavior) { this->item_creator->set_legacy_replay(); diff --git a/src/Lobby.hh b/src/Lobby.hh index a2240fbc..7c80f356 100644 --- a/src/Lobby.hh +++ b/src/Lobby.hh @@ -81,7 +81,7 @@ struct Lobby : public std::enable_shared_from_this { START_BATTLE_PLAYER_IMMEDIATELY = 0x00010000, CANNOT_CHANGE_CHEAT_MODE = 0x00020000, USE_CREATOR_SECTION_ID = 0x00040000, - BLUEBALLZ_PLUS0 = 0x00080000, + BRUTAL_PEEPS_PLUS0 = 0x00080000, // Flags used only for lobbies PUBLIC = 0x01000000, DEFAULT = 0x02000000, @@ -119,7 +119,7 @@ struct Lobby : public std::enable_shared_from_this { Episode episode = Episode::NONE; GameMode mode = GameMode::NORMAL; Difficulty difficulty = Difficulty::NORMAL; - int8_t blueballz_tier = -1; // -1 = disabled; 0..10 = Blueballz +0..+10 + int8_t brutal_peeps_tier = -1; // -1 = disabled; 0..10 = Brutal Peeps +0..+10 float base_exp_multiplier = 1.0f; float exp_share_multiplier = 0.5f; float challenge_exp_multiplier = 1.0f; diff --git a/src/Menu.hh b/src/Menu.hh index e9a4d16d..dd18fdb0 100644 --- a/src/Menu.hh +++ b/src/Menu.hh @@ -47,7 +47,7 @@ constexpr uint32_t BB_TEST_SHIP = 0x11BBBB11; constexpr uint32_t BB_VANILLA_SHIP = 0x11CCCC11; constexpr uint32_t BB_HARDCORE_SHIP = 0x11F00D11; constexpr uint32_t BB_DEV_SHIP = 0x11EEEE11; -constexpr uint32_t BLUEBALLZ_PLUS0 = 0x11DDDD11; +constexpr uint32_t BRUTAL_PEEPS_PLUS0 = 0x11DDDD11; } // namespace MainMenuItemID namespace ClearLicenseConfirmationMenuItemID { diff --git a/src/ReceiveCommands.cc b/src/ReceiveCommands.cc index bb6b86dc..bbc126ac 100644 --- a/src/ReceiveCommands.cc +++ b/src/ReceiveCommands.cc @@ -306,21 +306,21 @@ static void send_main_menu(std::shared_ptr c) { num_players, num_games, num_compatible_games); }, go_to_lobby_menu_item_flags); - bool show_blueballz_menu_items = + bool show_brutal_peeps_menu_items = bb_destination_transport_menu && - s->enable_blueballz && - (s->blueballz_unlocked_tier_v4 >= 0); + s->enable_brutal_peeps_mode && + (s->brutal_peeps_unlocked_tier_v4 >= 0); - if (show_blueballz_menu_items) { - int64_t max_blueballz_menu_tier = std::min( - s->blueballz_max_tier, - s->blueballz_unlocked_tier_v4); + if (show_brutal_peeps_menu_items) { + int64_t max_brutal_peeps_menu_tier = std::min( + s->brutal_peeps_max_tier, + s->brutal_peeps_unlocked_tier_v4); - for (int64_t tier = 0; tier <= max_blueballz_menu_tier; tier++) { + for (int64_t tier = 0; tier <= max_brutal_peeps_menu_tier; tier++) { main_menu->items.emplace_back( - MainMenuItemID::BLUEBALLZ_PLUS0 + static_cast(tier), - std::format("Blueballz +{}", tier), - std::format("Enter Blueballz\n+{}", tier), + MainMenuItemID::BRUTAL_PEEPS_PLUS0 + static_cast(tier), + std::format("Brutal Peeps +{}", tier), + std::format("Enter Brutal Peeps\n+{}", tier), MenuItem::Flag::BB_ONLY); } } @@ -2735,21 +2735,21 @@ void set_lobby_quest(std::shared_ptr l, std::shared_ptr q, b static asio::awaitable on_10_main_menu(std::shared_ptr c, uint32_t item_id) { auto s = c->require_server_state(); - if ((item_id >= MainMenuItemID::BLUEBALLZ_PLUS0) && - (item_id <= (MainMenuItemID::BLUEBALLZ_PLUS0 + 10))) { - int64_t tier = item_id - MainMenuItemID::BLUEBALLZ_PLUS0; + if ((item_id >= MainMenuItemID::BRUTAL_PEEPS_PLUS0) && + (item_id <= (MainMenuItemID::BRUTAL_PEEPS_PLUS0 + 10))) { + int64_t tier = item_id - MainMenuItemID::BRUTAL_PEEPS_PLUS0; - if (!s->enable_blueballz || + if (!s->enable_brutal_peeps_mode || !is_v4(c->version()) || (tier < 0) || - (tier > s->blueballz_max_tier) || - (tier > s->blueballz_unlocked_tier_v4)) { - send_message_box(c, std::format("$C6Blueballz +{} is not available.", tier)); + (tier > s->brutal_peeps_max_tier) || + (tier > s->brutal_peeps_unlocked_tier_v4)) { + send_message_box(c, std::format("$C6Brutal Peeps +{} is not available.", tier)); co_return; } - c->selected_blueballz_tier = tier; - c->log.info_f("Blueballz +{} selected from BB menu", tier); + c->selected_brutal_peeps_tier = tier; + c->log.info_f("Brutal Peeps +{} selected from BB menu", tier); co_await send_auto_patches_if_needed(c); co_await enable_save_if_needed(c); @@ -2762,7 +2762,7 @@ static asio::awaitable on_10_main_menu(std::shared_ptr c, uint32_t switch (item_id) { case MainMenuItemID::GO_TO_LOBBY: { - c->selected_blueballz_tier = -1; + c->selected_brutal_peeps_tier = -1; co_await send_auto_patches_if_needed(c); co_await enable_save_if_needed(c); send_lobby_list(c); @@ -2775,12 +2775,12 @@ static asio::awaitable on_10_main_menu(std::shared_ptr c, uint32_t break; } - case MainMenuItemID::BLUEBALLZ_PLUS0: { - if (!s->enable_blueballz || (c->version() != Version::DC_V2) || (s->blueballz_unlocked_tier_v2 < 0)) { - send_message_box(c, "$C6Blueballz +0 is not available."); + case MainMenuItemID::BRUTAL_PEEPS_PLUS0: { + if (!s->enable_brutal_peeps_mode || (c->version() != Version::DC_V2) || (s->brutal_peeps_unlocked_tier_v2 < 0)) { + send_message_box(c, "$C6Brutal Peeps +0 is not available."); break; } - c->selected_blueballz_tier = 0; + c->selected_brutal_peeps_tier = 0; co_await send_auto_patches_if_needed(c); co_await enable_save_if_needed(c); send_lobby_list(c); @@ -2807,7 +2807,7 @@ static asio::awaitable on_10_main_menu(std::shared_ptr c, uint32_t } if ((c->listener_port == 12000) || (c->listener_port == 12001) || (c->listener_port == 19145) || (c->listener_port == 19146)) { - c->selected_blueballz_tier = -1; + c->selected_brutal_peeps_tier = -1; co_await send_auto_patches_if_needed(c); co_await enable_save_if_needed(c); send_lobby_list(c); @@ -2826,7 +2826,7 @@ static asio::awaitable on_10_main_menu(std::shared_ptr c, uint32_t break; } if ((c->listener_port == 19345) || (c->listener_port == 19346)) { - c->selected_blueballz_tier = -1; + c->selected_brutal_peeps_tier = -1; co_await send_auto_patches_if_needed(c); co_await enable_save_if_needed(c); send_lobby_list(c); @@ -2847,7 +2847,7 @@ static asio::awaitable on_10_main_menu(std::shared_ptr c, uint32_t break; } if ((c->listener_port == 19445) || (c->listener_port == 19446)) { - c->selected_blueballz_tier = -1; + c->selected_brutal_peeps_tier = -1; co_await send_auto_patches_if_needed(c); co_await enable_save_if_needed(c); send_lobby_list(c); @@ -2868,7 +2868,7 @@ static asio::awaitable on_10_main_menu(std::shared_ptr c, uint32_t break; } if ((c->listener_port == 19245) || (c->listener_port == 19246)) { - c->selected_blueballz_tier = -1; + c->selected_brutal_peeps_tier = -1; co_await send_auto_patches_if_needed(c); co_await enable_save_if_needed(c); send_lobby_list(c); @@ -5081,27 +5081,27 @@ std::shared_ptr create_game_generic( if (creator_c->check_flag(Client::Flag::IS_CLIENT_CUSTOMIZATION)) { game->set_flag(Lobby::Flag::IS_CLIENT_CUSTOMIZATION); } - game->log.info_f("PSO Peeps BBZ debug: created game name=[{}] version={} difficulty={} enable_blueballz={} unlocked_v4={} max_tier={}", + game->log.info_f("PSO Peeps Brutal Peeps debug: created game name=[{}] version={} difficulty={} enable_brutal_peeps_mode={} unlocked_v4={} max_tier={}", name, static_cast(creator_c->version()), name_for_difficulty(difficulty), - s->enable_blueballz, - s->blueballz_unlocked_tier_v4, - s->blueballz_max_tier); - int8_t requested_blueballz_tier = -1; - bool requested_blueballz = false; - std::string requested_blueballz_source = "none"; + s->enable_brutal_peeps_mode, + s->brutal_peeps_unlocked_tier_v4, + s->brutal_peeps_max_tier); + int8_t requested_brutal_peeps_tier = -1; + bool requested_brutal_peeps = false; + std::string requested_brutal_peeps_source = "none"; - if (creator_c->selected_blueballz_tier >= 0) { - requested_blueballz = true; - requested_blueballz_tier = creator_c->selected_blueballz_tier; - requested_blueballz_source = "BB menu selection"; + if (creator_c->selected_brutal_peeps_tier >= 0) { + requested_brutal_peeps = true; + requested_brutal_peeps_tier = creator_c->selected_brutal_peeps_tier; + requested_brutal_peeps_source = "BB menu selection"; } else { size_t bb_prefix_offset = name.find("[BB+"); if (bb_prefix_offset != std::string::npos) { - requested_blueballz = true; - requested_blueballz_source = "room prefix"; + requested_brutal_peeps = true; + requested_brutal_peeps_source = "room prefix"; size_t tier_start_offset = bb_prefix_offset + 4; size_t close_offset = name.find(']', tier_start_offset); if (close_offset != std::string::npos) { @@ -5115,35 +5115,35 @@ std::shared_ptr create_game_generic( } if (tier_str_valid) { int64_t parsed_tier = std::stoll(tier_str); - if ((parsed_tier >= 0) && (parsed_tier <= s->blueballz_max_tier)) { - requested_blueballz_tier = parsed_tier; + if ((parsed_tier >= 0) && (parsed_tier <= s->brutal_peeps_max_tier)) { + requested_brutal_peeps_tier = parsed_tier; } } } } } - if (requested_blueballz_tier >= 0) { - if (s->enable_blueballz && + if (requested_brutal_peeps_tier >= 0) { + if (s->enable_brutal_peeps_mode && is_v4(creator_c->version()) && (difficulty == Difficulty::ULTIMATE) && - (requested_blueballz_tier <= s->blueballz_unlocked_tier_v4)) { - game->blueballz_tier = requested_blueballz_tier; - game->set_flag(Lobby::Flag::BLUEBALLZ_PLUS0); - game->log.info_f("Blueballz +{} enabled for BB Ultimate game via {}", - static_cast(game->blueballz_tier), - requested_blueballz_source); + (requested_brutal_peeps_tier <= s->brutal_peeps_unlocked_tier_v4)) { + game->brutal_peeps_tier = requested_brutal_peeps_tier; + game->set_flag(Lobby::Flag::BRUTAL_PEEPS_PLUS0); + game->log.info_f("Brutal Peeps +{} enabled for BB Ultimate game via {}", + static_cast(game->brutal_peeps_tier), + requested_brutal_peeps_source); } else { - game->log.info_f("Blueballz +{} room prefix ignored; enable={}, version={}, difficulty={}, unlocked_v4={}, max_tier={}", - static_cast(requested_blueballz_tier), - s->enable_blueballz, + game->log.info_f("Brutal Peeps +{} room prefix ignored; enable={}, version={}, difficulty={}, unlocked_v4={}, max_tier={}", + static_cast(requested_brutal_peeps_tier), + s->enable_brutal_peeps_mode, static_cast(creator_c->version()), name_for_difficulty(difficulty), - s->blueballz_unlocked_tier_v4, - s->blueballz_max_tier); + s->brutal_peeps_unlocked_tier_v4, + s->brutal_peeps_max_tier); } - } else if (requested_blueballz) { - game->log.info_f("Blueballz room prefix ignored; invalid prefix in room name: {}", name); + } else if (requested_brutal_peeps) { + game->log.info_f("Brutal Peeps room prefix ignored; invalid prefix in room name: {}", name); } while (game->floor_item_managers.size() < 0x12) { @@ -5188,14 +5188,14 @@ std::shared_ptr create_game_generic( battle_player->set_lobby(game); } game->base_exp_multiplier = s->bb_global_exp_multiplier; - if (game->blueballz_tier >= 0) { - float blueballz_exp_multiplier = 1.0f + (static_cast(game->blueballz_tier) * 0.25f); - game->base_exp_multiplier *= blueballz_exp_multiplier; - game->log.info_f("Blueballz +{} EXP multiplier set to {:g}x total (BBGlobalEXPMultiplier={:g}, blueballz={:g})", - static_cast(game->blueballz_tier), + if (game->brutal_peeps_tier >= 0) { + float brutal_peeps_exp_multiplier = 1.0f + (static_cast(game->brutal_peeps_tier) * 0.25f); + game->base_exp_multiplier *= brutal_peeps_exp_multiplier; + game->log.info_f("Brutal Peeps +{} EXP multiplier set to {:g}x total (BBGlobalEXPMultiplier={:g}, brutal_peeps={:g})", + static_cast(game->brutal_peeps_tier), game->base_exp_multiplier, s->bb_global_exp_multiplier, - blueballz_exp_multiplier); + brutal_peeps_exp_multiplier); } game->exp_share_multiplier = s->exp_share_multiplier; diff --git a/src/SendCommands.cc b/src/SendCommands.cc index fd9bdb19..46dffd95 100644 --- a/src/SendCommands.cc +++ b/src/SendCommands.cc @@ -699,7 +699,7 @@ void send_guild_card_chunk_bb(std::shared_ptr c, size_t chunk_index) { -static bool is_battle_param_stream_file_for_blueballz(const std::string& filename) { +static bool is_battle_param_stream_file_for_brutal_peeps(const std::string& filename) { return (filename == "BattleParamEntry.dat") || (filename == "BattleParamEntry_on.dat") || (filename == "BattleParamEntry_lab.dat") || @@ -711,20 +711,20 @@ static bool is_battle_param_stream_file_for_blueballz(const std::string& filenam static std::string bb_stream_file_data_for_client(std::shared_ptr c) { auto s = c->require_server_state(); - int64_t effective_blueballz_hp_scale_tier = (c->selected_blueballz_tier >= 0) - ? c->selected_blueballz_tier - : s->blueballz_enemy_hp_scale_tier; + int64_t effective_brutal_peeps_hp_scale_tier = (c->selected_brutal_peeps_tier >= 0) + ? c->selected_brutal_peeps_tier + : s->brutal_peeps_enemy_hp_scale_tier; - if (effective_blueballz_hp_scale_tier < 0) { + if (effective_brutal_peeps_hp_scale_tier < 0) { return s->bb_stream_file->data; } - effective_blueballz_hp_scale_tier = std::min( - s->blueballz_max_tier, - effective_blueballz_hp_scale_tier); + effective_brutal_peeps_hp_scale_tier = std::min( + s->brutal_peeps_max_tier, + effective_brutal_peeps_hp_scale_tier); std::string scaled_data = s->bb_stream_file->data; - double mult = 1.0 + (static_cast(effective_blueballz_hp_scale_tier) * 0.25); + double mult = 1.0 + (static_cast(effective_brutal_peeps_hp_scale_tier) * 0.25); size_t ultimate_index = static_cast(Difficulty::ULTIMATE); auto scale_u16 = [mult](uint32_t v) -> uint16_t { @@ -742,19 +742,19 @@ static std::string bb_stream_file_data_for_client(std::shared_ptr c) { }; for (const auto& sf_entry : s->bb_stream_file->entries) { - if (!is_battle_param_stream_file_for_blueballz(sf_entry.filename)) { + if (!is_battle_param_stream_file_for_brutal_peeps(sf_entry.filename)) { continue; } if ((sf_entry.offset > scaled_data.size()) || (sf_entry.size > (scaled_data.size() - sf_entry.offset))) { - c->log.warning_f("Blueballz enemy HP scaling skipped for {}; invalid stream-file range", + c->log.warning_f("Brutal Peeps enemy HP scaling skipped for {}; invalid stream-file range", sf_entry.filename); continue; } if (sf_entry.size < sizeof(BattleParamsIndex::Table)) { - c->log.warning_f("Blueballz enemy HP scaling skipped for {}; file is too small", + c->log.warning_f("Brutal Peeps enemy HP scaling skipped for {}; file is too small", sf_entry.filename); continue; } @@ -767,8 +767,8 @@ static std::string bb_stream_file_data_for_client(std::shared_ptr c) { stats.char_stats.hp = scale_u16(stats.char_stats.hp); } - c->log.info_f("Blueballz enemy HP scaling: serving {} with tier {} ({:g}x Ultimate HP)", - sf_entry.filename, effective_blueballz_hp_scale_tier, mult); + c->log.info_f("Brutal Peeps enemy HP scaling: serving {} with tier {} ({:g}x Ultimate HP)", + sf_entry.filename, effective_brutal_peeps_hp_scale_tier, mult); } return scaled_data; diff --git a/src/ServerState.cc b/src/ServerState.cc index 5edf249d..41f77686 100644 --- a/src/ServerState.cc +++ b/src/ServerState.cc @@ -955,22 +955,22 @@ void ServerState::load_config_early() { this->default_switch_assist_enabled = this->config_json->get_bool("EnableSwitchAssistByDefault", false); this->use_game_creator_section_id = this->config_json->get_bool("UseGameCreatorSectionID", false); this->enable_bb_ship_selection_menu = this->config_json->get_bool("EnableBBShipSelectionMenu", false); - this->enable_blueballz = this->config_json->get_bool("EnableBlueballz", false); + this->enable_brutal_peeps_mode = this->config_json->get_bool("EnableBrutalPeepsMode", false); this->enable_hardcore_mode = this->config_json->get_bool("EnableHardcoreMode", false); this->enable_test_mode = this->config_json->get_bool("EnableTestMode", false); - this->blueballz_max_tier = std::min(10, std::max(0, this->config_json->get_int("BlueballzMaxTier", 10))); - this->blueballz_unlocked_tier_v2 = std::min( - this->blueballz_max_tier, - std::max(-1, this->config_json->get_int("BlueballzUnlockedTierV2", -1))); - this->blueballz_unlocked_tier_v3 = std::min( - this->blueballz_max_tier, - std::max(-1, this->config_json->get_int("BlueballzUnlockedTierV3", -1))); - this->blueballz_unlocked_tier_v4 = std::min( - this->blueballz_max_tier, - std::max(-1, this->config_json->get_int("BlueballzUnlockedTierV4", -1))); - this->blueballz_enemy_hp_scale_tier = std::min( - this->blueballz_max_tier, - std::max(-1, this->config_json->get_int("BlueballzEnemyHPScaleTier", -1))); + this->brutal_peeps_max_tier = std::min(10, std::max(0, this->config_json->get_int("BrutalPeepsMaxTier", 10))); + this->brutal_peeps_unlocked_tier_v2 = std::min( + this->brutal_peeps_max_tier, + std::max(-1, this->config_json->get_int("BrutalPeepsUnlockedTierV2", -1))); + this->brutal_peeps_unlocked_tier_v3 = std::min( + this->brutal_peeps_max_tier, + std::max(-1, this->config_json->get_int("BrutalPeepsUnlockedTierV3", -1))); + this->brutal_peeps_unlocked_tier_v4 = std::min( + this->brutal_peeps_max_tier, + std::max(-1, this->config_json->get_int("BrutalPeepsUnlockedTierV4", -1))); + this->brutal_peeps_enemy_hp_scale_tier = std::min( + this->brutal_peeps_max_tier, + std::max(-1, this->config_json->get_int("BrutalPeepsEnemyHPScaleTier", -1))); this->rare_notifs_enabled_for_client_drops = this->config_json->get_bool("RareNotificationsEnabledForClientDrops", false); this->default_rare_notifs_enabled_v1_v2 = this->config_json->get_bool("RareNotificationsEnabledByDefault", false); this->default_rare_notifs_enabled_v3_v4 = this->default_rare_notifs_enabled_v1_v2; diff --git a/src/ServerState.hh b/src/ServerState.hh index e26e3bcd..6f2e2830 100644 --- a/src/ServerState.hh +++ b/src/ServerState.hh @@ -175,14 +175,14 @@ struct ServerState : public std::enable_shared_from_this { bool use_game_creator_section_id = false; bool enable_bb_ship_selection_menu = false; bool use_psov2_rand_crypt = false; // Used in some tests - bool enable_blueballz = false; - int64_t blueballz_enemy_hp_scale_tier = -1; // -1 = disabled; 0..10 = scale BB enemy HP in stream files + bool enable_brutal_peeps_mode = false; + int64_t brutal_peeps_enemy_hp_scale_tier = -1; // -1 = disabled; 0..10 = scale BB enemy HP in stream files bool enable_hardcore_mode = false; bool enable_test_mode = false; - int8_t blueballz_max_tier = 10; - int8_t blueballz_unlocked_tier_v2 = 0; - int8_t blueballz_unlocked_tier_v3 = 0; - int8_t blueballz_unlocked_tier_v4 = 0; + int8_t brutal_peeps_max_tier = 10; + int8_t brutal_peeps_unlocked_tier_v2 = 0; + int8_t brutal_peeps_unlocked_tier_v3 = 0; + int8_t brutal_peeps_unlocked_tier_v4 = 0; bool use_legacy_item_random_behavior = false; // Used in some tests bool rare_notifs_enabled_for_client_drops = false; bool default_rare_notifs_enabled_v1_v2 = false;