Fractal Softworks Forum

Please login or register.

Login with username, password and session length

Author Topic: Bar historian donations not being deducted from balance.  (Read 289 times)

Lycaeon

  • Lieutenant
  • **
  • Posts: 93
    • View Profile
Bar historian donations not being deducted from balance.
« on: November 26, 2023, 09:49:33 PM »

Hello all,

I've encountered an unusual bug in my last run. When I made a donation of 20,000 to the bar historian, I noticed this amount wasn't deducted from my credit balance. To confirm this wasn't a fluke or a mistake on my part, the next time a donation opportunity came up for 50,000, I noted my balance before and after making the donation and it was again the same. This was despite the game noting I had lost both amounts in the dialogue screen when the donations were made. I also did not spend any SP on blueprints/colony items prior to this.

As of now I don't know if this bug is or isn't due to a mod...I never paid attention to my cash total when making donations before. I also noted that credits seemed to be added or removed correctly with other events not related to the bar historian. Nothing unusual showed up in the starsector.log file either.

Any help in this matter would be appreciated. My mod list is as follows:

Additional Character Names,
AI High Energy Focus Tweak,
AoTD Cryosleeper,
Audio Plus,
Better Colonies,
Combat Chatter,
Detailed Combat Results,
Fleet Journal,
Force Auto Resolve,
GraphicsLib,
Hostile Intercept,
Interesting Portraits Pack,
LazyLib,
LunaLib,
MagicLib,
More Player Flags,
More Ship Names,
Nexerelin,
Nomadic Survival,
Officer Extension,
Planetary Shield Access Control,
Realistic Combat,
Ruthless Sector,
Scavenger Trading,
Starpocalypse Revengeance,
Starship Legends,
Stellar Networks,
Terraforming and Station Construction,
Unknown Skies

Of these mods Nomadic Survival by Sundog is the most recent one I've added, and the only one I can think of apart from Nexerelin and Starship Legends that alters the planetside dialogue in any way.
« Last Edit: November 26, 2023, 10:20:25 PM by Lycaeon »
Logged

Sundog

  • Admiral
  • *****
  • Posts: 1727
    • View Profile
Re: Bar historian donations not being deducted from balance.
« Reply #1 on: November 27, 2023, 07:56:06 AM »

Good catch!
I didn't test this in-game because I'm not aware of a convenient way to proc historian donations, but this appears to be a vanilla bug, surprisingly. As far as I can tell, the code responsible for handling the donation has a line for notifying you that credits were lost, but nothing to actually remove the credits. I'll PM Alex to make sure he knows to take a look at this.

com.fs.starfarer.api.impl.campaign.intel.bar.events.historian.DonationOffer.opt ionSelected()
Code
	public void optionSelected(String optionText, Object optionData) {

HistorianData hd = HistorianData.getInstance();

if (optionData == OptionId.DONATE) {
setDone(true);
setRemove(true);

hd.incrTier();
hd.setRecentlyDonated();

AddRemoveCommodity.addCreditsLossText(credits, text);

CustomRepImpact impact = new CustomRepImpact();
impact.limit = RepLevel.COOPERATIVE;
impact.delta = 0.1f;
Global.getSector().adjustPlayerReputation(
new RepActionEnvelope(RepActions.CUSTOM, impact,
  null, dialog.getTextPanel(), true), hd.getPerson());

// CustomRepImpact impact = new CustomRepImpact();
// impact.delta = 0.1f;
//
// Global.getSector().adjustPlayerReputation(
// new RepActionEnvelope(RepActions.CUSTOM,
// impact, null, text, true, true),
// hd.getPerson());

dialog.getTextPanel().addPara("The historian thanks you for your help.");
return;
}


if (optionData == OptionId.NEVER_MIND) {
setDone(true);

dialog.getTextPanel().addPara("The historian cooperates in changing topics.");
return;
}
}

Lycaeon

  • Lieutenant
  • **
  • Posts: 93
    • View Profile
Re: Bar historian donations not being deducted from balance.
« Reply #2 on: November 27, 2023, 09:38:53 AM »

Huh, that's interesting. Thanks for taking the time to look it up in the code. :D
Logged

Sundog

  • Admiral
  • *****
  • Posts: 1727
    • View Profile
Re: Bar historian donations not being deducted from balance.
« Reply #3 on: November 27, 2023, 11:52:14 AM »

No problem. The coding software I use made it pretty easy  :)

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24159
    • View Profile
Re: Bar historian donations not being deducted from balance.
« Reply #4 on: November 27, 2023, 12:45:31 PM »

And, thanks to this report, it's now fixed for the next release :)
Logged