Upgrading the old game assets in 0.6.4
Upgrading the old game assets in 0.6.4
Has anyone else ever tried upgrading the 0.6.4 interface and graphics to be like the modern game, as much as possible?
https://factorio.com/download/archive
If it's been done before, maybe I can download their project? I'd rather not be reinventing the wheel.
I'm no expert with mass image conversion tools, so this is the manual route.
I'm not expecting this to work perfectly as it was designed for its time and some things don't convert properly, like how the new inserter and belt graphics are cropped into the space of the original graphics.
GUI layout code is hidden in the EXE so there's no way to fix any of this. Unless Wube were to release the alpha game source...
https://factorio.com/download/archive
If it's been done before, maybe I can download their project? I'd rather not be reinventing the wheel.
I'm no expert with mass image conversion tools, so this is the manual route.
I'm not expecting this to work perfectly as it was designed for its time and some things don't convert properly, like how the new inserter and belt graphics are cropped into the space of the original graphics.
GUI layout code is hidden in the EXE so there's no way to fix any of this. Unless Wube were to release the alpha game source...
Last edited by Plawerth on Sun May 23, 2021 8:10 pm, edited 2 times in total.
Re: Upgrading the graphics in 0.6.4
Moving assets from modern game to 0.6.4
data\core\sound
axe-meat-1 -> (convert to WAV)
axe-meat-2 -> (convert to WAV)
axe-meat-3 -> (convert to WAV)
axe-mining-ore-1 -> (convert to WAV)
axe-mining-ore-2 -> (convert to WAV)
axe-mining-ore-3 -> (convert to WAV)
axe-mining-ore-4 -> (convert to WAV)
axe-mining-ore-5 -> (convert to WAV)
build-medium -> build (convert to WAV)
game-lost -> mission-lost.ogg
message -> (convert to WAV)
new-objective -> new-goal.ogg
research-completed -> research-complete.ogg
data\core\graphics
background-image -> (convert to PNG)
clock-icon -> .
factorio -> .
factorio-icon -> .
shoot-cursor-green -> shoot-cursor
splash-screen-image -> .
too-far -> .
These graphics don't work in 0.6.64:
light-cone
light-medium
light-small
data\core\graphics\icons\alerts
was previously in: data\core\graphics
ammo-icon-red -> .
danger-icon -> .
electricity-icon-red -> .
electricity-icon-unplugged -> .
fuel-icon-red -> .
warning-icon-red -> .
data\base\graphics\icons
(use 2nd mipmap)
assembler-machine-1 -> .
assembler-machine-2 -> .
burner-inserter -> .
burner-mining-drill -> .
electric-mining-drill -> basic-mining-drill
inserter -> basic-inserter
splitter -> basic-splitter
transport-belt -> basic-transport-belt
[ ..... work in progress.... ]
data\core\sound
axe-meat-1 -> (convert to WAV)
axe-meat-2 -> (convert to WAV)
axe-meat-3 -> (convert to WAV)
axe-mining-ore-1 -> (convert to WAV)
axe-mining-ore-2 -> (convert to WAV)
axe-mining-ore-3 -> (convert to WAV)
axe-mining-ore-4 -> (convert to WAV)
axe-mining-ore-5 -> (convert to WAV)
build-medium -> build (convert to WAV)
game-lost -> mission-lost.ogg
message -> (convert to WAV)
new-objective -> new-goal.ogg
research-completed -> research-complete.ogg
data\core\graphics
background-image -> (convert to PNG)
clock-icon -> .
factorio -> .
factorio-icon -> .
shoot-cursor-green -> shoot-cursor
splash-screen-image -> .
too-far -> .
These graphics don't work in 0.6.64:
light-cone
light-medium
light-small
data\core\graphics\icons\alerts
was previously in: data\core\graphics
ammo-icon-red -> .
danger-icon -> .
electricity-icon-red -> .
electricity-icon-unplugged -> .
fuel-icon-red -> .
warning-icon-red -> .
data\base\graphics\icons
(use 2nd mipmap)
assembler-machine-1 -> .
assembler-machine-2 -> .
burner-inserter -> .
burner-mining-drill -> .
electric-mining-drill -> basic-mining-drill
inserter -> basic-inserter
splitter -> basic-splitter
transport-belt -> basic-transport-belt
[ ..... work in progress.... ]
Re: Upgrading the old game assets in 0.6.4
You ask why? So you never wanted to take grandpa out of the nursing home for a night of partying, dressed in the finest tuxedo and polished black leather shoes? Well, okay, so maybe gramps will stumble here and there, but he may enjoy the attention.
It's sorta fascinating how the graphics icons were originally tightly cropped in the 0.6.4 GUI, when swapping in the modern graphics that still have the same name and the same original graphic size. Why did the devs bother to tightly crop around the edges of each icon? Trying to save bytes of VRAM usage?
Also I see the tech tree reuses some icons, and just slaps a number on it for the next phase. Apparently more VRAM space saving.
It's sorta fascinating how the graphics icons were originally tightly cropped in the 0.6.4 GUI, when swapping in the modern graphics that still have the same name and the same original graphic size. Why did the devs bother to tightly crop around the edges of each icon? Trying to save bytes of VRAM usage?
Also I see the tech tree reuses some icons, and just slaps a number on it for the next phase. Apparently more VRAM space saving.
Re: Upgrading the old game assets in 0.6.4
Lol, I see upgrading the 0.6.4 game object animations is possible, but would be a ridiculous effort done manually via a mouse.
Someone would need to write a program to select image tiles out of the current game data, and recomposite / resize to fit the smaller and fewer animation frames of the original graphics. Have to throw away about 75%-90% of the current smooth antialiased game animations to cram it into 0.6.4
Probably ImageMagick
https://imagemagick.org/index.php
Someone would need to write a program to select image tiles out of the current game data, and recomposite / resize to fit the smaller and fewer animation frames of the original graphics. Have to throw away about 75%-90% of the current smooth antialiased game animations to cram it into 0.6.4
Probably ImageMagick
https://imagemagick.org/index.php
Re: Upgrading the old game assets in 0.6.4
use WSL and Bash scripting, you can write a for loop, such:Plawerth wrote: ↑Tue May 25, 2021 6:10 pmLol, I see upgrading the 0.6.4 game object animations is possible, but would be a ridiculous effort done manually via a mouse.
Someone would need to write a program to select image tiles out of the current game data, and recomposite / resize to fit the smaller and fewer animation frames of the original graphics. Have to throw away about 75%-90% of the current smooth antialiased game animations to cram it into 0.6.4
Probably ImageMagick
https://imagemagick.org/index.php
Code: Select all
for i in /path/to/factorio/images/** ; do
echo $i
y="/new/path/to/$(basename $i)"
convert $i [options here] $y
done
Re: Upgrading the old game assets in 0.6.4
Assembler-1 new into old:
Factorio_0.6.4.5945\data\base\graphics\entity\assembling-machine-1\
0.6.4 has the same number of animation frames as the current game (32) but uses a 6x6 grid which leaves 4 unused tiles at the end.
magick convert assembling-machine-1.png -crop 6x6@ +repage split\assem1.png
0.6.4 assembler base is 88x88 pixels.
Top-left of base is offset 5x17 px from top-left of frame.
Overall frame size is 141x120 px
200%:
The modern game separates the shadow from the graphics, and the shadow doesn't fit the frame box of 0.6.4.
For the purposes of this exploration, I am going to ignore the shadow and focus on the machine only.
Current game:
Current assembler base is 82x82 pixels.
Top-left of base is offset by 14x19px from top-left of frame.
Red box shows comparison with 0.6.4 base
I don't know yet how important the slight base size difference is between new and old, vs alignment with everything else in 0.6.4 ...
Factorio_0.6.4.5945\data\base\graphics\entity\assembling-machine-1\
0.6.4 has the same number of animation frames as the current game (32) but uses a 6x6 grid which leaves 4 unused tiles at the end.
magick convert assembling-machine-1.png -crop 6x6@ +repage split\assem1.png
0.6.4 assembler base is 88x88 pixels.
Top-left of base is offset 5x17 px from top-left of frame.
Overall frame size is 141x120 px
200%:
The modern game separates the shadow from the graphics, and the shadow doesn't fit the frame box of 0.6.4.
For the purposes of this exploration, I am going to ignore the shadow and focus on the machine only.
Current game:
Current assembler base is 82x82 pixels.
Top-left of base is offset by 14x19px from top-left of frame.
Red box shows comparison with 0.6.4 base
I don't know yet how important the slight base size difference is between new and old, vs alignment with everything else in 0.6.4 ...
- NotRexButCaesar
- Smart Inserter
- Posts: 1133
- Joined: Sun Feb 16, 2020 12:47 am
- Contact:
Re: Upgrading the old game assets in 0.6.4
When you finish this, will you be making it public?
Ⅲ—Crevez, chiens, si vous n'étes pas contents!
Re: Upgrading the old game assets in 0.6.4
ohh not much importance around that subject, really.
Re: Upgrading the old game assets in 0.6.4
Due to the fact that this is Wube's copyrighted content, I probably can't make it available as a direct download without their permission.NotRexButCaesar wrote: ↑Fri May 28, 2021 5:22 pmWhen you finish this, will you be making it public?
However if the image modding actions can all be accomplished via ImageMagick commands, then nothing direct needs to be distributed.
- Install ImageMagick
- Make a work directory.
- Download 0.6.4 and 1.1.34 full from the archive.
- Unzip and put 0.6.4 in work directory
- Unzip and put 1.1.34 in work directory
- Place modding script in work directory and run.
- Script takes things from 1.1.34, twiddles them with ImageMagick, and puts them in the 0.6.4 directory
Re: Upgrading the old game assets in 0.6.4
Alas I ain't much of a programmer. The fully automagic would be a script to auto-download all the things and do all the magic hands-free, but that requires knowledge I do not have.
Hmm. How do I make a Windows powershell script to ask for credentials, login to this here webthingy, and download from the archive?
<INPUT id=csrf_token type=hidden value=IjE3N2Y1NTZjY2Q4NDRhM2I2ZWU0MWU0MGE4ZGEwZjE0NWRjMDI4Y2Ii.YLJfsg.eK_3hSci7ucdQYZ6gyMbB1gmqPg name=csrf_token>
<INPUT id=next_url type=hidden value=/get-download/0.6.4/alpha/win64-manual name=next_url>
<INPUT id=next_mods type=hidden value=False name=next_mods>
<INPUT id=username_or_email name=username_or_email placeholder="Username or Email">
<INPUT id=password type=password value="" name=password placeholder="Password">
<INPUT id=remember type=checkbox value=y name=remember>
<INPUT src="/static/img/steam-sign-in.png" type=image value="Login with Steam">
The derp solution is to just ask yall to login to and download the archive zips manually. Then run the tweaker script from the downloads directory, using what was downloaded.
Hmm. How do I make a Windows powershell script to ask for credentials, login to this here webthingy, and download from the archive?
Code: Select all
Invoke-WebRequest https://factorio.com/get-download/0.6.4/alpha/win64-manual | Select-Object -expandproperty InputFields | Format-Table -wrap
<INPUT id=next_url type=hidden value=/get-download/0.6.4/alpha/win64-manual name=next_url>
<INPUT id=next_mods type=hidden value=False name=next_mods>
<INPUT id=username_or_email name=username_or_email placeholder="Username or Email">
<INPUT id=password type=password value="" name=password placeholder="Password">
<INPUT id=remember type=checkbox value=y name=remember>
<INPUT src="/static/img/steam-sign-in.png" type=image value="Login with Steam">
The derp solution is to just ask yall to login to and download the archive zips manually. Then run the tweaker script from the downloads directory, using what was downloaded.
Re: Upgrading the old game assets in 0.6.4
This is now all generated via a Windows 10 batch script, no hand-editing of any of it.
I'm not sure what happened, but the weird UI icon cropping has stopped appearing in 0.6.4. It is possible the cropping was actually being caused by my initial hand-editing and exporting in GIMP... unknown.
This time it's all ImageMagick, overwriting the 0.6.4 icons after mass-extraction.
Snippet:
... and so forth.
I still need to (re-)extract the 64x64 tech tree icons with ImageMagick, but the scripted conversion is moving along.
Windows Batch programming is horrible but I'm not sure there's a more common sharing format for this. Powershell is a pain for sharing scripts, with its signed code policy that I usually end up disabling because it is so annoying.
I'm not sure what happened, but the weird UI icon cropping has stopped appearing in 0.6.4. It is possible the cropping was actually being caused by my initial hand-editing and exporting in GIMP... unknown.
This time it's all ImageMagick, overwriting the 0.6.4 icons after mass-extraction.
Snippet:
Code: Select all
Echo. && Echo 3. Extracting 32x32 mipmapped icons for game GUI
set SRC=Factorio_1.1.27\data\base\graphics\icons
set DEST=workdir\d-b-gfx-icons
Call :Sub-ExtractMipmap32 accumulator.png basic-accumulator.png
Call :Sub-ExtractMipmap32 advanced-circuit.png
Call :Sub-ExtractMipmap32 artillery-turret.png rocket-defense.png
Call :Sub-ExtractMipmap32 assembling-machine-1.png
Call :Sub-ExtractMipmap32 assembling-machine-2.png
Call :Sub-ExtractMipmap32 assembling-machine-3.png
:Sub-ExtractMipmap32
magick convert %SRC%\%1 -chop 64x0 -gravity southeast -chop 24x32 %DEST%\%1
IF NOT %ERRORLEVEL%==0 echo Error extracting mipmap for %1 && GOTO Hmm
echo Extracted Mipmap #2 for %1
IF NOT "%2"=="" rename %DEST%\%1 %2 && echo -- Renamed to %2
I still need to (re-)extract the 64x64 tech tree icons with ImageMagick, but the scripted conversion is moving along.
Windows Batch programming is horrible but I'm not sure there's a more common sharing format for this. Powershell is a pain for sharing scripts, with its signed code policy that I usually end up disabling because it is so annoying.
Re: Upgrading the old game assets in 0.6.4
did you try Bash in WSL?