Skip to content

Allow edit in files while allowing updating them #313

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

Open
B1BU opened this issue Jan 16, 2025 · 7 comments
Open

Allow edit in files while allowing updating them #313

B1BU opened this issue Jan 16, 2025 · 7 comments
Labels
enhancement New feature or request

Comments

@B1BU
Copy link

B1BU commented Jan 16, 2025

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/*"
]
@Skidamek
Copy link
Owner

Skidamek commented Jan 16, 2025

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

@B1BU
Copy link
Author

B1BU commented Jan 16, 2025

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

@Skidamek
Copy link
Owner

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.

@B1BU
Copy link
Author

B1BU commented Jan 16, 2025

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

@Skidamek
Copy link
Owner

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 Skidamek changed the title [Question] How do I sync config files? Allow edit in files while allowing updating them Jan 16, 2025
@Skidamek Skidamek added the enhancement New feature or request label Jan 16, 2025
@Skidamek
Copy link
Owner

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

@suerion
Copy link
Contributor

suerion commented Feb 17, 2025

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants