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

jmapgen itemgroup item default chance #72458

Merged
merged 14 commits into from
Apr 25, 2024

Conversation

Procyonae
Copy link
Contributor

@Procyonae Procyonae commented Mar 17, 2024

Summary

None

Purpose of change

Fixes #72326

Describe the solution

Changes "items": "chance" field to default to 100 in 100 rather than 1 in 100 as this is very unintuitive, if you don't specify a chance you'd expect it to always spawn not almost never.
Updates the docs to reflect this
Adds "chance": 1 to the clutter groups that appear to be the only things intentionally using the old default.
Throws an error if "prob" is used in "items": asking for it to be replaced with chance.
Attempts to replace all existing instances of this.

Describe alternatives you've considered

Ideally both "item": and "items": chances would work the same and ideally be x in y imo rather than 1 in x and x in 100 respectively but that would be incredibly disruptive to the codebases git history for little gain.
Short of that ideally all the now meaningless "chance": 100s would be removed but just in vanilla there's 1000s which again seems very disruptive for an tiny gain.

Testing

Additional context

@github-actions github-actions bot added <Documentation> Design documents, internal info, guides and help. [JSON] Changes (can be) made in JSON Mods Issues related to mods or modding Map / Mapgen Overmap, Mapgen, Map extras, Map display [C++] Changes (can be) made in C++. Previously named `Code` [Markdown] Markdown issues and PRs Mods: Magiclysm Anything to do with the Magiclysm mod Mods: No Hope Relating to the mod No Hope Mods: Defense Mode Anything to do with the Defense Mode mod labels Mar 17, 2024
@github-actions github-actions bot requested a review from KorGgenT March 17, 2024 19:01
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Auto-requesting reviews from non-collaborators: @Night-Pryanik

@github-actions github-actions bot added astyled astyled PR, label is assigned by github actions json-styled JSON lint passed, label assigned by github actions labels Mar 17, 2024
@github-actions github-actions bot added <Bugfix> This is a fix for a bug (or closes open issue) and removed json-styled JSON lint passed, label assigned by github actions labels Mar 25, 2024
@github-actions github-actions bot added the json-styled JSON lint passed, label assigned by github actions label Mar 25, 2024
@github-actions github-actions bot added json-styled JSON lint passed, label assigned by github actions and removed json-styled JSON lint passed, label assigned by github actions labels Mar 29, 2024
@Procyonae Procyonae force-pushed the JMapgenItemDefaultChance branch from 2fc3ae9 to 322bdad Compare April 8, 2024 14:53
@github-actions github-actions bot added the BasicBuildPassed This PR builds correctly, label assigned by github actions label Apr 8, 2024
@Procyonae
Copy link
Contributor Author

Self reminder to do this with place_vehicles too once it's merged

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 <Bugfix> This is a fix for a bug (or closes open issue) [C++] Changes (can be) made in C++. Previously named `Code` <Documentation> Design documents, internal info, guides and help. [JSON] Changes (can be) made in JSON json-styled JSON lint passed, label assigned by github actions Map / Mapgen Overmap, Mapgen, Map extras, Map display [Markdown] Markdown issues and PRs Mods: Defense Mode Anything to do with the Defense Mode mod Mods: Magiclysm Anything to do with the Magiclysm mod Mods: No Hope Relating to the mod No Hope Mods Issues related to mods or modding
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Palletized(/nested?) item placement without defined "chance" defaults to 0 (will never be placed)
2 participants