Mod upgrader 0.12.35-0.13.9

Search and install new mods. Start Factorio.
For dedicated server handling see Multiplayer Tools
Post Reply
User avatar
Adil
Filter Inserter
Filter Inserter
Posts: 945
Joined: Fri Aug 15, 2014 8:36 pm

Mod upgrader 0.12.35-0.13.9

Post by Adil » Sun Jun 12, 2016 4:44 pm

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
Attachments
updater.zip
0.12.35-0.13.4 (2) Regex tweaks about 'mining-drill' regex. If mod doesn't have those, identical to one below.
(7.42 KiB) Downloaded 131 times
updater.zip
0.12.35-0.13.4
(7.42 KiB) Downloaded 102 times
updater.zip
old version
(3.92 KiB) Downloaded 159 times
Last edited by Adil on Tue Aug 09, 2016 4:43 am, edited 7 times in total.
I do mods. Modding wiki is friend, it teaches how to mod. Api docs is friend too...
I also update mods, some of them even work.
Recently I did a mod tutorial.

Nebbeh
Inserter
Inserter
Posts: 47
Joined: Sat Apr 16, 2016 1:46 pm

Re: Mod upgrader 0.12.35-0.13.0

Post by Nebbeh » Tue Jun 28, 2016 12:11 am

Just tried this on my entire mod folder but none of the mods that was updated worked ingame.

nonstickfrypan
Long Handed Inserter
Long Handed Inserter
Posts: 53
Joined: Fri Apr 15, 2016 9:02 am

Re: Mod upgrader 0.12.35-0.13.0

Post by nonstickfrypan » Tue Jun 28, 2016 4:34 am

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 :)
Last edited by nonstickfrypan on Tue Jun 28, 2016 4:46 am, edited 2 times in total.

nonstickfrypan
Long Handed Inserter
Long Handed Inserter
Posts: 53
Joined: Fri Apr 15, 2016 9:02 am

Re: Mod upgrader 0.12.35-0.13.0

Post by nonstickfrypan » Tue Jun 28, 2016 4:37 am

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'

User avatar
darkfrei
Smart Inserter
Smart Inserter
Posts: 1526
Joined: Thu Nov 20, 2014 11:11 pm

Re: Mod upgrader 0.12.35-0.13.0

Post by darkfrei » Tue Jun 28, 2016 9:24 pm

I have this error
Attachments
pyt.PNG
pyt.PNG (5.48 KiB) Viewed 4089 times

User avatar
Adil
Filter Inserter
Filter Inserter
Posts: 945
Joined: Fri Aug 15, 2014 8:36 pm

Re: Mod upgrader 0.12.35-0.13.0

Post by Adil » Wed Jun 29, 2016 12:49 am

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.
I do mods. Modding wiki is friend, it teaches how to mod. Api docs is friend too...
I also update mods, some of them even work.
Recently I did a mod tutorial.

User avatar
Adil
Filter Inserter
Filter Inserter
Posts: 945
Joined: Fri Aug 15, 2014 8:36 pm

Re: Mod upgrader 0.12.35-0.13.4

Post by Adil » Sun Jul 03, 2016 11:37 pm

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.
I do mods. Modding wiki is friend, it teaches how to mod. Api docs is friend too...
I also update mods, some of them even work.
Recently I did a mod tutorial.

SamSam
Inserter
Inserter
Posts: 32
Joined: Fri Jul 10, 2015 2:02 am

Re: Mod upgrader 0.12.35-0.13.4

Post by SamSam » Mon Jul 04, 2016 1:40 am

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!

User avatar
Adil
Filter Inserter
Filter Inserter
Posts: 945
Joined: Fri Aug 15, 2014 8:36 pm

Re: Mod upgrader 0.12.35-0.13.4

Post by Adil » Mon Jul 04, 2016 10:46 am

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.
I do mods. Modding wiki is friend, it teaches how to mod. Api docs is friend too...
I also update mods, some of them even work.
Recently I did a mod tutorial.

SamSam
Inserter
Inserter
Posts: 32
Joined: Fri Jul 10, 2015 2:02 am

Re: Mod upgrader 0.12.35-0.13.4

Post by SamSam » Tue Jul 05, 2016 3:41 pm

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 :)

User avatar
Adil
Filter Inserter
Filter Inserter
Posts: 945
Joined: Fri Aug 15, 2014 8:36 pm

Re: Mod upgrader 0.12.35-0.13.4

Post by Adil » Tue Jul 05, 2016 5:39 pm

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.
I do mods. Modding wiki is friend, it teaches how to mod. Api docs is friend too...
I also update mods, some of them even work.
Recently I did a mod tutorial.

Post Reply

Return to “Mod-/Installation-Handling”