Interface CampaignEventPlugin
- All Superinterfaces:
CallEvent.CallableEvent
- All Known Implementing Classes:
BaseEventPlugin
,CivilDisorder
,FactionHostilityEvent
,FleetLogEvent
,FoodShortageEvent
,InvestigationEvent
,InvestigationEventCommSniffer
,InvestigationEventGoodRepWithOther
,InvestigationEventSmugglingV2
,NearbyEventsEvent
,OfficerManagerEvent
,RecentUnrestEvent
,RepTrackerEvent
,TestEvent
,TradeInfoUpdateEvent
,TutorialMissionEvent
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enum
static interface
-
Method Summary
Modifier and TypeMethodDescriptionvoid
advance
(float amount) boolean
Deprecated.boolean
callEvent
(String ruleId, InteractionDialogAPI dialog, List<Misc.Token> params, Map<String, MemoryAPI> memoryMap) Called by the CallEvent command (called from rules.csv).void
cleanup()
Called when this instance of the event is removed from the event manager (either due to event being over, or due to event probability dropping to 0).The larger image in the message detail.Will be called by SectorAPI.reportEventStage().Override for the "image" normally specified in events.json.Color[]
getHighlightColors
(String stageId) Since multiple reports (possibly from different channels) are possible per stage: 1) All reports must have the highlighted text occur in the same order, which is the order this method returns them in, and 2) Not all highlights have to occur in every report.String[]
getHighlights
(String stageId) Since multiple reports (possibly from different channels) are possible per stage: 1) All reports must have the highlighted text occur in the same order, which is the order this method returns them in, and 2) Not all highlights have to occur in every report.getId()
Unique ID for this instance of the event.event_stage for when the event is likely, but hasn't happened yet.event_stage for when the event is possible, but hasn't happened yet.Token values for filling out descriptions from reports.csv.Message priority for the "event is likely" report.Message priority for the "event is possible" report.void
init
(String eventType, CampaignEventTarget eventTarget) Called when the EventProbability for this event is accessed.boolean
isDone()
void
Only called when an event is started via CampaignEventManagerAPI.startEvent().void
setProbability
(float p) The probability that the event had of happening, set right before startEvent() is called.boolean
If true, messages for an ongoing event will be shown in the intel UI even if they don't meet the "last week/month/cycle" criteria.boolean
void
Called when the event starts.boolean
-
Method Details
-
getId
String getId()Unique ID for this instance of the event.- Returns:
-
init
Called when the EventProbability for this event is accessed. Doesn't mean the event will actually happen.- Parameters:
eventType
-eventTarget
-
-
cleanup
void cleanup()Called when this instance of the event is removed from the event manager (either due to event being over, or due to event probability dropping to 0). -
setProbability
void setProbability(float p) The probability that the event had of happening, set right before startEvent() is called. Set to 1 by events started using CampaignEventManagerAPI.startEvent().- Parameters:
p
-
-
startEvent
void startEvent()Called when the event starts. -
advance
void advance(float amount) -
isDone
boolean isDone() -
getEventTarget
CampaignEventTarget getEventTarget() -
getEventType
String getEventType() -
getTokenReplacements
Token values for filling out descriptions from reports.csv.- Returns:
-
getHighlights
Since multiple reports (possibly from different channels) are possible per stage: 1) All reports must have the highlighted text occur in the same order, which is the order this method returns them in, and 2) Not all highlights have to occur in every report.- Parameters:
stageId
-- Returns:
-
getHighlightColors
Since multiple reports (possibly from different channels) are possible per stage: 1) All reports must have the highlighted text occur in the same order, which is the order this method returns them in, and 2) Not all highlights have to occur in every report.- Parameters:
stageId
-- Returns:
-
getStageIdForPossible
String getStageIdForPossible()event_stage for when the event is possible, but hasn't happened yet.- Returns:
-
getWarningWhenPossiblePriority
MessagePriority getWarningWhenPossiblePriority()Message priority for the "event is possible" report.- Returns:
-
getStageIdForLikely
String getStageIdForLikely()event_stage for when the event is likely, but hasn't happened yet.- Returns:
-
getWarningWhenLikelyPriority
MessagePriority getWarningWhenLikelyPriority()Message priority for the "event is likely" report.- Returns:
-
setParam
Only called when an event is started via CampaignEventManagerAPI.startEvent().- Parameters:
param
-
-
allowMultipleOngoingForSameTarget
Deprecated.DO NOT USE, DOES NOT WORK. Should always return false.- Returns:
-
getEventName
String getEventName() -
useEventNameAsId
boolean useEventNameAsId() -
getEventCategory
CampaignEventPlugin.CampaignEventCategory getEventCategory() -
getRelatedCommodities
-
getPriceUpdates
List<CampaignEventPlugin.PriceUpdatePlugin> getPriceUpdates() -
getCurrentMessageIcon
String getCurrentMessageIcon()Will be called by SectorAPI.reportEventStage(). Can change between calls. The priority for icons is: 1) Icon configured in reports.csv for the specific report 2) Return value of this method 3) Event's icon (via getEventIcon() and then from events.json) 4) Channel's icon, if message isn't related to an event or the event has no icon.- Returns:
-
getCurrentImage
String getCurrentImage()The larger image in the message detail.- Returns:
-
getEventIcon
String getEventIcon()Override for the "image" normally specified in events.json. Small.- Returns:
-
showAllMessagesIfOngoing
boolean showAllMessagesIfOngoing()If true, messages for an ongoing event will be shown in the intel UI even if they don't meet the "last week/month/cycle" criteria.- Returns:
-
callEvent
boolean callEvent(String ruleId, InteractionDialogAPI dialog, List<Misc.Token> params, Map<String, MemoryAPI> memoryMap) Called by the CallEvent command (called from rules.csv).- Specified by:
callEvent
in interfaceCallEvent.CallableEvent
- Parameters:
memoryMap
-params
-
-
getMemory
MemoryAPI getMemory() -
showLatestMessageIfOngoing
boolean showLatestMessageIfOngoing()
-