Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Increased creature limit #3362

Merged
merged 57 commits into from
Sep 10, 2024
Merged

Increased creature limit #3362

merged 57 commits into from
Sep 10, 2024

Conversation

benlp91
Copy link
Contributor

@benlp91 benlp91 commented Jul 19, 2024

EDIT: TOP POST BELONGS TO LOOBINEX NOW

Changes:

  • Creature limit raised from 256, to 1024, effective limit from 255 to 1022.
  • Introduced configurable rule 'MapCreatureLimit`, can be modified on the fly.
  • Standard rule has 1000 as a limit, original campaign and everything else with classic/legacy remains at 255
  • When mapmaker reduces the limit mid map, the excess creatures leave or die (depending on portal access)
  • Raised battle limit from 48 to 192
  • By keeping the limit below 1023, fixed issues with growing up(demonspawn) and transforming into skeleton/ghost at limit
  • Graveyards and Portals will pause creature generation until space is available
  • Failing to create imps at map limit no longer costs money
  • Spawn traps failing to spawn retain their charge
  • Cleaned up log errors that would occur at creature limit
  • Added console command to see the contents of the pool: !map.pool [creaturetype] to get how many of a type are in the portal.

back to you ben:

Prepared for evaluation. This is the code for a rule in the rules.cfg named 'Creatures_Count = 1028'.
You have the option to reduce the number of creatures below this value in the rule.cfg. This rule applies to all players, including Imps, with 1028 being the maximum allowed.
I have conducted tests with multiply creatures and creature transfers without encountering any issues. The Scavenger does not exceed the limit from the pool. However, the graveyard functionality has not been tested."
Side note: While there don't appear to be any pathfinding issues, teleporting a thousand creatures simultaneously may lead to performance issues. It is important for every mapmaker to ensure that their configurations are optimized for high performance, even on less powerful PCs. that will change with the per Player rule in the future.

@benlp91
Copy link
Contributor Author

benlp91 commented Jul 19, 2024

the code changes in [src/console_cmd.c] are to be able to show the amount of creatures in the pool with a console command. i don't know if that would need a seperate alpha.

@benlp91 benlp91 requested a review from Loobinex July 19, 2024 19:51
@PieterVdc
Copy link
Member

and the show pool is minor enough that doing it in this one is fine

@benlp91 benlp91 marked this pull request as draft July 24, 2024 19:04
changed the name to MapCreaturesLimit and made the rules that old maps and campaigns have the old 256 creature count
@benlp91 benlp91 marked this pull request as ready for review July 26, 2024 20:22
src/main.cpp Outdated Show resolved Hide resolved
src/main_game.c Outdated Show resolved Hide resolved
src/main_game.c Outdated Show resolved Hide resolved
@benlp91 benlp91 marked this pull request as draft September 1, 2024 11:43
@benlp91 benlp91 self-assigned this Sep 1, 2024
src/creature_states.c Outdated Show resolved Hide resolved
src/creature_states_tortr.c Show resolved Hide resolved
src/lvl_script_commands.c Outdated Show resolved Hide resolved
@Loobinex Loobinex merged commit 22dbe3c into master Sep 10, 2024
@Loobinex Loobinex deleted the increased-creature-limit branch September 10, 2024 17:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Increase the maximum number of creatures present on the map during a game session.
3 participants