No Damage for bad pilots [build 2023-03-27]

Describe your experience with the latest version of FreeOrion to help us improve it.

Moderator: Oberlus

Forum rules
Always mention the exact version of FreeOrion you are testing.

When reporting an issue regarding the AI, if possible provide the relevant AI log file and a save game file that demonstrates the issue.
Message
Author
User avatar
drkosy
Space Dragon
Posts: 363
Joined: Sat Jul 11, 2020 9:41 am

No Damage for bad pilots [build 2023-03-27]

#1 Post by drkosy »

There seems to be a bug in the combat system. In a new game, the "Fregatte MS" of gysache don't have any weapon damage. Even if I got to Massdriver 3 there is no weapon damage shown.

As I play humans, the weapon damage goes: 12 (MD1) -> 36 (MD2) -> 60 (MD3) -> 84 (MD4)

It seems the initial damage of 12 (should be 18 if damage scale is 6) gets multiplied by 3, 5 and 7 instead of having added 6 damage each step. That would explain, why gysache don't have any damage, because 0*3 is still 0 and so on.

Hope that's fixed soon because it makes combat unattractive.
Want some fresh experience? Try Kosymod

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

Re: No Damage for bad pilots [build 2023-03-27]

#2 Post by Oberlus »

Could you tell the commit?
We are talking of master, right?

User avatar
drkosy
Space Dragon
Posts: 363
Joined: Sat Jul 11, 2020 9:41 am

Re: No Damage for bad pilots [build 2023-03-27]

#3 Post by drkosy »

We are talking of master, right?
Correct, it's a fresh compile on the master branch. Done yesterday. Exact version is v0.5+ build 2023-03-27.f3e17e5
I don't use any of my modifications.
Could you tell the commit?
Shall I open an issue on github?

By the way, just built v0.5 rc1 (didn't find rc3 with "git tag -l") and got a MD base damage of 72 (3*24) with a weapon scale factor of 6. Each level of MD gives 24 extra damage.
Shields doesn't scale that much, the defence grid gives 18 damage reduction, making shields useless.
Want some fresh experience? Try Kosymod

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

Re: No Damage for bad pilots [build 2023-03-27]

#4 Post by Oberlus »

drkosy wrote: Wed Mar 29, 2023 7:06 pm Shall I open an issue on github?
Yes, please.
drkosy wrote: Wed Mar 29, 2023 7:06 pm just built v0.5 rc1 (didn't find rc3 with "git tag -l") and got a MD base damage of 72 (3*24) with a weapon scale factor of 6. Each level of MD gives 24 extra damage.
Shields doesn't scale that much, the defence grid gives 18 damage reduction, making shields useless.
The damage shown is for 4-fout combat: (base) 3 * (factor) 6 * (bouts) 4 = 72. So actually 18 per shot.
Each MD refinement gives (base) +1 * (factor) 6 * (bouts) 4 = +24. So actually +6 per shot.
Shield strength is not shown for 4 bouts (makes no sense). So shield 18 zeroes basic MD.
Yes! It is so misleading! At least to me. I really want to go back to totals for single bout on the fleets basic icons and only show (ideal-)combat totals when hovering. You can blame Ophiuchus :twisted:

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

Re: No Damage for bad pilots [build 2023-03-27]

#5 Post by Ophiuchus »

Oberlus wrote: Wed Mar 29, 2023 7:37 pm You can blame Ophiuchus :twisted:
love you too :mrgreen:
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!

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

Re: No Damage for bad pilots [build 2023-03-27]

#6 Post by Ophiuchus »

side note: shield effect scales with the number of shots which hit the ship and not with the number of bouts

somebody link that discussion about how to improve the UI, please
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: 5704
Joined: Mon Apr 10, 2017 4:25 pm

Re: No Damage for bad pilots [build 2023-03-27]

#7 Post by Oberlus »

Ophiuchus wrote: Wed Mar 29, 2023 8:36 pm somebody link that discussion about how to improve the UI, please
I think it's this one: https://www.freeorion.org/forum/viewtopic.php?t=12167

User avatar
drkosy
Space Dragon
Posts: 363
Joined: Sat Jul 11, 2020 9:41 am

Re: No Damage for bad pilots [build 2023-03-27]

#8 Post by drkosy »

The damage shown is for 4-fout combat:
Thanks for the reminder. That was my fault :oops: I remember taking part in the discussion about how to improve the UI. I must getting old because I didn't remember :wink:

Issue is reported at github as Bugreport #4463
Want some fresh experience? Try Kosymod

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

Re: No Damage for bad pilots [build 2023-03-27]

#9 Post by Geoff the Medio »

drkosy wrote: Wed Mar 29, 2023 2:23 pmThere seems to be a bug in the combat system. In a new game, the "Fregatte MS" of gysache don't have any weapon damage. Even if I got to Massdriver 3 there is no weapon damage shown.
I get 0 damage at game start with Gysache, but researching Mass Driver 2 results in 12 damage being shown. Researching Mass Driver 3 results in 36 damage being shown, after a turn for the upgrade to take effect when in supply. Seems a bit odd to start with zero damage, but I don't reproduce the described no damage even after upgrades as described.
gyscahe mass driver level 2 damage.png
gyscahe mass driver level 2 damage.png (257.35 KiB) Viewed 1114 times

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

Re: No Damage for bad pilots [build 2023-03-27]

#10 Post by Oberlus »

Geoff the Medio wrote: Thu Mar 30, 2023 7:49 pm I get 0 damage at game start with Gysache [...] Seems a bit odd to start with zero damage
That's a bug. Without scaling, in previous versions, damage was (base) 3 (pilot skill) -1 = 2
With scaling, it should do 12 per shot, 48 in 4 bouts.

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

Re: No Damage for bad pilots [build 2023-03-27]

#11 Post by Geoff the Medio »

A possibly relevant difference is that v0.5 and master use different expressions for the weapon base effects python script, with v0.5 wrapping it in a named ref:
https://github.com/freeorion/freeorion/ ... py#L10-L19

Code: Select all

                SetMaxCapacity(
                    partname=part_name,
                    value=Value + NamedReal(name=part_name + "_PART_CAPACITY", value=PartCapacity(name=part_name)),
                )
https://github.com/freeorion/freeorion/ ... py#L10-L16

Code: Select all

SetMaxCapacity(partname=part_name, value=Value + PartCapacity(name=part_name))
Edit: also possibly relevant is that between v0.5 and master, an additional check for whether a part uses the standard capacity effect was added to the getter for the Capacity value:
https://github.com/freeorion/freeorion/ ... #L408-L416

Code: Select all

return m_capacity * GetGameRules().Get<double>("RULE_SHIP_WEAPON_DAMAGE_FACTOR");
https://github.com/freeorion/freeorion/ ... #L392-L400

Code: Select all

return m_capacity * (m_add_standard_capacity_effect ? GetGameRules().Get<double>("RULE_SHIP_WEAPON_DAMAGE_FACTOR") : 1.0f);
So perhaps the SetMaxCapacity effect needs to be explicitly scaled up by the ship weapon damage factor when the part doesn't use default capacity effects. I feel like this is overly complicated and there should rather be no checks for m_add_standard_capacity_effect or scaling by the rule within the ship part capacity and similar getters...

User avatar
drkosy
Space Dragon
Posts: 363
Joined: Sat Jul 11, 2020 9:41 am

Re: No Damage for bad pilots [build 2023-03-27]

#12 Post by drkosy »

I get 0 damage at game start with Gysache, but researching Mass Driver 2 results in 12 damage being shown
Just checked with a new game at it's like you say. The start with 0 and gets 12 with MD2. I don't know what's different or what went wrong the first time. The screenshot shows my first try.

It's even more strange, because MD2 gives 12 damage but should be 18 while MD3 gives 36 damage and should be 24. That means it raises to fast. Maybe it has something to do with

Code: Select all

value = Value + PART_CAPACITY
The step from MD2 to MD3: Value = 12, PART_CAPACITY = 24, 12 + 24 = 36 that would give the shown value.

If PART_CAPACITY = -6 for Gysache (-1 * scaling factor) it would fit with what we see:
MD1 to MD2: Value = -6, PART_CAPACITY = 18, -6 + 18 = 12

Maybe there is a way to read the value of PART_CAPACITY to validate my assumption.
Attachments
No-damage2.png
No-damage2.png (710.85 KiB) Viewed 1076 times
Want some fresh experience? Try Kosymod

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

Re: No Damage for bad pilots [build 2023-03-27]

#13 Post by Oberlus »

Geoff the Medio wrote: Fri Mar 31, 2023 9:18 amI feel like this is overly complicated and there should rather be no checks for m_add_standard_capacity_effect or scaling by the rule within the ship part capacity and similar getters...
Agree.
I don't know what has been going on in master or why these changes were deemed necessary, but it seems to me something is unnecessarily complicated.

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

Re: No Damage for bad pilots [build 2023-03-27]

#14 Post by Geoff the Medio »

Oberlus wrote: Fri Mar 31, 2023 10:57 am...why these changes were deemed necessary...
https://github.com/freeorion/freeorion/pull/4307

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

Re: No Damage for bad pilots [build 2023-03-27]

#15 Post by Oberlus »

So you neither know why this changes were deemed necessary :lol:
Ophiuchus, I summon you.

Post Reply