Planet Descent

Development => Descent Development => Topic started by: SaladBadger on May 22, 2011, 05:51:09 AM

Title: PiggyDump lives.....
Post by: SaladBadger on May 22, 2011, 05:51:09 AM
A long while back I began work on a editor for Descent 1 PIGfiles called "PiggyDump". It wasn't much, and it was really only capable of viewing the tablefile data. It looked a little bit like this:

(http://basementnet.us/ryan/smartmissile.PNG)

I was also getting ready to port it to work with Descent II HAMFiles but after a while... It was taking so long because the code was written rather poorly, and the thing fell into obscurity. So after me getting back into classic descent I go back into time and start working on PiggyDump again. I completely restructure the code, drop the old UI for a new one, which is still in development, and add one important thing that wasn't present in the original PiggyDump -- image previews. I throw together a RLE decompresser and start working on getting an image loader in place. Here's what I have so far:

(http://basementnet.us/ryan/piggyrle.png)

It can read any image file in the HOG archive, and it handles compressed graphics fine. I will continue development into the summer, and when I get enough the thing working, I will shift focus over to HamEdit -- While I wanted to try to  be the first to write a full-featured D1 PIGFile editor, since Descent 1 never supported patch files, it's not really useful to the casual modder. HamEdit will be more useful to anyone wanting to mod classic descent games until one of the ports defines a spec that allows you to override tablefile data in Descent 1 using .HXM files or something. HamEdit will be much the same, and it will be able to modify HAMs, HXMs, and V-HAMs.

Hopefully, I'll be able to reach my original goals, and create a new descent editing suite that can replace the entirety of Descent Manager (though I won't make a modeler... I'd look into export scripts for Blender or other favorite tools), which extends them and duplicates their functionality in a much more stable (and sane!) way. But there's still much work to do until then...
Title: Re: PiggyDump lives.....
Post by: NUMBERZero on May 22, 2011, 07:12:00 AM
It it possible to modify the HUD with a different HUD and can I move around the gages and screw with the size of them? or is that hard code?
Title: Re: PiggyDump lives.....
Post by: SaladBadger on May 22, 2011, 07:13:06 AM
The gague positions are hardcoded as far as I am aware, so you'd have to modify the source and recompile to adjust them.

And a look at the new UI for editing things like VClips:

(http://basementnet.us/ryan/vclipedit.png)
Title: Re: PiggyDump lives.....
Post by: Crash on May 22, 2011, 01:29:21 PM
This is pretty illuminating. That's a really good app you've got there and looking at your first screen, Descent has a huge number of variables for its weapons and ballistics etc. That's a mod-able game for you.
Title: Re: PiggyDump lives.....
Post by: SaladBadger on May 22, 2011, 01:39:51 PM
Heh, it'd be more moddable if you could actually override things with "patch" files (you can to a limited extent in Descent II, but only a limited amount of the tablefile data can actually  be changed), while DXX-Rebirth eventually wants to implement support for said patches in the future, currently you're only limited to just changing the default datafiles.

I imagine that the entire thing could be used to create a complete Descent TC with completely new robots, textures, weapons, and everything that isn't hardcoded right into the executable, but I don't think the D1 modding scene is live enough for people to do so :P
Title: Re: PiggyDump lives.....
Post by: Scyphi on May 23, 2011, 05:19:39 AM
I actually kind of always liked D1 for it's lack of modability, as it forced level builders to be creative with what they got.

But I have to admit the idea of being able to mod the death out of D1 is pretty intriguing. :P
Title: Re: PiggyDump lives.....
Post by: SaladBadger on May 27, 2011, 07:01:30 AM
PiggyDump is still living, but with school ending and all, it's kinda slowing down

I'm starting to love the new PiggyDump code I've been working on. The interface for making those "browse element" buttons as well as those on the "frame" subpanel are now easily adapted to work with panels and subpanels on other pages. I don't even need to touch the events at all. I just add a few elements to an array, and tweak a function or two, add an panel update function, and they work. I also added support for "naming" elements. On panels where I can name individual elements, I present a list box with names of all known elements. And when you're picking, say, a vclip in another type of element, instead of putting an index in a textbox, a combobox with all names will be used. In the final version, the user will be able to change these and save them to config files.  Speaking of config..

I added a simple options file parser, which will hold paths for support .HOG files, and in Descent II it will also hold the current texture .PIG file. The options file parser is simplistic -- it loads elements with the following format

Code: [Select]
name=value<linebreak>
In theroy, it should work with linebreaks of all standard styles (CR, LF, CR-LF), and it stores every option read into an arraylist. Elements are then drawn out of there by name. If you want to get the palette file, a simple call to GetOptionByName("Palette") will fetch the path to the current filename. The only issue with this is that extra keys don't get dropped even if the program doesn't need them. As a result, this:

Code: [Select]
pie=delicious
heh=lol
What is the answer to life, the universe, and everything?=42
sandwiches=what
descent=yes
dumppigs=yes
keyboard=mouse

would present an entirely valid config file and every key would be kept in the file even if its value is never used. I considered adding comment support for a controlled version of this, but in a file that's going to contain nothing but the location of a palette file, five or six large arrays, and maybe a few other values, I have no reason to, really.
Title: Re: PiggyDump lives.....
Post by: SaladBadger on June 10, 2011, 08:20:04 AM
I implemented the first versions of the saving routines into PiggyDump, and PiggyDump can now write out a completely specs-compliant .PIG file for Descent 1. Two issues though:


Once I get these two things resolved, I'll put up a video file showing some of the basic modifications PiggyDump is capable of right now.

EDIT: And now the offset bug is fixed, and every sound now sounds correct. Given the nature of the bug, I'm surprised that I didn't encounter even more obvious faults.
Title: Re: PiggyDump lives.....
Post by: Pumo on June 10, 2011, 02:14:45 PM
  • The file ends up being half a meg larger. This throws off DXX-Rebirth, as it uses filesizes to determine version (there's no version info at all in the .PIG file)
...

BUT, if I'm not wrong, Rebirth 0.57 version will offer support for custom modded PIG files (or PIG & HAM files in the case of D2) per-mission, independant of the main PIG file and version checks. (e.g. You can put a Descent.pig file inside your mission hog and Rebirth will read it).

So this would be great to make full-blown D1 mods! :D
Title: Re: PiggyDump lives.....
Post by: SaladBadger on June 11, 2011, 12:23:43 PM
Hmm, if that's the case everything should work nicely then. I need to work on cleaning up things though so I don't get that file size increase

Also, a video of my latest tests (http://www.youtube.com/watch?v=dIwfIxaPlu8)
Title: Re: PiggyDump lives.....
Post by: Sapphirus on June 11, 2011, 02:15:09 PM
Nice!
Quick question(s)-
First of all,
Will this also be a replacement for DTX1 and 2?  since the 2 DTX softwares don't run on Win7.

Secondly,
Will it have the ability to replace wav files and bitmaps with your own without the need of the DTX softwares?  For like DTX files for d1 and d2 levels and Pog files for D2.
Title: Re: PiggyDump lives.....
Post by: SaladBadger on June 11, 2011, 02:17:44 PM
Eventually, yes. Bitmaps and sounds are loaded from the file, and at this point it's mostly just working on file importers. In order to make .POGs though, you'll have to wait until Descent II Workshop. At the rate PiggyDump is progressing, that should hopefully be coming sometime reasonable...
Title: Re: PiggyDump lives.....
Post by: Scyphi on June 12, 2011, 06:46:16 AM
My only fear about all of this is that there are going to be too many people that sit down to mod D1 and mod it in ways that it really aren't improvements, but are just flat out annoying. Kind of like the laser effect you showed off, Insanity, only I've seen a lot worse in both D2 and D3. As I see it, people think that if they just put in a bunch of cool mods, that'll make the game, when more often than not, it doesn't. I can't tell you how many potentially good D2/D3 levels I've seen that were ruined for me because they got too carried away with mods, or just flat out weren't good mods to begin with.

Again, that's part of the reason why I like D1 so much, because it was so resistant to modding, it forced people to work harder, to be more creative, and as such, I feel D1 got some of the better custom missions because of it.

I'm not trying to sound bitter or anything like that by saying this, BTW, and I am still for it, but I suppose I just feel...threatened...by the fact that D1 might no longer be safe from this unfortunate and inherent outcome of modding. Not that it can be avoided, either, because obviously, if you're going to give the public the ability to mod, then there's no way to prevent this either...

Peh, now I'm rambling...feel free to ignore what I'm saying if you so wish...
Title: Re: PiggyDump lives.....
Post by: -<WillyP>- on June 12, 2011, 07:17:29 AM
You are exactly right, Scy, first in that people will make mods just because the can, and second there isn't anything you can do to prevent it. Except offer honest, constructive criticism when those inevitable levels do pop up.
Title: Re: PiggyDump lives.....
Post by: SaladBadger on June 12, 2011, 07:30:38 AM
Heh, my first batch of modifications were exactly that. Once the novelty of seeking missiles that looked like proxbombs wore off, I started looking into much more serious modifications to the robots, in an attempt to rebalance them. The Defense Prototypes, for example, never struck me as anything special, so I gave them a new laser which is roughly the same as the robot lasers, but slightly faster, and went on to make other small changes to various robots to make them a bit stronger while still quite fair. It even gives the red triangle a use, a stationary crystal of some sort that fires lasers as if it was a turret. All of it makes combat with them more fast-paced, but I'm not going to demo these new mods though until I finish up a level based around them, however.

I don't believe that many will use PiggyDump as is, however, because D2X-XL already adds the ability to overhaul elements I believe using .HXMs in Descent 1 and Rebirth is about to gain the same ability. Once this happens, I will be sure to make PiggyDump capable of doing this, which will also pave the path to Descent II Workshop (which will be directly descended via PiggyDump code) in a nicer way.
Title: Re: PiggyDump lives.....
Post by: Matthew on June 12, 2011, 08:26:31 AM
Is PiggyDump really the first progrma to open .PIG files? I thought there was like a half-dozen tools to do that on PD.com.
Title: Re: PiggyDump lives.....
Post by: SaladBadger on June 12, 2011, 08:28:27 AM
It's not the first tool that opens up the .PIG file. It's the first one that lets you access and edit the tablefile information, as far as I am aware, however.
Title: Re: PiggyDump lives.....
Post by: Pumo on June 12, 2011, 09:34:10 PM
...and there was not a half-dozen, there were only two: DTX and DTX II. :P

And DTX (for D1) only modifies textures, sounds and HOG files, not table files.
Title: Re: PiggyDump lives.....
Post by: Sapphirus on July 22, 2011, 12:34:33 PM
*1 month bump*

soooooooo... What's the current status on this tool? (didn't mean to be picky)
Title: Re: PiggyDump lives.....
Post by: SaladBadger on July 22, 2011, 08:00:43 PM
I'm still working on it off and on. Been a bit busy with some other things (http://www.youtube.com/watch?v=SfxQMR5MyXg) and registering for college classes though.

The code is getting a bit messy though, I fear I might have another rewrite coming up in the future...
Title: Re: PiggyDump lives.....
Post by: SaladBadger on January 24, 2012, 02:24:59 PM
I've been out of the modding loop for quite a long time now (my last post for this was in JULY? Egh. I feel like I'm getting old.), but I'm thinking of potentially coming back to it. But, I'm wondering what people care about more. I've been making this tool to edit Descent 1 simply as a proof of concept, so I'm wondering if I should focus more on getting stuff for Descent II working.

Another thing I'm considering is trying to port Devil to modern computers, and sprucing it up with stuff like better handing of levels with more cubes, a slightly more modern UI, and possibly even support for D2X-XL exclusive features. I put this thing up on the poll.

Also, I've come to the conclusion that POLYTRON is something I'd rather not have my users touch. If I was to add support for exporting Descent polymodels in a modern editor package like Blender, do you think anyone would use it? The production of low poly models in Blender is actually fairly easy, and it beats the approach where one lays down verts one at a time, and then group them into faces.

I'm hoping that I can live up to whatever goal I've set here, but I feel horribly unreliable and honestly quite terrible that I let this thing linger for so long.
Title: Re: PiggyDump lives.....
Post by: Scyphi on January 26, 2012, 03:12:33 PM
I always wanted to give Devil a try, just to see what it was like, but after that, I wouldn't know if I'd ever use it. I am fairly content with DMBII...er...DLE-XP (seriously, is anyone still using DMBII anymore?). So...I don't even know why I brought it up.

Being familiar with Blender, though, I wouldn't be against for Descent polymodeling support for it or something similar, especially seeing I haven't been able to get POLYTRON to work in years anyway, not to mention the fact that I never really did quite figure out how to use it.
Title: Re: PiggyDump lives.....
Post by: SaladBadger on January 28, 2012, 07:54:41 AM
Apparently I haven't managed to attract anyone to this thread to vote (would promises of pizza help?), so I think I'm just going to go on my gut instincts now and start working on Descent II Workshop. PiggyDump was fun, and I will return to it eventually, but I think for the moment I'm better off trying to put my effort into tweaking it to work with Descent 2.

As Scyphi mentioned, it is possible to map already, so the Devil stuff might be on hold (I doubt I have the skill to do it anyways yet), but I'm going to try to shoot for a Blender exporter that works with D2W, as soon as I boost my python knowledge some, and figure out how Blender does some stuff.