[A10] Project Armory (v.3.00)

Started by Evul, February 05, 2014, 02:24:54 PM

Previous topic - Next topic

NoImageAvailable

Quote from: mathwizi2005 on March 30, 2015, 03:04:00 PM
ANYWAY, on topic, it there anyway to add explosive types? (fragmentation vs HE vs stun/flash (hell even HEAT for the mechanoids))

Fragmentation and HE are the same thing (and implemented in my mod), stun grenades are already in the game IIRC and HEAT would be no different from the current explosive rounds, i.e. piercing damage with a small secondary explosion.
"The power of friendship destroyed the jellyfish."

rditto48801

Quote from: NoImageAvailable on March 31, 2015, 04:07:06 AM
Quote from: mathwizi2005 on March 30, 2015, 03:04:00 PM
ANYWAY, on topic, it there anyway to add explosive types? (fragmentation vs HE vs stun/flash (hell even HEAT for the mechanoids))

Fragmentation and HE are the same thing (and implemented in my mod), stun grenades are already in the game IIRC and HEAT would be no different from the current explosive rounds, i.e. piercing damage with a small secondary explosion.

I tend to view HE and Fragmentation differently.
HE makes me think about things like C4, TNT, Dynamite, and Muton Tranquilizers, er, I mean Blaster Bomb Launchers (from X-Com UFO Defense). Things that may only have fragments if they have a metal casing like an HE shell. Damage mainly from the explosion, with a small chance of getting nailed supersonic metal fragments at a distance.
Fragmentation makes me think of things designed for having a large casualty/injury radius and specifically designed to throw out as many fragments as possible. Stuff like the classic 'pineapple' grenade, Claymore mines, and Bouncing Betty mines. Stuff that might not be as effective (if effective at all) against an armored target. Something with a high chance of multiple fragment hits on a single target.

I wonder if the game can do something like having an AoE weapon that sends out dozens of short ranged projectiles in all direction from the point of detonation. It's been a while since I have seen a frag grenade used (don't use them, love sniper rifles), so I don't recall how they deal damage, if they do that or just are an AoE weapon.

I like HEAT. I would like to think a good sized HEAT round/rocket/missile would ruin even a Mechanoid Centipede's day.
For a little HEAT inspired humor of likely poor quality.
"This Mechanoid is dying impaired! Give it 1,000 CCs of supersonic molten metal, stat!"


For something that definitely seems separate from those above.
Thermobaric weapons.
Those would be nice to have.
Handy for crowd control. Like if two dozen angry tribes people are trying to tear down your front door with clubs and arrows while foolishly ignoring the sudden dust cloud. (maybe not so good if the walls are made of wood...)
Or dropping it in the middle of a pirate siege base, and watching them drop everything and run away from the rapidly expanding cloud in a foolish attempt to outrun what is about to happen.
Always (less than) eager to stockpile 3 metric tons of steel to replicate a useful gun.

Dr. Watson. Proving that being wrong is one step closer to being right.

mathwizi2005

Thermobaric actually counts as HE, its basically a big friggin' bomb.
But you nailed everything else I was implying.

rditto48801

Quote from: mathwizi2005 on March 31, 2015, 07:10:21 PM
Thermobaric actually counts as HE, its basically a big friggin' bomb.
But you nailed everything else I was implying.

Big?
Except for thermobaric/fuel-air explosives made for grenade launchers and RPGs.
Always (less than) eager to stockpile 3 metric tons of steel to replicate a useful gun.

Dr. Watson. Proving that being wrong is one step closer to being right.

Alistaire

Quote from: rditto48801 on March 31, 2015, 05:49:46 PM
I tend to view HE and Fragmentation differently.
HE makes me think about things like C4, TNT, Dynamite, and Muton Tranquilizers, er, I mean Blaster Bomb Launchers (from X-Com UFO Defense). Things that may only have fragments if they have a metal casing like an HE shell. Damage mainly from the explosion, with a small chance of getting nailed supersonic metal fragments at a distance.
Fragmentation makes me think of things designed for having a large casualty/injury radius and specifically designed to throw out as many fragments as possible. Stuff like the classic 'pineapple' grenade, Claymore mines, and Bouncing Betty mines. Stuff that might not be as effective (if effective at all) against an armored target. Something with a high chance of multiple fragment hits on a single target.

I wonder if the game can do something like having an AoE weapon that sends out dozens of short ranged projectiles in all direction from the point of detonation. It's been a while since I have seen a frag grenade used (don't use them, love sniper rifles), so I don't recall how they deal damage, if they do that or just are an AoE weapon.

The base game supports concussion grenades, Combat Realism adds fragments to explosions. It works exactly as you described, so I guess you haven't paused during explosions to see the fragments.

Quote from: popster99 on March 31, 2015, 01:32:58 AM
The different types of round sound cool maybe you could make it so you have a different weapon eg an ak-47 normal then ak-47 heat/HE/stun or frag and when it shot it would be a normal shot but what ever it hits it spawns a grenade that does the effect that the gun has eg you hit a mech the it spawns heat grenade under it then the grenade explodes maybe you could change the time it takes grenades to explode 

Your workaround to add explosive rounds to AK-47's is unnecessary. The game supports exploding bullets right off the bat - the only differences between grenades and bullets codewise is that bullets fly faster and don't have a delayed explosion on impact. Check the Multiple grenade launcher in Rimfire (signature).

NoImageAvailable

Quote from: rditto48801 on March 31, 2015, 05:49:46 PM
Quote from: NoImageAvailable on March 31, 2015, 04:07:06 AM
Quote from: mathwizi2005 on March 30, 2015, 03:04:00 PM
ANYWAY, on topic, it there anyway to add explosive types? (fragmentation vs HE vs stun/flash (hell even HEAT for the mechanoids))

Fragmentation and HE are the same thing (and implemented in my mod), stun grenades are already in the game IIRC and HEAT would be no different from the current explosive rounds, i.e. piercing damage with a small secondary explosion.

I tend to view HE and Fragmentation differently.
HE makes me think about things like C4, TNT, Dynamite, and Muton Tranquilizers, er, I mean Blaster Bomb Launchers (from X-Com UFO Defense). Things that may only have fragments if they have a metal casing like an HE shell. Damage mainly from the explosion, with a small chance of getting nailed supersonic metal fragments at a distance.
Fragmentation makes me think of things designed for having a large casualty/injury radius and specifically designed to throw out as many fragments as possible. Stuff like the classic 'pineapple' grenade, Claymore mines, and Bouncing Betty mines. Stuff that might not be as effective (if effective at all) against an armored target. Something with a high chance of multiple fragment hits on a single target.

I wonder if the game can do something like having an AoE weapon that sends out dozens of short ranged projectiles in all direction from the point of detonation. It's been a while since I have seen a frag grenade used (don't use them, love sniper rifles), so I don't recall how they deal damage, if they do that or just are an AoE weapon.

Non-encased high-explosives would simply act like the explosives already in the game. Fragmentation is possible (again, see my mod) but it is just as effective against armor as any other projectile, because the armor system itself is percentage based.

QuoteI like HEAT. I would like to think a good sized HEAT round/rocket/missile would ruin even a Mechanoid Centipede's day.
For a little HEAT inspired humor of likely poor quality.
"This Mechanoid is dying impaired! Give it 1,000 CCs of supersonic molten metal, stat!"

PA already has a special ammo type used for explosive bullets like the Bolter. It works exactly as a HEAT round would, i.e. piercing damage to the target and a small secondary explosion although they don't use it for RPGs IIRC.

QuoteFor something that definitely seems separate from those above.
Thermobaric weapons.
Those would be nice to have.
Handy for crowd control. Like if two dozen angry tribes people are trying to tear down your front door with clubs and arrows while foolishly ignoring the sudden dust cloud. (maybe not so good if the walls are made of wood...)
Or dropping it in the middle of a pirate siege base, and watching them drop everything and run away from the rapidly expanding cloud in a foolish attempt to outrun what is about to happen.

I think you might have some misconception about thermobarics. The aerosol cloud they leave ignites within a fraction of a second, you wouldn't even see it with the naked eye, let alone be able to react to it. All it would be in game terms is a rocket with a large explosion radius and a good chance to spawn fires.
"The power of friendship destroyed the jellyfish."

Evul

I need some C# support or some one that is better them me to help us out to get our bullet code to work :)

rditto48801

Quote from: NoImageAvailable on April 01, 2015, 03:55:26 AMI think you might have some misconception about thermobarics. The aerosol cloud they leave ignites within a fraction of a second, you wouldn't even see it with the naked eye, let alone be able to react to it. All it would be in game terms is a rocket with a large explosion radius and a good chance to spawn fires.

Perhaps, but the delayed effect is how many video games I have played/seen portray stuff like fuel-air explosives. Like in Mercenaries 2, and I think also C&C Generals. Of there being a short delay between cloud release/dispersion and actual ignition/detonation.

There is also the old BLU-96. I've seen old films/movies for those that showed an apparent delay of 1-2 seconds between cloud dispersion and actual ignition/detonation, which has a bit more dramatic effect/flare to it than, say, a MOAB.
Always (less than) eager to stockpile 3 metric tons of steel to replicate a useful gun.

Dr. Watson. Proving that being wrong is one step closer to being right.

NoImageAvailable

Quote from: rditto48801 on April 01, 2015, 01:09:15 PM
Perhaps, but the delayed effect is how many video games I have played/seen portray stuff like fuel-air explosives. Like in Mercenaries 2, and I think also C&C Generals. Of there being a short delay between cloud release/dispersion and actual ignition/detonation.

There is also the old BLU-96. I've seen old films/movies for those that showed an apparent delay of 1-2 seconds between cloud dispersion and actual ignition/detonation, which has a bit more dramatic effect/flare to it than, say, a MOAB.

Media likes to portray them that way for dramatic effect but it is about as real as cars exploding from gunfire.
"The power of friendship destroyed the jellyfish."

Manly

Quote from: Evul on April 01, 2015, 09:46:09 AM
I need some C# support or some one that is better them me to help us out to get our bullet code to work :)

I wish I knew how to do that stuff Evul. :(

If you need help marketing it nationally I can do that :)

rakkaus

#1405
Please guys, if you can release the Alpha 9 version without the special bullet codes, that would be much appreciated.

mrofa

Just tell me what the code needs to do, i need guns ;p
All i do is clutter all around.

skullywag

Also willing to help but ill let mrofa have first stab seeing as he wrote the thing originally. Im messing with guns at the moment for myself.
Skullywag modded to death.
I'd never met an iterator I liked....until Zhentar saved me.
Why Unity5, WHY do you forsake me?

Evul

Sorry for being none responsive. -.-'
Have a to fix the economy for one of my NPO.

Anyway here is the Sourse code:

using System;
using Verse;
namespace ProjectArmory
{
internal class PABulletDef : ThingDef
{
public bool secondaryExplode = false;
public DamageDef secondaryDamageType;
public int secondaryDamage = 0;
public float secondaryRadius = 0f;
}
}


using RimWorld;
using System;
using Verse;
namespace ProjectArmory
{
public class Projectile_PABullet : Bullet
{
private PABulletDef BulletDef;
public override void SpawnSetup()
{
base.SpawnSetup();
this.BulletDef = (PABulletDef)this.def;
}
protected virtual void Explode(DamageDef type, int damage, float radius)
{
BodyPartDamageInfo value = new BodyPartDamageInfo(null, new BodyPartDepth?(2));
ExplosionInfo explosionInfo = default(ExplosionInfo);
explosionInfo.center = base.get_Position();
explosionInfo.radius = this.def.projectile.explosionRadius;
explosionInfo.dinfo = new DamageInfo(this.def.projectile.damageDef, 999, this.launcher, new BodyPartDamageInfo?(value), null);
explosionInfo.postExplosionSpawnThingDef = this.def.projectile.postExplosionSpawnThingDef;
explosionInfo.explosionSpawnChance = this.def.projectile.explosionSpawnChance;
explosionInfo.explosionSound = this.def.projectile.soundExplode;
explosionInfo.projectile = this.def;
explosionInfo.DoExplosion();
}
protected override void Impact(Thing hitThing)
{
if (this.BulletDef.secondaryExplode)
{
this.Explode(this.BulletDef.secondaryDamageType, this.BulletDef.secondaryDamage, this.BulletDef.secondaryRadius);
}
if (hitThing != null)
{
int damageAmountBase = this.def.projectile.damageAmountBase;
DamageInfo damageInfo = new DamageInfo(this.def.projectile.damageDef, damageAmountBase, this.launcher, this.get_ExactRotation().eulerAngles.y, null, null);
hitThing.TakeDamage(damageInfo);
}
this.Destroy(0);
}
}
}

mrofa

So you want a bullet that adds 2x damage types ?
All i do is clutter all around.