Jump to content


Photo

DoW 1 .sgb map file reverse engineering


4 replies to this topic

#1 Daemonjax

Daemonjax
  • Members
  • 7 posts

Posted 21 March 2021 - 12:12 AM

I wanted a way to easily and quickly rename and adjust the size of all decals of a particularly type in any given map.  So, the best way would be to write a program to do the map edits for me.

 

The first step would be to reverse engineer the necessary sections of the .sgb map file.  I'm pretty much done doing that -- I only needed to figure out the DATASMAP and DATAENTY sections to accomplish my original purpose.

 

 

I want to know if anyone else has done something similar (reverse engineering sections of the .sgb map files) in the past and, if so, whether any of that old info has been retained somewhere.  If I had more info on the .sgb file structure, I could add more features to it that I don't specifically need at this point but could be useful to others.  Google does not reveal any results.  Anyways, my tool should be done and released on the nexus in the next couple days -- I decided to write it in java.  I don't plan on making a gui for it unless there's enough features to warrant one.


Edited by Daemonjax, 21 March 2021 - 12:18 AM.


#2 jONES1979

jONES1979

    eL-jONESON

  • Members
  • 1,720 posts
  • Location:Еду в Саратов стрелять в пиратов!

Posted 21 March 2021 - 03:30 AM

 

 

There is an Advanced Mission Editor written by Dark40K in JAVA long ago.
 

It is able to both read and write SGB, as well as it has the GUI. And it is contains the full source code.

https://forums.revor...6/#entry1062104


Edited by jONES1979, 21 March 2021 - 03:34 AM.


#3 Daemonjax

Daemonjax
  • Members
  • 7 posts

Posted 24 March 2021 - 11:04 AM

Awesome.  Thanks for that link!  It looks like his tool does what mine does and much more.  Oh well, it's nice to have choices.  I'm particularly interested in checking out his code for decal rotation because it'd be nice to be able to randomize the rotation of specific map decals.  Decal rotation data wasn't something I was able to easily figure out, but I also didn't try that hard.

 

Anyways, I finished version 1.0 of my tool -- it does just one thing for now (although I plan to add support for resizing decals in .WHE files) -- it resizes decals in map files.  Doing that by hand with a hex editor isn't really feasible.

 

https://github.com/d...W1-Texture-Tool

 

EDIT:  I'm not able to run that guy's java program (the Advanced Map Editor).  I get a class not found exception.  That just shouldn't happen.  Looks like he's using reflection to load a class at runtime and the program can't find it. Could be a problem with the way the jar is packaged.  Probably trying to load a 3rd party library (which SHOULD be included in the distributed jar file). I'll try to figure the problem out when I have more time.


Edited by Daemonjax, 24 March 2021 - 12:02 PM.


#4 jONES1979

jONES1979

    eL-jONESON

  • Members
  • 1,720 posts
  • Location:Еду в Саратов стрелять в пиратов!

Posted 24 March 2021 - 11:58 AM

 

EDIT:  I'm not able to run that guy's java program (the Advanced Map Editor).  I get a class not found exception.  That just shouldn't happen.  Could be a problem with the way the jar is packaged.  I'll try to figure the problem out when I have more time.

Just don't forget to share your solution or description about how to handle that issue in current times.

 


Edited by jONES1979, 24 March 2021 - 12:02 PM.


#5 k1350369663

k1350369663
  • New Members
  • 4 posts

Posted 01 December 2021 - 07:48 AM

Java can't run the map editor stably





Reply to this topic



  


1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users