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); In-development patch notes for Starsector 0.98a (2/8/25)

Author Topic: Edit Neural link cooldown  (Read 892 times)

painapplez

  • Ensign
  • *
  • Posts: 4
    • View Profile
Edit Neural link cooldown
« on: January 29, 2022, 08:08:24 AM »

Hello,

I am loving Neural link but I would like to edit the cooldown to kick in with more DP, and/or to be faster (haven't decided yet, I'd like to explore options).

I have poked around the game files some, but have not had a lot of luck.

Where do I need to go to tweak Neural link perameters?
Logged

Hiruma Kai

  • Admiral
  • *****
  • Posts: 917
    • View Profile
Re: Edit Neural link cooldown
« Reply #1 on: January 29, 2022, 09:28:39 AM »

That's getting into mod territory.  I don't believe you can't just open up a single file in a text editor and change the neural link DP limits.  There are a number of mods which do change numbers like this, and I'd recommend taking a look at how those are done, or asking in the modding part of the forums how one would go about a simple skill override mod.

The functions you'd need to look into are referenced in the neural_link.skill file:

{"type":"DESCRIPTION", "script":"com.fs.starfarer.api.impl.campaign.skills.NeuralLink$Level0"},

{"type":"CHARACTER_STATS", "script":"com.fs.starfarer.api.impl.campaign.skills.NeuralLink$Level1"},

Those in turn point to the NeuralLinkScript class (in the starfarer.api.jar), found under com.fs.starfarer.api.impl.campaign.skills.NeuralLinkScript, which has a:

public static float INSTANT_TRANSFER_DP = 50.0f

That's the variable you'd need to override with your mod to change it.


Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 25147
    • View Profile
Re: Edit Neural link cooldown
« Reply #2 on: January 29, 2022, 10:07:06 AM »

The easiest way to do it, by the way, would be in your ModPlugin.onApplicationLoad() method - you can just change the value of that variable there without having to provide a whole alternate implementation of the skill.
Logged

painapplez

  • Ensign
  • *
  • Posts: 4
    • View Profile
Re: Edit Neural link cooldown
« Reply #3 on: January 29, 2022, 01:52:43 PM »

Amazing, thank you very much to both of you! This is the information I needed to get started on this.

Alex, you are a legendary Developer, thank you.
Logged