- Joined
- Aug 7, 2013
- Messages
- 1,338
Hi,
Not sure if this has been mentioned before, but I noticed something interesting about unit raw codes.
It is known that if a unit's raw code begins with a capital letter, it is automatically made into a hero, even if the object which it was based on wasn't a hero originally.
Likewise, if a unit's raw code begins with any symbol except a capital letter, it is automatically made into a normal unit, even if the object which it was based on wasn't a unit originally.
But, what happens when a unit is assigned a raw code that is exactly the same as an existing hero, except the first letter is lower case?
I believe in the alphabet Blizzard uses for raw codes, capital letters count separately from lower case ones, thus these two raw codes aren't equivalent (otherwise my objects would be clashing).
'Y00A' != 'Y00a'
Thus, with this information, we would expect that nothing would happen if we had two objects with these raw codes, both being units.
'H000', 'h000'
However, (with regards to just the information presented in this post), we get unexpected behavior.
Suppose 'H000' is the raw code of a custom human Paladin. Thus its 'unam' is "Paladin."
Suppose 'h000' is the raw code of a custom human footman. Thus its 'unam' is 'Footman.'
When we play the map and select our custom human footman, we find something odd. It's name is not actually "Footman," but "Paladin!"
But, if we go back to our map and view the object editor, our custom unit 'h000''s 'unam' is still "Footman."
Thus, it appears if a unit's raw code is identical to an existing hero unit's raw code except for the capitalization of the first letter of the raw code, that unit's name field will get replaced by that hero's name field in the map.
Now my question is, why does this happen?
Not sure if this has been mentioned before, but I noticed something interesting about unit raw codes.
It is known that if a unit's raw code begins with a capital letter, it is automatically made into a hero, even if the object which it was based on wasn't a hero originally.
Likewise, if a unit's raw code begins with any symbol except a capital letter, it is automatically made into a normal unit, even if the object which it was based on wasn't a unit originally.
But, what happens when a unit is assigned a raw code that is exactly the same as an existing hero, except the first letter is lower case?
I believe in the alphabet Blizzard uses for raw codes, capital letters count separately from lower case ones, thus these two raw codes aren't equivalent (otherwise my objects would be clashing).
'Y00A' != 'Y00a'
Thus, with this information, we would expect that nothing would happen if we had two objects with these raw codes, both being units.
'H000', 'h000'
However, (with regards to just the information presented in this post), we get unexpected behavior.
Suppose 'H000' is the raw code of a custom human Paladin. Thus its 'unam' is "Paladin."
Suppose 'h000' is the raw code of a custom human footman. Thus its 'unam' is 'Footman.'
When we play the map and select our custom human footman, we find something odd. It's name is not actually "Footman," but "Paladin!"
But, if we go back to our map and view the object editor, our custom unit 'h000''s 'unam' is still "Footman."
Thus, it appears if a unit's raw code is identical to an existing hero unit's raw code except for the capitalization of the first letter of the raw code, that unit's name field will get replaced by that hero's name field in the map.
Now my question is, why does this happen?