Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Zeriab's Caterpillar Script

Zeriab

Sponsor

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

http://www.mediafire.com/?md5ytjmmbdz

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.

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:
Ruby:
#==============================================================================

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.
Ruby:
$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.
Ruby:
$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:
Ruby:
$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
 
Zeriab, I .... I l-l-ll-l-l-l-l-l--l-LOVE YOU

This is something I was considering requesting and you READ. MY. MIND.

I'll fully test it out and everything when I get home today.

You're such a good member I love you *ULTRA HUG*
 

Zeriab

Sponsor

I love you to Venetia <3

It was Des and Wumpi who requested it so maybe they read your mind?

I would appreciate if you drop a note about what you think of the script after testing it

*embraces the ULTRA HUG*
 
Oh, dear .......... This is so amazingly cool.

I might have to redo my current scenes to support this. It's just so, so much better than what I have now!

Excellent job on this, seriously!!!!
 
yeah man this is really great stuff here. i haven't tested it too extensively yet but from what i've seen so far it's really neat. finally a caterpillar system to make use of those comic messages!!
 

Zeriab

Sponsor

I'm glad you like it ^_^

This script does require some work to be done most of the maps. That is the price.
On a side note. I just tested with Wachunga's message system. You can get party members to speak while they follow you. Just like the baby in the demo. :3

*hugs*
- Zeriab
 
Oh, wow, it took you quite a while to release this script.
I already have the old script for this one. I would love to try this updated one.
 

Zeriab

Sponsor

@davedani: It is quite like that this script and the ABS script are incompatible. I will look into it when I have the time. (Could be a few weeks)

@pokemin: What do you mean? I have only released one version of this script
 
#==============================================================================
# ** Zeriab's Caterpillar Script
#------------------------------------------------------------------------------
# Zeriab
# 1.0
# 2008-08-25
The red means, (It was last updated?)
The green means, I'm still sleeping, and did not notice the version.

Sorry, I was just being stupid and lazy. I do not think there is a difference between your old update, and update.

Anyways, good job, It really amazing! I just wanna ask,

I set the player speed to "Faster", and the event caterpillar seems always to be one step apart from the player when it moves. Is there a way to fix this?
 

Zeriab

Sponsor

Thanks Link in Pink ^^

@pokemin:
You could have looked at the time of my post - August 26, 2008, 06:02:27 am
One day after I released it :x

I am glad you like it.
There is always a gap between the player and the caterpillar. The faster you are going the bigger it is.
This is due to how the caterpillar works. I register the moves the player does and adds them to how the events should move. I don't execute them immediately and that is where the problem lies. I have done it this way to increase compatibility.
It was a design choice.

In essence: There is not easy way to fix it.

*hugs*
- Zeriab
 
Nice work, but I'm again missing one thing: Event-lead caterpillars... aka have an attribute on each event that's callable with something like this
Code:
$game_map.events[event_id].trail = [3, 12, 561]
making the events with the corresponding event ids follow the event.

Also, for your gap problem (gotta say I haven't tested the script, but it's not too hard to imagine what it looks like): If you won't make a version/switch for the non-gap method, you should add some randomness to the folowers' moves, aka not have them react always after the same time, but every time you change direction, change the reaction time by a little. I think that'd give a nice effect of non-roboticness, as well as covering that flaw up a bit that arises from your not-too-bad choice of adding the movement to the event's own movement.

Nice work there, dude.
 
Only just found this script... and i love it!!

quick question though about the 'gap' thing,
is there a way to set it so that the actor whos following you stays a space behind even at the normal, slower speeds?

if that could b done then i shalt b able to make a the little idea ive got for my game ^^

thanks again for this!!
 
A few questions but this could be a perfect script for me.

1. When an event is on follow, does it follow onto other maps?
1i, If this is the case, can you leave it in another map.
1ii,If this is the case, if you leave the map and return, will it still be there?
 

Zeriab

Sponsor

@Drakan X:
I am glad you like my script ^^
There is currently not an option for what you want.
It is a fairly basic system and there are few options.

I might make an advanced version with more options later (and more compatibility issues to follow)
I currently don't have the time nor do I have in the near future so it's only a maybe months out in the future.
Feel free to edit the script or get another scripter to edit the script for you.

@The Data Mage:
Events does not follow into other maps.
You have to put an event for each possible actor for each map you want them in.
If there is not an event they don't appear. If they are present they will be teleported to the tile you teleport to.

*hugs*
- Zeriab
 
Would there be any way to script in a way to automatically detect what image the event is using so that the new map's event will auto change to the graphic of the previous event?
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top