Jump to content

Weapons and items in X-COM (OBDATA.DAT)


serge

Recommended Posts

I'm trying to improve items handling system in UFO2000 and want to export X-COM items descriptions to a better easy editable and clean format.

 

There are a few mysterious fields in obdata.dat file though:

https://lxnt.info/pipermail/ufo2000/2004-April/001121.html

 

Any ideas how to interpret them?

 

PS. Lua interpreter can be downloaded here: https://lua-users.org/wiki/LuaBinaries

Link to comment
Share on other sites

Just thought I'd toss in a few notes of my own:

 

Item quantity (the value used to determine how many shots remain in a weapon clip) is also used as the object's melee damage level. Notice how the stun rod has 60 rounds. It really just means it can do 0 - 60 points of stun damage.

 

In the game, it has a third and very peculiar use. If set for some items, it makes the object pre-armed as if it were a grenade. After turn quantity value/2, the object will explode. I think this may just be in weird combination with the various boolean fields at the end of each object table entry. Objects designed to be clips that are transformed into grenades by setting the grenade type field behave in this manner. Non-clip objects do not.

 

The byte immediately after item quantity determines the object's 'melee' damage type. UFO uses values 0 - 6, and TFTD adds 7 for the vibroblades. Area effect damage types do not cause explosions.

 

The next value, which appears to default to a decimal value of 100 for all objects is uncertain. Probably melee accuracy, but this is irrelevant. It does not affect throwing accuracy either. Probably best left unused.

 

The value immediately after that is the melee attack 'cost'. Identical to the auto, snap and aimed attack costs. All objects appear to default to 50%, but the stun rod uses 30%. TFTD's thermal tazer uses 40%. The drills, in order, are 15, 20 and 25.

 

As for the odd values right at the end of every field that is assigned only to alien objects that takes values up to 5, I only have a few theories. I do not know for sure what they do.

 

One, it could be used for scoring purpose. But that's not quite right. The other may be used to determine what types of alien weapons to generate in the game. For example, on beginner, you start off with plasma pistols mostly. After you've built up a generous score (or some arbitary point that I'm not aware of) the aliens start to carry plasma rifles. On harder difficulty levels, heavy plasmas appear a lot faster. But this is just a thought. (yes, yes, I know alien corpses have this value set as well)

 

- NKF

Link to comment
Share on other sites

I'm not sure if it's the same as what you're talking about, but in the OSG, Dave has a list of "Points received for collecting alien artifacts, equipment, and corpses" in which the Heavy Plasma is 5, Plasma Rifle is 4 and Pistol is 3, clips are 1, corpses are 5 for the primary's and 3 for the terrorists... and the list goes on :P

 

Have those numbers been accounted for?

Link to comment
Share on other sites

Ignoring the objects not found in obdata.dat, that's about right, except the elerum. In obdata the pod has a score of 0, the same goes for the reapers.

 

Hmm, I wonder if this scoring list is considered on the end-of-mission briefing screen? (I know that killing a reaper gives you so many points, but the points for gathering its corpse might not)

 

Oh well, close enough I guess.

 

- NKF

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...