Fractal Softworks Forum

Starsector => Mods => Modding => Topic started by: Ranakastrasz on December 21, 2015, 12:09:05 PM

Title: Adding Buff Indicator independent of hull mod or ability
Post by: Ranakastrasz 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.
Title: Re: Adding Buff Indicator independent of hull mod or ability
Post by: Alex 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.)
Title: Re: Adding Buff Indicator independent of hull mod or ability
Post by: Ranakastrasz 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.
Title: Re: Adding Buff Indicator independent of hull mod or ability
Post by: Alex on December 21, 2015, 02:03:30 PM
Not too unlikely, since it only became available after 0.7a :)
Title: Re: Adding Buff Indicator independent of hull mod or ability
Post by: Ranakastrasz 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.
Title: Re: Adding Buff Indicator independent of hull mod or ability
Post by: Alex on December 21, 2015, 03:10:24 PM
Yeeep.