Conversation
|
I haven't looked at the merging logic at all yet, but IO libraries are out of the scope of TkSharp and should be abstracted to another library. |
There was a problem hiding this comment.
Is there any reason for this to exist? It looks to me like it's just parsing the file, then ignoring it and writing the entire file anyway. Unless the .Read function mutates srcBuffer, but that seems sketchy.
Could it be solved with a high-level copy?
|
This is mostly unrelated to the merging logic, but is there a particular reason for using JSON objects instead of standard C# types for the ASB/BAEV object classes? |
|
Quick update: I moved the ASB/BAEV parsing and writing out of TkSharp into a separate package, AsbLibrary 0.1.0, and replaced the JSON-backed objects with regular C# types. TkSharp now references that package and only contains the merging logic. |
|
Hopefully I'll have time to review this soon. However, before I do, is any of this code written by AI? |
This adds native ASB and BAEV support to
TkSharp.Merging.The merger uses the vanilla file as its reference and applies mod files in load order. ASB node and command references are remapped when custom nodes are added, and BAEV events are merged by their group, node, and event identifiers. Embedded EXB data is preserved unchanged.
I tested this using real ASB and BAEV files from the game. Both formats survive repeated C# read/write cycles, and the output can also be read by TotkBits. I also tested merging added nodes, command references, event changes, and cases where a later unmodified file should not undo an earlier mod.
If any issues arise, I'm willing to fix them and even improve them