Important information: this site is currently scheduled to go offline indefinitely by end of the year.

Change .png in .exe

Get your graphics formats figures out here! Got details for others? Post here!
Post Reply
Wolfik
ultra-n00b
Posts: 9
Joined: Wed Jun 22, 2011 12:25 pm
Has thanked: 1 time

Change .png in .exe

Post by Wolfik »

Pls help.
Change .png in .exe (is it .png/.fnt)
ResHacker etc view only icons but no font.png
Multiextractor this file extract but I do not know how to import the modified file back.



Thanks for help.
Last edited by Wolfik on Mon Oct 08, 2018 8:26 pm, edited 1 time in total.
User avatar
peter2005
advanced
Posts: 44
Joined: Fri Mar 25, 2016 8:26 am
Location: None
Has thanked: 3 times
Been thanked: 9 times

Re: Change .png in .exe

Post by peter2005 »

The only easy solution is to replace a png with the same (filesize) png. So, if your png has the same size as the one you want to replace, you can do it with hex editor.
merlinsvk
ultra-veteran
ultra-veteran
Posts: 411
Joined: Mon Oct 27, 2008 12:11 am
Location: Slovakia
Has thanked: 35 times
Been thanked: 121 times

Re: Change .png in .exe

Post by merlinsvk »

The same applies to .fnt file. Same size and hex editor.

Why you need to replace that files?

EDIT:
Ahh okey, now I know why. Not all fonts are read from Data\Fonts folder.
So if you make new BMFont png+fnt files (smaller or equal in size) you can replace them in .exe.
Wolfik
ultra-n00b
Posts: 9
Joined: Wed Jun 22, 2011 12:25 pm
Has thanked: 1 time

Re: Change .png in .exe

Post by Wolfik »

Thanks all.
It will be a problem, I can not do much work in hex. (HxD)
I do not know how to select only png data and how to insert a smaller file.
Is there no other way to re-import png? bms?
User avatar
peter2005
advanced
Posts: 44
Joined: Fri Mar 25, 2016 8:26 am
Location: None
Has thanked: 3 times
Been thanked: 9 times

Re: Change .png in .exe

Post by peter2005 »

1. open both files (.exe and .png) in hxd
2. select all .png bytes and use ctrl+c
3. find starting position(first byte) of .png in .exe file
4. 'paste write' content there
5. save .exe file
merlinsvk
ultra-veteran
ultra-veteran
Posts: 411
Joined: Mon Oct 27, 2008 12:11 am
Location: Slovakia
Has thanked: 35 times
Been thanked: 121 times

Re: Change .png in .exe

Post by merlinsvk »

You can use this script to export and import that PNG and FNT file. Attachment also contains two batch files.
  • 0) Make backup of game's .exe file.
    1) Put all three files and quickbms.exe into main game folder and run _export.bat.
    2) Exported files will be in the "EXPORT" folder.
    3) Edit them (or replace). New files have to be smaller or equal in size!
    4) Run _import.bat and run the game.

Code: Select all

set OFFSET  0x2E4978
set PNGSIZE 0xA500	# 42240 bytes
set PNGNAME "arial20_as_bm_font_0.png"
set FNTSIZE 0xC68A	# 50826 bytes
set FNTNAME "arial20_as_bm_font_0.fnt"

log PNGNAME OFFSET PNGSIZE
math OFFSET + PNGSIZE
log FNTNAME OFFSET FNTSIZE
You do not have the required permissions to view the files attached to this post.
Wolfik
ultra-n00b
Posts: 9
Joined: Wed Jun 22, 2011 12:25 pm
Has thanked: 1 time

Re: Change .png in .exe

Post by Wolfik »

Yes , game works.
Very thanks.
merlinsvk
ultra-veteran
ultra-veteran
Posts: 411
Joined: Mon Oct 27, 2008 12:11 am
Location: Slovakia
Has thanked: 35 times
Been thanked: 121 times

Re: Change .png in .exe

Post by merlinsvk »

So this is Czecho-Slovak thread it seems.

Tak teda čaute. :keke:
Wolfik
ultra-n00b
Posts: 9
Joined: Wed Jun 22, 2011 12:25 pm
Has thanked: 1 time

Re: Change .png in .exe

Post by Wolfik »

merlinsvk wrote:So this is Czecho-Slovak thread it seems.

Tak teda čaute. :keke:
Zdar a ještě jednou dík :)
User avatar
peter2005
advanced
Posts: 44
Joined: Fri Mar 25, 2016 8:26 am
Location: None
Has thanked: 3 times
Been thanked: 9 times

Re: Change .png in .exe

Post by peter2005 »

piste anglicky lebo nas vykopnu :?

hope that not using english won't get us banned :D
Post Reply