View Full Version : Mod file precedence
05-30-2008, 04:02 PM
Zip file precedence is a little unintuitive. It collates like a machine, so asset001.zip takes precedence over Myrandommod.zip.
However, myrandommod.zip will take precedence over asset001.zip, like it's supposed to.
So, you could fix that, but it might be easier just to make a note of that in the SDK documentation. :)
This had me reloading DoP a number of times trying to figure out what was going on. I'm sort of dense like that. :)
05-30-2008, 04:52 PM
Sigh. Sometimes it would be nice when you call something like sort it would just work. :) I'll see what I can do about fixing this.
05-30-2008, 07:26 PM
Awwww, what would be the fun in that?
As for fixing, I think a simple note in the SDK documentation would be fine. And probably infinitely simpler. If there had been a note about it I'd have known what was happening straight away. :)
06-05-2008, 02:43 AM
I think you're getting that problem because of the values for the ASCII characters. Capital ASCII characters have a lower value that lower-case ASCII characters. Because of this, Myrandommod.zip would be ranked lower than asset001.zip, whereas myrandommod.zip would be ranked higher.
I imagine that most pre-made sorting algorithms for sorting characters would look at just the ASCII value of the characters contained in the string, rather than ignoring upper or lower-case.
One fix I can think of (and Shadow would have to do this) would be to force all characters in the filename string to either all upper-case or all lower-case. This would solve the confusion problem since then the sorting algorithm is only handling one case, not both.
Here's a link to an ASCII table: http://www.asciitable.com/
You'll see on the ASCII table that upper-case come before lower-case, and as such upper-case have a lower hex/decimal/octal value than lower-case. And yes, I realize it's rather counter-intuitive.
06-05-2008, 05:16 AM
Which is another way of saying 'it collates like a machine'. :)
06-07-2008, 04:27 AM
vBulletin® v3.6.7, Copyright ©2000-2020, Jelsoft Enterprises Ltd.