Submit Your Article


 
RPG Maker

Welcome Guest ( Log In | Register )


  Games Resources RPG Maker VX RPG Maker XP Scripts Tutorials Downloads

 
Reply to this topicStart new topic
> Zeriab's Caterpillar Script
Zeriab
post Aug 25 2008, 10:37 AM
Post #1


Level 12
Group Icon

Group: Revolutionary
Posts: 196
Type: Event Designer
RM Skill: Skilled




Zeriab's Caterpillar Script
Version: 1.0


Introduction

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 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)

Script

Please extract the script from the demo above

Instructions

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.

<div style="margin:20px; margin-top:5px"><div style="margin-bottom:2px">[Show/Hide] Big and evil instructions</div><div style="margin: 0px; padding: 6px; border: 1px inset;"><div style="display: none;">
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:
CODE
#==============================================================================
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 = 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

</div></div></div>

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

And finally: ENJOY!

- Zeriab


__________________________
Go to the top of the page
 
+Quote Post
   
Pierre_Phoenix
post Sep 1 2008, 06:16 PM
Post #2


Level 4
Group Icon

Group: Member
Posts: 46
Type: Event Designer
RM Skill: Advanced




how can i make the caterpillar start without the swith?? when i start the game i want the caterpillar to be there already


__________________________
Go to the top of the page
 
+Quote Post
   
Kousetsu
post Sep 1 2008, 07:57 PM
Post #3


Level 2
Group Icon

Group: Member
Posts: 28
Type: Artist
RM Skill: Beginner




It worked for me o.o Perfectly in fact X3

best script evuh!!!
Go to the top of the page
 
+Quote Post
   
Zeriab
post Sep 1 2008, 10:45 PM
Post #4


Level 12
Group Icon

Group: Revolutionary
Posts: 196
Type: Event Designer
RM Skill: Skilled




@Pierre_Phoenix:
You can either use a parallel process to turn on the switch, use Punk's autoswitcher or configure the caterpillar to always be on. (Use CATERPILLAR_ACTIVE_SWITCH = true for that)

@Kousetsu:
I'm glad you like it biggrin.gif

*hugs*
- Zeriab


__________________________
Go to the top of the page
 
+Quote Post
   
Pierre_Phoenix
post Sep 9 2008, 01:56 PM
Post #5


Level 4
Group Icon

Group: Member
Posts: 46
Type: Event Designer
RM Skill: Advanced




ok thanks i love this caterpillar xD specialy because i don't go through my chars tongue.gif


__________________________
Go to the top of the page
 
+Quote Post
   
Zinx10
post Oct 11 2008, 06:47 AM
Post #6


Master of Darkness
Group Icon

Group: Revolutionary
Posts: 1,194
Type: Developer
RM Skill: Advanced
Rev Points: 5




how do you hold more than 4 people?


__________________________
My Games
Phelxyre: Time Unbound (Current Project)
Game Thread
A game where you start in the future, but you go to the past, to make things right, hopefully.

The Hidden World
Game Thread
An Arcade-style game where you must go through various puzzles to see if you go home.

Here are all the things I Support (They Include Links!)




Go to the top of the page
 
+Quote Post
   
LusoLux
post Oct 11 2008, 08:03 AM
Post #7



Group Icon

Group: Member
Posts: 1
Type: None
RM Skill: Advanced




Hi smile.gif

This script doesn't work for me. It sounds really interesting but unfortunetaly I get the following ERROR:

" ... line 446: Name Error occured
undefined method 'command_129' for class Interpreter."

Please Help! confused.gif


Thanx

QUOTE (Zinx_therpgmaker @ Oct 11 2008, 07:47 AM) *
how do you hold more than 4 people?


In Line 35, change the 4 by whatever number you want.

=> MAX_ACTORS = 4 to MAX_ACTORS = 8 for example! thumbsup.gif

Don't forget to change the party initial number if you haven't done that already. teehee.gif

Go to the top of the page
 
+Quote Post
   
Zeriab
post Oct 24 2008, 02:24 PM
Post #8


Level 12
Group Icon

Group: Revolutionary
Posts: 196
Type: Event Designer
RM Skill: Skilled




Sorry for the late reply.

Thanks for the nice comment Pierre_Phoenix I appreciate it ^^

@LusoLux:
This is for RPG Maker XP. If you try to use it in RPG Maker VX you get that error.
If you are using RPG Maker XP which custom scripts are you using or have you for some reason altered the Interpreter script?

*hugs*


__________________________
Go to the top of the page
 
+Quote Post
   

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

Lo-Fi Version Time is now: 19th May 2013 - 11:51 AM
RPG RPG Revolution is an Privacy Policy and Legal
eXTReMe Tracker