Author Topic: [DONE] [Suggestion] Soldier bonuses (from transformations and commendations)  (Read 9286 times)

Offline Meridian

  • Global Moderator
  • Commander
  • ***
  • Posts: 7794
    • View Profile
Can I alter vision (heatVision, psiVision, visibilityAtDark) with YS?

No, you cannot alter any attributes of Armor.
Armor is a read-only "globally shared" entity.

But you can use hooks on hitUnit, damageUnit, visibilityUnit, etc. to change the algorithms so that they don't use only Armor attributes, but also additionally your custom BattleUnit tags.
« Last Edit: October 25, 2021, 12:57:50 pm by Meridian »

Offline Yankes

  • Moderator
  • Commander
  • ***
  • Posts: 2868
    • View Profile
No, you cannot alter any attributes of Armor.
Armor is a read-only "globally shared" entity.

But you can use hooks on hitUnit, damageUnit, visibilityUnit, etc. to change the algorithms so that they don't use only Armor attributes, but also additionally your custom BattleUnit tags.
This, I would never permit altering armor data during play as it would be asking for troubles.

Offline zee_ra

  • Captain
  • ***
  • Posts: 70
    • View Profile
Re: [DONE] [Suggestion] Soldier bonuses (from transformations and commendations)
« Reply #32 on: September 19, 2022, 12:47:51 am »
I have answered the question: "Does this apply to "visibilityAtDay", "psi-heatVision", "camouflageAt", "psiDefence", "meleeDodge", "antiCamouflageAt"?"

The answer is "Yes"...or in full sentence "Yes, this does apply to all those attributes" (except visibilityAtDay).

Where "this" = "No... stats, regen and visibility are tracked on each unit separately... that's why I could affect them with bonuses. Other attributes defined by armor are only on the armor itself, not on each unit, so they are the same for all units (having the same armor) and cannot be changed individually."

As written above, there are no such bonuses and they are not displayed anywhere.

Could you please clarify, if the bonuses are calculated as formulaes?

If so, which bonuses?  The Ruleset Reference mentions that recovery.XXX bonuses could be.  I wonder, if stats.tu, stats.bravery, etc. also could?  I assume, the vibilityAtDark, psiVision, camouflageAtDark, camouflageAtDay, psiCamouflage, antiCamouflageAtDark, antiCamouflageAtDay, heatVision, frontArmor, sideArmor, rearArmor, underArmor could all be affected by a formula.  So, for example, something like this should be entirely possible:

Code: [Select]
    psiVision:
      psiStrength: 0.25
    frontArmor:
      psiStrength: [ 0.0 , 0.001 ]

Is such definition possible?  Would it yield dynamic bonuses based on the current parameter (e.g. psiStrength in a case under consideration) values?

Your input and perspective would be appreciated.

UPDATE.

Apparently, the formulae (mapping from current parameter values) only work for the recovery.* and psiDefense params.  I wonder, if that is indeed the case.  If so, is there an argument against the implementation of these parameters as mappings (i.e. computable dynamically)?  Is there a reason why only some parameters were made dynamic?  Would it be very hard to implement those parameters as dynamic?  Are they hard-coded in the VM?  Or, perhaps, they're specified through some low-level config?

I would also like to clarify, whether those params are additive.  In particular, all params related to visibility, namely antiCamouflageAtDay, antiCamouflageAtNight, camouflageAtDay, camouflageAtNight, heatVision, psiVision, psiCamouflage, and visibilityAtDark.  Do those bonuses add across all commendations?  Would e.g. heavVision = 60 and heatVision = 20 from different soldier bonuses yield heatVision == 80?  And, when those two soldier bonuses are combined with a heatVision = 20 bonus from armor, would I have heatVision == 100?
« Last Edit: September 19, 2022, 04:06:00 am by zee_ra »

Offline Meridian

  • Global Moderator
  • Commander
  • ***
  • Posts: 7794
    • View Profile
Re: [DONE] [Suggestion] Soldier bonuses (from transformations and commendations)
« Reply #33 on: September 20, 2022, 04:13:54 pm »
Could you please clarify, if the bonuses are calculated as formulaes?

No, they are not all calculated as formulaes.

If so, which bonuses?

All bonuses under the "recovery" section (time, energy, morale, health, mana, stun).


The Ruleset Reference mentions that recovery.XXX bonuses could be.  I wonder, if stats.tu, stats.bravery, etc. also could?

No.

I assume, the vibilityAtDark, psiVision, camouflageAtDark, camouflageAtDay, psiCamouflage, antiCamouflageAtDark, antiCamouflageAtDay, heatVision, frontArmor, sideArmor, rearArmor, underArmor could all be affected by a formula.  So, for example, something like this should be entirely possible:

Code: [Select]
    psiVision:
      psiStrength: 0.25
    frontArmor:
      psiStrength: [ 0.0 , 0.001 ]

Is such definition possible?

No.

Would it yield dynamic bonuses based on the current parameter (e.g. psiStrength in a case under consideration) values?

No.

Apparently, the formulae (mapping from current parameter values) only work for the recovery.* and psiDefense params.  I wonder, if that is indeed the case.

no, `psiDefense` param doesn't exist

If so, is there an argument against the implementation of these parameters as mappings (i.e. computable dynamically)?

Yes.

Is there a reason why only some parameters were made dynamic?

Yes.

Would it be very hard to implement those parameters as dynamic?

Some yes, some no.

Are they hard-coded in the VM?

What's a VM?

Or, perhaps, they're specified through some low-level config?

No.

I would also like to clarify, whether those params are additive.  In particular, all params related to visibility, namely antiCamouflageAtDay, antiCamouflageAtNight, camouflageAtDay, camouflageAtNight, heatVision, psiVision, psiCamouflage, and visibilityAtDark.

The only parameter that exists is `visibilityAtDark` and it is additive.

The other parameters don't exist.

Do those bonuses add across all commendations?

Yes.

Would e.g. heavVision = 60 and heatVision = 20 from different soldier bonuses yield heatVision == 80?

No, parameter `heatVision` doesn't exist.

And, when those two soldier bonuses are combined with a heatVision = 20 bonus from armor, would I have heatVision == 100?

No, parameter `heatVision` doesn't exist.

Offline StarMan

  • Squaddie
  • *
  • Posts: 7
  • Really love this Game!
    • View Profile
Re: [DONE] [Suggestion] Soldier bonuses (from transformations and commendations)
« Reply #34 on: September 20, 2022, 08:31:50 pm »
Is this going to be part of oxce in the future or is there a mod for this?

Offline Meridian

  • Global Moderator
  • Commander
  • ***
  • Posts: 7794
    • View Profile
Re: [DONE] [Suggestion] Soldier bonuses (from transformations and commendations)
« Reply #35 on: September 20, 2022, 08:51:31 pm »
This is part of oxce already.