Skip to content

Fix mod version compatibility checking for major version differences #575

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 6, 2025

Conversation

Fank
Copy link
Member

@Fank Fank commented Jul 6, 2025

Summary

This PR fixes issue #517 where the auto mod updater was downloading incorrect mod versions after updating to Space Age (Factorio 2.0). The mod updater would download 1.x versions of mods instead of the compatible 2.x versions.

Problem

The version checking logic in check_game_version() was incorrectly implemented:

  • It was comparing versions in the wrong order (checking if mod version >= game version)
  • It wasn't properly handling major version differences for backward compatibility

Solution

  • Fixed check_game_version() to properly check if the current game version satisfies the mod's minimum required version
  • Game versions can now run mods designed for older major versions (backward compatibility)
  • Game versions correctly reject mods requiring newer versions than currently installed
  • Fixed variable references in check_dependency_version() that were using $FACTORIO_VERSION instead of $mod_version
  • Added clarifying comments about the version checking behavior

Testing

The fix has been tested with various version combinations:

  • ✅ Factorio 2.0 accepts mods requiring 2.0
  • ✅ Factorio 2.0 accepts mods requiring 1.1 (backward compatibility)
  • ✅ Factorio 1.1 rejects mods requiring 2.0
  • ✅ Version comparison within same major version works correctly

Related Issues

This also addresses issue #468 by ensuring mods requiring newer Factorio versions than currently installed are properly skipped.

Fixes #517
Fixes #468

This fixes issue #517 where the auto mod updater was downloading the wrong
mod versions after updating to Space Age (Factorio 2.0). The problem was that
the version checking logic was incorrectly rejecting compatible mod versions.

Changes:
- Fixed check_game_version() to properly handle major version differences
- Game versions can now run mods designed for older major versions (backward compatibility)
- Game versions correctly reject mods requiring newer versions
- Fixed variable references in check_dependency_version()
- Added clarifying comments about the version checking behavior

This also addresses issue #468 by ensuring mods requiring newer Factorio
versions than currently installed are properly skipped.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
@Fank Fank merged commit 15d38ea into master Jul 6, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Auto mod update loads wrong version after update Updating mods will update mods to a version no longer compatible with current Factorio version.
1 participant