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: Adding Buff Indicator independent of hull mod or ability  (Read 2232 times)

Ranakastrasz

  • Admiral
  • *****
  • Posts: 702
  • Prince Corwin of Amber
    • View Profile
Adding Buff Indicator independent of hull mod or ability
« on: December 21, 2015, 12:09:05 PM »

How can you do this? All the normal examples are hull abilities, like high energy focus, and apparently hull mods also support it. I can't find anything on how to display it via a script, similar to zero-flux boost.
~
Note that I mean the icon + tooltip, not the stat modification.
Logged
I think is easy for Simba and Mufasa sing the Circle of Life when they're on the top of the food chain, I bet the zebras hate that song.

Cigarettes are a lot like hamsters. Perfectly harmless, until you put one in your mouth and light it on fire

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 23986
    • View Profile
Re: Adding Buff Indicator independent of hull mod or ability
« Reply #1 on: December 21, 2015, 12:49:12 PM »

CombatEngineAPI:

Code: java
	 /**
* In the status list above the left side of the ship info widget in the bottom left.
* @param key
* @param spriteName
* @param title
* @param data
* @param isDebuff
*/
void maintainStatusForPlayerShip(Object key, String spriteName, String title, String data, boolean isDebuff);

(Guessing that by "tooltip" you just mean the couple of words of text next to the icon.)
Logged

Ranakastrasz

  • Admiral
  • *****
  • Posts: 702
  • Prince Corwin of Amber
    • View Profile
Re: Adding Buff Indicator independent of hull mod or ability
« Reply #2 on: December 21, 2015, 01:56:13 PM »

Perfect.

According to the forum search, no-one has ever used that function ever in a post.
Logged
I think is easy for Simba and Mufasa sing the Circle of Life when they're on the top of the food chain, I bet the zebras hate that song.

Cigarettes are a lot like hamsters. Perfectly harmless, until you put one in your mouth and light it on fire

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 23986
    • View Profile
Re: Adding Buff Indicator independent of hull mod or ability
« Reply #3 on: December 21, 2015, 02:03:30 PM »

Not too unlikely, since it only became available after 0.7a :)
Logged

Ranakastrasz

  • Admiral
  • *****
  • Posts: 702
  • Prince Corwin of Amber
    • View Profile
Re: Adding Buff Indicator independent of hull mod or ability
« Reply #4 on: December 21, 2015, 02:31:05 PM »

Heh. That makes sense.

I was going to ask how to remove it, but considering the name of the function, it is pretty much self explanatory.
Logged
I think is easy for Simba and Mufasa sing the Circle of Life when they're on the top of the food chain, I bet the zebras hate that song.

Cigarettes are a lot like hamsters. Perfectly harmless, until you put one in your mouth and light it on fire

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 23986
    • View Profile
Re: Adding Buff Indicator independent of hull mod or ability
« Reply #5 on: December 21, 2015, 03:10:24 PM »

Yeeep.
Logged