OpenXcom Forum

Modding => OpenXcom Extended => OXCE Suggestions DONE => Topic started by: Solarius Scorch on February 25, 2022, 03:27:26 pm

Title: [DONE][SUGGESTION] Short stat names in accuracy/damage info
Post by: Solarius Scorch 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.
Title: Re: [SUGGESTION] Short stat names in accuracy/damage info
Post by: krautbernd 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.
Title: Re: [SUGGESTION] Short stat names in accuracy/damage info
Post by: Solarius Scorch 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.
Title: Re: [SUGGESTION] Short stat names in accuracy/damage info
Post by: krautbernd 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.
Title: Re: [SUGGESTION] Short stat names in accuracy/damage info
Post by: ontherun 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
Title: Re: [SUGGESTION] Short stat names in accuracy/damage info
Post by: Meridian 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"
Title: Re: [SUGGESTION] Short stat names in accuracy/damage info
Post by: Ethereal 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.
Title: Re: [SUGGESTION] Short stat names in accuracy/damage info
Post by: Solarius Scorch on August 05, 2022, 11:40:46 am
Great news! thank you.
Title: Re: [SUGGESTION] Short stat names in accuracy/damage info
Post by: Ethereal 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.
Title: Re: [DONE][SUGGESTION] Short stat names in accuracy/damage info
Post by: StarMan 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.
Title: Re: [DONE][SUGGESTION] Short stat names in accuracy/damage info
Post by: Meridian 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]
Title: Re: [DONE][SUGGESTION] Short stat names in accuracy/damage info
Post by: StarMan on September 20, 2022, 08:26:22 pm
Nice!