Fractal Softworks Forum

Please login or register.

Login with username, password and session length

Author Topic: Weapon design help  (Read 6604 times)

Requal

  • Lieutenant
  • **
  • Posts: 85
    • View Profile
Weapon design help
« on: September 24, 2015, 03:07:48 AM »

Ok since ship designing will take a while I'll just start somewhere "simple".
Which is weapon designing.
I wanted to start with a large ballistic gun.
But I have actually no clue what the pixel size of these guns are and how I get them in motion in game.
I created a barrel layer and a turret layer in PS.
13x41 in size together.

I want the barrel to have like a kickback/recoil of 13 pixels so the top of the barrel connects to the turret.
Does this make any sense? :D

Is there some indepth video or website on how to do this?
I am not a programmer and my art skills are mediocre so bear with me.

Any help would be highly appreciated since I am eager to learn how to mod for this beautifull game.
« Last Edit: September 24, 2015, 03:30:09 AM by Requal »
Logged

Zudgemud

  • Commander
  • ***
  • Posts: 225
    • View Profile
Re: Weapon design help
« Reply #1 on: September 24, 2015, 04:50:49 AM »

There are currently no tutorial of how to do this, but if you look at the files for vanilla guns and ships the numbers everywhere is pretty logical.

So, if I remember correctly, the basic setup is:
1. The .wpn file, this one describes the type of weapon you use; what the weapon will be named in internal references (use a unique logical name such as mymod_gatlinggun), what type of weapon, which sprites to use and any details regarding basal animation, which sounds the projectile firing will use and which file describes the projectile itself and where it can be found.
2. The .proj projectile file: this one describes properties of the projectile in much the same way as the .wpn works, you need to have a unique name, and you need to set the sprite to be used and where it can be found, the parameters for the sprite and finally the various parameters for the shot itself (if it is a missile you set how well it will track, how the engines will be placed etc.).

(for both of the files above I recommend you look through all the parameters carefully and learn what they do by trial and error)

3. The weapons_data.csv file, this file gives the details regarding what stats your gun will have, ie. flux drain per shot, damage per shot, projectile speed etc.

Contrary to the other two file types the weapons_data.csv file says exactly what each parameter does in the top. So when it say
"name,id,tier,base value,range,damage/second...." the "name" part is what is displayed in game, the "id" is your weapon name ID in the .wpn file, the tier is what tier you want it to be, the base value is what it will cost, the range is the range of the weapon, the damage/second is naturally damage per second (only applicable for beam weapons). Each comma separate a value so be sure to not remove or write any extra commas, and use punctuation for making decimal numbers. So if you make a super beam laser that you could fill it in like "Superbeam,mymod_supebeam,2,10000,750,500....". I suggest that you do not use excel to modify the .csv file, as excel is prone to *** it up, atleast in my opinion.
Logged

SafariJohn

  • Admiral
  • *****
  • Posts: 3027
    • View Profile
Re: Weapon design help
« Reply #2 on: September 24, 2015, 06:47:43 AM »

I have no problems using Excel. The only thing for me is that when I save it pops up this box:



I just click yes and everything works great.
Logged

Requal

  • Lieutenant
  • **
  • Posts: 85
    • View Profile
Re: Weapon design help
« Reply #3 on: September 24, 2015, 12:17:37 PM »

Thnx Zudgemund
That is very helpfull!


Is there an alternative to Excel?
I dont have office on this PC and the only excel alternative I use now is a online google one but therefor I must upload-edit-download everytime I want to edit something.
Logged

SafariJohn

  • Admiral
  • *****
  • Posts: 3027
    • View Profile
Re: Weapon design help
« Reply #4 on: September 24, 2015, 12:38:35 PM »

Open Office is what you want, I think. Here: https://www.openoffice.org/
Logged

Requal

  • Lieutenant
  • **
  • Posts: 85
    • View Profile
Re: Weapon design help
« Reply #5 on: September 24, 2015, 01:10:16 PM »

Open Office is what you want, I think. Here: https://www.openoffice.org/

Thnx will check it out
Logged

Requal

  • Lieutenant
  • **
  • Posts: 85
    • View Profile
Re: Weapon design help
« Reply #6 on: September 24, 2015, 02:18:40 PM »

There are currently no tutorial of how to do this, but if you look at the files for vanilla guns and ships the numbers everywhere is pretty logical.

So, if I remember correctly, the basic setup is:
1. The .wpn file, this one describes the type of weapon you use; what the weapon will be named in internal references (use a unique logical name such as mymod_gatlinggun), what type of weapon, which sprites to use and any details regarding basal animation, which sounds the projectile firing will use and which file describes the projectile itself and where it can be found.
2. The .proj projectile file: this one describes properties of the projectile in much the same way as the .wpn works, you need to have a unique name, and you need to set the sprite to be used and where it can be found, the parameters for the sprite and finally the various parameters for the shot itself (if it is a missile you set how well it will track, how the engines will be placed etc.).

(for both of the files above I recommend you look through all the parameters carefully and learn what they do by trial and error)

3. The weapons_data.csv file, this file gives the details regarding what stats your gun will have, ie. flux drain per shot, damage per shot, projectile speed etc.

Contrary to the other two file types the weapons_data.csv file says exactly what each parameter does in the top. So when it say
"name,id,tier,base value,range,damage/second...." the "name" part is what is displayed in game, the "id" is your weapon name ID in the .wpn file, the tier is what tier you want it to be, the base value is what it will cost, the range is the range of the weapon, the damage/second is naturally damage per second (only applicable for beam weapons). Each comma separate a value so be sure to not remove or write any extra commas, and use punctuation for making decimal numbers. So if you make a super beam laser that you could fill it in like "Superbeam,mymod_supebeam,2,10000,750,500....". I suggest that you do not use excel to modify the .csv file, as excel is prone to *** it up, atleast in my opinion.

Is it ok to use existing .wpn .proj files and use them as a template?
Or do I need to create one from scratch?
Logged

SafariJohn

  • Admiral
  • *****
  • Posts: 3027
    • View Profile
Re: Weapon design help
« Reply #7 on: September 24, 2015, 02:25:51 PM »

Go right ahead: copy and modify. :P
Logged

Requal

  • Lieutenant
  • **
  • Posts: 85
    • View Profile
Re: Weapon design help
« Reply #8 on: September 24, 2015, 08:30:35 PM »

I see "fireSoundTwo":"weapon",

Weapon being the ogg sound file.
But don't I need to specify it's current location or does the game/mod exactly know where weapon.ogg can be found?
Logged

Zudgemud

  • Commander
  • ***
  • Posts: 225
    • View Profile
Re: Weapon design help
« Reply #9 on: September 25, 2015, 12:55:11 AM »

I see "fireSoundTwo":"weapon",

Weapon being the ogg sound file.
But don't I need to specify it's current location or does the game/mod exactly know where weapon.ogg can be found?

All sounds refers to an internal reference id for the sound. I think this internal reference id is in turn specified in a file called "sounds" something which is located in the config folder I think, anyway look for a file called sound something in the data folder.
Logged

Requal

  • Lieutenant
  • **
  • Posts: 85
    • View Profile
Re: Weapon design help
« Reply #10 on: September 25, 2015, 06:22:25 PM »

I see "fireSoundTwo":"weapon",

Weapon being the ogg sound file.
But don't I need to specify it's current location or does the game/mod exactly know where weapon.ogg can be found?

All sounds refers to an internal reference id for the sound. I think this internal reference id is in turn specified in a file called "sounds" something which is located in the config folder I think, anyway look for a file called sound something in the data folder.

Makes sense now thnx!
Logged

Requal

  • Lieutenant
  • **
  • Posts: 85
    • View Profile
Re: Weapon design help
« Reply #11 on: September 25, 2015, 11:52:10 PM »

Is it even possible to create a mod with just 1 add weapon to test it out?

If so how do I proceed?

I made the weapon which incl a png of the barrel and one of the base and a projectile png.
All are in their designated folders.
Created a .proj and a .wpn and a weapon_data.csv and placed them in the directories they should be.
Also created a custom .ogg file for the gun which I also placed in the directory it should be in.
And at last I created a mod_info.json in the main directory of the mod.

But when I start the game I get an error so I think I missed something...
Logged

Harmful Mechanic

  • Admiral
  • *****
  • Posts: 1340
  • On break.
    • View Profile
Re: Weapon design help
« Reply #12 on: September 26, 2015, 12:06:28 PM »

Did you include sounds.json with an entry for your weapon's sound? I missed that my first time.
Logged

Requal

  • Lieutenant
  • **
  • Posts: 85
    • View Profile
Re: Weapon design help
« Reply #13 on: September 28, 2015, 01:11:07 PM »

Did you include sounds.json with an entry for your weapon's sound? I missed that my first time.


Ahhh that might be the issue thnx
Logged