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

docs: clarify logoFile filename restrictions #174

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 17 additions & 17 deletions docs/gettingstarted/modfiles.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,23 +101,23 @@ modId = "examplemod1"
modId = "examplemod2"
```

| Property | Type | Default | Description | Example |
|------------------|----------|------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------|
| `modId` | string | **mandatory** | See [The Mod ID][modid]. | `modId="examplemod"` |
| `namespace` | string | value of `modId` | An override namespace for the mod. Must also be a valid [mod ID][modid], but may additionally include dots or dashes. Currently unused. | `namespace="example"` |
| `version` | string | `"1"` | The version of the mod, preferably in a [variation of Maven versioning][versioning]. When set to `${file.jarVersion}`, it will be replaced with the value of the `Implementation-Version` property in the JAR's manifest (displays as `0.0NONE` in a development environment). | `version="1.20.2-1.0.0"` |
| `displayName` | string | value of `modId` | The display name of the mod. Used when representing the mod on a screen (e.g., mod list, mod mismatch). | `displayName="Example Mod"` |
| `description` | string | `'''MISSING DESCRIPTION'''` | The description of the mod shown in the mod list screen. It is recommended to use a [multiline literal string][multiline]. This value is also translatable, see [Translating Mod Metadata][i18n] for more info. | `description='''This is an example.'''` |
| `logoFile` | string | _nothing_ | The name and extension of an image file used on the mods list screen. The logo must be in the root of the JAR or directly in the root of the source set (e.g. `src/main/resources` for the main source set). | `logoFile="example_logo.png"` |
| `logoBlur` | boolean | `true` | Whether to use `GL_LINEAR*` (true) or `GL_NEAREST*` (false) to render the `logoFile`. In simpler terms, this means whether the logo should be blurred or not when trying to scale the logo. | `logoBlur=false` |
| `updateJSONURL` | string | _nothing_ | A URL to a JSON used by the [update checker][update] to make sure the mod you are playing is the latest version. | `updateJSONURL="https://example.github.io/update_checker.json"` |
| `features` | table | `{}` | See [features]. | `features={java_version="[17,)"}` |
| `modproperties` | table | `{}` | A table of key/values associated with this mod. Unused by NeoForge, but is mainly for use by mods. | `modproperties={example="value"}` |
| `modUrl` | string | _nothing_ | A URL to the download page of the mod. Currently unused. | `modUrl="https://neoforged.net/"` |
| `credits` | string | _nothing_ | Credits and acknowledges for the mod shown on the mod list screen. | `credits="The person over here and there."` |
| `authors` | string | _nothing_ | The authors of the mod shown on the mod list screen. | `authors="Example Person"` |
| `displayURL` | string | _nothing_ | A URL to the display page of the mod shown on the mod list screen. | `displayURL="https://neoforged.net/"` |
| `enumExtensions` | string | _nothing_ | The file path of a JSON file used for [enum extension][enumextension] | `enumExtensions="META_INF/enumextensions.json"` |
| Property | Type | Default | Description | Example |
| ---------------- | ------- | --------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------- |
| `modId` | string | **mandatory** | See [The Mod ID][modid]. | `modId="examplemod"` |
| `namespace` | string | value of `modId` | An override namespace for the mod. Must also be a valid [mod ID][modid], but may additionally include dots or dashes. Currently unused. | `namespace="example"` |
| `version` | string | `"1"` | The version of the mod, preferably in a [variation of Maven versioning][versioning]. When set to `${file.jarVersion}`, it will be replaced with the value of the `Implementation-Version` property in the JAR's manifest (displays as `0.0NONE` in a development environment). | `version="1.20.2-1.0.0"` |
| `displayName` | string | value of `modId` | The display name of the mod. Used when representing the mod on a screen (e.g., mod list, mod mismatch). | `displayName="Example Mod"` |
| `description` | string | `'''MISSING DESCRIPTION'''` | The description of the mod shown in the mod list screen. It is recommended to use a [multiline literal string][multiline]. This value is also translatable, see [Translating Mod Metadata][i18n] for more info. | `description='''This is an example.'''` |
| `logoFile` | string | _nothing_ | The name and extension of an image file used on the mods list screen. The logo must be in the root of the JAR or directly in the root of the source set (e.g. `src/main/resources` for the main source set). Valid filename characters are lowercase letters (`a-z`), digits (`0-9`), underscores (`_`), periods (`.`) and hyphens (`-`). The complete character set is `[a-z0-9_-.]`. | `logoFile="example_logo.png"` |
Copy link
Contributor

Choose a reason for hiding this comment

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

If we want to be more accurate, it would be good to specify that the image can be in a subdirectory of the root of the JAR or source set, as long as the path is absolute.

For example test/example_logo.png would be a valid asset location if at src/main/resources/test/example_logo.png. However using ./test/example_logo.png or ../test/example_logo.png would not. This can be added for the other versions as well as this change occurred in 1.20.2.

Copy link
Author

Choose a reason for hiding this comment

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

How can I do that retroactively for other Versions as well?

Copy link
Contributor

Choose a reason for hiding this comment

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

All versions are within the same branch, just in the versioned_docs, so you can do an across project search in your editor of choice for the word logoFile. That'll probably be the easiest.

| `logoBlur` | boolean | `true` | Whether to use `GL_LINEAR*` (true) or `GL_NEAREST*` (false) to render the `logoFile`. In simpler terms, this means whether the logo should be blurred or not when trying to scale the logo. | `logoBlur=false` |
| `updateJSONURL` | string | _nothing_ | A URL to a JSON used by the [update checker][update] to make sure the mod you are playing is the latest version. | `updateJSONURL="https://example.github.io/update_checker.json"` |
| `features` | table | `{}` | See [features]. | `features={java_version="[17,)"}` |
| `modproperties` | table | `{}` | A table of key/values associated with this mod. Unused by NeoForge, but is mainly for use by mods. | `modproperties={example="value"}` |
| `modUrl` | string | _nothing_ | A URL to the download page of the mod. Currently unused. | `modUrl="https://neoforged.net/"` |
| `credits` | string | _nothing_ | Credits and acknowledges for the mod shown on the mod list screen. | `credits="The person over here and there."` |
| `authors` | string | _nothing_ | The authors of the mod shown on the mod list screen. | `authors="Example Person"` |
| `displayURL` | string | _nothing_ | A URL to the display page of the mod shown on the mod list screen. | `displayURL="https://neoforged.net/"` |
| `enumExtensions` | string | _nothing_ | The file path of a JSON file used for [enum extension][enumextension] | `enumExtensions="META_INF/enumextensions.json"` |

#### Features

Expand Down