If this is all you want to do, it's good enough, if not, you want to go back to the multi form one (display more info, select a specific entry, etc). There are loads of things you can add that would benefit the program. I don't have to game so I have no idea or real insentive to create something, but if I would, I'm sure i can think of over 10 things to put in there.
I'll let you get to it now, and please post what you made out of it, I'm curious and will give you some pointers if you like.
The Forum is up for sale: XeNTaX Forum looking for new owner
Zone 66 Ship Editor - Ideas?
-
NKCSS
- advanced
- Posts: 76
- Joined: Mon Oct 08, 2007 10:19 pm
- Location: Leiden, The Netherlands
- Contact:
Well, if every ship is padded with 36 0's, you'd have a signature to look for, and you'd be able to find them in the file.Darkfox wrote:Well it does work on regular VB2005 and I do see what is going on in the code. I can see the public structure is established like it is in the one guy's code with the addition of Gun1 (a bit iffy since guns are handled in a different way but all have at least 1 gun so it's alright I would believe)
The problem though becomes that a Zone 66 *mapdata3.z66 contains... I'm not sure the exact count but around 4-6 ships. I'd have to look at the files when I get home to get that information. Thats why I was adding a "next" and "back" button.
Edit: Nevermind. LOL
An idea: try to find out how to detect a ship, write a routine that reads thrue the stream, finding starting positions of the ship data, and using those positions. Once you have that, you could use a listview or dropdownlist that allows a user to pick a ship and edit it.
-
Darkfox
- VVIP member

- Posts: 688
- Joined: Fri Jul 04, 2003 6:11 pm
- Has thanked: 33 times
- Been thanked: 16 times
A great idea and I see where you are coming from. Instead of seeking the next ship in the file or going back it would just list them all based on name and you'de select from a list? I'd have to see if current knowhow and what I can assimilate (lol Borg) from what you've written will give me the idea. But as far as that goes I'm more intent on establishing something that works first THEN pretty it up.An idea: try to find out how to detect a ship, write a routine that reads thrue the stream, finding starting positions of the ship data, and using those positions. Once you have that, you could use a listview or dropdownlist that allows a user to pick a ship and edit it.
Establishing a working foundation is my first concern almost always. Then I can have fun with it.
Thanks a whole lot and I'll check it once I get home which shouldn't be long from now.
There tends to be around that number of 0s after a name if you saw the ship disection image I put together. I think the program seeks the meat of the ship data. Later I'd have to find a way to not use these 0s perhaps and instead a pattern within the z66 format structure that tells it instead. Just some thoughts.Well, if every ship is padded with 36 0's, you'd have a signature to look for, and you'd be able to find them in the file.
Last edited by Darkfox on Tue Oct 16, 2007 11:11 pm, edited 1 time in total.
-
Darkfox
- VVIP member

- Posts: 688
- Joined: Fri Jul 04, 2003 6:11 pm
- Has thanked: 33 times
- Been thanked: 16 times
It is displaying values within the files but they aren't the correct values. I'll just tweak some things until it displays correctly or if I get something more solid on the ship packs. It's good to see it's gotten this far at least.
Edit: Alright, some things to tweak and add is all for right now. I'll attach it when I'm done.
Edit2: Got every value displaying on the form, still not the right values but still it is displaying everything (minus Gun1, which for now is disabled bringing byte total to 42). More tweaking. I can't help but think something the one program the guy made compared to this one has something else. What were those other numbers?
1423L? "lseek" seems that it seeks each instance of a set of these values. 1423L I'm not certain of.
Edit3: Leaves me wondering. Guess it's best to test the cheat program then compare the results.
Edit 4: Now this is what happened, the cheat program only changes one ship. The "dfa bomber" which means I'll have to figure out something more solid about the structure. :\
Edit 5: Yep, it's been confirmed to be the case. The cheat program was designed SPECIFICALLY to edit the data of "dfa bomber" only. Well at least now something is started. Thanks. I guess I'll just ask somebody if they can figure out the way it stores this information.
Edit: Alright, some things to tweak and add is all for right now. I'll attach it when I'm done.
Edit2: Got every value displaying on the form, still not the right values but still it is displaying everything (minus Gun1, which for now is disabled bringing byte total to 42). More tweaking. I can't help but think something the one program the guy made compared to this one has something else. What were those other numbers?
Code: Select all
/* Real stats are stored here. */
handle = open( "MAPADAT3.Z66", O_BINARY | O_RDWR );
lseek( handle, 1423L, SEEK_SET );
_read( handle, &sdat, sizeof sdat );
lseek( handle, 1423L, SEEK_SET ); Edit3: Leaves me wondering. Guess it's best to test the cheat program then compare the results.
Edit 4: Now this is what happened, the cheat program only changes one ship. The "dfa bomber" which means I'll have to figure out something more solid about the structure. :\
Edit 5: Yep, it's been confirmed to be the case. The cheat program was designed SPECIFICALLY to edit the data of "dfa bomber" only. Well at least now something is started. Thanks. I guess I'll just ask somebody if they can figure out the way it stores this information.
-
NKCSS
- advanced
- Posts: 76
- Joined: Mon Oct 08, 2007 10:19 pm
- Location: Leiden, The Netherlands
- Contact:
lseek definition: http://www.opengroup.org/onlinepubs/007 ... lseek.html
I am not sure if the 'L' in the value stands for 'Long' (64 bits), but it could be that it seeks to 1423 bytes into the file. How big is the file you are editing? Also, if you position the binarywriter.basestream with seek (1423 bytes from beginning), do you get the correct data?
I am not sure if the 'L' in the value stands for 'Long' (64 bits), but it could be that it seeks to 1423 bytes into the file. How big is the file you are editing? Also, if you position the binarywriter.basestream with seek (1423 bytes from beginning), do you get the correct data?
-
NKCSS
- advanced
- Posts: 76
- Joined: Mon Oct 08, 2007 10:19 pm
- Location: Leiden, The Netherlands
- Contact:
I was still a bit curious about that 'L' in lseek, it turns out my suspicions were right (according to http://msdn2.microsoft.com/en-us/librar ... S.80).aspx ). Even though he doesn't use the _lseek but a older lseek, it seems to be the MS C++ flavour that adds the L (just speculating here, C++ is not a language I program in, but I get the general concept and can read it to a certain extent).
Current Projects:
Building http://www.nickkusters.com back-end from the ground up in ASP.NET
Managing Console Games WebShop http://www.buyinbulk.nl
Helping out on the forum where I can
Building http://www.nickkusters.com back-end from the ground up in ASP.NET
Managing Console Games WebShop http://www.buyinbulk.nl
Helping out on the forum where I can
-
Darkfox
- VVIP member

- Posts: 688
- Joined: Fri Jul 04, 2003 6:11 pm
- Has thanked: 33 times
- Been thanked: 16 times
The file.
Here is the file I'm trying to edit. I included two ship packs to help see a pattern. The bytes should look about the same as identified in the image. That was an old thing I did with the SHIPDAT0.Z66 file which is actually where it stores ship data as like a cache from all MAP(letter)DAT3.Z66 files.
You do not have the required permissions to view the files attached to this post.
