Jump to content

Switching grenade properties in OBDATA.dat


Zombie

Recommended Posts

Hi, all. I was playing with fire the other day. No, not in real-life - in UFO:EU. :lovetammy:

 

After I researched the blast patterns produced by Projectile Incendiary, I suddenly realized that there are an additional two scenarios to consider: Grenade Incendiary and Guided Incendiary. Explosives have different blast patterns depending on type, and so should fire. Obviously, neither thrown nor guided incendiary weapons exist in X-COM, so some hacking seemed to be in order.

 

Off I went and edited offset [031] in obdata.dat (damage type) for a normal grenade to Incendiary (value of 1). When I went into a mission to see if the change was successful, I noticed the blast was still explosive. Darn! Later, while I was taking a closer look at what [031] would change, I realized that it is AMMO damage type, not weapon damage type.

 

Here is what I want to know: Is there a way to edit the normal grenade properties so that the blast it produced was incendiary instead of explosive? I'd like to try to convert the grenade damage to stun too. Is this possible? If so, please enlighten me! ;)

 

- Zombie

Link to comment
Share on other sites

After a glance at offset[44], it looks like you've only got three options.

 

However, if you try unlisted values, who knows what would happen?... Well, NKF probably does, but don't let that stop you trying. :lovetammy:

 

While I can't speak in definite terms, I don't reckon you'll be able to create incendiary grenades. The game doesn't seem to be coded to allow it.

 

You might, however, be able to tweak the properties of a blaster launcher bomb? Even this might not work, though, that weapon seems to be mostly handled by the EXE code, not the obdata.dat values.

Link to comment
Share on other sites

Thanks for the reply BB. So no Incendiary Grenades then. :lovetammy:

 

Well, if a grenade can't be edited to dish out incendiary damage, how about editing a pre-existing incendiary item to have the properties of a grenade? I decided an Incendiary Rocket would be a good choice. Now I converted this to a grenade by editing the relevant offsets in obdata. When I took it for a spin during a mission, the Incendiary Rocket-now-turned-grenade produced explosive damage - not fire.

 

The $64,000 question would be this: When I-ammo is converted to grenade (or normal grenades are edited to I), is the blast pattern following normal HE code, or is the pattern produced actually incendiary? MikeTheRed edited a Stun Bomb to be a grenade here and had this to say about it:

 

If a stun bomb (stun strength 90) is hacked to be an explosive (OBDATA[31]=2), it too follows the pattern for projectile explosives. This includes if its HE is also then hacked.

 

Presumably, the pattern type is determined by whether something has the OBDATA grenade type set, or it is ammo, or it is guided.

From this, I'm inclined to believe that since the pattern produced was consistent with projectile HE instead of grenade HE, then the change was at least partially successful: the pattern was stun, but the damage dealt to tiles was still stuck as HE. I better test this out to make sure if this actually holds for I too. ;)

 

- Zombie

Link to comment
Share on other sites

  • 2 years later...

The other day I finally got around to testing out the Smoke Grenade blast patterns when it's strength is hacked. For a while I hesitated running these tests since it is difficult to visualize the cloud (HE damages terrain which lets you instantly write down a pattern and Incendiary isn't as transparent as smoke). However, with the help of Bomb Bloke's newish map editor I was able to get the pattern of the cloud by pressing "D" a couple times. Hurray for that! :)

 

After getting this done, I tried to think of a way to create a "guided" smoke bomb. Unfortunately, smoke isn't a damage type in the game (at least not that I know of) so I ran into a wall. (Smoke is corny to begin with as the Smoke Grenade's damage type is listed as HE in obdata.dat, but the game obviously reroutes the explosion creation over to the executable somewhere to produce the cloud). But I did mess around with a Blaster Bomb having different damage types. Incendiary didn't really work as the explosion killed my men. I tried converting it to a "stun bomb" but again, the explosion didn't stun, it killed. Darn damage types... guess I'll have to run some trials and pretend the explosion is of the requisite type. :)

 

If the blast pattern changes with respect to damage type, it may be interesting to run some trials with the unconventional damage types (melee comes to mind and so does the Celatid's acid spit not to mention laser or plasma). But wouldn't it be cool to create a laser grenade or a guided acid spit globule? Yes indeed. :)

 

- Zombie

Link to comment
Share on other sites

Standard "shooty" weapons have a damage type associated with them that defines the type of damage they'll do when they connect. If this "shooty" type is an explosive of some sort (HE/I/Stun), you get a blast radius; that is to say, just switching a laser rifle to the IN damage type will convert it into a fire bomb flinging weapon of doom.

 

With grenades, you instead use a type flag - "Not grenade", standard HE, stun, or prox. They seem to have a blast radius no matter what the damage is set to. For example, if you set a standard grenade to IN, you'll get a standard explosion which'll hurt personal/power armored soldiers (something incendary damage apparently shouldn't do.). So the type of damage a grenade is set to is irrelevant.

 

As I mentioned before, I'm not sure what happens if you set a grenade type to something above 3. I do know there's an unused grenade graphic hidden in the BigObs archive. Maybe there's a grenade type to go with it?

 

Likewise, I now suspect the blaster bombs don't give a hoot which damage type you allocate them either. Your results indicate they work much like grenades do - Either they're a blaster launcher (and they deal massive HE), or they're not (and they act according to the damage type).

 

Blaster launchers seem to have seperate rules for most things. For example, rocket launchers have clips which just happen to have one round each. There's nothing stopping you increasing the ammo of a clip up to, say, 255 - So that one "rocket" item represents a whole lot of shots. Drop it in the launcher and off you go.

 

This doesn't work with the blaster. When you fire that thing the clip gets removed, no matter how many shots were in it. Apparently this weapon also ignores it's power and TU requirements as well.

 

Long story short, I get the impression the basic damage type offset only defines blast patterns when firing a gun normally.

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...