aliens

Author Topic: [DONE] Inventory stats improvements  (Read 3481 times)

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9516
    • View Profile
[DONE] Inventory stats improvements
« on: October 22, 2019, 10:38:06 pm »
1/ By default the stats show the vanilla Firing/Reactions/Psi skill/Psi strength again... OXCE firing/throwing/melee/psi-combined are moddable via interface ruleset

a/ elements textFiring, textReaction, textPsiSkill and textPsiStrength have been renamed to textStatLine1, textStatLine2, textStatLine3 and textStatLine4
b/ attribute 'custom' has been added, with following values:
1=(firing) accuracy
2=reactions
3=psi skill
4=psi strength
11=firing
12=throwing
13=melee
14=psi combined (strength/skill)

So now you can choose, which of these 8 options you want to display and also in which order.
« Last Edit: February 01, 2023, 10:48:01 pm by Meridian »

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9516
    • View Profile
Re: Inventory stats improvements
« Reply #1 on: October 22, 2019, 10:38:23 pm »
2/ It is possible to move the inventory stats to any place on the screen using interface ruleset, example below shows the default values:

Code: [Select]
interfaces:
  - type: inventory
    elements:
      - id: textTUs
        pos: [245, 24]    # will be moved 8 pixels down, if enhanced inventory stats option is enabled
        color: 64
        color2: 16
      - id: textWeight
        pos: [245, 24]
        color: 64
        color2: 16
      - id: textStatLine1
        custom: 1
        pos: [245, 32]
        color: 64
        color2: 16
      - id: textStatLine2
        custom: 2
        pos: [245, 40]
        color: 64
        color2: 16
      - id: textStatLine3
        custom: 3
        pos: [245, 48]
        color: 64
        color2: 16
      - id: textStatLine4
        custom: 4
        pos: [245, 56]
        color: 64
        color2: 16
« Last Edit: October 22, 2019, 10:47:33 pm by Meridian »

Offline Aldorn

  • Commander
  • *****
  • Posts: 794
    • View Profile
Re: [DONE] Inventory stats improvements
« Reply #2 on: Today at 02:13:23 pm »
Hello,

Is it just to report there may be a possible bug while displaying "custom 13" stat (melee)

As highlighted in the screen shot, I have a missing ">" after Melee

Perhaps do I something wrong, but result is same if I use your code or Piratez code

With Piratez code (1st screen shot)
Spoiler:
interfaces:
  - type: inventory
    elements:
      - id: textName
        color: 144
      - id: textTUs
        pos: [243, 24]    # will be moved 8 pixels down, if enhanced inventory stats option is enabled
        color: 128
        color2: 144
      - id: textWeight
        pos: [243, 24]
        color: 128
        color2: 144
      - id: textStatLine1
        pos: [243, 32]
        custom: 11
        color: 128
        color2: 144
      - id: textStatLine2
        pos: [243, 40]
        custom: 12
        color: 128
        color2: 144
      - id: textStatLine3
        pos: [243, 48]
        custom: 13
        color: 128
        color2: 144
      - id: textStatLine4
        pos: [243, 56]
        custom: 14
        color: 128
        color2: 144
      - id: textItem
        color: 128
      - id: textAmmo
        color: 128
        color2: 144
      - id: textSlots
        color: 160
      - id: weight
        color: 144
        color2: 32
      - id: grid
        color: 168

If I switch Custom 13 to textStatLine2 and Custom 12 to StatLine3, the missing ">" issue is still on Melee stat (2nd screen shot)
Spoiler:
interfaces:
  - type: inventory
    elements:
      - id: textName
        color: 144
      - id: textTUs
        pos: [243, 24]    # will be moved 8 pixels down, if enhanced inventory stats option is enabled
        color: 128
        color2: 144
      - id: textWeight
        pos: [243, 24]
        color: 128
        color2: 144
      - id: textStatLine1
        pos: [243, 32]
        custom: 11
        color: 128
        color2: 144
      - id: textStatLine2
        pos: [243, 40]
        custom: 13
        color: 128
        color2: 144
      - id: textStatLine3
        pos: [243, 48]
        custom: 12
        color: 128
        color2: 144
      - id: textStatLine4
        pos: [243, 56]
        custom: 14
        color: 128
        color2: 144
      - id: textItem
        color: 128
      - id: textAmmo
        color: 128
        color2: 144
      - id: textSlots
        color: 160
      - id: weight
        color: 144
        color2: 32
      - id: grid
        color: 168
« Last Edit: Today at 02:18:10 pm by Aldorn »

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9516
    • View Profile
Re: [DONE] Inventory stats improvements
« Reply #3 on: Today at 03:03:03 pm »
none of those 2 code snippets contains translations

look it up in the translations file

Offline Aldorn

  • Commander
  • *****
  • Posts: 794
    • View Profile
Re: [DONE] Inventory stats improvements
« Reply #4 on: Today at 03:15:12 pm »
look it up in the translations file

I did, but under Language, there is only that
Code: [Select]
  STR_TIME_UNITS_SHORT: "TU>{ALT}{0}"
  STR_WEIGHT: "Weight>{ALT}{0}/{1}"
  STR_REACTIONS_SHORT: "React>{ALT}{0}"
  STR_PSIONIC_SKILL_SHORT: "P.Skill>{ALT}{0}"
  STR_PSIONIC_STRENGTH_SHORT: "P.Str>{ALT}{0}"
  STR_ACCURACY_SHORT: "Acc>{ALT}{0}"

and under Language\OXCE
Code: [Select]
#InventoryState.cpp
  STR_PSI_SHORT: "PSI>{ALT}{0}/{1}"

Nothing about "Melee{ALT}" under standard\xcom1

Let's forget that
« Last Edit: Today at 03:18:42 pm by Aldorn »

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9516
    • View Profile
Re: [DONE] Inventory stats improvements
« Reply #5 on: Today at 03:18:21 pm »
.

Offline Aldorn

  • Commander
  • *****
  • Posts: 794
    • View Profile
Re: [DONE] Inventory stats improvements
« Reply #6 on: Today at 03:28:27 pm »
.
Ok, I found it under common  ;D

It's wrong in common\Language\OXCE\fr.yml, line 227 (at least in V8.2.0)
Code: [Select]
  STR_FIRING_SHORT: "Tirer>{ALT}{0}"
  STR_THROWING_SHORT: "Lancer>{ALT}{0}"
  STR_MELEE_SHORT: "Mêlée{ALT}{0}"

I checked for other localizations, it is only for french


It is now fixed on my side, thank you very much for your time
Code: [Select]
extraStrings:
# Corrections
  - type: fr
    strings:
      STR_MELEE_SHORT: "Mêlée>{ALT}{0}"
« Last Edit: Today at 03:35:17 pm by Aldorn »

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9516
    • View Profile
Re: [DONE] Inventory stats improvements
« Reply #7 on: Today at 05:24:38 pm »
feel free to fix it on Transifex

all I can say in French is voulez vous coucher avec moi