[MOD 0.14] Upgrade planner - v1.2.7

These mods are not game-changing, but enhance the gameplay by helping you with useful functions.
Mods like showing the current game-time, keep track over your resources, rail-laying...

[MOD 0.14] Upgrade planner - v1.2.7

Postby kds71 » Wed Aug 12, 2015 11:11 am

0.13/0.14 download available here: https://mods.factorio.com/mods/Slayer15 ... de-planner


Type: Mod
Name: Upgrade Planner
Description: Adds a new item and recipe (unlocked with Automated Construction technology) - "Upgrade Planner" - that allows to replace entities on the map using construction robots.
LIcense: Public Domain
Version: 1.1.9
Release: 2015-08-12
Tested-With-Factorio-Version: 0.12.16, 0.12.17, 0.12.18, 0.12.19, 0.12.20, 0.12.21, 0.12.22
Category: Helper
Tags: automated construction
Download-Url:
upgrade-planner_1.1.9.zip
(10.11 KiB) Downloaded 6470 times


Long description
It looks like deconstruction planner (except it is yellow instead of red) and works in similar way: you can mark an area and entities in this area will be upgraded (or downgraded) to different entities, according to your configuration.

Recipes set in Assembling Machines are preserved while upgrading.

Since version 1.0.1 multiple rulesets may be stored and restored, so you can easily switch between them. More info below.
Since version 1.1.3 you can use Upgrade Planner for selective deconstruction. Set an item you want to be deconstructed in the left column of setup and click with deconstruction planner in your hand on a button in the right column. Items marked this way will be removed and not replaced with anything.

Note: Mod should work properly in multiplayer now, but there is one minor quirk: if more than one player has an upgrade planner in their hand (or one player has an upgrade planner and another one has a deconstruction planner), the planner will do nothing. Sorry for the inconvenience, but it is impossible to resolve it in different way currently. I don't have means to test this mod in multiplayer right now, if you do and you find any bugs, please report them :)

Mod has been inspired by this post on reddit.

Before using upgrade planner, you must configure it using button displayed in top-left corner on the screen (button will appear once you discover Automated Construction technology). Configuration is explained below.

Demo - mod in action
Image

In game configuration
Image

GUI design is a blatant copy of BluePrint Mirror mod by Choumiko :)

To setup a rule in this GUI simply click on the button with item of your choice in your hand. If something is wrong (for example you tried to upgrade item that is not upgradable), a message explaining details of the problem will appear on top of the window.

You can set any upgrade rule (like Assembling Machine 1 to Assembling Machine 3, even Assembling Machine 3 to Assembling Machine 2 if you want to downgrade), the only condition is that both entites must be the same type (you can't upgrade Assembling Machine to Smart Inserter).

If you put a Deconstruction Planner in the right column instead of an item, robots will deconstruct selected item without replacing it with anything. This way you can use Upgrade Planner to selectively deconstruct items.

Note: Some mods may provide items of same type with different size (like bigger or smaller Assembling Machines, for example). I don't recommend using automated replacing with these items, results may be unpredictable.

If you made some changes and you want to discard them, simply click on button in top-left corner again. Window will disappear and all changes will be reverted.

Since version 1.0.1 multiple (up to 12) rulesets may be stored in the storage. To store ruleset simply type its name into text field (names must be unique - if you try to store two rulesets with the same name, an error message will be displayed on top of the frame) and click "store" button: ruleset will be added to the list. You can restore it any time you want by clicking "restore" button next to its name on the list. Of course, you may remove any ruleset as well.

Note: After restoring a ruleset from the storage, you have to click "save changes" button.

If you need more than 12 rulesets in the storage, you can modify control.lua file of this mod. Maximum number of available rulesets is stored in MAX_STORAGE_SIZE variable at the beginning of this file. Just remember that if you add too many rulesets to the storage, table may not fit on your screen!

Changelog
v1.1.9
  • Removed leftover debug message
v1.1.8
  • Fixed potential conflicts with other mods that add some kind of custom deconstruction planner.
v1.1.7
  • Updated to work with Factorio v0.12.20
v1.1.6
  • fixed a bug related to reading name of invalid cursor stack
v1.1.5
  • fixed a bug that would cause a GUI button to not appear
v1.1.4
  • fixed a bug that prevented some items to be selected for upgrade
v1.1.3
  • renamed the mod for consistency
  • added new feature - selective deconstruction
  • fixed a bug related to clicking with an empty hand on a button in ruleset
v1.1.2
  • fixed a bug related to loading a game saved before enabling this mod
v1.1.1
  • fixed a bug related to underground transport belts
v1.1.0
  • updated to work with Factorio 0.12.x
v1.0.3
  • fixed a bug that caused configuration GUI not to appear until game was saved
v1.0.2
  • fixed a major bug that would make impossible to select certain items for upgrade
v1.0.1
  • added storage which allows player to store and restore rulesets for convenient switching between them
v1.0.0
  • removed predefined rulesets - now players can configure their own rulesets as they wish
  • removed interface for other mods, as it is not longer necessary
  • major code cleanup - added comments, reorganized everything
  • fixed (hopefully) multiplayer problems
v0.1.8
  • fixed a bug related to saving and reloading the game while configuration panel was open
  • got rid of has_recipe and has_subtype flags, now these properties are checked automatically
v0.1.7
  • added remove_rule method to the interface
  • updated description and homepage in info.json
v0.1.6
  • made the GUI easier to use
  • added rules for replacing stone furnaces with steel furnaces and basic inserters with fast inserters
v0.1.5
  • added GUI to configure upgrading rules in game
v0.1.4
  • added migration script, recipe for Upgrade Planner will be unlocked automatically if mod has been enabled after researching Automatic Construction technology
v0.1.3
  • exposed interface for other mods that allows adding new upgrade rules
  • renamed variables for consistency with base LUA code of the game
v0.1.2
  • added code for detection whether transport belt to ground is input or output
  • added recipe preserving while upgrading assembling machines
v0.1.1
  • first release

Special thanks to
  • FlammablePants on reddit for an inspiration for this mod
  • Choumiko, DaveMcW, Kevin94, Klonan, Rseding91 in Modding Help subforum for answering my silly questions
  • kovarex for quick fix of this bug
  • Gamma_Rad on reddit for suggesting a GUI used in mod configuration
  • Once again Choumiko for creating this interface, which I shamelessly imitated in my mod
  • Once again DaveMcW for suggesting a great simplification to the code
  • dee- for suggesting a storage for rulesets, which was added in v1.0.1 of the mod
Last edited by kds71 on Fri Feb 12, 2016 12:05 pm, edited 23 times in total.
kds71
Long Handed Inserter
Long Handed Inserter
 
Posts: 91
Joined: Fri Mar 06, 2015 12:27 pm
Location: Wrocław, Poland

Re: [MOD 0.12.1] Upgrade with construction robots - v1.1.1

Postby comp » Wed Aug 12, 2015 3:32 pm

Thank you.
I've really missed this mod when I started a new game on 0.12, it's so convenient.
comp
Manual Inserter
Manual Inserter
 
Posts: 3
Joined: Thu Jan 15, 2015 7:20 pm

Re: [MOD 0.12.1] Upgrade with construction robots - v1.1.1

Postby khozmo » Wed Aug 12, 2015 10:35 pm

I am getting an error when I load a saved game after enabling the mod.

cannot execute command. Error: [string "for _, player in ipairs(game.players) do ..."]:3: LuaForce doesn't contain key resetrecipies.

Also the UI button does not show up. I tried some other saved games and go the UI button to appear but had the same text error.

Mods Installed
FARL
Default request amount
Rail Tanker
Blueprint string
replacer
RSO

P.S. Brilliant MOD. Oh how I missed it.
khozmo
Burner Inserter
Burner Inserter
 
Posts: 9
Joined: Wed Aug 12, 2015 10:25 pm

Re: [MOD 0.12.1] Upgrade with construction robots - v1.1.1

Postby kds71 » Wed Aug 12, 2015 11:33 pm

khozmo wrote:I am getting an error when I load a saved game after enabling the mod.

cannot execute command. Error: [string "for _, player in ipairs(game.players) do ..."]:3: LuaForce doesn't contain key resetrecipies.

Also the UI button does not show up. I tried some other saved games and go the UI button to appear but had the same text error.


My bad, I forgot to update migrations script. I fixed in v1.1.2 of this mod.
kds71
Long Handed Inserter
Long Handed Inserter
 
Posts: 91
Joined: Fri Mar 06, 2015 12:27 pm
Location: Wrocław, Poland

Re: [MOD 0.12.1] Upgrade with construction robots - v1.1.1

Postby khozmo » Thu Aug 13, 2015 12:05 am

kds71 wrote:
khozmo wrote:I am getting an error when I load a saved game after enabling the mod.

cannot execute command. Error: [string "for _, player in ipairs(game.players) do ..."]:3: LuaForce doesn't contain key resetrecipies.

Also the UI button does not show up. I tried some other saved games and go the UI button to appear but had the same text error.


My bad, I forgot to update migrations script. I fixed in v1.1.2 of this mod.


HAZZAH!!!! No error and the UI button is there.

Thanks much for the quick turn around
khozmo
Burner Inserter
Burner Inserter
 
Posts: 9
Joined: Wed Aug 12, 2015 10:25 pm

Re: [MOD 0.12.1] Upgrade with construction robots - v1.1.2

Postby khozmo » Thu Aug 13, 2015 12:30 am

New error when I open the UI and click one of the "not set" buttons I get the following

Error while running the event handler:

__replacer__/control.lau:354:LuaItemStack
API call when LauItemStack was invalid.

I currently have nothing set in the upgrade planner. After the notice it drops you back to the main menu.
khozmo
Burner Inserter
Burner Inserter
 
Posts: 9
Joined: Wed Aug 12, 2015 10:25 pm

Re: [MOD 0.12.1] Upgrade with construction robots - v1.1.2

Postby Cooolaid » Thu Aug 13, 2015 3:14 am

@KDS74

I have a request.
Please name your mod zip file/folder the same name as your mod title on the forum.!
so it can be more conveniently found if someone needs to update their mod or find it again.

A lot of mod devs are doing this, and it's a bit annoying.
thanks.
Cooolaid
Long Handed Inserter
Long Handed Inserter
 
Posts: 86
Joined: Sat Jul 18, 2015 8:48 pm

Re: [MOD 0.12.1] Upgrade planner - v1.1.3

Postby kds71 » Thu Aug 13, 2015 8:01 am

New feature in v1.1.3: You can now use Upgrade Planner to selectively deconstruct items. Just set an item in the left column ("from") and put a Deconstruction Planner in the right column ("to"). Now when you use Upgrade Planner robots will deconstruct selected items without replacing them.

@KDS74

I have a request.
Please name your mod zip file/folder the same name as your mod title on the forum.!
so it can be more conveniently found if someone needs to update their mod or find it again.

A lot of mod devs are doing this, and it's a bit annoying.
thanks.


Sure thing, you are right - I renamed the mod and this thread on the forum to "Upgrade Planner". BTW it is kds71 not 74 :D

New error when I open the UI and click one of the "not set" buttons I get the following

Error while running the event handler:

__replacer__/control.lau:354:LuaItemStack
API call when LauItemStack was invalid.

I currently have nothing set in the upgrade planner. After the notice it drops you back to the main menu.


This was a bug related to changes in handling cursor stack in Factorio v0.12, I fixed it in v1.1.3 of this mod.
Anyway, you are not supposed to click on the buttons with nothing in your hand - you should have an item you want to replace / replace with equipped.
kds71
Long Handed Inserter
Long Handed Inserter
 
Posts: 91
Joined: Fri Mar 06, 2015 12:27 pm
Location: Wrocław, Poland

Re: [MOD 0.12.1] Upgrade planner - v1.1.3

Postby Cooolaid » Thu Aug 13, 2015 8:08 am

dont forget your signature....Lmao :lol:
Cooolaid
Long Handed Inserter
Long Handed Inserter
 
Posts: 86
Joined: Sat Jul 18, 2015 8:48 pm

Re: [MOD 0.12.1] Upgrade planner - v1.1.4

Postby kds71 » Fri Aug 14, 2015 9:23 am

Version 1.1.4 released - I fixed a bug that would make impossible to select some items for upgrade / deconstruction in the planner configuration.
kds71
Long Handed Inserter
Long Handed Inserter
 
Posts: 91
Joined: Fri Mar 06, 2015 12:27 pm
Location: Wrocław, Poland

Re: [MOD 0.12.1] Upgrade planner - v1.1.4

Postby cpw » Fri Aug 14, 2015 3:15 pm

Hopefully everyone should switch from my unofficial update to yours..
cpw
Long Handed Inserter
Long Handed Inserter
 
Posts: 51
Joined: Tue Aug 12, 2014 3:47 pm

Re: [MOD 0.12.1] Upgrade planner - v1.1.4

Postby waduk » Fri Aug 14, 2015 4:23 pm

Selective deconstruction is awesome !
Make it really really convenient to strip down obselete mining outpost
http://i.imgur.com/fCdJpxv.gifv
waduk
Filter Inserter
Filter Inserter
 
Posts: 327
Joined: Tue Feb 10, 2015 5:44 pm

Re: [MOD 0.12.1] Upgrade planner - v1.1.4

Postby KrzysD » Sat Aug 15, 2015 2:53 am

Found a small bug, not bad if you patient for the bots.

1. If you select something with upgrade planner, wait till blueprints show up, it will clear the blueprint if you select with the upgrade planner again.

Other then that I love this mod, and i hope Factorio devs implement it :)

Enjoy that reddit gold too ;)
KrzysD
Long Handed Inserter
Long Handed Inserter
 
Posts: 51
Joined: Mon Oct 27, 2014 6:49 pm

Re: [MOD 0.12.1] Upgrade planner - v1.1.4

Postby kds71 » Sat Aug 15, 2015 7:36 am

Found a small bug, not bad if you patient for the bots.

1. If you select something with upgrade planner, wait till blueprints show up, it will clear the blueprint if you select with the upgrade planner again.

Hm it shouldn't be hard to fix, I could just disallow planner from cleaning ghosts. There might be some complications though, I will have to think about it.

Enjoy that reddit gold too ;)

Thanks again :)
kds71
Long Handed Inserter
Long Handed Inserter
 
Posts: 91
Joined: Fri Mar 06, 2015 12:27 pm
Location: Wrocław, Poland

Re: [MOD 0.12.1] Upgrade planner - v1.1.4

Postby panther » Sat Aug 15, 2015 3:22 pm

I'm trying this mod, but I can't find the "Upgrade planner" button to open the GUI.
I'm playing on my own dedicated server, I have the yellow blueprint in my belt, I see buttons from other mods. Any advice?
User avatar
panther
Manual Inserter
Manual Inserter
 
Posts: 4
Joined: Sun Feb 02, 2014 9:08 am
Location: Moscow, Russia

Re: [MOD 0.12.1] Upgrade planner - v1.1.4

Postby kds71 » Sat Aug 15, 2015 3:29 pm

I'm trying this mod, but I can't find the "Upgrade planner" button to open the GUI.
I'm playing on my own dedicated server, I have the yellow blueprint in my belt, I see buttons from other mods. Any advice?

Have you tried saving and reloading the game?
kds71
Long Handed Inserter
Long Handed Inserter
 
Posts: 91
Joined: Fri Mar 06, 2015 12:27 pm
Location: Wrocław, Poland

Re: [MOD 0.12.1] Upgrade planner - v1.1.4

Postby panther » Sat Aug 15, 2015 3:46 pm

kds71 wrote:
I'm trying this mod, but I can't find the "Upgrade planner" button to open the GUI.
I'm playing on my own dedicated server, I have the yellow blueprint in my belt, I see buttons from other mods. Any advice?

Have you tried saving and reloading the game?


Several times. I've even tried to load my save in sigleplayer.

Also, here is the list of mods on my server:
Code: Select all
   0.060 Running in headless mode
   1.162 Loading mod core 0.0.0 (data.lua)
   1.190 Loading mod base 0.12.4 (data.lua)
   1.498 Loading mod 5dim_core 0.1.0 (data.lua)
   1.555 Loading mod Compression Chests 1.3.7 (data.lua)
   1.613 Loading mod EvoGUI 0.3.0 (data.lua)
   1.665 Loading mod Fluid Void 1.0.1 (data.lua)
   1.719 Loading mod Landfill 2.1.5 (data.lua)
   1.788 Loading mod RailTanker 1.0.1 (data.lua)
   1.853 Loading mod Resource-Monitor-Mod 0.5.4 (data.lua)
   1.906 Loading mod RoboCharge 0.0.4 (data.lua)
   1.960 Loading mod Transformator 0.0.4 (data.lua)
   2.031 Loading mod advanced-logistics-system 0.2.4 (data.lua)
   2.088 Loading mod craftfaster 0.0.3 (data.lua)
   2.142 Loading mod nixie-tubes 0.1.5 (data.lua)
   2.200 Loading mod upgrade-planner 1.1.4 (data.lua)
   2.280 Loading mod usefulSpace 0.1.4 (data.lua)
   2.337 Loading mod 5dim_automatization 0.1.0 (data.lua)
   2.467 Loading mod 5dim_decoration 0.0.6 (data.lua)
   2.564 Loading mod 5dim_energy 0.1.0 (data.lua)
   2.686 Loading mod 5dim_logistic 0.1.0 (data.lua)
   2.803 Loading mod 5dim_mining 0.1.0 (data.lua)
   2.926 Loading mod 5dim_resources 0.0.4 (data.lua)
   3.027 Loading mod 5dim_trains 0.1.0 (data.lua)
   3.225 Loading mod 5dim_transport 0.1.0 (data.lua)
   3.418 Loading mod 5dim_vehicle 0.0.1 (data.lua)
   3.527 Loading mod FARL 0.3.31 (data.lua)
   3.613 Loading mod DefaultRequestAmount 1.0.0 (data-updates.lua)
   3.713 Loading mod FARL 0.3.31 (data-updates.lua)
   3.834 Loading mod advanced-logistics-system 0.2.4 (data-final-fixes.lua)
   3.926 Loading mod updated-graphics 0.12.1 (data-final-fixes.lua)
   5.074 Factorio initialised
User avatar
panther
Manual Inserter
Manual Inserter
 
Posts: 4
Joined: Sun Feb 02, 2014 9:08 am
Location: Moscow, Russia

Re: [MOD 0.12.1] Upgrade planner - v1.1.4

Postby kds71 » Sat Aug 15, 2015 7:50 pm

Hm perhaps there is a conflict with some other mod, you have plenty of them. I will try to install same mods as you have and look into it.
kds71
Long Handed Inserter
Long Handed Inserter
 
Posts: 91
Joined: Fri Mar 06, 2015 12:27 pm
Location: Wrocław, Poland

Re: [MOD 0.12.1] Upgrade planner - v1.1.4

Postby panther » Sun Aug 16, 2015 12:50 am

kds71 wrote:Hm perhaps there is a conflict with some other mod, you have plenty of them. I will try to install same mods as you have and look into it.

Well, yeah, I also have trouble wiring smart inserters, so mod conflict seems like the right way to dig. If only I knew how to debug it. Short of enabling/disabling mods one by one.

Edit: smart inserters (not) wiring is an acknowledged bug in 5dim. No luck there.
Tried unloading mods one by one - no effect. Tried instead loading mods in vanilla singleplayer save - got all buttons.
User avatar
panther
Manual Inserter
Manual Inserter
 
Posts: 4
Joined: Sun Feb 02, 2014 9:08 am
Location: Moscow, Russia

Re: [MOD 0.12.1] Upgrade planner - v1.1.4

Postby saneman » Mon Aug 17, 2015 2:28 am

I would really like it if it didn't pick up the items on the belts, that breaks the mod for me since i don't want all of the items on my belts in storage chests everywhere, even if it is a one-time thing. I would appreciate an option to not take the items from the belts.
saneman
Burner Inserter
Burner Inserter
 
Posts: 16
Joined: Fri Jun 27, 2014 11:49 pm

Next

Return to Helper mods

Who is online

Users browsing this forum: No registered users and 2 guests