.com.unity Forums
  The Official e-Store of Shrapnel Games

This Month's Specials

Raging Tiger- Save $9.00
World Supremacy- Save $9.00

   







Go Back   .com.unity Forums > The Camo Workshop > WinSPMBT > Mods
Notices


Reply
 
Thread Tools Display Modes
  #1  
Old February 16th, 2014, 08:50 AM

Gooseman2448 Gooseman2448 is offline
Corporal
 
Join Date: Aug 2005
Posts: 135
Thanks: 2
Thanked 20 Times in 9 Posts
Gooseman2448 is on a distinguished road
Default 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
Reply With Quote
  #2  
Old February 16th, 2014, 08:54 AM
DRG's Avatar

DRG DRG is offline
Shrapnel Fanatic
 
Join Date: Mar 2005
Location: GWN
Posts: 12,256
Thanks: 3,809
Thanked 5,422 Times in 2,694 Posts
DRG will become famous soon enough
Default Re: Distorted shp images in MobHack??

what are the exact dimensions of your shp image.... not the artwork, the pink square it sits on
Reply With Quote
  #3  
Old February 16th, 2014, 12:08 PM

Gooseman2448 Gooseman2448 is offline
Corporal
 
Join Date: Aug 2005
Posts: 135
Thanks: 2
Thanked 20 Times in 9 Posts
Gooseman2448 is on a distinguished road
Default 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.
Reply With Quote
  #4  
Old February 16th, 2014, 12:38 PM
Mobhack's Avatar

Mobhack Mobhack is online now
National Security Advisor
 
Join Date: Mar 2005
Location: Dundee
Posts: 5,929
Thanks: 440
Thanked 1,853 Times in 1,217 Posts
Mobhack is on a distinguished road
Default 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
Reply With Quote
  #5  
Old February 16th, 2014, 01:04 PM
DRG's Avatar

DRG DRG is offline
Shrapnel Fanatic
 
Join Date: Mar 2005
Location: GWN
Posts: 12,256
Thanks: 3,809
Thanked 5,422 Times in 2,694 Posts
DRG will become famous soon enough
Default 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..
Reply With Quote
  #6  
Old February 16th, 2014, 11:20 PM
mkr8683's Avatar

mkr8683 mkr8683 is offline
Sergeant
 
Join Date: Dec 2007
Posts: 239
Thanks: 160
Thanked 81 Times in 51 Posts
mkr8683 is on a distinguished road
Default 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.
Reply With Quote
  #7  
Old February 17th, 2014, 12:03 AM
Mobhack's Avatar

Mobhack Mobhack is online now
National Security Advisor
 
Join Date: Mar 2005
Location: Dundee
Posts: 5,929
Thanks: 440
Thanked 1,853 Times in 1,217 Posts
Mobhack is on a distinguished road
Default 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
Reply With Quote
  #8  
Old February 17th, 2014, 03:37 PM
mkr8683's Avatar

mkr8683 mkr8683 is offline
Sergeant
 
Join Date: Dec 2007
Posts: 239
Thanks: 160
Thanked 81 Times in 51 Posts
mkr8683 is on a distinguished road
Default Re: Distorted shp images in MobHack??

Andy, I was asking Gooseman what he means by the image being distorted.
Reply With Quote
  #9  
Old February 17th, 2014, 03:50 PM
Mobhack's Avatar

Mobhack Mobhack is online now
National Security Advisor
 
Join Date: Mar 2005
Location: Dundee
Posts: 5,929
Thanks: 440
Thanked 1,853 Times in 1,217 Posts
Mobhack is on a distinguished road
Default Re: Distorted shp images in MobHack??

Quote:
Originally Posted by mkr8683 View Post
Andy, I was asking Gooseman what he means by the image being distorted.
OK

Andy
Reply With Quote
  #10  
Old February 17th, 2014, 04:42 PM
DRG's Avatar

DRG DRG is offline
Shrapnel Fanatic
 
Join Date: Mar 2005
Location: GWN
Posts: 12,256
Thanks: 3,809
Thanked 5,422 Times in 2,694 Posts
DRG will become famous soon enough
Default Re: Distorted shp images in MobHack??

Quote:
Originally Posted by mkr8683 View Post
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
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT -4. The time now is 06:40 PM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©1999 - 2024, Shrapnel Games, Inc. - All Rights Reserved.