H&DD and Hex Editing!
Posted: Sat Oct 06, 2012 5:20 pm
Hi everyone, thanks for having me here.
Recently I've picked up H&D Deluxe again, after having played its original release through hell and back and this version some time later in order to try the expansion pack. I've been replaying it this week, but after all these years only today did I took to tinkering with the Editor. Almost immediately after reading the first two pages of the tutorial, I felt ready to conquer the world. Haha, how little did I know!
One of the things that I did find annoying (other than Stealth being apparently useless in-game) was that I couldn't modify a mission's predefined objects. Sure, I can move a truck far away, or reduce the scale of something until it becomes near invisible, but unlike actors or models extracted from the main folders, I can't seem to, for instance, duplicate buildings (even if I can affect position and scale). I was feeling kinda miffed about this, in particular because all attempts to get 3DSM 3/3.1 have been met with utter defeat. So I tried something else.
While I have never really made any mods, I have spent some time messing around with editors, doing stuff ranging from texture work to game translations. For this, I used several programs, but one that I stuck with was Hex Workshop. HW is pretty fast and useful for all sorts of things, and while I'm not claiming to have made great strides in H&DD modding, I did come up with something useful (here's hoping this wasn't covered in the tutorial, otherwise I'll look like a fool ).
C6M1, the first level in Prague, has several destroyed buildings. There's the one almost at the start, with a blockade of cars and trucks, the one with the tank at the square and the other one with the streetcars. I had a small quibble trying to mod the one at the plaza. Other editors would allow me to, say, delete one portion of a model, then duplicate (or copy and paste) some other part. No matter what I did, I found myself stuck with the shop interior exposed. Remove the tank, yes, but not the debris. I could scale down the debris or move them under the ground but had no way to cover it up other than pilling models in front of it. Unless...
I decided to test something. With the hex editor, I searched the Scene.bin and Scene.i3d files for any references to the model in question. You'll note there are two shop facades - one in perfect condition to the right (vyklad17), and the other one destroyed on the left (vyklad14). I thought simply replacing all references to vyklad14 with vyklad17 in both files would be so simple and stupid that it wouldn't work.
But work it did:
Before:
After:
You can still see the debris because I haven't yet modified their presence. Apparently, outright deleting references to a model in the files makes it so the Editor does not recognize the mission, effectively corrupting the file and laying waste to any and all progress done. I tried doing this with some debries along the roads, like Line56, etc., and the Editor simply wouldn't recognize the changes - everything was pitch black, and a loading file error mentioned at the bottom of the screen, even if I didn't change anything else.
But it is interesting to note that, potentially, while this does not replace Studio Max as a better alternative to terrain editing and creation, it might mean that more specialized/specific editing can be achieved. In theory, this suggests I could place something like the train terminal from C1M3 in any other level through simple reference editing/switching, provided there is at least a model with similar characteristic (place in the map) and/or same amount of individual parts.
Next, I'll try doing this with buildings. The destroyed ones, I feel, are dangerous: they have more individual parts than a standard building, so it can't just be a case of replacing everything. My next goal goal is to have a duplicate of the outlined building in the following picture in place of the ruined one. They're actually almost the same size, so it wouldn't seem out of place.
I'll try my best and see what else I can pull off with hex editing. Hoping to return with more and better news!
EDIT: A quick note. After changing that particular part of the map, loading up the editor made the original vyklad17 blink in red. IIRC, the Editor pointed out the model no longer had a lightmap but so far there doesn't seem to be any problem whatsover.
Recently I've picked up H&D Deluxe again, after having played its original release through hell and back and this version some time later in order to try the expansion pack. I've been replaying it this week, but after all these years only today did I took to tinkering with the Editor. Almost immediately after reading the first two pages of the tutorial, I felt ready to conquer the world. Haha, how little did I know!
One of the things that I did find annoying (other than Stealth being apparently useless in-game) was that I couldn't modify a mission's predefined objects. Sure, I can move a truck far away, or reduce the scale of something until it becomes near invisible, but unlike actors or models extracted from the main folders, I can't seem to, for instance, duplicate buildings (even if I can affect position and scale). I was feeling kinda miffed about this, in particular because all attempts to get 3DSM 3/3.1 have been met with utter defeat. So I tried something else.
While I have never really made any mods, I have spent some time messing around with editors, doing stuff ranging from texture work to game translations. For this, I used several programs, but one that I stuck with was Hex Workshop. HW is pretty fast and useful for all sorts of things, and while I'm not claiming to have made great strides in H&DD modding, I did come up with something useful (here's hoping this wasn't covered in the tutorial, otherwise I'll look like a fool ).
C6M1, the first level in Prague, has several destroyed buildings. There's the one almost at the start, with a blockade of cars and trucks, the one with the tank at the square and the other one with the streetcars. I had a small quibble trying to mod the one at the plaza. Other editors would allow me to, say, delete one portion of a model, then duplicate (or copy and paste) some other part. No matter what I did, I found myself stuck with the shop interior exposed. Remove the tank, yes, but not the debris. I could scale down the debris or move them under the ground but had no way to cover it up other than pilling models in front of it. Unless...
I decided to test something. With the hex editor, I searched the Scene.bin and Scene.i3d files for any references to the model in question. You'll note there are two shop facades - one in perfect condition to the right (vyklad17), and the other one destroyed on the left (vyklad14). I thought simply replacing all references to vyklad14 with vyklad17 in both files would be so simple and stupid that it wouldn't work.
But work it did:
Before:
After:
You can still see the debris because I haven't yet modified their presence. Apparently, outright deleting references to a model in the files makes it so the Editor does not recognize the mission, effectively corrupting the file and laying waste to any and all progress done. I tried doing this with some debries along the roads, like Line56, etc., and the Editor simply wouldn't recognize the changes - everything was pitch black, and a loading file error mentioned at the bottom of the screen, even if I didn't change anything else.
But it is interesting to note that, potentially, while this does not replace Studio Max as a better alternative to terrain editing and creation, it might mean that more specialized/specific editing can be achieved. In theory, this suggests I could place something like the train terminal from C1M3 in any other level through simple reference editing/switching, provided there is at least a model with similar characteristic (place in the map) and/or same amount of individual parts.
Next, I'll try doing this with buildings. The destroyed ones, I feel, are dangerous: they have more individual parts than a standard building, so it can't just be a case of replacing everything. My next goal goal is to have a duplicate of the outlined building in the following picture in place of the ruined one. They're actually almost the same size, so it wouldn't seem out of place.
I'll try my best and see what else I can pull off with hex editing. Hoping to return with more and better news!
EDIT: A quick note. After changing that particular part of the map, loading up the editor made the original vyklad17 blink in red. IIRC, the Editor pointed out the model no longer had a lightmap but so far there doesn't seem to be any problem whatsover.