Aggregation for sitrep events
Posted: Wed Feb 07, 2018 11:07 am
Hi, I was wondering for a while if we should support something like aggregation for sitrep events.
What I would like to have as features for the sitrep
Probably the aggregating would probably be helped by entries in FOCS. Probably independent of the Building... causing the messages.
Or we could simply add support for ships, systems, in stringtables... and some convention to the GenerateSitRepMessage (should suffice for many cases). E.g. by default use the multiMessage if the multiMessage is defined and if the effect gets triggered more than one time. So in this case if more than one system had enemies incoming, they would be put into %systems% in the MULTI_SITREP_SYSTEM_GOT_INCOMING_WARNING stringtable entry. This could result in a message like "Next turn enemy ships arrive at SysA, SysB, and SysC"
and in stringtables
The benefit i'm aiming for would be:
What I would like to have as features for the sitrep
- simple message for single event ('Should build a GG on planet blabla')
- aggregated message for multiple events of the same type ('You should build a GG on planets blabla, foo, bar and alderan beta').
- maybe the possibility to open/close aggregated message to see all the detailed events (Closed you see the aggregated 'You got incoming on planets blabla and foo'; opened you see 'You got an incoming troop fleet from TheEvilEmpire on planet blabla', 'You got an incoming combat fleet from TheEvilEmpire on planet blabla'; 'You got an incoming combat fleet from the TheEvilEmpire
- maybe the possibiltity in the UI to set aggregation limits ('Dont aggregate for this (type of) message', 'Aggregate message when at least 3 messages of this type')
- UI to enable or filter out messages (we already have this)
Probably the aggregating would probably be helped by entries in FOCS. Probably independent of the Building... causing the messages.
Code: Select all
SitRepAggregate
scope = Message message = "SITREP_SYSTEM_GOT_INCOMING_WARNING" low = 3
effect = GenerateSitRepMessage
message = "MULTI_SITREP_SYSTEM_GOT_INCOMING_WARNING"
label = "SITREP_SYSTEM_GOT_INCOMING_WARNING_LABEL"
icon = "icons/meter/ammo.png"
parameters = [
tag = "systems" aggregate = Target.SystemID
]
empire = Source.Owner
Code: Select all
// In EffectsGroup for warning about incoming enemies
effects =
GenerateSitRepMessage
message = "SITREP_SYSTEM_GOT_INCOMING_WARNING"
multiMessage = "MULTI_SITREP_SYSTEM_GOT_INCOMING_WARNING"
label = "SITREP_SYSTEM_GOT_INCOMING_WARNING_LABEL"
icon = "icons/meter/ammo.png"
parameters = [
tag = "system" data = Target.ID
]
empire = Source.Owner
and in stringtables
Code: Select all
SITREP_SYSTEM_GOT_INCOMING_WARNING
At %system%: Next turn enemy ships arrive"
MULTI_SITREP_SYSTEM_GOT_INCOMING_WARNING
Next turn enemy ships arrive at %systems%"
SITREP_SYSTEM_GOT_INCOMING_WARNING_LABEL
Incoming Enemies
The benefit i'm aiming for would be:
- simplification of writing sitrep messages
- more focussed, flexible, useful sitreps