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)
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)
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.
Re: GFX-Shift-Tool
Posted: Sun May 17, 2015 12:46 pm
by YuokiTani
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.
Re: GFX-Shift-Tool
Posted: Tue Jun 02, 2015 4:08 pm
by YuokiTani
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)
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
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
it's because how the php-version works (i'am not a pro so i choose the dirty way) ->
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.
Re: GFX-Shift-Tool
Posted: Tue Nov 03, 2015 2:44 pm
by NightmareInfinity
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.
Re: GFX-Shift-Tool
Posted: Fri Nov 06, 2015 1:01 am
by ssilk
You don't need to install a webserver for this. PHP includes it's own webserver.
You can ask Yuoki directly... if you are friendly he will surely help.
Re: GFX-Shift-Tool
Posted: Tue Feb 07, 2017 5:32 pm
by RalleYTN
Mind if I implement this code in the Modding IDE I'm currently working on?
Link to it is in my signature.
Re: GFX-Shift-Tool
Posted: Wed Mar 29, 2017 2:17 pm
by YuokiTani
yes, feel free to include or improve this.
Re: GFX-Shift-Tool
Posted: Mon Sep 03, 2018 4:12 am
by jazziebgd
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/