AutoModpack icon indicating copy to clipboard operation
AutoModpack copied to clipboard

Allow edit in files while allowing updating them

Open B1BU opened this issue 11 months ago • 7 comments

Sorry for asking this here, I couldn't find any other place to ask.

I'm trying to sync config files from the modpack with the client but nothing seems to work.

What I've tried:

"syncedFiles": [
    "/config/*"
]
"syncedFiles": [
    "/automodpack/host-modpack/main/config/*"
]
"allowEditsInFiles": [
    "!/config/*"
]
"allowEditsInFiles": [
    "!/automodpack/host-modpack/main/config/*"
]

B1BU avatar Jan 16 '25 11:01 B1BU

Correct way of syncing all of your server configs to modpack is the first method

"syncedFiles": [
    "/config/*"
]

Don't write there any paths from inside automodpack folder. Everything from automodpack folder as written on wiki is always synced.

After any config change make sure to reload config by command and generate modpack with another command (see wiki) or just restart your server.

After that you can check your severs automodpack-content.json file, you should see there all of your synced files and clients will download them

Skidamek avatar Jan 16 '25 11:01 Skidamek

I think what i had gotten wrong is that it only syncs once when you start the game, I thought it synced everytime you joined the server

B1BU avatar Jan 16 '25 11:01 B1BU

Oh yeah, then check out allowEditsInFiles in config, by default all configs are there so it only downloads them all once and gives players permission to change them however they want to so that some client settings are not reverted automatically by server every game relaunch. If you want to make sure all of your configs match the server then just remove config path from allowEditsInFiles.

Skidamek avatar Jan 16 '25 11:01 Skidamek

It would be cool if there was a way to let players edit the configs but also sync if the ones included in the modpack change from the last time the modpack was generated

B1BU avatar Jan 16 '25 11:01 B1BU

Hmm actually I agree, I mean it's not great because it will revert any settings after update but I think it's a reasonable middle solution

Skidamek avatar Jan 16 '25 11:01 Skidamek

Currently files which are allowed to edit are treated very liberally And files which are not, are strictly matched to the server version Your approach is like a middle of both, nice

Skidamek avatar Jan 16 '25 11:01 Skidamek

If you want to check changed files you could use https://www.curseforge.com/minecraft/mc-mods/cupboard it checks also changed configs i think

@Skidamek

suerion avatar Feb 17 '25 15:02 suerion