The script uses map events with special tags in their name.
The map events are tied to specific actors.
If you want an event to represent the actor with id 1 in the database then somewhere in the name of the event put this:
\cat_actor[1]If you want an event to represent the actor with id 19 then use this instead:
\cat_actor[19]Basically you put in
\cat_actor[id of actor] in the name of the event in question.
Note that you need to do this for every map. Yes, a lot of work.
You copy the script and paste it just above main. (I.e. you open the script editor, scroll to the bottom of the left form, click on main, press insert and paste the script into the right form)
In the script pay attention to the area just below the script header:
#==============================================================================
class Game_Caterpillar
CATERPILLAR_ACTIVE_SWITCH = 23
REMOVE_VISIBLE_ACTORS = true
MAX_ACTORS = 4
#--------------------------------------------------------------------------
This is the area of script where you can customize the script. I will go through each of the lines and explain what they do:
CATERPILLAR_ACTIVE_SWITCH = 23This line will allow you to control whether the caterpillar is active or not by specifying a switch.
By default you can see that we have
CATERPILLAR_ACTIVE_SWITCH = 23 which means you can turn the caterpillar ON and OFF by turning switch 23 ON and OFF.
Notice that switch 23 by default start on OFF and you must turn the switch ON before the caterpillar 'works'.
Feel free to change the number 23 to any number you want, i.e. which switch you want.
If you for example want to use switch 0169 instead it should be
CATERPILLAR_ACTIVE_SWITCH = 169.
REMOVE_VISIBLE_ACTORS = trueThis determines whether events for actors not currently in the party should be erased or not.
You can set this to a number like
REMOVE_VISIBLE_ACTORS = 21 if you want to specify it with a switch. In this example you can turn it ON and OFF by turning switch 21 ON and OFF.
MAX_ACTORS = 4I believe this is self-explonatory. Only change this if you can have more than 4 actors. No harm is done if you have a lower max.
A little word of caution: Do not put leading 0's in front of numbers in ruby. The reason is that Ruby considers numbers with leading 0's as octadecimal. I.e. 0, 1, 2, ... , 6, 7, 10, 11, ... No 8 nor 9. So for example 15 oct = 13 and 8 oct and 9 oct gives an error.
Here are two call scripts you can use if you feel the caterpillar isn't updated properly like problems with the graphic. Also highly useful should you have custom scripts and need to tell the caterpillar script has changed: (The call script is the event command on the bottom-right of page 3)
This will update the caterpillar to make sure the right events and right graphics are used.
$game_system.caterpillar.update
This will refresh the caterpillar which pretty much 'starts on a fresh'. All the events will be placed the same place as the player. As if you were teleported. Only use this if the update don't work.
$game_system.caterpillar.refresh