Fractal Softworks Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

Starsector 0.98a is out! (03/27/25)

Pages: 1 ... 15 16 [17] 18 19 ... 45

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

Tartiflette

  • Admiral
  • *****
  • Posts: 3529
  • MagicLab discord: https://discord.gg/EVQZaD3naU
    • View Profile
Re: API request thread (please read OP before posting!)
« Reply #240 on: October 01, 2014, 11:57:54 AM »

Thanks a lot for all your efforts!

 *yay, new ways to break the gameplay incoming!* ;D
Logged
 

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 25935
    • View Profile
Logged

Debido

  • Admiral
  • *****
  • Posts: 1183
    • View Profile
Re: API request thread (please read OP before posting!)
« Reply #243 on: October 01, 2014, 10:04:01 PM »

I'm a little confused on DamageAPI.getStats() returning a MutableShipStatsAPI. Is this a per-weapon mutable stats like requested here: http://fractalsoftworks.com/forum/index.php?topic=8239.0

Or is this MutableShipStatsAPI being returned for the ShipAPI of the host ship?
Logged

Debido

  • Admiral
  • *****
  • Posts: 1183
    • View Profile
Re: API request thread (please read OP before posting!)
« Reply #244 on: October 02, 2014, 01:34:42 AM »

Ok Alex, this is a REALLY strange API request. You don't have to do it, but we were recently discussing complete asshats who pirate the game. We were wondering if there could be say a

boolean Global.isPirated()

And so modders can troll the heck out of people pirating the game, and force them to ask for you mercy, and pay you for the game. We were thinking of spawning the Alexander Mosolov fleet with a 1000 pirate ships to hunt their little fleet down and crush them.

Please?
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 25935
    • View Profile
Re: API request thread (please read OP before posting!)
« Reply #245 on: October 02, 2014, 08:48:24 AM »

I'm a little confused on DamageAPI.getStats() returning a MutableShipStatsAPI. Is this a per-weapon mutable stats like requested here: http://fractalsoftworks.com/forum/index.php?topic=8239.0

Or is this MutableShipStatsAPI being returned for the ShipAPI of the host ship?

It's the ship's stats. I did see that request, but I think it could be a bit heavy performance wise, never mind not simple at all since that's not how the engine is set up.


Ok Alex, this is a REALLY strange API request. You don't have to do it, but we were recently discussing complete asshats who pirate the game. We were wondering if there could be say a

boolean Global.isPirated()

And so modders can troll the heck out of people pirating the game, and force them to ask for you mercy, and pay you for the game. We were thinking of spawning the Alexander Mosolov fleet with a 1000 pirate ships to hunt their little fleet down and crush them.

Please?

Erm... this would be the fastest way to get whoever hacks the game to also fix the "isPirated" method. All in all, I'd rather not even discuss it in any detail.
Logged

Debido

  • Admiral
  • *****
  • Posts: 1183
    • View Profile
Re: API request thread (please read OP before posting!)
« Reply #246 on: October 02, 2014, 09:17:05 AM »

Ah ok, fair enough Alex. I can understand why it might be a bit performance heavy to have mutablestats per weapon, I did discuss that possibility with a couple of the other guys that something like that might be the case.

As for the other request, we just wanted to support you and fight the good fight against those insidious pirates!
Logged

ValkyriaL

  • Admiral
  • *****
  • Posts: 2145
  • The Guru of Capital Ships.
    • View Profile
Re: API request thread (please read OP before posting!)
« Reply #247 on: October 02, 2014, 09:23:37 AM »

ask for production key the first time the game starts..but that would probably be fairly easy to remove..
Logged

Debido

  • Admiral
  • *****
  • Posts: 1183
    • View Profile
Re: API request thread (please read OP before posting!)
« Reply #248 on: October 05, 2014, 08:53:46 AM »

A couple of other requests for the Weapon API

void WeaponAPI.setTurnRate(float)
void WeaponAPI.setFluxToFire(float)

This will be used to give penalties or a boost to a weapon if, for instance, an Exigency weapon is mounted on a Black Rock ship.
Logged

Debido

  • Admiral
  • *****
  • Posts: 1183
    • View Profile
Re: API request thread (please read OP before posting!)
« Reply #249 on: October 25, 2014, 05:19:56 AM »

List< FleetAssignmentDataAPI> CampaignFleetAPI.getFleetAssignments (plural, all of them)

also

CampaignFleetAPI.prependAssignment(...)

prepends the intended assignment so that it is executed before others.
Logged

Debido

  • Admiral
  • *****
  • Posts: 1183
    • View Profile
Re: API request thread (please read OP before posting!)
« Reply #250 on: October 26, 2014, 11:30:46 AM »

float BeamAPI.getDamagePerSecond()
void BeamAPI.setDamagePerSecond(float)
float BeamAPI.getEMPDamagePerSecond()
void BeamAPI.setEMPDamagePerSecond(float)

use cases:
Dynamic beam weapon damage based upon other values, such as...number of X attributes on Tartiflette's next mining ship he really wants this feature on.
A work around for the autoresolve damage to scripted damage option/issues.

Also an addendum to the Damaging projectile get/set damage for the EMP which was left out
float DamagingProjectileAPI.getEmpDamage()
void DamagingProjectileAPI.setEmpDamage()

« Last Edit: October 26, 2014, 11:33:54 AM by Debido »
Logged

Tartiflette

  • Admiral
  • *****
  • Posts: 3529
  • MagicLab discord: https://discord.gg/EVQZaD3naU
    • View Profile
Re: API request thread (please read OP before posting!)
« Reply #251 on: October 26, 2014, 12:15:21 PM »

Actually I have several beams that could use the BeamAPI additions:
- the Deconstruction beam that ignore armor and directly damage the hull
- the Focus Beam that deal additional damage if the target is near the merging point of it's three beams
- the Minigun that is in fact a beam: it deal very few damage but the impact spawn splinters that can hit the target or very close ships
- the Gamma Ray Radiation Reactor that use 6 fake weapons to enhance it's destructive power, as long as they don't get disabled.

All those weapons works very well in combat but are almost worthless in autoresolve.
Logged
 

celestis

  • Captain
  • ****
  • Posts: 285
    • View Profile
Re: API request thread (please read OP before posting!)
« Reply #252 on: October 30, 2014, 02:47:05 AM »

Is it possible to add more information about entity to HullModEffect.apply method? Currently it has stats parameter, but it returns null for getEntity() since the ship has not yet been created, so we only have ship hull size enum to apply effect.
But I suppose it is not very difficult to pass ShipVariantAPI or at least ShipHullSpecAPI parameter to this method. This will make the script much more flexible. Is it possible?
Proposed method isgnature:

void HullModEffect.applyEffectsBeforeShipCreation(ShipAPI.HullSize hullSize, MutableShipStatsAPI stats, java.lang.String id)
->
void HullModEffect.applyEffectsBeforeShipCreation(ShipAPI.HullSize hullSize, ShipVariantAPI variant, MutableShipStatsAPI stats, java.lang.String id)
Logged

Darloth

  • Admiral
  • *****
  • Posts: 650
    • View Profile
Re: API request thread (please read OP before posting!)
« Reply #253 on: November 01, 2014, 09:58:35 AM »

Would it be possible to have the FleetEncounterContextPlugin overridable like the other Plugin types please?  

Presumably this would also require BattleAutoresolverPluginImpl and FleetInteractionDialogPluginImpl to call a factory method to get their instances of the FleetEncounterContext (or overriding plugin) rather than just newing a concrete instance.

(I'm trying to change what happens immediately after a battle, without changing any of the other stuff.)
Logged

Debido

  • Admiral
  • *****
  • Posts: 1183
    • View Profile
Re: API request thread (please read OP before posting!)
« Reply #254 on: November 01, 2014, 01:30:26 PM »

WeaponAPI.setAutoFireAI(AutofireAIPlugin) so in combat under certain circumstances you can change the AI used.
Logged
Pages: 1 ... 15 16 [17] 18 19 ... 45