Weapon and Bullet Template downloads!

Here is the first iteration of my Weapons Template (Formerly known as “Physical Bullet Template”).

My goal was initially just to make physical bullets work reliably, but that quickly turned into this weapons template. Now my goal is to make an easy to use weapons template that will allow you to quickly set up hundreds up weapons, all that act and perform differently.

Here are my high level goals:
-Firearms-Standards (Reloading, recoil…)
-Realism (Ballistics, condition…)

-Melee Weapons (I have yet to think about these features)
-Bullets-Physical
-Standard(Ray)
-Hybrid(Rays and some calculations)
-Weapon related functions-Weapon swapping
-Other various things I see get asked a lot

There are instructions for use and more information in the text editor.
Don’t hesitate to voice any questions, concerns or suggestions. I’m very open to ideas, and constructive criticism is encouraged.

Downloads:
Current Version: Weapons Template V0.1.zip (121 KB)

Thanks for your interest in my project.

EDIT: Changed this entire post to better suit the project.

Already do >:]
Courtesy of someone by the name of “Raider”

Though a .blend of your own would be pretty neat!

Awe oh well. I’ll keep working on mine anyways I was probably going to make it a full weapons template anyways.

Argh, didn’t want to discourage you :frowning:
Sorry about that… but I’m sure you could get better results than that script, as it’s not very realistic.

You could try 1-upping this script by implementing bullet penetration, don’t know how hard that would be, seeing as how I don’t know any Python.

Good luck, and keep us updated :]

That wont be to hard with the way I already have this started. I’ll add it to my To Do.

I think it’s pretty cool. Would it work with a high velocity projectile from a grenade launcher so it could stick to an enemy and blow up later? That’s my favorite type of weapon, one that the enemy knows will kill them but they can’t do anything about it.

Also it would be awesome if you could shoot a long bullet into a wall so that when it stopped you could see the bullet protruding from either side of the wall and then do a quick boolean operation to make “real” physical holes in the wall from the bullets shape, and then just end the bullet object. But I suspect that would lag the game real bad if you could even do it at all.

Right now it works quite well up to around 700 m/s then the ray trace seems to stop detecting the wall. Which is weird, but i’m sure it can be fixed. even if it cant 700 m/s is pretty fast like 2296.59 feet per second which is well in the range for most guns muzzle velocities.
EDIT: ^Fixed the problem i was having now its reliable at even higher speeds.

About the bullet holes maybe with some texture trickery it would be possible but you cant currently modify meshes in blender.

That’s a bummer about not being able to modify meshes in game. So you would make this just like a real bullet? Would you be able to set objects that you WANT the bullet to go through, like cardboard for instance? That would be neat along with having the bullet go down as gravity pushes it. I’ll be waiting for a .blend!

Honestly, I think it’s mainly a learning experience.

There is little point in having bullets as physics objects. They don’t look good and they don’t work right without hacks. So you have to raycast and move them manually, why not just use bare raycasting system to begin with? It’s the standard solution in FPS games for a reason.

Projectiles in general that would benefit:
slow motion mechanics
“bullet hell” type games with slow/evadable bullets
arrows
rockets
throw spears
throw axes
long distance sniper shots,
as you have to predict movement (wind, moving obstacles (like birds) between targets)
angry birds

I think it’s useful, especially when shot projectile is not a bullet form 10 m distance.
And a rain of arrows/ axes is quite pretty to watch.
I really enjoy ranged weapons in Mount&Blade.

What does that have to do with bullets being physics objects?

That’s very nice! Thanks :slight_smile:

There will be updates to this next week after Wednesday so until then here’s kind of a feature list that i have quickly made up.


Weapon template:
    -Projectile Based:
    -fire type:
        -full
        -semi
        -burst
        -multiple fire modes per-weapon
    -muzzle velocity
    -dynamic recoil power 
    -recoil pull          
    -weapon magazines:
        -max capacity
    -ammo pool
    -persistent mags 
    -reload speed
    -bullet spawn object
    -effects
        -particles
            -muzzle flash (if its dark)
            -muzzle smoke
    -overheating
    -degredation
    -sound manager?
    -attachments?
    -weapon generator?
    -sights?
    -scopes?
    -dynamic weapon sway
    -dynamic features or not? 
    -weight
    -Bullet or ray 
    -multibullet? 
    -pickup
    -drop
    -swap
    -swich to offhand
    -menuverability:
        -momentum 
        -collision check 
        -speed multiplyer 
    -Meelee Weapons
    
Bullet template:
    -proper collisions 
    -penetration 
    -richochet
    -ballistics:
        -wind
        -temp?
        -humidity?
        -elevation
        -air pressure?
    -power over time
    -categories(bullet classifications ex: 55.6, 9mm, ...)
    -bullet types(Bullet, explosive)
    -effects    
        -particles:
            -debirs
            -bullet trail
        -dynamic paint
            -bullet holes?
            -dirt
            -cracks
            -dents


Feel free to make suggestions about that list. Any who, more updates after Wednesday.

I heard the sound of fun physics scripting and came running. What’s goin’ on here then? =o

A full-on weapon template sounds like a great idea! I’m pretty sure the Source engine uses something like this. All those slightly different weapons must share some underlying mechanics.

Please do one-up that script! It’s old and crumbly and made for 2.63. Surprised it still works. (link to the blend if anyone needs it: http://www.gameblender.org/download/file.php?id=3506)

Sorry its been so long, I’ve had less time to work of this then I would like to have. But no excuses I’ve been working on this when I can find time to, and just wanted to let everyone know that I’m still trucking along. I hope to have an actual update later this week, and perhaps a demo file showing the current progress and how you can set it up in your project.

My goals are to have this as easy to use as possible while still being extremely versatile in what it can do, so that you can easily and quickly set up any weapon you want with any ballistic properties, and customization(Attachments) you want.

Here is what I currently have checked off (These may still change but the basic underlying code is there):

  • Physical Bullets
  • Base Weapon
  • Base Firearm
  • Shooting
    • Based on RPM that is set for the weapon
  • Fire modes
    • single
    • semi-auto
    • burst (number set by you)
    • full

I’m currently working on reloading and magazines, and I’ve also been doing some experiments related to ballistics that I’ll talk about in a later update. So hopefully later this week when I’ve finished a few more items on my list I will post another update to this thread that I will include a blend file.

I updated the first post with new information and a download to the first iteration of my weapons template.

Whats in it:

  • 3 weapon examples
  • physical bullets
  • reloading
  • magazines
  • fire modes

What to expect next time:

  • recoil
  • sway
  • switching between fire modes in game
  • persistent magazines
  • ray bullets
  • possibly more!

I’ll try to have version 0.2 done by next Friday!

Thanks for your interest and don’t forget to leave your thoughts;)

I just wanted to let everyone know there won’t be any update this week, I’m still working on it but I had some stuff come up that slowed me down quite a bit. Anyways I’ll update you again next Friday!

Hey, this is free to use right? Because I might have to try this out for a game I’m making with some friends.

Hi GTVPO, yes it is free to use just make sure to give me credit. I am going to upload a newer version in a couple of days that has a few more features if you want to wait for that. Also thanks for the interest:)