![]() |
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 |
Re: Distorted shp images in MobHack??
what are the exact dimensions of your shp image.... not the artwork, the pink square it sits on
|
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. |
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 |
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 |
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.
|
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 |
Re: Distorted shp images in MobHack??
Andy, I was asking Gooseman what he means by the image being distorted.
|
Re: Distorted shp images in MobHack??
Quote:
Andy |
Re: Distorted shp images in MobHack??
Quote:
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 |
All times are GMT -4. The time now is 03:10 AM. |
Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©1999 - 2025, Shrapnel Games, Inc. - All Rights Reserved.