Weapon Generator Video

I’m not officially starting my next project until 2.5 is out, but I am preparing for it.

I’m working on a procedural weapon generator like the one Gearbox used for Borderlands. Basically, I modeled weapon parts and stored them in a dictionary along with what effects they have on the weapon’s stats. Then the generator assembles a unique weapon made up of random parts. For now, the only parts I made are 2 lower receivers, 2 upper receivers, 2 stocks, 2 rear sights, 2 barrel shrouds, 3 front sights, and 4 flash hiders. There’s only 1 grip, 1 magazine, and 1 barrel. However, even with these few parts, there’s 384 possible weapons. And I’m planning on much more than that.

Here’s the video:

It’s a mix of AK and M4 parts. Just so everyone knows, I’m aware that some of the pieces look like crap. That’s because these aren’t going to be in the game I’m planning. They’re just to get the system working for now. The game’s going to be sci-fi, so no modern guns.

pretty neat, has lots of potential

Yeah, it’s an interesting idea and seems to work well. Nice.

I’m interested in seeing how you apply this…i noticed one thing in Borderlands was the weapon CLASSES. For example, certain things are only applicable to certain weapon types. EG. Clips and stocks that are designed for SMGs can’t be spawned on non SMG weapons, but sights and extended clips apply to everything.

Yeah, the main parts are for specific weapon classes. Then you can add different attachments that may be available for any type of weapon.

I am really looking forward to this…maybe afterwards you could release the code for the Generator :smiley:

I was working on something like this… but i only got as far as generating stats,names etc…
Looks really cool :slight_smile:

Really nice, i support the suggestion for weapon classes.
I think you can create better looking and more “serious” wheapon if they are divided in classes (and i think is better to have 20 shotgun, 60 rifle, 400 machine guns than having 2000 wheapon of the same “class”. But if you get to assemble machine guns as well as shotgun within the same class, than cheers to you!! :slight_smile: )

Actually…would this same principle idea also work for…ENEMY PRODUCTION :smiley:
Think about it, using particular “pieces” that effect things about the enemy. different pieces of clothing for example you have your base enemy body shapes for each “Basic enemy type” and then you have different things that they could be wearing eg.
Helmets, Body armour (different for legs, arms and body)
Combat knife/no combat knife. Ammo packs on belts/sidearm. ect. really the possibilities are endless, and with quite minor variation on the code i have no doubts that it wuold be possible :smiley:
Man, if that gets in borderlands 2 i am gonna be SOOOO freakin happy…

Very Cool. In addition to Borderlands this also reminds me of the kooky looking combos you could make with Army of Two.

Hi! Can you release the script please? I am making Blender Model System (that will be released for free and everyone will be able to model anything extermely fast) but I need to look at your script as an example of how to generate different meshes in a similar manner(but not with randomness), I am a newbie when it comes to Python and programming, so every reference will be welcome to me!Thanks!

He doesn’t generate them real-time. He models them beforehand, and then assembles them randomly.

Awesome job man!