In my other tutorial (https://forums.obsid...side-of-combat/) I explained how to edit the game files by using UABE and a hex editor. But, a hex editor will only get us so far. It will work fine for just changing values and setting properties, but if we want to do more advanced stuff we need a better way to edit these files.
Let's say we want to edit the Rogue's Dirty Fighting ability to give it a bonus to Interrupt as well as hit-to-crit conversion. How do we do that? Read on.
Step 1: The file
Read my other tutorial to figure out how to find Dirty Fighting's .unity3d file and open it with UABE (Disunity will not work). Again, find the biggest MonoBehaviour and look at it. This is a GeneralAbility, and it has a StatusEffects array which is interesting. Open it, and you'll see a StatusEffect that modifies one stat by 1.1. This is the 10% extra hit-to-crit chance. Ideally, we would have a second StatusEffect in this array, for the extra Interrupt. But since this is too tedious to do with a hex editor, let's do it the proper way!
Step 2: Exporting
Close down all the UABE windows except the first one, where it says CAB-xxxxetc. Click the Export button. It will prompt you for a location and a file name, let's call it Export.assets (the file type doesn't matter). Use UABE to open the file you just exported. It will take you straight to the assets info screen, with one important difference that we'll come back to later. For now, just highlight the largest MonoBehaviour and click Export Dump. Save it as Dump.txt.
Step 3: Editing
Now, open the Dump.txt you just saved. Here is our ability, in a nice readable format. And, what's more, we can now edit this text file, import it back into the asset and our changes will be applied! So, scroll down and find the StatusEffects array. Inside it is an item, starting with a  line.
Now, we could just copy that whole item (from  down to and including m_deserializeInitiated), then go in and change the extra stat, but then we would need to figure out what value represents Interrupt in the ModifiedStat property, which requires opening up the game code in ILSpy. A much easier way is to find the Interrupting Blows' .unity3d file, export it to a dump in the same way we did earlier, and copy that item's StatusEffect into this file, changing the Value for the interrupt bonus from 15 to whatever you like. Whichever way you do it, remember to change the second  to , and set the array's Size to 2.
Now you're done editing, so let's reimport the file.
Step 4: Importing
Open up Export.assets again, and select the largest MonoBehaviour. Now, click the Import Dump button (this one only appears when you open assets files, hence why I mentioned that it's an important difference) and select your dump.txt. Nothing much will happen, but it has now imported your changes. In the current window, press File->Save. It won't let you save as the file you have opened, so call it Import.assets. All right, now open the Dirty Fighting .unity3d, and choose Import. Select Import.assets. Again, no confirmation, but it has imported the asset file back into the bundle. Save this file (from the window where it says CAB-xxxxx), as DirtyFighting2.unity3d. If you want, you can open the file you just saved, go in and look at the info, and the StatusEffects array should now have a second item which modifies Interrupt.
You're done! Rename the edited .unity3d file to the same name as the one in the game's directory, and put it there (back up the old one first). Then enjoy your new ability in-game.
Edited by Staehrminator, 19 April 2016 - 12:58 AM.