Page 1 of 1

Mod upgrader 0.12.35-0.13.9

Posted: Sun Jun 12, 2016 4:44 pm
by Adil
This is a python script which uses regular expressions to perform changes mentioned here
It is written to plug the most outstanding breakages of compatibility, however complicated data flow analysis is outside of its scope.
Usage:
  • 1. Put it near 'mods' folder (in factorio folder or elsewhere)
    2. Launch the script with python. (I've tested it on python3)
    3. A folder 'new_mods' will be created which will contain hopefully workable versions of the mods.
Tried on
Incompatible
Development

Re: Mod upgrader 0.12.35-0.13.0

Posted: Tue Jun 28, 2016 12:11 am
by Nebbeh
Just tried this on my entire mod folder but none of the mods that was updated worked ingame.

Re: Mod upgrader 0.12.35-0.13.0

Posted: Tue Jun 28, 2016 4:34 am
by nonstickfrypan
Does not update this (the file in new_mods/ is identical)

[code]data.raw.player.player.build_distance = 200
data.raw.player.player.reach_distance = 200[/code]


nvm... it's not supposed to :)

Re: Mod upgrader 0.12.35-0.13.0

Posted: Tue Jun 28, 2016 4:37 am
by nonstickfrypan

Code: Select all

$ python3 updater.py 
updating
_____Orbital-Ion-Cannon-master_____
Traceback (most recent call last):
  File "updater.py", line 341, in <module>
    main()
  File "updater.py", line 33, in main
    if not match.group(2) or not match.group(3):
AttributeError: 'NoneType' object has no attribute 'group'

Re: Mod upgrader 0.12.35-0.13.0

Posted: Tue Jun 28, 2016 9:24 pm
by darkfrei
I have this error

Re: Mod upgrader 0.12.35-0.13.0

Posted: Wed Jun 29, 2016 12:49 am
by Adil
darkfrei wrote:I have this error
Apparently, because updater.py was supposed to be located nearby the `mods` folder, not in it.

However, it's unlikely to work anyway, there's been a bunch of changes unmentioned previously,
For examplte these include the increased rigorousness of json parsing and there quite a bunch of mods I've found that have that one defined pretty lazily.
I believe most modders will, fix their mods themselves before I'll have time to deal with this. I'm sorry.

Re: Mod upgrader 0.12.35-0.13.4

Posted: Sun Jul 03, 2016 11:37 pm
by Adil
I've finished the script,
notable feature of the new release is that it became less forgiving about deviations from standard. Thus quite a part of the upgrade was detecting and fixing of those errors in code.
Still, some of the mods are way to gone to be covered by this.
The list in the op shows the mods I've been able to start in 0.13, some of them (Advanced_personal_defense) I've even seen working, but I can't guarantee that scripted part of the mod will work without a hitch.

Re: Mod upgrader 0.12.35-0.13.4

Posted: Mon Jul 04, 2016 1:40 am
by SamSam
Hive Wars? I'm surprised to see that as incompatible, given that it was fairly simple for a friend and I to fix as the issues that didn't allow it to load were just basic ones, I believe that we had to change game.get_surface, we had to change some item names that were changed (eg piercing-rounds-magazine) and add 2 properties to a character prototype (loot_pickup_distance and item_pickup_distance). However I believe that that final fix was not in control.lua, that could be the problem? Also we are still having desyncs when placing worm items if anyone has ideas. I can upload a version that works if you want to compare it when I get home in a few hours.
Edit: Still seems like a very helpful tool, hope I can get some good use out of it so thanks for making it!

Re: Mod upgrader 0.12.35-0.13.4

Posted: Mon Jul 04, 2016 10:46 am
by Adil
There's been more prototype format alterations than mentioned in changelogs.
belts, pumps, and many more obtained new fields that needed to be added. Yesterday I was too tired to figure out what `connector_frame_sprites` is and where could I get those.

Also, the version of Hivewars I had (maybe not the most recent one) had a plain copypaste of vanilla in its data.lua. Which referenced other, now different files in vanilla (stone-furnace-fire.png for example) there's no graceful solution this problem that doesn't involve creating reading comprehension program.
I've added dirty workaround for such problem encountered in the Hivewars, but that will not solve similar problems with other mods.

That being said I've updated the download in the op.

Re: Mod upgrader 0.12.35-0.13.4

Posted: Tue Jul 05, 2016 3:41 pm
by SamSam
Hi, I used this today and it seems to work very well :D. One bug though:

Code: Select all

'(?<!electric-)mining-drill':'electric-mining-drill',
in the 'medium' section causes burner-mining-drill to become burner-electric-mining-drill which makes the mod not work but of course it is easy to fix.
Thanks :)

Re: Mod upgrader 0.12.35-0.13.4

Posted: Tue Jul 05, 2016 5:39 pm
by Adil
Ouch, I don't remember why it is this way and not just plain replace as other renamings are.
Let's hope: [code]'(?<!electric-)(?<!burner-)?mining-drill':'electric-mining-drill'[/code] solves this. :?
edit 7.08.2016: It solves nothing, and I don't really remember why this replacement appeared in the first place, still, a moderated version of it is now in the new version of the script.