Class FleetGroupIntel
java.lang.Object
com.fs.starfarer.api.impl.campaign.intel.BaseIntelPlugin
com.fs.starfarer.api.impl.campaign.intel.group.FleetGroupIntel
- All Implemented Interfaces:
IntelInfoPlugin
,EveryFrameScript
,CommRelayEntityPlugin.CommSnifferReadableIntel
,RouteManager.RouteFleetSpawner
,CallEvent.CallableEvent
- Direct Known Subclasses:
GenericRaidFGI
,TestFleetGroupIntel
public abstract class FleetGroupIntel
extends BaseIntelPlugin
implements RouteManager.RouteFleetSpawner
- Author:
- Alex Copyright 2023 Fractal Softworks, LLC
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
static interface
Nested classes/interfaces inherited from interface com.fs.starfarer.api.campaign.comm.IntelInfoPlugin
IntelInfoPlugin.ArrowData, IntelInfoPlugin.IntelSortTier, IntelInfoPlugin.ListInfoMode, IntelInfoPlugin.TableRowClickData
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic String
protected boolean
protected int
static boolean
protected boolean
protected float
protected FactionAPI
protected boolean
static String
protected float
protected List<CampaignFleetAPI>
protected float
static final String
static final String
static final String
protected FleetGroupIntel.FGIEventListener
static final String
protected RouteManager.RouteSegment
protected Random
protected SectorEntityToken
protected RouteManager.RouteData
protected boolean
protected boolean
protected float
protected boolean
protected List<CampaignFleetAPI>
protected LocationAPI
protected float
Fields inherited from class com.fs.starfarer.api.impl.campaign.intel.BaseIntelPlugin
BULLET, BUTTON_DELETE, ended, ending, endingTimeRemaining, forceAdd, hidden, important, INDENT, listInfoParam, neverClicked, postingLocation, postingRangeLY, tagsForSort, timestamp
Fields inherited from interface com.fs.starfarer.api.campaign.comm.IntelInfoPlugin
LIST_ITEM_TEXT_WIDTH, NEW_DAYS
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
abort()
void
void
protected void
addArrivedBulletPoint
(String destName, Color destHL, TooltipMakerAPI info, Color tc, float initPad) protected void
addAssessmentSection
(TooltipMakerAPI info, float width, float height, float opad) protected void
addBasicDescription
(TooltipMakerAPI info, float width, float height, float opad) protected void
protected void
addETABulletPoints
(String destName, Color destHL, boolean withDepartedText, float eta, FleetGroupIntel.ETAType type, TooltipMakerAPI info, Color tc, float initPad) protected void
addFactionBulletPoint
(TooltipMakerAPI info, Color tc, float initPad) protected abstract void
addNonUpdateBulletPoints
(TooltipMakerAPI info, Color tc, Object param, IntelInfoPlugin.ListInfoMode mode, float initPad) protected void
addStatusSection
(TooltipMakerAPI info, float width, float height, float opad) protected boolean
addStrengthDesc
(TooltipMakerAPI info, float opad, MarketAPI target, String forces, String outcomeFailure, String outcomeUncertain, String outcomeSuccess) Returns true if the defenses in the target system are weaker.protected boolean
addStrengthDesc
(TooltipMakerAPI info, float opad, StarSystemAPI system, String forces, String outcomeFailure, String outcomeUncertain, String outcomeSuccess) Returns true if the defenses in the target system are weaker.protected abstract void
addUpdateBulletPoints
(TooltipMakerAPI info, Color tc, Object param, IntelInfoPlugin.ListInfoMode mode, float initPad) void
advance
(float amount) Use SectorAPI.getClock() to convert to campaign days.protected void
static void
Very approximately, the result is around 50 points of "effective strength" per point of difficulty.void
protected void
createRoute
(String factionId, int approximateTotalDifficultyPoints, int approximateNumberOfFleets, Object custom) protected void
createRoute
(String factionId, int approximateTotalDifficultyPoints, int approximateNumberOfFleets, Object custom, GenericRaidFGI.GenericRaidParams params) void
createSmallDescription
(TooltipMakerAPI info, float width, float height) void
finish
(boolean isAbort) int
static float
getApproximateStrengthForTotalDifficultyPoints
(String factionId, int points) getArrowData
(SectorMapAPI map) protected abstract String
float
protected abstract SectorEntityToken
float
float
getETAUntil
(String actionId) float
getETAUntil
(String actionId, boolean untilEndOfAction) float
float
getIcon()
40x40, no icon if null.getIntelTags
(SectorMapAPI map) Method NEEDS to handle map being null gracefully.static LocationAPI
getLocation
(RouteManager.RouteSegment segment) static LocationAPI
getName()
getNameWithNoType
(String systemName) protected float
int
getRelativeFGStrength
(StarSystemAPI target) -1: fleet group is weaker 0: evenly matched 1: fleet group is strongergetRoute()
getSegmentForAction
(FGAction action) protected abstract SectorEntityToken
float
getTravelState
(RouteManager.RouteSegment segment) protected void
protected void
void
handleIncrementalSpawning
(float amount) boolean
boolean
boolean
boolean
isFailed()
boolean
boolean
protected abstract boolean
protected boolean
boolean
boolean
boolean
protected void
notifyActionFinished
(FGAction action) protected void
protected void
protected Object
void
removeAction
(String id) void
void
setApproximateNumberOfFleets
(int approximateNumberOfFleets) void
setDoIncrementalSpawn
(boolean doIncrementalSpawn) void
setElapsed
(float elapsed) void
setFaction
(FactionAPI faction) void
setFaction
(String factionId) void
setFailedButNotDefeated
(boolean failedButNotDefeated) void
setFleetAbortsMissionFPFraction
(float fleetAbortsMissionFPFraction) void
setGroupAbortsMissionFPFraction
(float groupAbortsMissionFPFraction) void
setListener
(FleetGroupIntel.FGIEventListener listener) static void
setLocationAndCoordinates
(CampaignFleetAPI fleet, RouteManager.RouteSegment current) void
void
setPreFleetDeploymentDelay
(float delay) route needs to be created when this method is called.void
void
setReturnLocation
(SectorEntityToken returnLocation) void
setRoute
(RouteManager.RouteData route) void
setSpawnedFleets
(boolean spawnedFleets) void
setTotalFPSpawned
(float totalFPSpawned) protected boolean
boolean
boolean
protected boolean
protected void
showMarketsInDanger
(TooltipMakerAPI info, float opad, float width, StarSystemAPI system, List<MarketAPI> targets, String safeStr, String riskStr, String riskStrHighlight) spawnFleet
(RouteManager.RouteData route) protected abstract void
Methods inherited from class com.fs.starfarer.api.impl.campaign.intel.BaseIntelPlugin
addBulletPoints, addDays, addDays, addDays, addDays, addDeleteButton, addDeleteButton, addGenericButton, addGenericButton, addLogTimestamp, addMarketTable, addMarketToList, addMarketToList, advanceImpl, autoAddCampaignMessage, bullet, buttonPressCancelled, buttonPressConfirmed, callEvent, canMakeVisible, canMakeVisibleToCommSniffer, canMakeVisibleToPlayer, canTurnImportantOff, createConfirmationPrompt, createDeleteConfirmationPrompt, createLargeDescription, doesButtonHaveConfirmDialog, endAfterDelay, endAfterDelay, endImmediately, forceAddNextFrame, getBackgroundGlowColor, getBaseDaysAfterEnd, getBulletColorForMode, getButtonStoryPointActionDelegate, getCancelText, getCircleBorderColorOverride, getCommRelayRange, getConfirmationPromptWidth, getConfirmText, getDays, getDaysSincePlayerVisible, getDaysString, getImportantIcon, getListInfoParam, getPlayerVisibleTimestamp, getPostingLocation, getPostingRangeLY, getSortStringNewestFirst, getSortStringNewestFirst, getSoundColonyThreat, getSoundLogUpdate, getSoundMajorPosting, getSoundMinorMessage, getSoundStandardPosting, getSoundStandardUpdate, getTagsForSort, getTimeRemainingFraction, getTitleColor, hasImportantButton, hasLargeDescription, hasSmallDescription, indent, isDone, isEnded, isEnding, isHidden, isImportant, isNew, isPlayerVisible, isSendingUpdate, notifyEnding, notifyPlayerAboutToOpenIntelScreen, reportMadeVisibleToPlayer, reportPlayerClickedOn, reportRemovedIntel, runWhilePaused, sendUpdate, sendUpdateIfPlayerHasIntel, sendUpdateIfPlayerHasIntel, sendUpdateIfPlayerHasIntel, setForceAddNextFrame, setHidden, setImportant, setListInfoParam, setNew, setPlayerVisibleTimestamp, setPostingLocation, setPostingRangeLY, setPostingRangeLY, setTagsForSort, shouldRemoveIntel, storyActionConfirmed, tableRowClicked, unindent
-
Field Details
-
ABORT_UPDATE
-
FLEET_LAUNCH_UPDATE
-
KEY_SPAWN_FP
- See Also:
-
NEVER_STRAGGLER
- See Also:
-
KEY_POTENTIAL_STRAGGLER
- See Also:
-
KEY_STRAGGLER_RETURN_COUNTDOWN
- See Also:
-
DEBUG
public static boolean DEBUG -
random
-
actions
-
route
-
prevSegment
-
fleets
-
spawnedFleets
protected boolean spawnedFleets -
doIncrementalSpawn
protected boolean doIncrementalSpawn -
spawning
-
spawnLocation
-
spawnDelay
protected float spawnDelay -
elapsed
protected float elapsed -
aborted
protected boolean aborted -
totalFPSpawned
protected float totalFPSpawned -
fleetAbortsMissionFPFraction
protected float fleetAbortsMissionFPFraction -
groupAbortsMissionFPFraction
protected float groupAbortsMissionFPFraction -
returnLocation
-
faction
-
approximateNumberOfFleets
protected int approximateNumberOfFleets -
listener
-
sourceWasEverMilitaryMarket
protected boolean sourceWasEverMilitaryMarket -
sendFleetLaunchUpdate
protected boolean sendFleetLaunchUpdate -
failedButNotDefeated
protected boolean failedButNotDefeated
-
-
Constructor Details
-
FleetGroupIntel
public FleetGroupIntel()
-
-
Method Details
-
readResolve
-
getETAUntil
-
getETAUntil
-
notifyEnded
protected void notifyEnded()- Overrides:
notifyEnded
in classBaseIntelPlugin
-
isSourceFunctionalMilitaryMarket
protected boolean isSourceFunctionalMilitaryMarket() -
isInPreLaunchDelay
public boolean isInPreLaunchDelay() -
setPreFleetDeploymentDelay
public void setPreFleetDeploymentDelay(float delay) route needs to be created when this method is called.- Parameters:
delay
-
-
getDelayRemaining
public float getDelayRemaining() -
getElapsed
public float getElapsed() -
setElapsed
public void setElapsed(float elapsed) -
advance
public void advance(float amount) Description copied from interface:EveryFrameScript
Use SectorAPI.getClock() to convert to campaign days.- Specified by:
advance
in interfaceEveryFrameScript
- Overrides:
advance
in classBaseIntelPlugin
- Parameters:
amount
- seconds elapsed during the last frame.
-
shouldAbort
protected boolean shouldAbort() -
shouldSendIntelUpdateWhenActionFinished
-
notifyActionFinished
-
pruneDestroyedOrDamagedFleetsAndAbortIfNeeded
protected void pruneDestroyedOrDamagedFleetsAndAbortIfNeeded() -
checkStragglers
protected void checkStragglers() -
getPotentialStragglerCountdownDays
protected float getPotentialStragglerCountdownDays() -
isFailedButNotDefeated
public boolean isFailedButNotDefeated() -
setFailedButNotDefeated
public void setFailedButNotDefeated(boolean failedButNotDefeated) -
abort
public void abort() -
finish
public void finish(boolean isAbort) -
isSpawning
public boolean isSpawning() -
isAborted
public boolean isAborted() -
giveFleetsReturnAssignments
protected void giveFleetsReturnAssignments() -
giveReturnAssignments
-
createRoute
-
createRoute
protected void createRoute(String factionId, int approximateTotalDifficultyPoints, int approximateNumberOfFleets, Object custom, GenericRaidFGI.GenericRaidParams params) -
setRoute
-
spawnFleet
- Specified by:
spawnFleet
in interfaceRouteManager.RouteFleetSpawner
-
setNeverStraggler
-
handleIncrementalSpawning
public void handleIncrementalSpawning(float amount) -
isDoIncrementalSpawn
public boolean isDoIncrementalSpawn() -
setDoIncrementalSpawn
public void setDoIncrementalSpawn(boolean doIncrementalSpawn) -
getTotalFPSpawned
public float getTotalFPSpawned() -
setTotalFPSpawned
public void setTotalFPSpawned(float totalFPSpawned) -
setSpawnedFleets
public void setSpawnedFleets(boolean spawnedFleets) -
getSegmentForAction
-
removeAction
-
getAction
-
isCurrent
-
getCurrentAction
-
isSpawnedFleets
public boolean isSpawnedFleets() -
getApproximateNumberOfFleets
public int getApproximateNumberOfFleets() -
setApproximateNumberOfFleets
public void setApproximateNumberOfFleets(int approximateNumberOfFleets) -
getFleets
-
getTravelState
-
getLocation
-
getLocationForState
public static LocationAPI getLocationForState(RouteManager.RouteSegment segment, RouteFleetAssignmentAI.TravelState state) -
setLocationAndCoordinates
public static void setLocationAndCoordinates(CampaignFleetAPI fleet, RouteManager.RouteSegment current) -
getActions
-
addAction
-
addAction
-
shouldCancelRouteAfterDelayCheck
- Specified by:
shouldCancelRouteAfterDelayCheck
in interfaceRouteManager.RouteFleetSpawner
-
shouldRepeat
- Specified by:
shouldRepeat
in interfaceRouteManager.RouteFleetSpawner
-
reportAboutToBeDespawnedByRouteManager
- Specified by:
reportAboutToBeDespawnedByRouteManager
in interfaceRouteManager.RouteFleetSpawner
-
getReturnLocation
-
setReturnLocation
-
getFleetAbortsMissionFPFraction
public float getFleetAbortsMissionFPFraction() -
setFleetAbortsMissionFPFraction
public void setFleetAbortsMissionFPFraction(float fleetAbortsMissionFPFraction) -
getGroupAbortsMissionFPFraction
public float getGroupAbortsMissionFPFraction() -
setGroupAbortsMissionFPFraction
public void setGroupAbortsMissionFPFraction(float groupAbortsMissionFPFraction) -
getFactionForUIColors
- Specified by:
getFactionForUIColors
in interfaceIntelInfoPlugin
- Overrides:
getFactionForUIColors
in classBaseIntelPlugin
-
setFaction
-
setFaction
-
getFaction
-
getRoute
-
getApproximateStrengthForTotalDifficultyPoints
-
computeSampleFleetStrengths
public static void computeSampleFleetStrengths()Very approximately, the result is around 50 points of "effective strength" per point of difficulty. Lower (30-40) for pirates/Pathers, a bit >50 for some of the main factions. Not a lot of difference for standard/quality/quantity, since those adjust size etc to try to stay even. -
isPlayerTargeted
protected abstract boolean isPlayerTargeted() -
spawnFleets
protected abstract void spawnFleets() -
getSource
-
getDestination
-
getBaseName
-
addNonUpdateBulletPoints
protected abstract void addNonUpdateBulletPoints(TooltipMakerAPI info, Color tc, Object param, IntelInfoPlugin.ListInfoMode mode, float initPad) -
addUpdateBulletPoints
protected abstract void addUpdateBulletPoints(TooltipMakerAPI info, Color tc, Object param, IntelInfoPlugin.ListInfoMode mode, float initPad) -
addStatusSection
-
addAssessmentSection
-
addBasicDescription
-
getIntelTags
Description copied from interface:IntelInfoPlugin
Method NEEDS to handle map being null gracefully.- Specified by:
getIntelTags
in interfaceIntelInfoPlugin
- Overrides:
getIntelTags
in classBaseIntelPlugin
- Returns:
-
getSortString
- Specified by:
getSortString
in interfaceIntelInfoPlugin
- Overrides:
getSortString
in classBaseIntelPlugin
-
getSuccessPostfix
-
getFailurePostfix
-
getName
- Overrides:
getName
in classBaseIntelPlugin
-
isSucceeded
public boolean isSucceeded() -
isFailed
public boolean isFailed() -
createIntelInfo
- Specified by:
createIntelInfo
in interfaceIntelInfoPlugin
- Overrides:
createIntelInfo
in classBaseIntelPlugin
-
getIcon
Description copied from interface:IntelInfoPlugin
40x40, no icon if null.- Specified by:
getIcon
in interfaceIntelInfoPlugin
- Overrides:
getIcon
in classBaseIntelPlugin
- Returns:
-
getSmallDescriptionTitle
- Specified by:
getSmallDescriptionTitle
in interfaceIntelInfoPlugin
- Overrides:
getSmallDescriptionTitle
in classBaseIntelPlugin
-
getSortTier
- Specified by:
getSortTier
in interfaceIntelInfoPlugin
- Overrides:
getSortTier
in classBaseIntelPlugin
-
getMapLocation
- Specified by:
getMapLocation
in interfaceIntelInfoPlugin
- Overrides:
getMapLocation
in classBaseIntelPlugin
-
getArrowData
- Specified by:
getArrowData
in interfaceIntelInfoPlugin
- Overrides:
getArrowData
in classBaseIntelPlugin
-
getRandom
-
setRandom
-
addBulletPoints
- Overrides:
addBulletPoints
in classBaseIntelPlugin
-
addFactionBulletPoint
-
addArrivedBulletPoint
protected void addArrivedBulletPoint(String destName, Color destHL, TooltipMakerAPI info, Color tc, float initPad) -
getNameWithNoType
-
addETABulletPoints
protected void addETABulletPoints(String destName, Color destHL, boolean withDepartedText, float eta, FleetGroupIntel.ETAType type, TooltipMakerAPI info, Color tc, float initPad) -
createSmallDescription
- Specified by:
createSmallDescription
in interfaceIntelInfoPlugin
- Overrides:
createSmallDescription
in classBaseIntelPlugin
-
showMarketsInDanger
protected void showMarketsInDanger(TooltipMakerAPI info, float opad, float width, StarSystemAPI system, List<MarketAPI> targets, String safeStr, String riskStr, String riskStrHighlight) -
getRelativeFGStrength
-1: fleet group is weaker 0: evenly matched 1: fleet group is stronger- Parameters:
target
-- Returns:
-
addStrengthDesc
protected boolean addStrengthDesc(TooltipMakerAPI info, float opad, StarSystemAPI system, String forces, String outcomeFailure, String outcomeUncertain, String outcomeSuccess) Returns true if the defenses in the target system are weaker.- Returns:
-
addStrengthDesc
protected boolean addStrengthDesc(TooltipMakerAPI info, float opad, MarketAPI target, String forces, String outcomeFailure, String outcomeUncertain, String outcomeSuccess) Returns true if the defenses in the target system are weaker.- Returns:
-
getListener
-
setListener
-
getCommMessageSound
- Specified by:
getCommMessageSound
in interfaceIntelInfoPlugin
- Overrides:
getCommMessageSound
in classBaseIntelPlugin
-