Jump to content

Make multiplayer compatible mods


Yekaterina
 Share

Recommended Posts

I made some I have been working on some translation mod and GUI mods. Also langbart sent me a mod which makes chickens larger for better visibility. I would like to use these mods in the multiplier lobby, but when I log in all games are grey and it says I am incompatible. 

@nani's autociv manages to bypass this and I would like to know how it is achieved. I made some graphics mod which does not affect gameplay so they should be allowed in the lobby.

Link to comment
Share on other sites

I've looked into this aswell when i started. I know how this is done but generally speaking its better to not do it (devs discourage it). It can cause out of sync errors depending on what your mod does. It could also be considered cheating if you have a mod enchancing things that others do not have. Your mod will also not be approved for the ingame mod downloader, reducing the audience you can reach significantly because there are much more offline players than you think. 

With all that said though, i think you are safe from out of sync errors if the changes are strictly GUI, but im not 100% sure. tip: look for the monkey in @nani's mod. I guess he renamed it. It's mod~autociv.js and !!!autociv_patchApplyN.js

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

The files in question you need to add to your mod are:

gui\common\!!!autociv_patchApplyN.js
gui\common\mod~autociv.js
gui\gamesetup\NetMessages\GameRegisterStanza~autociv.js

Then change all occurrences of "autociv" word for the name of your mod.

As for knowing what to change here are some tips to follow so you don't trigger OOS (out of sync):

  • simulation folder:  don't change code behaviour or variables that are serialized
    • How to know if a variable is serialized:
      • There exist a function name "Serialize" in the component and that function does something with the variable
      • Doesn't exist a function name "Serialize" in the component, that means all is serialized
    • Templated can't be modified
  • gui folder: you can change anything
  • art folder: you can change anything
  • shaders folder: you can change stuff but most be compatible with the engine
  • maps folder: you can add maps without problems but you can't modify existing maps
  • l10n folder: you can change anything
  • audio folder: you can change anything
  • globalscripts folder: you might be able to change some things, not sure about this one


 

  • Like 2
  • Thanks 2
Link to comment
Share on other sites

3 hours ago, wraitii said:

I have a revision for this: D3968. I would like to try and merge it before A25

checksum_compatible is probably insufficient. Make it map_pack, campaign, ui, extra_civ. Not saying this list is complete or the naming or even grouping to be good. The point is there should be a tag for each case you might want to handle separately in future instead of an "ignore mod compatibility" flag.

 

4 hours ago, wraitii said:

However, it will likely rely on trust.

That's obvious and nothing wrong with it at all. Though giving it a cursory glance whether the modder got it right or not when approving the mod for mod.io wouldn't hurt.

Link to comment
Share on other sites

9 minutes ago, hyperion said:
4 hours ago, wraitii said:

 

That's obvious and nothing wrong with it at all. Though giving it a cursory glance whether the modder got it right or not when approving the mod for mod.io wouldn't hurt.

That's already something @Itms does.

Link to comment
Share on other sites

17 hours ago, hyperion said:

checksum_compatible is probably insufficient. Make it map_pack, campaign, ui, extra_civ. Not saying this list is complete or the naming or even grouping to be good. The point is there should be a tag for each case you might want to handle separately in future instead of an "ignore mod compatibility" flag.

I thought of that a bit and think those would be 'tags' for the users to look at, not really for the engine. Sure, this would help narrow down the compatibility, but at the end of the day I don't think we'd ever have a perfect system, and it seems like it would mostly complicate things. Which is why I went  with this boolean "this does [not] change checksums".

And yeah obviously we'd need to check the mods that we approve for signing, but that's not the only way people share mods.

  • Like 2
Link to comment
Share on other sites

@wraitii

I also thought about it a bit more and while there are cases that aren't that hard to handle they all need additional data beside a type specifier. Even if implementing them one probably still wants a pass par tout boolean to bypass the compat check. checksum_compatible might be a bit of an unlucky name though, checksums are also referred to as hashes. Also a user or first time modder will ask himself what it refers to. Maybe call the boolean skip_mod_compatibility_check instead.

Link to comment
Share on other sites

Just now, hyperion said:

I also thought about it a bit more and while there are cases that aren't that hard to handle they all need additional data beside a type specifier. Even if implementing them one probably still wants a pass par tout boolean to bypass the compat check.

Yes that's essentially my conclusion as well.

Just now, hyperion said:

checksum_compatible might be a bit of an unlucky name though, checksums are also referred to as hashes. Also a user or first time modder will ask himself what it refers to. Maybe call the boolean skip_mod_compatibility_check instead.

I was actually struggling with the name quite a bit, skip_mod_compatibility_check seems a good proposition to me, thanks :) 

  • Like 1
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...