Fractal Softworks Forum

Please login or register.

Login with username, password and session length
Pages: 1 ... 5 6 [7] 8 9 ... 42

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

MShadowy

  • Admiral
  • *****
  • Posts: 911
    • View Profile
Re: API request
« Reply #90 on: April 09, 2013, 08:06:47 PM »

If this is already possible through some other method, I apologize, but it seems like it might be kinda handy for certain purposes.

DamagingProjectileAPI and MissileAPI:
  • AnimationAPI getAnimation()

Additionally, would it be possible to set up an API allowing modders to create some custom effects, such as different explosions?
« Last Edit: April 10, 2013, 07:21:10 AM by MShadowy »
Logged

ValkyriaL

  • Admiral
  • *****
  • Posts: 2145
  • The Guru of Capital Ships.
    • View Profile
Re: API request
« Reply #91 on: April 10, 2013, 06:58:33 AM »

I would love some way to increase the image size for portraits beyond 128x128, i have some juicy images that gets ruined if i scale them down that much.
Logged

LazyWizard

  • Global Moderator
  • Admiral
  • *****
  • Posts: 1365
    • View Profile
    • GitHub Profile
Re: API request
« Reply #92 on: April 10, 2013, 07:20:15 AM »

CombatFleetManagerAPI:
  • AssignmentTargetAPI createAssignmentTarget(Object target)
  • AssignmentInfo createAssignment(CombatAssignmentType type, AssignmentTargetAPI target)
  • void setAssignmentFor(ShipAPI ship, AssignmentInfo assignment)
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24113
    • View Profile
Re: API request
« Reply #93 on: April 10, 2013, 08:48:27 AM »

EngineAPI:
  • boolean isActive()
  • float getThrustLevel() // Current thrust level, normalized between 0 and 1
  • boolean isDisabled()
  • float getDisabledTime()
  • boolean isSpecialEngine() // For things like maneuvering jets

ShipAPI:
  • List<EngineAPI> getEngines()

MissileAPI:
  • EngineAPI getEngine()


Also, certain enums like CollisionClass and WeaponType are exposed in the current API, but others are not. Could the remaining enums like TextureType, BarrelMode, RenderHints, AnimationType and other weapon/ship tags be included in the API as well?

These ought to be simple enough.


If this is already possible through some other method, I apologize, but it seems like it might be kinda handy for certain purposes.

DamagingProjectileAPI and MissileAPI:
  • AnimationAPI getAnimation()

Additionally, would it be possible to set up an API allowing modders to create some custom effects, such as different explosions?

Well - animated projectiles aren't supported by the engine, and it's not something I could just hack in easily. About the only way I'd really give it a go is if something new in the base game required it; adding features for mod-use-only tends to be a pretty big pain because it's hard to adequately test them and ensure they keep working going forward.


As for custom effects, that should already be possible. You just have to use the OnHitPlugin to spawn whatever you like, at least to the extent that the CombatEngineAPI allows it (addHitParticle, addSmokeParticle, spawnExplosion, etc).


I would love some way to increase the image size for portraits beyond 128x128, i have some juicy images that gets ruined if i scale them down that much.

I'm pretty sure portraits can already be any size. The game will scale them to whatever size they need to be used at.


CombatFleetManagerAPI:
  • AssignmentTargetAPI createAssignmentTarget(Object target)
  • AssignmentInfo createAssignment(CombatAssignmentType type, AssignmentTargetAPI target)
  • void setAssignmentFor(ShipAPI ship, AssignmentInfo assignment)

The fleet AI will likely get totally overhauled at some point. I'll take a look, though.


General note:
This thread is intended for requests to expose via API things the game already does, not for adding new features. In other words, for things that are missing from the API itself, not for things that are not in the game to begin with. Those should go in the suggestion forum, not in this thread.
Logged

silentstormpt

  • Admiral
  • *****
  • Posts: 1060
    • View Profile
Re: API request
« Reply #94 on: April 17, 2013, 07:50:36 AM »

AnimationAPI

List setFrameList<> (example, i got 40 frames, but by using a pluggin, i can set only the first 10 frames to .play() and .reset()
Logged

PCCL

  • Admiral
  • *****
  • Posts: 2016
  • still gunnyfreak
    • View Profile
Re: API request
« Reply #95 on: April 18, 2013, 09:52:52 PM »

CombatEntityAPI:
      void setVelocity(vector2f velocity);
Logged
mmm.... tartiflette

LazyWizard

  • Global Moderator
  • Admiral
  • *****
  • Posts: 1365
    • View Profile
    • GitHub Profile
Re: API request
« Reply #96 on: April 19, 2013, 12:29:20 AM »

CombatEntityApi
-SetLocation
-setVelocity

Not necessary - getLocation() and getVelocity() return an Object, not a primitive type, so you can modify the returned Vector2f and have your effects show up in game (as long as you use location.set(x,y) instead of location = new Vector2f(x, y), since the latter will create a new object and lose the reference).
Logged

PCCL

  • Admiral
  • *****
  • Posts: 2016
  • still gunnyfreak
    • View Profile
Re: API request
« Reply #97 on: April 19, 2013, 12:44:06 AM »

ooh....

well then, I gotta try that

thanks LW ;D
Logged
mmm.... tartiflette

Okim

  • Admiral
  • *****
  • Posts: 2161
    • View Profile
    • Okim`s Modelling stuff
Re: API request
« Reply #98 on: April 19, 2013, 01:00:23 AM »

I`d like to request these new mutables:

- energy damage received
- kinetic damage received
- explosive damage received
- beam damage received
- missile damage received
- projectile damage received

I have some hull mods in my mind that would suck some percentage of one of the listed damage types making the other types do some extra damage. Those are mainly for larger ships, for Rock Fly and for 'AI' faction in Ironclads.

For example - energy absorbing coating that reduces energy damage taken by 25%, but makes explosive and kinetic weapons do extra 10% damage.

Or reactive armour that shrugs off 25% of missile and projectile damage, but is vulnerable to beam weapons. Etc.

What about these? They seem to be the 'things that are missing from the API itself'. At least first three about damage types.

LazyWizard

  • Global Moderator
  • Admiral
  • *****
  • Posts: 1365
    • View Profile
    • GitHub Profile
Re: API request
« Reply #99 on: April 19, 2013, 11:30:14 AM »

CombatEngineAPI:
  • float getElapsedCombatTime(boolean includePaused)

Just a simple one this time. :)
Logged

LazyWizard

  • Global Moderator
  • Admiral
  • *****
  • Posts: 1365
    • View Profile
    • GitHub Profile
Re: API request
« Reply #100 on: April 21, 2013, 12:32:58 PM »

CombatEngineAPI:
  • float getTimeSinceLastFrame()

This would be useful for the situations where the interface you're working with doesn't have an advance(float amount) method, such as when making custom shipsystems.
Logged

PCCL

  • Admiral
  • *****
  • Posts: 2016
  • still gunnyfreak
    • View Profile
Re: API request
« Reply #101 on: April 23, 2013, 10:41:15 PM »

can we have something of an EngineAPI? (actual engines, like, the thrusters on the ships)

some functions could include (the ones I would find useful)
-getLocation
-getType (midline, hightech, lowtech)
-setType (could be pretty useful, not sure if that's easy to do though)
-boolean isDisabled
-boolean isActive
-setState (boolean active) so setState(true) will turn the engine on etc.

again, sorry if this is already in, can't find it anywhere though
Logged
mmm.... tartiflette

LazyWizard

  • Global Moderator
  • Admiral
  • *****
  • Posts: 1365
    • View Profile
    • GitHub Profile
Re: API request
« Reply #102 on: April 26, 2013, 05:15:17 PM »

DamagingProjectileAPI:
  • boolean isFading()
Logged

Zaphide

  • Admiral
  • *****
  • Posts: 799
    • View Profile
Re: API request
« Reply #103 on: May 03, 2013, 06:40:29 PM »

Not sure if these have been asked (or are available already in some form) but:

SectorEntityToken
 - String getOwner()
 - void setOwner() // Exists already but could it also change the owner color ring of a station? At the moment the color only seems to change on save/reload

FactionAPI
 - String getFullName()

MutableShipStatsAPI
 - int getTotalOrdanancePoints()
 - int getUsedOrdanancePoints()

Thanks :)
Logged

MShadowy

  • Admiral
  • *****
  • Posts: 911
    • View Profile
Re: API request
« Reply #104 on: May 04, 2013, 06:20:31 PM »

Would this be possible to add?

IntervalUtil:
  • void resetInterval()

Thanks for your time.
Logged
Pages: 1 ... 5 6 [7] 8 9 ... 42