So I explored further the feasibility of doing this within the running game. Here's the current test:
It's piecing together the necessary parts and very wip atm so it's a bit messy. Mostly a lot of asynchronous calls. A final step if I works well will be to simplify everything best I can.
What it does?
It can show a open file dialog, load a capx file as a zip and access files inside.
So I made a converter to convert the xml to json so it's easier to navigate, copy and modify in various ways. The plan it to also convert it back to xml when done if I want to save changes.
What is left to do?
* Convert the json back to xml for saving.
* Do some manipulation of instances on a layout. Initial things I had in mind were changing positions, duplicating instances, and destroying instances. Probably will make a simple ui for that purpose.
* Save a completed new capx file with the modifications.
It's mostly all done in js, and doing it in a plugin would be too restrictive, and doing it in straight events would take too long and be slow and hard to reuse.