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.
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.
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.
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!! )
Actually…would this same principle idea also work for…ENEMY PRODUCTION
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
Man, if that gets in borderlands 2 i am gonna be SOOOO freakin happy…
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!