-
-
Notifications
You must be signed in to change notification settings - Fork 10
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
[feature request] Auto determination of sidedness #62
Comments
Thanks for opening your first issue here! Be sure to follow the bug, feature, or documentation issue templates! |
Heya kreezxil, I remember we talked about this on the BH partner discord. I've thought about adding this feature, however, not many mods actually document their sideness in their mods.toml file. I've looked at the 20-something client mods in my server pack and of those mods, one specified that it was strictly clientside-only. Could be a nice addition to the |
Yes you can prepopulate, it will lower the amount of effort for pack devs. As it stands, your tool is great for that don't know how to build a server pack. What I'm after if you'll partially implement my ideas is to stop having to manually make my servers. I have a workflow that works for me because in a given month I will create a server pack at least 6 times or more. But If I can do it easily with a tool, that would be a great boon too me. Already, using https://github.com/TheRandomLabs/ChangelogGenerator/ my workflow has been optimized by a factor of at least 20% or better. Because now I can speed build a new pack version, and use that tool to compare the changes between exports and wala instant change log/block post. |
Unless you add more clientside-only mods, you could always create a separate ServerPackCreator folder, with a configuration dedicated to a particular modpack/server pack. That way you'd only have to configure SPC once for each pack. As for the clientside-only-detection.....I'm torn. On one hand, yeah sure it would be nice to have, on the other: Seems really unreliable and potentially dangerous to automate this process, as it could lead to server packs containing clientside-only mods which could destabalize a server. Hm. |
Update: |
Here's another thought. Related to this. Would be advantageous to prolific pack designers such as me, or those that just update often. Have the program maintain a local database of mods commonly selected for client side. And then prepopulate that field. On a side note, when I click the folder, to select more mods, have the previously selected mods, also already selected. |
Yeah, that's why I created FALLBACKMODSLIST. In case a user does not specify any clientside mods, or simply forgets, this will kick in. Pre-populating is a nice idea though. If the config has no entries for clientside mods, prepopulate so users get a clear example of what the list can look like. |
Got the first results reading a mods.toml-file of a mod for its sideness, but I am struggling to find a way to detect the sideness of a 1.12.2 and earlier mod. Do you have any resources about that available? Your hint regarding the |
Hmm, 1.12.2 and earlier might be more complicated. Because there are multiple ways to pull the client only sidedness off. Ways to do it
|
Thanks. I'll go through the linked docs more in the coming days. |
They do ship with their annotations, if they are not obfuscated. A java
byte decompiler will show you that. But that would be too hacky. This is
why I suggested a db of known client-side mods before too, whether it was
stored externally on the web for all to use or defined in real-time on a
local basis pack by pack.
Like say each time I build a pack on my system, if I previously said
certain mods were client side, those would autopopulate if detected in the
new pack's mods list.
…On Thu, Aug 12, 2021 at 11:37 AM Griefed ***@***.***> wrote:
Thanks.
Of course, I would have to somehow get a hold of these annotations from
the compiled code, as mods don't ship with their source code, so I can't
really check for annotations in classes...
We will see whether its possible in a reasonable way. If not, people who
make 1.12.2 packs will have to continue to detect their clientside-only
mods by themselves. 1.16.5 will definitely work, if the author has set up
their mods.toml correctly, so at least there's that.
I'll go through the linked docs more in the coming days.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#62 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AA5TJCD2VUL36NHRE2S35YDT4P2EBANCNFSM45XABD4Q>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email>
.
|
I'll move the fallback modslist to a property in serverpackcreator.properties, thus allowing users to expand said list without touching the code of ServerPackCreator. A global database which SPC would connect to, to gather a list of clientside-only mods sounds nice, but is out of the question as well. I would have to host and maintain said database as well as monitor everything anyone adds to said database. Too many trolls and not worth the effort. Not to mention the security risk that can come with hosting a publicly available database. lolnope :D Maybe a separate repository on GitHub/GitLab/whatever, which contains a textfile with a list of clientside-only mods. That would have to be maintained, too, though. In the end, the modpack-maker knows, or rather should know best which mod in their pack is clientside-only, but I will do my best in helping the users out with that process. It would help if modmakers would maintain their mods.toml files or otherwise make it known to their users what sideness their mod has.... As for the annotations, I'll see what I can do. Though I agree 100% that decompyling would be way too hacky and, most notably, too time consuming/resource intensive both runtime-wise when generating a server pack and work-wise as in coding that in. I'll see what I can do. I won't promise perfection, but I'll do my best to aid users with this process. The better I can make this autodetection work, the better the UX. Thanks for your input. I really appreciate it and you've helped me out a lot here. :) P.S.: Starting to like the idea of a separate repository for the list of clientside-only mods. Caveat: Makes SPC even more dependant on a working internet connection than it already is. Humm. |
Minecraft mod pack distribution tends to need the internet, so there's that.
…On Fri, Aug 13, 2021 at 12:08 PM Griefed ***@***.***> wrote:
I'll move the fallback modslist to a property in
serverpackcreator.properties, thus allowing users to expand said list
without touching the code of ServerPackCreator. A global database which SPC
would connect to, to gather a list of clientside-only mods *sounds* nice,
but is out of the question as well. I would have to host and maintain said
database as well as monitor everything anyone adds to said database. Too
many trolls and not worth the effort. Not to mention the security risk that
can come with hosting a publicly available database. lolnope :D Maybe a
separate repository on GitHub/GitLab/whatever, which contains a textfile
with a list of clientside-only mods. That would have to be maintained, too,
though. In the end, the modpack-maker knows, or rather *should* know best
which mod in their pack is clientside-only, but I will do my best in
helping the users out with that process. It would help if modmakers would
maintain their mods.toml files or otherwise make it known to their users
what sideness their mod has....
As for the annotations, I'll see what I can do. Though I agree 100% that
decompyling would be way too hacky and, most notably, too time
consuming/resource intensive both runtime-wise when generating a server
pack and work-wise as in coding that in.
I'll see what I can do. I won't promise perfection, but I'll do my best to
aid users with this process. The better I can make this autodetection work,
the better the UX.
Thanks for your input. I really appreciate it and you've helped me out a
lot here. :)
P.S.: Starting to like the idea of a separate repository for the list of
clientside-only mods. Caveat: Makes SPC even more dependant on a working
internet connection than it already is. Humm.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#62 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AA5TJCDE4VPT7QK2K6RNFJDT4VGRHANCNFSM45XABD4Q>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email>
.
|
I got the feature itself working for 1.13+ mods, however, there is a problem: Add automation only for the user to need to configure something else anyway. |
I'll give this another try, if that fails ever so slightly, the feature will, unfortunately, get scrapped as I won't be willing to spend any more time on it: The plan:
|
that's why I inevitably went with "the user creates a db" thru the use of
your program. and as a side note, if that db were easily shareable. we
could share our dbs with other users. like in the BPS discord.
…On Sun, Aug 15, 2021 at 11:46 AM Griefed ***@***.***> wrote:
I'll give this another try, if that fails ever so slightly, the feature
will, unfortunately, get scrapped as I won't be willing to spend any more
time on it:
The plan:
1. Make a list of all mods in the modpack allMods
2. Scan all mods.tomls and create a list of all mods which should be
on the server
1. Add all modIds from [[mods]] and [[dependencies.modId]] which
specify BOTH or SERVER to a list serverMods
1. If [[dependency.modId]] is for Forge || Minecraft, add the
modId to the list, otherwise add modId specified in [[dependency.modId]]
3. Remove fallbackmodslist from allMods
4. Remove delta of allmods minus serverMods from allMods
5. ???
6. Profit?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#62 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AA5TJCCD4ZMHLYKFGYWPNEDT47VNNANCNFSM45XABD4Q>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email>
.
|
An SQLite-database mayhaps? Write every mod which remains after the sideness-check into said database, if it is not yet in it.
How does that sound? A system like that would allow users to share databases around and add entries to their own databases. |
Yes, but with the one exception, that whatever the pack developer set for a
"client side" mod would go into it. Not everything after the sidedness
check will go into it. And while it wouldn't be necessary because SQLite is
text-based, but an integrated tool to tweak because your little bro/sis/pet
rock got into and made everything client sided.
…On Mon, Aug 16, 2021 at 7:48 AM Griefed ***@***.***> wrote:
An SQLite-database mayhaps? Write every mod which remains after the
sideness-check into said database, if it is not yet in it.
- Name the database clientsideMods.db
- Check for existence of a clientsideMods.db in the ./ addons-directory
or maybe ./work-directory upon startup of ServerPackCreator.
- If a database is found, add all entries missing in the
main-database
- Delete additional database to prevent redundant check the next
time SPC is started
How does that sound? A system like that would allow users to share
databases around and add entries to their own databases.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#62 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AA5TJCAQRL2KK23OODYSEDDT5ECJRANCNFSM45XABD4Q>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email>
.
|
I won't write a DBMS, sorry. If the automation isn't stored in the database, then storing user input, which is more prone to error, in the database makes even less sense, doesn't it? The way the autodetection works currently:
If a false positive still happens, tell the affected moddev to set up their mods.toml correctly, because what the frakk is the state of some mods.toml-files out there. 😂 |
Unfortunately autodetection will not be available for 1.12.2 or older. The fml_cache_annotation.json-file is either not present for many mods, or the information therein is not enough to reliably deduce the sideness for a given mod, thus leading to many false positives, overfilling of mods considered serverside etc. etc.. The data is actually too inconsistent to reliably work with, as much as I hate to say it. |
Sweet, did you get any other backers for the project?
…On Thu, Aug 19, 2021 at 11:19 AM Griefed ***@***.***> wrote:
[image: image]
<https://user-images.githubusercontent.com/44273438/130105418-90590d5d-9267-4554-9fac-00ebd775a633.png>
It doesn't detect everything, but it works. God damn that was a mindfuck
and a half.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#62 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AA5TJCGRZEG2B552F5NLNGDT5UVKZANCNFSM45XABD4Q>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email>
.
|
…de.griefed.serverpackcreator.serverpack.autodiscoverenabled=true / false. Closes #62.
As in sponsors on GitHub? No, you're the only one as of this moment. |
Feature for autodiscovery implemented. Can be deactivated by setting de.griefed.serverpackcreator.serverpack.autodiscoverenabled=true or false respectively. I'll go ahead an close this ticket now. 🙂 |
In 1.13+ this is actually set in the mods.toml file. You can have the program autoscan for those and pre-populate the mods that are eplicitly marked as "CLIENT".
In 1.12.2 and lower, this can be pulled from the @mod annotations.
jar files can be opened with zip and rar programs, so you should be able to mount them, scan for the necessary file, get what you need and move on to the next one.
Cheers, great job so far!
The text was updated successfully, but these errors were encountered: