XeNTaX Forum Index
Forum MultiEx Commander Tools Tools Home
It is currently Tue Oct 23, 2018 11:11 pm

All times are UTC + 1 hour


Forum rules


Please click here to view the forum rules



Post new topic Reply to topic  [ 10 posts ] 
Author Message
 Post subject: Change .png in .exe
PostPosted: Sat Oct 06, 2018 2:01 pm 
Offline
ultra-n00b

Joined: Wed Jun 22, 2011 12:25 pm
Posts: 4
Has thanked: 1 time
Have thanks: 0 time














You can make the ads go away by registering

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.

Top
 Profile  
 
 Post subject: Re: Change .png in .exe
PostPosted: Sat Oct 06, 2018 4:32 pm 
Offline
beginner

Joined: Fri Mar 25, 2016 8:26 am
Posts: 28
Location: SVK
Has thanked: 0 time
Have thanks: 4 times
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.


Top
 Profile  
 
 Post subject: Re: Change .png in .exe
PostPosted: Sat Oct 06, 2018 4:46 pm 
Offline
ultra-veteran
ultra-veteran

Joined: Mon Oct 27, 2008 12:11 am
Posts: 405
Location: Slovakia
Has thanked: 35 times
Have thanks: 112 times
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.


Top
 Profile  
 
 Post subject: Re: Change .png in .exe
PostPosted: Sat Oct 06, 2018 6:20 pm 
Offline
ultra-n00b

Joined: Wed Jun 22, 2011 12:25 pm
Posts: 4
Has thanked: 1 time
Have thanks: 0 time
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?


Top
 Profile  
 
 Post subject: Re: Change .png in .exe
PostPosted: Sat Oct 06, 2018 8:18 pm 
Offline
beginner

Joined: Fri Mar 25, 2016 8:26 am
Posts: 28
Location: SVK
Has thanked: 0 time
Have thanks: 4 times
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


Top
 Profile  
 
 Post subject: Re: Change .png in .exe
PostPosted: Sun Oct 07, 2018 9:13 am 
Offline
ultra-veteran
ultra-veteran

Joined: Mon Oct 27, 2008 12:11 am
Posts: 405
Location: Slovakia
Has thanked: 35 times
Have thanks: 112 times
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:
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


Attachments:


You do not have the required permissions to view the files attached to this post. Register to gain access.



Top
 Profile  
 
 Post subject: Re: Change .png in .exe
PostPosted: Sun Oct 07, 2018 10:25 am 
Offline
ultra-n00b

Joined: Wed Jun 22, 2011 12:25 pm
Posts: 4
Has thanked: 1 time
Have thanks: 0 time
Yes , game works.
Very thanks.


Top
 Profile  
 
 Post subject: Re: Change .png in .exe
PostPosted: Sun Oct 07, 2018 1:35 pm 
Offline
ultra-veteran
ultra-veteran

Joined: Mon Oct 27, 2008 12:11 am
Posts: 405
Location: Slovakia
Has thanked: 35 times
Have thanks: 112 times
So this is Czecho-Slovak thread it seems.

Tak teda čaute. :keke:


Top
 Profile  
 
 Post subject: Re: Change .png in .exe
PostPosted: Mon Oct 08, 2018 12:54 pm 
Offline
ultra-n00b

Joined: Wed Jun 22, 2011 12:25 pm
Posts: 4
Has thanked: 1 time
Have thanks: 0 time
merlinsvk wrote:
So this is Czecho-Slovak thread it seems.

Tak teda čaute. :keke:


Zdar a ještě jednou dík :)


Top
 Profile  
 
 Post subject: Re: Change .png in .exe
PostPosted: Mon Oct 08, 2018 8:32 pm 
Offline
beginner

Joined: Fri Mar 25, 2016 8:26 am
Posts: 28
Location: SVK
Has thanked: 0 time
Have thanks: 4 times
piste anglicky lebo nas vykopnu :?

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


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 10 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: jeka215 and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group