Jump to content

Buckshot mod for shotgun


StellarRat

Recommended Posts

This is my first crack at it. I've changed the suppression, damage, range, and mitigation numbers. I'd like to use a different projectile too, but I'm not sure how all that works. Anyway I've done the best I can with what they give us to work with. In reality, it's difficult to imitate a shotgun with buckshot without being able to mod the to-hit formula too. Below is the bit of XML to replace. The shotgun now has the effective range of a pistol and does a lot of damage, however, it has poor penetration. I also lowered the magazine capacity to 8 from 12.

<Weapon name="weapon.shotgun" bulletType="normal" emptySound="Empty Click 1">

<props range="10" hands="2" recoil="0" weight="5" isHeavy="0" clipSize="8" reloadAPCost="15" reloadSound="Weapon Shotgun Reload" reactionModifier="1.4"/>

<SingleShot sound="Weapon Shotgun Single" delay="0.6" suppressionValue="27" suppressionRadius="2">

<Set1 ap="9" accuracy="83" />

<Set2 ap="11" accuracy="90" />

</SingleShot>

<BurstFire/>

<GUIImage name="gui/weapons/Shotgun.png"/>

<GroundImage name="grounditemimages/shotgun.png"/>

<Ammos>

<Ammo name="ammo.ballistic.shotgun" type="kinetic" damage="60" mitigation="4">

<Projectile spectre="projectiles/bullet/bullet" speed="1200"/>

<Impact spectre="particles/bulletplume/bulletplume"/>

</Ammo>

</Ammos>

</Weapon>

Edited by StellarRat
Link to comment
Share on other sites

There was actually a cone area affect template projectile in the game code somewhere.

It was used for early iterations of the flamethrower.

Might not be quite what you are looking for though, I think it was a cone of tiles from the feet of the soldier.

Not sure if it has been changed either.

By different projectile do you mean one with a different effect or a different animation?

Link to comment
Share on other sites

You could try changing bullettype="normal" to bullettype="flamethrower" if you want to test it.

Config.xml in the assets folder has an entry for flamethrowerangle which is set to 60 by default.

Tweaks to that might give you a spread that could represent a shotgun using buckshot if you don't overdo it.

I haven't done much with it since I added the flamethrower in v8.something to try it out.

The down side is that because it is a weapon change you would be unable to add slug and buckshot ammo to the same weapon.

The up side is that doing that doesn't work properly anyway at this time.

Link to comment
Share on other sites

To change the projectile animation, you have to make 8 png files with the projectile you wanted (one for each compass direction), and those would go into under /projectiles/ folder in their own folder (say /buckshot/). You'd then have to make 8 xml files each describing each of the projectile types, adding a compass direction for each of them (say, buckshot_e.xml). Then you have to make 2 spectre files for them (which ties all of it together). Finally, you point the projectile type in the weapons_gc file to the correct spectre file. However, you could crib most of this from the /bullet/ folder (the spectre XML is consistent across projectile animations, so there's no danger of different projectile types needing different coding).

Link to comment
Share on other sites

I believe that has changed now.

The projectiles only use one image which is rotated by the engine to follow the angle the projectile is flying in.

I think the normal bullet uses the _e version.

You might also need a new impact animation if you change the projectile though, depends on how much it changes.

Edited by Gauddlike
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...