XboxUnity / AuroraScripts

Various LUA scripts for Aurora
33 stars 16 forks source link

Titled assets #19

Closed joshlineberry closed 2 years ago

joshlineberry commented 2 years ago

Hey bud, I've been writing a script for aurora that I'm wanting to use to import a backup of my assets. I've got the asset databaseID algorithm down 0-9/a-f yada yada, and it's all set and automates that output, but the title id in the database obviously isn't the proper title id. I can't figure out for the life of me how to get my script to pull the proper title id's so that I can properly rename the asset folders with the titleid_databaseid. I've worked on it for probably 10 hours today getting what I've got so far going and it's killing me not being able to finish it lol. How would I grab the proper title id's with my script like the asset editor does?

Swizzy commented 2 years ago

It's in the content database as a int64 which you convert to a int32, you then have to convert that to HEX, this is the TitleID as you can see here: https://github.com/XboxUnity/AuroraAssetEditor/blob/master/AuroraAssetEditor/Classes/AuroraDbManager.cs#L63

joshlineberry commented 2 years ago

So that one line of code does all that? Jesus lol. Converts it and then outputs a hex value 8 characters long I'm guessing. I've been searching for about 8 hours now on how to convert the int64 to int32 and I can't find anything for it on lua. I'm very new to the 360, lua, and aurora scripting so this has all been a big rough process learning lol. Thanks for the info. I'll keep searching around and maybe I'll figure it out if I can find any actual info on it around the web.

joshlineberry commented 2 years ago

Hey bud, I figured it out. Thanks for pointing me in the right direction! I ran the titleid from the database through some converters and found out that it was just a simple decimal to hex conversion needed so I was about to do it very simply in the end, after spending all night on it lol. That's how it seems to work most of the time!