This script creates a caterpillar of the party members by using events present on the map. (You need to actually make the events in the editor)
When the caterpillar is deactivated they act just like any other event. Most event commands still works on the events when the caterpillar is activated, but the results will be strange.
Screenshot
Demo
Currently I can only present a demo which includes Wachunga's Multiple Message Windows which requires SDK 1.5: http://www.sendspace.com/file/s5hkl7
This is because Wumpi and Despain requested it to work with that message system. (Only the caterpillar script is my work. I had nothing to do with the rest)
There are instructions in the header, but they might be hard to understand.
I have tried to break down the instructions so they hopefully are easier to understand.
Big and evil instructions
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:
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 = 23
This 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 = true
This 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 = 4
I 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.
Code:
$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.
Code:
$game_system.caterpillar.refresh
FAQ
Why did you make a caterpillar script when so many are around?
Despain requested a script that worked with a particular message script and Wumpi requested a script which used map events.
It didn't seem like there was such a caterpillar script out there although I admittedly didn't search hard.
So I made this believing it would work differently from other caterpillars scripts.
How do you get the events to act differently when they walk in the caterpillar and when they don't?
Create a page which has the caterpillar activation switch as precondition. If that is the top page (the one with the highest number) then that will be the event's functionality when in the caterpillar.
If you have problems with the graphic of some events not being what they are supposed to be then add a 1 frame wait and a script call:
Code:
$game_system.caterpillar.update
This should solve the problem. The 1 frame wait is necessary or the page change will not have been registered before the update and the result is the same.
The caterpillar made me stuck
Set the events of the caterpillar to Through. (Options area to the lower right)
Compatibility
This script will most likely not work with any other caterpillar system.
Saves made with this caterpillar script cannot be used should you remove it again. (Saves without it will work with it)
It should work both without and with the SDK and I believe it should with both SDK 1.x and SDK 2.x although I have only tested SDK 1.5.
Credits and Thanks
Credits goes to Zeriab for creating the system
I would like to thank Despain and Wumpi for requesting the script.
I would like to thank everyone using their time to try and use my system.
I would like to thank everyone reading this topic.
Thanks.
Author's Notes
I would be delighted if you report any bug, errors or issues you find.
In fact I would be delighted if you took the time and replied even if you have nothing to report.
Suggestions are more than welcome