FreeOrion

Forums for the FreeOrion project
It is currently Sun May 27, 2018 3:34 pm

All times are UTC




Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: Wed Feb 07, 2018 11:07 am 
Offline
Psionic Snowflake

Joined: Tue Sep 30, 2014 10:01 am
Posts: 454
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:
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:
// 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:
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...

_________________
Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.


Last edited by Ophiuchus on Tue Feb 20, 2018 10:44 am, edited 2 times in total.

Top
 Profile  
 
PostPosted: Wed Feb 07, 2018 6:12 pm 
Offline
Vacuum Dragon
User avatar

Joined: Mon Apr 10, 2017 4:25 pm
Posts: 536
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).


Top
 Profile  
 
PostPosted: Thu Feb 08, 2018 3:44 am 
Offline
AI Lead, Programmer
User avatar

Joined: Sat Sep 22, 2012 6:25 pm
Posts: 4617
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


Top
 Profile  
 
PostPosted: Thu Feb 08, 2018 7:25 pm 
Offline
Programmer

Joined: Mon Feb 29, 2016 8:37 pm
Posts: 219
dbenage produced a playable mockup with several aspects I liked.


Top
 Profile  
 
PostPosted: Tue Feb 20, 2018 10:36 am 
Offline
Psionic Snowflake

Joined: Tue Sep 30, 2014 10:01 am
Posts: 454
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)?

Quote:
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.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group