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

Automapping: Ignore empty outputs per-rule #3894

Merged
merged 2 commits into from
Feb 26, 2024

Conversation

bjorn
Copy link
Member

@bjorn bjorn commented Feb 23, 2024

This change introduces a "compileOutputSet" step which is executed as part of collecting the rules. In this step, each rule only receives as possible outputs the output indexes that are non-empty for the region of that rule.

This makes it much easier to add output variation to only some of the rules. Previously, due to the possibility of empty outputs being chosen, having rules with various amounts of variation required setting up separate rule maps.

Closes #3523

This change introduces a "compileOutputSet" step which is executed as
part of collecting the rules. In this step, each rule only receives as
possible outputs the output indexes that are non-empty for the region of
that rule.

This makes it much easier to add output variation to only some of the
rules. Previously, due to the possibility of empty outputs being chosen,
having rules with various amounts of variation required setting up
separate rule maps.

Closes mapeditor#3523
@eishiya
Copy link
Contributor

eishiya commented Feb 23, 2024

It looks like MatchType Ignore is counted as "no tile" for the purposes of determining whether a given output layer contains anything in a region. Ignore should be the main way that users specify a deliberately empty output (Empty is not sufficient, since that outputs Empty, which is not the same as "output nothing").

I think only literally empty regions should count as empty. The presence of any tile, including any MatchType tile, should make the layer count as a valid output.

Even if it doesn't actually place any tiles.
@eishiya
Copy link
Contributor

eishiya commented Feb 23, 2024

Suggested wording for the documentation of this change, perhaps it could be added to the last paragraph before "Random Output Example":

If an output index is completely empty for a given rule, it will never be chosen for that rule.

(And don't forget the Changelog too xP)

@bjorn bjorn merged commit 3bd358a into mapeditor:master Feb 26, 2024
13 of 15 checks passed
@bjorn
Copy link
Member Author

bjorn commented Feb 26, 2024

Accidentally pushed to master... :S And on GitHub you can't reopen a pull request that was "merged", heh.

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.

Automapping: Ignore empty outputs per-rule
2 participants