Fractal Softworks Forum

Please login or register.

Login with username, password and session length
Pages: 1 ... 38 39 [40] 41 42

Author Topic: API request thread (please read OP before posting!)  (Read 219066 times)

AtlanticAccent

  • Lieutenant
  • **
  • Posts: 73
    • View Profile
Re: API request thread (please read OP before posting!)
« Reply #585 on: May 21, 2023, 04:51:47 PM »

Hi Alex!

I've discovered that you can very effectively abuse StoryPointActionDelegate and OptionPanelAPI.addOptionConfirmation to add new options to dialogs at runtime, circumventing rules.csv and also allowing you to extend FleetInteractionDialogImpl (which afaik is not rules.csv extensible).

May I recommend renaming StoryPointActionDelegate or adding an ancestor interface to really spell out the fact it can be used to add options to OptionPanelAPIs at runtime.

Also, I'll probably figure this out in a bit or not at all, but is there a way to prevent the "Story Points: [num]" element from being added to the subsequent popup/tooltip triggered on clicking an option added as described above? If not, could one be added please?
Logged

RustyCabbage

  • Captain
  • ****
  • Posts: 347
    • View Profile
Re: API request thread (please read OP before posting!)
« Reply #586 on: May 24, 2023, 09:16:23 PM »

It seems com.fs.starfarer.api.campaign.SubmarketPlugin has
Code
boolean isBlackMarket();
boolean isOpenMarket();
but does not have
Code
boolean isMilitaryMarket();
Could it be added?

Jaghaimo

  • Admiral
  • *****
  • Posts: 661
    • View Profile
Re: API request thread (please read OP before posting!)
« Reply #587 on: May 25, 2023, 03:38:33 AM »

Also, I'm trying to display them using tooltip maker but neither addSkillPanel nor addSkillPanelOneColumn seems to work - are these methods hardcoded to just officer skills? Seems different to `printSkills` behaviour used in rules.csv.

Hmm yeah, those methods look hardcoded to print officer skills only.

Is that intentional, or could we expect this to work with admin skills as well? Yes, making a suggestion for the `addSkillPanel` and `addSkillPanelOneColumn` to work for both admins and officers :)
« Last Edit: May 25, 2023, 03:43:23 AM by Jaghaimo »
Logged

123nick

  • Lieutenant
  • **
  • Posts: 64
    • View Profile
Re: API request thread (please read OP before posting!)
« Reply #588 on: May 25, 2023, 05:02:29 PM »

Can FighterLaunchBayAPI.setExtraDeployments be modified to take negative integers to REDUCE the number of active fighters in a wing? or atleast, can there be another method like FighterLaunchBayAPI.setReducedDeployments that does the same thing? i want to make a hullmod that reduces the # of fighters in a wing/LPC/bay/whatever, but afaik it is IMPOSSIBLE with the current methods in the starsector API!!!
Logged

float

  • Captain
  • ****
  • Posts: 267
    • View Profile
Re: API request thread (please read OP before posting!)
« Reply #589 on: May 26, 2023, 10:10:32 AM »

Can we have a CustomCampaignEntityAPI.setSalvageRating? Currently it's possible to change just about everything about a salvageable item on a per-item basis (e.g. its radius, name, etc.), so it'd make sense to also be able to set salvage ratings on a per-item basis, rather than needing to have a different custom entity spec for each rating.
Logged

THEASD

  • Ensign
  • *
  • Posts: 42
  • *Confused Cat Noise*
    • View Profile
Re: API request thread (please read OP before posting!)
« Reply #590 on: May 29, 2023, 09:03:59 PM »

Code
public MutableStat getBeamSpeedMult();
for MutableShipStatsAPI, thanks
Logged
Also known as AnyIDElse.

Maru7

  • Ensign
  • *
  • Posts: 1
    • View Profile
Re: API request thread (please read OP before posting!)
« Reply #591 on: May 30, 2023, 02:50:16 AM »

Need API to modify "maxShipsInFleet" and "suppliesPerShipOverMaxInFleet" defined in config/settings.json,
I want them to be modifiable in the same way as modifyFlat(), modifyMult(), modifyPercent() in MutableShipStatsAPI.
I know these data are not stored in saveddata right now, but maybe we can store them like other data affected by character skill (such as storing them in MutableCharacterStatsAPI or MutableFleetStatsAPI)?
thanks!
Logged

Sundog

  • Admiral
  • *****
  • Posts: 1727
    • View Profile
Re: API request thread (please read OP before posting!)
« Reply #592 on: May 31, 2023, 10:02:59 AM »

MutableShipStatsAPI.getFleetMember returns null prior to calculating the max CR of ships in the player fleet*. I believe this is the source of a bug in one of my mods. Could getFleetMember be improved to provide the member in this situation? Thanks for consideration!

*Edit: I'm not certain when exactly the call fails, but it happens prior to opening the fleet screen during one/some of the multiple stat applications.
« Last Edit: May 31, 2023, 10:14:08 AM by Sundog »
Logged

Jaghaimo

  • Admiral
  • *****
  • Posts: 661
    • View Profile
Re: API request thread (please read OP before posting!)
« Reply #593 on: June 01, 2023, 09:32:34 AM »

A simple request - CutStyle.NONE - renders regular button with no cut corners.
Logged

Liral

  • Admiral
  • *****
  • Posts: 718
  • Realistic Combat Mod Author
    • View Profile
Re: API request thread (please read OP before posting!)
« Reply #594 on: June 30, 2023, 03:53:12 PM »

Make Global.getCombatEngine().isUIShowingHUD() return true when the UI is showing the HUD and false when it is not.  This function is instead inverted, returning false when the UI is showing the HUD and true when it is not.

Edit: My apologies, it finally works as indicated now.  Woo!
« Last Edit: June 30, 2023, 04:26:14 PM by Liral »
Logged

Zsar

  • Captain
  • ****
  • Posts: 279
    • View Profile
Re: API request thread (please read OP before posting!)
« Reply #595 on: July 16, 2023, 08:24:33 AM »

Please
  • overload method FleetEventListener#reportBattleOccurred(CampaignFleetAPI, CampaignFleetAPI, BattleAPI, EngagementResultForFleetAPI) and call it with the obfuscated object that has filled fields backing the accessors EngagementResultForFleetAPI#getDestroyed, EngagementResultForFleetAPI#getDisabled, which is currently created and filled after every battle but completely inaccessible from mod code.
  • deprecate method FleetEventListener#reportBattleOccurred(CampaignFleetAPI, CampaignFleetAPI, BattleAPI) in favour of the new one
Logged

Nia Tahl

  • Admiral
  • *****
  • Posts: 793
  • AI in disguise
    • View Profile
Re: API request thread (please read OP before posting!)
« Reply #596 on: August 15, 2023, 11:42:44 PM »

EngineControllerAPI or EngineSlotAPI method for controlling or at least disabling the flaring of engines like during strafing or reversing would be much appreciated
Logged
My mods: Tahlan Shipworks - ScalarTech Solutions - Trailer Moments
It's all in the presentation

Sorrydough

  • Ensign
  • *
  • Posts: 30
    • View Profile
Re: API request thread (please read OP before posting!)
« Reply #597 on: September 07, 2023, 03:17:40 PM »

I'd also like to have an engine feature: I want them to behave like always-active 128 contrail engines. For example, set it to contrail 127 and the engine won't take damage in combat, but will still turn off if the ship gets fully flamed out. Therefore the engine is entirely cosmetic.
Logged

Lukas04

  • Captain
  • ****
  • Posts: 356
    • View Profile
Re: API request thread (please read OP before posting!)
« Reply #598 on: September 17, 2023, 01:51:01 PM »

a "overwriteColor" boolean return method in BaseHullmod that lets you overwrite the build-in gray and storypoint green for a hullmod.
Logged
My Mods

SafariJohn

  • Admiral
  • *****
  • Posts: 3021
    • View Profile
Re: API request thread (please read OP before posting!)
« Reply #599 on: October 04, 2023, 11:26:16 AM »

For BaseLocation.LocationToken please implement a backing field for getName() and setName().
Logged
Pages: 1 ... 38 39 [40] 41 42