NX-Editor / NxEditor.EpdPlugin

EPD plugin for NX-Editor
GNU Affero General Public License v3.0
2 stars 1 forks source link

Batch Import Resource Size Table Edits #3

Closed AsteroidPizza39 closed 1 year ago

AsteroidPizza39 commented 1 year ago

The purpose of this feature would be to increase the efficiency of editing the Resource Size Table for the sake of creating mods and increasing version compatibility. Here is how I would imagine this working, with the example file of ResourceSizeTable.Product.112.rsizetable.

  1. In nx-editor, open ResourceSizeTable.Product.112.rsizetable
  2. In the Tools dropdown, there will be an option that reads Batch Import RSTB Modifications
  3. Clicking that option prompts the user to select a txt file containing the paths and sizes of the modified files (An example of the content structure of this text file is attached)
  4. The edits and additions to ResourceSizeTable.Product.112.rsizetable are applied automatically

image RSTB Edits.txt

ArchLeaders commented 1 year ago

One slight caveat, modifications/additions will need to be explicitly defined in case of duplicate hashes (which can happen fairly often with 300k values)

AsteroidPizza39 commented 1 year ago

meaning we’d have to specify whether an edit is a modification or a new entry?

ArchLeaders commented 1 year ago

Correct.

AsteroidPizza39 commented 1 year ago

Personally, i think that if someone is already creating a mod that edits RSTB, it’s a reasonable expectation that they’ll know which of their files is brand new vs which are edits.

ArchLeaders commented 1 year ago

Yes the user will know, but the computer needs to know as well.

Unless the parent table is also defined, there is no way of knowing on edge cases when a entry is an edit of a crc32 entry, or a duplicate hash and should be placed in the string entry.


(Unless I misread your message there... I suppose you could just mean "yes, that works cause the user will know and can define them")

ArchLeaders commented 1 year ago

So something like this is probably what I'd use for markup.

{
    "StringTable": {
        "key_1": 1111,
        "key_2": 2222
    },
    "HashTable": {
        "key_3": 1111,
        "key_4": 2222
    }
}

Ideally, this will be generated after making edits in the restbl editor.

AsteroidPizza39 commented 1 year ago

seeing as the program asks to define a game path for totk, you could add an ‘open TOTK restbl’ button with the TOTK plugin that would navigate to the restbl file of the dump. Then another button for importing/merging/exporting edits, and that would make nx-editor the ultimate mod merging tool (for now)

ArchLeaders commented 1 year ago

Yeah merging will be pretty trivial. I'll need some way for plugins to communicate to make it seamless though, which is a bit difficult.

AsteroidPizza39 commented 1 year ago

if it would have to communicate between plugins, maybe base it in the main program and have it go through that?

ArchLeaders commented 1 year ago

if it would have to communicate between plugins, maybe base it in the main program and have it go through that?

Completely forgot to respond to this.

This works fine, but kind of defeats the point of plugins all together.

ArchLeaders commented 1 year ago

Implemented in the new restbl editor