Simple update script for 0.14 -> 0.15
Posted: Sat Apr 29, 2017 10:53 pm
Hello all! I wrote a simple shell script to help with porting mods from 0.14 to 0.15.
To use it, simply download it from here (right-click -> download linked file): https://gist.githubusercontent.com/this ... igrator.sh (v: 1.1.1)
Once you've downloaded it, open your favorite bash client, and run the following:
E.g., if I downloaded it to my `~/Downloads` folder, and the mod is called `example_mod_1.0.0.zip`, and is located in the standard macOS mods folder, I would run
WARNING: This is not a perfect script. There is a pretty decent chance it will make a mistake. For this reason, it will make a backup of the mod before doing any work, and it will log all its changes both to the console, and to a file called `migration_log_[mod name].txt`. Running the script on the same mod more than once might overwrite the backup.
List of changes taken from here: viewtopic.php?f=3&t=44505
If you come across anything you think should be added, please let me know.
To use it, simply download it from here (right-click -> download linked file): https://gist.githubusercontent.com/this ... igrator.sh (v: 1.1.1)
Once you've downloaded it, open your favorite bash client, and run the following:
Code: Select all
chmod +x [drag downloaded file here]
[drag downloaded file here] [drag mod zip/folder here]
Code: Select all
chmod +x ~/Downloads/mod_migrator.sh
~/Downloads/mod_migrator.sh ~/Library/Application\ Support/factorio/mods/example_mod_1.0.0.zip
List of changes taken from here: viewtopic.php?f=3&t=44505
Fixes
These will be actively performed- Remove spacing around '=' in locale files (' = ' -> '=')
- less_then -> less_than
- railpictures() -> rail_pictures()
- underground_belt_distance -> max_underground_distance
- game.get_event_handler -> script.get_event_handler
- game.raise_event -> script.raise_event
- alien-science-pack -> production-science-pack
Warnings
These will just notify you of problem locations.- Lua.coroutine
- LuaGameScript::evolution_factor
- LuaPlayer::build_from_cursor
- LuaPlayer::rotate_for_build
- LuaSurface::get_tileproperties
- LuaForce::item_resource_statistics
- LuaForce::fluid_resource_statistics
If you come across anything you think should be added, please let me know.