cr001 Posted January 26, 2023 Share Posted January 26, 2023 I was able to edit type/category/power/accuracy/PP for moves but that's pretty much all. It looks like the data size is not fixed for each move and pretty hard to understand what each byte means. I.E. Sometimes the type comes right before the category and sometimes there is an extra byte between the type and the category. This probably means if we want to change the move additional effect we need to edit some pointer table too. I would like to know if there is any available and shareable results so that I (and other potential readers) don't need to research everything from the beginning. 1 Link to comment Share on other sites More sharing options...
Kaphotics Posted January 26, 2023 Share Posted January 26, 2023 https://github.com/kwsch/pkNX/blob/696eea1a1b63aea8495fc6f1689ace7fdf3b182c/pkNX.WinForms/Dumping/GameDumperSV.cs#L652 https://github.com/kwsch/pkNX/blob/696eea1a1b63aea8495fc6f1689ace7fdf3b182c/pkNX.Structures.FlatBuffers/Gen9/Move/Waza9Table.cs Link to comment Share on other sites More sharing options...
cr001 Posted January 26, 2023 Author Share Posted January 26, 2023 Thank you for the information. I see what happens. Probably the data size difference comes from the data being Flat-Buffer compressed. The flat buffer thing is indeed something I was not able to understand, as I edited earlier versions using PKNX itself. However since PKNX does not support scarlet/violet yet, I would like to know is there a way to de-compress and re-compress flat buffers using external tools so that I can edit move effects using hex-editing? Link to comment Share on other sites More sharing options...
cr001 Posted January 27, 2023 Author Share Posted January 27, 2023 (edited) I found a tool here:https://gamebanana.com/tools/11399 I also created an fbs file based on the linked code you posted and online flatbuffer references, but nothing appeared in the output folder. I think I am on the right track but I must have created the fbs file wrongly. (I assumed the "sbyte" in C# is the same as "short" in fbs syntax but that might be wrong, also there might be other things missing) Could you help me what am I doing wrong? I have attached the fbs I created. Edited January 27, 2023 by cr001 Link to comment Share on other sites More sharing options...
cr001 Posted January 27, 2023 Author Share Posted January 27, 2023 (edited) I think I got it working. I needed to change certain "table"s into "struct"s in the fbs file. For further reader convenience I will upload my working fbs here. waza_array.fbs Edited January 27, 2023 by cr001 Link to comment Share on other sites More sharing options...
cr001 Posted January 27, 2023 Author Share Posted January 27, 2023 I found some additional information on special handled moves, for example the forcing of 2-3 turn continuous attacking of outrage, thrash and petal dance. The special handled move info data are stored in exefs/main. Decompress it using nx2elf first, then search for the pattern "00 00 00 00 00 00 00 00 00 00 00 00 A0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 72 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 8A 00 00 00" using hex editor. That's the list of IDs for special handled moves. For example, going down the list you get a "50 00 00 00 ..." which specifies the special handling of move "petal dance" (ID=0x00000050). If you change it to another move ID then that move will have the 2-3 turn attacking effect instead. You can also change the ID to some non-valid value such as 0x0000FFFF to get rid of the special handling, but as for now there isn't a way to set another move to use the special handling without swapping out the original one (in other words, the size of the special handling list of move IDs is fixed and no insertion is allowed without further deeper investigation, possibly involving pointer arrays). Link to comment Share on other sites More sharing options...
xStingz Posted March 14, 2023 Share Posted March 14, 2023 On 1/27/2023 at 5:10 AM, cr001 said: I think I got it working. I needed to change certain "table"s into "struct"s in the fbs file. For further reader convenience I will upload my working fbs here. waza_array.fbs 27.12 kB · 17 downloads it's working? Link to comment Share on other sites More sharing options...
cr001 Posted September 24, 2023 Author Share Posted September 24, 2023 Yes I have tested with the newest DLC version, it is still working. Link to comment Share on other sites More sharing options...
mirakomi Posted March 15 Share Posted March 15 thank you, you saved me so much time Link to comment Share on other sites More sharing options...
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