Using dtab | mariteaux |
|||||||||||
Here at homeOther projectsOther SomnoliansLast modified: 3/30/2021 |
So let's talk dtab. If you're using the old DTB editor for anything other than minor string changes, you're doing it wrong and you'll aggravate yourself. dtab instead converts the DTB file structure to DTA, which is a plain text representation of the stuff you're working with in the DTB editor. This makes massive, sweeping changes for strings, song settings, and cheat codes much easier since you can do it all in a text editor. It's command line, so if you've never used that, please be able to before you try using this. Make sure you know what a path is and what arguments and switches are. At the very least, pay attention to what I'm doing. I'll be showing you how to decrypt a DTB, convert DTB to DTA, converting back, and re-encrypting. You can get the latest version of dtab at http://github.com/mtolly/dtab/releases, or you can grab a (probably older) version as part of my toolkit. (I'd get my toolkit either way, I have ArkTool in there and it'll make your life much easier and I'll explain why.) Open up your Command Prompt; there's a bunch of ways to do this, but the way I like is to hit Win+X on your keyboard and selecting it from the menu in the corner of your screen. (If it says PowerShell, it's the same deal and you'll be doing the same things in it. Just a different command line.) You'll see a text-only window pop up that says something like this: Microsoft Windows [Version 10.0.18362.959] (c) 2019 Microsoft Corporation. All rights reserved. C:\Users\mariteaux> Let's talk about actually running something from the command line. That So how to switch folders? You use the C:\Users\mariteaux>cd C:\Users\mariteaux\Dropbox\Programs\ghmodding\dtab Your working directory should now be the dtab directory. (Let you in on a little trade secret here: drag the dtab executable into the Command Prompt window next time. It will give you the full path and executable name for dtab automatically, no matter your working directory. This means you can run the program from anywhere, because you've given Windows where to find the thing you're trying to run. You can do this for any file, including the files you'll be working with.) Let's actually build a command now. Run dtab on its own (without anything else after the program name) and you'll see this: C:\Users\mariteaux>C:\Users\mariteaux\Dropbox\Programs\ghmodding\dtab\dtab.exe dtab v1.1.1.1, by onyxite. Built on earlier work by xorloser, deimos, and maxton. Usage: dtab mode file-in file-out [encrypt-key] RB3 and earlier text/binary conversion: -a converts DTB (binary) to DTA (text) -b converts DTA (text) to DTB (binary) Post-RB3 text/binary conversion: -A converts new format DTB (binary) to DTA (text) GH2 360 and later encryption: -d decrypts new-style DTB -e encrypts new-style DTB, with optional key Pre-360 encryption: -D decrypts old-style DTB -E encrypts old-style DTB, with optional key Use a hyphen (-) for stdin (file-in) or stdout (file-out). Learn to read and love that reference. Every other command line program you'll ever use will have some kinda reference built in. That "usage" bit is what you'll use to craft your command. And you will need to provide the full command every time you run this. So in pieces.
You'll need to first decrypt any DTB you're trying to convert to DTA. I urge you not to bother with this and instead extract files from your ARK using ArkTool. By default, ArkTool will decrypt any DTBs you extract from an ARK and encrypt any DTBs you add to an ARK. This will save you two entire steps here. This is why I told you to grab my pack at the start of this. Of course, because it's not the only tool in town (Scott swears by ARK Expander, and while I hate you if you use GHex, it's still there I guess), I'll still tell you how to decrypt anyway. So got your DTB? Cool. PS2 GH2 uses "old-style" encryption, so you'll first need to run the command using the dtab -D modes.dtb dec-modes.dtb Obviously, don't just run this exactly, use the DTB you're trying to decrypt in your command. The If you get an error, you did one of three things wrong:
You'll now have a decrypted DTB. Now you need to expand out that DTB to DTA. Same command as before, but you're using a different mode this time, in this case dtab -a dec-modes.dtb modes.dta Congrats, you now have a DTA. Open this guy up in a text editor and make the necessary changes. Once you're done with that, it's time to repeat the process in reverse. You'll be using the dtab -b modes.dta dec-modes.dtb I should note that if you get an error at this stage, a different one to any before, you've made an error in DTA syntax. You'll need to have this looked at by someone in MiloHax most likely. The error can be something as simple as forgetting a bracket. Nothing I can go over in a tutorial, but DTAs are extremely precise in their syntax, so don't miss. Finally, to encrypt the DTB, you'll either use dtab -E dec-modes.dtb modes.dtb Your DTB is now ready to slot back into your ARK and you've successfully used dtab. |
||||||||||