Play AethroPlay Aethro Website ↗

oh got Paul I started to talk to google AI again!!

91 views · 2 posts

#70

========================================================================
SERVER CONFIGURATION GUIDE: FIXING PLAYERBOTS FOR CUSTOM FACTIONS
========================================================================

THE PROBLEM:
Right now, the Faction Selection NPC in Mt. Hyjal is likely only modifying 
player reputation values or applying a surface-level flag. Because the core 
'faction' template in the 'characters' database table remains unchanged, 
the game engine and 'mod-playerbot' still view a Human player as Alliance. 
This is why the `.playerbots bot addclass` command spawns Alliance bots.

Follow the steps below to fix the NPC script and database so that the 
bots correctly recognize custom factions while keeping the server a strict, 
hostile PvP realm.

========================================================================
STEP 1: FIX THE FACTION SELECTION NPC SCRIPT
========================================================================
The NPC script must explicitly change the player's core Faction Template ID 
instead of just altering reputations. 

Depending on how the Mt. Hyjal NPC was coded, apply the appropriate fix 
to the "Join Horde" selection option:

A) If the NPC is written in Eluna (Lua):
----------------------------------------
Locate the Horde selection block in the Lua script and ensure it updates 
the faction template and saves it:

    player:SetFaction(67) -- Sets the official Horde Player template
    player:SaveToDB()

B) If the NPC is written in C++:
--------------------------------
Locate the GossipSelect or equivalent function for the Horde option and add:

    player->SetFaction(67); // Sets the official Horde Player template
    player->SaveToDB();

*Note for Alliance Option: If players can also choose Alliance, ensure the 
Alliance option explicitly forces Faction Template ID '1'.

========================================================================
STEP 2: CRITICAL MODULE CONFIGURATIONS
========================================================================
Open the configuration files located in your server's module config folder 
(usually `env/etc/modules/` or `<server_dir>/configs/modules/`).

In 'playerbots.conf':
---------------------
Ensure cross-faction grouping is enabled for bots. This allows the bot system 
to look past hardcoded race checks when forming a group with your custom 
faction setups:

    AiPlayerbot.CrossFactionGroupInvite = 1

Ensure 'mod-cross-faction' is DISABLED or properly configured:
--------------------------------------------------------------
Do NOT enable full friendly cross-faction modules (like standard 
mod-cross-faction presets), otherwise the factions will stop being hostile 
to each other in the world, ruining the PvP aspect.

========================================================================
STEP 3: FIX EXISTING TEST CHARACTERS (SQL)
========================================================================
Characters created before this NPC fix will still have the wrong faction 
template in the database. Run this SQL query in your database manager 
(HeidiSQL, Navicat, etc.) on the 'characters' database to manually fix them:

-- Change a specific character to the Horde Faction Template (67)
UPDATE characters SET faction = 67 WHERE name = 'CharacterName';

-- Change a specific character to the Alliance Faction Template (1)
UPDATE characters SET faction = 1 WHERE name = 'CharacterName';

========================================================================
STEP 4: FIX THE LANGUAGE BARRIER (IN-GAME GM COMMANDS)
========================================================================
Because a Human player on the Horde is physically still a Human, the game 
client might still try to make them speak Common instead of Orcish. 
Target the player character in-game and use these GM commands:

To teach them Orcish:
    .learn 669

To remove Common (Optional, if you want full immersion):
    .learn unlearn 98

========================================================================
RECOMMENDED ALTERNATIVE IN-GAME BOT COMMAND: CLONING
========================================================================
If the random bot engine still struggles with the hardcoded race arrays 
in the C++ code, players can completely bypass the 'addclass' limitation 
by using the clone command. 

1. Log into your custom Human Horde character.
2. Target yourself.
3. Type the following command in chat:
    .playerbots bot clone

This duplicates your exact character profile—complete with your custom 
Horde database flags—directly into the bot pool, ensuring they behave 
perfectly as Horde units.
========================================================================

0 reputation
#76

Thanks for taking the time to write this up and for looking into the playerbot faction issue. I appreciate the suggestions.

Our server handles faction and allegiance a bit differently, so some of these steps may not apply directly to our setup. We’ll verify the existing character data, NPC behavior, playerbot configuration, and language handling before making any changes.

Signature
Aethro Imagine Your World.
0 reputation
Sign in to participate