crosscode-map-editor icon indicating copy to clipboard operation
crosscode-map-editor copied to clipboard

Add an option for copying JSON data

Open lexisother opened this issue 1 year ago • 4 comments

When patching existing maps, it'd be handy if users could copy entire JSON structures of entities or properties of said entities (e.g. event in EventTrigger)

lexisother avatar Jul 26 '24 22:07 lexisother

Could you clarify your request? Currently, copying entities automatically copies their JSON to the clipboard. This could be expanded for other things that can be copied, like event/action steps. Is this what you mean?

Vegita2 avatar Jul 28 '24 13:07 Vegita2

Honestly, I completely forgot that copying entities also copies their data to the clipboard. However, copying data from main functions (event/action steps, NPC states) or even specific widgets would be handy as well.

lexisother avatar Jul 28 '24 14:07 lexisother

Having event and action steps use the clipboard would be a huge improvement to the map editor, just as it was back when this feature was added to props. Being able to copy/paste event/action steps between different EventTrigger entities alone would greatly improve the user experience.

XenonA7 avatar Jul 29 '24 15:07 XenonA7

Something to consider is that there are a handful of event/action steps with identical names and data structures, such as WAIT. Copying a WAIT event step and pasting it into an action will probably work. However, there are quite a few steps unique to events or actions, and there are some steps like SHOW_EFFECT that exist as both event and action steps with slight differences between the two versions.

Generally, copying action steps into an event and vice versa will likely be a problem. New users will certainly not understand the difference between event/action steps because they look the same in the editor. I think there needs to be some sort of protection built-in for this if clipboard copy/paste is added.

XenonA7 avatar Jul 29 '24 15:07 XenonA7