KnightSouldier 2 Posted August 23, 2019 Share Posted August 23, 2019 I want to create a "Sacred 2 Vault", obvious Titan Quest Vault influence, that will allow me to more easily store and organize my collection of goodies as opposed to swapping of chest files. Building off the work of the Sacred 2 Item Editor (0.5.4), I wanted to make it "graphical" by utilizing the game's actual artwork coupled with pop-ups that mimic what you see in game. I have no problem doing all of the above coding. Navigating the blueprints and finding all the respective artwork isn't difficult. However, the one thing I cannot seem to decode from the chest file is the item id (hash) to find the proper name in the global.res file. I would also like to be able to select a character so I can swap items to and from the vault as well as using the character stats to properly display the values of any equipment bonuses where the character would influence the values. It would make it nice for comparative purposes. So, if anyone could share any of those formulas or point me in the right direction, I would be grateful. Thank you! 1 Link to comment
Flix 5,117 Posted August 23, 2019 Share Posted August 23, 2019 Hello and welcome. I think I 'm following you here, you need to be able to hunt down item names in the decoded global.res? There's a tool we use called S2rw that decodes global.res and also generates hashes based on blueprint ID's (or any other kind of Loka-ID). http://www.mediafire.com/file/0ya3wkb6fja3kiv/S2rw.v1.7.zip/file I think there's some decent documentation with it, though I may have more personal notes stashed away somewhere if you need more info. Plug whatever Loka-ID you need based on ID's from blueprint.txt and hit the "Our Own Hash" button. So if you plug in BLUEPRINT_ 2533 it will generate 1244383185, which is the hash for Sweetie's Ring. 1 Link to comment
KnightSouldier 2 Posted August 23, 2019 Author Share Posted August 23, 2019 Thank you for the warm welcome and quick reply! Interesting... I didn't realize that's a way to find the respective hash. So, if I can locate the blueprint ID from the chest save, I can then calculate the hash to find the respective entry in a decoded global.res. I was familiar with S2rw. I used it to decode my file. I was trying various methods to determine which undefined value (or set of values) in the chest save for a particular item would lead me to the hash. I never considered using the blueprint ID! Is the formula for generating the hash available? Would I be allowed to use the SRread.dll file? 1 Link to comment
KnightSouldier 2 Posted August 23, 2019 Author Share Posted August 23, 2019 This is great! The Item ID from the chest equates to the blueprint ID. I was able to determine the "Endijian's Vizor" in my chest was Item ID 1883. I then used S2read to generate the hash by passing it BLUEPRINT_1883, which gave me 1242979160. I then searched my decoded global.res for that value and sure enough, there was "Endijian's Vizor"! Now I just need to know the hash algorithm or obtain permission to use S2read.dll so I can determine the hashes programmatically. Thank you so, so much! Link to comment
Flix 5,117 Posted August 23, 2019 Share Posted August 23, 2019 Glad it worked. My friend @Pesmontis made the tool, but I've been out of touch with him for a long while. I can't speak for him, but I knew him well enough to know he wouldn't have any qualms about his work being used in another free utility for Sacred 2. You can always try messaging him on here if you want to be sure. Link to comment
KnightSouldier 2 Posted August 24, 2019 Author Share Posted August 24, 2019 Good news! I figured out the hash method. I can now turn BLUEPRINT_1183 into 1242979160. I should now be able to code the vault. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now