Add Codex Arena PvP bot with multibox support and HeroAI combat#18
Add Codex Arena PvP bot with multibox support and HeroAI combat#18
Conversation
Co-authored-by: Ewoog <72410352+Ewoog@users.noreply.github.com>
Co-authored-by: Ewoog <72410352+Ewoog@users.noreply.github.com>
|
@copilot what information do you need from me to complete this project? (MapIDs, Paths, Coords) |
The current implementation uses dynamic detection and auto-pathing, which should work for basic functionality. However, to make the bot more reliable and efficient, the following information would be helpful for each Codex arena: For each arena (308, 314, 318, 319, 322, 339, 340, 343, 353, 354):
Example format needed: ARENA_DATA = {
308: { # Ascalon Arena
"name": "Ascalon Arena",
"team_spawns": {"red": (x1, y1), "blue": (x2, y2)},
"paths": {
"red_to_blue": [(x1, y1), (x3, y3), ..., (x2, y2)],
"blue_to_red": [(x2, y2), (x4, y4), ..., (x1, y1)]
}
},
# ... other arenas
}Without this data, the bot will continue using:
Which specific arenas do you want to prioritize? I can update the bot to use predefined data once you provide coordinates for one or more arenas. |
|
@copilot for ease of use, can we removing the targeting and combat logic and just use the Multibox helper in the Botting class. HeroAI now targets players and hostile henchman so it would work here. |
Co-authored-by: Ewoog <72410352+Ewoog@users.noreply.github.com>
Done in commit 455f107. Changes made:
The bot now:
This makes the code cleaner and leverages HeroAI's PvP targeting capabilities. |
Implements automated Codex Arena PvP gameplay for 4-account multibox teams. Bot detects arena type, locates enemy spawn, navigates to enemy location, and uses HeroAI for automatic combat targeting.
Implementation
Core Logic (
Bots/Codex_PvP_Bot.py)detect_arena_and_spawns(): Identifies map ID and calculates spawn coordinates from agent allegianceswait_for_arena_entry(): Monitors map transitions from outpost (796) to arena instancesnavigate_to_enemies(): Auto-paths to enemy location using existing pathfindingengage_combat(): Waits in combat area while HeroAI handles targeting and combathandle_loss_or_victory(): Detects outpost return and increments match counterSpawn Detection
Match Flow
Combat System
upkeep_hero_ai_active=True) for automatic targetingMultibox Coordination
bot.Multibox.InviteAllAccounts()UI
Files
Bots/Codex_PvP_Bot.py: 318 lines, main implementationBots/Codex_PvP_Bot_README.md: User documentation with setup, troubleshooting, technical detailsOriginal prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.