Author Topic: [DONE][SUGGESTION] Short stat names in accuracy/damage info  (Read 6048 times)

Online Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 11721
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
[DONE][SUGGESTION] Short stat names in accuracy/damage info
« on: February 25, 2022, 03:27:26 pm »
I'd like to request for the accuracy and damage formulas listed at the bottom of Pedia pages to use abbreviated stats instead: BRA instead of Bravery, STR instead of Strength, etc.
Using full names is neither handy nor necessary in this case.
« Last Edit: August 11, 2022, 08:57:44 pm by Meridian »

Offline krautbernd

  • Commander
  • *****
  • Posts: 1108
    • View Profile
Re: [SUGGESTION] Short stat names in accuracy/damage info
« Reply #1 on: February 25, 2022, 03:53:29 pm »
I'd support this, but please make it optional, if only becauuse not everybody might be aware what the abbreveations stand for.

Online Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 11721
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
Re: [SUGGESTION] Short stat names in accuracy/damage info
« Reply #2 on: February 25, 2022, 04:00:37 pm »
I'd support this, but please make it optional, if only becauuse not everybody might be aware what the abbreveations stand for.

Oh please. Everybody can see it after every single mission (stat upgrades).

And even if someone has never seen that screen in their life... Well, if they can't understand such a direct abbreviation, they shouldn't be near a working PC.

Offline krautbernd

  • Commander
  • *****
  • Posts: 1108
    • View Profile
Re: [SUGGESTION] Short stat names in accuracy/damage info
« Reply #3 on: February 25, 2022, 05:38:35 pm »
Then I'd have to veto that request and would not support it being integrated. The current iteration ensures that everybody is able to understand which stats affect the weapon/item in question. Your suggestion does not.

Offline ontherun

  • Colonel
  • ****
  • Posts: 393
  • public troll no. 1
    • View Profile
Re: [SUGGESTION] Short stat names in accuracy/damage info
« Reply #4 on: February 25, 2022, 06:05:32 pm »
Actually the suggestion is for convenienc matters: long words go outsiude screen boundaries, so i'd second that. Hope i git it right :o ;D

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9076
    • View Profile
Re: [SUGGESTION] Short stat names in accuracy/damage info
« Reply #5 on: August 05, 2022, 10:28:24 am »
Breaking change

removed rulest:

Code: [Select]
extraNerdyPediaInfo: true/false

new ruleset:

Code: [Select]
extraNerdyPediaInfoType: 0  # feature disabled (default)
extraNerdyPediaInfoType: 1  # enabled with standard translations
extraNerdyPediaInfoType: 2  # enabled with abbreviations

Standard translations map:

Code: [Select]
const std::map<std::string, std::string> StatsForNerdsState::translationMap =
{
{ "flatOne", "" }, // no translation
{ "flatHundred", "" }, // no translation
{ "strength", "STR_STRENGTH" },
{ "psi", "STR_PSI_SKILL_AND_PSI_STRENGTH" }, // new, STR_PSIONIC_SKILL * STR_PSIONIC_STRENGTH
{ "psiSkill", "STR_PSIONIC_SKILL" },
{ "psiStrength", "STR_PSIONIC_STRENGTH" },
{ "throwing", "STR_THROWING_ACCURACY" },
{ "bravery", "STR_BRAVERY" },
{ "firing", "STR_FIRING_ACCURACY" },
{ "health", "STR_HEALTH" },
{ "mana", "STR_MANA_POOL" },
{ "tu", "STR_TIME_UNITS" },
{ "reactions", "STR_REACTIONS" },
{ "stamina", "STR_STAMINA" },
{ "melee", "STR_MELEE_ACCURACY" },
{ "strengthMelee", "STR_STRENGTH_AND_MELEE_ACCURACY" }, // new, STR_STRENGTH * STR_MELEE_ACCURACY
{ "strengthThrowing", "STR_STRENGTH_AND_THROWING_ACCURACY" }, // new, STR_STRENGTH * STR_THROWING_ACCURACY
{ "firingReactions", "STR_FIRING_ACCURACY_AND_REACTIONS" }, // new, STR_FIRING_ACCURACY * STR_REACTIONS

{ "rank", "STR_RANK" },
{ "fatalWounds", "STR_FATAL_WOUNDS" },

{ "healthCurrent", "STR_HEALTH_CURRENT" }, // new, current HP (i.e. not max HP)
{ "manaCurrent", "STR_MANA_CURRENT" },
{ "tuCurrent", "STR_TIME_UNITS_CURRENT" }, // new
{ "energyCurrent", "STR_ENERGY" },
{ "moraleCurrent", "STR_MORALE" },
{ "stunCurrent", "STR_STUN_LEVEL_CURRENT" }, // new

{ "healthNormalized", "STR_HEALTH_NORMALIZED" }, // new, current HP normalized to [0, 1] interval
{ "manaNormalized", "STR_MANA_NORMALIZED" },
{ "tuNormalized", "STR_TIME_UNITS_NORMALIZED" }, // new
{ "energyNormalized", "STR_ENERGY_NORMALIZED" }, // new
{ "moraleNormalized", "STR_MORALE_NORMALIZED" }, // new
{ "stunNormalized", "STR_STUN_LEVEL_NORMALIZED" }, // new

{ "energyRegen", "STR_ENERGY_REGENERATION" }, // new, special stat returning vanilla energy regen
};

Abbreviated translations map:

Code: [Select]
const std::map<std::string, std::string> StatsForNerdsState::shortTranslationMap =
{
{ "flatOne", "" }, // no translation
{ "flatHundred", "" }, // no translation
{ "strength", "STR_STRENGTH_ABBREVIATION" },
{ "psi", "STR_PSI_SKILL_AND_PSI_STRENGTH_ABBREVIATION" },
{ "psiSkill", "STR_PSIONIC_SKILL_ABBREVIATION" },
{ "psiStrength", "STR_PSIONIC_STRENGTH_ABBREVIATION" },
{ "throwing", "STR_THROWING_ACCURACY_ABBREVIATION" },
{ "bravery", "STR_BRAVERY_ABBREVIATION" },
{ "firing", "STR_FIRING_ACCURACY_ABBREVIATION" },
{ "health", "STR_HEALTH_ABBREVIATION" },
{ "mana", "STR_MANA_ABBREVIATION" },
{ "tu", "STR_TIME_UNITS_ABBREVIATION" },
{ "reactions", "STR_REACTIONS_ABBREVIATION" },
{ "stamina", "STR_STAMINA_ABBREVIATION" },
{ "melee", "STR_MELEE_ACCURACY_ABBREVIATION" },
{ "strengthMelee", "STR_STRENGTH_AND_MELEE_ACCURACY_ABBREVIATION" },
{ "strengthThrowing", "STR_STRENGTH_AND_THROWING_ACCURACY_ABBREVIATION" },
{ "firingReactions", "STR_FIRING_ACCURACY_AND_REACTIONS_ABBREVIATION" },

{ "rank", "STR_RANK" },
{ "fatalWounds", "STR_FATAL_WOUNDS" },

{ "healthCurrent", "STR_HEALTH_CURRENT_ABBREVIATION" },
{ "manaCurrent", "STR_MANA_CURRENT_ABBREVIATION" },
{ "tuCurrent", "STR_TIME_UNITS_CURRENT_ABBREVIATION" },
{ "energyCurrent", "STR_ENERGY" },
{ "moraleCurrent", "STR_MORALE" },
{ "stunCurrent", "STR_STUN_LEVEL_CURRENT_ABBREVIATION" },

{ "healthNormalized", "STR_HEALTH_NORMALIZED_ABBREVIATION" },
{ "manaNormalized", "STR_MANA_NORMALIZED_ABBREVIATION" },
{ "tuNormalized", "STR_TIME_UNITS_NORMALIZED_ABBREVIATION" },
{ "energyNormalized", "STR_ENERGY_NORMALIZED_ABBREVIATION" },
{ "moraleNormalized", "STR_MORALE_NORMALIZED_ABBREVIATION" },
{ "stunNormalized", "STR_STUN_LEVEL_NORMALIZED_ABBREVIATION" },

{ "energyRegen", "STR_ENERGY_REGENERATION_ABBREVIATION" },
};

New default EN translations added:

Code: [Select]
  STR_PSI_SKILL_AND_PSI_STRENGTH_ABBREVIATION: "PSK*PST"
  STR_STRENGTH_AND_MELEE_ACCURACY_ABBREVIATION: "STR*MEL"
  STR_STRENGTH_AND_THROWING_ACCURACY_ABBREVIATION: "STR*THR"
  STR_FIRING_ACCURACY_AND_REACTIONS_ABBREVIATION: "ACC*REA"
  STR_HEALTH_CURRENT_ABBREVIATION: "CURRENT HEALTH"
  STR_MANA_CURRENT_ABBREVIATION: "CURRENT MANA"
  STR_TIME_UNITS_CURRENT_ABBREVIATION: "CURRENT TIME UNITS"
  STR_STUN_LEVEL_CURRENT_ABBREVIATION: "CURRENT STUN LEVEL"
  STR_HEALTH_NORMALIZED_ABBREVIATION: "NORMALIZED HEALTH"
  STR_MANA_NORMALIZED_ABBREVIATION: "NORMALIZED MANA"
  STR_TIME_UNITS_NORMALIZED_ABBREVIATION: "NORMALIZED TIME UNITS"
  STR_ENERGY_NORMALIZED_ABBREVIATION: "NORMALIZED ENERGY"
  STR_MORALE_NORMALIZED_ABBREVIATION: "NORMALIZED MORALE"
  STR_STUN_LEVEL_NORMALIZED_ABBREVIATION: "NORMALIZED STUN LEVEL"
  STR_ENERGY_REGENERATION_ABBREVIATION: "ENERGY REGENERATION"
« Last Edit: August 05, 2022, 10:42:17 am by Meridian »

Offline Ethereal

  • Commander
  • *****
  • Posts: 684
    • View Profile
Re: [SUGGESTION] Short stat names in accuracy/damage info
« Reply #6 on: August 05, 2022, 10:51:19 am »
Actually, that's what "Stats For Nerds" was for, but it looks good. The main thing is displayed.

Online Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 11721
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
Re: [SUGGESTION] Short stat names in accuracy/damage info
« Reply #7 on: August 05, 2022, 11:40:46 am »
Great news! thank you.
« Last Edit: August 05, 2022, 12:46:57 pm by Solarius Scorch »

Offline Ethereal

  • Commander
  • *****
  • Posts: 684
    • View Profile
Re: [SUGGESTION] Short stat names in accuracy/damage info
« Reply #8 on: August 08, 2022, 10:58:00 pm »
Can weapon ranges (auto/snap/aimed) be extracted into pedia article?

There is no more space to display anything in the pedia articles.
But you can see the weapon ranges under the INFO button (if you're using OXCE).

Documentation here: https://www.ufopaedia.org/index.php/Ruleset_Reference_Nightly_(OpenXcom)#UFOpaedia_Article

If reduce the font size of the display of the type of attack, then the third line may also include information about the distance for the types of attack.

Offline StarMan

  • Squaddie
  • *
  • Posts: 8
  • Really love this Game!
    • View Profile
Re: [DONE][SUGGESTION] Short stat names in accuracy/damage info
« Reply #9 on: September 19, 2022, 08:47:07 pm »
This is not exactly related, but I enabled (I think) extra stats for nerds/abbreviated soldier profiencies after name or somesuch. I dont know exactly what some of these mean. Example looking at soldiers at the base their names appear like this: Bobby Busciea/mr or Kathy Pox/cm. What does /mr and /cm mean? I see no corresponding stat.

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9076
    • View Profile
Re: [DONE][SUGGESTION] Short stat names in accuracy/damage info
« Reply #10 on: September 20, 2022, 10:55:04 am »
x=psi magnet
p/P=psi defender
k/K=psi attacker
b=brave
c=coward
w=weak
m/M=marksman
r/R=reflexes

Quote
# Based on XcomUtil by Scott Jones and BladeFireLight
# See http://ufopaedia.org/index.php?title=Statstrings
# These are the default statStrings from XcomUtil.
# Melee has been added as a value that can be reported by statstrings.  Use "melee:" as the criteria.
# Psionic Training has been added as a value that can be reported by statstrings.  Use "psiTraining:" as the criteria, values will be ignored.
  statStrings:
  - string: "x"
    psiStrength: [~, 30]
  - string: "P"
    psiStrength: [80, ~]
  - string: "p"
    psiStrength: [60, 79]
  - string: "K"
    psiSkill: [60, ~]
  - string: "k"
    psiSkill: [30, 59]
  - string: "b"
    bravery: [60, ~]
  - string: "c"
    bravery: [~, 10]
  - string: "w"
    strength: [~, 25]
  - string: "Snpr"
    firing: [60, ~]
    reactions: [60, ~]
  - string: "M"
    firing: [70, ~]
  - string: "m"
    firing: [60, 69]
  - string: "Sct"
    reactions: [50, ~]
    tu: [60, ~]
  - string: "R"
    reactions: [60, ~]
  - string: "r"
    reactions: [50, 59]

Offline StarMan

  • Squaddie
  • *
  • Posts: 8
  • Really love this Game!
    • View Profile
Re: [DONE][SUGGESTION] Short stat names in accuracy/damage info
« Reply #11 on: September 20, 2022, 08:26:22 pm »
Nice!

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9076
    • View Profile
Re: [DONE][SUGGESTION] Short stat names in accuracy/damage info
« Reply #12 on: September 22, 2024, 04:48:32 pm »
Added translations for new attributes (in OXCE v7.14.2):

- tuScaled, staminaScaled, healthScaled, braveryScaled, reactionsScaled, firingScaled, throwingScaled, strengthScaled, psiStrengthScaled, psiSkillScaled, meleeScaled, manaScaled
- psiScaled, strengthMeleeScaled, strengthThrowingScaled, firingReactionsScaled

Code: [Select]
  STR_TIME_UNITS_SCALED: "SCALED TIME UNITS"
  STR_STAMINA_SCALED: "SCALED STAMINA"
  STR_HEALTH_SCALED: "SCALED HEALTH"
  STR_BRAVERY_SCALED: "SCALED BRAVERY"
  STR_REACTIONS_SCALED: "SCALED REACTIONS"
  STR_FIRING_ACCURACY_SCALED: "SCALED FIRING ACCURACY"
  STR_THROWING_ACCURACY_SCALED: "SCALED THROWING ACCURACY"
  STR_STRENGTH_SCALED: "SCALED STRENGTH"
  STR_PSIONIC_STRENGTH_SCALED: "SCALED PSIONIC STRENGTH"
  STR_PSIONIC_SKILL_SCALED: "SCALED PSIONIC SKILL"
  STR_MELEE_ACCURACY_SCALED: "SCALED MELEE ACCURACY"
  STR_MANA_POOL_SCALED: "SCALED MANA POOL"
  STR_PSI_SKILL_AND_PSI_STRENGTH_SCALED: "SCALED PSI SKILL*PSI STRENGTH"
  STR_STRENGTH_AND_MELEE_ACCURACY_SCALED: "SCALED STRENGTH*MELEE ACCURACY"
  STR_STRENGTH_AND_THROWING_ACCURACY_SCALED: "SCALED STRENGTH*THROWING ACCURACY"
  STR_FIRING_ACCURACY_AND_REACTIONS_SCALED: "SCALED FIRING ACCURACY*REACTIONS"

Code: [Select]
  STR_TIME_UNITS_SCALED_ABBREVIATION: "SCALED TU"
  STR_STAMINA_SCALED_ABBREVIATION: "SCALED STA"
  STR_HEALTH_SCALED_ABBREVIATION: "SCALED HP"
  STR_BRAVERY_SCALED_ABBREVIATION: "SCALED BRV"
  STR_REACTIONS_SCALED_ABBREVIATION: "SCALED REA"
  STR_FIRING_ACCURACY_SCALED_ABBREVIATION: "SCALED ACC"
  STR_THROWING_ACCURACY_SCALED_ABBREVIATION: "SCALED THR"
  STR_STRENGTH_SCALED_ABBREVIATION: "SCALED STR"
  STR_PSIONIC_STRENGTH_SCALED_ABBREVIATION: "SCALED PST"
  STR_PSIONIC_SKILL_SCALED_ABBREVIATION: "SCALED PSK"
  STR_MELEE_ACCURACY_SCALED_ABBREVIATION: "SCALED MEL"
  STR_MANA_POOL_SCALED_ABBREVIATION: "SCALED MAN"
  STR_PSI_SKILL_AND_PSI_STRENGTH_SCALED_ABBREVIATION: "SCALED PSK*PST"
  STR_STRENGTH_AND_MELEE_ACCURACY_SCALED_ABBREVIATION: "SCALED STR*MEL"
  STR_STRENGTH_AND_THROWING_ACCURACY_SCALED_ABBREVIATION: "SCALED STR*THR"
  STR_FIRING_ACCURACY_AND_REACTIONS_SCALED_ABBREVIATION: "SCALED ACC*REA"
« Last Edit: September 22, 2024, 04:50:25 pm by Meridian »