Closed 20kdc closed 4 years ago
Just tested something, and versions
is not available at postload time.
This ccmodDependencies transition seems to be hard to get right.
window.activeMods
, maybe?
To clarify:
If window.activeMods
isn't present, it's probably a non-CCLoader loader which doesn't implement window.activeMods
. Let it run.
If window.activeMods
is present, but window.activeMods['Simplify']
isn't present, then it's probably a non-CCLoader loader, so just let it run.
If window.activeMods['Simplify']
is present, check the version of that.
Additional thought: There weren't that many, all things considered, versions which supported postload
but not ccmodDependencies
. So if you're trying to detect old loader versions you'd probably need to use a main
script anyway, which basically solves the whole problem of anything not being loaded yet.
The Simplify version you're probably looking for is >=2.3.3
, CCLoader 2.11.0
.
In light of the concerns you're mentioning with ccmodDependencies
compatibility, I'm just going to change the spec to let you use dependencies
.
...Still going to require that all new mods stick to ccmodDependencies
though.
Man, just let me have some sleep.
I already implemented the activeMods
check and it seems to work.
I'm not interested into maintaining compatiblity with old ccloader versions, especially with ones that never worked with French-cc before. It's just that by the time French-CC was published and announced, some people downloaded CCLoader only to use this mod, and ccmodDependencies
wasn't a thing until a month later. I probably know about one person who still have that old CCLoader version as a result.
Also, given the amount of changes that have been done since the last release, i'm going to do more than a minor version bump.
And released 0.6.0 at https://github.com/L-Sherry/French-CC/archive/v0.6.0.zip with a sha256 of: 767e2edd91c41e292e6c9cf2632cb64a8109b423155386f3c031bef14ba78d1e
Ah, thank you.
(Necroposting, possibly, but I didn't want to open another ticket and this thread contains the comment I was looking for)
Satcher, if CCLoader 3.0.0 was released tomorrow (with breaking changes, of course, that's what the major version increment means), would you update your mod to meet the new standards introduced in that version, specifically, new manifest version with localization support? AFAIK of all mods 20kdc submitted a PR where he replaced dependencies
with ccmodDependencies
you were the only author who voiced a concern about backwards compatibility. Is this still a concern in French-CC? Also, if you don't expect your users to play much with mods (which has been concluded by observing the Russian playerbase), you might as well adopt the distribution scheme we use, i.e. a so-called "quick install archive". Basically, an archive with the following structure (in our case):
<archive root>
ccloader/
js/
<scripts>
index.html
<etc>
assets/
mods/
enhanced-ui/
crosscode-ru/
Localize-me/
simplify
ccloader-version-display/
cc-world-map-overhaul/
package.json
This structure has two main benefits:
If CCLoader 3.0 was released tomorrow with incompatible changes, then any instruction like "install ccloader, install mod in assets/mods
would stop working overnight. For what ? I'm not as extreme as mister "DO NOT BREAK USERSPACE!" 😠, but it's already hard enough for users as it is. Remember that users can't even F12 with the release version and if ccloader or the mod doesn't start, there is most of the time not a single error message and you better have a good crystal ball 🔮 to help.
So yeah, I could add that field over there and push a new version. But then i know that very few users will ever update, especially now that the translation is "complete". And if they update, they are not going to even think about updating ccloader or even localize-me. And if the update doesn't work, ccloader is probably the last thing they are going to blame.
That case with ccmodDependencies was even worse, because without the help of the already unpredictable dependency resolver of ccloader, there would be no guarantee that french would be loaded after localize-me, and it was my impression that nodejs didn't try to sort directory entries. Backward incompatibility isn't even the issue. The issue is things breaking on upgrades without any clue on what to do.
It's also more complicated by the fact that ccloader isn't the only mod loader and if you don't support this other modloader over there then your mod is bad and you should feel bad. As a result, using the least possible features is the best way forward if you want your mod to keep working for a year with minimal maintenance ~(at which point it is already 🕸legacy code🕸 and look, there is this new JS framework over there ! )~ so you can work on that other mod which is way more fun to write even if it sucks at the end.
And yes, there are many way to simplify the installation. I'll just note that the last user requesting help had installed french and localize-me correctly, but not ccloader. unzipping stuff in the exact right directory seems harder than telling "put that there", maybe because it's harder to see problems with the procedure and fix them, dunno ¯_(ツ)_/¯
But right now, i'm more trying to fix the translations first, because people that have installed or read the source files still have mixed feelings about them...
And if they update, they are not going to even think about updating ccloader or even localize-me.
You know you can simply tell to do that on the releases page?
It's also more complicated by the fact that ccloader isn't the only mod loader and if you don't support this other modloader over there then your mod is bad and you should feel bad
The issue is nonexistent IMO. The only other real modloader right now is DevModLoader by Emi (aka ac2pic). CCInjector is dead, @ac2pic/modloader
(https://github.com/CCDirectLink/modloader, confusing CCDL project naming continues), Rapture (20kdc's project) was never meant to be CLS-compatible.
You know you can simply tell to do that on the releases page?
Yes, and they will ignore it, because nobody ever goes there. Users prefer the green button, and developers use git pull.
The issue is nonexistent IMO.
When this started, CCInjector was still at the "look it's much better, oh and you should make localize-me a ccinjector module i'll help you, and don't listen to the "postload" event i don't support it" stage. It's been barely a year, and everything you described happened in that single time frame.
It's fun to watch from afar though :wink:
Yes, and they will ignore it, because nobody ever goes there. Users prefer the green button, and developers use git pull.
Dunno. We enforced a release policy, it also helps that you can't simply run the mod by downloading the source code because everything is in typescript. So far there has been only one or two reports of people downloading the source code instead of a release. My point is that I believe that backwards-compatibility is hardly a concern when it comes to CrossCode mods and just slows down the overall progress. In case you haven't been online in discord when I posted this, I conducted this survey a month ago, here is a link: https://docs.google.com/forms/d/e/1FAIpQLSecWvswFGlVcOgKa4V0PKtnCW3B1n-rhZ8X3m_fD32xM1LbWQ/viewform?usp=sf_link. From what we've seen there are at least 40 mod users, but I doubt there are much more (no more than a hundred definitely).
In any case, it was nice to hear your opinion!
I've also found a link with responses in that survey: https://docs.google.com/forms/d/e/1FAIpQLSecWvswFGlVcOgKa4V0PKtnCW3B1n-rhZ8X3m_fD32xM1LbWQ/viewanalytics
Since my notifications are lit up like a winter holiday tree, I'd like to add my own opinion. Even though I may be exiled from the CC Modding Discord.
I prefer backwards compatibility when reasonable. I prefer standards when reasonable. The CLS standards are an attempt at standards.
The current state of French-CC and Localize-me does not conflict with any Node.js fields, and it does not use any modloader-specific dependencies. As far as I can tell it's fully CLS-compliant right now, and presumably, if it didn't work in at least CCLoader at the time it was made it'd have been fixed.
I do believe that postload
is a CLS-defined field.
Basically, there is no reason to go nuke the whole API and break this mod for no reason, and that's what this CCLoader 3.0 proposal seems to be stating.
Switching from dependencies to ccmodDependencies will break old ccloader versions that don't understand it in a very nasty way. And most users won't upgrade it until they are told to.
hopefully, i think one can get the version of ccloader from window.versions.ccloader, so french-cc could check that manually...
(also the description is wrong now, but i can patch that)