KENTONA'S COOLER CATERPILLAR SYSTEM
A Caterpillar System for RM2K3 but requires more code
kentona- 03/10/2010 05:41 PM
- 42707 views
After reading Calunio's Caterpillar System I implemented it into my game, but noticed a few quirks. For example, when the Hero is up against an obstacle and faces down without moving down (or any direction), the behavior of the followers is not ideal. They will position themselves behind the Hero regardless of passibility and the fact that the hero hasn't actually moved. Plus, I expanded it to include 3 followers behind the Hero and included the auto-start positioning logic for when you enter a new map.
I have also made a template project!
DOWNLOAD TEMPLATE PROJECT
http://rpgmaker.net/users/kentona/locker/Caterpillar.rar
Update (Jan/23)
Converted to the current official version of RM2k3, but lazily just dumped the old RTP into the resources of this project:
https://rpgmaker.net/users/kentona/locker/Caterpillar2.zip
VARIABLES, SWITCHES AND EVENTS
You will need 18 variables and 3 switches and 4 events on every map to make this tutorial work.
The gist of this caterpillar system is that the Follower follows the Hero, the Third follows the Follower, and the Rearguard follows the Third. The followers (Follower, Third and Rearguard) are all parallel processes, same layer as Hero, with Phasing ON. They will only move if the person they are following change position on the map. (Thus they won't move if the person they are following simply changes facing direction without actually moving). Being in phased mode means that you can freely walk through them so you won't get stuck in narrow areas.
Now, on to the events...
Event ID:0001: Positioning
The auto-start Positioning event moves all the followers to the same location as the hero, just to start things off.
By erasing the event it ensures that this event is only run once BUT will re-run if the player leaves the map and then returns later. It saves having to track variables and whatnot.
The Positioning event also initiallizes a few positional tracking variables for use in the followers events.
Event Graphic: invisible
Trigger: Auto-Start
Event Layer: Below Hero
Event ID:0002: Follower
This event is the dude immediately after the hero.
The logic is straigtforward: track the location of the Hero, test to see if the Hero has changed position, and if he has move This Event accordingly.
Event Graphic: charset of the second playable character
Trigger: Parallel Process
Event Layer: Same layer as Hero
Event ID:0003: Third
This event is the dude third in line in the caterpillar, following the Follower event.
It is very similar to the Follower event, except that the Third tracks the position of the Follower event rather than the Hero.
Event Graphic: charset of the third playable character
Trigger: Parallel Process
Event Layer: Same layer as Hero
Event ID:0004: Rearguard
This event is the dude last in line in the caterpillar, following the Third event.
Same as the Third event, except tracking the Third's position (obviously).
Event Graphic: charset of the fourth playable character
Trigger: Parallel Process
Event Layer: Same layer as Hero
...and there it is!
NOTES
-You cannot allow the player to change the order of the party (unless you somehow track the order manually and change charsets and event graphics accordingly)
-This caterpillar assumes that you have only 4 playable characters (if you have more, you will have to add logic for event graphics)
-The leader of the caterpillar will be the Hero, ie- whoever happens to be first in the party order.
-Since Phasing Mode is ON for the followers, other events can walk over them (Unfortunately, Forbid Event Overlap doesn't work on Phased events)
-It is critical that the event IDs are consistent! RM2k3 references other events by their Event ID, so if you don't have these events as 0001, 0002, 0003, and 0004 make sure to edit the follower events accordingly to reference the correct events. Honestly, it is easiest just to create a template map with these four events ready to go to use for every time you want to make a new map in your game. Copy the template map, paste it to where you want it and then add mapping and other events after. That way the event IDs are always 0001~0004 and you don't have to muck around with anything.
-In the Template project I also added special world map logic for riding in vehicles like boats and airships.
I have also made a template project!
DOWNLOAD TEMPLATE PROJECT
http://rpgmaker.net/users/kentona/locker/Caterpillar.rar
Update (Jan/23)
Converted to the current official version of RM2k3, but lazily just dumped the old RTP into the resources of this project:
https://rpgmaker.net/users/kentona/locker/Caterpillar2.zip
VARIABLES, SWITCHES AND EVENTS
You will need 18 variables and 3 switches and 4 events on every map to make this tutorial work.
Event ID:0001: Positioning
Event ID:0002: Follower
Event ID:0003: Third
Event ID:0004: Rearguard
[0101:HeroX]
[0102:HeroY]
[0103:SecondX]
[0104:SecondY]
[0105:FollowerX]
[0106:FollowerY]
[0107:ThirdX]
[0108:ThirdY]
[0109:NextX]
[0110:NextY]
[0111:FourthX]
[0112:FourthY]
[0113:PreviousHeroX]
[0114:PreviousHeroY]
[0115:PreviousSecondX]
[0116:PreviousSecondY]
[0117:PreviousThirdX]
[0118:PreviousThirdY]
[0098:ThirdMoved]
[0099:SecondMoved]
[0100:HeroMoved]
The gist of this caterpillar system is that the Follower follows the Hero, the Third follows the Follower, and the Rearguard follows the Third. The followers (Follower, Third and Rearguard) are all parallel processes, same layer as Hero, with Phasing ON. They will only move if the person they are following change position on the map. (Thus they won't move if the person they are following simply changes facing direction without actually moving). Being in phased mode means that you can freely walk through them so you won't get stuck in narrow areas.
Now, on to the events...
Event ID:0001: Positioning
The auto-start Positioning event moves all the followers to the same location as the hero, just to start things off.
By erasing the event it ensures that this event is only run once BUT will re-run if the player leaves the map and then returns later. It saves having to track variables and whatnot.
The Positioning event also initiallizes a few positional tracking variables for use in the followers events.
Event Graphic: invisible
Trigger: Auto-Start
Event Layer: Below Hero
<> Variable Oper: [0101:HeroX] Set, Hero X Coord
<> Variable Oper: [0102:HeroY] Set, Hero Y Coord
<> Variable Oper: [0113:PreviousHeroX] Set, Hero X Coord
<> Variable Oper: [0114:PreviousHeroY] Set, Hero Y Coord
<> Variable Oper: [0115:PreviousSecondX] Set, Hero X Coord
<> Variable Oper: [0116:PreviousSecondY] Set, Hero Y Coord
<> Variable Oper: [0117:PreviousThirdX] Set, Hero X Coord
<> Variable Oper: [0118:PreviousThirdY] Set, Hero Y Coord
<> Change Event Location: Follower (V[0101], V[0102])
<> Change Event Location: Follower (V[0101], V[0102])
<> Change Event Location: Follower (V[0101], V[0102])
<> Erase Event
Event ID:0002: Follower
This event is the dude immediately after the hero.
The logic is straigtforward: track the location of the Hero, test to see if the Hero has changed position, and if he has move This Event accordingly.
Event Graphic: charset of the second playable character
Trigger: Parallel Process
Event Layer: Same layer as Hero
<> Comment ---------------------- INITIALIZE VARIABLES
<> Move Event: This Event, Phasing Mode ON
<> Variable Oper: [0101:HeroX] Set, Hero X Coord
<> Variable Oper: [0102:HeroY] Set, Hero Y Coord
<> Variable Oper: [0103:SecondX] Set, This Event X Coord
<> Variable Oper: [0104:SecondY] Set, This Event Y Coord
<> Comment ---------------------- TEST TO SEE IF HERO MOVED
<> Branch if Var [0113:PreviousHeroX] is V[0101:HeroX] Not
<> Switch: [0100:HeroMoved] ON
<> End if
<> Branch if Var [0114:PreviousHeroY] is V[0102:HeroY] Not
<> Switch: [0100:HeroMoved] ON
<> End if
<> Comment ---------------------- IF HERO MOVED, MOVE FOLLOWER
<> Branch if Switch: [0100:HeroMoved] is ON
<> Switch: [0100:HeroMoved] OFF
<> Variable Oper: [0113:PreviousHeroX] Set, V[0101:HeroX] Value
<> Variable Oper: [0114:PreviousHeroY] Set, V[0102:HeroY] Value
<> Branch if Hero Up Facing
<> Variable Oper: [0102:HeroY] + 1
<> End if
<> Branch if Hero Down Facing
<> Variable Oper: [0102:HeroY] - 1
<> End if
<> Branch if Hero Left Facing
<> Variable Oper: [0101:HeroX] + 1
<> End if
<> Branch if Hero Right Facing
<> Variable Oper: [0101:HeroX] - 1
<> End if
<> Comment ---------------------- MOVE FOLLOWER
<> Branch if Var [0103:SecondX] is V[0101:HeroX] Less
<> Move Event: This Event, Move Right
<> End if
<> Branch if Var [0103:SecondX] is V[0101:HeroX] Greater
<> Move Event: This Event, Move Left
<> End if
<> Branch if Var [0104:SecondY] is V[0102:HeroY] Less
<> Move Event: This Event, Move Down
<> End if
<> Branch if Var [0104:SecondY] is V[0102:HeroY] Greater
<> Move Event: This Event, Move Up
<> End if
<> End if
Event ID:0003: Third
This event is the dude third in line in the caterpillar, following the Follower event.
It is very similar to the Follower event, except that the Third tracks the position of the Follower event rather than the Hero.
Event Graphic: charset of the third playable character
Trigger: Parallel Process
Event Layer: Same layer as Hero
<> Comment ---------------------- INITIALIZE VARIABLES
<> Move Event: This Event, Phasing Mode ON
<> Variable Oper: [0105:FollowerX] Set, Follower X Coord
<> Variable Oper: [0106:FollowerY] Set, Follower Y Coord
<> Variable Oper: [0107:ThirdX] Set, This Event X Coord
<> Variable Oper: [0108:ThirdY] Set, This Event Y Coord
<> Comment ---------------------- TEST TO SEE IF FOLLOWER MOVED
<> Branch if Var [0113:PreviousHeroX] is V[0105:FollowerX] Not
<> Switch: [0099:SecondMoved] ON
<> End if
<> Branch if Var [0114:PreviousHeroY] is V[0106:FollowerY] Not
<> Switch: [0099:SecondMoved] ON
<> End if
<> Comment ---------------------- IF FOLLOWER MOVED, MOVE THIRD
<> Branch if Switch: [0099:SecondMoved] is ON
<> Switch: [0099:SecondMoved] OFF
<> Variable Oper: [0115:PreviousFollowerX] Set, V[0105:FollowerX] Value
<> Variable Oper: [0116:PreviousFollowerY] Set, V[0106:FollowerY] Value
<> Branch if Follower Up Facing
<> Variable Oper: [0106:FollowerY] + 1
<> End if
<> Branch if Follower Down Facing
<> Variable Oper: [0106:FollowerY] - 1
<> End if
<> Branch if Follower Left Facing
<> Variable Oper: [0105:FollowerX] + 1
<> End if
<> Branch if Follower Right Facing
<> Variable Oper: [0105:FollowerX] - 1
<> End if
<> Comment ---------------------- MOVE THIRD
<> Branch if Var [0107:ThirdX] is V[0105:FollowerX] Less
<> Move Event: This Event, Move Right
<> End if
<> Branch if Var [0107:ThirdX] is V[0105:FollowerX] Greater
<> Move Event: This Event, Move Left
<> End if
<> Branch if Var [0108:ThirdY] is V[0106:FollowerY] Less
<> Move Event: This Event, Move Down
<> End if
<> Branch if Var [0108:ThirdY] is V[0106:FollowerY] Greater
<> Move Event: This Event, Move Up
<> End if
<> End if
Event ID:0004: Rearguard
This event is the dude last in line in the caterpillar, following the Third event.
Same as the Third event, except tracking the Third's position (obviously).
Event Graphic: charset of the fourth playable character
Trigger: Parallel Process
Event Layer: Same layer as Hero
<> Comment ---------------------- INITIALIZE VARIABLES
<> Move Event: This Event, Phasing Mode ON
<> Variable Oper: [0109:NextX] Set, Third X Coord
<> Variable Oper: [0110:NextY] Set, Third Y Coord
<> Variable Oper: [0111:FourthX] Set, This Event X Coord
<> Variable Oper: [0112:FourthY] Set, This Event Y Coord
<> Comment ---------------------- TEST TO SEE IF THIRD MOVED
<> Branch if Var [0113:PreviousThirdX] is V[0109:NextX] Not
<> Switch: [0098:ThirdMoved] ON
<> End if
<> Branch if Var [0114:PreviousThirdY] is V[0110:NextY] Not
<> Switch: [0098:ThirdMoved] ON
<> End if
<> Comment ---------------------- IF THIRD MOVED, MOVE REARGUARD
<> Branch if Switch: [0098:ThirdMoved] is ON
<> Switch: [0098:ThirdMoved] OFF
<> Variable Oper: [0117:PreviousThirdX] Set, V[0109:NextX] Value
<> Variable Oper: [0118:PreviousThirdY] Set, V[0110:NextY] Value
<> Branch if Third Up Facing
<> Variable Oper: [0110:NextY] + 1
<> End if
<> Branch if Third Down Facing
<> Variable Oper: [0110:NextY] - 1
<> End if
<> Branch if Third Left Facing
<> Variable Oper: [0109:NextX] + 1
<> End if
<> Branch if Third Right Facing
<> Variable Oper: [0109:NextX] - 1
<> End if
<> Comment ---------------------- MOVE REARGUARD
<> Branch if Var [0111:FourthX] is V[0109:NextX] Less
<> Move Event: This Event, Move Right
<> End if
<> Branch if Var [0111:FourthX] is V[0109:NextX] Greater
<> Move Event: This Event, Move Left
<> End if
<> Branch if Var [0112:FourthY] is V[0110:NextY] Less
<> Move Event: This Event, Move Down
<> End if
<> Branch if Var [0112:FourthY] is V[0110:NextY] Greater
<> Move Event: This Event, Move Up
<> End if
<> End if
...and there it is!
NOTES
-You cannot allow the player to change the order of the party (unless you somehow track the order manually and change charsets and event graphics accordingly)
-This caterpillar assumes that you have only 4 playable characters (if you have more, you will have to add logic for event graphics)
-The leader of the caterpillar will be the Hero, ie- whoever happens to be first in the party order.
-Since Phasing Mode is ON for the followers, other events can walk over them (Unfortunately, Forbid Event Overlap doesn't work on Phased events)
-It is critical that the event IDs are consistent! RM2k3 references other events by their Event ID, so if you don't have these events as 0001, 0002, 0003, and 0004 make sure to edit the follower events accordingly to reference the correct events. Honestly, it is easiest just to create a template map with these four events ready to go to use for every time you want to make a new map in your game. Copy the template map, paste it to where you want it and then add mapping and other events after. That way the event IDs are always 0001~0004 and you don't have to muck around with anything.
-In the Template project I also added special world map logic for riding in vehicles like boats and airships.
Posts 

F-G, plenty of scripts have customization options, and some even have sections that are made for making little chunks of code to call up within the script, like a variation of your normal damage algorithm to apply to several skills.
Other times, you don't need to fiddle around with the scripts - if it simply lets the player choose their window skin or it randomizes battle music, the game maker doesn't need to hack the code to make it work
Your point is mostly null. While there is some validity, you're basing your argument on something you seem to have no experience with.
Other times, you don't need to fiddle around with the scripts - if it simply lets the player choose their window skin or it randomizes battle music, the game maker doesn't need to hack the code to make it work
Your point is mostly null. While there is some validity, you're basing your argument on something you seem to have no experience with.
Yeah, I don't support the "RMVX is better than 2k3 because you can mindlessly copy & paste scripts" argument. I mean, there are plenty of reasons why VX is better, but imo that's not one of them.
Also, I acquiesced to calunio's request and reinstated the original name.
Also, I acquiesced to calunio's request and reinstated the original name.
....which is funny that I said that because I posted a template project for anyone to copy and paste into their games.
I am such a hypocrite.
I am such a hypocrite.
However, they should know that this isn't going to help them get any better at making games in their chosen maker - at least following a tutorial for something in RM2K3 forces you to get to know the maker a little more than you did previously.
Well in my case I think I learned more-or-less everything there was to know about eventing long before VX was released. (I'm not saying I was the BEST eventer or anything, not even a runner up, but...see Eldritch. I was into some pretty complex stuff there.)
I do wish shamelessly lifting other peoples' scripts taught you something about scripting, though. I would be a master scripter by now, lol.
Perhaps if codes were posted with explainations of what is going on rather than as resources to be copy-pasted then people would be more willing to take those scripts and edit them accordingly to introduce some individuality into their projects!
Isn't this exactly what comments are?
OH NOES HE IS ABLE TO PUSH CTRL-V IN ORDER TO MAKE THE AUTO-SHADOWS DISAPPEAR HIS GAME SUCKS
Seriously. Scripting is only a single facet of game design; this is like saying that BECAUSE HE CAN'T WRITE HIS OWN MUSIC THIS CREATOR IS NOT PROPERLY DISPLAYING AUDIO CREATIVITY when there is this thing called "Newgrounds" that has thousands of music tracks for immediate free use.
Seriously. Scripting is only a single facet of game design; this is like saying that BECAUSE HE CAN'T WRITE HIS OWN MUSIC THIS CREATOR IS NOT PROPERLY DISPLAYING AUDIO CREATIVITY when there is this thing called "Newgrounds" that has thousands of music tracks for immediate free use.
I didn't say that. Quit twisting my words. (I didn't even mention games...?)
What I am saying is that the ability to copy & paste scripts doesn't automatically make VX better than 2k3 imo.
What I am saying is that the ability to copy & paste scripts doesn't automatically make VX better than 2k3 imo.
So, if I design a system, and then go out and grabbed scripts that allowed me to implement this system, my game is worse than if I had spend a month building the system from scratch in a sub-par environment?
Scripts are tools. People who copy-paste scripts for the sake of having more scripts are imbeciles. People who grab scripts that fill a need in their design are using scripts exactly as they are meant to be used.
Scripts are tools. People who copy-paste scripts for the sake of having more scripts are imbeciles. People who grab scripts that fill a need in their design are using scripts exactly as they are meant to be used.
people are stupid not the maker
if I copy pasted common events from other rm2k3 projects to make my rm2k3 game then i guess rm2k3 as a whole sucks
if I copy pasted common events from other rm2k3 projects to make my rm2k3 game then i guess rm2k3 as a whole sucks
if i use pseudo coding to make my game in rm2k3 i guess rm2k3 sucks because I don't know how everything works from the ground up so fuck every program that tries to make things easier for you im just going to make my games in BASIC *moonwalks out of this discussion*
Worth noting is that I am fully familiar with how programming works in terms of methods, classes, and variables; and in terms of arrays, aliases, and variable passing, so I don't want to see any "well you're just too lazy to make -"
Actually, I am too lazy to remake scripts that are already publicly available. Why should I have to write my own script to manipulate the success rate of status effects when Mithran has already written a fantastic script that does just that?
EDIT: oh hai there max
Actually, I am too lazy to remake scripts that are already publicly available. Why should I have to write my own script to manipulate the success rate of status effects when Mithran has already written a fantastic script that does just that?
EDIT: oh hai there max



















