Starsector API
Loading...
Searching...
No Matches
com.fs.starfarer.api.SettingsAPI Interface Reference

Public Member Functions

int getBattleSize ()
 
PersonAPI createPerson ()
 
LabelAPI createLabel (String text, String font)
 
float getBonusXP (String key)
 
float getFloat (String key)
 
boolean getBoolean (String key)
 
ClassLoader getScriptClassLoader ()
 
boolean isCampaignSensorsOn ()
 
boolean isDevMode ()
 
void setDevMode (boolean devMode)
 
Color getColor (String id)
 
Object getInstanceOfScript (String className)
 
String getString (String category, String id)
 
SpriteAPI getSprite (String filename)
 
SpriteAPI getSprite (String category, String key)
 
SpriteAPI getSprite (SpriteId id)
 
String getSpriteName (String category, String id)
 
InputStream openStream (String filename) throws IOException
 
String loadText (String filename) throws IOException
 
JSONObject loadJSON (String filename) throws IOException, JSONException
 
JSONArray loadCSV (String filename) throws IOException, JSONException
 
JSONArray getMergedSpreadsheetDataForMod (String idColumn, String path, String masterMod) throws IOException, JSONException
 
JSONObject getMergedJSONForMod (String path, String masterMod) throws IOException, JSONException
 
float getScreenWidth ()
 
float getScreenHeight ()
 
float getScreenWidthPixels ()
 
float getScreenHeightPixels ()
 
Description getDescription (String id, Type type)
 
CombatReadinessPlugin getCRPlugin ()
 
int getCodeFor (String key)
 
WeaponSpecAPI getWeaponSpec (String weaponId)
 
void loadTexture (String filename) throws IOException
 
float getTargetingRadius (Vector2f from, CombatEntityAPI target, boolean considerShield)
 
ShipVariantAPI getVariant (String variantId)
 
Object getPlugin (String id)
 
List< String > getSortedSkillIds ()
 
SkillSpecAPI getSkillSpec (String skillId)
 
String getString (String key)
 
AbilitySpecAPI getAbilitySpec (String abilityId)
 
List< String > getSortedAbilityIds ()
 
float getBaseTravelSpeed ()
 
float getSpeedPerBurnLevel ()
 
float getUnitsPerLightYear ()
 
int getMaxShipsInFleet ()
 
TerrainSpecAPI getTerrainSpec (String terrainId)
 
EventSpecAPI getEventSpec (String eventId)
 
CustomEntitySpecAPI getCustomEntitySpec (String id)
 
GameState getCurrentState ()
 
int getMaxSensorRange ()
 
int getMaxSensorRangeHyper ()
 
int getMaxSensorRange (LocationAPI loc)
 
List< String > getAllVariantIds ()
 
List< String > getAptitudeIds ()
 
List< String > getSkillIds ()
 
LevelupPlugin getLevelupPlugin ()
 
String getVersionString ()
 
JSONObject loadJSON (String filename, String modId) throws IOException, JSONException
 
JSONArray loadCSV (String filename, String modId) throws IOException, JSONException
 
String loadText (String filename, String modId) throws IOException, JSONException
 
ModManagerAPI getModManager ()
 
float getBaseFleetSelectionRadius ()
 
float getFleetSelectionRadiusPerUnitSize ()
 
float getMaxFleetSelectionRadius ()
 
List< RoleEntryAPI > getEntriesForRole (String factionId, String role)
 
void addEntryForRole (String factionId, String role, String variantId, float weight)
 
void removeEntryForRole (String factionId, String role, String variantId)
 
List< RoleEntryAPI > getDefaultEntriesForRole (String role)
 
void addDefaultEntryForRole (String role, String variantId, float weight)
 
void removeDefaultEntryForRole (String role, String variantId)
 
void profilerBegin (String id)
 
void profilerEnd ()
 
void profilerPrintResultsTree ()
 
List< PlanetSpecAPI > getAllPlanetSpecs ()
 
Object getSpec (Class c, String id, boolean nullOnNotFound)
 
void putSpec (Class c, String id, Object spec)
 
< T > Collection< T > getAllSpecs (Class< T > c)
 
String getRoman (int n)
 
void greekLetterReset ()
 
String getNextCoolGreekLetter (Object context)
 
String getNextGreekLetter (Object context)
 
MarketConditionSpecAPI getMarketConditionSpec (String conditionId)
 
ShipAIPlugin createDefaultShipAI (ShipAPI ship, ShipAIConfig config)
 
HullModSpecAPI getHullModSpec (String modId)
 
FighterWingSpecAPI getFighterWingSpec (String wingId)
 
List< HullModSpecAPI > getAllHullModSpecs ()
 
List< FighterWingSpecAPI > getAllFighterWingSpecs ()
 
List< WeaponSpecAPI > getAllWeaponSpecs ()
 
boolean isSoundEnabled ()
 
boolean isInCampaignState ()
 
boolean isGeneratingNewGame ()
 
float getAngleInDegreesFast (Vector2f v)
 
float getAngleInDegreesFast (Vector2f from, Vector2f to)
 
CommoditySpecAPI getCommoditySpec (String commodityId)
 
ShipHullSpecAPI getHullSpec (String hullId)
 
FactionSpecAPI getFactionSpec (String id)
 
int computeNumFighterBays (ShipVariantAPI variant)
 
boolean isInGame ()
 
Object getNewPluginInstance (String id)
 
String getControlStringForAbilitySlot (int index)
 
String getControlStringForEnumName (String name)
 
boolean isNewPlayer ()
 
IndustrySpecAPI getIndustrySpec (String industryId)
 
List< CommoditySpecAPI > getAllCommoditySpecs ()
 
int getInt (String key)
 
List< IndustrySpecAPI > getAllIndustrySpecs ()
 
SpecialItemSpecAPI getSpecialItemSpec (String itemId)
 
List< SpecialItemSpecAPI > getAllSpecialItemSpecs ()
 
List< ShipHullSpecAPI > getAllShipHullSpecs ()
 
SpriteAPI getSprite (String category, String id, boolean emptySpriteOnNotFound)
 
ShipVariantAPI createEmptyVariant (String hullVariantId, ShipHullSpecAPI hullSpec)
 
ListMap< String > getHullIdToVariantListMap ()
 
String readTextFileFromCommon (String filename) throws IOException
 
void writeTextFileToCommon (String filename, String data) throws IOException
 
boolean fileExistsInCommon (String filename)
 
void deleteTextFileFromCommon (String filename)
 
Color getBasePlayerColor ()
 
Color getDesignTypeColor (String designType)
 
boolean doesVariantExist (String variantId)
 
void addCommodityInfoToTooltip (TooltipMakerAPI tooltip, float initPad, CommoditySpecAPI spec, int max, boolean withText, boolean withSell, boolean withBuy)
 
JSONObject getJSONObject (String key) throws JSONException
 
JSONArray getJSONArray (String key) throws JSONException
 
FactionAPI createBaseFaction (String factionId)
 
List< MarketConditionSpecAPI > getAllMarketConditionSpecs ()
 
List< SubmarketSpecAPI > getAllSubmarketSpecs ()
 
float getMinArmorFraction ()
 
float getMaxArmorDamageReduction ()
 
ShipSystemSpecAPI getShipSystemSpec (String id)
 
List< ShipSystemSpecAPI > getAllShipSystemSpecs ()
 
float getScreenScaleMult ()
 
int getAASamples ()
 
int getMouseX ()
 
int getMouseY ()
 
int getShippingCapacity (MarketAPI market, boolean inFaction)
 
JSONObject getSettingsJSON ()
 
void resetCached ()
 
void setFloat (String key, Float value)
 
void setBoolean (String key, Boolean value)
 
List< PersonMissionSpec > getAllMissionSpecs ()
 
PersonMissionSpec getMissionSpec (String id)
 
List< BarEventSpec > getAllBarEventSpecs ()
 
BarEventSpec getBarEventSpec (String id)
 
void setAutoTurnMode (boolean autoTurnMode)
 
boolean isAutoTurnMode ()
 
boolean isShowDamageFloaties ()
 
float getFloatFromArray (String key, int index)
 
int getIntFromArray (String key, int index)
 
void loadTextureConvertBlackToAlpha (String filename) throws IOException
 
String getControlDescriptionForEnumName (String name)
 
ShipAIPlugin pickShipAIPlugin (FleetMemberAPI member, ShipAPI ship)
 
void unloadTexture (String filename)
 
void profilerSetEnabled (boolean enabled)
 
void profilerReset ()
 
void profilerRestore ()
 
Color getBrightPlayerColor ()
 
Color getDarkPlayerColor ()
 
void forceMipmapsFor (String filename, boolean forceMipmaps) throws IOException
 
String getGameVersion ()
 
float computeStringWidth (String in, String font)
 
TextFieldAPI createTextField (String text, String font)
 
ButtonAPI createCheckbox (String text, UICheckboxSize size)
 
ButtonAPI createCheckbox (String text, String font, Color checkColor, UICheckboxSize size)
 
CustomPanelAPI createCustom (float width, float height, CustomUIPanelPlugin plugin)
 
int getMissionScore (String id)
 
WeaponSlotAPI createWeaponSlot (String id, WeaponType weaponType, WeaponSize slotSize, String slotTypeStr, String nodeId, Vector2f nodePos, float angle, float arc)
 
JSONArray getMergedSpreadsheetData (String idColumn, String path) throws IOException, JSONException
 
JSONObject getMergedJSON (String path) throws IOException, JSONException
 
void setEasySensorBonus (float easySensorBonus)
 
boolean isEnableShipExplosionWhiteout ()
 
void setEnableShipExplosionWhiteout (boolean enableShipExplosionWhiteout)
 
List< WeaponSpecAPI > getSystemWeaponSpecs ()
 
List< String > getSpriteKeys (String category)
 
JSONObject loadJSON (String filename, boolean withMods) throws IOException, JSONException
 
JSONArray loadCSV (String filename, boolean withMods) throws IOException, JSONException
 
float getSensorRangeMaxHyper ()
 
float getSensorRangeMax ()
 
void loadFont (String filename) throws IOException
 
boolean isStrafeKeyAToggle ()
 

Detailed Description

Author
Alex Mosolov

Copyright 2012 Fractal Softworks, LLC

Definition at line 66 of file SettingsAPI.java.

Member Function Documentation

◆ addCommodityInfoToTooltip()

void com.fs.starfarer.api.SettingsAPI.addCommodityInfoToTooltip ( TooltipMakerAPI  tooltip,
float  initPad,
CommoditySpecAPI  spec,
int  max,
boolean  withText,
boolean  withSell,
boolean  withBuy 
)

◆ addDefaultEntryForRole()

void com.fs.starfarer.api.SettingsAPI.addDefaultEntryForRole ( String  role,
String  variantId,
float  weight 
)

◆ addEntryForRole()

void com.fs.starfarer.api.SettingsAPI.addEntryForRole ( String  factionId,
String  role,
String  variantId,
float  weight 
)

◆ computeNumFighterBays()

int com.fs.starfarer.api.SettingsAPI.computeNumFighterBays ( ShipVariantAPI  variant)

◆ computeStringWidth()

float com.fs.starfarer.api.SettingsAPI.computeStringWidth ( String  in,
String  font 
)

◆ createBaseFaction()

FactionAPI com.fs.starfarer.api.SettingsAPI.createBaseFaction ( String  factionId)

Should be used when faction data needs to be accessed outside the campaign.

Parameters
factionId
Returns

◆ createCheckbox() [1/2]

ButtonAPI com.fs.starfarer.api.SettingsAPI.createCheckbox ( String  text,
String  font,
Color  checkColor,
UICheckboxSize  size 
)

◆ createCheckbox() [2/2]

ButtonAPI com.fs.starfarer.api.SettingsAPI.createCheckbox ( String  text,
UICheckboxSize  size 
)

◆ createCustom()

CustomPanelAPI com.fs.starfarer.api.SettingsAPI.createCustom ( float  width,
float  height,
CustomUIPanelPlugin  plugin 
)

◆ createDefaultShipAI()

ShipAIPlugin com.fs.starfarer.api.SettingsAPI.createDefaultShipAI ( ShipAPI  ship,
ShipAIConfig  config 
)

◆ createEmptyVariant()

ShipVariantAPI com.fs.starfarer.api.SettingsAPI.createEmptyVariant ( String  hullVariantId,
ShipHullSpecAPI  hullSpec 
)

◆ createLabel()

LabelAPI com.fs.starfarer.api.SettingsAPI.createLabel ( String  text,
String  font 
)

◆ createPerson()

PersonAPI com.fs.starfarer.api.SettingsAPI.createPerson ( )

Can be used outside the campaign, unlike FactoryAPI.createPerson().

Returns

◆ createTextField()

TextFieldAPI com.fs.starfarer.api.SettingsAPI.createTextField ( String  text,
String  font 
)

◆ createWeaponSlot()

WeaponSlotAPI com.fs.starfarer.api.SettingsAPI.createWeaponSlot ( String  id,
WeaponType  weaponType,
WeaponSize  slotSize,
String  slotTypeStr,
String  nodeId,
Vector2f  nodePos,
float  angle,
float  arc 
)

◆ deleteTextFileFromCommon()

void com.fs.starfarer.api.SettingsAPI.deleteTextFileFromCommon ( String  filename)

◆ doesVariantExist()

boolean com.fs.starfarer.api.SettingsAPI.doesVariantExist ( String  variantId)

◆ fileExistsInCommon()

boolean com.fs.starfarer.api.SettingsAPI.fileExistsInCommon ( String  filename)

◆ forceMipmapsFor()

void com.fs.starfarer.api.SettingsAPI.forceMipmapsFor ( String  filename,
boolean  forceMipmaps 
) throws IOException

◆ getAASamples()

int com.fs.starfarer.api.SettingsAPI.getAASamples ( )

◆ getAbilitySpec()

AbilitySpecAPI com.fs.starfarer.api.SettingsAPI.getAbilitySpec ( String  abilityId)

◆ getAllBarEventSpecs()

List< BarEventSpec > com.fs.starfarer.api.SettingsAPI.getAllBarEventSpecs ( )

◆ getAllCommoditySpecs()

List< CommoditySpecAPI > com.fs.starfarer.api.SettingsAPI.getAllCommoditySpecs ( )

◆ getAllFighterWingSpecs()

List< FighterWingSpecAPI > com.fs.starfarer.api.SettingsAPI.getAllFighterWingSpecs ( )

◆ getAllHullModSpecs()

List< HullModSpecAPI > com.fs.starfarer.api.SettingsAPI.getAllHullModSpecs ( )

◆ getAllIndustrySpecs()

List< IndustrySpecAPI > com.fs.starfarer.api.SettingsAPI.getAllIndustrySpecs ( )

◆ getAllMarketConditionSpecs()

List< MarketConditionSpecAPI > com.fs.starfarer.api.SettingsAPI.getAllMarketConditionSpecs ( )

◆ getAllMissionSpecs()

List< PersonMissionSpec > com.fs.starfarer.api.SettingsAPI.getAllMissionSpecs ( )

◆ getAllPlanetSpecs()

List< PlanetSpecAPI > com.fs.starfarer.api.SettingsAPI.getAllPlanetSpecs ( )

◆ getAllShipHullSpecs()

List< ShipHullSpecAPI > com.fs.starfarer.api.SettingsAPI.getAllShipHullSpecs ( )

◆ getAllShipSystemSpecs()

List< ShipSystemSpecAPI > com.fs.starfarer.api.SettingsAPI.getAllShipSystemSpecs ( )

◆ getAllSpecialItemSpecs()

List< SpecialItemSpecAPI > com.fs.starfarer.api.SettingsAPI.getAllSpecialItemSpecs ( )

◆ getAllSpecs()

< T > Collection< T > com.fs.starfarer.api.SettingsAPI.getAllSpecs ( Class< T >  c)

◆ getAllSubmarketSpecs()

List< SubmarketSpecAPI > com.fs.starfarer.api.SettingsAPI.getAllSubmarketSpecs ( )

◆ getAllVariantIds()

List< String > com.fs.starfarer.api.SettingsAPI.getAllVariantIds ( )

◆ getAllWeaponSpecs()

List< WeaponSpecAPI > com.fs.starfarer.api.SettingsAPI.getAllWeaponSpecs ( )

◆ getAngleInDegreesFast() [1/2]

float com.fs.starfarer.api.SettingsAPI.getAngleInDegreesFast ( Vector2f  from,
Vector2f  to 
)

◆ getAngleInDegreesFast() [2/2]

float com.fs.starfarer.api.SettingsAPI.getAngleInDegreesFast ( Vector2f  v)

◆ getAptitudeIds()

List< String > com.fs.starfarer.api.SettingsAPI.getAptitudeIds ( )

◆ getBarEventSpec()

BarEventSpec com.fs.starfarer.api.SettingsAPI.getBarEventSpec ( String  id)

◆ getBaseFleetSelectionRadius()

float com.fs.starfarer.api.SettingsAPI.getBaseFleetSelectionRadius ( )

◆ getBasePlayerColor()

Color com.fs.starfarer.api.SettingsAPI.getBasePlayerColor ( )

◆ getBaseTravelSpeed()

float com.fs.starfarer.api.SettingsAPI.getBaseTravelSpeed ( )

◆ getBattleSize()

int com.fs.starfarer.api.SettingsAPI.getBattleSize ( )

◆ getBonusXP()

float com.fs.starfarer.api.SettingsAPI.getBonusXP ( String  key)

◆ getBoolean()

boolean com.fs.starfarer.api.SettingsAPI.getBoolean ( String  key)

◆ getBrightPlayerColor()

Color com.fs.starfarer.api.SettingsAPI.getBrightPlayerColor ( )

◆ getCodeFor()

int com.fs.starfarer.api.SettingsAPI.getCodeFor ( String  key)

◆ getColor()

Color com.fs.starfarer.api.SettingsAPI.getColor ( String  id)

◆ getCommoditySpec()

CommoditySpecAPI com.fs.starfarer.api.SettingsAPI.getCommoditySpec ( String  commodityId)

◆ getControlDescriptionForEnumName()

String com.fs.starfarer.api.SettingsAPI.getControlDescriptionForEnumName ( String  name)

◆ getControlStringForAbilitySlot()

String com.fs.starfarer.api.SettingsAPI.getControlStringForAbilitySlot ( int  index)

◆ getControlStringForEnumName()

String com.fs.starfarer.api.SettingsAPI.getControlStringForEnumName ( String  name)

Total hack instead of moving the Controls enum out to the .api project. Use at own peril.

Parameters
name
Returns

◆ getCRPlugin()

CombatReadinessPlugin com.fs.starfarer.api.SettingsAPI.getCRPlugin ( )

◆ getCurrentState()

GameState com.fs.starfarer.api.SettingsAPI.getCurrentState ( )

◆ getCustomEntitySpec()

CustomEntitySpecAPI com.fs.starfarer.api.SettingsAPI.getCustomEntitySpec ( String  id)

◆ getDarkPlayerColor()

Color com.fs.starfarer.api.SettingsAPI.getDarkPlayerColor ( )

◆ getDefaultEntriesForRole()

List< RoleEntryAPI > com.fs.starfarer.api.SettingsAPI.getDefaultEntriesForRole ( String  role)

◆ getDescription()

Description com.fs.starfarer.api.SettingsAPI.getDescription ( String  id,
Type  type 
)

Gets entry from descriptions.csv.

Parameters
id
type
Returns
description, or null if not found.

◆ getDesignTypeColor()

Color com.fs.starfarer.api.SettingsAPI.getDesignTypeColor ( String  designType)

◆ getEntriesForRole()

List< RoleEntryAPI > com.fs.starfarer.api.SettingsAPI.getEntriesForRole ( String  factionId,
String  role 
)

◆ getEventSpec()

EventSpecAPI com.fs.starfarer.api.SettingsAPI.getEventSpec ( String  eventId)

◆ getFactionSpec()

FactionSpecAPI com.fs.starfarer.api.SettingsAPI.getFactionSpec ( String  id)

◆ getFighterWingSpec()

FighterWingSpecAPI com.fs.starfarer.api.SettingsAPI.getFighterWingSpec ( String  wingId)

◆ getFleetSelectionRadiusPerUnitSize()

float com.fs.starfarer.api.SettingsAPI.getFleetSelectionRadiusPerUnitSize ( )

◆ getFloat()

float com.fs.starfarer.api.SettingsAPI.getFloat ( String  key)

◆ getFloatFromArray()

float com.fs.starfarer.api.SettingsAPI.getFloatFromArray ( String  key,
int  index 
)

◆ getGameVersion()

String com.fs.starfarer.api.SettingsAPI.getGameVersion ( )

Returns e.g. "0.95a-RC12"

Returns

◆ getHullIdToVariantListMap()

ListMap< String > com.fs.starfarer.api.SettingsAPI.getHullIdToVariantListMap ( )

For default ship roles.

Returns

◆ getHullModSpec()

HullModSpecAPI com.fs.starfarer.api.SettingsAPI.getHullModSpec ( String  modId)

◆ getHullSpec()

ShipHullSpecAPI com.fs.starfarer.api.SettingsAPI.getHullSpec ( String  hullId)

◆ getIndustrySpec()

IndustrySpecAPI com.fs.starfarer.api.SettingsAPI.getIndustrySpec ( String  industryId)

◆ getInstanceOfScript()

Object com.fs.starfarer.api.SettingsAPI.getInstanceOfScript ( String  className)

◆ getInt()

int com.fs.starfarer.api.SettingsAPI.getInt ( String  key)

◆ getIntFromArray()

int com.fs.starfarer.api.SettingsAPI.getIntFromArray ( String  key,
int  index 
)

◆ getJSONArray()

JSONArray com.fs.starfarer.api.SettingsAPI.getJSONArray ( String  key) throws JSONException

◆ getJSONObject()

JSONObject com.fs.starfarer.api.SettingsAPI.getJSONObject ( String  key) throws JSONException

◆ getLevelupPlugin()

LevelupPlugin com.fs.starfarer.api.SettingsAPI.getLevelupPlugin ( )

◆ getMarketConditionSpec()

MarketConditionSpecAPI com.fs.starfarer.api.SettingsAPI.getMarketConditionSpec ( String  conditionId)

◆ getMaxArmorDamageReduction()

float com.fs.starfarer.api.SettingsAPI.getMaxArmorDamageReduction ( )

◆ getMaxFleetSelectionRadius()

float com.fs.starfarer.api.SettingsAPI.getMaxFleetSelectionRadius ( )

◆ getMaxSensorRange() [1/2]

int com.fs.starfarer.api.SettingsAPI.getMaxSensorRange ( )

◆ getMaxSensorRange() [2/2]

int com.fs.starfarer.api.SettingsAPI.getMaxSensorRange ( LocationAPI  loc)

◆ getMaxSensorRangeHyper()

int com.fs.starfarer.api.SettingsAPI.getMaxSensorRangeHyper ( )

◆ getMaxShipsInFleet()

int com.fs.starfarer.api.SettingsAPI.getMaxShipsInFleet ( )

◆ getMergedJSON()

JSONObject com.fs.starfarer.api.SettingsAPI.getMergedJSON ( String  path) throws IOException, JSONException

◆ getMergedJSONForMod()

JSONObject com.fs.starfarer.api.SettingsAPI.getMergedJSONForMod ( String  path,
String  masterMod 
) throws IOException, JSONException

◆ getMergedSpreadsheetData()

JSONArray com.fs.starfarer.api.SettingsAPI.getMergedSpreadsheetData ( String  idColumn,
String  path 
) throws IOException, JSONException

◆ getMergedSpreadsheetDataForMod()

JSONArray com.fs.starfarer.api.SettingsAPI.getMergedSpreadsheetDataForMod ( String  idColumn,
String  path,
String  masterMod 
) throws IOException, JSONException

Useful for building a mod that allows other mods to override some of its data.

Merges on spreadsheet level only; rows with matching ids get replaced by non-master rows.

If multiple non-master rows have the same id, one will be picked in an undefined manner.

Parameters
idColumnthe column to be used as the key for merging spreadsheets.
paththe location of the spreadsheet, i.e. "mydata/spreadsheet.csv".
masterModname of the mod that has the master copy of the spreadsheet, which will be used as the base version to add to/modify during the merge.
Returns
Exceptions
IOException
JSONException

◆ getMinArmorFraction()

float com.fs.starfarer.api.SettingsAPI.getMinArmorFraction ( )

◆ getMissionScore()

int com.fs.starfarer.api.SettingsAPI.getMissionScore ( String  id)

◆ getMissionSpec()

PersonMissionSpec com.fs.starfarer.api.SettingsAPI.getMissionSpec ( String  id)

◆ getModManager()

ModManagerAPI com.fs.starfarer.api.SettingsAPI.getModManager ( )

◆ getMouseX()

int com.fs.starfarer.api.SettingsAPI.getMouseX ( )

Converted to virtual screen coordinates, i.e. adjusted for screen scaling.

Returns

◆ getMouseY()

int com.fs.starfarer.api.SettingsAPI.getMouseY ( )

Converted to virtual screen coordinates, i.e. adjusted for screen scaling.

Returns

◆ getNewPluginInstance()

Object com.fs.starfarer.api.SettingsAPI.getNewPluginInstance ( String  id)

◆ getNextCoolGreekLetter()

String com.fs.starfarer.api.SettingsAPI.getNextCoolGreekLetter ( Object  context)

◆ getNextGreekLetter()

String com.fs.starfarer.api.SettingsAPI.getNextGreekLetter ( Object  context)

◆ getPlugin()

Object com.fs.starfarer.api.SettingsAPI.getPlugin ( String  id)

Plugins returned by this method are cached and persistent across multiple saves. They should not have any data members that point at campaign data or it will cause a memory leak.

Parameters
id
Returns

◆ getRoman()

String com.fs.starfarer.api.SettingsAPI.getRoman ( int  n)
Parameters
n1 to 3999.
Returns

◆ getScreenHeight()

float com.fs.starfarer.api.SettingsAPI.getScreenHeight ( )

Virtual pixels, i.e. divided by getScreenScaleMult().

Returns

◆ getScreenHeightPixels()

float com.fs.starfarer.api.SettingsAPI.getScreenHeightPixels ( )

◆ getScreenScaleMult()

float com.fs.starfarer.api.SettingsAPI.getScreenScaleMult ( )

◆ getScreenWidth()

float com.fs.starfarer.api.SettingsAPI.getScreenWidth ( )

Virtual pixels, i.e. divided by getScreenScaleMult().

Returns

◆ getScreenWidthPixels()

float com.fs.starfarer.api.SettingsAPI.getScreenWidthPixels ( )

◆ getScriptClassLoader()

ClassLoader com.fs.starfarer.api.SettingsAPI.getScriptClassLoader ( )

◆ getSensorRangeMax()

float com.fs.starfarer.api.SettingsAPI.getSensorRangeMax ( )

◆ getSensorRangeMaxHyper()

float com.fs.starfarer.api.SettingsAPI.getSensorRangeMaxHyper ( )

◆ getSettingsJSON()

JSONObject com.fs.starfarer.api.SettingsAPI.getSettingsJSON ( )

◆ getShippingCapacity()

int com.fs.starfarer.api.SettingsAPI.getShippingCapacity ( MarketAPI  market,
boolean  inFaction 
)

◆ getShipSystemSpec()

ShipSystemSpecAPI com.fs.starfarer.api.SettingsAPI.getShipSystemSpec ( String  id)

◆ getSkillIds()

List< String > com.fs.starfarer.api.SettingsAPI.getSkillIds ( )

◆ getSkillSpec()

SkillSpecAPI com.fs.starfarer.api.SettingsAPI.getSkillSpec ( String  skillId)

◆ getSortedAbilityIds()

List< String > com.fs.starfarer.api.SettingsAPI.getSortedAbilityIds ( )

◆ getSortedSkillIds()

List< String > com.fs.starfarer.api.SettingsAPI.getSortedSkillIds ( )

◆ getSpec()

Object com.fs.starfarer.api.SettingsAPI.getSpec ( Class  c,
String  id,
boolean  nullOnNotFound 
)

◆ getSpecialItemSpec()

SpecialItemSpecAPI com.fs.starfarer.api.SettingsAPI.getSpecialItemSpec ( String  itemId)

◆ getSpeedPerBurnLevel()

float com.fs.starfarer.api.SettingsAPI.getSpeedPerBurnLevel ( )

◆ getSprite() [1/4]

SpriteAPI com.fs.starfarer.api.SettingsAPI.getSprite ( SpriteId  id)

Same as the method that takes (String category, String key). SpriteId is just a container class for category + id.

Parameters
id
Returns

◆ getSprite() [2/4]

SpriteAPI com.fs.starfarer.api.SettingsAPI.getSprite ( String  category,
String  id,
boolean  emptySpriteOnNotFound 
)

◆ getSprite() [3/4]

SpriteAPI com.fs.starfarer.api.SettingsAPI.getSprite ( String  category,
String  key 
)

Gets a sprite loaded using the "graphics" section in data/config/settings.json.

Parameters
category
key
Returns

◆ getSprite() [4/4]

SpriteAPI com.fs.starfarer.api.SettingsAPI.getSprite ( String  filename)

File must already have been loaded. Mostly useful for retrieving ship and weapon sprites and other such.

Parameters
filename
Returns

◆ getSpriteKeys()

List< String > com.fs.starfarer.api.SettingsAPI.getSpriteKeys ( String  category)

◆ getSpriteName()

String com.fs.starfarer.api.SettingsAPI.getSpriteName ( String  category,
String  id 
)

◆ getString() [1/2]

String com.fs.starfarer.api.SettingsAPI.getString ( String  category,
String  id 
)

Gets a string from a given category in strings.json

Parameters
category
id
Returns

◆ getString() [2/2]

String com.fs.starfarer.api.SettingsAPI.getString ( String  key)

◆ getSystemWeaponSpecs()

List< WeaponSpecAPI > com.fs.starfarer.api.SettingsAPI.getSystemWeaponSpecs ( )

◆ getTargetingRadius()

float com.fs.starfarer.api.SettingsAPI.getTargetingRadius ( Vector2f  from,
CombatEntityAPI  target,
boolean  considerShield 
)

Bit of a hack to have this method here. It's just a way to call into some unexposed utility code.

Parameters
from
target
considerShield
Returns

◆ getTerrainSpec()

TerrainSpecAPI com.fs.starfarer.api.SettingsAPI.getTerrainSpec ( String  terrainId)

◆ getUnitsPerLightYear()

float com.fs.starfarer.api.SettingsAPI.getUnitsPerLightYear ( )

◆ getVariant()

ShipVariantAPI com.fs.starfarer.api.SettingsAPI.getVariant ( String  variantId)

◆ getVersionString()

String com.fs.starfarer.api.SettingsAPI.getVersionString ( )

◆ getWeaponSpec()

WeaponSpecAPI com.fs.starfarer.api.SettingsAPI.getWeaponSpec ( String  weaponId)

◆ greekLetterReset()

void com.fs.starfarer.api.SettingsAPI.greekLetterReset ( )

◆ isAutoTurnMode()

boolean com.fs.starfarer.api.SettingsAPI.isAutoTurnMode ( )

◆ isCampaignSensorsOn()

boolean com.fs.starfarer.api.SettingsAPI.isCampaignSensorsOn ( )

◆ isDevMode()

boolean com.fs.starfarer.api.SettingsAPI.isDevMode ( )

◆ isEnableShipExplosionWhiteout()

boolean com.fs.starfarer.api.SettingsAPI.isEnableShipExplosionWhiteout ( )

◆ isGeneratingNewGame()

boolean com.fs.starfarer.api.SettingsAPI.isGeneratingNewGame ( )

◆ isInCampaignState()

boolean com.fs.starfarer.api.SettingsAPI.isInCampaignState ( )

◆ isInGame()

boolean com.fs.starfarer.api.SettingsAPI.isInGame ( )

For modding purposes, always returns true.

Returns

◆ isNewPlayer()

boolean com.fs.starfarer.api.SettingsAPI.isNewPlayer ( )

◆ isShowDamageFloaties()

boolean com.fs.starfarer.api.SettingsAPI.isShowDamageFloaties ( )

◆ isSoundEnabled()

boolean com.fs.starfarer.api.SettingsAPI.isSoundEnabled ( )

◆ isStrafeKeyAToggle()

boolean com.fs.starfarer.api.SettingsAPI.isStrafeKeyAToggle ( )

◆ loadCSV() [1/3]

JSONArray com.fs.starfarer.api.SettingsAPI.loadCSV ( String  filename) throws IOException, JSONException

Returns an array of JSONObjects with keys corresponding to the columns in the csv file.

Use / instead of \ in paths for compatibility (required to work on OS X and Linux).

Parameters
filename
Returns
Exceptions
IOException
JSONException

◆ loadCSV() [2/3]

JSONArray com.fs.starfarer.api.SettingsAPI.loadCSV ( String  filename,
boolean  withMods 
) throws IOException, JSONException

◆ loadCSV() [3/3]

JSONArray com.fs.starfarer.api.SettingsAPI.loadCSV ( String  filename,
String  modId 
) throws IOException, JSONException

◆ loadFont()

void com.fs.starfarer.api.SettingsAPI.loadFont ( String  filename) throws IOException

◆ loadJSON() [1/3]

JSONObject com.fs.starfarer.api.SettingsAPI.loadJSON ( String  filename) throws IOException, JSONException

Use / instead of \ in paths for compatibility (required to work on OS X and Linux).

Parameters
filename
Returns
Exceptions
IOException

◆ loadJSON() [2/3]

JSONObject com.fs.starfarer.api.SettingsAPI.loadJSON ( String  filename,
boolean  withMods 
) throws IOException, JSONException

◆ loadJSON() [3/3]

JSONObject com.fs.starfarer.api.SettingsAPI.loadJSON ( String  filename,
String  modId 
) throws IOException, JSONException

◆ loadText() [1/2]

String com.fs.starfarer.api.SettingsAPI.loadText ( String  filename) throws IOException

Use / instead of \ in paths for compatibility (required to work on OS X and Linux).

Parameters
filename
Returns
Exceptions
IOException

◆ loadText() [2/2]

String com.fs.starfarer.api.SettingsAPI.loadText ( String  filename,
String  modId 
) throws IOException, JSONException

◆ loadTexture()

void com.fs.starfarer.api.SettingsAPI.loadTexture ( String  filename) throws IOException

◆ loadTextureConvertBlackToAlpha()

void com.fs.starfarer.api.SettingsAPI.loadTextureConvertBlackToAlpha ( String  filename) throws IOException

◆ openStream()

InputStream com.fs.starfarer.api.SettingsAPI.openStream ( String  filename) throws IOException

Use / instead of \ in paths for compatibility (required to work on OS X and Linux).

Parameters
filename
Returns
Exceptions
IOException

◆ pickShipAIPlugin()

ShipAIPlugin com.fs.starfarer.api.SettingsAPI.pickShipAIPlugin ( FleetMemberAPI  member,
ShipAPI  ship 
)

◆ profilerBegin()

void com.fs.starfarer.api.SettingsAPI.profilerBegin ( String  id)

◆ profilerEnd()

void com.fs.starfarer.api.SettingsAPI.profilerEnd ( )

◆ profilerPrintResultsTree()

void com.fs.starfarer.api.SettingsAPI.profilerPrintResultsTree ( )

◆ profilerReset()

void com.fs.starfarer.api.SettingsAPI.profilerReset ( )

◆ profilerRestore()

void com.fs.starfarer.api.SettingsAPI.profilerRestore ( )

◆ profilerSetEnabled()

void com.fs.starfarer.api.SettingsAPI.profilerSetEnabled ( boolean  enabled)

◆ putSpec()

void com.fs.starfarer.api.SettingsAPI.putSpec ( Class  c,
String  id,
Object  spec 
)

◆ readTextFileFromCommon()

String com.fs.starfarer.api.SettingsAPI.readTextFileFromCommon ( String  filename) throws IOException

◆ removeDefaultEntryForRole()

void com.fs.starfarer.api.SettingsAPI.removeDefaultEntryForRole ( String  role,
String  variantId 
)

◆ removeEntryForRole()

void com.fs.starfarer.api.SettingsAPI.removeEntryForRole ( String  factionId,
String  role,
String  variantId 
)

◆ resetCached()

void com.fs.starfarer.api.SettingsAPI.resetCached ( )

Must be called after making any changes to result of getSettingsJSON().

◆ setAutoTurnMode()

void com.fs.starfarer.api.SettingsAPI.setAutoTurnMode ( boolean  autoTurnMode)

◆ setBoolean()

void com.fs.starfarer.api.SettingsAPI.setBoolean ( String  key,
Boolean  value 
)

◆ setDevMode()

void com.fs.starfarer.api.SettingsAPI.setDevMode ( boolean  devMode)

◆ setEasySensorBonus()

void com.fs.starfarer.api.SettingsAPI.setEasySensorBonus ( float  easySensorBonus)

◆ setEnableShipExplosionWhiteout()

void com.fs.starfarer.api.SettingsAPI.setEnableShipExplosionWhiteout ( boolean  enableShipExplosionWhiteout)

◆ setFloat()

void com.fs.starfarer.api.SettingsAPI.setFloat ( String  key,
Float  value 
)

◆ unloadTexture()

void com.fs.starfarer.api.SettingsAPI.unloadTexture ( String  filename)

◆ writeTextFileToCommon()

void com.fs.starfarer.api.SettingsAPI.writeTextFileToCommon ( String  filename,
String  data 
) throws IOException

Max size 10k.

Parameters
filename
data
Exceptions
IOException

The documentation for this interface was generated from the following file: