liyunfan1223 / mod-playerbots

AzerothCore Playerbots Module
https://discord.gg/NQm5QShwf9
GNU Affero General Public License v3.0
282 stars 151 forks source link

(Re-)Initialitialized bots don't pick talents on EquipmentPersistence=1 #344

Open HennyWilly opened 4 months ago

HennyWilly commented 4 months ago

Describe the bug When initializing a bot while EquipmentPersistence=1 is set in the config file, the bot has no talent points selected after initialization. Îf the bot had talent points assigned prior to (re-)initialization, those points were reset as well. This also happens on newly created bots: They still have their initial gear equipped (as expected) but no talents were selected.

Commit hash cabc09f

To Reproduce Steps to reproduce the behavior:

  1. Pick a manually created bot.
  2. Initialize that bot (I used the english version of the unbot addon)
  3. Inspect the bot.
  4. See that all talent points are unassigned.

Expected behavior The bot should have all talent points assigned after initialitaion. I'm not sure if the talents should be kept or randomized in this case. Maybe a new option (e.g. TalentPersistence) would be good...

Desktop (please complete the following information):

Additional context It should be noted that I set the max level of my server to 60 and my player character is level 60 as well.

These are all settings I changed compared to the default .dist file: AiPlayerbot.MinRandomBots = 400 AiPlayerbot.MaxRandomBots = 500 AiPlayerbot.GroupInvitationPermission = 2 AiPlayerbot.SummonWhenGroup = 0 AiPlayerbot.AutoTrainSpells = free AiPlayerbot.AutoPickReward = yes AiPlayerbot.RandomBotMaxLevel = 60 AiPlayerbot.DisableRandomLevels = 1 AiPlayerbot.RandombotStartingLevel = 1 AiPlayerbot.RandomBotMaxLevelChance = 0 AiPlayerbot.LimitEnchantExpansion = 1 AiPlayerbot.LimitGearExpansion = 1 AiPlayerbot.EquipmentPersistence = 1 AiPlayerbot.EquipmentPersistenceLevel = 60 AiPlayerbot.RandomBotGroupNearby = 1 AiPlayerbot.AutoLearnQuestSpells = 1 AiPlayerbot.RandomBotJoinBG = 0 AiPlayerbot.MaxRandomRandomizeTime = 1209600 AiPlayerbot.RandomBotLoginAtStartup = 0

Dreathean commented 4 months ago

Just to be clear, are these altbots you created or rndbots from the unbot addon? Equipment persistence should have no impact on talent selection. Altbots (the ones you create on your own account and make the character yourself, then apply bot to it) you have to use "maintenance" command for them to choose talents. For rndbots, even the ones spawned from the addclass command, should automatically choose their talents however.

HennyWilly commented 4 months ago

Thanks for the quick reply. I am refering to bots that I created via the unbot addon (rndbots). The server is not open to external connections and there is currently only one character on my account so there shouldn't be any altbots active.

I am pretty sure that the EquipmentPersistence option causes this behaviour, because when I set AiPlayerbot.EquipmentPersistence = 0, restart and run bot initialization via unbot, the bots choose their talents corretly. After reverting back to AiPlayerbot.EquipmentPersistence = 1, initialized bots won't have talents selected.

Dreathean commented 4 months ago

There are known issues with the .init command, I recommend using "maintenance" instead which can be used on either altbot or rndbot and includes setting talents. For gearing you can also use "autogear" instead. Just type exactly that in whisper or /p or /r for multiple bots.

HennyWilly commented 4 months ago

"maintenance" and "autogear" work as expected, thanks 😃

I would still propose to keep this issue open as a bug report, because EquipmentPersistence=1should not cause the .init command to keep all talent points unassigned.

Dreathean commented 4 months ago

Yeah that is an interesting and good interaction to find, it'd been known for a while that parts of .init were broken but you're the first to identify that the equipmentpersistence=1 in particular is causing the talents to not work properly with it.