Author Topic: Damage type in Ufopedia  (Read 3247 times)

Offline Nord

  • Commander
  • *****
  • Posts: 1747
  • The Gate is open.
    • View Profile
Damage type in Ufopedia
« on: July 21, 2021, 04:23:04 am »
Now, if an item have both "damageType:" and "ResistType:", ufopedia uses last one. Can i somehow display first one instead?

Offline ohartenstein23

  • Commander
  • *****
  • Posts: 1933
  • Flamethrowers fry cyberdisk circuits
    • View Profile
Re: Damage type in Ufopedia
« Reply #1 on: July 21, 2021, 04:49:52 am »
Why do you need it to display damageType instead? ResistType effectively overrides damageType and determines which modifier is used on an armor hit by that weapon. I'd worry that putting damageType there instead would mislead players about what the weapon actually does.

I'd recommend switching how you handle the damageAlter for that item instead so that the ResistType is the one you want displayed.

Offline Nord

  • Commander
  • *****
  • Posts: 1747
  • The Gate is open.
    • View Profile
Re: Damage type in Ufopedia
« Reply #2 on: July 21, 2021, 10:13:19 am »
For example - burning arrows. It deals fire damage, burns target, but uses piercing damage resistance. If an arro can not pierce armor, it will not burn anything inside.

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9099
    • View Profile
Re: Damage type in Ufopedia
« Reply #3 on: July 21, 2021, 11:26:03 am »
damageType and resistType are the same thing

in the source code the variable damageType doesn't even exist, the ruleset attribute damageType is loaded into the source code variable resistType

Offline ohartenstein23

  • Commander
  • *****
  • Posts: 1933
  • Flamethrowers fry cyberdisk circuits
    • View Profile
Re: Damage type in Ufopedia
« Reply #4 on: July 21, 2021, 02:39:10 pm »
If the arrow uses piercing resistance, it does not do burn damage. It may ignite the target, but that still isn't the damage type it's doing. See the same type of item in Piratez - the article just says the weapon has a chance of igniting the target in the text, it doesn't say the arrow does fire damage.

Offline Nord

  • Commander
  • *****
  • Posts: 1747
  • The Gate is open.
    • View Profile
Re: Damage type in Ufopedia
« Reply #5 on: July 22, 2021, 03:16:35 am »
damageType and resistType are the same thing

in the source code the variable damageType doesn't even exist, the ruleset attribute damageType is loaded into the source code variable resistType

So if i use explosive damagetype, and piercing resisttype then no explosion will occur?
Ok then.

Offline ohartenstein23

  • Commander
  • *****
  • Posts: 1933
  • Flamethrowers fry cyberdisk circuits
    • View Profile
Re: Damage type in Ufopedia
« Reply #6 on: July 22, 2021, 03:27:34 am »
No, an explosion will still occur, it just won't do "Explosive" damage, it will do "Piercing" damage. Think of it like this: damageType will set the default values for damageAlter (including setting ResistType = damageType), then ResistType changes which modifier on the armor is used for the calculations.

Offline Nord

  • Commander
  • *****
  • Posts: 1747
  • The Gate is open.
    • View Profile
Re: Damage type in Ufopedia
« Reply #7 on: July 22, 2021, 04:33:36 am »
This is what i'm saying about.
I always thinking that damageType refers to game mechanic, like explosion or 10 damage from fire through armor.
And resistType make this damage refers to another type of resistance, like "electrical fire", "shrapnel explosion" or something like that.
So i wanted to set weapons, that looks like, ets say, electrical in ufopedia, but uses melee resist.
It will be pure visual, for user to understand that this item has "electric" properties, without reading extended tab.
But if it not possible, then i will just write about it in an ufopedia article.

Offline The Reaver of Darkness

  • Commander
  • *****
  • Posts: 1512
    • View Profile
Re: Damage type in Ufopedia
« Reply #8 on: July 23, 2021, 06:45:16 pm »
For example - burning arrows. It deals fire damage, burns target, but uses piercing damage resistance. If an arro can not pierce armor, it will not burn anything inside.
I'd recommend keeping it as piercing type listed. There is a phenomenon in which having something seem a bit confusing causes people to put more effort into reading it, and gain a better understanding. If they read that the "fire arrow" deals "fire" damage, they will jump to the conclusion that it is an incendiary weapon using an arrow sprite for looks only. But if the "fire arrow" deals "piercing" damage, they will have to stop and think about what that means. If they can't figure it out, maybe they will read the description, and there you can explain how it works.