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

System-Id is not lowercase, as required by Foundryvtt conventions #1479

Open
acd-jake opened this issue Jan 5, 2024 · 2 comments
Open

System-Id is not lowercase, as required by Foundryvtt conventions #1479

acd-jake opened this issue Jan 5, 2024 · 2 comments
Labels
module-support Support for another module wontfix This will not be worked on

Comments

@acd-jake
Copy link
Contributor

acd-jake commented Jan 5, 2024

Hi,

I am currently implementing a customization of another module (Argon - Combat HUD (by TheRipper93 and Mouse0270)) for the CoC7 system. The base module checks whether an adaptation for the currently used system is available and otherwise displays an error message.

This check requires that the Id of the module follows the notation "enhancedcombathud-" plus the systemid of the system used.

If I now give my module the id "enhancedcombathud-CoC7", I cannot submit the module to the module database at foundryvtt.com because the moduleid is not lowercase.

If I give my module the id "enhancedcombathud-coc7", which corresponds to the foundryvtt conventions, the aforementioned check of the base module fails because my module is not recognized as an adaptation for the "CoC7" system.

The foundryvtt conventions also recommend a lowercase string for the systemid ("Choose a unique system identifier. This should be an all lower-case string with no special characters. This name must align with the name of the parent directory within which you create the system.").

Therefore, please change the current systemid from "CoC7" to "coc7".

@acd-jake acd-jake added the bug Something isn't working label Jan 5, 2024
@snap01 snap01 added module-support Support for another module wontfix This will not be worked on and removed bug Something isn't working labels Jan 13, 2024
@snap01
Copy link
Collaborator

snap01 commented Jan 13, 2024

Changing the system identifier would cause FoundryVTT to treat this as a new system.

This would mean the existing system folder would not be removed on case sensitive filesystems, existing worlds will no longer have a system associated with it, and modules that contain compendiums with the system attribute set would not load those compendiums.

@snap01
Copy link
Collaborator

snap01 commented Jan 13, 2024

In modules/enhancedcombathud/scripts/core/hud.js line 425 for the function performModuleCheck can you replace it with the following and see if that works with your module. If this works we can make a pull request for the core module.

  performModuleCheck() {
    let gameId = game.system.id
    if (gameId === 'CoC7') {
      gameId = 'coc7';
    }
    const systemModule = game.modules.get(`enhancedcombathud-${gameId}`);
    if (systemModule?.active) return;
    const systemModuleElement = `<a href="https://foundryvtt.com/packages/enhancedcombathud-${gameId}" target="_blank">Argon - Combat HUD (${game.system.id.toUpperCase()})</a>`;
    ui.notifications.error(localize("enhancedcombathud.err.moduleNotActive").replace("%m", systemModuleElement), {permanent: true});
  }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module-support Support for another module wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants