Fractal Softworks Forum

Please login or register.

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

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

Sproginator

  • Admiral
  • *****
  • Posts: 3592
  • Forum Ancient
    • View Profile
Re: API request
« Reply #60 on: January 04, 2013, 11:35:36 AM »

ShipAPI:
  • List getDrones()
  • ShipAPI getDroneSource()

I think we are missing something like the above two methods for dealing with drones.

Sprog's suggestion thread makes me think a get/setOutlivesSource(boolean) would be useful for drones as well.
And a DroneAPI getDroneSpeed()
And DroneAPI setDroneSpeed()

This would also be useful in weapons API  to create launchable mines that hold position after a certain time
« Last Edit: January 04, 2013, 11:41:06 AM by sproginator »
Logged
A person who's never made a mistake, never tried anything new
- Albert Einstein

As long as we don't quit, we haven't failed
- Jamie Fristrom (Programmer for Spiderman2 & Lead Developer for Energy Hook)

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24113
    • View Profile
Re: API request
« Reply #61 on: January 04, 2013, 01:08:24 PM »

Cherry-picked the easy stuff:

List<ShipAPI> getDeployedDrones();
ShipAPI getDroneSource();

getIndex() is the same as doing getDeployedDrones().indexOf(drone). Yes, this means the index of a drone could change during its lifetime.


(@sproginator: you can already do all this with the MutableShipStatsAPI)
Logged

Sproginator

  • Admiral
  • *****
  • Posts: 3592
  • Forum Ancient
    • View Profile
Re: API request
« Reply #62 on: January 04, 2013, 02:37:21 PM »

Cherry-picked the easy stuff:

List<ShipAPI> getDeployedDrones();
ShipAPI getDroneSource();

getIndex() is the same as doing getDeployedDrones().indexOf(drone). Yes, this means the index of a drone could change during its lifetime.


(@sproginator: you can already do all this with the MutableShipStatsAPI)
Okay, very many thanks, gonna have to see about implementing this into a mod :)
Logged
A person who's never made a mistake, never tried anything new
- Albert Einstein

As long as we don't quit, we haven't failed
- Jamie Fristrom (Programmer for Spiderman2 & Lead Developer for Energy Hook)

Sproginator

  • Admiral
  • *****
  • Posts: 3592
  • Forum Ancient
    • View Profile
Re: API request
« Reply #63 on: January 04, 2013, 02:42:29 PM »

Lazy, do you mind mentoring me in integrating Apis from starfarer into JavaScript code, when I get a pc that is
Logged
A person who's never made a mistake, never tried anything new
- Albert Einstein

As long as we don't quit, we haven't failed
- Jamie Fristrom (Programmer for Spiderman2 & Lead Developer for Energy Hook)

LazyWizard

  • Global Moderator
  • Admiral
  • *****
  • Posts: 1365
    • View Profile
    • GitHub Profile
Re: API request
« Reply #64 on: January 15, 2013, 06:35:02 PM »

LocationAPI:
  • List getSpawnPoints()
  • void removeSpawnPoint(SpawnPointPlugin point)

It would also be nice if there was an equivalent to EveryFrameCombatPlugin for campaigns instead of being limited to using spawn points. This would allow us to create utility mods that don't cause problems when untagged in the launcher. :)

Lazy, do you mind mentoring me in integrating Apis from starfarer into JavaScript code, when I get a pc that is

Sorry, I didn't notice your reply. JavaScript has very little to do with Java other than the name, so creating mods in it wouldn't be possible. Sorry again. :)
Logged

Sproginator

  • Admiral
  • *****
  • Posts: 3592
  • Forum Ancient
    • View Profile
Re: API request
« Reply #65 on: January 16, 2013, 02:21:55 AM »

Ah well, Guess it's another language to learn then :)
Logged
A person who's never made a mistake, never tried anything new
- Albert Einstein

As long as we don't quit, we haven't failed
- Jamie Fristrom (Programmer for Spiderman2 & Lead Developer for Energy Hook)

LazyWizard

  • Global Moderator
  • Admiral
  • *****
  • Posts: 1365
    • View Profile
    • GitHub Profile
Re: API request
« Reply #66 on: January 16, 2013, 08:37:25 AM »

StarSystemAPI:
  • removePlanet(SectorEntityToken planet)
  • removeOrbitalStation(SectorEntityToken station)
  • removeAsteroid(SectorEntityToken asteroid)
  • removeFleet(CampaignFleetAPI fleet)
« Last Edit: January 16, 2013, 08:54:28 AM by LazyWizard »
Logged

EnderNerdcore

  • Commander
  • ***
  • Posts: 172
    • View Profile
Re: API request
« Reply #67 on: January 16, 2013, 10:41:17 AM »

MutableShipStatsAPI getCrew() would be nice (returns an int)

Along with setCrew(int) (or another way to change how many crew are active on the ship)


Also some sort of setTarget(entity) would be very handy for AI scripting.

MutableShipStatsAPI getSightRange() also handy.

« Last Edit: January 16, 2013, 10:48:14 AM by EnderNerdcore »
Logged

LazyWizard

  • Global Moderator
  • Admiral
  • *****
  • Posts: 1365
    • View Profile
    • GitHub Profile
Re: API request
« Reply #68 on: January 19, 2013, 11:23:18 PM »

I think the following would be very helpful for procedural sector generation:

SectorEntityToken:
  • float getRadius()

OrbitAPI:
  • float getRadius()
  • float getSpeed()
  • float getAngle()
« Last Edit: January 19, 2013, 11:27:38 PM by LazyWizard »
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24113
    • View Profile
Re: API request
« Reply #69 on: January 20, 2013, 09:24:53 AM »

Just wanted to say I'm still keeping an eye on this thread and haven't forgotten about it. Thank you for the suggestions (really, pointing out things that are missing!). I'll definitely go through this thread in detail before the next release, or perhaps sooner.
Logged

Wyvern

  • Admiral
  • *****
  • Posts: 3803
    • View Profile
Re: API request
« Reply #70 on: January 20, 2013, 10:27:35 PM »

I'd like to request some way to programatically get at the details of a given variant or otherwise edit the loadout of an individual ship.  My current project - a mod that introduces a single onslaught that scales up in power every time it's killed - has so far required me to generate 23 distinct onslaught variants, start work on a program to extract variants from save files (because that's the only practical way to make sure I have variants that are legal at an arbitrary skill level), and I'm only just now getting to the really interesting ones.

I'd much prefer if I could simply deal with this in code; in addition to being easier to work with, this would also allow me to somewhat randomize the ship's weapons, so you wouldn't know, for example, that the third time you fight the onslaught, it will always mount Sabot SRM Pods.

(As an aside, if this isn't coming soon, does anyone happen to know if there's a way to make a variant not show up in the codex?  I'd rather the player not be able to just browse through all the individual possibilities.)
Logged
Wyvern is 100% correct about the math.

Sproginator

  • Admiral
  • *****
  • Posts: 3592
  • Forum Ancient
    • View Profile
Re: API request
« Reply #71 on: January 21, 2013, 12:29:30 AM »

I'd like to request some way to programatically get at the details of a given variant or otherwise edit the loadout of an individual ship.  My current project - a mod that introduces a single onslaught that scales up in power every time it's killed - has so far required me to generate 23 distinct onslaught variants, start work on a program to extract variants from save files (because that's the only practical way to make sure I have variants that are legal at an arbitrary skill level), and I'm only just now getting to the really interesting ones.

I'd much prefer if I could simply deal with this in code; in addition to being easier to work with, this would also allow me to somewhat randomize the ship's weapons, so you wouldn't know, for example, that the third time you fight the onslaught, it will always mount Sabot SRM Pods.

(As an aside, if this isn't coming soon, does anyone happen to know if there's a way to make a variant not show up in the codex?  I'd rather the player not be able to just browse through all the individual possibilities.)
This concept sounds intriguing indeed, keep me posted :D
Logged
A person who's never made a mistake, never tried anything new
- Albert Einstein

As long as we don't quit, we haven't failed
- Jamie Fristrom (Programmer for Spiderman2 & Lead Developer for Energy Hook)

LazyWizard

  • Global Moderator
  • Admiral
  • *****
  • Posts: 1365
    • View Profile
    • GitHub Profile
Re: API request
« Reply #72 on: February 02, 2013, 02:01:53 PM »

SectorEntityToken:
  • FactionAPI getFaction()
Logged

LazyWizard

  • Global Moderator
  • Admiral
  • *****
  • Posts: 1365
    • View Profile
    • GitHub Profile
Re: API request
« Reply #73 on: February 07, 2013, 11:39:01 AM »

MutableCharacterStatsAPI:
  • int getLevel()
  • long getXP()
  • List<String> getAptitudeIds()
  • List<String> getSkillIds()
« Last Edit: February 07, 2013, 12:12:19 PM by LazyWizard »
Logged

LazyWizard

  • Global Moderator
  • Admiral
  • *****
  • Posts: 1365
    • View Profile
    • GitHub Profile
Re: API request
« Reply #74 on: February 07, 2013, 01:47:58 PM »

We could also use a class that allows us to retrieve the various one-implementation-only plugins. Something like this:

PluginData:
  • FogOfWarPlugin getFogOfWarPlugin()
  • FleetPointsFromBattleObjectivesPlugin getFleetPointsFromBattleObjectivesPlugin()
  • BattleObjectivesEffectsPlugin getBattleObjectivesEffectsPlugin()
  • BattleCreationPlugin getBattleCreationPlugin()
  • CharacterCreationPlugin getCharacterCreationPlugin()
  • List<EveryFrameCombatPlugin> getEveryFrameCombatPlugins()
Logged
Pages: 1 ... 3 4 [5] 6 7 ... 42