[Bots] Fix creation limit, spawn limit, level requirement checks#4868
Merged
Akkadius merged 2 commits intoEQEmu:masterfrom May 15, 2025
Merged
[Bots] Fix creation limit, spawn limit, level requirement checks#4868Akkadius merged 2 commits intoEQEmu:masterfrom
Akkadius merged 2 commits intoEQEmu:masterfrom
Conversation
- Previously if buckets were being used to control any of these values and the appropriate rule was set to 0, unset class specific buckets would override the main limit buckets. - For example, if `Bots:SpawnLimit` is set to `0` and a player has their `bot_spawn_limit` set to `5` but they don't have a class bucket set for the class they're attempting to spawn a Cleric, the unset `bot_spawn_limit_Cleric` would return 0 and prevent Clerics from being spawned. - This affected spawn limits, creation limits and level requirements to use bots if controlled by buckets. - `#gm on` is required to be on for those beyond the ruled min status requirements to bypass the limits. Rewrote checks and tested every scenario of set unset rules/buckets.
- Fixes QueryBotCount to not account for soft deleted bots (`-deleted-`)
Akkadius
approved these changes
May 15, 2025
Contributor
Akkadius
left a comment
There was a problem hiding this comment.
Fantastic job, great PR description, code quality is tightening up. 🫡
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Bots:SpawnLimitis set to0and a player has theirbot_spawn_limitset to5but they don't have a class bucket set for the class they're attempting to spawn (a Cleric), the unsetbot_spawn_limit_Clericwould return 0 and prevent Clerics from being spawned.-deleted-)#gm onis required to be on for those beyond the ruled min status requirements to bypass the limits.Fixes Bot Spawn Limitation.
Type of change
Testing
Tested every scenario of set unset rules/buckets.
Rules
Bots:BotCharacterLevel- All players must be level5to create and spawn botsBots:CreationLimit- All players can only create3botsBots:SpawnLimit- All players can only spawn3botsBots:MinStatusToBypassBotLevelRequirement- Those beyond status100can create/spawn bots at any level with#gm onBots:MinStatusToBypassCreateLimit- Those beyond status100can create up toBots:MinStatusBypassCreateLimit(120) bots with#gm onBots:MinStatusToBypassSpawnLimit- Those beyond status100can spawn up toBots:MinStatusBypassSpawnLimit(120) bots with#gm onData Buckets
The following apply to
character_id=1:bot_required_level- Can create and spawn bots at level2bot_required_level_Cleric- Cannot create or spawn Cleric bots until level5bot_creation_limit- Can create10botsbot_creation_limit_Cleric- Can only create2Cleric botsbot_spawn_limit- Can spawn up to5botsbot_spawn_limit_Cleric- Can only create1Cleric botClients tested: RoF2
Checklist