Automatic mod downloads from curseforge#57
Conversation
|
Thank you! Going to take a look at it in 24hours. |
|
@deinfreu - any updates on bringing this in? would make it easy to get new mods |
|
I don't expect this to get merged soon. I much rather would not merge it in this state since it is very crude. Although you can just use my forked alpine image to get the mods once and switch back to the stable one from deinfreu lockenkop18/hytale:latest |
|
I have updated this to be more coherent with the project and put all the build steps into a builder stage. If someon wants to check out the images i have uploaded them to my own dockerhub with your naming scheme lockenkop18/hytale:experimental There are some mods that fail to download. Curseforge is doing some funky things in their CDN paths. Most mods work though. @deinfreu don't stress about handling this PR, i'd be happy to contribute but if this is not to your liking/ fitting into the project thats totally fine! You also may steer me into a direction that would be more fitting. |
|
This works great @lockenkop but just making others aware that when a mod gets updated (e.g. BetterMap/Vein) the old .jar file needs to be deleted otherwise it will prevent the Hytale server from booting due to duplicate plugins. |
|
Great catch. |
|
I have pushed a fix for that. |
Maybe some resistance here is Alpine is supposed to be small and secure, but we are loading it with Python. Not going to jump into any debates, but we already have the JVM on the image. Maybe look at building a Java app to run, or Go or Rust to build a compiled library to run on the image instead of loading up Python. |
See PR #73 Added a shell script as to not introduce additional dependencies. :) |
Fair point. Your implementation in Bash is superior in this regard and i thought that the logic is not too complicated but i'm not as versed in bash, sed and regexes as you are. I couldn't write those without alot of AI help. I haven't tested your implementation but it seems to keep close relation to my logic, so it should check out. @deinfreu feel free to choose. |
@lockenkop I did the original implementation for itzg/minecraft-docker-container in '22. He has since moved it into Java, probably better that way. As for this script, definitely some Claude in there. Could have I written it? yes, probably but I don't want to spend hours working on it. I just let it do the first pass and I validate it. Example it wanted to put mods in ./games/mods instead of ./mods. 🤷 But easy fixes and not wasting my night on re-writing old logic. |
|
@lockenkop also added #71 to enable pre-releases on the server. Getting excited for the stuff to come. |
|
@lockenkop I've forked and pushed the changes to my own deployment and credited deinfreu, I also added server jar checking because it wasn't getting updated properly. 🤷 |
|
@shotah @lockenkop Amazing work! @shotah , would you be able to include the server JAR checking in PR #71 as well? I’m considering implementing the script-based approach for the auto mod downloader instead of the Python implementation, since Python would add another layer of complexity that I’d prefer to avoid. @lockenkop sorry. |
|
Sure as is said, it's the better option. |
|
@deinfreu sure, but I've added a lot to my fork: https://github.com/shotah/hytale-server-container
I can either cut one big PR or if you want to pick off the scripts you want.
|
|
Just throwing this link in the circle for reference: IMO, the environment variable names should be as close to the already established minecraft-server docker image as possible. :) Also: it would be amazing if you could add examples how to use the feature.
|
Hi, today my gaming buddies wanted to add mods to our dedicated server.
So i quickly wrote an automatic mod downloader.
The implementation is a bit crude and is most likely missing alot of best practices.
I just wanted to share it.
example compose
The Curseforge (CF) Project IDs are looked up via https://cflookup.com/.
From there i get the latest release and the fileID.
crafting a valid CF CDN Download link from that, getting it and writing it to file int the mods folder.
If the file is a .jar the mod is completely installed.
If the file is a .zip the entrypoint.sh will extract all .zip archives it finds in the mods dir into the game dir.
This assumes the mod author adheres to the common zip file structure.
I tested this with the 20 most downloaded mods and it is working fine.