Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
272588c
Loot strategy improvement
Wishmaster117 Sep 2, 2025
ef4fe3c
Changes asked on review
Wishmaster117 Sep 3, 2025
aa17c07
Final version
Wishmaster117 Sep 4, 2025
9fe867f
Merge branch 'liyunfan1223:master' into Loot-System-Improvment
Wishmaster117 Sep 11, 2025
0116e93
Merge pull request #3 from liyunfan1223/master
Wishmaster117 Sep 16, 2025
02eca5b
Review correction
Wishmaster117 Sep 16, 2025
a007988
Update LootRollAction.cpp
Wishmaster117 Sep 16, 2025
1af193b
Update playerbots.conf.dist
Wishmaster117 Sep 16, 2025
9a0a7ab
Merge branch 'liyunfan1223:master' into Loot-System-Improvment
Wishmaster117 Sep 17, 2025
0ac1343
Merge branch 'liyunfan1223:master' into Loot-System-Improvment
Wishmaster117 Sep 18, 2025
6ddf1a9
Update for review requests
Wishmaster117 Sep 18, 2025
c915799
Merge branch 'liyunfan1223:master' into Loot-System-Improvment
Wishmaster117 Sep 18, 2025
bd07dd4
Create 2025_09_18_00_ai_playerbot_french_texts.sql
Wishmaster117 Sep 18, 2025
16bb0f1
Update 2025_09_18_00_ai_playerbot_french_texts.sql
Wishmaster117 Sep 19, 2025
e58ee9f
Merge branch 'ai-playerbot-French-texts' into Loot-System-Improvment
Wishmaster117 Sep 19, 2025
5b9b3d7
remove wrong sql file
Wishmaster117 Sep 19, 2025
8fb69b3
Merge branch 'liyunfan1223:master' into Loot-System-Improvment
Wishmaster117 Sep 20, 2025
dd18892
Add Logic for Professions Recipes
Wishmaster117 Sep 20, 2025
b9fba11
Merge branch 'master' into Loot-System-Improvment
Wishmaster117 Sep 20, 2025
65a63ee
Added the ability to choose disenchant on loot if the bot is enchanting
Wishmaster117 Sep 20, 2025
ed142aa
Update LootRollAction.cpp
Wishmaster117 Sep 21, 2025
ca29b0c
Merge branch 'liyunfan1223:master' into Loot-System-Improvment
Wishmaster117 Sep 21, 2025
5cf5b8b
add “special item” verification via stat-pattern hook
Wishmaster117 Sep 22, 2025
a0d80e7
Merge branch 'liyunfan1223:master' into Loot-System-Improvment
Wishmaster117 Sep 26, 2025
1ba3853
Remove announceLootRollsToMaster
Wishmaster117 Sep 26, 2025
69e3bf1
Changes asked on review
Wishmaster117 Sep 26, 2025
eb89c97
Merge branch 'liyunfan1223:master' into Loot-System-Improvment
Wishmaster117 Sep 27, 2025
c749fe9
Merge branch 'liyunfan1223:master' into Loot-System-Improvment
Wishmaster117 Sep 27, 2025
df16ef3
Update LootRollAction.cpp
Wishmaster117 Sep 29, 2025
4abd9b8
Merge branch 'liyunfan1223:master' into Loot-System-Improvment
Wishmaster117 Sep 29, 2025
9c0d5d7
Merge branch 'liyunfan1223:master' into Loot-System-Improvment
Wishmaster117 Oct 1, 2025
9d12bf0
Merge branch 'liyunfan1223:master' into Loot-System-Improvment
Wishmaster117 Oct 2, 2025
1dc602e
Merge branch 'liyunfan1223:master' into Loot-System-Improvment
Wishmaster117 Oct 2, 2025
f6de181
Merge branch 'liyunfan1223:master' into Loot-System-Improvment
Wishmaster117 Oct 3, 2025
341676b
Update LootRollAction.cpp
Wishmaster117 Oct 6, 2025
f2db90b
Code formating
Wishmaster117 Oct 6, 2025
26c6945
Merge branch 'master' into Loot-System-Improvment
Wishmaster117 Oct 6, 2025
be62f1c
Update PlayerbotAIConfig.cpp
Wishmaster117 Oct 6, 2025
06846a9
Merge branch 'Loot-System-Improvment' of https://github.com/Wishmaste…
Wishmaster117 Oct 6, 2025
96e2733
Update PlayerbotAIConfig.cpp
Wishmaster117 Oct 6, 2025
c32132a
Update LootRollAction.cpp
Wishmaster117 Oct 6, 2025
2476b19
Update LootRollAction.cpp
Wishmaster117 Oct 17, 2025
3d51600
Merge branch 'master' into Loot-System-Improvment
Wishmaster117 Nov 10, 2025
c8a71f0
Enforce armor-tier logic for loot rolls + optional PASS on off-armor
Wishmaster117 Nov 10, 2025
2df698f
Merge branch 'mod-playerbots:master' into Loot-System-Improvment
Wishmaster117 Nov 15, 2025
6e8204b
Merge branch 'mod-playerbots:master' into Loot-System-Improvment
Wishmaster117 Nov 19, 2025
c8898b8
Merge branch 'mod-playerbots:master' into Loot-System-Improvment
Wishmaster117 Nov 21, 2025
d7f4897
correct some decisions
Wishmaster117 Nov 22, 2025
33a0ce9
Lasts adjustments
Wishmaster117 Nov 22, 2025
1b5f722
More precise roll adjustments
Wishmaster117 Nov 22, 2025
6e0878e
Switch to log debug
Wishmaster117 Nov 22, 2025
9a676dd
Remove commented code
Wishmaster117 Nov 22, 2025
d3c1bbb
Fix codestyle
Wishmaster117 Nov 24, 2025
ba29cc9
Update LootRollAction.cpp
Wishmaster117 Nov 24, 2025
141e5d5
codestyle fix
Wishmaster117 Nov 24, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 56 additions & 3 deletions conf/playerbots.conf.dist
Original file line number Diff line number Diff line change
Expand Up @@ -288,9 +288,62 @@ AiPlayerbot.TwoRoundsGearInit = 0
# Default: 0 (disabled)
AiPlayerbot.FreeMethodLoot = 0

# Bots' loot roll level (0 = pass, 1 = greed, 2 = need)
# Default: 1 (greed)
AiPlayerbot.LootRollLevel = 1
# Bots' loot roll level:
# 0 = always pass
# 1 = always greed (legacy default, bots never roll "need")
# 2 = allow need (recommended with new loot AI)
#
# With the new loot AI, bots can correctly decide when an item is really useful.
# Setting this to 2 lets them use "need" appropriately. Value 1 only does greed,
# which was the old safe default but bypasses the new decision-making.
AiPlayerbot.LootRollLevel = 2

# NEED only if the item matches the bot's MAIN spec (stats & armor/weapon type).
# Off-spec upgrades are automatically downgraded to GREED.
# Default: 1 (enabled)
AiPlayerbot.Roll.SmartNeedBySpec = 1

# Bind-on-Equip etiquette: GREED by default to keep it tradeable.
# Set to 1 to allow NEED on BoE if it's a clear upgrade.
# Default: 1 (enabled)
AiPlayerbot.Roll.AllowBoENeedIfUpgrade = 1

# Bind-on-Use etiquette: GREED by default to keep it tradeable.
# Set to 1 to allow NEED on BoU if it's a clear upgrade.
# Default: 1 (enabled)
AiPlayerbot.Roll.AllowBoUNeedIfUpgrade = 1

# If Need-Before-Greed is active and the item is only useful for disenchanting,
# bots will press the "Disenchant" button instead of GREED.
# Default: 1 (enabled)
AiPlayerbot.Roll.UseDEButton = 1

# NEED on learnable profession recipes/patterns/books if the bot has the profession.
# Default: 1 (enabled)
AiPlayerbot.Roll.NeedOnProfessionRecipes = 1

# Ignore required skill rank when deciding NEED on profession recipes (not recommended for strict etiquette).
# Default: 0 (disabled)
AiPlayerbot.Roll.Recipes.IgnoreSkillRank = 0

# Cross-armor rule (cloth/leather/mail on a plate user, etc.):
# Allow NEED only if newScore >= CrossArmorExtraMargin * bestEquippedScore.
# Default: 1.20 (conservative). Use 9.99 to effectively forbid cross-armor NEED.
AiPlayerbot.Roll.CrossArmorExtraMargin = 1.20

# Cross-armor policy: when an off-armor (lower tier) item is not primary, should bots PASS instead of GREED?
# false (0): cross-armor -> GREED (default, legacy behavior)
# true (1): cross-armor -> PASS (bots won't roll at all on off-armor)
# Default: 0 (false)
AiPlayerbot.Roll.CrossArmorGreedIsPass = 0

# Minimum item level delta to treat a SET TOKEN as a real upgrade (0 means >=).
# Prevents NEED on same-tier duplicates.
# Example: Paladin Prot with chest ilvl 232:
# - “Trophy of the Crusade” (ilvl 245) => NEED allowed.
# - Token ilvl 232 with TokenILevelMargin=0.1 => GREED (no same-tier NEED).
# Default: 0.1
AiPlayerbot.Roll.TokenILevelMargin = 0.1

#
#
Expand Down
9 changes: 9 additions & 0 deletions src/PlayerbotAIConfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -610,6 +610,15 @@ bool PlayerbotAIConfig::Initialize()
autoPickReward = sConfigMgr->GetOption<std::string>("AiPlayerbot.AutoPickReward", "yes");
autoEquipUpgradeLoot = sConfigMgr->GetOption<bool>("AiPlayerbot.AutoEquipUpgradeLoot", true);
equipUpgradeThreshold = sConfigMgr->GetOption<float>("AiPlayerbot.EquipUpgradeThreshold", 1.1f);
allowBoENeedIfUpgrade = sConfigMgr->GetOption<bool>("AiPlayerbot.Roll.AllowBoENeedIfUpgrade", true);
allowBoUNeedIfUpgrade = sConfigMgr->GetOption<bool>("AiPlayerbot.Roll.AllowBoUNeedIfUpgrade", true);
crossArmorExtraMargin = sConfigMgr->GetOption<float>("AiPlayerbot.Roll.CrossArmorExtraMargin", 1.20f);
crossArmorGreedIsPass = sConfigMgr->GetOption<bool>("AiPlayerbot.Roll.CrossArmorGreedIsPass", false);
useDEButton = sConfigMgr->GetOption<bool>("AiPlayerbot.Roll.UseDEButton", true);
tokenILevelMargin = sConfigMgr->GetOption<float>("AiPlayerbot.Roll.TokenILevelMargin", 0.10f);
needOnProfessionRecipes = sConfigMgr->GetOption<bool>("AiPlayerbot.Roll.NeedOnProfessionRecipes", true);
recipesIgnoreSkillRank = sConfigMgr->GetOption<bool>("AiPlayerbot.Roll.Recipes.IgnoreSkillRank", false);
smartNeedBySpec = sConfigMgr->GetOption<bool>("AiPlayerbot.Roll.SmartNeedBySpec", true);
twoRoundsGearInit = sConfigMgr->GetOption<bool>("AiPlayerbot.TwoRoundsGearInit", false);
syncQuestWithPlayer = sConfigMgr->GetOption<bool>("AiPlayerbot.SyncQuestWithPlayer", true);
syncQuestForPlayer = sConfigMgr->GetOption<bool>("AiPlayerbot.SyncQuestForPlayer", false);
Expand Down
36 changes: 16 additions & 20 deletions src/PlayerbotAIConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ enum NewRpgStatus : int
class PlayerbotAIConfig
{
public:
PlayerbotAIConfig(){};
PlayerbotAIConfig() {};
static PlayerbotAIConfig* instance()
{
static PlayerbotAIConfig instance;
Expand Down Expand Up @@ -343,6 +343,16 @@ class PlayerbotAIConfig
std::string autoPickReward;
bool autoEquipUpgradeLoot;
float equipUpgradeThreshold;
bool allowBoENeedIfUpgrade; // Loot roll fine-tuning
bool allowBoUNeedIfUpgrade; // Allow NEED on BoU if upgrade
float crossArmorExtraMargin;
bool crossArmorGreedIsPass; // If true, off-armor (lower tier) GREED becomes PASS
bool useDEButton; // Allow "Disenchant" on NBG if available
float tokenILevelMargin; // ilvl threshold to consider the token an upgrade
bool smartNeedBySpec; // Intelligent NEED (based on stats/spec)
bool needOnProfessionRecipes; // If true, bots will roll NEED on profession recipes/patterns/books they can use &
// learn.
bool recipesIgnoreSkillRank; // If true, ignore skill rank requirement when rolling on profession recipes
bool twoRoundsGearInit;
bool syncQuestWithPlayer;
bool syncQuestForPlayer;
Expand Down Expand Up @@ -391,25 +401,11 @@ class PlayerbotAIConfig
int32 addClassCommand;
int32 addClassAccountPoolSize;
int32 maintenanceCommand;
bool altMaintenanceAttunementQs,
altMaintenanceBags,
altMaintenanceAmmo,
altMaintenanceFood,
altMaintenanceReagents,
altMaintenanceConsumables,
altMaintenancePotions,
altMaintenanceTalentTree,
altMaintenancePet,
altMaintenancePetTalents,
altMaintenanceClassSpells,
altMaintenanceAvailableSpells,
altMaintenanceSkills,
altMaintenanceReputation,
altMaintenanceSpecialSpells,
altMaintenanceMounts,
altMaintenanceGlyphs,
altMaintenanceKeyring,
altMaintenanceGemsEnchants;
bool altMaintenanceAttunementQs, altMaintenanceBags, altMaintenanceAmmo, altMaintenanceFood, altMaintenanceReagents,
altMaintenanceConsumables, altMaintenancePotions, altMaintenanceTalentTree, altMaintenancePet,
altMaintenancePetTalents, altMaintenanceClassSpells, altMaintenanceAvailableSpells, altMaintenanceSkills,
altMaintenanceReputation, altMaintenanceSpecialSpells, altMaintenanceMounts, altMaintenanceGlyphs,
altMaintenanceKeyring, altMaintenanceGemsEnchants;
int32 autoGearCommand, autoGearCommandAltBots, autoGearQualityLimit, autoGearScoreLimit;

uint32 useGroundMountAtMinLevel;
Expand Down
Loading