|
|
|
Notices |
Do you own this game? Write a review and let others know how you like it.
|
|
|
February 16th, 2014, 08:50 AM
|
Corporal
|
|
Join Date: Aug 2005
Posts: 135
Thanks: 2
Thanked 20 Times in 9 Posts
|
|
Distorted shp images in MobHack??
Hey guys,
Been working on a few things finally after a fatal hard drive issue. (My usb drive I was using got knocked off my desk... it was heart breaking.)
I had modified an icon (winter version of the LAV III 25) added it to a shp file and went to add it in MobHack but, the image was distorted.
Everything looks good in the shp file and as a bmp. It also looks fine in game.
I am just wondering if someone else had that issue and what you did to fix it.
I added the bmp files to a shp file I did previously and the images in line before these are fine in MobHack.
Anyway,
Cheers and great work by all as usual.
Gooseman2448
|
February 16th, 2014, 08:54 AM
|
|
Shrapnel Fanatic
|
|
Join Date: Mar 2005
Location: GWN
Posts: 12,487
Thanks: 3,957
Thanked 5,690 Times in 2,810 Posts
|
|
Re: Distorted shp images in MobHack??
what are the exact dimensions of your shp image.... not the artwork, the pink square it sits on
|
February 16th, 2014, 12:08 PM
|
Corporal
|
|
Join Date: Aug 2005
Posts: 135
Thanks: 2
Thanked 20 Times in 9 Posts
|
|
Re: Distorted shp images in MobHack??
Well,
The bmp I modified is:
89x89
1.229x1.229 inches (yank measurement... lol)
72 pixel per inch
24 bit
16 million colors
I used a blank bmp exported from shped, copied and pasted from a bmp exported from MobHack. I made my modifications and saved as a new bmp.
I notice though that bmp images from MobHack are:
88x88
1.222x1.222 in
72 ppi
24 bit
16 mil
I then noticed in shped in SP Fix the images I put in are sized as 87x87 and all the others that look fine in MobHack are 88x88.
This confusses me because I have done this a hundred times before and made dozens of shp files and have not noticed this. It may be something basic I am missing or a change I am mot aware of, just not sure what.
If I can I will try to post my files, may be tomorrow when I can get to my desktop and better connection.
Thank you for taking the time to help DRG.
|
February 16th, 2014, 12:38 PM
|
|
National Security Advisor
|
|
Join Date: Mar 2005
Location: Dundee
Posts: 5,955
Thanks: 464
Thanked 1,896 Times in 1,234 Posts
|
|
Re: Distorted shp images in MobHack??
Shped is using a zero-based index (normal "C" behaviour). So 87 is 88 i.e. pixels 0..87. SHPED is not our code, it is a third party utility provided for your convenience, with permission.
Mobhack adds 1 to give an end-user friendly result and not what makes sense to C programmers . End users tend to count from 1 up, not zero and up (the offset from the initial pointer index). That's why I report weapon slot 1 to 4, and not the 0 to 3 the game thinks they are, forex.
If replacing an existing SHP inside a SHP file then you have to use the exact same size. The icon sizes are hard-coded in internal game data. Your 89 pixel bitmap will likely have been packed into the space expected of the 88 square, so its going to produce weirdness.
Andy
|
February 16th, 2014, 01:04 PM
|
|
Shrapnel Fanatic
|
|
Join Date: Mar 2005
Location: GWN
Posts: 12,487
Thanks: 3,957
Thanked 5,690 Times in 2,810 Posts
|
|
Re: Distorted shp images in MobHack??
89x89 is the accepted size for a standard BMP image to be processed into a SHP so disregard what Andy suggested. He doesn't work with them but I do but he is correct that Shped is using a zero-based index .
The numbers you said your image originally was should have worked and should not have produced a distorted image. HOWEVER.. because you ended up with 87x87 showing in SPFix I suspect you were set up for 88x88 not 89x89
Don
Last edited by DRG; February 16th, 2014 at 02:02 PM..
|
February 16th, 2014, 11:20 PM
|
|
Sergeant
|
|
Join Date: Dec 2007
Posts: 239
Thanks: 160
Thanked 82 Times in 51 Posts
|
|
Re: Distorted shp images in MobHack??
How is it being distorted? I know it freaks out if you forget to save it in 24-bit.. also Mobhack shows weird icon images if they're bigger than 89x89.
|
February 17th, 2014, 04:42 PM
|
|
Shrapnel Fanatic
|
|
Join Date: Mar 2005
Location: GWN
Posts: 12,487
Thanks: 3,957
Thanked 5,690 Times in 2,810 Posts
|
|
Re: Distorted shp images in MobHack??
Quote:
Originally Posted by mkr8683
How is it being distorted? I know it freaks out if you forget to save it in 24-bit.. also Mobhack shows weird icon images if they're bigger than 89x89.
|
NO, it does not....... but you cannot just drop anything in there you want
It's been YEARS since I've had to deal with this......thinking 15 at least. 89x89 is the standard for 99% of the BMP's that are made into SHP's but larger SHP's...... like the Vulcan bomber or the Russian Badger are a good examples of larger than 89x89 images that do NOT cause MOBHack to "freak out"
The Vulcan and Badger are 109x109 and I believe I have used 101x101 as well but for certain 89x89 and 109x109 work in MOBHack and those two sizes will cover every Icon needed by either game.
Don
|
February 17th, 2014, 12:03 AM
|
|
National Security Advisor
|
|
Join Date: Mar 2005
Location: Dundee
Posts: 5,955
Thanks: 464
Thanked 1,896 Times in 1,234 Posts
|
|
Re: Distorted shp images in MobHack??
How would I know? - SHPEdit is someone else's code, after all. As is the magic bit of indecipherable Delphi that someone sent me to decode SHP files way over a decade ago. Nor have I read the SHP file format specification since 2005 or thereabouts.
But - it probably stuffs the compression routine up no end by giving it an unexpected amount of data (each icon is individually compressed, not the SHP file as an entirety - that is about the only thing I half remember form 10-15 years ago).
Utter guess of course - I am not going to spend hours and hours reading code (especially obscure code I never wrote) to try to figure out whatever it does to answer some casual forum query, especially since there's a fix for the 'problem' that is already known..
Andy
|
February 17th, 2014, 03:37 PM
|
|
Sergeant
|
|
Join Date: Dec 2007
Posts: 239
Thanks: 160
Thanked 82 Times in 51 Posts
|
|
Re: Distorted shp images in MobHack??
Andy, I was asking Gooseman what he means by the image being distorted.
|
February 17th, 2014, 03:50 PM
|
|
National Security Advisor
|
|
Join Date: Mar 2005
Location: Dundee
Posts: 5,955
Thanks: 464
Thanked 1,896 Times in 1,234 Posts
|
|
Re: Distorted shp images in MobHack??
Quote:
Originally Posted by mkr8683
Andy, I was asking Gooseman what he means by the image being distorted.
|
OK
Andy
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is On
|
|
|
|
|