You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please check for duplicates or similar issues before creating this issue.
I don't know how feasible this is since polymod seems to only operate on one modRoot, but I'll try to explain the problem I have & ideal solution.
What is your suggestion, and why should it be implemented?
What?
I'd like to suggest checking the regular mods directory first (to accommodate most OS' and system-installed mods), then entering an #if linux-gated block of code where the XDG Base Directory Specifications are referenced: The $XDG_DATA_HOME environment variable is resolved (fallback to $HOME/.local if unset) and some unique path in $XDG_DATA_HOME/share/ is checked via Polymod for any user-installed mods.
On Linux however, people usually prefer using their package manager of choice to install applications. I'm working on such a package and I noticed a problem with this mods approach: When the application & its data is installed, it's usually in a place that requires system administrator permissions to modify (any Linux version comparable to Ubuntu) or in some cases is completely unavailable for post-installation modifications for security/purity reasons, even as an admin (my Linux version). As such: adding mods is impossible to do without copying the game's files to another user-accessible directory, fixing file/directory ownership & permissions etcetc.
The Linux world's way of handling this is to use the XDG Base Directory Specifications. $XDG_DATA_HOME/share (usually resolves to /home/<currentuser>/.local/share) is a directory where applications are supposed to write any user-specific data they want, but it's also the de-facto place for users to supply their own data through, e.g. user-installed fonts in $XDG_DATA_HOME/share/fonts. The game already uses this specification somewhere(!) to store highscores and some other stuff locally ($XDG_DATA_HOME/share/ninjamuffin99/Funkin/ninjamuffin99/funkin.sol on my system) so maybe that directory could house an additional mods directory as well?
This discussion was converted from issue #688 on August 25, 2021 21:34.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Please check for duplicates or similar issues before creating this issue.
I don't know how feasible this is since polymod seems to only operate on one
modRoot
, but I'll try to explain the problem I have & ideal solution.What is your suggestion, and why should it be implemented?
What?
I'd like to suggest checking the regular
mods
directory first (to accommodate most OS' and system-installed mods), then entering an#if linux
-gated block of code where the XDG Base Directory Specifications are referenced: The$XDG_DATA_HOME
environment variable is resolved (fallback to$HOME/.local
if unset) and some unique path in$XDG_DATA_HOME/share/
is checked via Polymod for any user-installed mods.Why? (What on earth does any of that even mean?)
Currently the game ships/builds with a hardcoded directory location for mods. This is perfectly adequate for Windows and macOS desktops where users expect to go to a download page to install the game. People who manually build the game from source would also hardly have a problem with this approach.
https://github.com/ninjamuffin99/Funkin/blob/46d19f1170a1faa197d2c0079d3bde6e1cfed531/source/TitleState.hx#L49-L51
On Linux however, people usually prefer using their package manager of choice to install applications. I'm working on such a package and I noticed a problem with this mods approach: When the application & its data is installed, it's usually in a place that requires system administrator permissions to modify (any Linux version comparable to Ubuntu) or in some cases is completely unavailable for post-installation modifications for security/purity reasons, even as an admin (my Linux version). As such: adding mods is impossible to do without copying the game's files to another user-accessible directory, fixing file/directory ownership & permissions etcetc.
The Linux world's way of handling this is to use the XDG Base Directory Specifications.
$XDG_DATA_HOME/share
(usually resolves to/home/<currentuser>/.local/share
) is a directory where applications are supposed to write any user-specific data they want, but it's also the de-facto place for users to supply their own data through, e.g. user-installed fonts in$XDG_DATA_HOME/share/fonts
. The game already uses this specification somewhere(!) to store highscores and some other stuff locally ($XDG_DATA_HOME/share/ninjamuffin99/Funkin/ninjamuffin99/funkin.sol
on my system) so maybe that directory could house an additionalmods
directory as well?Beta Was this translation helpful? Give feedback.
All reactions