Aggregation for sitrep events

For what's not in 'Top Priority Game Design'. Post your ideas, visions, suggestions for the game, rules, modifications, etc.

Moderator: Oberlus

Post Reply
Message
Author
Ophiuchus
Programmer
Posts: 3433
Joined: Tue Sep 30, 2014 10:01 am
Location: Wall IV

Aggregation for sitrep events

#1 Post by Ophiuchus »

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
  • 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)
In FOCS this would mean to make sitrep reports on the lowest interesting level (which is a natural fit for many effectGroups). These are treated as events and the sitrep UI calculates a view for it.
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
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"

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
I would open an issue for this if somebody else thinks this is a good idea...
Last edited by Ophiuchus on Tue Feb 20, 2018 10:44 am, edited 2 times in total.
Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.

Look, ma... four combat bouts!

User avatar
Oberlus
Cosmic Dragon
Posts: 5715
Joined: Mon Apr 10, 2017 4:25 pm

Re: Aggregation for sitrep events

#2 Post by Oberlus »

I guess this would also fix part of the "problem" that I have when moderating multiplayer (AI only) games: I get the sitreps of all the empires, so I see tens of "Algorithmic Elegance has been researched", etc. (the unsolved part is that I won't know which empires are since such sitreps were intended to be read only by the owner empire).

User avatar
Dilvish
AI Lead and Programmer Emeritus
Posts: 4768
Joined: Sat Sep 22, 2012 6:25 pm

Re: Aggregation for sitrep events

#3 Post by Dilvish »

There are some previous discussions, and even graphics mockups, I think, of being able to expand/collapse groups of related sitreps, you can probably find the mockups if you search the forums a bit. I think everyone was in favor of the general idea.

As for the rest of your post, you talk about a number of things which either I just couldn't make sense of what you were really wanting, or it seems to me we already have (like 'support for ships'). Even though these ideas are linked by the general topic of relating to sitreps, I think they are different enough that a clear discussion merits separate posts for the different ideas.
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0

LGM-Doyle
Programmer
Posts: 219
Joined: Mon Feb 29, 2016 8:37 pm

Re: Aggregation for sitrep events

#4 Post by LGM-Doyle »

dbenage produced a playable mockup with several aspects I liked.

Ophiuchus
Programmer
Posts: 3433
Joined: Tue Sep 30, 2014 10:01 am
Location: Wall IV

Re: Aggregation for sitrep events

#5 Post by Ophiuchus »

Dilvish wrote:it seems to me we already have (like 'support for ships').
What i meant is having a list of all affected ships shown in single sitrep. Not aware we have something like this or are you referring to the fleet (which is less general than i was thinking about)?
Even though these ideas are linked by the general topic of relating to sitreps, I think they are different enough that a clear discussion merits separate posts for the different ideas.
Ok, ill try to focus the discussion after trying the mockup.
LGM-Doyle wrote:dbenage produced a playable mockup with several aspects I liked.
Thanks for the link
Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.

Look, ma... four combat bouts!

Post Reply