[MOD 0.11.x] Planning-Tool-Mod v0.3.0

Topics and discussion about specific mods
drs9999
Filter Inserter
Filter Inserter
Posts: 831
Joined: Wed Mar 06, 2013 11:16 pm
Contact:

[MOD 0.11.x] Planning-Tool-Mod v0.3.0

Post by drs9999 »

PlanningBanner.png
PlanningBanner.png (17.37 KiB) Viewed 36434 times

Description:
This mod allows you to created colored overlays which can be used to plan new factories.

How to use:
Use the planning tool (needs research) to create the overlays. The GUI (pops up after the 1st click with the planning tool) can be used to select the current color (6 different ones atm). The 7th "color" is a remove tool to delete single tiles.
Also there are checkboxes to toggle the mode (freehand or retanglemode), select if the rectangle should be filled or not (only if rectanglemode is enabled), toggle if overwriting is allowed or not and a checkbox to enable a checkerboard pattern.
Last but not least the GUI contains buttons to hide or delete all overlays at once.
screenshot.png
screenshot.png (985.65 KiB) Viewed 35944 times
P.S.: There is no "build-distance"-restriction, you can create the overlays everywhere.



Installation:
Just put the downloaded *.zip file into the mods-folder

Changelog:

Code: Select all

0.3.0:
- ported to Factorio 0.11.0
0.2.2:
- size in rectangle-mode is shown in UI
0.2.1:
- small bugfix
0.2.0:
- added "rectanglemode"
- added ability to hide the overlay
- checkerboardpattern
0.1.0:
- initial release
Download:
FOR FACTORIO 0.11.0:
WARNING!!! Singleplayer only!!
http://www.mediafire.com/download/33vz2 ... _0.3.0.zip

FOR FACTORIO 0.10.x:
DL- link with ads to support me:
http://adf.ly/pMWzD
DL-link with no ads:
http://adf.ly/pQYKx
Last edited by drs9999 on Mon Nov 03, 2014 4:47 pm, edited 9 times in total.
User avatar
FreeER
Smart Inserter
Smart Inserter
Posts: 1266
Joined: Mon Feb 18, 2013 4:26 am
Contact:

Re: [MOD 0.9.8] Planning-Tool-Mod v0.1.0

Post by FreeER »

Nice, and I love the example you decided to use for the screen shot, but if you want that seen from space you'd need to make it a little bit bigger I would think :P
drs9999
Filter Inserter
Filter Inserter
Posts: 831
Joined: Wed Mar 06, 2013 11:16 pm
Contact:

Re: [MOD 0.9.8] Planning-Tool-Mod v0.1.0

Post by drs9999 »

Thanks!

btw. if you just want to try it out without doing any research before, the console is your friend:

Code: Select all

game.player.insert{name="planning-tool",count=1}
sillyfly
Smart Inserter
Smart Inserter
Posts: 1101
Joined: Sun May 04, 2014 11:29 am
Contact:

Re: [MOD 0.9.8] Planning-Tool-Mod v0.1.0

Post by sillyfly »

This looks great.
One option I think could be nice - have an option for the color to be "auto checkerboard", that is - the same color with 2 slightly different hue that automatically toggle between adjacent tiles, to help see the grid/distance.

(this could simply be done with something like color_variant = (x_coordinate + y_coordinate)%2 )

Thanks!
Kitefr
Burner Inserter
Burner Inserter
Posts: 16
Joined: Sat May 24, 2014 3:49 pm
Contact:

Re: [MOD 0.9.8] Planning-Tool-Mod v0.1.0

Post by Kitefr »

Sound great !

I'm currently truing it but i've got an error on control.lua line 17 for a nil value.
So when using this mod, i cannot save anymore.

Does someone else got this problem too ?
drs9999
Filter Inserter
Filter Inserter
Posts: 831
Joined: Wed Mar 06, 2013 11:16 pm
Contact:

Re: [MOD 0.9.8] Planning-Tool-Mod v0.1.0

Post by drs9999 »

Sorry forgot a check there...

You can either redownload it or replace line 17 in the control.lua with:

Code: Select all

	if game.player.gui.left.planningTool ~= nil then
		game.player.gui.left.planningTool.destroy()
	end
drs9999
Filter Inserter
Filter Inserter
Posts: 831
Joined: Wed Mar 06, 2013 11:16 pm
Contact:

Re: [MOD 0.10.0] Planning-Tool-Mod v0.2.0

Post by drs9999 »

updated ;)
Nathan1852
Inserter
Inserter
Posts: 21
Joined: Mon Jun 09, 2014 5:59 pm
Contact:

Re: [MOD 0.10.0] Planning-Tool-Mod v0.2.0

Post by Nathan1852 »

I think i found a bug, in both the old and the just updated version
The game randomly crashes with this error message: http://puu.sh/9m6xd/fe1d6803dc.jpg

EDIT: Restarting the Game seems to help, reloading does not
drs9999
Filter Inserter
Filter Inserter
Posts: 831
Joined: Wed Mar 06, 2013 11:16 pm
Contact:

Re: [MOD 0.10.0] Planning-Tool-Mod v0.2.1

Post by drs9999 »

I do not understand how this bug can appear. In fact the code is only executed if the cursorstack is NOT nil. Well your bug report shows that this is just the case in theory, but not in practise ;)

Anyway uploaded an new version that should prevent this.

If you want to fix it by your own. Open the control.lua and replace line 28 with:

Code: Select all

if (game.player.cursorstack ~= nil) and (game.player.cursorstack.name == "planning-tool") then
Nathan1852
Inserter
Inserter
Posts: 21
Joined: Mon Jun 09, 2014 5:59 pm
Contact:

Re: [MOD 0.10.0] Planning-Tool-Mod v0.2.1

Post by Nathan1852 »

Thank you for your quick fix :)

Now i have a request: would it be possible in rectangle mode to have the width and height of the rectangle somewhere?
So that I can read how long the rectangle will be? It sure would help for big ones :)
drs9999
Filter Inserter
Filter Inserter
Posts: 831
Joined: Wed Mar 06, 2013 11:16 pm
Contact:

Re: [MOD 0.10.0] Planning-Tool-Mod v0.2.2

Post by drs9999 »

Nathan1852 wrote:Now i have a request: would it be possible in rectangle mode to have the width and height of the rectangle somewhere?
So that I can read how long the rectangle will be? It sure would help for big ones :)
Done ;)

btw I noticed performance-issues if you create large areas, so I would be aware of that.
User avatar
LittleMikey
Long Handed Inserter
Long Handed Inserter
Posts: 61
Joined: Tue Apr 22, 2014 2:32 am
Contact:

Re: [MOD 0.10.0] Planning-Tool-Mod v0.2.2

Post by LittleMikey »

I tried to download using the ad-link and got a file not found error. It's working fine from the non-ad link however.
drs9999
Filter Inserter
Filter Inserter
Posts: 831
Joined: Wed Mar 06, 2013 11:16 pm
Contact:

Re: [MOD 0.10.0] Planning-Tool-Mod v0.2.2

Post by drs9999 »

Thanks for the info. Fixed it.
drs9999
Filter Inserter
Filter Inserter
Posts: 831
Joined: Wed Mar 06, 2013 11:16 pm
Contact:

Re: [MOD 0.11.x] Planning-Tool-Mod v0.3.0

Post by drs9999 »

updated to Factorio 0.11.0!
User avatar
Dysoch
Filter Inserter
Filter Inserter
Posts: 445
Joined: Fri Oct 18, 2013 2:27 pm
Contact:

Re: [MOD 0.11.x] Planning-Tool-Mod v0.3.0

Post by Dysoch »

drs9999, you mod doesnt work with 2 players :D

it checks for 1 player, and finds 2


(edit: this happens with all mods with scripts)
Creator of:
- DyTech
- DyWorld
- DyWorld-Dynamics
- DyWorld-Dynamics 2
Active since Factorio 0.6
drs9999
Filter Inserter
Filter Inserter
Posts: 831
Joined: Wed Mar 06, 2013 11:16 pm
Contact:

Re: [MOD 0.11.x] Planning-Tool-Mod v0.3.0

Post by drs9999 »

Thanks for the notice, I didn't checked MP-compability.

Do you figured out a general fix for that?
I assume it's because "game.player.XXX"?!

EDIT: I wasn't able to reproduce any crashes as long as I'm the only player in a mp-game. So if anyone wants to help me, send me a pm, I created a party @ evolve
Rseding91
Factorio Staff
Factorio Staff
Posts: 14311
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [MOD 0.11.x] Planning-Tool-Mod v0.3.0

Post by Rseding91 »

drs9999 wrote:Thanks for the notice, I didn't checked MP-compability.

Do you figured out a general fix for that?
I assume it's because "game.player.XXX"?!

EDIT: I wasn't able to reproduce any crashes as long as I'm the only player in a mp-game. So if anyone wants to help me, send me a pm, I created a party @ evolve
Events that reference players (onbuiltentitiy) will pass: event.playerindex. You can reference the existing players by using game.players[playerindex].

If you want to reference all the players (broadcast a message or something) you can use this:

Code: Select all

for _,player in pairs(game.players) do
player.print("message")
end
If you want to get ahold of me I'm almost always on Discord.
drs9999
Filter Inserter
Filter Inserter
Posts: 831
Joined: Wed Mar 06, 2013 11:16 pm
Contact:

Re: [MOD 0.11.x] Planning-Tool-Mod v0.3.0

Post by drs9999 »

Ah thx, didn't noticed that change.
pCountNullMem
Burner Inserter
Burner Inserter
Posts: 7
Joined: Tue Sep 02, 2014 3:03 pm
Contact:

Re: [MOD 0.11.x] Planning-Tool-Mod v0.3.0

Post by pCountNullMem »

Hey, Nice mod! If you need any help testing mod send me a pm, I'd like to use this mod in MP. I also know a bit of lua.
drs9999
Filter Inserter
Filter Inserter
Posts: 831
Joined: Wed Mar 06, 2013 11:16 pm
Contact:

Re: [MOD 0.11.x] Planning-Tool-Mod v0.3.0

Post by drs9999 »

Thanks for the offer, I might come back to you. But don't expect anything soon.
Post Reply

Return to “Mods”