You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a HLDS HLDM server set up for 8 bots. Sometimes two bots get the same random name.
Example
There are plenty of names
$ cat jk_botti_names.txt | wc -l
32
How I suppose it should work
I guess you just call something like BOT_NAMES.random() on every bot creation event, where BOT_NAMES represent all the bot names from jk_botti_names.txt as an array. If it's true, you could fix it by adding some singleton state, like BOT_NAMES_CURRENTLY_IN_USE, so you could pick a random name from (BOT_NAMES - BOT_NAMES_CURRENTLY_IN_USE).random().
Also, you need to take into account the size of jk_botti_names.txt and the number of bots requested: jk_botti_names.txt could have 2 names only, and the config could request 8 bots to be created when bot names should collide instead of creating just 2 bots.
These are my thoughts and ideas on this problem, I didn't read the source code.
I never found out this until actually testing for #6, so this is certainly caused by #6. In particular, this is probably common among HPB-bot-based bots, and fixing #6 should fix this as well.
Hi @jkivilin @Bots-United! Thanks for your great work! 🎉
I have a HLDS HLDM server set up for 8 bots. Sometimes two bots get the same random name.
Example
There are plenty of names
How I suppose it should work
I guess you just call something like
BOT_NAMES.random()
on every bot creation event, where BOT_NAMES represent all the bot names fromjk_botti_names.txt
as an array. If it's true, you could fix it by adding some singleton state, likeBOT_NAMES_CURRENTLY_IN_USE
, so you could pick a random name from(BOT_NAMES - BOT_NAMES_CURRENTLY_IN_USE).random()
.Also, you need to take into account the size of
jk_botti_names.txt
and the number of bots requested:jk_botti_names.txt
could have 2 names only, and the config could request 8 bots to be created when bot names should collide instead of creating just 2 bots.These are my thoughts and ideas on this problem, I didn't read the source code.
Versions and configs
jk_botti version 1.43
HLDS Build
7882
.Metamod-p version
1.21p38
AMX Mod X version
1.8.2
Available as a Docker Image here: https://github.com/artkirienko/hlds-docker-dproto
The text was updated successfully, but these errors were encountered: