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 0.16 version
a month ago
0.16 - 0.17

b Randomly failing when user joins MP game

- 3 months 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 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.

- 3 months ago
(updated 3 months ago)

They made a point to mention to pass this on to you as well:

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.
- 3 months 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.

- 3 months ago

Thanks much!

- 3 months ago

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

This thread has been locked.