Fractal Softworks Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 27 28 [29] 30

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

Sundog

  • Admiral
  • *****
  • Posts: 1155
    • View Profile
Re: API request thread (please read OP before posting!)
« Reply #420 on: July 20, 2020, 10:36:37 PM »

There are several mods that add special hullmods that don't strictly meet the criteria of a proper hull modification. In my case it's Starship Legends, which adds a hullmod that represents the ship's reputation, but there's also Commissioned Crews (faction-trained crew), Automatic Orders (AI modification flags), and Extended Hullmods (sub-systems that boost other hullmods). I'm sure there are others. The special hullmods added by these mods are represented the same way as any other hullmod by the GUI, which seems pretty janky to me. It would be nice if such hullmods had a way of visually distinguishing themselves from actual hullmods. To that end, I would greatly appreciate the following additions to BaseHullMod:
  • getBorderColor
  • getNameColor
  • getDisplayOrder
Thanks for your consideration, Alex!

passwalker

  • Commander
  • ***
  • Posts: 134
    • View Profile
Re: API request thread (please read OP before posting!)
« Reply #421 on: August 31, 2020, 05:27:21 AM »

any chance we'll ever get access to the visual part of spawnEmpArc ?
i mean, without all the targeting and damage dealing and so on, just renderEmpArc from point A to point B. because that's what it's generally used for in most cases outside of vanilla, except currently it also requires setting up a fake combat entity because emp arc can't just be cast at point.
i'd suspect both spawnEmpArc and spawnEmpArcPierceShields are already using something like that under the hood, and it is sad that it is not callable directly
Logged
Any and ALL sprites i ever posted on this forum are FREE to use. even if i'm using them myself. Don't ever, EVER ask for permission, or i will come to your home and EAT YOUR DOG!!!
i do NOT want to see my name appear in the credits section of any published mod and will consider it a personal insult.

AxleMC131

  • Admiral
  • *****
  • Posts: 1709
  • Amateur World-Builder
    • View Profile
Re: API request thread (please read OP before posting!)
« Reply #422 on: September 02, 2020, 01:45:07 AM »

... currently it also requires setting up a fake combat entity because emp arc can't just be cast at point...

(Assuming you are spawning an arc with one end at an existing entity, and not from a random point to a random point)

Have you tried swapping the target and origin points for the arc? Because the TARGET needs to be a CombatEntityAPI and the ORIGIN is a Vector2f coordinate location... If you aren't dealing damage and just want a visual arc, you just flip them, so the origin is your "random point in space" and the target is the thing that's actually generating the arc.
Logged

Jaghaimo

  • Commander
  • ***
  • Posts: 128
    • View Profile
Re: API request thread (please read OP before posting!)
« Reply #423 on: September 07, 2020, 08:34:19 AM »

I was trying to add some counter-intel (bounties countering something presented in an intel) and found it impossible. My idea was to offer another type of missions to the player, e.g.
  • Stop Smuggler - prevent the smuggler from reaching initial market, or making trip back
  • Stop Pirate Raid - fight and break the pirate raid before it reaches return (after successful raid) stage
  • Stop Trade Fleet - similar to Stop Smuggler, make sure the fleet never arrives at the destination
In all 3 cases, the bounty would be paid if player destroyed fleets associated with the initial intel. Could we please get a "CampaignFleetAPI getMainFleet()" and "List<CampaignFleetAPI> getFleets()" methods on intel objects that involve fleets (formalized via an interface)? This would allow to register own FleetEventListener (thus succeeding the bounty when initial one failed and vice versa) and check some other bits (to decide on bounty payout and to be able to generate sensible intel descriptions).
Thanks!
« Last Edit: September 07, 2020, 08:36:36 AM by Jaghaimo »
Logged
Stellar Logistics - logistic services
Hyperspace Network - information services
Galactic Markets - economy services

passwalker

  • Commander
  • ***
  • Posts: 134
    • View Profile
Re: API request thread (please read OP before posting!)
« Reply #424 on: September 10, 2020, 06:29:13 AM »

will we ever get the weapon.setLocation(); or weapon.getSlot.setLocation(); ? we can set location of ships, and set location of fireOffsets within each weapon, and set weapon slot arc, but not set location of weapons. unfortunate.
« Last Edit: September 10, 2020, 06:30:47 AM by passwalker »
Logged
Any and ALL sprites i ever posted on this forum are FREE to use. even if i'm using them myself. Don't ever, EVER ask for permission, or i will come to your home and EAT YOUR DOG!!!
i do NOT want to see my name appear in the credits section of any published mod and will consider it a personal insult.

Histidine

  • Admiral
  • *****
  • Posts: 2846
    • View Profile
    • Bitbucket profile
    • Email
Re: API request thread (please read OP before posting!)
« Reply #425 on: October 17, 2020, 03:54:52 AM »

FactionAPI.getShipNamePrefix()
Conspicuously missing from the API.
Logged

Jaghaimo

  • Commander
  • ***
  • Posts: 128
    • View Profile
Re: API request thread (please read OP before posting!)
« Reply #426 on: October 17, 2020, 07:32:24 AM »

Could we get a method in IntelUIAPI to refresh the list of intels (left side), ideally without redrawing the currently selected one?
Logged
Stellar Logistics - logistic services
Hyperspace Network - information services
Galactic Markets - economy services

SafariJohn

  • Admiral
  • *****
  • Posts: 1835
    • View Profile
Re: API request thread (please read OP before posting!)
« Reply #427 on: October 22, 2020, 07:15:02 AM »

It would be really nice if ShipAPI.getParentStation() and ShipAPI.getChildModulesCopy() were usable in the refit screen.
Logged

Jaghaimo

  • Commander
  • ***
  • Posts: 128
    • View Profile
Re: API request thread (please read OP before posting!)
« Reply #428 on: October 29, 2020, 03:24:00 AM »

I've just noticed game can render select boxes (e.g. Codex, Weapons, Small/Medium/Large and Energy/Ballistic/Missile) - could we have this exposed in TooltipMakerAPI? Example:

Same description as addButton:
Code
SelectBoxAPI addSelectBox(java.lang.String text, java.lang.Object data, java.awt.Color base, java.awt.Color bg, float width, float height, float pad) 
SelectBoxAPI addSelectBox(java.lang.String text, java.lang.Object data, float width, float height, float pad)
For simplicity, SelectBoxAPI extends ButtonAPI plus:
Code
void setSelected(boolean isSelected);
boolean getSelected();
And an event handler function in IntelInfoPlugin:
Code
void selectBoxChanged(java.lang.Object selectBoxId, boolean isSelected, IntelUIAPI ui)
Logged
Stellar Logistics - logistic services
Hyperspace Network - information services
Galactic Markets - economy services

Jaghaimo

  • Commander
  • ***
  • Posts: 128
    • View Profile
Re: API request thread (please read OP before posting!)
« Reply #429 on: November 08, 2020, 01:58:18 PM »

I remember seeing something regarding officer/admin skills - I think it was regarding dialog box for recruitment.

Could you add `showSkills(PersonAPI person, ...)` to TooltipMakerAPI?

Possible descriptions:
Code
void showSkills(PersonAPI person);// shows all non-zero skills
void showSkills(PersonAPI person, boolean sorted);// like showCargo, sort based on level
void showSkills(PersonAPI person, int max);// show up to max, then "and X other skills"
Logged
Stellar Logistics - logistic services
Hyperspace Network - information services
Galactic Markets - economy services

Tuv0x

  • Ensign
  • *
  • Posts: 10
    • View Profile
Re: API request thread (please read OP before posting!)
« Reply #430 on: December 21, 2020, 04:28:52 PM »

It would be nice to have access to more stuff in com.fs.starfarer.api.ui,

I will preface this with: I have no idea what any of the classes/methods are so this will sound super generic.
A way to create tri-pad like menus akin to the intel and command menus. Currently mod authors are utilizing the intel tab to add menu functionality to their mods.
Code: java
com.fs.starfarer.api.ui.TriPadAPI
The "would be nice" features would include:
  • Tab implementation
  • Scrollable content functionality
  • Maybe even a sidebar (Like intel has a sidebar where specific items are held)
  • Tab content could be table based like the intel tab is

For ToolTipMakerAPI:
Code: java
void addCheckbox(String id, boolean checked)
boolean getChecked(String id)
void addTextInput(String id, String placeholder)
void addTextBox(String id, String placeholder, int height) /* height could be number of lines, or pixel height I guess */
String getTextInput(java.lang.string id)

SirHartley

  • Captain
  • ****
  • Posts: 294
    • View Profile
Re: API request thread (please read OP before posting!)
« Reply #431 on: December 22, 2020, 10:35:33 AM »

I'd like to ask for a method to block the availability of buildings on a market-to-market basis.
For example:
Code: java
com.fs.starfarer.api.campaign.econ.MarketAPI
void blacklistIndustry(industryId)
void whitelistIndustry(industryId)
to disallow building that specific building on a market unless removed from the blacklist via a similar method.

Edit - Apologies for posting in the wrong thread - it's been a while since I read the OP. Feel free to delete it, I'll repost it as new subject sometime if it's gone.
« Last Edit: December 22, 2020, 03:20:58 PM by SirHartley »
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 17419
    • View Profile
Re: API request thread (please read OP before posting!)
« Reply #432 on: December 22, 2020, 10:54:48 AM »

Re: last two posts here - please take a look at the OP! This thread is not for suggesting new features; those should go in the suggestions subforum. This thread is purely for "things that already exist in the core code but aren't accessible via the API".
Logged

Tuv0x

  • Ensign
  • *
  • Posts: 10
    • View Profile
Re: API request thread (please read OP before posting!)
« Reply #433 on: December 25, 2020, 10:54:52 PM »

Re: last two posts here - please take a look at the OP! This thread is not for suggesting new features; those should go in the suggestions sub-forum. This thread is purely for "things that already exist in the core code but aren't accessible via the API".

I'm not entirely sure which part of my post is a new feature. The game already has tri-pad menus that have scrollable tabs and side menus (intel and command screens). I'm mainly asking that we can call up the drawing of the tri-pad window, as well as whatever functionality is in the actual content window.

The checkboxes (settings/help tips), and text inputs (character creation text boxes, faction creation text boxes) are also in the game, we just can't make them without doing all the LWJGL work to emulate them. I'll admit, multi-line text boxes don't exist currently, from what I can remember.

I don't mean to argue, just think I didn't communicate it properly.

SirHartley

  • Captain
  • ****
  • Posts: 294
    • View Profile
Re: API request thread (please read OP before posting!)
« Reply #434 on: December 30, 2020, 08:16:00 AM »

request to change
Code: java
protected void demand()
in com.fs.starfarer.api.impl.campaign.econ.impl.BaseIndustry to public.
Logged
Pages: 1 ... 27 28 [29] 30