From UFOpaedia
Jump to navigation Jump to search

The holes in the item list are the 6 unused items in obdata.dat. Starting from the standard pistol, the object table in the base and craft files match the entries in OBDATA.DAT.

The six unused items don't have any text labels associated with them apart from the description in obdata.dat. If you inspect obdata.dat, you'll notice that they are a few weapons and ammo clips, however one or two of their crucial switches have been turned off so that they do not function. TFTD uses these slots for the gauss clips and drills.


Little Endian

It should be noted that despite all values being unsigned little debian and thus having a fairly large range, there is a cap of 9999 instances/units of a given item at a given base. Arrow Quivershaft 17:28, 5 April 2008 (PDT)

Unidentified Values

This of any help, MTR? Arrow Quivershaft 19:51, 15 May 2008 (PDT)

Thanks Arrow, I guess Uncarryable Items gives suggestions, but I still don't entirely understand that Item listing. All I did was reformat what was already on the page, so I could relate it to the PRODUCT.DAT info I'd just looked at - and the gaps became clear when I did the offset math. One thing that puzzles me is that BASE.DAT obviously isn't the "ultimate source" of this list, since it's only showing quantities at a base. There must be some other "real" source which includes names, properties, etc. I've looked around the wiki but can't seem to find it. Maybe it's hard-coded into the .EXE and only gets tossed out in this "one step removed" kind of format, for BASE.DAT and PRODUCT.DAT? shrug -MikeTheRed 20:08, 16 May 2008 (PDT)

You're right, base.dat's item listing is only the quantities. Values, language file string index reference, weights, etc. are in the executable. -NKF 20:35, 16 May 2008 (PDT)

Right, ok, here are further differences between the BASE.DAT and OBDATA.DAT item listings:
  • OBDATA (record 0) starts at record 15 (the Pistol) in BASE; this makes sense inasmuch as all the BASE items less than its record 15 would not be found on a battlescape
  • It looks like OBDATA fills in the gaps for the BASE items which are "unknown"
  • At record 73 of BASE (Reaper Corpse) / record 57 of OBDATA (reaper corpse 1), differences become very evident:
    • BASE uses one record for each type of corpse, but OBDATA uses four (for the four battlescape quadrants of the corpse)
    • BASE lists Reaper, Sectopod, and Cyberdisc (one record each), but OBDATA lists Reaper, Cyberdisc, Sectopod (4 records each)
    • BASE then skips 4 records and lists various items, as shown at record 80+ in BASE.DAT, but OBDATA.DAT just continues on with various corpses (Hovertank, Tank, Civilians). Many of these BASE items can be "seen" in the battlescape, but none are actually objects that can be picked up on the battlescape - that's OBDATA's job. BASE's job is to list things that can be stored at a base.
Looked at one way, it all makes sense. But is XCOM truly using one source list in the executable, or did the programmers make two lists which look very similar, because there wasn't any reason not to cut and paste the two highly overlapping lists? I think it's the latter. They even use different internal numbers. Hmm. -MikeTheRed 20:55, 16 May 2008 (PDT)

Actually, I was referring to the part about the 6 'unused values', including the 'gatling laser'. Should've been more clear. Arrow Quivershaft 21:23, 16 May 2008 (PDT)

I did see that, Arrow; apologies that I didn't address your idea directly... NKF probably wrote the stuff about the Gatling, since he loves to find toys hidden in the code. (The hidden melee weapon stuff is a cool example.) But I'm just taking it one step at a time since, for one thing, it's not clear which of the unknown objects might be the gatling. I'm curious whether there's one single master list in the .exe or not. And then will wonder about the implications of whatever is the answer.
It's surprising how such old code (XCOM) can raise so many questions and interesting ideas. -MikeTheRed 21:39, 16 May 2008 (PDT)