Skip to content

Add-locale-aware-guild-and-arena-team-names-for-random-bots-V2#2088

Open
Wishmaster117 wants to merge 23 commits intomod-playerbots:test-stagingfrom
Wishmaster117:Add-locale-aware-guild-and-arena-team-names-for-random-bots-V2
Open

Add-locale-aware-guild-and-arena-team-names-for-random-bots-V2#2088
Wishmaster117 wants to merge 23 commits intomod-playerbots:test-stagingfrom
Wishmaster117:Add-locale-aware-guild-and-arena-team-names-for-random-bots-V2

Conversation

@Wishmaster117
Copy link
Copy Markdown
Contributor

@Wishmaster117 Wishmaster117 commented Jan 31, 2026

Pull Request

This PR introduces a multi‑language system for random bot guild names and arena team names in mod‑playerbots, allowing each server to generate names matching its configured locale.
It is needed because previously all random guild/arena names were locked to enUS, forcing non‑English servers to manually edit or fork the module.
This change keeps the system lightweight, database‑driven, and fully backward‑compatible thanks to automatic fallback to enUS.


Design Philosophy

This change aligns with the project’s principles:

  • It does not add behavioral realism or complex logic.
  • It keeps performance impact negligible (simple DB column selection).
  • It improves predictability by making localization explicit and controlled.
  • It introduces no AI‑heavy logic and keeps defaults lightweight.

Feature Evaluation

  • Minimum logic required
    Select the correct localized column based on the configured locale, and fall back to enUS if empty.

  • Cheapest acceptable implementation
    Add locale‑specific columns to the two existing tables and adjust the factory to pick the right one. No core changes, no extra processing.

  • Runtime cost across many bots
    Negligible. Name generation already queries the DB; selecting one additional column has no measurable impact.


How to Test the Changes

  • Set DBC.Locale in worldserver.conf (e.g. DBC.Locale = 2 for frFR).
  • Ensure the new locale columns exist in:
    • playerbots_guild_names
    • playerbots_arena_team_names
  • Insert or translate localized names in the appropriate columns.
  • Restart the server and create random bots.
  • Verify:
    • New random guilds use the localized names.
    • If a localized field is empty, the fallback to enUS works.
  • (Optional) To regenerate all random guilds/arena teams:
AiPlayerbot.DeleteRandomBotGuilds = 1
AiPlayerbot.DeleteRandomBotArenaTeams = 1

Restart, then set both back to 0.


Complexity & Impact

  • Does this change add new decision branches?

    • No
    • Yes (explain below)
  • Does this change increase per-bot or per-tick processing?

    • No
    • Yes (describe and justify impact)
  • Could this logic scale poorly under load?

    • No
    • Yes (explain why)

Defaults & Configuration

  • Does this change modify default bot behavior?
    • No
    • Yes (explain why)

If this introduces more advanced or AI-heavy logic:

  • Lightweight mode remains the default
  • More complex behavior is optional and thereby configurable

AI Assistance

  • Was AI assistance used while working on this change?
    • No
    • Yes (explain below)

If yes, please specify:

  • AI tool or model used : Copilot
  • Purpose : To fill this template (I was lazy)
  • Which parts were influenced : The translation French to English
  • Confirmation that everything was manually reviewed and understood : My English is bad but i think all it's ok

Final Checklist

  • Stability is not compromised
  • Performance impact is understood, tested, and acceptable
  • Added logic complexity is justified and explained
  • Documentation updated if needed

Notes for Reviewers

This PR does not increase behavioral realism or bot intelligence.
It simply adds a lightweight, database‑driven localization layer for random guild and arena team names, with zero impact on performance or decision‑making logic.

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud bot commented Feb 3, 2026

Quality Gate Failed Quality Gate failed

Failed conditions
4.0% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

@kadeshar kadeshar changed the base branch from master to test-staging February 6, 2026 19:59
Comment thread src/Bot/Factory/RandomPlayerbotFactory.cpp Outdated
Celandriel and others added 4 commits February 13, 2026 09:16
Master update from Test-staging: Fix ObjectAccessor retrieval, optimize EquipActions, and implement RaidBossHelpers
@Wishmaster117 Wishmaster117 marked this pull request as draft February 16, 2026 21:46
@Wishmaster117
Copy link
Copy Markdown
Contributor Author

Converted to draft till guild and arena bug solved

@Wishmaster117 Wishmaster117 marked this pull request as ready for review February 17, 2026 14:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants