Somemonsters and predesigned AI ships have weapon strength 0

Problems and solutions for installing or running FreeOrion, including discussion of bugs if needed before posting a bug report on GitHub. For problems building from source, post in Compile.

Moderator: Oberlus

Post Reply
Message
Author
spikethehobbit
Space Squid
Posts: 66
Joined: Mon Aug 27, 2012 7:24 pm

Somemonsters and predesigned AI ships have weapon strength 0

#1 Post by spikethehobbit »

Some monsters and predesigned ships have weapons listed with strength 0. Naturally, they do no damage when attacking. Not all monsters or ships are affected, but it seems mostly consistent.

built from source on Linux amd64
current master is 34961f990fb07a421dbfe49e16c713213935f081 Changed source file name / line number separator in log messages to ":"
Attachments
weapon bug.sav.zip
Minimal save that has the bug.
Both sentries and the maintenance ship show the problem.

(not really a zip file, but .sav is forbidden)
(51.55 KiB) Downloaded 106 times
All contributions are submitted under GPL or LGPL v2 or later, or under appropriate Creative Commons licence, consistent with project guidlines.

User avatar
Vezzra
Release Manager, Design
Posts: 6095
Joined: Wed Nov 16, 2011 12:56 pm
Location: Sol III

Re: Somemonsters and predesigned AI ships have weapon streng

#2 Post by Vezzra »

Thanks for reporting. The issue is already known, but seems to be a bit hard to track down, so it might take some time to fix that.

User avatar
Vezzra
Release Manager, Design
Posts: 6095
Joined: Wed Nov 16, 2011 12:56 pm
Location: Sol III

Re: Somemonsters and predesigned AI ships have weapon streng

#3 Post by Vezzra »

I've created a PR with an attempt to fix these issues.

spikethehobbit
Space Squid
Posts: 66
Joined: Mon Aug 27, 2012 7:24 pm

Re: Somemonsters and predesigned AI ships have weapon streng

#4 Post by spikethehobbit »

Your PR fixes it. Thanks.
All contributions are submitted under GPL or LGPL v2 or later, or under appropriate Creative Commons licence, consistent with project guidlines.

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

Re: Somemonsters and predesigned AI ships have weapon streng

#5 Post by Dilvish »

Hey guys, I'm still super swamped. I checked in here and at GitHub to check if there was anything being held up for comment from me, and noticed some discussion/questions in this PR that touched on the AI.
Vezzra wrote: The problem is, I don't know to what extend the AI uses this info for threat assessment, and if we don't fix this visibility issue, a human can gain a significant advantage here, because the weapon part name is shown. Meaning, in theory, if you are willing to browse through the list of enemy ships you could calculate the firepower of an enemy fleet. Horrendous micromanagy of course, so that needs to be fixed anyway.
An I misunderstanding these recent changes? Doesn't the fleet window already show a tally of enemy firepower? Or is that now just the total target firepower whereas you are talking about a tally for total current firepower?

As for the AI, it currently assesses the attack component of threat based on design ratings adjusted for species effects, so I guess that would correspond to target attack rather than current attack. It does try to check for actual current values for ship structure and shields, so that could be adjusted a bit to do the same for attack values. Currently though there is no assessment there for how stale the reading is and whether it should be adjusted closer to target, which should get considered at some point. Anyway, in most cases it seems the target and current will be the same, and even in the other cases using target will just make the AI slightly more conservative, so no significant trouble (at least for current content I think). If one of the other AI guys wants to look at taking on these adjustments that would of course be fine; it will probably be a fair while yet before I would have time myself.
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0

User avatar
Vezzra
Release Manager, Design
Posts: 6095
Joined: Wed Nov 16, 2011 12:56 pm
Location: Sol III

Re: Somemonsters and predesigned AI ships have weapon streng

#6 Post by Vezzra »

Dilvish wrote:Doesn't the fleet window already show a tally of enemy firepower?
Well, my PR fixed the issue, but prior to that fix the strength of weapon parts was shown as 0, meaning the tally shown in the fleet window also evaluated to 0. However, the weapon part names still were shown, so as a human you could look up the weapon strength e.g. for mass driver, and with that info calculate the firepower of a ship.

As I didn't know if the AI relied on that info to assess an enemies fleet strength, I expressed my concern that not addressing that visibility issue might affect the AIs threat assessment. However:
As for the AI, it currently assesses the attack component of threat based on design ratings adjusted for species effects
Meaning, the AI relies on the weapon strength provided by the ship design info. I guess that should work.

Anyway, my fix is in, so all that is a non issue.

Post Reply