Open Dee-Ayy opened 1 year ago
Implemented in 4.3. I will leave the issue open until is tested (specially the second part will need some test)
Oh thanks again, but a quick question: Is there a limit of 10 new EEPKs like in my test concept, or is there in theory almost no limit?
I added range 80-90, but I guess I could change it to include more.
Ah, I was mostly curious because it wasn't stated in your response and I had stated that in theory any number could be added. I myself feel like 10 is fine, but I'll leave it up to you if more should be added.
So recently I found that I can make the game load more Entry 0 EEPKs in battle and use them for character auras. All addresses are with the latest xv2 update exe.
This section of code controls what EEPKs to load in battle from the vfx_spec.ers (normally only the ones with IDs 0,1,2,and 6) by testing again esi which is set to value 0x47.
One method to expand this would just be to nop the instruction at DBXV2.exe+150604 which would make the game load every eepk defined in the Entry 0 section of the vfx_spec.ers.
In my experimentation I added more code past instruction at DBXV2.exe+15062D like so
I set edi to 0x50 and do the normal set of instructions but without the testing against esi, only continuing to the mormal code set once edi becomes 0x5B. What this accomplishes is loading the normal set of EEPKS in battle (0, 1, 2, and 6) in addition to EEPKS with IDs 80-89.
The second part that makes this work is giving the game the ability to use a different EEPKs for auras in the first place. By default it is hard set to use the EEPK with ID 1 for Aura's (BTL_AURA.eepk) and the code that handles it is here
The instruction at DBXV2.exe+EBED6 setting r9d to 1 is what controls the EEPK to use for effect Ids read form the Aura_setting.aur file. To get around and expand this I make use of a code cave and an unused int in the aura_setting.aur file. I replace the instruction at DBXV2.exe+EBEB2 to jump to my code cave with this code
So the basics of what this does is that while checking the aura_setting.aur file normally for the aura Ids, I also check the unused 4 bytes after the Aura id (genser lables this as "unknow_0") and use it as the ID for which EEPK to use for the effect IDs defined in the aura entry. If it's 0 then it will load the normal BTL_AURA.eepk, otherwise if it is any greater number then it'll load the Type 0 EEPK with that ID.
I've done some light testing and things seems to be well with no obvious bugs or errors. In my tests i use EEPKs with IDs 80-89 for this but that can be expanded or changed to be any number. i just thought an addition 10 was a good testing point. it's also good to note that the game doesn't hang if not all of those EEPKs are defined. I've seen every now again that users have trouble with aura mods because of the limited space available in the BTL_AURA.eepk to add effects to which grows worse each update. the devs may at some point create a BTL_AURA2.eepk if things continue, but i think giving users the ability to use far more than 1 or 2 EEPKs for aura is good.