Skip to content

[FEATURE] Allow ModMetadata to have an id field#330

Open
Starexify wants to merge 1 commit intoFunkinCrew:experimentalfrom
Starexify:modid-system
Open

[FEATURE] Allow ModMetadata to have an id field#330
Starexify wants to merge 1 commit intoFunkinCrew:experimentalfrom
Starexify:modid-system

Conversation

@Starexify
Copy link

This PR adds aims to replace the mod ID system to allow custom IDs for mods instead.
It won't break mods that don't have an id field in their metadata, nor their dependencies, because if the id is empty it will default to the directory name like it was in the old behavior.

Important

If this PR is accepted, games like Friday Night Funkin' that use the polymod framework should change from meta.id to meta.dirName when loading mods.

Old Problem

With the old system mods could ship zips with different names other than the dependency name other mods are using, for example if the dependent mod's metadata had:

{
  "dependencies": {
    "Mod": "0.0.0"
  }
}

Polymod would check for the folder name Mod, but a user, the modder or some platform could ship the mod folder name differently like Mod-main or Mod-b010349 instead inside the archive, and some people extract archives without the archive's name and then need to create one for the mod and then extract the contents there.

New Problem

A mod id can be used between multiple mods, so a conflict check should be added in the environment that loads mods. But the chance of that happening is very low.

Copy link

@TechnikTil TechnikTil left a comment

Choose a reason for hiding this comment

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

yes, i need this.

@Starexify
Copy link
Author

Will mention in comments that #37 should benefit from a better modId system like this if the assets will be inside modIds instead of simply like: assets/dir/script.hxc to be assets/modId/script.hxc.
But not very sure about this approach, would need more thoughts on this

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.

2 participants