-
-
Notifications
You must be signed in to change notification settings - Fork 119
Custom Weapons Walkthrough
This page will walk through the process of creating a custom weapon.
Let's start with a blank campaign. This one is very basic and will simply let us try the weapon out. There are a few scattered map objects that we can blow up.
The campaign itself will be a folder, inside there are these three files:
Custom weapons start with guns, defined in a guns.json
file. Go ahead and add this, with the following contents:
{
"Version": 1,
"Guns": [
{
"Name": "My Gun",
"Bullet": "my_bullet"
}
]
}
And create a bullets.json
file too, with the following contents:
{
"Version": 1,
"Bullets": [
{
"Name": "my_bullet"
}
]
}
You can see what's going on here: the gun we've made will shoot the bullet we've made, by referring to it by the same name. The bullet name doesn't show up anywhere else so it doesn't really matter what we name it, as long as it's unique.
If you open the campaign up in the editor, you should see that this gun already shows up in the "Available weapons" section:
At this point we can actually load this campaign up in game, and try out our new weapon...
... and it does nothing except make a lot of noise. We need to fill out those gun and bullet attributes now.