Are column names case sensitive?

Post here about all aspects of D2 mod making whether it's information, problems or whatever. Please specify whether your post is relating to Classic D2 or the Expansion.

Moderator: Nizari

Post Reply
User avatar
mmpx222
Junior Member
Paladin
Posts: 139
Joined: Sat Apr 26, 2014 9:19 am
Korea South

Are column names case sensitive?

Post by mmpx222 » Tue Jan 29, 2019 1:09 pm

For the longest time, I simply assumed that all column names in TXT files are case-sensitive, just like item codes, skill names, etc. However, this doesn't seem to be the case, at least for some fields.

For example, Missiles.txt in 1.13c has the Emax field. This is read normally, even though D2Common.dll actually uses "EMax" to refer to the field. Also see MonStats.txt, which has irregularly named fields minHP, MinHP(N), MinHP(H). Yet I've never met anyone who claims those fields are bugged.

To test this, I converted ALL column names to UPPERCASE for all TXT files in Patch_D2.mpq. The game seems to run fine with no problems, so it seems that column names are case insensitive after all.

Can anyone please verify this? Have you ever run into problems due to uppercase/lowercase characters in column names?

Edit: typo
Last edited by mmpx222 on Wed Jan 30, 2019 12:39 am, edited 1 time in total.
D2TXT / D2INI - Python scripts for editing TXT files, or converting between TXT ↔ INI files

User avatar
Necrolis
Site Admin
Throne
Posts: 8990
Joined: Sat Mar 25, 2006 1:22 pm
Location: The Land of the Dead
Contact:
South Africa

Hand-picked

Re: Are column names case sensitive?

Post by Necrolis » Tue Jan 29, 2019 11:31 pm

Item codes are turned into unique 32 bit values via some bitwise OR's and shfits, and anything using names gets put into a b-tree that uses strcmp to find a match. The column names however use storm.#509 which is the Blizzard version of strnicmp (which is case insensitive), you can check this out in fog.#10207 (in 1.10, but should be valid in most versions).
Image
Netiquette, Do you USE it?!?! | Nefarius' Fixed TXT Files | Terms Of Service
Blackened | Day of Death
"What was yours is mine. Your land, your people, and now your life." - Lim-Dul, the Necromancer
Judgement is Final, Death is Eternal

User avatar
mmpx222
Junior Member
Paladin
Posts: 139
Joined: Sat Apr 26, 2014 9:19 am
Korea South

Re: Are column names case sensitive?

Post by mmpx222 » Wed Jan 30, 2019 1:56 am

Thank you. So I suppose I can use arbitrary casing like SrvMissileA, AuraStatCalc1, DescCalcA2, etc. with no repercussions other than making large dents in Git diff logs.
D2TXT / D2INI - Python scripts for editing TXT files, or converting between TXT ↔ INI files

Post Reply

Return to “General Mod Making”