aliens

Author Topic: OXCE (OpenXcom Extended) main thread  (Read 131903 times)

Online Meridian

  • Global Moderator
  • Commander
  • ***
  • Posts: 6803
  • OXCE developer
    • View Profile
    • My Wiki
Re: OXCE (OpenXcom Extended) main thread
« Reply #750 on: March 08, 2021, 12:08:12 am »
I wonder what sort of situations caused this.

In OXC, losing a part of the base due to base defense.
In OXCE, additionally also missile strikes.

Just producing stuff would not cause this, you can sell a lot of other stuff without getting stuck.
To get stuck, you need a sudden and drastic change in storage space.

Offline Markus Ramikin

  • Captain
  • ***
  • Posts: 84
    • View Profile
Re: OXCE (OpenXcom Extended) main thread
« Reply #751 on: March 11, 2021, 03:54:34 am »
How do "stats for nerds" (I hate that name with a passion) calculate "average DPM" for Craft Weapons?

For UFOs I understand the results. A Battleship has 140 damage, 60% accuracy, 0-100% damage range, average reload of 24 on Superhuman. 140*(60/24)*(60/100)*(1/2)=105. And the game indeed shows a DPM of 105.

A Laser Cannon has 70 damage, 35% accuracy, 24s reload, and presumably a damage range of 50%-100%. 70*(35/100)*(60/24)*(3/4) ≈ 46. The screen shows 61, which is 4/3 of what I calculated. Is the 50-100% damage range not observed in OXC, or OXCE?

In OXC, losing a part of the base due to base defense.
In OXCE, additionally also missile strikes.
I see, I made wrong assumptions, then.

But I'm not sure I understand. How did that lead to being stuck, in a way that just selling enough stuff didn't solve? Why was the handling of craft armaments and tanks particularly important?

Online Meridian

  • Global Moderator
  • Commander
  • ***
  • Posts: 6803
  • OXCE developer
    • View Profile
    • My Wiki
Re: OXCE (OpenXcom Extended) main thread
« Reply #752 on: March 11, 2021, 07:48:40 am »
How do "stats for nerds" (I hate that name with a passion) calculate "average DPM" for Craft Weapons?

// (damage / standard reload * 60) * (accuracy / 100)
int avgDPM = craftWeaponRule->getDamage() * craftWeaponRule->getAccuracy() * 60 / craftWeaponRule->getStandardReload() / 100;

Is the 50-100% damage range not observed in OXC, or OXCE?

It is.

But I'm not sure I understand. How did that lead to being stuck, in a way that just selling enough stuff didn't solve? Why was the handling of craft armaments and tanks particularly important?

Start a new game, sell everything, go to sell screen again... you'll see you still have a lot of stuff even after you sold everything.

Now imagine you try to do that with storage space = 0.
You wouldn't be able to perform the first sell (both sell and cancel buttons would be hidden and you would be stuck).

Offline Markus Ramikin

  • Captain
  • ***
  • Posts: 84
    • View Profile
Re: OXCE (OpenXcom Extended) main thread
« Reply #753 on: March 11, 2021, 11:51:13 am »
It is.
But not in the "stats for nerds"?

If I found the right git source, then I see the UFO part contains the 0-100% spread factor:
Code: [Select]
// spread 0-100%
double avgDamage = totalPower * 0.5;
And indeed the values displayed on the stats page come out as what you'd expect.

But the craft weapon part doesn't seem to include the 50-100% damage spread. This affects both average and total damage displayed. And indeed the values come out wrong.

What I'm trying to ask is if this an oversight that needs to be fixed? Or am I missing something.

Online Meridian

  • Global Moderator
  • Commander
  • ***
  • Posts: 6803
  • OXCE developer
    • View Profile
    • My Wiki
Re: OXCE (OpenXcom Extended) main thread
« Reply #754 on: March 11, 2021, 12:29:05 pm »
What I'm trying to ask is if this an oversight that needs to be fixed? Or am I missing something.

I chose the value without 50-100% for Craft weapons to be consistent with the main Ufopedia display.... Ufopedia says Damage=70 (instead of Power=70).

Whereas in UFO articles, Ufopedia refers to Power (not Damage), so I added the damage spread to calculate damage from power.

I don't mind changing it, but it will be inconsistent one way or another.

What's more important than the absolute numbers is the relative comparison of two weapons.
Regardless if the numbers say 50 and 100; or 70 and 140... the second weapon does twice as much damage as the first one.

PS: btw. even with damage spread considered, the numbers can still be very far from reality... pilot skills, craft bonuses, ufo bonuses and alien race bonuses all affect the final numbers and can make the same weapon very effective in one situation and completely useless in another situation
« Last Edit: March 11, 2021, 12:32:15 pm by Meridian »

Offline Markus Ramikin

  • Captain
  • ***
  • Posts: 84
    • View Profile
Re: OXCE (OpenXcom Extended) main thread
« Reply #755 on: March 11, 2021, 01:34:06 pm »
I see.
I chose the value without 50-100% for Craft weapons to be consistent with the main Ufopedia display.... Ufopedia says Damage=70 (instead of Power=70).

Whereas in UFO articles, Ufopedia refers to Power (not Damage), so I added the damage spread to calculate damage from power.

I don't mind changing it, but it will be inconsistent one way or another.

What's more important than the absolute numbers is the relative comparison of two weapons.
Regardless if the numbers say 50 and 100; or 70 and 140... the second weapon does twice as much damage as the first one.
There's also UFO DPS vs craft DPS. And there's total expected weapon damage vs UFO hitpoints.

In those contexts the omission makes the craft weapons look more powerful than they are. I discovered this because I'm working on a little craft/ufo balance mod right now. For me it's not a problem anymore, since thanks to your explanation I know what's going on, and I'm doing the same thing in a spreadsheet, but still, until I asked I was confused. I cannot be the only person who will ever think of using that screen as a quick way to check "can this craft weapon shoot down this UFO before it runs out of ammo".

A stats/calculations display is an opportunity to present real values to the player, precisely because Ufopedia is wrong/misleading (when it says "Damage", it doesn't actually mean damage, it means a stored value that happens to be labelled "Damage"). Being consistent with in-game Ufopaedia has less value than giving the player accurate info.

This could be fixed by showing the damage range in the Ufopaedia - which actually might not be a bad idea. But perhaps not worth the effort, the added visual complication, and departure from past practice. X-com veterans are used to pedia values being worthless anyway.

Quote
PS: btw. even with damage spread considered, the numbers can still be very far from reality... pilot skills, craft bonuses, ufo bonuses and alien race bonuses all affect the final numbers and can make the same weapon very effective in one situation and completely useless in another situation
Right, Extended features. Atm I'm working with vanilla mechanics, and use Extended solely because it lets me use a keyboard shortcut to Mind Control things.
Spoiler:
Joking. I mean I use it for that and the MANY other conveniences like that. And for the equal mutual surprise fix, which I still don't think is documented but which I absolutely love. EDIT: hm, how do I do an inline spoiler...

Anyhoo. Thanks for the replies. Me, I'll be fine either way now that I understand, but for whatever it's worth, I think UFO and Craft values should be consistent.
« Last Edit: March 11, 2021, 01:45:30 pm by Markus Ramikin »

Online Meridian

  • Global Moderator
  • Commander
  • ***
  • Posts: 6803
  • OXCE developer
    • View Profile
    • My Wiki
Re: OXCE (OpenXcom Extended) main thread
« Reply #756 on: March 11, 2021, 02:24:53 pm »
I cannot be the only person who will ever think of using that screen as a quick way to check "can this craft weapon shoot down this UFO before it runs out of ammo".

OK, I'll change it today.

And for the equal mutual surprise fix, which I still don't think is documented but which I absolutely love.

This will take some time.
It's a non-trivial part of the source code and I will need to read it, understand it, test it and dig years into the past to compare all the changes.
But I'll do it eventually (it's todolisted), just need to get in the mood for it.

Offline Ethereal

  • Colonel
  • ****
  • Posts: 452
    • View Profile
Re: OXCE (OpenXcom Extended) main thread
« Reply #757 on: March 11, 2021, 07:25:01 pm »
Let's also introduce automatic combat on missions. (Sarcasm)
  I don't think this is necessary. The player must think with his own head. And if everything is reduced to automation - why is a player needed then?

Offline Markus Ramikin

  • Captain
  • ***
  • Posts: 84
    • View Profile
Re: OXCE (OpenXcom Extended) main thread
« Reply #758 on: March 11, 2021, 11:50:55 pm »
OK, I'll change it today.
Cool!

Quote
This will take some time.
I figured. Pardon me, didn't mean to nag.

Offline Ethereal

  • Colonel
  • ****
  • Posts: 452
    • View Profile
Re: OXCE (OpenXcom Extended) main thread
« Reply #759 on: March 12, 2021, 12:17:32 am »
I cannot be the only person who will ever think of using that screen as a quick way to check "can this craft weapon shoot down this UFO before it runs out of ammo".

OK, I'll change it today.

I say right away - I am categorically against if such a function cannot be turned off.

Let me explain why. It will take you several updates to refine this function, since you need to take into account all the factors (avoidBonus, armor, powerBonus, raceBonus, shieldDamageModifier), otherwise it will all work through ass, as the base defense systems work now. I did not write, because even from the original UFO I was used to defending my bases exclusively by aviation and protective buildings for me are nothing more than decor, but nevertheless.
« Last Edit: March 12, 2021, 12:48:08 am by Ethereal »

Offline Markus Ramikin

  • Captain
  • ***
  • Posts: 84
    • View Profile
Re: OXCE (OpenXcom Extended) main thread
« Reply #760 on: March 12, 2021, 02:09:19 am »
What?

We're talking about the "stats for nerds" screen, which already exists, already provides a "total damage" estimate, and which yes, can be turned off.

Offline Ethereal

  • Colonel
  • ****
  • Posts: 452
    • View Profile
Re: OXCE (OpenXcom Extended) main thread
« Reply #761 on: March 12, 2021, 03:51:47 am »
Apparently the translator failed again.

In "stats for nerds" all of these statistics mean nothing for modifications using the options above. In my modification, a fighter with two AVALANCHEs can shoot down a medium UFO, but will by miss with all missiles at very small UFO, due to the high "avoidBonus". How to take this into account?

And then there's "raceBonus".

Spoiler:
    raceBonus:
      STR_SECTOID:
        hitBonus: 100     
        avoidBonus: 40
        radarChance: 10
      STR_SNAKEMAN:
        damageMax: 3500  #additive bonus to craft stats.
        sightRange: 75
        hitBonus: 30
      STR_FLOATER:
        speedMax: 1500   #additive bonus to craft stats.
        accel: 5
        avoidBonus: 30
      STR_GILLMAN:
        speedMax: 400   #additive bonus to craft stats.
        avoidBonus: 70
        powerBonus: 25
        radarRange: 150
      STR_AQUATOID:
        powerBonus: 60
        hitBonus: 60
        avoidBonus: 30
      STR_TASOTH:
        speedMax: 250
        accel: 1
        powerBonus: 100
        hitBonus: 50
        avoidBonus: 35
        armor: 10
        radarRange: 150
        radarChance: 25
        sightRange: 75
      STR_LOBSTERMAN:
        damageMax: 1750
        armor: 40
        speedMax: 250
        accel: 1
        powerBonus: 20
        hitBonus: 25
        avoidBonus: 50
        shieldCapacity: 1000
        shieldRecharge: 15
      STR_MUTON:
        armor: 70      #amount of blocked damage per hit.
        speedMax: 250
        powerBonus: 50
        hitBonus: 55
        avoidBonus: 55
      STR_ETHEREAL:
        shieldCapacity: 2000
        shieldRecharge: 30
        speedMax: 500
        accel: 1
        powerBonus: 30
        hitBonus: 100
        avoidBonus: 50
        radarChance: 25
      STR_MIXED:
        speedMax: 1500   #additive bonus to craft stats.
        accel: 5
        shieldCapacity: 2000
        shieldRecharge: 30
        damageMax: 3500  #additive bonus to craft stats.
        avoidBonus: 70
        hitBonus: 70
        powerBonus: 50
        radarRange: 150
        radarChance: 25
        sightRange: 75
      STR_MIXED2:
        speedMax: 500
        accel: 2
        avoidBonus: 120
        hitBonus: 120
        powerBonus: 100
        armor: 70
        radarRange: 150
        radarChance: 25
        sightRange: 75
      STR_CULT:
        hitBonus: 70
        avoidBonus: 70
        armor: 30

How to take this into account?
« Last Edit: March 12, 2021, 04:06:49 am by Ethereal »

Online Meridian

  • Global Moderator
  • Commander
  • ***
  • Posts: 6803
  • OXCE developer
    • View Profile
    • My Wiki
Re: OXCE (OpenXcom Extended) main thread
« Reply #762 on: March 12, 2021, 08:02:25 am »
I say right away - I am categorically against if such a function cannot be turned off.

Yes, "stats for nerds" can be turned off: https://openxcom.org/forum/index.php/topic,8791.0.html

How to take this into account?

These cannot be taken into account.
Same as many other things in the original Ufopedia and in the new Stats for nerds.
« Last Edit: March 12, 2021, 08:11:06 am by Meridian »

Offline Ethereal

  • Colonel
  • ****
  • Posts: 452
    • View Profile
Re: OXCE (OpenXcom Extended) main thread
« Reply #763 on: March 12, 2021, 08:52:39 am »
There is a lot of useful information in "stats for nerds" besides the "assumed" parameters. If only "calculated values" could be turned off, that would be great.

Offline Yankes

  • Moderator
  • Commander
  • ***
  • Posts: 2455
    • View Profile
Re: OXCE (OpenXcom Extended) main thread
« Reply #764 on: March 12, 2021, 09:51:21 pm »
For 7.0 yaml tags like `!add` are available for
Code: [Select]
fixedUserOptions:
recommendedUserOptions:
hiddenMovementBackgrounds:
baseNamesFirst:
baseNamesMiddle:
baseNamesLast:
operationNamesFirst:
operationNamesLast: