New account registration is temporarily disabled.

RM2K3 PLUGIN TILES

Posts

Pages: 1
Was curious if there was a plugin that dealt with tiles. I need a plugin that can change any given tile to whatever I want. I know there is a similar function in rm2k3, but it changes every tile to the selected type. I just want to be able to change a specific tile to change. Also if there is no such plugin, would it be possible to make one. I'd be willing to try to make one if someone could point me in the right direction.
All you have to do to achieve this is use dummy tiles. What that means is you use multiple of the SAME tile on a chipset. (For example 2 identical "grass tiles") One you use for the switch, the other you use as regular tiles.

Now of course this depends on how much disposable space you have on the chipset. Some context here would help. What exactly are you trying to do?
There is no plugin which deals with this at the moment.
The reason for it is because no interaction with chipsets and tiles has been implemented in DynRPG yet. This could probably take time, so you'd be better off looking at workarounds like the one suggested by KoG.
@King of Games
The problem is I need enough to fill the screen for what I'm doing. That's 320 tiles which is much more than a chipset holds.

@Kazesui
Darn, guess I will use pictures as a work around. For some reason when I use variable cooridinates for the tiles, the pictures aren't precisely on it. But if I input the cooridinates without variables using the same value its placed on the tile precisley. I'm using a 16x16 picture.
The reason why your pictures don't appear exactly where you want them is because the second "show picture" is called, the picture is set to coordinates relative to what's on your screen at that very moment, regardless of where in the map you might be.

To fix this, you could place an event in the upper left corner of the map, get it's screen relative coordinates and then add the tile coordinates you want to use multiplied by 16 to those coordinates. You'll probably have to add another offset to make it fit exactly to the tile as well, probably -8 in the y screen relative coordinate.
Remember to check "scroll with map" option.

This does however mean that these tiles automatically becomes "above hero", since that's how pictures work. If you're not using the background layer for anything else on the map in question, you could use a panorama mapping approach, and simply have two transparent events being passable and unpassable for when you would be changing the tiles.
I tried using an event's cooridinates to track the tile I want and have used -8 for y, but for some reason it always ends up slightly to the left or right of the tile and even when I mess with the offset of x it still doesn't work. For some reason the picture is never on the tile unless I don't use variables. Which is weird because if I use the variables value for x and y in show picture it comes out perfect, but if I use variables it doesn't. I've checked the variables values tons of times in the debug menu, so I know it's the same value. I also use scroll with picture.

Using a panorama map seems much more feasible at this point, but I don't know if I'll be able to hide the events. I think I talked to you about this before, but I am trying to create a fog of war effect, so that walls and objects block vision. Basically anything behind a wall or object will be a black tile. I guess I could just create a switch for events to turn them black, but then I have to find a way to detect if an object is passable or not to determine if fog should be created behind it. Now that I think about it, I don't think it would be better because then I would need about 300 events every map.

I'll post my coding for the pictures after this post or when I come back home.
The best way to do this is to add the tiles you want change into a charset and add them into the map as events. I've done it several times. The cool thing about this is that you can do 2 tiles at a time (since charsets are 24x32 pixels). That way if you're changing a lot of tiles, you can do it with fewer events.

I don't think a plugin is really necessary (and as Kazesui said, it's not possible yet).

Example:


Take note that there is 4 pixels on the left and right side of each tile. Leave that blank, otherwise your tiles will overlap adjacent tiles (which you may want occasionally, but most of the time you won't).
@PepsiOtaku
The problem with that is that would mean I need 320 events every map, which wouldn't be a problem if rm2k3 could create events while the game was running.

@Kazesui
EDIT: Read post below more relevant than what I had said.
Looking at this now I have no idea how this is working or what it does. Made this a few months ago and I'm trying to understand it now, but the trigonometry script is confusing me.

Edit: I finally understand how this works again and made some adjustments, but the only problem is that I'm changing the event location and for some reason it slows down the process speed greatly. Takes around 40-50 seconds to move the event to every tile on the screen. So now I need to figure out how to work the trigonometry event without using screen cooridinates, but rather map cooridinates.

Edit2:
I finally did it, but for some reason the SIGHT ID is never 8 any more and for the life of me I can't figure out why. Took me all day to do this only to find out that it plays to slow. Takes about 10 seconds to scan the entire screen. I'm guessing this is the trigonometry calculations taking a while to process, if only there was a faster way to process the information.

Could you tell me why the SIGHT ID is always 1, even though the tiles are all 8? Here is my work:

Edit3: I found out what was wrong, but if you could still look at my eventing to see if there is a way to speed it up. I'm trying to get it down to just a few seconds at most then it would be useful.

Having skimmed through it, I can't see anything in particular which would cause a huge slowdown, which in my mind would probably mean that there's something else which slows it down, like the fog event you're calling, or it could be that for some reason, that you're scanning too much.
It could also be that the you're not jumping far enough while scanning in a direction. You could try to increase how much is added to the sight radius variable in each step. If this decreases the time it takes for you to execute the event, then there's probably too much scanning going on. Beware though, as if it's increased by too much, the result becomes more inaccurate.

That said, while the plugin where any tile can change into to any tile would be pretty hard to realize at the moment, having a plugin change from one tile with no important property apart from visual ones to a fixed tile beneath is not equally impossible. Depends on the exact implementation in mind of course, but given the use of the trigonometry script, I assume that you're using it to detect which tiles should be revealed.
This should be possible... though I'm afraid I probably won't have time to do it myself anytime soon (just throwing it out there for anyone who'd have time and would be up for a challenge).
Thanks for getting back to me so soon. I have tried removing the fog event which really didn't make a difference because all it did was just reveal pictures in the most simplistic way; branch if pic = z then show pic z fog at x,y. I actually know what slows down it so much and it's the part that jumps to label 1. This jump can last for quite a while and while it doesn't make much of a difference with just one tile it adds up when the event has to run every tile. I'm still not exactly sure how your script works, so I didn't try changing anything of it, but changing the sight radius seems like it could speed it up greatly. I'm just afraid of the inaccuracy. I'll get back to you when I finished playing around with it. Thanks again!

Edit: After doing some testing it doesn't seem to speed up at all, not sure why. Implemented another feature to see how well my event works and it doesn't seem to work as well as I thought. Take a look.

Every time the Sight ID is 8 the fog effect will show where the event should be checking, but as you can see it is showing where the sight id shouldn't be 8 and I have no idea why. You can also see the speed of the event too. This is my final work for now:

Try curbing the slowdown by installing a "Wait 0.0 Sec" command in your scan. The Go To Label loop is incredibly fast, as I'm sure you know, and it might help to give the processor time to catch up to all of those commands.
Pages: 1