Fractal Softworks Forum

Please login or register.

Login with username, password and session length
Pages: 1 ... 21 22 [23] 24 25 ... 42

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

pegwymonie

  • Ensign
  • *
  • Posts: 13
    • View Profile
Re: API request thread (please read OP before posting!)
« Reply #330 on: August 23, 2017, 06:17:19 PM »

I would like to be able to write an event that can react to reputation change, but only for specific reasons.

Currently the api is:

Code
public void reportPlayerReputationChange(String faction, float delta) 

I would like to see something like this:

Code
public void reportPlayerReputationChange(String faction, RepActions action, float delta) 
Logged

xenoargh

  • Admiral
  • *****
  • Posts: 5078
  • naively breaking things!
    • View Profile
Re: API request thread (please read OP before posting!)
« Reply #331 on: August 25, 2017, 09:04:44 AM »

WeaponAPI --> getProjectileSpecAPI(). Returns the MissileAPI / DamagingProjectileAPI the weapon fires, or null if it's a Beam.  

Also...

MissileAPI getEngineSpecs() should return whether a MissileAPI is guided, and the engine's thrust / turn specs.  Right now it's not easy to determine whether a Missile is guided without doing JSON correlations.
Logged
Please check out my SS projects :)
Xeno's Mod Pack

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24114
    • View Profile
Re: API request thread (please read OP before posting!)
« Reply #332 on: August 25, 2017, 09:32:21 AM »

Right now it's not easy to determine whether a Missile is guided without doing JSON correlations.

(You can do: missile.getMissileAI() instanceof GuidedMissileAI)
Logged

Histidine

  • Admiral
  • *****
  • Posts: 4682
    • View Profile
    • GitHub profile
Re: API request thread (please read OP before posting!)
« Reply #333 on: September 16, 2017, 11:11:30 PM »

Requesting change to existing API function: Make FactionAPI.setRelationship() with self a no-op.
I haven't encountered a case where this does anything other than introduce weird bugs when a faction is accidentally made hostile to itself.
Logged

Histidine

  • Admiral
  • *****
  • Posts: 4682
    • View Profile
    • GitHub profile
Re: API request thread (please read OP before posting!)
« Reply #334 on: November 02, 2017, 09:38:49 PM »

void FleetMemberStatusAPI.getHullFraction(int index)

Currently you can set the hull fraction of a module, but not get it.
Logged

Techhead

  • Commander
  • ***
  • Posts: 184
    • View Profile
Re: API request thread (please read OP before posting!)
« Reply #335 on: December 28, 2017, 04:07:38 PM »

A request for a change to hullmods' getUnapplicableReason(): Split off hullmod incompatibility so that hullmods can be made mutually exclusive without needing to modify both files.
Logged

AxleMC131

  • Admiral
  • *****
  • Posts: 1722
  • Amateur World-Builder
    • View Profile
Re: API request thread (please read OP before posting!)
« Reply #336 on: December 28, 2017, 06:34:20 PM »

Just been working on a "recon" type hullmod to make scout/espionage ships, and realised that what would be ideal is a ship stat that affected the time it takes to capture an objective.

Something that I'd hope would be easy enough to stick in the MutableShipStatsAPI file:
Code
getObjectiveCaptureTimeMod()
or similar perhaps?

I reckon it would be perfect for a recon ship that can dash out and capture objectives at an increased rate.
Logged

Ranakastrasz

  • Admiral
  • *****
  • Posts: 702
  • Prince Corwin of Amber
    • View Profile
Re: API request thread (please read OP before posting!)
« Reply #337 on: January 05, 2018, 05:38:49 PM »

Its been a while, so I am not sure exactly which part it is, but..

Take a beam weapon prototype and determine how many beams it generates when it fires. Currently, if you want to calculate the damage a beam weapon does, there is no way to get it accurately for, say, the guardian PD turret.
Logged
I think is easy for Simba and Mufasa sing the Circle of Life when they're on the top of the food chain, I bet the zebras hate that song.

Cigarettes are a lot like hamsters. Perfectly harmless, until you put one in your mouth and light it on fire

NightKev

  • Commander
  • ***
  • Posts: 104
    • View Profile
Re: API request thread (please read OP before posting!)
« Reply #338 on: January 09, 2018, 04:14:52 AM »

A method to do stuff when a hullmod is removed, something like `BaseHullMod.onRemoval(ShipAPI ship)` perhaps?

Edit: More reasonable method name suggestion.
« Last Edit: January 11, 2018, 03:37:27 AM by NightKev »
Logged

FreedomFighter

  • Commander
  • ***
  • Posts: 179
    • View Profile
Re: API request thread (please read OP before posting!)
« Reply #339 on: January 19, 2018, 11:37:59 PM »

Alex hinted me about getting 3 skill choices per officer level but i have no idea how should i write up or compile it into working API.

Code
"officerLevelUp":"com.fs.starfarer.api.impl.campaign.OfficerLevelupPluginImpl"

Been told that this is the one that controlling it but he also hasn't test that if it will work.

http://fractalsoftworks.com/forum/index.php?topic=13222.0

Thread in question.
Logged

TaLaR

  • Admiral
  • *****
  • Posts: 2794
    • View Profile
Re: API request thread (please read OP before posting!)
« Reply #340 on: April 07, 2018, 10:53:55 PM »

com.fs.starfarer.api.combat.ShipSystemAPI
  • float getRange()

Made a mod to visualize ship system ranges only to find out that I have no reasonable way to get range values.
« Last Edit: April 08, 2018, 12:53:06 AM by TaLaR »
Logged

Snrasha

  • Admiral
  • *****
  • Posts: 705
    • View Profile
Re: API request thread (please read OP before posting!)
« Reply #341 on: April 08, 2018, 09:33:26 PM »

com.fs.starfarer.api.combat.ShipSystemAPI
  • float getRange()

Made a mod to visualize ship system ranges only to find out that I have no reasonable way to get range values.

They have so many without a range, so, this is not very usefull, no? :x
Logged
I am pretty bad on english. So, sorry in advance.

Gladiator Society
Add battle options on Com Relay/ Framework for modders for add their own bounty.

Sanguinary Autonomist Defectors A fan-mod of Shadowyard.

TaLaR

  • Admiral
  • *****
  • Posts: 2794
    • View Profile
Re: API request thread (please read OP before posting!)
« Reply #342 on: April 08, 2018, 10:06:15 PM »

They have so many without a range, so, this is not very usefull, no? :x

Some sensible default (0) or extra method boolean hasRange().
Otherwise systemAPI is just not a useful source for info on systems, and makes me look for less desirable workarounds.
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24114
    • View Profile
Re: API request thread (please read OP before posting!)
« Reply #343 on: April 09, 2018, 03:20:22 PM »

com.fs.starfarer.api.combat.ShipSystemAPI
  • float getRange()

(Added a getRange() method to ShipSystemSpecAPI.)
Logged

TaLaR

  • Admiral
  • *****
  • Posts: 2794
    • View Profile
Re: API request thread (please read OP before posting!)
« Reply #344 on: April 10, 2018, 05:52:57 AM »

(Added a getRange() method to ShipSystemSpecAPI.)

Thanks :)
Logged
Pages: 1 ... 21 22 [23] 24 25 ... 42