War2.ru Slogan
News: If your graphics are broken you can fix with the new ddraw version.
** Read how to install it here **


Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
Welcome to the forums! We're glad to have you here! :) You can register your account here, then feel free to introduce yourself in the Server.War2.ru board & let us know who you are on the server.

Handy PUD bitmap maker. 434  11

Ogre Posts: 1023 Karma: +64/-0 *******

Lambchops

  • Ogre
  • *******
  • *
  • Posts: 1023
    • View Profile
Handy PUD bitmap maker.
« on: May 27, 2018, 01:47:56 AM »
Looks like mostly my SS grabber is only being used to make pics of maps - not really in game SS, so this is probably much easier to use.

TuPaC asked for this so I just did a very quick and nasty hack of my pud editor project and made it a console app.

Just unzip then drop a .pud file onto pudpic.exe and it will make a .bmp file, without having to use war2 at all.

128x128 full map bitmaps are over 16MB so you will probably want to convert to png or jpg or whatever.

There's no error checking - if you give it a rubbish file it will just crash.


UPDATED 9/2018

Will now resize &/or save to jpeg format (see below).
Death Knight Posts: 2517 Karma: +79/-2 *********

tupac

  • Death Knight
  • *********
  • *
  • Posts: 2517
    • View Profile
Re: Handy PUD bitmap maker.
« Reply #1 on: May 27, 2018, 02:19:45 AM »
Looks like mostly my SS grabber is only being used to make pics of maps - not really in game SS, so this is probably much easier to use.

TuPaC asked for this so I just did a very quick and nasty hack of my pud editor project and made it a console app.

Just unzip then drop a .pud file onto pudpic.exe and it will make a .bmp file, without having to use war2 at all.

128x128 full map bitmaps are over 16MB so you will probably want to convert to png or jpg or whatever.

There's no error checking - if you give it a rubbish file it will just crash.



Thanks works perfect!

make a batch file

cd C:\War2Combat\maps\
for /r %%i in (*.pud) do pudpic.exe "%%i"
pause

edit your war2 maps directory above put the files(pudpic files, bat.file) into the same directory the root map folder is. Now it will convert all your maps to an image! :)



Edit: Adding those map pictures to my game info list. Would look cool if @iL added that to the anti hack status page....








Administrator Ogre Posts: 1076 Karma: +104/-9 *****

iL

  • Administrator
  • Ogre
  • *****
  • *
  • Posts: 1076
    • View Profile
*

iL

Re: Handy PUD bitmap maker.
« Reply #2 on: May 28, 2018, 06:39:49 AM »
Would look cool if @iL added that to the anti hack status page....
Hm, would be very interesting to get that pubpic for UNIX!

To make it possible to build that as ./pudpic file.pud file.bmp (or png).
Then we will be able to make something like maps gallery, similar to ss.war2.ru.
@Lambchops, what do you think about that?

Also, my desire: an option to write amount of gold/oil on mine/patch.
Gold mine with number 60000 or w/e would be very useful as for me.
Ogre Posts: 1023 Karma: +64/-0 *******

Lambchops

  • Ogre
  • *******
  • *
  • Posts: 1023
    • View Profile
Re: Handy PUD bitmap maker.
« Reply #3 on: May 30, 2018, 01:33:43 AM »
Would look cool if @iL added that to the anti hack status page....
Hm, would be very interesting to get that pubpic for UNIX!

To make it possible to build that as ./pudpic file.pud file.bmp (or png).
Then we will be able to make something like maps gallery, similar to ss.war2.ru.
@Lambchops, what do you think about that?

Also, my desire: an option to write amount of gold/oil on mine/patch.
Gold mine with number 60000 or w/e would be very useful as for me.

Yeah I would like to add some more features like that, should be pretty easy, it's on my to-do list.

Re-building it for UNIX is possible, although there's some Windows specific API functions used in both the exe (C++) and the DLL's (ASM) so they would have to be re-written to use their UNIX counterparts.
Death Knight Posts: 3019 Karma: +70/-2 retired, be in music section *********

easycompany

  • Death Knight
  • *********
  • Posts: 3019
  • retired, be in music section
    • View Profile
Re: Handy PUD bitmap maker.
« Reply #4 on: September 15, 2018, 10:37:47 PM »
i really love you lamb
Death Knight Posts: 3019 Karma: +70/-2 retired, be in music section *********

easycompany

  • Death Knight
  • *********
  • Posts: 3019
  • retired, be in music section
    • View Profile
Death Knight Posts: 3019 Karma: +70/-2 retired, be in music section *********

easycompany

  • Death Knight
  • *********
  • Posts: 3019
  • retired, be in music section
    • View Profile
Death Knight Posts: 3019 Karma: +70/-2 retired, be in music section *********

easycompany

  • Death Knight
  • *********
  • Posts: 3019
  • retired, be in music section
    • View Profile
Re: Handy PUD bitmap maker.
« Reply #7 on: September 15, 2018, 10:46:14 PM »
Death Knight Posts: 3019 Karma: +70/-2 retired, be in music section *********

easycompany

  • Death Knight
  • *********
  • Posts: 3019
  • retired, be in music section
    • View Profile
Re: Handy PUD bitmap maker.
« Reply #8 on: September 15, 2018, 11:02:07 PM »
i am a spirioth clone
Death Knight Posts: 3019 Karma: +70/-2 retired, be in music section *********

easycompany

  • Death Knight
  • *********
  • Posts: 3019
  • retired, be in music section
    • View Profile
Ogre Posts: 1023 Karma: +64/-0 *******

Lambchops

  • Ogre
  • *******
  • *
  • Posts: 1023
    • View Profile
Re: Handy PUD bitmap maker.
« Reply #10 on: September 16, 2018, 04:39:35 AM »
OK I have finally done a little bit more on PUDPIC.

You can get the new version HERE.


I wrote an ASM image resize/blend procedure so it can produce a pic of the size you want. Also has a jpeg save option.

i.e.

    PUDPIC /s:500  MyMap.pud

will make a 500x500 32 bit blended bitmap

Without the /s switch it will default to producing a full size 8bit bitmap with the original game palette (the current behavior).

   PUDPIC /j:80 ThisMap.pud

will save the full size 8 bit image as a quality 80 jpeg

   PUDPIC /s:1024 /j:90 Maposaurus.pud

will resize to 1024x1024 and save as quality 90 .jpg file

 ^- THESE SETTINGS SEEM TO BE PRETTY GOOD FOR A GENERAL PURPOSE POST ON FORUM/DISCORD ETC IMAGE
( give you around a 300KB file that looks ok if you dont zoom in too close)




... also if you want you can just rename the exe file to include the size/quality.

i.e.  if you rename it to "PUDPICs500.exe" it will automatically make a 500x500 bitmap any time you drop a file on it.

or if you rename it to "PUDPICs1024j90.exe" it will automatically make a 1024x1024 quality 90 jpeg any time you drop a file on it.

You can even have multiple copies of the exe file with different sizes you use and just drop your pud file on the one you want.

Like this:




I *think* the command line switches will work in a UNICODE environment - but please let me know if you have any problems.

Have fun  :critter:


Ogre Posts: 1023 Karma: +64/-0 *******

Lambchops

  • Ogre
  • *******
  • *
  • Posts: 1023
    • View Profile
Re: Handy PUD bitmap maker.
« Reply #11 on: September 16, 2018, 04:47:07 AM »




Here's gow resized to 1024x1024 jpg qual 90

Seems ok for a 267KB file.

Of course you can play with the settings and make anything from a full sized pixel perfect bitmap to a thumbnail if you want.



-- EDIT --

   .....  and OMG lmao at those default hall spots ;D even after 20 years they still make me go WTH?