olegbl / d2rmm

Mod Manager for Diablo II: Resurrected
https://www.nexusmods.com/diablo2resurrected/mods/169
MIT License
54 stars 9 forks source link

Cannot modify ExpRatio column in Experience.txt #1

Closed DanilaSpevak closed 2 years ago

DanilaSpevak commented 2 years ago

Attached is a simple test mod to alter ExpRatio column in Experience.txt.

In the result the column remains unchanged. With any other column name the values change correctly.

LowerXPPenalty.zip

olegbl commented 2 years ago

The last column in Blizzard's .txt files ends with "\r" since they use Windows style line endings. D2RMM does not strip these out when parsing (...though maybe it should). You can work around this by doing:

row['ExpRatio\r'] = 1024;

I think it's probably better to work around it since I wouldn't trust Blizz to be consistent with their line endings, so doing it automatically could break things.