Fractal Softworks Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

Starsector 0.97a is out! (02/02/24); New blog post: Simulator Enhancements (03/13/24)

Author Topic: Is there a way to turn off weapon maximum distances?  (Read 1772 times)

Elementony33

  • Ensign
  • *
  • Posts: 4
  • Doin yo mom
    • View Profile
Is there a way to turn off weapon maximum distances?
« on: October 19, 2019, 08:15:02 PM »

I was wondering if anyone could tell me what files I need to edit to turn off weapon maximum distances, or if there already is a mod somewhere that does that
Logged

Midnight Kitsune

  • Admiral
  • *****
  • Posts: 2846
  • Your Friendly Forum Friend
    • View Profile
Re: Is there a way to turn off weapon maximum distances?
« Reply #1 on: October 19, 2019, 08:19:15 PM »

That would pretty much invalidate or greatly unbalance most of the combat layer and some of the ship fitting layer
Logged
Help out MesoTroniK, a modder in need

2021 is 2020 won
2022 is 2020 too

AgentFransis

  • Lieutenant
  • **
  • Posts: 65
    • View Profile
Re: Is there a way to turn off weapon maximum distances?
« Reply #2 on: October 20, 2019, 02:33:51 AM »

If you mean hide the weapon arc UI indicator then it's ~ by default.
Logged

Flare

  • Admiral
  • *****
  • Posts: 906
    • View Profile
Re: Is there a way to turn off weapon maximum distances?
« Reply #3 on: October 27, 2019, 11:39:05 AM »

I don't think it is possible to turn of weapon ranges entirely, but it is very easy to give every weapon in the game more range than the map size. You may have to contend with a bit more lag since the firing calculations for every ship would be up the wazoo, and ship behaviour may be erratic as well.

Nevertheless, the change is quick and easy.

Here it is:

The vanilla weapon data is held in a single file; weapons.csv.

A csv file is a comma seperated file that can be opened with (recommended) spreadsheet software, or even (not recommended) a simple text editor.

I am on mobile but the file ahould be found in starsector/starsector core/data/weapons/weapons.csv.

Make a copy of this file before working with it.

In this file there will be a column named range. Simply add a few zeroes to the end of the numbers in that column to give weapons a practically infinite range.

Do keep in mind for projectile weapons, the speed of the projectile is seperate. Meaning that (nearly) instantaneous weapons like beams will be dominant if you make this change. And ballistic or projectile weapons will take a back seat if you don't change the projectile speed (also found in the same file near the far right side).

Keep in mind that you may also have to change the projectile life time for missiles if you don't want them running out of fuel halfway. The range for missiles only determines how far the ai will shoot it from. Not whether it would reach the targeted ship.

Edit: Mobile spelling.

+ backup addition.

Edit 2:

On second thought, maybe haphazardly increasing the range on weapons isn't a good idea. The game has to keep track of projectiles, and if projectiles last forever off screen, the memory overhead is going to be immense. I'd recommender maybe increasing ranges to the 8000-1000 range instead of any magnitutdes bigger than that. It won't reach from end to end of the map. But it will reach up to the middle.

Anyways. Give these values a test and increase if you want.
« Last Edit: October 27, 2019, 12:53:08 PM by Flare »
Logged
Quote from: Thana
Quote from: Alex

The battle station is not completely operational, shall we say.

"Now witness the firepower of this thoroughly buggy and unoperational batt... Oh, hell, you know what? Just ignore the battle station, okay?"