Jump to content

Mod compatibility check fix


Atrik
 Share

Recommended Posts

This mod allow ignoring the file structure in determining if a mod is compatible or not. 

I'm making this after desperately not understanding what is going wrong with @Emacz mod classical-warefare-aea-main.
With this mod I'm finely able to join his hosts easily.

Anyone making a incompatible mod could use this to make players joining each other easier without having to skip compatibility check.

compatibilitycheckfix.zip

Edited by Atrik
  • Thanks 1
Link to comment
Share on other sites

Isn't it unusual to allow the same mod to have a different file structure for two different users? Couldn't that generate false positives?

Aside from my question, this seems like a rather forced solution aimed at solving a problem that doesn't really exist. Modders should provide a simple way for users to obtain their mods. Besides, it doesn’t seem like a serious issue. It’s just a matter of learning how to properly create a .zip/.pyromod and providing clear instructions to the end user.

Link to comment
Share on other sites

44 minutes ago, guerringuerrin said:

Isn't it unusual to allow the same mod to have a different file structure for two different users?

I've done a mod that change 0AD icon and I'm trying to distribute it.

  1. On my machine
    
    ModImWorkingOn/
    ├─ mod.json
    ├─ fileIgnoredByGitIgnore.@#$%
    └─ art/
       └─ 0ADIcon
    
  2. A user cloning my git

    New0ADIcon/
    ├─ mod.json
    └─ art/
       └─ 0ADIcon
     
  3. A user downloading from my git

    New0ADIcon-master/
    ├─ mod.json
    └─ art/
       └─ 0ADIcon
     
  4. A user downloading from mod.io

    New0ADIcon/
    ├─ mod.json
    └─ New0ADIcon.zip
     
1 hour ago, guerringuerrin said:

Couldn't that generate false positives?

Yes, 1000x harder for the modder to fck up and generate false positive then generating false negative thoughts. Being on the responsibility of the modder rather then the user is also obviously desirable.

I think that also invalidate your remarks about this being a solution for a problem that doesn't exist. Which you would have a high chance of being wrong about since I don't think you ever use incompatible mods (yes you use and distribute compatible ones but they don't have this problem. For now, anyways).
I don't know the original cause of the problem I faced with @Emacz, and others using his mod. But this isn't the first time I'm facing troubles with mods trying to use compatibility check, and this fix would have probably solved past cases.

Link to comment
Share on other sites

Ok, I understand your point. I have a few questions though:

  1. From what I understand, in your first example the issue would only exist on the modder’s machine, since end users would all receive the same file structure. Is that correct? If so, this seems like the most justifiable case for not checking file integrity, since it only affects a development environment and not distributed copies of the mod.
  2. Seems very similar to the previous one. A user cloning the repository would obtain what is essentially the “final” structure of the mod that would later be distributed, right?
  3. I see your point about downloading the repository as a zip from git, which adds the -branch suffix to the directory name. But couldn’t that be avoided by creating a release? That would appear on the right side of the repository page and users could download the packaged version directly.
  4. This case also seems similar to the first one to me. Users downloading the mod from mod.io would all receive the same package, and therefore the same file structure. Am I right?

 

33 minutes ago, Atrik said:

Yes, 1000x harder for the modder to fck up and generate false positive then generating false negative thoughts. Being on the responsibility of the modder rather then the user is also obviously desirable.

I think that also invalidate your remarks about this being a solution for a problem that doesn't exist. Which you would have a high chance of being wrong about since I don't think you ever use incompatible mods (yes you use and distribute compatible ones but they don't have this problem. For now, anyways).
I don't know the original cause of the problem I faced with @Emacz, and others using his mod. But this isn't the first time I'm facing troubles with mods trying to use compatibility check, and this fix would have probably solved past cases.

It’s true that I haven’t worked on incompatible mods (I only contributed something very small to the community-mod, the changelog). However, we’ve been using Feldmap for years and this has never been a problem in practice, largely for the reasons above: users end up downloading the same file structure.

The only exception I can think of is when someone downloads the source code directly from the repository (using the “Code → Download ZIP” button). But I always assumed that option exists mainly for people who want to develop or inspect the code, not for end users who just want to install the mod. For that purpose, isn’t the release mechanism intended?

In my humble opinion, an end user shouldn’t have to deal with technical issues that are inherent to development workflows. It seems more reasonable for the modder to be responsible for distributing a consistent packaged version of the mod.

Link to comment
Share on other sites

7 minutes ago, guerringuerrin said:
  • From what I understand, in your first example the issue would only exist on the modder’s machine, since end users would all receive the same file structure. Is that correct? If so, this seems like the most justifiable case for not checking file integrity, since it only affects a development environment and not distributed copies of the mod.
  • Seems very similar to the previous one. A user cloning the repository would obtain what is essentially the “final” structure of the mod that would later be distributed, right?
  • I see your point about downloading the repository as a zip from git, which adds the -branch suffix to the directory name. But couldn’t that be avoided by creating a release? That would appear on the right side of the repository page and users could download the packaged version directly.
  • This case also seems similar to the first one to me. Users downloading the mod from mod.io would all receive the same package, and therefore the same file structure. Am I right?

There is always a solution to still make it work, despite the path checking. But good UX is generally about making things simple, resilient (can adapt to a variety of users with a variety of technical level), and not add unnecessary complexity.

Why do you think we should keep the path checking? What is it useful for?
Note that in the examples I give, I pretend like files after the folder where is the mod.json matters but actually it doesn't, yet anyways..

 

16 minutes ago, guerringuerrin said:

However, we’ve been using Feldmap for years and this has never been a problem in practice, largely for the reasons above: users end up downloading the same file structure.

Community mod was downloaded probably exclusively on mod.io I think.
As for Feldmap, it is marked "compatible" for convenience although it's obviously technically incompatible.

 

20 minutes ago, guerringuerrin said:

In my humble opinion, an end user shouldn’t have to deal with technical issues that are inherent to development workflows. It seems more reasonable for the modder to be responsible for distributing a consistent packaged version of the mod.

Can't agree more.

  • Like 1
Link to comment
Share on other sites

1 hour ago, Atrik said:

Why do you think we should keep the path checking? What is it useful for?

I know that some multiplayer platforms and games implement file integrity checks to prevent malicious code or cheats disguised as mods. I’m not saying that would necessarily solve anything here (we know how easy it is to hide mods in 0 A.D.), but I also don’t have enough knowledge to take a strong position on it. I was mostly wondering whether removing it could introduce other problems. Your explanation helps clarify the situation.

My original comment was more about the idea that this feels like a solution that lets modders skip some basic precautions, rather than addressing a real engine issue. I understand that this can be somewhat subjective.
 

1 hour ago, Atrik said:

Community mod was downloaded probably exclusively on mod.io I think.
As for Feldmap, it is marked "compatible" for convenience although it's obviously technically incompatible.

I see. The point I was trying to illustrate is that, regardless of where the mod is downloaded from, its correct functioning depends on it being distributed properly: the same file structure across all download sources, and the correct download link in the case of git. Not through Code -> Download ZIP, but by creating a release that appears on the right side of the repository page.

Also, if I remember correctly, this caused issues with Feldmap in the past when different versions were used, resulting in OOS.

Not trying to make a big issue out of this. Thanks for the explanation!

Link to comment
Share on other sites

44 minutes ago, guerringuerrin said:

I know that some multiplayer platforms and games implement file integrity checks to prevent malicious code or cheats disguised as mods. I’m not saying that would necessarily solve anything here

47 minutes ago, guerringuerrin said:

Also, if I remember correctly, this caused issues with Feldmap in the past when different versions were used, resulting in OOS.

Perverting compatibility check into a political tool has been discussed for a while from the time I was here in 0AD. Yesterday, while searching the git to see if I could make a useful contribution with this path thing, I found something very cringe on git on this topic. I don't know if it's something that's worth discussing at this point. Maybe we should just let people fulfilling the urge to do something about "cheating", even if I'm unsure if theses people ever log in to the lobby. Sorry if any reader find this offensive because they did believe in the initiative but it's just very very poorly though out, by people actually smart.

A while ago, we also discussed with you @guerringuerrin and @Norse_Harold that we should be able to see all player mods from the gamesetup room. This would be a good nice to have feature to add. It will help mitigate a lot of issues with mods, like the one with feldmap versions you are giving as example above.
Most importantly, it doesn't engage a war against mods and modders pretexting they could be malicious, therefore nuking the UX for everybody is totally justified.

Link to comment
Share on other sites

37 minutes ago, Atrik said:

Perverting compatibility check into a political tool has been discussed for a while from the time I was here in 0AD. Yesterday, while searching the git to see if I could make a useful contribution with this path thing, I found something very cringe on git on this topic. I don't know if it's something that's worth discussing at this point. Maybe we should just let people fulfilling the urge to do something about "cheating", even if I'm unsure if theses people ever log in to the lobby. Sorry if any reader find this offensive because they did believe in the initiative but it's just very very poorly though out, by people actually smart.

My reply was only meant as an example in response to your question. I didn’t mean to imply that the goals of a mod like this could lead to cheating. Perhaps it was a poor example. I only wanted to suggest that this kind of change could potentially introduce compatibility issues. But as I clarified immediately after, I don’t have the knowledge to categorically say whether it would or wouldn’t prevent that.
Rather, my impression was that this change seems designed mainly to spare modders from a small inconvenience that, in my opinion, they should probably handle themselves. Afterall they should kinda know what they are doing or keep learning and improving their product. We’re not talking about anything very complex here. Just learning how to properly create a .zip and distribute it correctly. You yourself mentioned that this was something like:

20 hours ago, Atrik said:

I'm making this after desperately not understanding what is going wrong with @Emacz mod classical-warefare-aea-main.


Of course I see mitigating the risk of cheating as a good thing. But it’s not my intention to revive any unproductive debate around that topic here. Those weren't my motivations when I ask about this mod.

38 minutes ago, Atrik said:

A while ago, we also discussed with you @guerringuerrin and @Norse_Harold that we should be able to see all player mods from the gamesetup room. This would be a good nice to have feature to add. It will help mitigate a lot of issues with mods, like the one with feldmap versions you are giving as example above.
Most importantly, it doesn't engage a war against mods and modders pretexting they could be malicious, therefore nuking the UX for everybody is totally justified.

Yes. I still think that would be a good thing to do. Even if I remember someone arguing that this might be a sterile solution, since hiding a mod can be as simple as renaming one or two files. 
Anyways, I think we’ve interacted enough over the years for you to know that I’m not against mods or modders.

  • Like 1
Link to comment
Share on other sites

9 minutes ago, guerringuerrin said:

Afterall they should kinda know what they are doing or keep learning and improving their product. We’re not talking about anything very complex here. Just learning how to properly create a .zip and distribute it correctly.

I don't see it as a mistake from @Emacz if ever the reason was even because of something he did. The folder name, or anything of the path, as long as it's supported by the game and doesn't change any of the content, should be interpreted the same for compatibility. It's not even uncommon that when I use his mod and work on it, I make raw copies of the folder instead of using git functionalities. In that case, I'm likely to end up with a renamed folder name. You get the point, if it's useless (I think it is but maybe there is actually a valid reason) why make life of modders harder?  ( @Emacz also being expert at being excessively bothered by this kind of stuff) :sweatdrop:

 

18 minutes ago, guerringuerrin said:

Yes. I still think that would be a good thing to do.

17 minutes ago, guerringuerrin said:

Even if I remember someone arguing that this might be a sterile solution, since hiding a mod can be as simple as renaming one or two files. 

Maybe I even pointed this out myself but i would never say that would make the feature "sterile".

I'm not interested in waging a war against a made up threat that even if it existed, would be guaranteed to not care too much about measure taken against it. I understand you disagree but you see my point.
If it's also at the cost of UX of normal players, then maybe we should also reconsider priorities.
The above reasoning is also agnostic of your opinion on any existing mod, as it's just about intent to not disclose a modification.

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...