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

Improve monster whitelist & blacklist docs #55711

Merged
merged 5 commits into from
Mar 4, 2022

Conversation

xuvatilavv
Copy link
Contributor

@xuvatilavv xuvatilavv commented Feb 27, 2022

Summary

None

Purpose of change

Addresses the documentation tag on #30851. Related to #55189.
MONSTER_WHITELIST is currently undocumented.

Describe the solution

Add documentation. Also cleans up a couple related areas.

Describe alternatives you've considered

None

Testing

  • A healthy amount of reading the code
  • For each of the mods in testing whitelists & blacklists.zip
    1. Create a world and join with a random character
    2. Teleport to a memorable intersection in a city, observe the monster types present
    3. Teleport away
    4. Debug time forward by adding a zero to the end
    5. Teleport back to the same intersection, observe the monster types present

Additional context

Whitelist/blacklist precedence is in MonsterGroupManager::monster_is_blacklisted()

Swapped out the No Ants examples since it's no longer a core mod.

The linked issues suggest that the evolution code doesn't check whether a monster is blacklisted. I was not able to reproduce that but this doc at least represents what the feature is supposed to do.

@github-actions github-actions bot added json-styled JSON lint passed, label assigned by github actions astyled astyled PR, label is assigned by github actions labels Feb 27, 2022
@xuvatilavv xuvatilavv changed the title Add monster whitelist docs Improve monster whitelist & blacklist docs Feb 27, 2022
@Night-Pryanik
Copy link
Contributor

Could you please add info on what will happen if you define MONSTER_WHITELIST without MONSTER_BLACKLIST and without "mode": "EXCLUSIVE"?

@Maleclypse Maleclypse added the [Markdown] Markdown issues and PRs label Feb 27, 2022
@xuvatilavv
Copy link
Contributor Author

xuvatilavv commented Mar 1, 2022

Could you please add info on what will happen if you define MONSTER_WHITELIST without MONSTER_BLACKLIST and without "mode": "EXCLUSIVE"?

You got it. I've tested it a bunch and made some changes, and I'll have another PR coming up in a bit to make the code match the docs. Turns out species wasn't properly accounted for in exclusive whitelists.

Also made some revisions because the GROUP_* IDs from data/json/monstergroups/ that No Fungal Monsters is using aren't what blacklists & whitelists check, they only use the categories tag from monster definitions. I'll have an issue up for that too.

In my testing I haven't been able to reproduce the evolution problem from the two issues I linked, but I expect it's a combination of the species issue I'm patching and category inheritance for evolutions being unintuitive/incomplete.

@github-actions github-actions bot added the BasicBuildPassed This PR builds correctly, label assigned by github actions label Mar 1, 2022
@kevingranade kevingranade merged commit b2bef58 into CleverRaven:master Mar 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
astyled astyled PR, label is assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions json-styled JSON lint passed, label assigned by github actions [Markdown] Markdown issues and PRs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants