Copy Events XP
#1
Copy Events XP
Version: 1.4
Based on Fomar0153's RPGMaker VXAce script



Introduction
This script allows you to copy an event from one map to another. Please note this does not save them to a map, you will need to add them every time. You could use this to set pre-defined events within a repository map and copy them in on an auto event every time you enter the town for example.

Optionally, you could use it to create an army to chase characters in a map, copying one or two premade soldier events rather than manually produce the 10 or 20 soldiers. Another potential use would be eventers using it to help event systems where you copy in an all-purpose event into the map.



Script
The Script


Instructions
Place below Scene_Debug and above Main. Use the one script call listed within the script to duplicate events to your heart's content.



Compatibility
This version is ported for RPGMaker XP. It was based upon the RPGMaker VXAce version by Fomar0153.



Credits and Thanks
Obviously thanks to Fomar0153 for the original RPGMaker VXAce script



Terms and Conditions
Free for use, even in commercial games. However, due credit is not just for me, but for Fomar0153 as well.
Up is down, left is right and sideways is straight ahead. - Cord "Circle of Iron", 1978 (written by Bruce Lee and James Coburn... really...)

[Image: QrnbKlx.jpg]
[Image: sGz1ErF.png]    [Image: liM4ikn.png]    [Image: fdzKgZA.png]    [Image: sj0H81z.png]
[Image: QL7oRau.png]    [Image: uSqjY09.png]    [Image: GAA3qE9.png]    [Image: 2Hmnx1G.png]    [Image: BwtNdKw.png%5B]
  Above are clickable links
Reply }
#2
Will this work with your BIG MAPS script or could it cause some issues?
Reply }
#3
That is unknown.

I would not presume there to be a problem copying events from a source map that is 'not' a Big Map.

However, when a 'Big Map' is created from the maps you had defined, it creates its own @bigmap_events array. This script pushes the temporary copies into the map's original events array.

Now, it is possible that the duplicates will appear within a BigMap itself, but only for that individual map segment defined.
Up is down, left is right and sideways is straight ahead. - Cord "Circle of Iron", 1978 (written by Bruce Lee and James Coburn... really...)

[Image: QrnbKlx.jpg]
[Image: sGz1ErF.png]    [Image: liM4ikn.png]    [Image: fdzKgZA.png]    [Image: sj0H81z.png]
[Image: QL7oRau.png]    [Image: uSqjY09.png]    [Image: GAA3qE9.png]    [Image: 2Hmnx1G.png]    [Image: BwtNdKw.png%5B]
  Above are clickable links
Reply }
#4
There is a syntax error in line 81 and it doesn't seem to work when you use higher numbers at the map and event ID, for example Event 50 from map 270.
Reply }
#5
BUMP
to version 1.1

The issue with the inability to display the events as reported had nothing to do with the Map ID exceeding any numeric value. It was Event_ID based alone, and an issue that I had just solved as shown below.

[Image: attachment.php?aid=2099]
Here, I had created Map #295 and map 286, with over 50 events to choose from within map 286.

As to line #81, there is no syntax error. That line's function is to position the newly acquired event on the map where you wish it to exist. And without that line, the event would not be visible.

I will have to assume that something is preventing the creation of the event in the map where you wish it to exist, and thus this line that moves the event would fall upon as an error which I expect to read as:
undefined method 'moveto' for nil::NilClass.


Attached Files
.png   oof.png (Size: 105.01 KB / Downloads: 50)
Up is down, left is right and sideways is straight ahead. - Cord "Circle of Iron", 1978 (written by Bruce Lee and James Coburn... really...)

[Image: QrnbKlx.jpg]
[Image: sGz1ErF.png]    [Image: liM4ikn.png]    [Image: fdzKgZA.png]    [Image: sj0H81z.png]
[Image: QL7oRau.png]    [Image: uSqjY09.png]    [Image: GAA3qE9.png]    [Image: 2Hmnx1G.png]    [Image: BwtNdKw.png%5B]
  Above are clickable links
Reply }
#6
Cool, now it works. I even tested it on a Big Map and it works there aswell.

But I have to delete the space in line 81 between the moveto command and the brackets, otherwise it gives me this syntax error.
Might be a HiddenChest/MKXP issue.

[Image: yTttbpP.png]
Reply }
#7
(03-24-2024, 09:36 AM)Melana Wrote: But I have to delete the space in line 81 between the moveto command and the brackets, otherwise it gives me this syntax error.
Might be a HiddenChest/MKXP issue.

BUMP
to version 1.2

Just a minor update to accommodate RGSS1 Ruby engines not designed by Enterbrain.
Up is down, left is right and sideways is straight ahead. - Cord "Circle of Iron", 1978 (written by Bruce Lee and James Coburn... really...)

[Image: QrnbKlx.jpg]
[Image: sGz1ErF.png]    [Image: liM4ikn.png]    [Image: fdzKgZA.png]    [Image: sj0H81z.png]
[Image: QL7oRau.png]    [Image: uSqjY09.png]    [Image: GAA3qE9.png]    [Image: 2Hmnx1G.png]    [Image: BwtNdKw.png%5B]
  Above are clickable links
Reply }
#8
Just an idea for a maybe future version: Being able to change some settings of the newly created events, like facing direction, movespeed, through, stepping etc.

So if you want to, lets say, create 10 guards from a guard template event, you could let them look in different directions, or let some of them walk around randomly, while others just stay still.
Reply }
#9
I found 2 bugs in this script.
When a copied event has some content, e.g. a message command, this error appears after talking to the event

[Image: kVs6ExK.png]

And it seems you cant add more than 5 events to a map.
If you add more, previous added events disappear and only the sprite remains on the map.
Edit: That only happens on a map where already other events exist, and where there are gaps between the IDs it seems.
For example: Event IDs 1-9 and 11-15 exist but 10 doesnt, if you try to spawn 6 new events then via the script it only spawns 1 and from the other 5 only the sprites.
Reply }
#10
BUMP
to version 1.3

Just this morning, I received a notification. And obviously, I looked into it.

(05-25-2024, 11:04 AM)Melana Wrote: And it seems you cant add more than 5 events to a map.
If you add more, previous added events disappear and only the sprite remains on the map.
Edit: That only happens on a map where already other events exist, and where there are gaps between the IDs it seems.
For example: Event IDs 1-9 and 11-15 exist but 10 doesnt, if you try to spawn 6 new events then via the script it only spawns 1 and from the other 5 only the sprites.

Regarding this bug, I found the issue. Basically, the events are stored in 'Hash' arrays and not classic Arrays. By that, events do have growing key IDs and Fomar0153's original did not account for the Hash styled structure that does not renumber events after deletion. To be honest, it is GOOD that they do not renumber otherwise you would lose track of event IDs if you deleted older ones!

To solve this, I added a simple method that looks for the last event ID added to the hash array. Ergo, if you had event 1,2,5,7 and 9 in your project, the next event added will be event #10 by Copy Events, followed by 11 and 12 and so forth.

(05-25-2024, 11:04 AM)Melana Wrote: When a copied event has some content, e.g. a message command, this error appears after talking to the event
[Image: kVs6ExK.png]

As towards that issue, I cannot account for. There is no 'unlock' method or variable within Copy Events, and must suggest it is an issue with another script. I have generated events that render messages and perform simple script calls when triggered, and have their own movement (I set them to random move)
Up is down, left is right and sideways is straight ahead. - Cord "Circle of Iron", 1978 (written by Bruce Lee and James Coburn... really...)

[Image: QrnbKlx.jpg]
[Image: sGz1ErF.png]    [Image: liM4ikn.png]    [Image: fdzKgZA.png]    [Image: sj0H81z.png]
[Image: QL7oRau.png]    [Image: uSqjY09.png]    [Image: GAA3qE9.png]    [Image: 2Hmnx1G.png]    [Image: BwtNdKw.png%5B]
  Above are clickable links
Reply }


Possibly Related Threads…
Thread Author Replies Views Last Post
   Immense Events DerVVulfman 17 19,345 10-28-2024, 03:39 AM
Last Post: DerVVulfman
   Refreshable Events XP kyonides 1 1,342 06-03-2023, 08:27 AM
Last Post: kyonides
   Events Always Under DerVVulfman 3 7,573 02-23-2015, 11:06 PM
Last Post: Taylor
Brick  Allow menu during events - for Visual Novels Taylor 2 7,947 08-25-2011, 12:41 PM
Last Post: Taylor



Users browsing this thread: 1 Guest(s)