Ability to copy and paste code from game to other programs

Description of the Feature:

  • I need the ability to copy and paste eventing code from game to forums or external editors. This would make it easier to have people help me with the code. It would simply use the CTRL+C and CTRL+V that is common.

Code for Implementation:
Sorry, none.

Mockups:
None.

Why is this feature good?
This feature is great because of the following:
  • Make it easier to get help in coding games, especially with support requests.
  • It will help us making longer, complex games faster.

Possible issues with this feature?
Issues that might arise from this feature:
  • May be a headache for the game engine if we paste that code back into the game.

MODERATORS: Please fix this to add the poll you want. Thanks! (This is the last thread from me as well.)
okay i voted Yes,
I've helped people multiple times on this forum and wrestled with the low image size limit becuase need to show them the event code.
it would be very very useful to be able to grab the raw text that is displayed in the editor.

Now you may not arleady know this but, its proabably not going to work pasting raw text into MV event Command format.
the test you see when eventing is bascally just UI. the events commands are fomatted in JSON like this
Code:
 { code 101, indent : 0, param: ["Jake", 1, 3]}, {code: 404, indent: 0, params: ["This is Showing text!!"]},
That makes no sense to anyone but to coders. so in order to paste it you would have to copy it in that format, and have MV parse it. which means if you paste in here it will look like that and bascially acheive nothing since you can already Copy and paste event codes.

but an alterantive would be an ability to export and import events. events are much smaller than images and maps.
so bascially when you press "export"MV will grab the event Data and ask you to save it as a seperate file. And import will ask you to a look for a file containing event data.
You may ask "But you can already Ctrl +C Ctril +V events!!!! THIS is pointless!!!"
Yet but you can't send an event to someone, you can only send them a map with the event on it. this makes it easier to share events with people.
this also allows you o use "external editors" to modify these events without worrying about MV interferring with them.

so in summary:
- copy raw text displayed in events
- export events
-import events
There is already Copy to Text and Copy to HTML in the event windows though. Select what you want, right click and voilá.
Spoiler: random code I quickly put up as a demonstration
Code:
◆Select Item:#0001, Key Item
◆Control Self Switch:A = ON
◆If:#0001 is ON
  ◆If:#0001 = 0
    ◆Show Balloon Icon:Player, Exclamation
    ◆
  :Else
    ◆Play ME:Mystery (90, 100, 0)
    ◆
  :End
  ◆
:Else
  ◆If:Timer ≥ 0 min 0 sec
    ◆Loop
      ◆Break Loop
      ◆
    :Repeat Above
    ◆
  :End
  ◆
:End

I think it does a good job. The only thing you cannot do is paste this text into events.
This could be possible, I don't see why not. No promises though.

- Liquidize
You are forgetting that if you need help with events, usually it's NOT the event code/commands itself that contains the problem, but often other settings on the event page, or the tab order. We normally ask people to show screenshots of their entire event window for this specific reason, rather than just showing us the event commands. So having this ability is NOT likely to help you get support faster - though it could be useful for other things.
I was thinking more along the lines of allowing people to copy an entire event as JSON in the editor (conditions,commands, and everything else) and then share that JSON so people can "paste" it into the editor as an event.
That'd be simple, and would solve that problem, but might cause another.

If I see someone asking for help, and they've got a screenshot of the event, I could check it out straight away and potentially give them an answer/solution. But if they post the JSON, I can no longer see, just by looking at the post, what's going on. I'd have to go to the trouble of opening up the editor & waiting for a project to load (assuming I'm okay just putting it anywhere in my current project/map) and pasting it. To be honest, I wouldn't go to that much trouble. I'd just skip it and move onto the next thread. All the database items referenced by the event would be named incorrectly as well, if we just imported the event into our own project.

Your idea would be interesting for people providing eventing tutorials. You could just copy/paste the event itself without having to work through the logic and enter it all manually. It does defeat the purpose of the tutorial (working through the steps in order to learn) but some people just want the answer anyway and are happy to short-cut the learning.
Perhaps, but it doesn't take away from the ability for people to just post screenies, or do both. It only adds to the features of the engine as an option for people to use.
As I am trying to be a bit more open about what is going on with the editor and such, I would like to share this.

This is just something I've implemented in my free time, it is still pending approval for actual integration into the engine. It may not be actually implemented in a product release.



Please hopefully...look forward too it.

- Liquidize
Does that just copy/paste between the editor and the clipboard? So you Share, then paste into a post on the forum, for example, and then someone else copies from that post and Pastes into their project?
Does that just copy/paste between the editor and the clipboard? So you Share, then paste into a post on the forum, for example, and then someone else copies from that post and Pastes into their project?
Correct, it wouldn't really make sense to make an entire system like thing that lets you upload events and browse uploaded events. At least that is in my opinion, because events are a bit more specific per game?

Original thread: https://forums.rpgmakerweb.com/threads/ability-to-copy-and-paste-code-from-game-to-other-programs.83482/