GFX-Shift-Tool
GFX-Shift-Tool
okay this is only interesting for modders who use own gfx and need shift-values but it's related to factorio.
it's not a mod and not a gfx-contributions or texture-request so it's here now.
the *.zip file contains the source-code and in bin/debug-folder the *.exe. you should check the code and compile a running version by yourself.
(you can get Microsoft Visual Studio Express 2013 - Desktop for free)
Improved PHP-version
C# Version
YT-Video shows both in Action
it's not a mod and not a gfx-contributions or texture-request so it's here now.
the *.zip file contains the source-code and in bin/debug-folder the *.exe. you should check the code and compile a running version by yourself.
(you can get Microsoft Visual Studio Express 2013 - Desktop for free)
Improved PHP-version
C# Version
YT-Video shows both in Action
Last edited by YuokiTani on Wed Jun 03, 2015 1:40 pm, edited 1 time in total.
Re: GFX-Shift-Tool
Hi, could you post the code?
Is a good tool and a big help.
Is a good tool and a big help.
Re: GFX-Shift-Tool
sure of course, i had yesterday corrected because it had a little error (i had thinking wrong) - now works fine
if you want download source with 5x example-pics and icons
Download here - 309 kB
to get the values - set the grid to size you have in selection-box then shift the yellow-grid in position you want. the yellow grid show how the game the image see's.
to run you need
- Apache or other Webserver with PHP - Support (if you not have index.php set in http-conf you need rename the index.php into index.html)
- enabled GD-Lib in PHP (should be standard-on)
i think about a entity/item/recipes generator with same simple code princip (php because in other language i think needs way more time), because it's painfull to copy & paste and have all options set right. i need only to think if i want a db-support (mysql or sqlite) or not. a db-support would allow handle the whole mod, calculate stuff automatic and also generate the complete mod-code from nothing, can make missing things and links between tech/items visible, rename stuff easier etc.
index.php (you know to start things - can be renamed)
if you want download source with 5x example-pics and icons
Download here - 309 kB
to get the values - set the grid to size you have in selection-box then shift the yellow-grid in position you want. the yellow grid show how the game the image see's.
to run you need
- Apache or other Webserver with PHP - Support (if you not have index.php set in http-conf you need rename the index.php into index.html)
- enabled GD-Lib in PHP (should be standard-on)
i think about a entity/item/recipes generator with same simple code princip (php because in other language i think needs way more time), because it's painfull to copy & paste and have all options set right. i need only to think if i want a db-support (mysql or sqlite) or not. a db-support would allow handle the whole mod, calculate stuff automatic and also generate the complete mod-code from nothing, can make missing things and links between tech/items visible, rename stuff easier etc.
index.php (you know to start things - can be renamed)
index.php
showoverlay.php (included by index.php) - can merged into main if you want
showoverlay.php
Re: GFX-Shift-Tool
I've uploaded here, i think is easier use a online server than make my own server.
The only problem is, temp.png doesn't refresh like the video, but is working.
The only problem is, temp.png doesn't refresh like the video, but is working.
Re: GFX-Shift-Tool
no problem i think i can fix this. (for the moment you can use F5 to refresh your browser)
i have not uploaded because it needs still a upload-picture function at the moment
so the only one who can add images and know the names are you.
i will make a better version asap.
i have not uploaded because it needs still a upload-picture function at the moment
so the only one who can add images and know the names are you.
i will make a better version asap.
Re: GFX-Shift-Tool
i have changed the php-version a little and have made a C# version.
the *.zip file contains the source-code and in bin/debug-folder the *.exe. you should check the code and compile a running version by yourself.
(you can get Microsoft Visual Studio Express 2013 - Desktop for free)
Improved PHP-version
C# Version
YT-Video shows both in Action
the *.zip file contains the source-code and in bin/debug-folder the *.exe. you should check the code and compile a running version by yourself.
(you can get Microsoft Visual Studio Express 2013 - Desktop for free)
Improved PHP-version
C# Version
YT-Video shows both in Action
Re: GFX-Shift-Tool
I like c# version
Very useful tool, remember add links to the first post
Very useful tool, remember add links to the first post
Re: GFX-Shift-Tool
Thanks for the hint -> changed.L0771 wrote:Very useful tool, remember add links to the first post
- MagicLegend
- Long Handed Inserter
- Posts: 65
- Joined: Tue Dec 30, 2014 6:17 pm
- Contact:
Re: GFX-Shift-Tool
I can't get the phpversion to work. I've uploaded the files to my personal website (http://www.elska.nl/misc/fpicshift/index.php), but the buttons don't seem to do anything?
~ML
~ML
Very good at pressing buttons.
Re: GFX-Shift-Tool
You get a Warning on your Website ...MagicLegend wrote:I can't get the phpversion to work. I've uploaded the files to my personal website (http://www.elska.nl/misc/fpicshift/index.php), but the buttons don't seem to do anything?
~ML
Code: Select all
Warning: imagepng() [function.imagepng]: Unable to open 'temp.png' for writing in /csr/www/www.elska.nl/website/misc/fpicshift/showoverlay.php on line 34
i take the orginal-image and paint over the grid and save this as new image and display this new temp.png ...
to fix your problem 2 ways are possible ...
1) allow the script writing the temp.png
2) make a sub-directory and allow writing into this subdirectory, change then the paths for create and show the temp.png
Note:
the Php-version is not intended for online(internet)-use ... best use is at your home-pc if you run a webserver for other reasons. then its most benefit is zoom in with a webbrowser, and easy change of images. ... so the php-version has also no upload-function and makes it useless on online-websites (upload allows possible intrusion)
i suggest using the c# -version ... should be also can compile with mono ... i had also a java-version started but arrange the GUI raise my blood-pressure and so it stops.
-
- Inserter
- Posts: 21
- Joined: Mon Nov 17, 2014 3:53 pm
- Contact:
Re: GFX-Shift-Tool
The reason the PHP version doesn't update the picture is because you don't have an expiration time set on the image. The browser is caching the image. If you press Shift+f5 it clears the cache and shows you the updated image.
This is my Signature. There are others like it but this one is mine.
Re: GFX-Shift-Tool
You don't need to install a webserver for this. PHP includes it's own webserver.
See how to use it:
http://symfony.com/doc/current/cookbook ... lt_in.html
See how to use it:
http://symfony.com/doc/current/cookbook ... lt_in.html
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...
Re: GFX-Shift-Tool
You can ask Yuoki directly... if you are friendly he will surely help.
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...
Re: GFX-Shift-Tool
Mind if I implement this code in the Modding IDE I'm currently working on?
Link to it is in my signature.
Link to it is in my signature.
I'm currently working on a tool that will allow everyone to create mods for Factorio without having to learn any of the complicated stuff.
Follow the development here: viewtopic.php?f=137&t=40830.
Follow the development here: viewtopic.php?f=137&t=40830.
Re: GFX-Shift-Tool
yes, feel free to include or improve this.
Re: GFX-Shift-Tool
Hope you don't mind, I made a js implementation (works in browser without server) and improved upon it a little. It is tested in chrome, you can see collision and selection boxes, drag image to adjust shifts, use multiple layers etc. You can play with it on https://codepen.io/jazziebgd/full/jvwmEj/