Fractal Softworks Forum

Please login or register.

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

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

SafariJohn

  • Admiral
  • *****
  • Posts: 3021
    • View Profile
Re: API request thread (please read OP before posting!)
« Reply #405 on: January 22, 2020, 05:35:26 PM »

OptionsPanelAPI.setSortOrder(Object data, int order) would be handy for mixing options set in code with options from the rules.csv.

EDIT: It would be nice if we could set an option's color in the csv. Whether by a command or inline when the option is created.
« Last Edit: January 30, 2020, 03:07:57 PM by SafariJohn »
Logged

tomatopaste

  • Captain
  • ****
  • Posts: 306
    • View Profile
Re: API request thread (please read OP before posting!)
« Reply #406 on: February 10, 2020, 05:05:39 AM »

boolean DroneLauncherShipSystemAPI.isInHoldingPattern() would be really useful to avoid a workaround I've been using for the DRONE_LAUNCHER shipsystem type (this is even displayed as a status for player ship on the HUD so it's annoying that it can't be gotten in code...) thanks :)
Logged

AxleMC131

  • Admiral
  • *****
  • Posts: 1722
  • Amateur World-Builder
    • View Profile
Re: API request thread (please read OP before posting!)
« Reply #407 on: February 10, 2020, 09:09:09 PM »

boolean DroneLauncherShipSystemAPI.isInHoldingPattern() would be really useful to avoid a workaround I've been using for the DRONE_LAUNCHER shipsystem type (this is even displayed as a status for player ship on the HUD so it's annoying that it can't be gotten in code...) thanks :)

I think you're looking for something too specific. Look in DroneLauncherShipSystemAPI.java again and you'll see exactly what you need already there.

Code
	public static enum DroneOrders {
RECALL,
DEPLOY,
ATTACK,
}

        ...

DroneLauncherShipSystemAPI.DroneOrders getDroneOrders();
Logged

Originem

  • Purple Principle
  • Captain
  • ****
  • Posts: 430
  • Dancing like a boss.
    • View Profile
Re: API request thread (please read OP before posting!)
« Reply #408 on: February 25, 2020, 07:44:42 AM »

There is no weaponSpec.setWeaponName()...
Also needs setString(catogory,id)
setSetting...
Logged
My mods


SafariJohn

  • Admiral
  • *****
  • Posts: 3021
    • View Profile
Re: API request thread (please read OP before posting!)
« Reply #409 on: March 07, 2020, 06:42:30 AM »

Naming constellations is difficult to figure out because NamePick is convoluted. Also, it would be nice if we had more control over the name and label. I'd like to see:

setNameOverride(String) // Set the constellation's name directly, bypassing the NamePick stuff and blocking addition of "constellation"/"nebula" in various places
setColorOverride(Color) // The color of the name label
setAngleOverride(float) // The angle of the name label
Logged

AxleMC131

  • Admiral
  • *****
  • Posts: 1722
  • Amateur World-Builder
    • View Profile
Re: API request thread (please read OP before posting!)
« Reply #410 on: April 16, 2020, 10:12:48 PM »

This isn't so much a suggestion and more of a query.

In an unrelated discussion in the Unofficial Discord, it came to my knowledge that the Ion Beam and Tachyon Lance have slightly different on-hit beam effects. Fine, they're different weapon formats, but while playing "spot the difference" I noticed something odd:

Code
float emp = beam.getDamage().getFluxComponent() * 1f;
float dam = beam.getDamage().getDamage() * 1f;
Code
float emp = beam.getWeapon().getDamage().getFluxComponent() * 0.5f;
float dam = beam.getWeapon().getDamage().getDamage() * 0.25f;
These are the bits that choose the damage values for the EMP arcs both weapons can generate (Ion Beam above, Tachyon Lance below). Fine, the multipliers are different, but what is the difference between these?

Code
beam.getWeapon().getDamage()...
beam.getDamage()...
I looked in the API, and both the WeaponAPI and BeamAPI have this "getDamage()" method to the DamageAPI, while BeamAPI also has the "getWeapon()" method to get a WeaponAPI. Here, the Ion Beam goes straight from the BeamAPI to the damage instance, but the Tachyon Lance takes a detour through its WeaponAPI to achieve the same thing.

What is the significance of this? Is there any reason to use one format over the other? All I can think of is that one is a burst beam and one is a sustained beam, does that cause a difference in what is handled by the DamageAPI?
Logged

SirHartley

  • Global Moderator
  • Admiral
  • *****
  • Posts: 840
    • View Profile
Re: API request thread (please read OP before posting!)
« Reply #411 on: April 28, 2020, 04:46:16 AM »

I'd like to request a public method in BaseIndustry that allows for modification of the current build progress via
Code
protected float buildProgress
Logged

SafariJohn

  • Admiral
  • *****
  • Posts: 3021
    • View Profile
Re: API request thread (please read OP before posting!)
« Reply #412 on: April 28, 2020, 06:13:01 AM »

You mean you want to be able to modify it from an outside script? Because you can already modify it in a subclass a la PopulationAndInfrastructure.

If you do want to use an outside script and only want to affect your own industries, then you can expose buildProgress yourself in your subclasses.
Logged

SirHartley

  • Global Moderator
  • Admiral
  • *****
  • Posts: 840
    • View Profile
Re: API request thread (please read OP before posting!)
« Reply #413 on: April 28, 2020, 01:10:11 PM »

You mean you want to be able to modify it from an outside script? Because you can already modify it in a subclass a la PopulationAndInfrastructure.

If you do want to use an outside script and only want to affect your own industries, then you can expose buildProgress yourself in your subclasses.

I would like to modify the build progress of vanilla baseIndustry subclasses without adjusting code in them - not currently possible as I'd have to add a method to modify buildProgress, as you correctly noted, in the subclass itself.
What I am asking for is essentially a public method to modify build progress in any baseIndustry subclass.

(I can't accelerate the build progress of Light Industry by 10 days if a special condition is met without implementing my own LI industry class)
Logged

SonnaBanana

  • Admiral
  • *****
  • Posts: 868
    • View Profile
Re: API request thread (please read OP before posting!)
« Reply #414 on: May 27, 2020, 04:59:17 AM »

Will there be a method for acquiring the number of purchased skills in an aptitude, next release?
Logged
I'm not going to check but you should feel bad :( - Alex

bananana

  • Commander
  • ***
  • Posts: 228
    • View Profile
Re: API request thread (please read OP before posting!)
« Reply #415 on: May 31, 2020, 02:58:48 AM »

would be nice to
Code
weapon.getGlowSprite();
like we can do with main and barrel sprites. for consistency sake, if nothing else.
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.

Caymon Joestar

  • Commander
  • ***
  • Posts: 115
    • View Profile
Re: API request thread (please read OP before posting!)
« Reply #416 on: June 08, 2020, 01:13:20 AM »

Not sure if this is technically api related but can the no sell tag be made to be useable on ships in the ship_data csv? Feels something that would be present with unboardable ships. Also allows for modders to be able to add ships that they don't want the player to get their hands on through the market.
Logged

Morrokain

  • Admiral
  • *****
  • Posts: 2143
  • Megalith Dreadnought - Archean Order
    • View Profile
Re: API request thread (please read OP before posting!)
« Reply #417 on: July 15, 2020, 08:44:38 PM »

Some nice to haves:

Decouple fighter refit times and replacement rate regen time:

-MutableShipStatsAPI.getFighterRefitTime() (no longer increases the rate that replacement rate replenishes - purely affects fighter replacement times)

-MutableShipStatsAPI.getReplacementRateRefillMult() (modifies the replenishment rate of the fighter replacement rate for carriers)

and:

-MutableShipStatsAPI.getReplacementRateCap()

-MutableShipStatsAPI.getReplacementRateMin()
Logged

MesoTroniK

  • Admiral
  • *****
  • Posts: 1731
  • I am going to destroy your ships
    • View Profile
Re: API request thread (please read OP before posting!)
« Reply #418 on: July 16, 2020, 02:39:19 AM »

Some nice to haves for advanced scripted sound player ***:
- getSoundVolume()
- getMusicVolume()
- setSoundVolume()
- setMusicVolume()
- getMaxSoundChannels()
- getMaxUISoundChannels()
- getCurrentUsedSoundChannels()
- getCurrentUsedUISoundChannels()
- Anything I am overlooking?

Possible use case contexts:
- Direct playing very special sounds with OpenAL skipping the middle man (SS itself) for custom effects like doppler.
- Temporarily suppressing music and other sounds for things like scripted "cutscenes" during quests.
- God knows what else...
« Last Edit: July 16, 2020, 04:38:53 AM by MesoTroniK »
Logged

MShadowy

  • Admiral
  • *****
  • Posts: 911
    • View Profile
Re: API request thread (please read OP before posting!)
« Reply #419 on: July 16, 2020, 10:43:18 AM »

I believe it's come up before but it would be pretty handy for WeaponAPI to have:

- setAmmoPerSecond()

Also potentially useful, though not specifically for anything I'd need:

- getReloadSize()
- setReloadSize()
Logged
Pages: 1 ... 26 27 [28] 29 30 ... 42