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
> [help] Managing events and switches, (and other questions about game mechanics)
zshall
post Apr 9 2012, 06:58 PM
Post #1


Level 1
Group Icon

Group: Member
Posts: 5
Type: Developer
RM Skill: Intermediate




Hi there,

I'm working on creating some mechanics for a small game I've thought about making in RM2K3. The specific mechanic I'm trying to replicate is one of a block being dropped in water and becoming floor. http://www.youtube.com/watch?v=cisVWVvUGXo for a visual example. The block collides with water, and becomes dirt. The hero runs over the dirt, and it becomes land.

As of right now, I have a single block event that does kind of what I want...
CODE
(This is pseudocode)
PAGE 1
if switch is OFF:
    move
    get x and y coordinates
    if the tile at x and y == water:
        set switch ON

PAGE 2
precondition: switch ON
no commands, graphic is tile floor


I see the "Tile Substitution" call in the list of actions, and ideally I'd use that to replace the single tile at X and Y with floor, then destroy the event, but it seems tile substitution works for all tiles as a 'find / replace all' type of deal. Is there a plugin or a mod out there that has a "find single lower tile / replace it" or is there a way to do it without a mod?

Also, this code works nicely with one block, but for multiple blocks it would appear I would need more switches. Is there a way to do this without switches? Coming from a background in more standard programming, what I'm really looking for are object classes, such that each event has its own switches and is an instance of a definition rather than every block. Is there a mod for something like that as well?

I've been using RM2K for years off and on, and besides a few games I haven't really followed the RPG Maker scene, per se. I was still using 2K until a week ago when I learned of common events in 2K3. I'm not sure I want to make the jump to XP or VX, as I'm familiar with the 2K interface and it looks like I'd need to change a lot of graphics to port everything over, seeing as the XP tile resolution is higher.

Any help is appreciated!
Go to the top of the page
 
+Quote Post
   
Rast
post Apr 9 2012, 11:03 PM
Post #2


Level 71
Group Icon

Group: +Gold Member
Posts: 3,290
Type: Musician
RM Skill: Advanced
Rev Points: 10




As it happens, I did something similar(in a sense) in one of my games. It was more or less walls that changed depending on a combination of switches, and it should work for this as well.

First, you'll need to make a custom Character set. Add in the water graphic you're using in this case, and make sure to put each sprite of the animation in the correct position so you can animate it. In my case I tossed a wall sprite into the top layer of the chipset(as events can use character sets and anything in the top layer of the map's chipset for a graphic), but in the case of water you'll need it animated or it won't blend in.

Moving on, put a floor tile where the water that you're dropping the block in will be. Next, make an event on that same tile with the water sprite. Make sure it's animated and set to the same level as the hero. Make a second page with a transparent sprite and set it to "Below hero". For the page's condition, it'll depend on how you're doing this.

As there's only one variable condition per page(and two switch conditions), you can't take the easy way out and just require the movable block's X/Y variables to match up. You can probably throw a conditional branch onto the block to, after each push, check if it's at the correct X/Y position and if so change a variable or switch to change the water event's page. As the second page is below the hero with no visible graphic, it'll create the effect you want and look much like the video you linked.


I can explain a bit more in detail and/or try to whip up some screenshots if needed, just let me know.


__________________________
Go to the top of the page
 
+Quote Post
   
zshall
post Apr 10 2012, 12:36 PM
Post #3


Level 1
Group Icon

Group: Member
Posts: 5
Type: Developer
RM Skill: Intermediate




Thanks for the fast reply! I'll take a look and see what I can do tonight (or tomorrow depending on my schedule) and post my results. Luckily, the water tiles are not animated, though the idea of needing animations for 2K3 battles vs. the static sprites in 2K has me a bit worried, as art isn't quite my fortè. I haven't had time to mess around with the battle system too much yet, but can I use static battle "animations" in 2K3 and not have it look too out of place?
Go to the top of the page
 
+Quote Post
   
Rast
post Apr 10 2012, 06:36 PM
Post #4


Level 71
Group Icon

Group: +Gold Member
Posts: 3,290
Type: Musician
RM Skill: Advanced
Rev Points: 10




Well, in RPGMaker 2003 the monster sprites are a static image and not animated. They'll move up and down slightly if you make the monster a Flying type, but that's it.

The battle character sets for player characters are animated, though, but you can edit them(and/or make your own) to be static images as well and it'll look just fine. Just make sure to go into the item tab of the database and change the CBA settings for weapons. By default, many of them are set to have the player's battle sprite move or step towards the enemy, which may not look right with static images.

Oh, and since the water tiles aren't animated you can save yourself some time and effort and just copy/paste the correct water tile from the lower layer of the chipset(the part with all the grass, dirt, etc) to the upper layer(tables, chairs, random objects, etc). Just paste it in an empty spot and make sure it's lined up with the other tiles.


__________________________
Go to the top of the page
 
+Quote Post
   
zshall
post Apr 11 2012, 07:19 PM
Post #5


Level 1
Group Icon

Group: Member
Posts: 5
Type: Developer
RM Skill: Intermediate




QUOTE (Rast @ Apr 10 2012, 07:36 PM) *
Well, in RPGMaker 2003 the monster sprites are a static image and not animated. They'll move up and down slightly if you make the monster a Flying type, but that's it.

The battle character sets for player characters are animated, though, but you can edit them(and/or make your own) to be static images as well and it'll look just fine. Just make sure to go into the item tab of the database and change the CBA settings for weapons. By default, many of them are set to have the player's battle sprite move or step towards the enemy, which may not look right with static images.

Oh, and since the water tiles aren't animated you can save yourself some time and effort and just copy/paste the correct water tile from the lower layer of the chipset(the part with all the grass, dirt, etc) to the upper layer(tables, chairs, random objects, etc). Just paste it in an empty spot and make sure it's lined up with the other tiles.


Good to know! I've made some progress with the events, and while it looks like I'll need to use a switch for every block, I think I have an idea of what I can do to solve that problem. I'm planning on having perhaps 10 block switches and events, and then have an event that resets all the switches every time a map is loaded so I can sort-of reuse the same code. Still wish there was an easier way of copying and pasting multiple events rather than one at a time.

I'm working on creating a character set right now with some tiles in it, and am trying to figure out how they work... it seems that there are 4 rows of 3 frames, but to have a 16x16 tile go into a character set that is of higher resolution, do I simply put the tile in the center of the character template box? (The template I'm using: http://img521.imageshack.us/img521/5425/ch...templateif3.png )

I'll probably be able to move forward on this mechanic by the end of the week. Thanks for the help so far!
Go to the top of the page
 
+Quote Post
   
Rast
post Apr 11 2012, 10:25 PM
Post #6


Level 71
Group Icon

Group: +Gold Member
Posts: 3,290
Type: Musician
RM Skill: Advanced
Rev Points: 10




Nah, if you're using a 16x16 tile in a character set, put it at the bottom. As for the switch issue, if your puzzle has a set route(that is to say, the blocks you're pushing into the water must be done in a specific order) you can use variables instead. Just make it so that if the X/Y position is correct, it adds 1 to the dungeon/level/etc's puzzle variable instead of turning a switch on. Have the second page require a certain value for the same variable, instead of a switch.

1st block: 1
2nd block: 2
3rd block: 3

Etc. This will only really work if said blocks will always be done in the same order.


__________________________
Go to the top of the page
 
+Quote Post
   
zshall
post Apr 12 2012, 05:04 PM
Post #7


Level 1
Group Icon

Group: Member
Posts: 5
Type: Developer
RM Skill: Intermediate




QUOTE (Rast @ Apr 11 2012, 10:25 PM) *
Nah, if you're using a 16x16 tile in a character set, put it at the bottom. As for the switch issue, if your puzzle has a set route(that is to say, the blocks you're pushing into the water must be done in a specific order) you can use variables instead. Just make it so that if the X/Y position is correct, it adds 1 to the dungeon/level/etc's puzzle variable instead of turning a switch on. Have the second page require a certain value for the same variable, instead of a switch.

1st block: 1
2nd block: 2
3rd block: 3

Etc. This will only really work if said blocks will always be done in the same order.


Great! I'm working on creating my character set currently, but can't seem to get transparency to work. I have a palette with a color for transparency (black) at position 0, and an image with the sprites on it, but when I put it into my game, the transparency color doesn't catch.



Like so. Here's the template I'm using:


Any idea as to what fixes this? I tried using Character Creator 1999, but the resolution wasn't correct since it was designed for RM95.

Thanks so much for the continued help!
Go to the top of the page
 
+Quote Post
   
Essenceblade
post Apr 12 2012, 06:20 PM
Post #8


Crystallite Hope.
Group Icon

Group: Revolutionary
Posts: 207
Type: Developer
RM Skill: Skilled




Make sure you aren't just copy > pasting the folder straight into your project, import it via the RPG Maker 2003 resource manager.

Once you do that, it will, and should come up with the picture, and a flashing background. Make sure you Left / Right click on the black background so that it's flashing. The flashing background means that that color will be seen as transparent in game.

EDIT: It's best to use Character Maker 1995 for RPG Maker 2003 alongside Graphics Gale, GIMP and Photoshop. Character Maker is fast and efficient. It gets the job done and its easier to use than Photoshop. I find spriting 9x easier to do in Character Maker over Photoshop.

This post has been edited by Essenceblade: Apr 12 2012, 06:29 PM


__________________________
My current project:


--------------------------------------------------






--------------------------------------------------



-------------------------------------------------------------------------------------------
"I want to have encampment dreams, where everything is as it seems, Harmony everywhere, finally there is peaceful air" -- Fatesboon. 11/4/2011
Go to the top of the page
 
+Quote Post
   
zshall
post Apr 12 2012, 10:20 PM
Post #9


Level 1
Group Icon

Group: Member
Posts: 5
Type: Developer
RM Skill: Intermediate




QUOTE (Essenceblade @ Apr 12 2012, 06:20 PM) *
Make sure you aren't just copy > pasting the folder straight into your project, import it via the RPG Maker 2003 resource manager.

Once you do that, it will, and should come up with the picture, and a flashing background. Make sure you Left / Right click on the black background so that it's flashing. The flashing background means that that color will be seen as transparent in game.

EDIT: It's best to use Character Maker 1995 for RPG Maker 2003 alongside Graphics Gale, GIMP and Photoshop. Character Maker is fast and efficient. It gets the job done and its easier to use than Photoshop. I find spriting 9x easier to do in Character Maker over Photoshop.


Using the import manager did it. Thanks!
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 June 2013 - 10:50 PM
RPG RPG Revolution is an Privacy Policy and Legal
eXTReMe Tracker