nbt-studio icon indicating copy to clipboard operation
nbt-studio copied to clipboard

adding plugins to automate the work.

Open Max-RM opened this issue 4 years ago • 6 comments
trafficstars

add the ability for users to create their own plugins. for example, to edit snbt when opening a schematic file and editing TileEntities. where the user can write the command: replace all " /setblock ~ ~+2 ~+5 glass "with" /setblock ~ ~+2 ~+8 bedrock" which will be convenient if there are a lot of such lines. or another example: to all the numbers found between the lines "map_uuid" and "L}}" increase by the number entered by the user. thus, it will greatly speed up the work for those who perform the same type of actions. although to create plugins, people will need to know "C"

Max-RM avatar Jul 25 '21 14:07 Max-RM

How would you feel if these plugins/actions were like python scripts or something?

tryashtar avatar Jul 25 '21 17:07 tryashtar

probably python would be more convenient for other people

Max-RM avatar Jul 25 '21 17:07 Max-RM

@tryashtar Tryashtar, what do you think if we combine the programs engines of the image map, nbt studio, Map Art Video cassetes editor programs. we could have a full-fledged video transfer program in minecraft. after all, at the moment Map Art Video cassetes editor can only work without an interface and in combination with image map. I would be happy to cooperate with you. (if that interests you)

Max-RM avatar Jul 25 '21 17:07 Max-RM

To be honest, I want to keep the scope of this program rather small; it's supposed to be an alternative to NBTExplorer, not MCCToolchest or similar. So basically anything to do with Minecraft content is in my view off-limits, it's just Minecraft formats.

I could see adding an animation option to Image Map though. Once I get some time that is...

As for this scripting suggestion, it's a good one, but it will probably take a while, because I want to finish the changes that will make #12 possible first

tryashtar avatar Jul 25 '21 17:07 tryashtar

Work in progress version: https://github.com/tryashtar/nbt-studio/commit/6a3707237e36cd6d329fd0ab868182847f290826

Before this gets finished, I need to do the following things:

  • Show output/errors when running scripts (easy)
  • Alert the user when scripts fail to load (easy)
  • Split MainForm into view and controller. Scripts still should be able to perform UI actions, like saving files or prompting the user to input something (on a related note, those functions should definitely return a value now). But scripts should also be able to bypass the UI. For example, form.AddTag would open up a prompt window, but you could use controller.AddTag(new NbtByteTag(3)) to do it automatically. Having access to the user-selected node is important, even when bypassing the UI, but you should also be able to use a different node. All of this is medium work, but I would prefer to have the tree rewrites done first.

tryashtar avatar Jul 27 '21 00:07 tryashtar

excellent

Max-RM avatar Jul 27 '21 13:07 Max-RM