|
Starsector API
|
Public Member Functions | |
| int | getBattleSize () |
| boolean | isShowingCodex () |
| PersonAPI | createPerson () |
| CargoStackAPI | createCargoStack (CargoItemType type, Object data, CargoAPI cargo) |
| LabelAPI | createLabel (String text, String font) |
| float | getBonusXP (String key) |
| float | getFloat (String key) |
| boolean | getBoolean (String key) |
| boolean | optBoolean (String key, boolean defaultValue) |
| 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 () |
| List< WeaponSpecAPI > | getActuallyAllWeaponSpecs () |
| 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) |
| List< String > | getSpriteKeys (String category, String listId) |
| 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 () |
| List< FactionSpecAPI > | getAllFactionSpecs () |
| PersonalityAPI | getPersonaltySpec (String id) |
| void | writeJSONToCommon (String filename, JSONObject json, boolean onlyIfChanged) throws IOException, JSONException |
| JSONObject | readJSONFromCommon (String filename, boolean putInWriteCache) throws IOException, JSONException |
| List< String > | getSimOpponents () |
| List< String > | getSimOpponentsDev () |
| Set< String > | getIndustrySupply (String industryId) |
| Set< String > | getIndustryDemand (String industryId) |
| void | showCodex (String entryId) |
| void | showCodex (CodexEntryPlugin tempEntry) |
| void | showCodex (List< CodexEntryPlugin > tempEntries) |
| void | showCodex (FleetMemberAPI member) |
| FleetMemberAPI | createFleetMember (FleetMemberType type, String variantOrWingId) |
| FleetMemberAPI | createFleetMember (FleetMemberType type, ShipVariantAPI variant) |
| List< TerrainSpecAPI > | getAllTerrainSpecs () |
| SectorEntityToken | createLocationToken (float x, float y) |
| boolean | hasDesignTypeColor (String designType) |
| float | getFriendlyFireDanger (ShipAPI shooter, CombatEntityAPI target, Vector2f from, Vector2f to, float weaponSpeed, float burstFireDuration, float weaponRange) |
| float | getSafeMovementDir (ShipAPI ship) |
Copyright 2012 Fractal Softworks, LLC
Definition at line 75 of file SettingsAPI.java.
| void com.fs.starfarer.api.SettingsAPI.addCommodityInfoToTooltip | ( | TooltipMakerAPI | tooltip, |
| float | initPad, | ||
| CommoditySpecAPI | spec, | ||
| int | max, | ||
| boolean | withText, | ||
| boolean | withSell, | ||
| boolean | withBuy ) |
| void com.fs.starfarer.api.SettingsAPI.addDefaultEntryForRole | ( | String | role, |
| String | variantId, | ||
| float | weight ) |
| void com.fs.starfarer.api.SettingsAPI.addEntryForRole | ( | String | factionId, |
| String | role, | ||
| String | variantId, | ||
| float | weight ) |
| int com.fs.starfarer.api.SettingsAPI.computeNumFighterBays | ( | ShipVariantAPI | variant | ) |
| float com.fs.starfarer.api.SettingsAPI.computeStringWidth | ( | String | in, |
| String | font ) |
| FactionAPI com.fs.starfarer.api.SettingsAPI.createBaseFaction | ( | String | factionId | ) |
Should be used when faction data needs to be accessed outside the campaign.
| factionId |
| CargoStackAPI com.fs.starfarer.api.SettingsAPI.createCargoStack | ( | CargoItemType | type, |
| Object | data, | ||
| CargoAPI | cargo ) |
| ButtonAPI com.fs.starfarer.api.SettingsAPI.createCheckbox | ( | String | text, |
| String | font, | ||
| Color | checkColor, | ||
| UICheckboxSize | size ) |
| ButtonAPI com.fs.starfarer.api.SettingsAPI.createCheckbox | ( | String | text, |
| UICheckboxSize | size ) |
| CustomPanelAPI com.fs.starfarer.api.SettingsAPI.createCustom | ( | float | width, |
| float | height, | ||
| CustomUIPanelPlugin | plugin ) |
| ShipAIPlugin com.fs.starfarer.api.SettingsAPI.createDefaultShipAI | ( | ShipAPI | ship, |
| ShipAIConfig | config ) |
| ShipVariantAPI com.fs.starfarer.api.SettingsAPI.createEmptyVariant | ( | String | hullVariantId, |
| ShipHullSpecAPI | hullSpec ) |
| FleetMemberAPI com.fs.starfarer.api.SettingsAPI.createFleetMember | ( | FleetMemberType | type, |
| ShipVariantAPI | variant ) |
| FleetMemberAPI com.fs.starfarer.api.SettingsAPI.createFleetMember | ( | FleetMemberType | type, |
| String | variantOrWingId ) |
| LabelAPI com.fs.starfarer.api.SettingsAPI.createLabel | ( | String | text, |
| String | font ) |
| SectorEntityToken com.fs.starfarer.api.SettingsAPI.createLocationToken | ( | float | x, |
| float | y ) |
| PersonAPI com.fs.starfarer.api.SettingsAPI.createPerson | ( | ) |
Can be used outside the campaign, unlike FactoryAPI.createPerson().
| TextFieldAPI com.fs.starfarer.api.SettingsAPI.createTextField | ( | String | text, |
| String | font ) |
| WeaponSlotAPI com.fs.starfarer.api.SettingsAPI.createWeaponSlot | ( | String | id, |
| WeaponType | weaponType, | ||
| WeaponSize | slotSize, | ||
| String | slotTypeStr, | ||
| String | nodeId, | ||
| Vector2f | nodePos, | ||
| float | angle, | ||
| float | arc ) |
| void com.fs.starfarer.api.SettingsAPI.deleteTextFileFromCommon | ( | String | filename | ) |
| boolean com.fs.starfarer.api.SettingsAPI.doesVariantExist | ( | String | variantId | ) |
| boolean com.fs.starfarer.api.SettingsAPI.fileExistsInCommon | ( | String | filename | ) |
| void com.fs.starfarer.api.SettingsAPI.forceMipmapsFor | ( | String | filename, |
| boolean | forceMipmaps ) throws IOException |
| int com.fs.starfarer.api.SettingsAPI.getAASamples | ( | ) |
| AbilitySpecAPI com.fs.starfarer.api.SettingsAPI.getAbilitySpec | ( | String | abilityId | ) |
| List< WeaponSpecAPI > com.fs.starfarer.api.SettingsAPI.getActuallyAllWeaponSpecs | ( | ) |
Includes SYSTEM weapons and, well, everything.
| List< BarEventSpec > com.fs.starfarer.api.SettingsAPI.getAllBarEventSpecs | ( | ) |
| List< CommoditySpecAPI > com.fs.starfarer.api.SettingsAPI.getAllCommoditySpecs | ( | ) |
| List< FactionSpecAPI > com.fs.starfarer.api.SettingsAPI.getAllFactionSpecs | ( | ) |
| List< FighterWingSpecAPI > com.fs.starfarer.api.SettingsAPI.getAllFighterWingSpecs | ( | ) |
| List< HullModSpecAPI > com.fs.starfarer.api.SettingsAPI.getAllHullModSpecs | ( | ) |
| List< IndustrySpecAPI > com.fs.starfarer.api.SettingsAPI.getAllIndustrySpecs | ( | ) |
| List< MarketConditionSpecAPI > com.fs.starfarer.api.SettingsAPI.getAllMarketConditionSpecs | ( | ) |
| List< PersonMissionSpec > com.fs.starfarer.api.SettingsAPI.getAllMissionSpecs | ( | ) |
| List< PlanetSpecAPI > com.fs.starfarer.api.SettingsAPI.getAllPlanetSpecs | ( | ) |
| List< ShipHullSpecAPI > com.fs.starfarer.api.SettingsAPI.getAllShipHullSpecs | ( | ) |
| List< ShipSystemSpecAPI > com.fs.starfarer.api.SettingsAPI.getAllShipSystemSpecs | ( | ) |
| List< SpecialItemSpecAPI > com.fs.starfarer.api.SettingsAPI.getAllSpecialItemSpecs | ( | ) |
| < T > Collection< T > com.fs.starfarer.api.SettingsAPI.getAllSpecs | ( | Class< T > | c | ) |
| List< SubmarketSpecAPI > com.fs.starfarer.api.SettingsAPI.getAllSubmarketSpecs | ( | ) |
| List< TerrainSpecAPI > com.fs.starfarer.api.SettingsAPI.getAllTerrainSpecs | ( | ) |
| List< String > com.fs.starfarer.api.SettingsAPI.getAllVariantIds | ( | ) |
| List< WeaponSpecAPI > com.fs.starfarer.api.SettingsAPI.getAllWeaponSpecs | ( | ) |
| float com.fs.starfarer.api.SettingsAPI.getAngleInDegreesFast | ( | Vector2f | from, |
| Vector2f | to ) |
| float com.fs.starfarer.api.SettingsAPI.getAngleInDegreesFast | ( | Vector2f | v | ) |
| List< String > com.fs.starfarer.api.SettingsAPI.getAptitudeIds | ( | ) |
| BarEventSpec com.fs.starfarer.api.SettingsAPI.getBarEventSpec | ( | String | id | ) |
| float com.fs.starfarer.api.SettingsAPI.getBaseFleetSelectionRadius | ( | ) |
| Color com.fs.starfarer.api.SettingsAPI.getBasePlayerColor | ( | ) |
| float com.fs.starfarer.api.SettingsAPI.getBaseTravelSpeed | ( | ) |
| int com.fs.starfarer.api.SettingsAPI.getBattleSize | ( | ) |
| float com.fs.starfarer.api.SettingsAPI.getBonusXP | ( | String | key | ) |
| boolean com.fs.starfarer.api.SettingsAPI.getBoolean | ( | String | key | ) |
| Color com.fs.starfarer.api.SettingsAPI.getBrightPlayerColor | ( | ) |
| int com.fs.starfarer.api.SettingsAPI.getCodeFor | ( | String | key | ) |
| Color com.fs.starfarer.api.SettingsAPI.getColor | ( | String | id | ) |
| CommoditySpecAPI com.fs.starfarer.api.SettingsAPI.getCommoditySpec | ( | String | commodityId | ) |
| String com.fs.starfarer.api.SettingsAPI.getControlDescriptionForEnumName | ( | String | name | ) |
| String com.fs.starfarer.api.SettingsAPI.getControlStringForAbilitySlot | ( | int | index | ) |
| 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.
| name |
| CombatReadinessPlugin com.fs.starfarer.api.SettingsAPI.getCRPlugin | ( | ) |
| GameState com.fs.starfarer.api.SettingsAPI.getCurrentState | ( | ) |
| CustomEntitySpecAPI com.fs.starfarer.api.SettingsAPI.getCustomEntitySpec | ( | String | id | ) |
| Color com.fs.starfarer.api.SettingsAPI.getDarkPlayerColor | ( | ) |
| List< RoleEntryAPI > com.fs.starfarer.api.SettingsAPI.getDefaultEntriesForRole | ( | String | role | ) |
| Description com.fs.starfarer.api.SettingsAPI.getDescription | ( | String | id, |
| Type | type ) |
Gets entry from descriptions.csv.
| id | |
| type |
| Color com.fs.starfarer.api.SettingsAPI.getDesignTypeColor | ( | String | designType | ) |
| List< RoleEntryAPI > com.fs.starfarer.api.SettingsAPI.getEntriesForRole | ( | String | factionId, |
| String | role ) |
| EventSpecAPI com.fs.starfarer.api.SettingsAPI.getEventSpec | ( | String | eventId | ) |
| FactionSpecAPI com.fs.starfarer.api.SettingsAPI.getFactionSpec | ( | String | id | ) |
| FighterWingSpecAPI com.fs.starfarer.api.SettingsAPI.getFighterWingSpec | ( | String | wingId | ) |
| float com.fs.starfarer.api.SettingsAPI.getFleetSelectionRadiusPerUnitSize | ( | ) |
| float com.fs.starfarer.api.SettingsAPI.getFloat | ( | String | key | ) |
| float com.fs.starfarer.api.SettingsAPI.getFloatFromArray | ( | String | key, |
| int | index ) |
| float com.fs.starfarer.api.SettingsAPI.getFriendlyFireDanger | ( | ShipAPI | shooter, |
| CombatEntityAPI | target, | ||
| Vector2f | from, | ||
| Vector2f | to, | ||
| float | weaponSpeed, | ||
| float | burstFireDuration, | ||
| float | weaponRange ) |
| String com.fs.starfarer.api.SettingsAPI.getGameVersion | ( | ) |
Returns e.g. "0.95a-RC12"
| ListMap< String > com.fs.starfarer.api.SettingsAPI.getHullIdToVariantListMap | ( | ) |
For default ship roles.
| HullModSpecAPI com.fs.starfarer.api.SettingsAPI.getHullModSpec | ( | String | modId | ) |
| ShipHullSpecAPI com.fs.starfarer.api.SettingsAPI.getHullSpec | ( | String | hullId | ) |
| Set< String > com.fs.starfarer.api.SettingsAPI.getIndustryDemand | ( | String | industryId | ) |
| IndustrySpecAPI com.fs.starfarer.api.SettingsAPI.getIndustrySpec | ( | String | industryId | ) |
| Set< String > com.fs.starfarer.api.SettingsAPI.getIndustrySupply | ( | String | industryId | ) |
| Object com.fs.starfarer.api.SettingsAPI.getInstanceOfScript | ( | String | className | ) |
| int com.fs.starfarer.api.SettingsAPI.getInt | ( | String | key | ) |
| int com.fs.starfarer.api.SettingsAPI.getIntFromArray | ( | String | key, |
| int | index ) |
| JSONArray com.fs.starfarer.api.SettingsAPI.getJSONArray | ( | String | key | ) | throws JSONException |
| JSONObject com.fs.starfarer.api.SettingsAPI.getJSONObject | ( | String | key | ) | throws JSONException |
| LevelupPlugin com.fs.starfarer.api.SettingsAPI.getLevelupPlugin | ( | ) |
| MarketConditionSpecAPI com.fs.starfarer.api.SettingsAPI.getMarketConditionSpec | ( | String | conditionId | ) |
| float com.fs.starfarer.api.SettingsAPI.getMaxArmorDamageReduction | ( | ) |
| float com.fs.starfarer.api.SettingsAPI.getMaxFleetSelectionRadius | ( | ) |
| int com.fs.starfarer.api.SettingsAPI.getMaxSensorRange | ( | ) |
| int com.fs.starfarer.api.SettingsAPI.getMaxSensorRange | ( | LocationAPI | loc | ) |
| int com.fs.starfarer.api.SettingsAPI.getMaxSensorRangeHyper | ( | ) |
| int com.fs.starfarer.api.SettingsAPI.getMaxShipsInFleet | ( | ) |
| JSONObject com.fs.starfarer.api.SettingsAPI.getMergedJSON | ( | String | path | ) | throws IOException, JSONException |
| JSONObject com.fs.starfarer.api.SettingsAPI.getMergedJSONForMod | ( | String | path, |
| String | masterMod ) throws IOException, JSONException |
| JSONArray com.fs.starfarer.api.SettingsAPI.getMergedSpreadsheetData | ( | String | idColumn, |
| String | path ) throws IOException, JSONException |
| 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.
| idColumn | the column to be used as the key for merging spreadsheets. |
| path | the location of the spreadsheet, i.e. "mydata/spreadsheet.csv". |
| masterMod | name 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. |
| IOException | |
| JSONException |
| float com.fs.starfarer.api.SettingsAPI.getMinArmorFraction | ( | ) |
| int com.fs.starfarer.api.SettingsAPI.getMissionScore | ( | String | id | ) |
| PersonMissionSpec com.fs.starfarer.api.SettingsAPI.getMissionSpec | ( | String | id | ) |
| ModManagerAPI com.fs.starfarer.api.SettingsAPI.getModManager | ( | ) |
| int com.fs.starfarer.api.SettingsAPI.getMouseX | ( | ) |
Converted to virtual screen coordinates, i.e. adjusted for screen scaling.
| int com.fs.starfarer.api.SettingsAPI.getMouseY | ( | ) |
Converted to virtual screen coordinates, i.e. adjusted for screen scaling.
| Object com.fs.starfarer.api.SettingsAPI.getNewPluginInstance | ( | String | id | ) |
| String com.fs.starfarer.api.SettingsAPI.getNextCoolGreekLetter | ( | Object | context | ) |
| String com.fs.starfarer.api.SettingsAPI.getNextGreekLetter | ( | Object | context | ) |
| PersonalityAPI com.fs.starfarer.api.SettingsAPI.getPersonaltySpec | ( | String | id | ) |
| 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.
| id |
| String com.fs.starfarer.api.SettingsAPI.getRoman | ( | int | n | ) |
| n | 1 to 3999. |
| float com.fs.starfarer.api.SettingsAPI.getSafeMovementDir | ( | ShipAPI | ship | ) |
| float com.fs.starfarer.api.SettingsAPI.getScreenHeight | ( | ) |
Virtual pixels, i.e. divided by getScreenScaleMult().
| float com.fs.starfarer.api.SettingsAPI.getScreenHeightPixels | ( | ) |
| float com.fs.starfarer.api.SettingsAPI.getScreenScaleMult | ( | ) |
| float com.fs.starfarer.api.SettingsAPI.getScreenWidth | ( | ) |
Virtual pixels, i.e. divided by getScreenScaleMult().
| float com.fs.starfarer.api.SettingsAPI.getScreenWidthPixels | ( | ) |
| ClassLoader com.fs.starfarer.api.SettingsAPI.getScriptClassLoader | ( | ) |
| float com.fs.starfarer.api.SettingsAPI.getSensorRangeMax | ( | ) |
| float com.fs.starfarer.api.SettingsAPI.getSensorRangeMaxHyper | ( | ) |
| JSONObject com.fs.starfarer.api.SettingsAPI.getSettingsJSON | ( | ) |
| int com.fs.starfarer.api.SettingsAPI.getShippingCapacity | ( | MarketAPI | market, |
| boolean | inFaction ) |
| ShipSystemSpecAPI com.fs.starfarer.api.SettingsAPI.getShipSystemSpec | ( | String | id | ) |
| List< String > com.fs.starfarer.api.SettingsAPI.getSimOpponents | ( | ) |
| List< String > com.fs.starfarer.api.SettingsAPI.getSimOpponentsDev | ( | ) |
| List< String > com.fs.starfarer.api.SettingsAPI.getSkillIds | ( | ) |
| SkillSpecAPI com.fs.starfarer.api.SettingsAPI.getSkillSpec | ( | String | skillId | ) |
| List< String > com.fs.starfarer.api.SettingsAPI.getSortedAbilityIds | ( | ) |
| List< String > com.fs.starfarer.api.SettingsAPI.getSortedSkillIds | ( | ) |
| Object com.fs.starfarer.api.SettingsAPI.getSpec | ( | Class | c, |
| String | id, | ||
| boolean | nullOnNotFound ) |
| SpecialItemSpecAPI com.fs.starfarer.api.SettingsAPI.getSpecialItemSpec | ( | String | itemId | ) |
| float com.fs.starfarer.api.SettingsAPI.getSpeedPerBurnLevel | ( | ) |
Same as the method that takes (String category, String key). SpriteId is just a container class for category + id.
| id |
| SpriteAPI com.fs.starfarer.api.SettingsAPI.getSprite | ( | String | category, |
| String | id, | ||
| boolean | emptySpriteOnNotFound ) |
| SpriteAPI com.fs.starfarer.api.SettingsAPI.getSprite | ( | String | category, |
| String | key ) |
Gets a sprite loaded using the "graphics" section in data/config/settings.json.
| category | |
| key |
| 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.
| filename |
| List< String > com.fs.starfarer.api.SettingsAPI.getSpriteKeys | ( | String | category | ) |
| List< String > com.fs.starfarer.api.SettingsAPI.getSpriteKeys | ( | String | category, |
| String | listId ) |
| String com.fs.starfarer.api.SettingsAPI.getSpriteName | ( | String | category, |
| String | id ) |
| String com.fs.starfarer.api.SettingsAPI.getString | ( | String | category, |
| String | id ) |
Gets a string from a given category in strings.json
| category | |
| id |
| String com.fs.starfarer.api.SettingsAPI.getString | ( | String | key | ) |
| List< WeaponSpecAPI > com.fs.starfarer.api.SettingsAPI.getSystemWeaponSpecs | ( | ) |
| 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.
| from | |
| target | |
| considerShield |
| TerrainSpecAPI com.fs.starfarer.api.SettingsAPI.getTerrainSpec | ( | String | terrainId | ) |
| float com.fs.starfarer.api.SettingsAPI.getUnitsPerLightYear | ( | ) |
| ShipVariantAPI com.fs.starfarer.api.SettingsAPI.getVariant | ( | String | variantId | ) |
| String com.fs.starfarer.api.SettingsAPI.getVersionString | ( | ) |
| WeaponSpecAPI com.fs.starfarer.api.SettingsAPI.getWeaponSpec | ( | String | weaponId | ) |
| void com.fs.starfarer.api.SettingsAPI.greekLetterReset | ( | ) |
| boolean com.fs.starfarer.api.SettingsAPI.hasDesignTypeColor | ( | String | designType | ) |
| boolean com.fs.starfarer.api.SettingsAPI.isAutoTurnMode | ( | ) |
| boolean com.fs.starfarer.api.SettingsAPI.isCampaignSensorsOn | ( | ) |
| boolean com.fs.starfarer.api.SettingsAPI.isDevMode | ( | ) |
| boolean com.fs.starfarer.api.SettingsAPI.isEnableShipExplosionWhiteout | ( | ) |
| boolean com.fs.starfarer.api.SettingsAPI.isGeneratingNewGame | ( | ) |
| boolean com.fs.starfarer.api.SettingsAPI.isInCampaignState | ( | ) |
| boolean com.fs.starfarer.api.SettingsAPI.isInGame | ( | ) |
For modding purposes, always returns true.
| boolean com.fs.starfarer.api.SettingsAPI.isNewPlayer | ( | ) |
| boolean com.fs.starfarer.api.SettingsAPI.isShowDamageFloaties | ( | ) |
| boolean com.fs.starfarer.api.SettingsAPI.isShowingCodex | ( | ) |
| boolean com.fs.starfarer.api.SettingsAPI.isSoundEnabled | ( | ) |
| boolean com.fs.starfarer.api.SettingsAPI.isStrafeKeyAToggle | ( | ) |
| 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).
| filename |
| IOException | |
| JSONException |
| JSONArray com.fs.starfarer.api.SettingsAPI.loadCSV | ( | String | filename, |
| boolean | withMods ) throws IOException, JSONException |
| JSONArray com.fs.starfarer.api.SettingsAPI.loadCSV | ( | String | filename, |
| String | modId ) throws IOException, JSONException |
| void com.fs.starfarer.api.SettingsAPI.loadFont | ( | String | filename | ) | throws IOException |
| 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).
| filename |
| IOException |
| JSONObject com.fs.starfarer.api.SettingsAPI.loadJSON | ( | String | filename, |
| boolean | withMods ) throws IOException, JSONException |
| JSONObject com.fs.starfarer.api.SettingsAPI.loadJSON | ( | String | filename, |
| String | modId ) throws IOException, JSONException |
| 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).
| filename |
| IOException |
| String com.fs.starfarer.api.SettingsAPI.loadText | ( | String | filename, |
| String | modId ) throws IOException, JSONException |
| void com.fs.starfarer.api.SettingsAPI.loadTexture | ( | String | filename | ) | throws IOException |
| void com.fs.starfarer.api.SettingsAPI.loadTextureConvertBlackToAlpha | ( | String | filename | ) | throws IOException |
| 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).
| filename |
| IOException |
| boolean com.fs.starfarer.api.SettingsAPI.optBoolean | ( | String | key, |
| boolean | defaultValue ) |
| ShipAIPlugin com.fs.starfarer.api.SettingsAPI.pickShipAIPlugin | ( | FleetMemberAPI | member, |
| ShipAPI | ship ) |
| void com.fs.starfarer.api.SettingsAPI.profilerBegin | ( | String | id | ) |
| void com.fs.starfarer.api.SettingsAPI.profilerEnd | ( | ) |
| void com.fs.starfarer.api.SettingsAPI.profilerPrintResultsTree | ( | ) |
| void com.fs.starfarer.api.SettingsAPI.profilerReset | ( | ) |
| void com.fs.starfarer.api.SettingsAPI.profilerRestore | ( | ) |
| void com.fs.starfarer.api.SettingsAPI.profilerSetEnabled | ( | boolean | enabled | ) |
| void com.fs.starfarer.api.SettingsAPI.putSpec | ( | Class | c, |
| String | id, | ||
| Object | spec ) |
| JSONObject com.fs.starfarer.api.SettingsAPI.readJSONFromCommon | ( | String | filename, |
| boolean | putInWriteCache ) throws IOException, JSONException |
| putInWriteCache | should only be set to true for files you intend to call writeJSONToCommon() for with onlyIfChanged == true. Otherwise, causes unnecessary memory use. |
| String com.fs.starfarer.api.SettingsAPI.readTextFileFromCommon | ( | String | filename | ) | throws IOException |
| void com.fs.starfarer.api.SettingsAPI.removeDefaultEntryForRole | ( | String | role, |
| String | variantId ) |
| void com.fs.starfarer.api.SettingsAPI.removeEntryForRole | ( | String | factionId, |
| String | role, | ||
| String | variantId ) |
| void com.fs.starfarer.api.SettingsAPI.resetCached | ( | ) |
Must be called after making any changes to result of getSettingsJSON().
| void com.fs.starfarer.api.SettingsAPI.setAutoTurnMode | ( | boolean | autoTurnMode | ) |
| void com.fs.starfarer.api.SettingsAPI.setBoolean | ( | String | key, |
| Boolean | value ) |
| void com.fs.starfarer.api.SettingsAPI.setDevMode | ( | boolean | devMode | ) |
| void com.fs.starfarer.api.SettingsAPI.setEasySensorBonus | ( | float | easySensorBonus | ) |
| void com.fs.starfarer.api.SettingsAPI.setEnableShipExplosionWhiteout | ( | boolean | enableShipExplosionWhiteout | ) |
| void com.fs.starfarer.api.SettingsAPI.setFloat | ( | String | key, |
| Float | value ) |
| void com.fs.starfarer.api.SettingsAPI.showCodex | ( | CodexEntryPlugin | tempEntry | ) |
| void com.fs.starfarer.api.SettingsAPI.showCodex | ( | FleetMemberAPI | member | ) |
| void com.fs.starfarer.api.SettingsAPI.showCodex | ( | List< CodexEntryPlugin > | tempEntries | ) |
Will show the first entry, but will add all of the entries temporarily, until the Codex is closed.
| tempEntries |
| void com.fs.starfarer.api.SettingsAPI.showCodex | ( | String | entryId | ) |
Can be called from anywhere. Will do nothing if the Codex is already open.
| entryId |
| void com.fs.starfarer.api.SettingsAPI.unloadTexture | ( | String | filename | ) |
| void com.fs.starfarer.api.SettingsAPI.writeJSONToCommon | ( | String | filename, |
| JSONObject | json, | ||
| boolean | onlyIfChanged ) throws IOException, JSONException |
| onlyIfChanged | should be used sparingly, for something where the file size is fairly small and the writes are common/time sensitive. If true, the write will also happen on a new thread. Can cause increased memory use if overused for large files. |
| void com.fs.starfarer.api.SettingsAPI.writeTextFileToCommon | ( | String | filename, |
| String | data ) throws IOException |
Max size 1mb.
| filename | |
| data |
| IOException |