Replies: 13 (Who?), Viewed: 230 times.
Field Researcher
Original Poster
#1 Old 9th Oct 2021 at 2:47 AM
Default STBLizer Issues
Every time I type a text file of unhashed stbls and use STBLizer to create a .stbl file from it then the hashed number on the new stbl file is different from the actual one and so the strings and text are all messed up. What am I doing wrong and how do I fix it to get the right results?
Advertisement
Lab Assistant
#2 Old 9th Oct 2021 at 7:56 PM
Quote:
Originally Posted by t888
Every time I type a text file of unhashed stbls and use STBLizer to create a .stbl file from it then the hashed number on the new stbl file is different from the actual one and so the strings and text are all messed up. What am I doing wrong and how do I fix it to get the right results?

Don't use spaces and use lower case
Field Researcher
Original Poster
#3 Old 9th Oct 2021 at 8:25 PM
Quote:
Originally Posted by whiteman-Dara
Don't use spaces and use lower case

Didn't have any spaces and even when I changed uppercase to lower case I got the same as with uppercase, this:

0xDF1A0ABC5A84DEFA: gameplay/excel/careers/careerlist:catdaddy

the number should be 0x5962D19613E25B92.

Every time I use STBLizer instead of doing it manually I get messed up hashes like this It's kind of a PITA to do all manually.
Lab Assistant
#4 Old 10th Oct 2021 at 8:36 PM
Quote:
Originally Posted by t888
Didn't have any spaces and even when I changed uppercase to lower case I got the same as with uppercase, this:

0xDF1A0ABC5A84DEFA: gameplay/excel/careers/careerlist:catdaddy

the number should be 0x5962D19613E25B92.

Every time I use STBLizer instead of doing it manually I get messed up hashes like this It's kind of a PITA to do all manually.

where did you get this hash 0xDF1A0ABC5A84DEFA?
Everything is right gameplay/excel/careers/careerlist:catdaddy this hash 0x5962D19613E25B92!
3 years could not find which address, in this hash 0xa8907ba60bb65a57 what only I did not write but the hash did not correspond to this.
Field Researcher
Original Poster
#5 Old 10th Oct 2021 at 11:46 PM
Quote:
Originally Posted by whiteman-Dara
where did you get this hash 0xDF1A0ABC5A84DEFA?
Everything is right gameplay/excel/careers/careerlist:catdaddy this hash 0x5962D19613E25B92!
3 years could not find which address, in this hash 0xa8907ba60bb65a57 what only I did not write but the hash did not correspond to this.



0xDF1A0ABC5A84DEFA is the hash STBLizer gives me, which is incorrect.

0x5962D19613E25B92 is the number I get from manually hashing it and typing it in, as I always have to do to get the right hash as STBLizer always gives me incorrect ones for some reason I can't figure out.
Virtual gardener
staff: administrator
#6 Old 11th Oct 2021 at 10:54 AM
Heya @t888 !

First, off, STBLs are usually a PITA! So we've all been there

So a few things to know about hashing (which have been mentioned before here by Whiteman-dara )
  1. hashing is seemingly very upper/lowercase sensitive in most programs! So if in your code you have: Gameplay/Excel/Careers/Careerlist:Catdaddy, make sure to parse it in as such! Else if everything is lower case, you'll get a different hash!
  2. It doesn't do well with spaces, indeed use - or _ instead when you want to use it!
  3. Make sure that in your code your key is exactly the same as the STBL key you wanna hash! For example:

    Code:
    Localization.LocalizeString("Lyralei/Localized/setJournalOwner:InteractionName", new object[0])
    
    STBL key will be: Lyralei/Localized/setJournalOwner:InteractionName
    

  4. Buff, traits, careers, and any XML > parsed and made ready in the game 'mods' always need a "gameplay/excel/" + any other path EA gave it Which in your case seems correct!

Also! I personally find STBLizer a bit clunky to work with, so I usually use EasySTBLManager. The released version has some bugs but the one in the comment section seems to be working better for me

https://modthesims.info/download.ph...5#startcomments

(Also When I test it in EasyStblManager it seems to also see the key as 0x5962D19613E25B92 ! So i'm not sure what STBLizer is doing to parse it differently...)
Field Researcher
Original Poster
#7 Old 11th Oct 2021 at 5:24 PM
Quote:
Originally Posted by Lyralei
Heya @t888 !

First, off, STBLs are usually a PITA! So we've all been there

So a few things to know about hashing (which have been mentioned before here by Whiteman-dara )
  1. hashing is seemingly very upper/lowercase sensitive in most programs! So if in your code you have: Gameplay/Excel/Careers/Careerlist:Catdaddy, make sure to parse it in as such! Else if everything is lower case, you'll get a different hash!
  2. It doesn't do well with spaces, indeed use - or _ instead when you want to use it!
  3. Make sure that in your code your key is exactly the same as the STBL key you wanna hash! For example:

    Code:
    Localization.LocalizeString("Lyralei/Localized/setJournalOwner:InteractionName", new object[0])
    
    STBL key will be: Lyralei/Localized/setJournalOwner:InteractionName
    

  4. Buff, traits, careers, and any XML > parsed and made ready in the game 'mods' always need a "gameplay/excel/" + any other path EA gave it Which in your case seems correct!

Also! I personally find STBLizer a bit clunky to work with, so I usually use EasySTBLManager. The released version has some bugs but the one in the comment section seems to be working better for me

https://modthesims.info/download.ph...5#startcomments

(Also When I test it in EasyStblManager it seems to also see the key as 0x5962D19613E25B92 ! So i'm not sure what STBLizer is doing to parse it differently...)


Yeah, I don't get why STBLizer parses it differently either, makes no sense to me :/
Staff - Moderator
staff: moderator
#8 Old 12th Oct 2021 at 11:20 AM
Are you using STBLizer as in this one https://modthesims.info/t/360093 ?
I like to use Buzzler's STBLize https://modthesims.info/d/565291/stblize.html which I haven't had any issues with regarding messed up hashes, so if you like the method of converting text files to STBLs hopefully this will work for you
Field Researcher
Original Poster
#9 Old 14th Oct 2021 at 1:55 AM
Quote:
Originally Posted by zoe22
Are you using STBLizer as in this one https://modthesims.info/t/360093 ?
I like to use Buzzler's STBLize https://modthesims.info/d/565291/stblize.html which I haven't had any issues with regarding messed up hashes, so if you like the method of converting text files to STBLs hopefully this will work for you

Actually the second one was the one I meant. I wish it would work for me but for some reason I just can't get it too. Hey can you try the line in a post above and see if you get the right hash or a wrong one as well?
Staff - Moderator
staff: moderator
#10 Old 14th Oct 2021 at 1:20 PM
Sure, I made a text file with:
Code:
<?xml version="1.0"?>
<TEXT>

<KEY>gameplay/excel/careers/careerlist:catdaddy</KEY>
<STR>Test</STR>

</TEXT>


and the result I got was 0x5962D19613E25B92: Test

So all seems good there. I wonder if the issue is with the formatting of the text file?
Field Researcher
Original Poster
#11 Old 14th Oct 2021 at 8:46 PM
Quote:
Originally Posted by zoe22
Sure, I made a text file with:
Code:
<?xml version="1.0"?>
<TEXT>

<KEY>gameplay/excel/careers/careerlist:catdaddy</KEY>
<STR>Test</STR>

</TEXT>


and the result I got was 0x5962D19613E25B92: Test

So all seems good there. I wonder if the issue is with the formatting of the text file?

I expect its more of an issue when I'm trying to do the unhashed file

<?xml version="1.0"?>
<TEXT>

<KEY>0x5962D19613E25B92</KEY>
<STR>Gameplay/Excel/Careers/CareerList:CatDaddy</STR>

</TEXT>
Staff - Moderator
staff: moderator
#12 Old 16th Oct 2021 at 3:40 PM
Ahah! Well that's your issue there. <KEY> is for the string that gets hashed into the key. SO here, 0x5962D19613E25B92 is being hashed into 0xDF1A0ABC5A84DEFA.
From what I understand, the unhashed file is for reference, so if someone looking at the package and the STBLs and they want to know what string should generate the key of a particular entry, they can look at the unhashed keys file to find the key, and the corresponding STR which would give the string that's hashed to get the key.
It's not actually necessary for the package/stbls/mod to function.

The purpose of the STBLize tool is to make an STBL without having to deal with calculating any hashes yourself. You work with just the string that appears in game, and the key which is the string the generates the hash, and the tool takes care of making the STBL with the correct hashes.

If you're lazy like me, you don't bother with the unhashed key file, and just keep the text file which has the string keys in the <KEY> tags :p
Though if you do want to make one, it's probably just as time consuming to make it manually in S3PE as it is in a text file > stbl as you'll have to copy in the hashes yourself either way, so you may as well directly do it there. Or put the same thing in the KEY tag as the STR tag, as it's SIms3/Gameplay/... that gets hashed into the hash you want, not the hash itself...have I made it confusing enough?
The benefit of the tool is that you don't need to spend time calculating the hashes and copying them in anywhere.
Field Researcher
Original Poster
#13 Old 16th Oct 2021 at 4:37 PM
Quote:
Originally Posted by zoe22
Ahah! Well that's your issue there. <KEY> is for the string that gets hashed into the key. SO here, 0x5962D19613E25B92 is being hashed into 0xDF1A0ABC5A84DEFA.
From what I understand, the unhashed file is for reference, so if someone looking at the package and the STBLs and they want to know what string should generate the key of a particular entry, they can look at the unhashed keys file to find the key, and the corresponding STR which would give the string that's hashed to get the key.
It's not actually necessary for the package/stbls/mod to function.

The purpose of the STBLize tool is to make an STBL without having to deal with calculating any hashes yourself. You work with just the string that appears in game, and the key which is the string the generates the hash, and the tool takes care of making the STBL with the correct hashes.

If you're lazy like me, you don't bother with the unhashed key file, and just keep the text file which has the string keys in the <KEY> tags :p
Though if you do want to make one, it's probably just as time consuming to make it manually in S3PE as it is in a text file > stbl as you'll have to copy in the hashes yourself either way, so you may as well directly do it there. Or put the same thing in the KEY tag as the STR tag, as it's SIms3/Gameplay/... that gets hashed into the hash you want, not the hash itself...have I made it confusing enough?
The benefit of the tool is that you don't need to spend time calculating the hashes and copying them in anywhere.



Ah! I see! That makes sense. I was just following a tutorial but hmm, next time I have to give it a try the way you're suggesting and see how that goes!
Lab Assistant
#14 Old Yesterday at 10:14 AM
Quote:
Originally Posted by t888
Ah! I see! That makes sense. I was just following a tutorial but hmm, next time I have to give it a try the way you're suggesting and see how that goes!

your mistake in incorrect string format:
<?xml version="1.0"?>
<TEXT>

<KEY>5962D19613E25B92</KEY>
<STR>Cat Daddy</STR>

</TEXT>
I think this format will be correct.
Back to top