Controlling the amount of damage a PCO does to another PCO.

Lots of cool and useful tips to mod either serverside or clientside
Post Reply
User avatar
Apache Thunder
Posts: 1210
Joined: Mon Oct 19, 2009 2:48 am
Location: Levelland Texas, USA
Contact:

Controlling the amount of damage a PCO does to another PCO.

Post by Apache Thunder »

The following should be both CSM and SSM compatible code.

When I made bullet casings into Bundles and have collision physics, I discovered that they would destroy most aircraft from the collision with them. So this means I can kill a littlebird just by sitting next to it and letting my ejected shell casings hit it. This was unacceptable and I had to find a fix. So I searched the command database and finally found the answer! This also solves the problem with my guided stinger killing tanks on direct collision in one shot. So I fixed two things with one piece of code!

Here it is:

Code: Select all

ObjectTemplate.damageMod 1
This command controls how much damage a PCO or other object that is not a projectile does to another object that has the "hasArmor" command turned on. Bascially only PCOs in this game engine have the hasArmor command. This excludes projectiles since projectiles use a different system to determine damage amounts.

So for example. You made a guided Missile like a SA-3 missile or hellfire missile. if you want to change how much damage it does to a vehicle from crashing into it, do this:

Code: Select all

ObjectTemplate.active SA-3GuidedRocket
ObjectTemplate.damageMod 2
Theoretically, this should be server side as well just like tweaks to projectile damage. ;)

As it turns out, the guided SA-3 missile already has this setting...hmm...Why the hell did I not notice that? :(

It was set to 0.1

Also note that for all objects, when this command is left unspecified (aka not used), the default value is 1. ;)

This command isn't used in the vanilla files. But I did spot it in the DesertCombat files. (the SA-3 Guided missile as mentioned above)

It looks like EA planned to use this on the WesserFall, but for some reason never actually decided to use the command. Thus it was left to DC coders to discover it and so happilly never told anyone about it. Cause I didn't know about this command untill today. :P
ImageImageImage
I have cameras in your head!
freddy
Posts: 1267
Joined: Sun Oct 18, 2009 4:58 pm

Re: Controlling the amount of damage a PCO does to another PCO.

Post by freddy »

i can think of some things to use this on. will give it a try ssm.
Post Reply