[patch] Everybody shoots

Programmers discuss here anything related to FreeOrion programming. Primarily for the developers to discuss.

Moderators: Committer, Committer

Message
Author
Mitten.O
Programmer
Posts: 255
Joined: Sun Apr 06, 2014 4:15 pm

[patch] Everybody shoots

#1 Post by Mitten.O » Thu Jun 12, 2014 12:34 pm

Geoff suggested (as far as I understood) that everybody alive in the beginning of a bout
would get to shoot and destructions would be determined only after each bout.
That was a simple change to make.

But then the combat log no longer reflected the logic of the battle.
So I revamped it to support a bit richer combat model.
These changes should be useful even if everybody shooting is abandoned,
since they essentially just allow multiple types of combat log entries.

This part required a bit more extensive tweaking,
so this patch breaks save game compatibility again.
That could be worked around, as I have occasionally done,
but this time it would require more trouble since
there is an entire new inheritance hierarchy here.
What is the policy on save game compatibility anyway?
Attachments

[The extension patch has been deactivated and can no longer be displayed.]

bouty_combat_log.png
bouty_combat_log.png (253.96 KiB) Viewed 1590 times
Any code by me in this post is released under GPL 2.0 or later.

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

Re: [patch] Everybody shoots

#2 Post by MatGB » Thu Jun 12, 2014 12:39 pm

Im, personally, not sold this is the best approach but I've been pushing for ages to get combat improved (and the coding is way over my head) so I'm definitely happy to give it a go.

Re savegame compatibility, the policy is to go ahead and do it, we've had weeks where savegames broke each week for over a month, it's the Test release and if the game's getting better we're good. I sometimes complete the game I'm in before installing the new test, I sometimes just abandon it and move on, so never worry about that.
Mat Bowles

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

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

Re: [patch] Everybody shoots

#3 Post by Geoff the Medio » Thu Jun 12, 2014 1:03 pm

I'd call the bouts rounds, and not number the individual attacks, since the numbering is meaningless...

Perhaps an additional note about the outcome at the end would be helpful? Would note that combat rounds for this turn are exhausted with an inconclusive result, a single empire / monsters was victorious / controls the system, all remaining ships cannot attack anything, all remaining ships / empires are not at war with any of the other remaining ships / empires, or all armed combatants are destroyed (possibly due to simultaneous attacks)...

Vegavis
Space Squid
Posts: 71
Joined: Sun Jan 12, 2014 7:04 am

Re: [patch] Everybody shoots

#4 Post by Vegavis » Thu Jun 12, 2014 3:47 pm

Having every ship fire at once further reduces the randomness of combat, which might be a bad thing given recent complaints about combat being too safe. Although it might increase the death rate, since ships wouldn't die before getting any shots off.

Simultaneous combat has a possible exploit: cheap ships with one weapon and no armor will always get at least one shot, so they may be disproportionately cost-effective. (Traveler had a similar problem, which was famously found and exploited by Doug Lenat's Eurisko AI.)
Geoff the Medio wrote:I'd call the bouts rounds, and not number the individual attacks, since the numbering is meaningless...
Seconded.
Geoff the Medio wrote:Perhaps an additional note about the outcome at the end would be helpful?
It would also be nice to have a summary of the forces at the beginning and end. Something like:

Imperium Caeli: 6 ships, 233 weapons, 660 structure
United Federation of Plants: 10 ships, 150 weapons, 1040 structure

Is it feasible to get team colors in the combat log? It would be much easier to read if ships were color-coded.

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

Re: [patch] Everybody shoots

#5 Post by Geoff the Medio » Thu Jun 12, 2014 4:03 pm

Vegavis wrote:Simultaneous combat has a possible exploit: cheap ships with one weapon and no armor will always get at least one shot, so they may be disproportionately cost-effective.
The effectiveness of such a strategy does not appear to be dependent on having simultaneous actions... Rather, having simultaneous combat means an opposing single armoured ship with many weapons is guaranteed to be able to shoot / destroy some of those cheap ships before it is itself destroyed by their shots. With random ordering, it's more likely that several of the cheap ships will take shots before the single ship gets to take any, potentially destroying it before it takes any action.

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

Re: [patch] Everybody shoots

#6 Post by Dilvish » Thu Jun 12, 2014 4:37 pm

Vegavis wrote:Simultaneous combat has a possible exploit: cheap ships with one weapon and no armor will always get at least one shot, so they may be disproportionately cost-effective.
I am inclined to think that the current relatively high cost of weapon parts in FO would make that weapon-only ship a poor use of resources. The same cost balance is what does tend to push designs with a single weapon + armor if the design doesn't have a shield, but I don't think that's a problem.
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0

Mitten.O
Programmer
Posts: 255
Joined: Sun Apr 06, 2014 4:15 pm

Re: [patch] Everybody shoots

#7 Post by Mitten.O » Thu Jun 12, 2014 7:32 pm

This patch is meant to make combat precisely less safe, at least in the sense
"more will die, winner's army less likely to be able to win another battle soon".
By my test game, that seemed to be the case very well.
I had both fleets get wiped out entirely a couple times.


Bout was just a last ditch word when turn and round were taken.
This version uses round for a shuffle and no word for a single event.

I also made LinkText color planets and ships by owner everywhere.
Useful or overkill?

To me it seems the darker colours are a bit hard to read.
That is of course a problem also if they are only coloured in the combat log.
Attachments
color_links.png
color_links.png (374.59 KiB) Viewed 1567 times

[The extension patch has been deactivated and can no longer be displayed.]

Any code by me in this post is released under GPL 2.0 or later.

Vegavis
Space Squid
Posts: 71
Joined: Sun Jan 12, 2014 7:04 am

Re: [patch] Everybody shoots

#8 Post by Vegavis » Thu Jun 12, 2014 8:00 pm

The patch is missing combat/CombatEvent*.
Mitten.O wrote:I also made LinkText color planets and ships by owner everywhere.
Useful or overkill?
Awesome!

Fleets and empires should probably be colored too.

For the sitrep, maybe whole messages should be tinted (like the vision circles) rather than coloring individual words?

Coloring reduces the need for empire names, so those could be removed, making the sitrep smaller and easier to read.
Last edited by Vegavis on Thu Jun 12, 2014 8:02 pm, edited 1 time in total.

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

Re: [patch] Everybody shoots

#9 Post by Geoff the Medio » Thu Jun 12, 2014 8:01 pm

Mitten.O wrote:I also made LinkText color planets and ships by owner everywhere.
Useful or overkill?
Outside of the combat log, maybe colour empire names, not each ship / planet's name?

Or make option to toggle various empire colouring modes?

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

Re: [patch] Everybody shoots

#10 Post by MatGB » Thu Jun 12, 2014 8:20 pm

Vegavis wrote: Coloring reduces the need for empire names, so those could be removed, making the sitrep smaller and easier to read.
For you and me. Large numbers of people are colourblind or have similar partial impairments to vision, while any game has to make some sacrifices that way, if it's not needed...

I love the colours, um, everywhere, but we may need to reassess the palette a bit for effects/contrast—that's something that can be done afterwards if needed and not something that should prevent it.

If it makes things more crunchy lethal and with winners taking losses, I'm definitely for it, we need to slow down the steamroller effect of a winning player just going on winning.
Mat Bowles

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

Mitten.O
Programmer
Posts: 255
Joined: Sun Apr 06, 2014 4:15 pm

Re: [patch] Everybody shoots

#11 Post by Mitten.O » Thu Jun 12, 2014 8:58 pm

The patch is missing combat/CombatEvent*.
Sorry. I manage my code locally with git so I forgot to mention those to svn.

This version then actually works and also includes a summary of forces at the beginning
and a summary of losses at the end.

EDI: Add screenshot.
Attachments
log_with_summaries.png
log_with_summaries.png (233.49 KiB) Viewed 1562 times

[The extension patch has been deactivated and can no longer be displayed.]

Any code by me in this post is released under GPL 2.0 or later.

Vegavis
Space Squid
Posts: 71
Joined: Sun Jan 12, 2014 7:04 am

Re: [patch] Everybody shoots

#12 Post by Vegavis » Thu Jun 12, 2014 11:03 pm

Mitten.O wrote:it seems the darker colours are a bit hard to read.
I see what you mean. Maybe the text color should be intermediate between the empire color and white, so it looks tinted?
MatGB wrote:Large numbers of people are colourblind
Good point.

Mitten.O
Programmer
Posts: 255
Joined: Sun Apr 06, 2014 4:15 pm

Re: [patch] Everybody shoots

#13 Post by Mitten.O » Fri Jun 13, 2014 11:53 am

Outside of the combat log, maybe colour empire names, not each ship / planet's name?
I created a system that allows decorating links per type per instance of TextLinker.

In this version, ships and planets are colored only in the detail panel,
but empires in the sitrep panel.

Also fixed a crash with fully stealtehed combatants.
Attachments

[The extension patch has been deactivated and can no longer be displayed.]

color_tag_choosy.png
color_tag_choosy.png (325.27 KiB) Viewed 1547 times
Any code by me in this post is released under GPL 2.0 or later.

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

Re: [patch] Everybody shoots

#14 Post by Geoff the Medio » Fri Jun 13, 2014 5:49 pm

The patch references CombatEvent(s).cpp/h but I don't see them being added by the patch...

Mitten.O
Programmer
Posts: 255
Joined: Sun Apr 06, 2014 4:15 pm

Re: [patch] Everybody shoots

#15 Post by Mitten.O » Fri Jun 13, 2014 8:37 pm

I keep getting this wrong!
After I knew my unholy git svn combination had gotten schizophrenic, I really should have manually checked the patch.
After resetting the physical files back and forth, the patch finally seems to be making sense.

Sorry for the inconvienience, my workflow is a bit ad-hoc.
Attachments

[The extension patch has been deactivated and can no longer be displayed.]

Any code by me in this post is released under GPL 2.0 or later.

Post Reply