RimWorld

RimWorld

Rimworld: Spartan Foundry
Tiryan Sep 22, 2020 @ 7:00pm
xml-errors regarding float vs decimal
there are a few errors in the xml files Apparel_Headgear.xml and Apparel_Armors.xml

Apparel_Headgear.xml

3 of the helmets have insulation values in float notation instead of decimal, resulting for example in 0,3° ingame instead of 34°

see this screenshot: https://i.imgur.com/ps3wdyQ.png

afffected gear:
  • Explorer Power Armor Helmet
  • Grenadier Power Armor Helmet
  • Commando Armor Helmet

Apparel_Headgear.xml & Apparel_Armors.xml

again melee dodges are stated in floating notation, e.g. increased by 0.23 for samurai power armor. This results in +20% ingame and has therefore zero effect

see this screenshot: https://i.imgur.com/JGIASbe.png (no armor vs Samurai Power Armor)

if you change the values to decimal, e.g. 23 it will state +2300% ingame but the final value will be additively increased from 20% to 43%

the actual intent from the modder is unclear but a multiplicative increase (e.g. 20% * 1,23 = 24,6%) does not seem to be possible and would not be noticeable by the player anyway. The current implementation has no effect as described.

same applies for melee hit chance. With the current entries melee dps for a 20 skill char without other effects will be changed from 20.0 to 20.3 if equipped with a Samurai Power Armor Helmet that increases by "0.25". Final value is changed from 10.30 to 10.31 if equipped with a normal quality monosword.
Changing the entry to "25" would increase dps from 10.30 to 11.05 in that case which seems more reasonable.

afffected gear:
  • Samurai Power Armor
  • Samurai Power Armor Helmet
  • Engineer Power Armor

ranged hitchance (changed with commando and grenadier helmet) is a bit more complicated.

example:

currently commando adds "0,3" shooting accuracy which changes a shooting skill of 10 to 10,3

utilizing a charge lance this changes the final value from 97,0 to 97,1 (which seems pointless)

distance 5 is changed from 85,9 to 86,2%
distance 45 from 25,4 to 26,3%

changing the xml entry from float to decimal "30" increases final value to 99,8

distance 5 is changed from 85,9 to 99%
distance 45 from 25,4 to 91,4%

so neither of those seems reasonable

for comparison skill 20 without helmet results in a final value of 99,0
distance 5 = 95,1%
distance 45 = 63,6%

in my local edit i'm using factor 10, i.e. commando adds "3" and grenadier "1,5" which is a reasonable improvement over other helmets

scout helmet has the same issues, I didn't bother with that one however since it's outclassed anyway (balancing is another issue...)

edit, I just noticed that commando helmet should increase the aiming time (based on the mod description), currently it's reducing aiming delay. Therefore commando is currently vastly superior compared to scout.. however if they both increased aiming time as intended there would be no reason to use those helmets due to the massive dps loss; grenadier would be way better. Those two helmets should lower aiming time given their weak armor rating compared to the others.

needs fixing aswell ;)


edit, oh and one more issue...

stats like MeleeWeapon_CooldownMultiplier or MeleeWeapon_DamageMultiplier (added to Shock Trooper Armor for example) aswell as RangedWeapon_Cooldown (added to Grenadier Power Armor) don't seem to be applied at all.... maybe that just doesn't work on armors?
in any case melee/ranged dps does not change regardless of the values that are added with the armor

feel free to test all of this yourself to confirm, there are probably other errors that I missed.
Last edited by Tiryan; Sep 22, 2020 @ 9:15pm