ike3 / mangosbot

This is a modification of MaNGOS (Zero, One, R2, Trinity) server which brings a number of bots online and available for any player. Also allows you to use your account/guild characters as bots.
http://ike3.github.io/mangosbot-docs/
GNU General Public License v2.0
184 stars 79 forks source link

Random bots not abiding to level restrictions #53

Open Tristanlogd opened 8 years ago

Tristanlogd commented 8 years ago

Don't know if I am doing something wrong or not but clearing out all characters and bots from the database and re initializing does not appear to abide by my level restrictions within the aiplayerbot conf file. I set the levels 1-20 and there are still levels higher being generated. Is this a known issue of sorts or am I doing something wrong?

Thanks!

ghost commented 8 years ago

Could you post the lines you changed, just so we can see if the change has been done properly? I suppose you have edited the lines https://github.com/ike3/mangosbot/blob/trinity-wotlk-ai/src/plugins/playerbot/aiplayerbot.conf.dist.in#L107-L108 :

#AiPlayerbot.RandomBotMinLevel = 1
#AiPlayerbot.RandomBotMaxLevel = 255 (ignored if more than MaxPlayerLevel mangosd.conf value)

I think it would be helpful to see what your local lines look like in Aiplayerbot.conf , although there might be an issue there which I don't know enough about yet.

Tristanlogd commented 8 years ago

Sure, here is what I put in:

# Random bot count
AiPlayerbot.MinRandomBots = 80
AiPlayerbot.MaxRandomBots = 120
AiPlayerbot.RandomBotMinLevel = 1
AiPlayerbot.RandomBotMaxLevel = 20 (ignored if more than MaxPlayerLevel mangosd.conf value)

(The hash sign is being bolded, sorry about that)

Tristanlogd commented 8 years ago

Also, I had to place the conf file in the bin directory with the servers as opposed to the etc directory, otherwise it was not found on server startup.

ghost commented 8 years ago

OK, thanks for posting the contents. Pro tip when posting text file contents: use ``` (3 back ticks) on a blank line right before and after the text you paste in your post, then it will keep its format from the file. Without those code block dividers, it will affect how Git Markdown interprets the text in your post.

The config text itself looks correct, though I am uncertain if there are other settings to manipulate to achieve the intended goal to keep the random bots from leveling up or spawning at a higher level. I hope someone else with more experience from this source knows something about this.

Tristanlogd commented 8 years ago

Just updated the source, thanks for the tip!!

I will also say I was playing with the values throughout the day, whats the best and most efficient way to clear all the bots out and start fresh? Truncating all the character tables and the bot table? I am wondering if maybe I just missed a table somewhere and its using old data somehow.

ghost commented 8 years ago

It has been a while since I last worked with this source and the database files, so the only suggestion I can come up with is to reset the databases by either emptying them (if your SQL editor has got that feature) or removing them and then adding them again. (Just remember to keep using the utf8 character set.) If you have got accounts and characters you want to keep, make a backup of those to reinsert when you are done rebuilding the database. (There might be an easier way of doing this, but I don't remember.)