ScienceCostTweaker Mod (mexmer)

by mexmer

Allows the cost of research to be tweaked, in terms of count, science packs and time. Edit its configs costs *.lua to tweak the multipliers. - Original mod made by UberWafe, this is adopted version for factorio from version 0.16 until current

Tweaks
11 months ago
0.16 - 1.1
80.0K

b Randomly failing when user joins MP game

5 years ago

On occasion some users when joining an MP game running this mod will fail with the error:

Mods mismatch detected!
ScienceCostTweakerM: Mod contents are different even though versions are the same

Both freshly downloaded from the mod manager in-game. Testing on multiple OS's across multiple networks.

After diagnosing with #factorio on IRC they've found that the mod does conditional require() calls, which is absolutely a (their words) no-no on the factorio engine for consistency reasons and can cause this exact error. One such example they cited was specifically at https://github.com/mexmer/ScienceCostTweakerM/blob/master/data.lua#L20-L22 where a require call is wrapped in a conditional. Instead they state that all require calls should be top level so they are always require'd regardless, and instead conditional tests should be put into the file itself or the calls to things inside the files. Because of this the game cannot synch the server settings to the client in all cases (deterministically pseudo-random based on various things about how the game loaded and so forth) and thus will fail to join the game.

5 years ago
(updated 5 years ago)

They made a point to mention to pass this on to you as well:
https://wiki.factorio.com/Tutorial:Mod_settings#Tips

Specifically the point of:

  • Do not conditionally 'require(...)' things: This breaks the CRC checks and people will get errors trying to use your mod in multiplayer. 'require(...)' everything and then conditionally add the values to data.raw using the settings.
5 years ago

that conditional is until i fix compatibility with other mods, defaults to false, and players should not use that setting. so this one should not cause issues. but i can see other places, where it can cause problems, if players have different settings than server.

thanks for info.

5 years ago

Thanks much!

5 years ago

I did change conditionals, so let me know, if you will experience error again

This thread has been locked.