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
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]

#16 Post by Ophiuchus »

Oberlus wrote: Fri Mar 31, 2023 11:25 am So you neither know why this changes were deemed necessary :lol:
Ophiuchus, I summon you.
was trying to clean up the meaning of default effects and scaling.

ended up with nodefault*effect means also no automatic scaling, so one needs to apply scaling when setting the meters.

the good thing is, one can set fixed numbers (e.g. 1 basic shield) without having scaling applied.

the downside is that setting the meters needs to know if nodefault*effects are enabled or not in order to know scaling gets applied automatically or not.

the other consistent solution would be to always apply scaling and having to divide by the appropiate scaling to get rid of it in that case.

regardless: the scaled values are necessary in combat and in pedia. in scripting sometimes you want to manipulate unscaled values and sometimes scaled values.

a "clean" solution would be to keep scaled and unscaled numbers representations of a meter separate (e.g. different accessors), so one could always handle the right version (setScaled setUnscaled). i think this would be too much effort

buuuut for the direct weapons: there is a PR for master which simplifies the weapons (they do not need the nodefaultcapacityeffect anymore) and creates named value refs for use in the pedia
https://github.com/freeorion/freeorion/pull/4437/
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!

Post Reply