---- Update (10-2) ------------
DONE! Well, buggy. I got the major ones out so it can read weapons platform txt files easier. To be honest, till I get home in an hour I am not sure it will work. However, since the ship hull files I take apart and put back together equal one another I am going to say “sure”.
How to use: Basically, you click on open (ignore the two buttons down there) and it will ask for the hull file to open. (data\ships\hulls\race\file.txt) and then it will ask for the graphic file (data\bitmaps\ships(race)(ship dir)\file.dds) then it will load a picture of where the hard points are located and any sub Turret it might have. You can then click and drag any of the hard points anywhere you want. To add a hard point, right click where you want to add and select “Add->” and the type. You can also delete by hovering over a hard point or change its type.
To add a sub Turret, be sure its a Turret and right click, then select “Add Sub Turret”, It will create one a bit above where the turret is, just click and drag it to the place you want. On the left it will tell the true X, Y position of the mouse, and when your over a turret its “Virtual” x,y. (I am assuming ALL ships use a 256,256. If not I think I found a bug:P)
Give it a shot. Be sure to back up your data directory first though. The whole program processes all the numbers as ints so if things are slightly off I can fix that too. Enjoy!
(Note: Be SURE to get .NET 3.5 from the Microsoft update site. I COULD program this thing in C++, but then I COULD spend another month on it:P)
Man, some big updates too. Now you can move around the turrets and place them anywhere you want. You can now add turrets, delete them and change the type. I don’t like how I am handling the context menu, but I realize this is a “tool” It might be a hack job, but its going to work decent enough for a normal person.
Things I will finish up tomorrow on is adding the “extra” turret emplacements (When one turret really puts more than one down, like on some cruisers) and, er, saving. Yea I know, the whole PURPOSE is to save the damn data, and it IS being updated in the correct structure so saving will be fairly easy. Its just close to 6:30 now and I am wanting to go home from work so neyh.
The “new” Context menu, I think, requires .NET 3.0. I can go to the old type so if anyone has any problems just post:)
Also, NO error checking, its going to spew if you pick any other text file other than the one in hulls\race\ship.txt structure.
Didn’t want to keep filling the forms with new posts so I thought I keep editing this one.
Big milestone today. It now reads ship files, parses them (well, just the header and the slot section) draws the bitmap, then draws where all the turrets go. I even have it draw lines to the other spots
if there are more than one turret that is place per turret placement. Next on the list I am going to add a drag/add turret function (or delete). I figure if I do just one part of the editing a time I can make it more functional over time.
To use, just open the program, and pick “Open” in the menu. It will ask you to open the txt file of the ship first. Then it will ask you to open the DDS file of the bitmap of the ship and poof.
Seems to work, so far, with a bunch of the random ships in the main data directory, but I haven’t fully tested it on other mods. Don’t open other than txt and dds files as there is NO error checking so it will just cut off.
Ok, its not much at all to be honest. All it can do now is open a dds file, properly parse the heading and display it on the screen. In fact most of the code that reads the file is incredibly inefficent, but it took me dang near 5 hours of my life so here it is.
Alright, conversion to C# is complete and its a HECK of alot faster. It reads DDS files in a blink of an eye, compressed or not. Still have some alpha problems with DXT3 and DTX5 but going to let them slide for now. Still, 14k for a file is fairly nifty.