OpenKh icon indicating copy to clipboard operation
OpenKh copied to clipboard

Created new Tool to edit KH2 07LocalSet file.

Open Kite2810 opened this issue 6 months ago • 8 comments

Kite2810 avatar Jun 29 '25 20:06 Kite2810

Ok first comment, we try to follow the MVVM pattern when we build tools. https://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93viewmodel But as this is a simple application it's fine. And it can be split in the appropriate files later on. The concept is that the view is only responsible for the UI and that the business logic is in the model and the viewmodel links the 2 together but for simple applications it's a bit of overkill.

Delta-473 avatar Jun 29 '25 20:06 Delta-473

hmmm I see. I take that for the next tool then I guess :)

Kite2810 avatar Jun 29 '25 20:06 Kite2810

...we try to follow the MVVM pattern when we build tools.

Wh... why? We are making tools for Kingdom Hearts, not developing the next big thing in exemplary sciences. MVVM is kinda overkill, wouldn't ya agree?

TopazTK avatar Jun 30 '25 10:06 TopazTK

For small, simple tools it's overkill but certain builder/certain validation logic for file types could be moved to lower layers so it can be reused by other tools if they need to interact with that file type. Also it never hurts to learn about design patterns to know what exists. :)

Delta-473 avatar Jun 30 '25 12:06 Delta-473

I think itself it´s true. But it would be heavily overkill for THIS tool. Since first of all, there is no other tool that opens and edits localsets. Secondly. Localset itself has not really ID's that can be used that already exists. Except for the WORLDS.md list maybe. Which is super small. I mean that is just like 21 rows of code. (if you even can say that.)

If I would add my Puzzle Editor on the other hand to openkh. Then I definitely would have to make sure that it uses these other lists. Since I do use World names, Puzzle names and Item names which are also around 600 Id's iirc. I would see a point where that makes it easier in terms of what you just said. OTHERWISE I´m not 100% Familiar with MVVM. OpenKH is the first project I ever contributed to, that uses all these files differently, which I need a little bit of time to fully understand. (Visual Studio with it´s visual bugs are not helping LMAO)

But yeah otherwise I just hope this tool will be accepted as it is. Since it doesn´t break anything and works just fully normal if builded, together with every other file. The assembly name is also correct and shouldnot break anything.

Still I´m new to work with openkh in it´s entire and may be a bit stoopid, since I´m socially scared a lot, because I do may things wrong :stare:

Kite2810 avatar Jun 30 '25 16:06 Kite2810

...we try to follow the MVVM pattern when we build tools.

Wh... why? We are making tools for Kingdom Hearts, not developing the next big thing in exemplary sciences. MVVM is kinda overkill, wouldn't ya agree?

As someone who's been diving into this ecosystem lately, let me tell you, it's so much easier to want to jump in and make that first contribution if things are structured well. Case in point, I've been refactoring the GoA mod and it's taken a very long time to get a rough understanding of things due to everything just being dumped into one file with no real structure. So, I'd say it's definitely worth it, even in homebrew fan-made tools.

Edit: not commenting on this specific change necessarily, just thought I'd chime in on a vote for good design structure overall.

jhobz avatar Jun 30 '25 16:06 jhobz

A test is failing atm but I haven't checked which one.

Delta-473 avatar Jun 30 '25 16:06 Delta-473

A test is failing atm but I haven't checked which one.

It was the build.ps1 failure :stare: I don´t know 100% what that means for THIS. But I guess the file wasn´t able to build from that?? :( I am a failure it seems.

Kite2810 avatar Jun 30 '25 16:06 Kite2810

LGTM

Delta-473 avatar Jul 01 '25 18:07 Delta-473

...we try to follow the MVVM pattern when we build tools.

Wh... why? We are making tools for Kingdom Hearts, not developing the next big thing in exemplary sciences. MVVM is kinda overkill, wouldn't ya agree?

As someone who's been diving into this ecosystem lately, let me tell you, it's so much easier to want to jump in and make that first contribution if things are structured well. Case in point, I've been refactoring the GoA mod and it's taken a very long time to get a rough understanding of things due to everything just being dumped into one file with no real structure. So, I'd say it's definitely worth it, even in homebrew fan-made tools.

Edit: not commenting on this specific change necessarily, just thought I'd chime in on a vote for good design structure overall.

I getcha but OpenKH is anything but well structured, kekw. We need an overhaul sometime.

TopazTK avatar Jul 05 '25 13:07 TopazTK