Fractal Softworks Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

Starsector 0.95.1a is out! (12/10/21); Blog post: The Pilgrim's Path (07/19/22)

Author Topic: a question about Weapon_Data.CSV  (Read 615 times)

hydremajor

  • Captain
  • ****
  • Posts: 412
    • View Profile
a question about Weapon_Data.CSV
« on: December 21, 2021, 02:21:32 PM »

been trying to wrap my head around how to make reloading missiles in the game

My investigation thus far led me to Weapon_data.CSV

at the top of the file (opened in notepad) there is a descriptive of what is supposed to be the weapon stats applied

in my case I'm looking at slots 10 and 11 that should respectively be time for a  reload cycle and ammo reloaded per cycle

to get the time for a reload you need to put a value under 1 wich should go something along the lines of

1 divided by (insert amount of seconds you want here) and you should slap on the value rounded to the last 2 non-zero numbers

for example:

lets say I want the Swarmers to reload 4 missiles every two seconds

I do 1 divided by 2 = 0.5

If I add 0.5 in the reload speed it'll take two instances of 0.5 to get to 1 thus my reload takes two seconds

and the next slot to the right (I think) I put 4 signifying that each time a reload cycle completes, 4 ammo is added to the ammo count until it reaches the max value of ammo the weapon can hold

Have I gotten this right or is my logic wrong ?
« Last Edit: December 21, 2021, 02:24:36 PM by hydremajor »
Logged

IonDragonX

  • Admiral
  • *****
  • Posts: 780
    • View Profile
Re: a question about Weapon_Data.CSV
« Reply #1 on: December 21, 2021, 04:11:33 PM »

Have I gotten this right or is my logic wrong?
I looked at the .csv and you have it wrong.
Column 14 is ammo/sec - Column 15 is reload size - its better to use a spreadsheet that works with .csv files to read it - notepad will not be your friend
Look at reload size first. You want a set of 4 reloaded, so the value will be 4.
Now look at ammo/sec. You want the 4 done in 2 sec, so 4ammo/2sec = 2. The value will be 2.
Logged

hydremajor

  • Captain
  • ****
  • Posts: 412
    • View Profile
Re: a question about Weapon_Data.CSV
« Reply #2 on: December 22, 2021, 03:38:44 AM »

Have I gotten this right or is my logic wrong?
I looked at the .csv and you have it wrong.
Column 14 is ammo/sec - Column 15 is reload size

So went and downloaded the free version of something called "Modern CSV"

put it in and yeah now things make more sense but it says you wrong

its the 13 and 14 for me

anyways as far as the math for the reload duration goes, is that right or wrong ?
Logged

Zr0Potential

  • Ensign
  • *
  • Posts: 30
    • View Profile
Re: a question about Weapon_Data.CSV
« Reply #3 on: December 22, 2021, 04:26:16 AM »

Have you tried looking at DatonKallandor's Missiles and Sundry mod? Might give you a few insights if you're working on reloading systems.
Logged

hydremajor

  • Captain
  • ****
  • Posts: 412
    • View Profile
Re: a question about Weapon_Data.CSV
« Reply #4 on: December 22, 2021, 08:48:01 AM »

Have you tried looking at DatonKallandor's Missiles and Sundry mod? Might give you a few insights if you're working on reloading systems.

I was planning to mess around with it and set a few values to my preferrence since I dunno how to rig up my own mod anyhow due to being a complete coding neophyte
Logged

IonDragonX

  • Admiral
  • *****
  • Posts: 780
    • View Profile
Re: a question about Weapon_Data.CSV
« Reply #5 on: December 22, 2021, 04:36:10 PM »

its the 13 and 14 for me
The Columns are named as follows:
column01 = name
column02 = id
column03 = tier
column04 = rarity
column05 = base value
column06 = range
column07 = damage/second
column08 = damage/shot
column09 = emp
column10 = impact
column11 = turn rate
column12 = OPs
column13 = ammo
column14 = ammo/sec
column15 = reload size
... there are more after that ...

What are the differences that you see? Are the Column names different? Rearranged? Missing?

Logged

hydremajor

  • Captain
  • ****
  • Posts: 412
    • View Profile
Re: a question about Weapon_Data.CSV
« Reply #6 on: December 23, 2021, 03:43:35 AM »

Oh its just a little deviation due to the name column being counted as "0"

anyways its shows me a total of 48 (49 if you count 0) columns with a couple or so blanks at the tail end

miiight be able to try doing something I was wondering about how it'd feel with missile racks....
Logged

IonDragonX

  • Admiral
  • *****
  • Posts: 780
    • View Profile
Re: a question about Weapon_Data.CSV
« Reply #7 on: December 23, 2021, 10:07:22 AM »

Oh its just a little deviation due to the name column being counted as "0"
OK. That's what I didn't understand.
So, you want ammo/sec = 2 and reload size = 4. That way the weapon reloads 4 missiles every 2 seconds.
They way you had it with ammo/sec = 0.5 would have taken 8 seconds instead.
Logged

hydremajor

  • Captain
  • ****
  • Posts: 412
    • View Profile
Re: a question about Weapon_Data.CSV
« Reply #8 on: December 23, 2021, 10:54:58 AM »

Oh its just a little deviation due to the name column being counted as "0"
OK. That's what I didn't understand.
So, you want ammo/sec = 2 and reload size = 4. That way the weapon reloads 4 missiles every 2 seconds.
They way you had it with ammo/sec = 0.5 would have taken 8 seconds instead.

okay so what I understand from this is

Ammo/sec is how much ammunition is "generated per second"

and reload size is the ammo value that needs to "be generated" for the ammo count to update ?
Logged

IonDragonX

  • Admiral
  • *****
  • Posts: 780
    • View Profile
Re: a question about Weapon_Data.CSV
« Reply #9 on: December 23, 2021, 12:02:30 PM »

okay so what I understand from this is
Ammo/sec is how much ammunition is "generated per second"
and reload size is the ammo value that needs to "be generated" for the ammo count to update ?
Yes.
You can leave the reload size = [null] if you want and the ammo/sec will continue to load 1 ammo at the set interval.
Logged

hydremajor

  • Captain
  • ****
  • Posts: 412
    • View Profile
Re: a question about Weapon_Data.CSV
« Reply #10 on: December 23, 2021, 02:38:05 PM »

If I set burst size to something higher than the max ammo, does the weapon just dump ammo till it runs out or does it cause a crash/error ?
Logged