Fractal Softworks Forum

Please login or register.

Login with username, password and session length

Author Topic: Disabling the monthly stipend from the Galatian Academy  (Read 4868 times)

lcarapaica

  • Ensign
  • *
  • Posts: 7
    • View Profile
Disabling the monthly stipend from the Galatian Academy
« on: November 28, 2018, 06:10:03 PM »

For roleplay purposes, having that monthly income can become inmersion breaking, that's why i'm looking for a way to disable it in the game files but so far to no avail, can anyone point me in the right direction where to look?
Logged

Histidine

  • Admiral
  • *****
  • Posts: 4688
    • View Profile
    • GitHub profile
Re: Disabling the monthly stipend from the Galatian Academy
« Reply #1 on: November 29, 2018, 06:13:03 AM »

Turns out it's already in config (starsector-core/data/config/settings.json):

Code
	"factionCommissionStipendBase":20000,
"factionCommissionStipendPerLevel":1500,

I was expecting to have to find and terminate the intel item.

oops (see below)
« Last Edit: November 29, 2018, 04:25:10 PM by Histidine »
Logged

lcarapaica

  • Ensign
  • *
  • Posts: 7
    • View Profile
Re: Disabling the monthly stipend from the Galatian Academy
« Reply #2 on: November 29, 2018, 02:30:44 PM »

Tried it out, problem is that those lines are actually for the faction comission income, and not for the galatian academy 3 year long one that is given at the beggining of the game.
Logged

Histidine

  • Admiral
  • *****
  • Posts: 4688
    • View Profile
    • GitHub profile
Re: Disabling the monthly stipend from the Galatian Academy
« Reply #3 on: November 30, 2018, 03:22:17 AM »

Oh, whoops, should have looked at the code more carefully.

Okay, this works (make a mod script that calls it, or enter in console with runcode):
Code: java
		List listeners = Global.getSector().getListenerManager().getListeners(com.fs.starfarer.api.impl.campaign.tutorial.GalatianAcademyStipend.class);
for (Object bla : listeners)
{
Global.getSector().getListenerManager().removeListener(bla);
break;
}

(If you're doing an actual mod, import com.fs.starfarer.api.impl.campaign.tutorial.GalatianAcademyStipend instead of specifying the whole name.
Also I tried just calling Global.getSector().getListenerManager().removeListenerOfClass(com.fs.starfarer.api.impl.campaign.tutorial.GalatianAcademyStipend.class); but that makes console throw a ConcurrentModificationException for some reason)
Logged

lcarapaica

  • Ensign
  • *
  • Posts: 7
    • View Profile
Re: Disabling the monthly stipend from the Galatian Academy
« Reply #4 on: November 30, 2018, 09:18:47 AM »

Thank you! I appreciate it!
Logged