Page 1 of 2

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

Posted: Mon Jun 02, 2014 2:07 pm
by drs9999
PlanningBanner.png
PlanningBanner.png (17.37 KiB) Viewed 36396 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 35906 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

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

Posted: Mon Jun 02, 2014 2:13 pm
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

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

Posted: Mon Jun 02, 2014 2:19 pm
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}

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

Posted: Mon Jun 02, 2014 3:24 pm
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!

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

Posted: Mon Jun 02, 2014 3:50 pm
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 ?

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

Posted: Mon Jun 02, 2014 4:31 pm
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

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

Posted: Sat Jun 07, 2014 2:19 pm
by drs9999
updated ;)

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

Posted: Mon Jun 09, 2014 6:01 pm
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

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

Posted: Mon Jun 09, 2014 7:38 pm
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

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

Posted: Tue Jun 10, 2014 11:34 am
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 :)

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

Posted: Tue Jun 10, 2014 6:53 pm
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.

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

Posted: Thu Jun 12, 2014 2:16 pm
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.

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

Posted: Thu Jun 12, 2014 2:23 pm
by drs9999
Thanks for the info. Fixed it.

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

Posted: Fri Oct 31, 2014 5:10 pm
by drs9999
updated to Factorio 0.11.0!

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

Posted: Fri Oct 31, 2014 11:08 pm
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)

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

Posted: Sat Nov 01, 2014 7:36 am
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

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

Posted: Sat Nov 01, 2014 4:40 pm
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

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

Posted: Sat Nov 01, 2014 4:47 pm
by drs9999
Ah thx, didn't noticed that change.

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

Posted: Tue Nov 11, 2014 6:47 pm
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.

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

Posted: Sat Nov 15, 2014 8:32 am
by drs9999
Thanks for the offer, I might come back to you. But don't expect anything soon.