DYNMODESEVEN

Allows you to render your maps in a SNES mode 7 similar fashion

  • Kazesui
  • 12/08/2013 12:00 PM
  • 31776 views


This Plugin can load your maps, and allow you to render them in a fashion similar to that of the background mode 7 of the Super Nintendo. It adds perspective scaling to a single flat image, which gives a pseudo 3D feeling to the map. The video offers a reference as to what can be done with this plugin.

Full description on how to use the plugin is contained within the readme in the download.

Also, a special thanks to pepsiotaku who helped out with testing, and sorting out an issue with the Plugin

Details

  • 977.8 KB
  • 957
  • 08/31/2024 03:59 PM

Actions

Posts

Pages: first prev 123 next last
author=Kazesui
Yeah, same deal. I need to make a better template

@readme titles, I guess that's worth considering. I didn't really think about people wanting to actually take the readme files out of their respective demonstration projects, but I suppose that makes some kind of sense, even though it sounds like it could get a bit messy in its own sense to clutter a project with readme files, unique titles or not.

From the few I downloaded, PepsiOtaku is naming his readme's that way.

Thing is, once I get the plugins working in my game I have no need to keep the demo projects. If I did keep them, it wouldn't be anywhere in my project folder, so if I needed to consult the readme files I would have to go dig them out somewhere else. And I often need to consult them. And when I'm RMing I always have my games project file open, so it's only a few clicks away.

The root game folder is packed with map files, so keeping them there can seem cluttered. Keeping demo projects would be even more cluttered. The dynplugins folder only has a few dozen files, including the readmes, and it's not likey to get super full because there are only so many plugins. So it seems like the most logical place to keep them.
Is there some obvious reason why this isn't working? Do I need to update dynRPG? It's been a while since I did.


Oh, it seems like setting the boundary is required. On my 20x15 map anyways. You should add that in the readme file in this paragraph:

Instructions
-------------

To render a map in mode 7 style you must first call the "load_map_to_texture" command, followed by "init_mode7" command.
You will then have to call the "show picture" command with an ID corresponding to your mode7_id.
By default, this is set to 1, but can be configured using the "@set_mode7_picture_id" command.
Any picture's of the same or lower id as the selcted picture id, will be obscured by the mode 7 rendered map, so choose carefully.

It might also be helpful to mention that you probably want to show a blank image for that show picture command, or that you would want to erase it after you disable mode7 because it stays up. Most people might figure this stuff out by trial and error but still.

--------

Why does this happen?

The bits of the tiles that you see below Link and on the left side. Seems like it's showing 1 pixel from the outer edges of the tiles.

--------

When I show a battle animation, it's not showing in the right spot. Link's sword swing is a battle animation that obviously is supposed to be attached to him. Yet it appears a few tiles away to the NW.
Yeah, the boundary thing is known. Rather than adding it in the readme, I plan on having it default to the upper left tile on the map when loading the map.

As for the rendering artifacts in your map, I honestly don't know why they appear.
I thought I had ironed out all bugs related to drawing the map, but I could have been mistaken. Would the tile in question happen to be an autotile?

And yes, battle animations will become unreliable during mode 7 rendering. The thing which happens there, is that the original map still exists beneath the mode 7 rendering, meaning your hero is still walking normally on that map. As such, any battle animation targetted to an event/hero, would appear at where these events would be on the normal map beneath the mode 7 rendering, rather than taking the mode 7 rendering into account. I'm not sure I could manipulate the show battle animation command to execute at any designated coordinate of my choice, so you'll simply have to treat that as something you can't use along with mode 7 rendering for now.
Nope, it's not an auto tile. A standard lower layer tile. I can try a few different things to see if I can either find a workaround or something else that might help pinpoint the problem. I guess for now the answer is to use tiles that don't have anything on the outer edges of the tile. Or ones where an extra pixel wouldn't look bad, like solid blue water tiles or something. Or use wrapping.

Ah, I don't need battle animations to work. Just thought I'd mention it. Sounds like it can't be helped.

I'm having a blast with this plugin, it looks pretty rad when you change the texture scale :D
While in mode 7 when an event should become invisible by having it's only page's switch requirement turned off, it stays drawn on screen.
Hmm... so that's not just the case when you erase the event, but also like this.
Thanks for the heads up.
@Kazesui
Also when you erase an event, you can still trigger it with call event and in one instance it triggered by walking into where it was, but I might have triggered it by call event.
I'm pretty sure that was always the case, DynRPG or not.
When I make an event with it's graphic coming from the upper layer of the tileset, it appears large. Like something added with the @add_sprite command. But if it uses a charset graphic, it's kind of flat and smaller. Was that intentional?

-------

It doesn't process parallax bg. Can you make that work?

-------

I'm calling a common event that has a change sprite association and it crashes. "The file charst/link1.png cannot be opened." When I use the same command in a stand alone action key event on the map, it didn't give the error. When I have it point to a different file, it didn't give the error. It looks like it's that one file that doesn't want to load in Mode 7, but it works now and has always worked normally outside of M7.

I even put an event on the map, to change me into a graphic from the error charset. I walk around as that graphic. And if I launch Mode 7, it crashes with that error.

-----

When I rotate the screen the graphic for an event changes to show all the other facings. This could be useful for some things, but there's lots of stuff that I want to be fixed graphic. Can you make this a parameter?

-----

When I use a really large image for the @add_sprite command, it will disappear when the event disappears. Is there any way to have the sprite keep showing? I'm trying to create a mountain side and it would be much less work to use large images, instead of a series of smaller ones.

This actually only happens when the event goes off the left side of the screen. On the right side and it works the way I wanted it to.

----

Can you tell me exactly what combination of commands I need to refresh the mode 7 view when I make a change, like the Scale or Z. I have it running off variables and I'm changing the variable and refreshing. I've single commands and a few combinations of several commands, but it seems like I need to use the entire block of stuff I used to draw it the first time. Is there a quick refresher group of commands?

----

Can't see very much of that background image. Why does it need to be so large?

I created a system to automatically change the bg to simulate turning to night time. It's a series of waits and @set_background. Every once and a while it randomly gives an error saying that it can't show the image, except it shows an extra character at the end of the file name. Which is also random. Could it be because it's a lone command to show_background? I don't need to include the draw mode 7 commands to have the bg change it seems.

Here's a vid of the error popping up a few times.

I created a new image, which is an edit of a previous one, so the properties of the file are exactly the same. Whenever I use it, it gives that error every time. Could it be that the file name is too long? Because I renamed all those files to something shorter and now they work.

I created a similar system using all the draw mode 7 commands, and I'm getting the error.

Any chance of making a scrolling bg? or any other ways of altering the bg?

------

Some files don't work when I try to draw them with @add_sprite. I don't know what the problem is. I always create files with the same program in the same way. I tried different file names, don't see what the problem is.
I've been listing stuff in my previous post if you haven't seen it yet.

I created a new project.
I downloaded the recent update version of DynRPG and patched the new project.
I copied the dynRPG.ini and dynplugins folder from my Zelda game into the new project.
I copied the event from my Zelda game that starts Mode 7 into the new project, but it doesn't work. The game doesn't freeze but nothing happens. It's definately running the code.

My Zelda game has an old version of dynRPG. That's the only difference I know of.
@large chipset tile sprites, uh.. how large?

@parallax, if you want a automatically scrolling panorama, you will for now have to do this with pictures. Disable the background, and put use pictures beneath the mode 7 rendering picture to simulate your own background. The SDK does not give access to the panorama image and it's properties, so including it somehow in the plugin is pretty much out of the question.

@change sprite crash, weird. This is a bug, and I think I know what the cause is. Will look into it and fix it once I get the time to.

@static sprite rotation, The SDK does not provide enough data on event settings that I can find if it's set to "fixed graphic". As such, the easiest way of doing this right now would be to either edit the charset such that all angles show the same sprite, or to use @add_sprite.

@disappearing event, only way to do that at the moment is to remove map wrapping. This is a problem caused by how rm2k3 don't like negative screen coordinates when the map is wrapped, and turn it to positive ones instead (meaning your map gets sent waaaaaaaaaaay over to the right side instead).
I haven't found a good solution to this problem yet, unfortunately.

@refresh, ... it should refresh immediately, unless the command is somehow causing lag.

@bg crash, probably one of the old known bugs with DynRPG (the old version). add an extra comma after the filename should fix this. This is something that applies to every command in every plugin which ends with a text parameter. This is fixed in the new version, but..

Yeah, I'm familiar with the problem you are talking about, but not the cause.
You could try simply creating another new project, and then add plugins one by one, to see if and when the problem happens. This is likely to be a bug with the new DynRPG version, and I have had it happen while trying to create plugins with the updated SDK as well.
Typically, I was able to get around it by making a new project, patching this clean project with DynRPG, and then taking it from there, and once it was fixed, I didn't get the error again. But as said, I'm not sure what causes it.
author=Kazesui
@large chipset tile sprites, uh.. how large?
Purple and grey rocks. The one of the left is using a chipset graphic, the one on the right a charset.




The chipset graphic has the same properties as an add_sprite, in that it "pops" and creates a deep 3D effect. For most environment objects like bushes and trees that's what I want. But I would like to be able to use charset graphics and achieve that same effect because as it stands now if I want any background objects with that effect larger than a single tile, I have to use the @add_sprite command. It would be so much easier if I could just make an event and give it a charset graphic. I still need to use @add_sprite for anything larger than a charset, but it would save a lot of effort. It's easy to copy paste events, not so easy to setup 100's of @add_sprites.

But I wouldn't want all charset graphics to do this, so a parameter to toggle that effect would be best. If you can't make it a parameter, than I would suggest leaving it the way it is.

Another thing you can see in that screen, in the top right corner, is that sprites aren't being erased. When you draw a new picture the transparency of the new image doesn't erase what was drawn before it. Something drawn is never erased. So I can't make an animated sprite using transparency. I would have to use solid color instead, so that when the next frame is drawn it will cover what was supposed to be erased.

Is there any way to erase a sprite once it's drawn? There's no erase_sprite command and I can't draw over it with transparency. I hope you don't say that redrawing mode7 is the answer, cause from my experience that causes lag. *Just tested this, even redrawing mode7 doesn't work. The only way I can see that will erase a sprite is to unload_mode7, which is not viable in this case.

@parallax, if you want a automatically scrolling panorama, you will for now have to do this with pictures. Disable the background, and put use pictures beneath the mode 7 rendering picture to simulate your own background. The SDK does not give access to the panorama image and it's properties, so including it somehow in the plugin is pretty much out of the question.
That will work. Ugh, except that it took some effort just to replace pic1 in my existing game. Oh well, I'll have to do that in new games only.

@change sprite crash, weird. This is a bug, and I think I know what the cause is. Will look into it and fix it once I get the time to.
Oh, I see the problem. I was going to go grab the file and send it to you, but when I looked closer I notice that it's a .bmp and it was trying to load it as a .png. Was that mentioned somewhere? That you can't use .bmp?

@static sprite rotation, The SDK does not provide enough data on event settings that I can find if it's set to "fixed graphic". As such, the easiest way of doing this right now would be to either edit the charset such that all angles show the same sprite, or to use @add_sprite.
Ok, yeah I thought of that solution but was hoping I wouldn't need to. The current problem with sprites not erasing might cause a problem with that, though.

@disappearing event, only way to do that at the moment is to remove map wrapping. This is a problem caused by how rm2k3 don't like negative screen coordinates when the map is wrapped, and turn it to positive ones instead (meaning your map gets sent waaaaaaaaaaay over to the right side instead).
I haven't found a good solution to this problem yet, unfortunately.
I'm not using map wrapping, in the plugin or the map properties. I noticed that events would disappear where the screen wraps, so I'll probably avoid map wrapping all together.

You can see what I mean in the first few seconds. It's not wrapping, that water tile is the texture_boundary. As I walk right, the left edge of the mountains are always visible. But then as I walk past it and the event hits the edge of the screen, the picture disappears.

@refresh, ... it should refresh immediately, unless the command is somehow causing lag.
What I mean is that to draw mode 7 it requires like 4-5 commands.

Oh wait, I see what was causing me lag now in some of my events. I see that some commands do automatically update.

But lets say that...hmm, tile substitution doesn't even work.

Ok well I guess I was mistaken about that one. I just remember that I made a change to the map, but it wasn't showing up. So I assumed that I had to run those 4-5 commands again to have it refresh the entire mode7.


@bg crash, probably one of the old known bugs with DynRPG (the old version). add an extra comma after the filename should fix this. This is something that applies to every command in every plugin which ends with a text parameter. This is fixed in the new version, but..
Ok, that seems to work.

Yeah, I'm familiar with the problem you are talking about, but not the cause.
You could try simply creating another new project, and then add plugins one by one, to see if and when the problem happens. This is likely to be a bug with the new DynRPG version, and I have had it happen while trying to create plugins with the updated SDK as well.
Typically, I was able to get around it by making a new project, patching this clean project with DynRPG, and then taking it from there, and once it was fixed, I didn't get the error again. But as said, I'm not sure what causes it.
Which problem are you referring to here? My last post about creating a new project and mode7 not working? Because I'm not getting any errors with that. But I will try what you suggested.

Also, you didn't address this isssue:

Some files don't work when I try to draw them with @add_sprite. I don't know what the problem is. I always create files with the same program in the same way. I tried different file names, don't see what the problem is.

I've had this happen a few times. Although...weird, I just tried it again and now it's working. Are there any limits or other things to consider when using @add_sprite? I know the picture wasn't .bmp this time and I triple checked to make sure I wasn't writing the command wrong. Oh, wtf, it works on one map but not on the other. Hmm, ok here's what I'm doing.

Map 1 - I was already drawing King Zora successfully on event 96. So I replaced the file name and size parameters with my Planet picture. It draws the planet.

Map 2 - I created more events and had them successfully showing sprites. So I took one of those and did the same thing, plugged in my Planet picture. It doesn't show. If I do the same thing I did in map 1, use King Zora's event, it works.

I don't see any other difference and I don't think the fact that it's 2 diff maps is important. Let me know if you want the project to see for yourself.

Oh, I also forgot to mention that @is_mode7_rendering doesn't work for me. I'm writing it like this
@is_mode7_rendering 1542
but that switch doesn't get turned on. I've been turning on a switch manually.

I noticed that if you are standing on the same tile as something else, there are 2 different ways that this is drawn. If you walked onto that tile from above, you will appear behind and if you walked onto it from below, you will be on top. If you walk onto it from the side, it handles it based on whatever direction you walked on it previously(up/down). Just thought I'd mention it. I wouldn't call it a bug and I don't see it as a problem yet.
@Link
Use this command to change the size of the chipset; @set_texture_scale
By default the chipset is two times bigger, but you can change it with said command.
author=McBick
@Link
Use this command to change the size of the chipset; @set_texture_scale
By default the chipset is two times bigger, but you can change it with said command.

That's not exactly how that command works out. No matter what you set the texture scale as, chipsets remain proportionally larger than charsets. Plus it changes the perspective and generally ruins the feel of it if you change it too much.

I don't want the chipset smaller, I want the charsets bigger.
@link
From the looks of your pictures it seems your not using the full size of the charsets, so you could stretch the images to fit into the whole charset. Also you can use a cherry's charset patch to use any size charset you want if thats not big enough.

Link
A good idea, but it doesn't work. In order to make those rocks fill the max size of a charset I need to x2. It gets them closer in size. But it results in a mismatch of resolution and its too big for the charset. I'm not going to try and redraw everything bigger. So that's out.

Isn't that patch for 2000?
Yes, the patch mentioned is for rm2k only... and even if it DID work, it probably would have no effect with this plugin, since I'm loading the charsets from the project directly and treating them on the assumption that they are formatted correctly in accordance with rm2k3 style.

And now I see what you mean. Most likely, I will add in a manual scaling option for sprites/chars when I get time ( along with manual offset changing ). That ought to to solve the problems I suppose.

@not erasing images, this is a known issue, and some of it will get fixed (i.e. when using erase event). Dealing with erasing images for otherwise inactive events (due to switch manipulation) is probably going to prove more difficult though.
For those I'll simply have to suggest having a lower page which is just empty.

another alternative is simply to send the events somewhere unreachable to make them disappear. I haven't tried this myself yet, so I'm not entirely sure if this will cause a crash of any kind, but moving an event to negative coordinates out to be an effective way of "erasing" the events for the time being.

@transparency, it's not weird for you to have trouble with this since transparency was never implemented. Semi transparency might be something I won't be implementing for a while (i.e. very low in terms of priority on the growing todo list).

@bmp, nope, it only reads png. On that note, why would you want to use bmp to begin with?

@disappearence, hmm, I guess it's simply going out of the drawing bounds I've set up. I guess I can make this customizable. It's something which is in there to ensure the performance, since there's likely to be a lot of stuff which does not need rendering. This is probably the reason why people have been able to put as much as 2000 events onto a map without it lagging. It'll go on my todo list as well.

@tile substitution, it does not work and will not work, since I don't have access to how the map is stored internally in the engine. I get by, by loading the chipset and the actual map file, and then creating an image buffer where I redraw the entire map as described in the map file. As such, any real time changes to the map itself is not possible. Or well, that is if you want the properties that comes along with a tile change. The graphic is fairly easy to change, and there is already some unfinished code in the source for the sake of implementing this, just know that any terrain id or passability setting will not change along with the graphic.

@add_sprite not working, are you sure you're linking the sprite to the "correct" event id?

@is_mode7_rendering, will check that,


@not erasing images,

For those I'll simply have to suggest having a lower page which is just empty.

If that's all it takes - awesome



@bmp, nope, it only reads png. On that note, why would you want to use bmp to begin with?

Sometimes when I'm saving an image, the dropdown is set to bmp and I don't notice. Now half my game files are .bmp by accident.


@disappearence, hmm, I guess it's simply going out of the drawing bounds I've set up. I guess I can make this customizable. It's something which is in there to ensure the performance, since there's likely to be a lot of stuff which does not need rendering. This is probably the reason why people have been able to put as much as 2000 events onto a map without it lagging. It'll go on my todo list as well.

But it's only doing that in one direction. The bounds you set up seem out of whack.


@tile substitution,

Or well, that is if you want the properties that comes along with a tile change. The graphic is fairly easy to change, and there is already some unfinished code in the source for the sake of implementing this, just know that any terrain id or passability setting will not change along with the graphic.

I would take that fix even with the downside.

@add_sprite not working, are you sure you're linking the sprite to the "correct" event id?

It's possible. I'll double check some time.
Hi! I'm wondering, is this patch still being updated?

Anyway, here goes my two cents. I've been feeling nostalgic, and trashing about with plugins like a madman all this day! I had some problems with the @set_horizon, but then found out it was my fault, not using comma to separate parameters x'D!.

Then I had another PRETTY weird bug. It seems to have something to do with my database. Thing is, for some random reason the DynModeSeven was using the victory text string (" You won a combat!" by default) as the tileset name. I still don't know what caused it, but I solved it by copy-pasting my Tileset entry on the database, so now #1, #2 and #3 are the same worldmap tileset xD (#1 because I started there, then moved it to #2 because DM7 has issues with #1, THEN copy-pasted it to #3).

I tried copying just my database to the DM7 demo (just changing necessary graphics so it doesn't throws errors) and yeah, " You won a combat!" not found. So it is something in my database.
Here's my database if someone wants to try out. I erased some useless shit. Dunno which caused the misinterpretation xD.
http://rpgmaker.net/users/orochii/locker/RPG_RT.ldb

Hope this report helps, salut!

---

EDIT: Another bug I found. Same kind of issue (random database juggling).
I made a Terrain that uses a Frame image. Then set the vertical speed to 7. Somehow it caused the DynMode7 to throw "Error: file Chipset\" (and there it ends, probably because of \).
I solved it adding an extra empty terrain at the end of my terrain array. VoilĂ . Everything "ok".
It will be @updated, I'm just a tad busy at the moment, and the code slightly messy for fixing quite a few of the things.
As for the bug you found, it should already have been written in the readme, that the first slot in the database won't work... anything beyond should probably have worked, but I'm not all to surprised to see trouble there to be honest.

The reason for this is... some mysterious shit in rm2k3 simply. For some reason, sometimes, where the name of the tileset as well as it database name just gets messed up for some arbitrary reason. I was always able to at least read the tileset filename from 2nd slot and upwards, and simply assumed it was okay, but there might just be bugs there still, and I cannot guarantee I will be able to fix them.
At best, I might include a way to manually load the tileset file by specifying the name yourself.

As for the second bug, will have to look into it. It does sound strange indeed.
Pages: first prev 123 next last