|
Page 1 of 1
|
[ 6 posts ] |
|
TW2002 DAT File Structure question
Author |
Message |
ctsurv553
Staff Sergeant
Joined: Sun Jun 14, 2015 9:24 pm Posts: 12
|
TW2002 DAT File Structure question
Hi, I am trying to write some BASIC programs (for Sysop use only) that perform various manipulations of the game DAT files that are not included in the Game Editors. There are a couple of items that I can't seem to find. In particular: The location of the bytes that specify ownership of Sector figs and mines. I have analysed the structure of the twsect.dat file, and have found the bytes for the quantity of sector figs, and whether they are Defensive, Toll, or Offensive, but have not been able to figure out where in the DAT files the Ownership of sector figs is defined. I have some long running 30K sector games that are becoming more and more cluttered with Rogue Mercenary (abandoned) figs, and would like to create a basic program that switches ownership of these figs to a Player or a Corp. But there's thousands of sectors with these abandoned Rogue figs, too many to manually change them one at a time with the Editor.
I have looked around the Internet for some documentation of the game's DAT file structures, but the only such info I have found is for very old versions of the game that obviously don't apply to TWGS v 3.34b which I am running. Thanks!
|
Fri Jul 22, 2016 7:24 pm |
|
|
Micro
Ambassador
Joined: Wed Apr 20, 2011 1:19 pm Posts: 2559 Location: Oklahoma City, OK 73170 US
|
Re: TW2002 DAT File Structure question
Accessing these files directly is not recommended, especially if you are "Manipulating" the data. I used to have the actual structures, but I can't find them.
I highly recommend that you have your program telnet into the admin port, and use tedit instead.
_________________ Regards, Micro Website: http://www.microblaster.net TWGS2.20b/TW3.34: telnet://twgs.microblaster.net:2002
ICQ is Dead Jim! Join us on Discord: https://discord.gg/zvEbArscMN
|
Tue Jul 26, 2016 3:36 pm |
|
|
The Mad Hatter
Chief Warrant Officer
Joined: Wed Nov 07, 2001 3:00 am Posts: 116 Location: Canada
|
Re: TW2002 DAT File Structure question
Micro wrote: Accessing these files directly is not recommended, especially if you are "Manipulating" the data. I used to have the actual structures, but I can't find them.
I highly recommend that you have your program telnet into the admin port, and use tedit instead. That's a joke. Didn't you read what you replied too?
_________________ The Mad Hatter Website http://madhatter.ca
|
Sun Jan 29, 2017 10:26 pm |
|
|
The Mad Hatter
Chief Warrant Officer
Joined: Wed Nov 07, 2001 3:00 am Posts: 116 Location: Canada
|
Re: TW2002 DAT File Structure question
ctsurv553 wrote: Hi, I am trying to write some BASIC programs (for Sysop use only) that perform various manipulations of the game DAT files that are not included in the Game Editors. There are a couple of items that I can't seem to find. In particular: The location of the bytes that specify ownership of Sector figs and mines. I have analysed the structure of the twsect.dat file, and have found the bytes for the quantity of sector figs, and whether they are Defensive, Toll, or Offensive, but have not been able to figure out where in the DAT files the Ownership of sector figs is defined. I have some long running 30K sector games that are becoming more and more cluttered with Rogue Mercenary (abandoned) figs, and would like to create a basic program that switches ownership of these figs to a Player or a Corp. But there's thousands of sectors with these abandoned Rogue figs, too many to manually change them one at a time with the Editor.
I have looked around the Internet for some documentation of the game's DAT file structures, but the only such info I have found is for very old versions of the game that obviously don't apply to TWGS v 3.34b which I am running. Thanks! I used to have all that stuff documented, but that was 8-10 years back when I was still masochistically running Windows. I gave up on hacking TW when I moved to Linux and Mac OSX. I can look, and see if I still have the doc files I wrote up somewhere. Give me a couple of days, I have a bunch of backup drives to check.
_________________ The Mad Hatter Website http://madhatter.ca
|
Sun Jan 29, 2017 10:36 pm |
|
|
LoneStar
Commander
Joined: Fri Jun 09, 2006 2:00 am Posts: 1396 Location: Canada
|
Re: TW2002 DAT File Structure question
This is what I would do:
Lay 50,000 fighters in Sector 20,000 and assign them to corp 1, save the dat file to another folder (call it Corp1.Dat), and then reassign those same figs to corp 2, and copy the dat file to: Corp2.dat …for added data I would do same, but for players 'not' on a Corp. I have a suspicion (based on my limited experience in Normalizing DataBases), that the Byte you're looking for might be a index-number into the players database.
Then compare each DAT in a Hex Editor.
If you've done the above already check the modified Last Dates for the files in the TWGS Subfolders; there maybe a support file with an indexed list of Sector content/data (?).
_________________ ---------------------------- -= QUANTUM Computing 101: 15 = 3 x 5 ... 48% of the time. -= There are 10 types of people in the world: Those that understand Binary and those who do not -= If Oil is made from Dinosaurs, and Plastic is made from Oil... are plastic Dinosaurs made from real Dinosaurs? -= I like to keep my friends and my enemies rich, and wait to see which is which - Tony Stark (R.I.P.)
|
Wed Feb 01, 2017 1:27 am |
|
|
Kavanagh
Ambassador
Joined: Wed Feb 28, 2001 3:00 am Posts: 1410 Location: Boo! inc. Ireland
|
Re: TW2002 DAT File Structure question
An old utility, hdiff.exe, will compare two files and list the differences - text, hex, no matter. Low overhead, 16K. I cant attach an exe, anyone wants it, PM me an email address. I used use it years ago for a CIM comparator hunter with Telix DOS shell, when we had lots of pepl online same time.
|
Fri Feb 03, 2017 12:10 pm |
|
|
|
|
Page 1 of 1
|
[ 6 posts ] |
|
Who is online |
Users browsing this forum: No registered users and 1 guest |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum
|
|