Fractal Softworks Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

Starsector 0.97a is out! (02/02/24); New blog post: Simulator Enhancements (03/13/24)

Author Topic: API Issues  (Read 3018 times)

XMod

  • Ensign
  • *
  • Posts: 8
    • View Profile
API Issues
« on: November 04, 2014, 09:38:57 AM »

InteractionDialogPlugin not compiled(need to update JANINO)

functions CombatEntityAPI (get/set Hitpoints, get/set MaxHitpoints, getHullLevel) do not work with asteroids

In shipsystems drone configs targetPriority not support asteroids

addFloatingDamageText near messages are superimposed(uncomfortable reading)
« Last Edit: November 04, 2014, 09:48:04 AM by XMod »
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 23988
    • View Profile
Re: API Issues
« Reply #1 on: November 04, 2014, 09:53:22 AM »

functions CombatEntityAPI (get/set Hitpoints, get/set MaxHitpoints, getHullLevel) do not work with asteroids

Thank you - fixed.

InteractionDialogPlugin not compiled(need to update JANINO)

Can you clarify? InteractionDialogPlugin is part of the starfarer.api.jar, so it's definitely compiled - I don't quite get what you're saying.


In shipsystems drone configs targetPriority not support asteroids

addFloatingDamageText near messages are superimposed(uncomfortable reading)

Not bugs, more like feature limitations.
Logged

XMod

  • Ensign
  • *
  • Posts: 8
    • View Profile
Re: API Issues
« Reply #2 on: November 04, 2014, 10:05:44 AM »

my class
public class AsteroidInteractionDialogPluginImpl implements InteractionDialogPlugin

problem with
public Map<String, MemoryAPI> getMemoryMap()

with JANINO 2.7.6 all ok.

I know what superimposed in addFloatingDamageText this is not a bug. it just clutters.
« Last Edit: November 04, 2014, 10:28:12 AM by XMod »
Logged

Debido

  • Admiral
  • *****
  • Posts: 1183
    • View Profile
Re: API Issues
« Reply #3 on: November 04, 2014, 10:09:36 AM »

XMod, are you using generics in your own custom InteractionDialogPlugin?
Logged

XMod

  • Ensign
  • *
  • Posts: 8
    • View Profile
Re: API Issues
« Reply #4 on: November 04, 2014, 10:12:12 AM »

XMod, are you using generics in your own custom InteractionDialogPlugin?

no. but in the latest version JANINO it possible

public Map<String, MemoryAPI> getMemoryMap() is part starsector API
Logged

Debido

  • Admiral
  • *****
  • Posts: 1183
    • View Profile
Re: API Issues
« Reply #5 on: November 04, 2014, 10:33:46 AM »

Well forget Janino, use a compiled JAR format. Use something like Eclipse, Netbeans etc. to edit and modify your code and compile it. AFAIK SS's current Janino does not support generics.

To use compiled JAR files, you'll need to edit your mod_info file with a line like this:

   "jars":["jars/my_code.jar"],

Using other an external IDE/compiler you can also hot update your code, and debug it on the fly. I highly recommend going down that path rather than relying on Janino to compile your code.
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 23988
    • View Profile
Re: API Issues
« Reply #6 on: November 04, 2014, 10:57:20 AM »

Yeah, I would agree with switching to using jar files. I'd like to update to a new version of Janino at some point, but it's not very high-priority, given that compiling stuff to a jar is ultimately going to make developing easier...
Logged

XMod

  • Ensign
  • *
  • Posts: 8
    • View Profile
Re: API Issues
« Reply #7 on: November 04, 2014, 11:05:38 AM »

I think update JANINO not a problem. I have it for 5 minutes did. :)
in Notepad, I write much better than Eclipse, Netbeans
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 23988
    • View Profile
Re: API Issues
« Reply #8 on: November 04, 2014, 11:12:55 AM »

I'd have to do some testing, though - the version the game currently ships with is custom with a patch for a compilation bug that shows up under some relatively rare conditions, and I don't know if that's actually fixed in the latest version. I *think* it is, but I don't know. Not a super huge deal, but more than 5 minutes to verify :)
Logged

XMod

  • Ensign
  • *
  • Posts: 8
    • View Profile
Re: API Issues
« Reply #9 on: November 04, 2014, 11:24:33 AM »

I did not find an API method, to get the target, chosen player during the battle.

There is a way to allow the player to choose the asteroid in a battle?

I *think* it is, but I don't know. Not a super huge deal, but more than 5 minutes to verify :)

Agree. I am an experienced developer and know that stuff can happen
« Last Edit: November 04, 2014, 11:54:49 AM by XMod »
Logged

Dark.Revenant

  • Admiral
  • *****
  • Posts: 2806
    • View Profile
    • Sc2Mafia
Re: API Issues
« Reply #10 on: November 04, 2014, 12:14:35 PM »

in Notepad, I write much better than Eclipse, Netbeans

How is that even possible? Eclipse and Netbeans are basically Notepad plus helpful features.  They take literally nothing away from Notepad's functionality.
Logged

XMod

  • Ensign
  • *
  • Posts: 8
    • View Profile
Re: API Issues
« Reply #11 on: November 04, 2014, 12:18:23 PM »

in Notepad, I write much better than Eclipse, Netbeans

How is that even possible? Eclipse and Netbeans are basically Notepad plus helpful features.  They take literally nothing away from Notepad's functionality.

Until i not need some extra features.
« Last Edit: November 04, 2014, 12:21:43 PM by XMod »
Logged