Improved Combat log showing details of shields and stealth.

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
LGM-Doyle
Programmer
Posts: 219
Joined: Mon Feb 29, 2016 8:37 pm

Improved Combat log showing details of shields and stealth.

#1 Post by LGM-Doyle »

This PR adds expandable details to the combat log. The point is to make the specific rules governing combat available immediately in the combat log, in particular the interaction of shields and stealth. It creates a framework for other events and writing the combat log in a more narrative structure.

Please comment on this idea and/or the implementation.

The motivation is in questions from beginners (like myself) on the forum. Two often repeated questions are: Why was my massive fleet with mass drivers unable to damage the enemy?; Why did my stealth fleet suddenly get wiped out in round 2? The answer is usually read the manual. This tries to provide the answer right where the player is already looking.

Below I've included two partially expanded combat logs, showing shields preventing damage and a ship being destroyed in round 2 after it has been decloaked. Note that damage is grouped by attacker.

In the shield case the details show attack strength, shield strength and final damage implying that 9 strength - 3 shield = 6 damage.

In the cloaking case, the details show which (friendly) planets and ships are cloaked at the start of combat and which ones decloaked and why. It does not list enemy cloaked ships or planets.
combat_log_shields1.png
combat_log_shields1.png (52.79 KiB) Viewed 1909 times
A combat log showing stealthy ship being decloaked.
A combat log showing stealthy ship being decloaked.
combat_log_stealth1.png (53.84 KiB) Viewed 1909 times

User avatar
MatGB
Creative Contributor
Posts: 3310
Joined: Fri Jun 28, 2013 11:45 pm

Re: Improved Combat log showing details of shields and steal

#2 Post by MatGB »

Oh, I approve of this idea, yes, having it displayed like this is far preferable to trying to work out a way to describe it in a Pedia entry. Assuming it doesn't massively increase turn processing turn I'm very much in favour, but the code is beyond me.

I especially like the cloak/decloak effect, I might quibble with wording (sometimes you're not cloaked, you're just hidden in some way, ships reveal themselves when shooting even if it was Ion Sotrm or Asteroid Belt that they hid in) but the basic setup and display is a very good idea.
Mat Bowles

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

dbenage-cx
Programmer
Posts: 389
Joined: Sun Feb 14, 2016 12:08 am

Re: Improved Combat log showing details of shields and steal

#3 Post by dbenage-cx »

Very nice!

Only issue I noticed is the intial log layout. When first opening a combat log the lines are spaced far apart.
Causing an update (resize or expanding a node) corrects the layout for that report.
Initial view
Initial view
cr_01.png (27.58 KiB) Viewed 1898 times
Slightly resized view
Slightly resized view
cr_02.png (31.25 KiB) Viewed 1898 times
Any content posted should be considered licensed GNU GPL 2.0 and/or CC-BY-SA 3.0 as appropriate.

User avatar
Cpeosphoros
Space Kraken
Posts: 124
Joined: Sat Jan 30, 2016 11:29 am

Re: Improved Combat log showing details of shields and steal

#4 Post by Cpeosphoros »

Just loved it. Many thanks.
All contributions are released under GPL or LGPL v2 or later, or under appropriate Creative Commons licence, consistent with project guidelines.

User avatar
The Silent One
Graphics
Posts: 1129
Joined: Tue Jul 01, 2003 8:27 pm

Re: Improved Combat log showing details of shields and steal

#5 Post by The Silent One »

Totally awesome. Great job!
If I provided any images, 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: Improved Combat log showing details of shields and steal

#6 Post by LGM-Doyle »

Thanks everyone for the encouragement.

dbenage-cx, the layout sometimes doesn't reflow correctly on initial setup. It also sometimes doesn't reflow correctly if you expand and then collapse a branch. I couldn't fix the problem immediately and decided to ask for feedback before spending more time chasing down a solution. I'll keep trying.

MatGB, the combat logs are only floats and integers. I tried to minimize the computation during combat processing. The XML generation only occurs during combat log display.

All of the strings are in en.txt, so you can fiddle as you please. I tried using the expression "detected", which is more accurate. It felt clinical and formal. "Decloaked" feels more evocative, although less accurate. Maybe "spotted" might work?

User avatar
UnifiedStars
Space Floater
Posts: 17
Joined: Wed Apr 08, 2015 4:21 am

Re: Improved Combat log showing details of shields and steal

#7 Post by UnifiedStars »

That's an awesome feature!

On a related note, is there a possibility of creating a probability tree/distribution for combat? Sometimes I would like to know how a large/long battle will turn out, and I can't really guess when there's 10+ ships fighting, other than the side with more probably wins.

If a program or calculator already exists, then where would I go about finding it?
Image

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 13587
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: Improved Combat log showing details of shields and steal

#8 Post by Geoff the Medio »

LGM-Doyle wrote:I tried using the expression "detected", which is more accurate. It felt clinical and formal. "Decloaked" feels more evocative, although less accurate. Maybe "spotted" might work?
"detected" seems fine to me, and"revealed" could also work.

User avatar
biza
Space Squid
Posts: 67
Joined: Wed May 29, 2013 6:48 pm

Re: Improved Combat log showing details of shields and steal

#9 Post by biza »

wow, this is great!
I didn't try it but from images maybe to put in >first image> round 2 >"Pike damages the Akerbeltz for X damage" where X is total damage in that round, so you don't have to click arrow for details and calculate damage... I just noticing it, and i know it is nickpicking :)

Cheers!

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

Re: Improved Combat log showing details of shields and steal

#10 Post by LGM-Doyle »

I've updated the PR with the requested text changes.
decloaks -> detects
<attacker> damages <target> for X damage.

I think that the reflow on the initial tab change is correct now. It is certainly better than before.
Updated combat log
Updated combat log
combat_log_stealth2.png (61.74 KiB) Viewed 1801 times

Post Reply