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

Merge config pack and global extra settings in-editor #567

Open
Emral opened this issue May 22, 2023 · 4 comments
Open

Merge config pack and global extra settings in-editor #567

Emral opened this issue May 22, 2023 · 4 comments
Assignees

Comments

@Emral
Copy link
Contributor

Emral commented May 22, 2023

Is your feature request related to a problem? Please describe.
Currently it is not feasible for the config pack to contain a "global_npc" or "global_bgo" or "global_block" extra settings configuration.
This is because if an episode has its own file, the config pack's file is not loaded at all.

Describe the solution you'd like
The ideal solution would be if both files are loaded and merged before displaying.
Ideally, if two fields have the same "name" field, a warning occurs in the extra settings box pointing this out.

Additional context
Here is my setup to test this.
image
image
image

Adding a global_npc.json in the episode folder produces this result:
image
image
image

Note the absence of the sour setting.
Thanks.

@Wohlstand
Copy link
Member

The REPLACE way had been chosen because Moondust Engine allows to completely override any NPC-ID with a totally different algorithm (by a lua-script referred at an npc-*.ini file). Anyway, to address given issue, I'll add the option into the header of the extra settings file to tell parser "replace" or "mix" with global setup. So, both variants can be used as well depending on the goal of episode maker.

@Emral
Copy link
Contributor Author

Emral commented May 22, 2023

This issue concerns the global_ extra settings. Could you explain in a bit more detail how this relates to overrides of individual items in an episode context if the global extra settings are visible for all of them regardless of ID? In my mind, this shouldn't be related to individual NPC overrides.
Episode creators have episode-wide global_ extra-settings if they want to expand on global settings beyond what the config pack offers.
If mix can be disabled by the episode creator, we still cannot have a basegame global_ extra settings without risking some NPCs breaking if creators override the extra settings, so that would not fix the issue.
If you want to support mix/replace for other branches, can this behaviour be configured by the config pack rather than the episode?

@Wohlstand
Copy link
Member

Episode will be one OF multiple ways to configure. The config pack side will define the default behaviour. Possibly, if needed, add the option to "enforce global setup" that will make episode-wide option to give no effect.

@Emral
Copy link
Contributor Author

Emral commented May 23, 2023

Would love to enforce it, thanks.

@Wohlstand Wohlstand moved this to Maybe later in @Wohlstand's works Nov 24, 2023
@Wohlstand Wohlstand self-assigned this Nov 24, 2023
@Wohlstand Wohlstand added this to the Moondust Project Neo milestone Nov 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants