BB, thanks for your continuing work on this. A question to make sure I'm understanding correctly: MISSDAT has copies of UNITREF from the beginning (UNIREF) and end (UNIREF2) of your latest combat, and they could be compared to see all changes from the combat, yes? Thanks! ---MikeTheRed 14:57, 16 June 2006 (PDT)
This is true, so long as the game was started from scratch. If the game was loaded from a save slot, then you'll need to use UNITREF.DAT from the slot in concern.
For example, if you started a combat, saved it, started another combat, saved it, loaded the first combat and completed it, the UNIREF file in the missdat folder would refer to the second combat, and the UNIREF2 file would refer to the first combat - two entirely different battles!
If you wiped the contents of your missdat folder and then loaded a save file, the UNIREF.DAT file won't turn up at all.
Hence, if you didn't save the first combat at the very beginning, the initial data would be lost. Does that make sense?
I'm watching my experience counters in UNITREF closely; I have a little util that shows their current values. It's resulted in additional nuances I've pointed out. Also of course I'm using the util for firing-squad training (getting specific soldiers to 3 exp. pts. when aliens are few or weak). Sometimes e.g. my last reaction shot kills the last alien, but I couldn't catch who made that last shot as combat ended. Now that I know a final copy of UNITREF is made, I can always consult it if I want. So, thanks for pointing that out! As for my original question, in truth I don't currently see a reason to compare beginning and ending UNITREF - but I figured the answer would make clear how to work with these files. And you pointed out important potential problems.
In any event. Here's something I do a fair amount, where this can help: I start a combat, save the game, quit X-COM. Later, reload that same savegame and finish the combat. You're saying that those two UNITREFs will be the beginning and end of that combat, no matter how much "real time" has passed. Cool. (As long as I don't start or end any other combats in between!) I gather that if I end a particular combat multiple times (for testing), it will have the initial pristine combat (UNIREF) and only the last ended combat (UNIREF2).
I have a "comparer" that compares one file to another to see changes, such as soldier stats before and after combat. Previously I've worked with individual save slots (one versus the other), but now I see I can cut to the chase and just compare these two UNITREFs, if I want. No more mucking about.
Along those lines though... there is no particular "before and after" for SOLDIER.DAT, right? I don't see two versions in the wiki's MISSDAT listing.
Thanks, as always! ---MikeTheRed 18:57, 16 June 2006 (PDT)
I hope no one minds, but I've never liked how the save-game files were artificially on a separate page from the main-game files. Us few hackers are interested in them all, as I see it. Conversely, folks not into hacking might be into the many tips on "Under the hood", but are not so likely to be only interested in main-game files (not save-game files). So, I've moved the main-game section here. However, "Saved Game Files" is no longer an appropriate name for this page. We could rename it (requires admin rights, yes?) or just refer to it as "Game Files" by [[Saved Game Files|Game Files]]. BB, I hope I didn't just collide with your edits.
---MikeTheRed 19:35, 16 June 2006 (PDT)
You can complete as many battles as you wish without the uniref file being touched. You can also load battles without it being modified. Back it up if you need to.
I doubt that unit stats are updated by the tactical engine, so I'd assume that uniref and uniref2 won't show you any changes. I could be wrong, though. The experience counters should certainly change.
The missdat folder contains the files listed, as well as a geoscape savegame for the point when combat began. That includes a copy of soldier.dat, however, I doubt the tactical engine modifies this file in any way. It certainly doesn't create another copy.
What about moving most of this content to the Category:Game Files? I'm thinking of making the Tactical and Geoscape save files a sub category in it. Also maybe we could use a template on these files to standardize them a bit, they all have a 'structure' that is generally in a table or a bulleted list, and of course a See Also section.
Hmm, I guess I could copy-paste stuff from here onto the Category page and leave this one alone. We can tweak it to how we like and then set this to redirect.
Pi Masta 10:14, 4 March 2007 (PST)
I know what categorization does on the back end (it lets one make an automatic "see also" page), but not sure what you mean on the front end. I would want all these files here on one page because they relate to each other so directly, for anyone taking a wrench under the hood. Also known as, I say, don't put things on separate pages just because they easily fit mental categories; put things on separate pages if they truly are not likely to be jumped around within, by someone into that level of topic. I for one like seeing everything related to being under the hood, on one page. If you're modifying what a soldier is holding, you need both the EXE level OBJECT.DAT and the Battle level other file, whatever its name was. I can look it up on this one page, hehe. My two cents. - MikeTheRed 21:48, 9 March 2007 (PST)
Using category pages as article pages has various problems, the biggest of which is you can't format how the list appears. The tables on this page right now look good. However, to save yourself some trouble, rather than put a "See Also: Saved Game Files" section at the bottom of each individual file article, you could just rely on the category link at the bottom (and put "Main Article: Saved Game Files" right at the top of the category page).--Ethereal Cereal 00:38, 10 March 2007 (PST)
I'd vote against the Saved Games Files section being divvied up. But if a categorization scheme is added purely as an extra that can be used in "See Also" sections, that'd be great. Maybe I'm misunderstanding.
BTW this page is, of course, inaccurately named - it's about saved games and static program-level files - and I'm to blame for that. Back when Eth re-designed the Main Page, he did a great service given the dozens of pages and hundreds of concepts, but somehow the two pages on "under the hood" got a little disconnected. Back then I was tired of flipping back and forth between the separate pages for Saved Game files and the EXE-level files, so I copied the EXE info (the smaller set) to this page, and unified them. I guess that's sort of my vote for having them on a combined page. What are your thoughts, Pi? - MikeTheRed 18:59, 16 March 2007 (PDT)
It's trivial to rename (move) pages. What's a better name for this page? Just "Game Files"?--Ethereal Cereal 22:33, 16 March 2007 (PDT)
Yeah, I think he mentioned in the comments above about naming it to game files. That's fine with me.
Poof, it's done.--Pi Masta 22:47, 16 March 2007 (PDT)
Data Files Summary
Hi folks. There are times when I need to edit a data file but forget the length of each record. I then have to look up the file page in the wiki and try to decode the wording to get the right length. Tis a real pain sometimes. Because of this I created a quick lookup table a while back and had it sitting on my hard drive. Today I added a bunch more entries to include all the saved game files. Eventually, I'd like to include everything to make it even easier. The best way to explain this is to show an example, so here it is:
|File Name||Records||Bytes/Record||File Size|
172 for TFTD
200 for TFTD
3200 for TFTD
132 for TFTD
10560 for TFTD
As you can see, it makes a handy reference for the most edited mission files. (The file size cells with "Varies" in it depend on map/ufo size or modules spawned which I have but didn't include here for the moment). There are still a few files which I can't figure out if there is a correct record size or length. If everyone could please look at the table and fill in the blanks it would be much appreciated. Obviously, those fields don't apply to some files so those can be filled in with DNA or something. Before doing this though if we can fill in what we know for a fact, it will save others (like myself) from reinventing the wheel every time something needs to be edited for testing.
Some of the data file pages are worded so cryptically that it makes it impossible to understand for a layperson. Why is that? Obviously, some files are harder to understand due to the subject, but the structure shouldn't one of them in my opinion.
- Zombie 21:27, 18 December 2007 (PST)
Never spotted this before...
I've made some tweaks to the table, I believe it should now be completely accurate as far as battlescape save files are concerned. Those files where the record tallies/sizes have been left blank use either single byte values or multiple types listed randomly (ei. They can't be summarised).
- Bomb Bloke 20:46, 12 February 2008 (PST)
- Thanks BB. BGLOB.DAT is one of those files where it can't be broken down into records so I switched that as well. --Zombie 23:03, 13 February 2008 (PST)
Did anyone else notice there is no way to delete existing saves, only by overwriting them? Deleting the folder's content from Windows will make the game complain about not finding the save.--amitakartok 16:55, 10 October 2009 (EDT)
- I have never seen the game complain after wiping any of the saves. It may crash if the save directory doesn't exist - so you only want to be deleting the contents. - NKF 02:09, 11 October 2009 (EDT)
What file contains the zone your base is located in? - pjlasl August 24, 2011
Laser Squad decoded
I've just discovered a guy who seems to have completely figured out the code of Laser Squad, the predecessor made by the Gollops before Enemy Unknown. He has created a scenario editor and I'm looking at the manual right now and recognizing a TON of things from Enemy Unknown (how to edit AI routes and nodes, terrain, etc.). The site is here Hobbes 17:37, 15 March 2012 (EDT)