+++ DYNRPG - THE RM2K3 PLUGIN SDK +++

Posts

...D'oh! X) I didn't process that part fully when I first read it because it sounded like it was mainly about overriding commands, while the part I was interested in was just getting the targeting and skill ID for skill commands. I was wishing there was a command like updateBattleEvents, but I didn't think to check the base RPG namespace.

Still, I'm not sure that will entirely solve the problem. Like you said in your reply to GhostRider, the RT2K3 ATB tends to cause issues almost no matter what. I'll do some experimenting, though.
Hey pepsi, are you still in contact with bugmenot?

I got a new mystery. The skill skill selection window in battle changes it behaviour when it contains more than 4 skills. With 4 or less skills, using the "down"-key when the cursor is at the last entry, moves the curor up to the first entry.

With more than 4 skills, it does not.
I haven't heard from bugmenot since like... October maybe? I can't seem to reproduce that issue though. It never jumps back up to the first entry for me... Is it a bug with one of your patches or plugins? If you can confirm a patch is doing that, you could try to reach out to him via multimediaxis or something.
I found the cause of that. It's simple but i didnt see it. I literally didn't see it, because the standard skill menu is hidden and i'm drawing my own.

The cursors can go back to the top whenever the skill menu is not able to scroll the visible part of the list. The standard skill menu allows 4 rows (RPG::Window->rowsPerPage). I'm using a hack that makes it one column instead of two, so for anyone without hacks, the breakpoint would be 8 skills.

Since my skill menu is invisible anyway, i increased the RPG::Window->rowsPerPage, so it works with more skills now. Yay!
Gentlefolk, I have seen the light... it is very good, full of shaders, and powered by OpenGL.

So this was something I started months ago (like October?) and shelved because I couldn't quite figure it out, as seen here. I had a few goals in mind:
  • Render 2k3 in OpenGL and say goodbye to the aged-so-poorly DirectDraw renderer (which is weirdly slow in Windows 10)
  • Replace the use of AnotherFullscreenMode (it was a bit on the hacky side for my tastes)
  • More or less copy official 2k3, in how it can render in various ways (1x-4x, interpolation, 1:1 scaling vs ignoring aspect ratio, stretch to screen)
  • Bridge it to the simple and powerful SFML library, which is capable of both 2D and 3D objects

I finally revisited it over the weekend, got some help with a couple things, and managed to figure it out and then some...



To describe what's going on here: Each pixel is converted to an SFML-readable format, and added to a flat 2D sprite, which can then be manipulated in numerous ways. SFML makes it pretty easy to add shaders, and the curved CRT monitor look is one of them. There is also no visible speed loss whatsoever. It's absolutely beautiful, although shader speed capabilities might be dependent on how old your video card is. Mine is like 5 years old or so to give you a frame of reference.

Improvements over official 2k3: The window size still alternates between different sizes, but this one can scale up to the desktop resolution. Example: If you have a 1920x1080 screen, it scales up 1x, 2x, 3x, and 4x. If you have a 4k screen, in theory it should be able to scale up to 8x or 9x, but I can't confirm yet (anyone have a 4k monitor that wants to test this for me?). Another feature I added was the ability to take screenshots and save it to a file, because it was stupid easy with SFML. I wanted this feature because this renderer (and official 2k3 for that matter) scales up to the desktop resolution, so even though the game is 320x240, a screenshot taken in fullscreen could be like 1920x1080... not ideal for sharing on forums such as ours. So this screenshot key saves the 320x240 image to a file. While this doesn't capture the pixel shader in use, you can still use the default alt+printscreen to copy the window & contents to the clipboard (including the shader).

Loading shaders is still something I am figuring out. At the moment, I'm hard-coding the shader filenames and parameters, and switching between them with F7, but eventually I think it'll be an @add_shader "crt" type of thing so that people can experiment with their own, and not be limited to the ones I choose. I'm still learning how they work myself, and vertex shader lingo is on my to-do list, but the only purpose they would have right now is to distort the shape of the screen (potentially leading to some really cool effects). For example, in that CRT shader, the pixels are being distorted with a fragment shader, but the surface is still a flat rectangle, and there's that brown crap around the edges because there is no vertex shader being used. If you want to learn about them, search for "GLSL" shaders as that's the language SFML uses.

Here's some of the "keepers" found/ported for GLSL use/experimented with that will be distributed with the plugin (images are using the 4x window size):

Scale2x:

Scale4x:

CRT:

CRT (Curved):

Noir:

Invert (better for effects... I'll figure that out):

Interpolation (not technically a shader, but figured I would throw it in here):



Shaders gone completely wrong, or just the wrong shader for 23k purposes:

An early attempt at trying to get Scale2x to work...

The CRT shader can do some interesting things...

Turn your 2k3 game into the MSPaint spray tool!

A blur filter... hrmmm this might be useful at some point, but for now it's just silly.

The same blur filter... but more extreme!



The scope of this project is another thing I'm thinking about. With this, you could basically implement the steam overlay or I could turn my gamejolt plugin into a similar overlay, which could be rendered on a separate drawable object from 2k3. SFML also has a ton of input stuff that one could mess with, so I could integrate my xbox plugin into it. Basically as much future-proofing that I can think of. :)

The only downside I guess right now that is that since the entire 2k3 screen is rendered to a single surface, it'll be hard to place objects between existing 2k3 objects. That's a project for another day. :)

As a side note, there is a small bug with the RPG::screen->canvas->convert16To24Bit function that will be fixed in the next DynRPG iteration.
Nice! Did you create your own openGL rendering for every element of the game?
Interesting. I wonder if this could be used to create special effects. Make the screen bulge in a particular spot, etc.
author=Corti
Nice! Did you create your own openGL rendering for every element of the game?

Right now it's basically one object within the rendering window, and all of the pixels from 2k3 get placed in that object.

I think what you're suggesting would require hooks into RPG::Image that create gl objects for each, but that would break a ton of stuff like effects, brightness and transitions. Ultimately though, that would be a cool thing to pursue because you could layer your own opengl objects into it. It's something I'm considering figuring out in the future, but for right now, I'm just happy to rid myself of DirectDraw. :)

author=AubreyTheBard
Interesting. I wonder if this could be used to create special effects. Make the screen bulge in a particular spot, etc.

More or less, yeah. You'd have to write a pixel shader to do that.
So the rpg maker is still drawing onto the screen->canvas but the canvas is shown in OpenGl instead DirectDraw?
author=Corti
So the rpg maker is still drawing onto the screen->canvas but the canvas is shown in OpenGl instead DirectDraw?


Yes. You can hide it with:
ShowWindow(GetParent(RPG::screen->getCanvasHWND()),SW_HIDE);


It's a little hacky, but it works.
I'm...100% sure I've asked this several times in the past, but here goes anyways!

Is there a way to set it so that skills can gain/lose attributes? For instance, let's say I use Enfire to make my physical attacks gain the Fire element. And then when the status isn't on (or any other statuses or whatnot that changes attributes), it would revert back to default settings?I don't know how easy it would be to do that, and I'm still very certain that I've asked this before but...
Just changing the traits of skills (meaning not just attributes, but also effect rating, MP cost, battle animations, everything really) would be quite easy with DynRPG. Changing them according to what conditions a battler is currently inflicted with would be a bit more involved, but probably still possible. If I were making a plugin for that sort of thing, I'd probably just make comment commands for changing the traits and let the developer using the plugin worry about changing the skills to suit their needs using scripting. Of course, it might be tricky to ensure that an event page gets called in time to make those changes for a particular battler before the skill's outcome is calculated.

While we're on the topic, the same basic concept of fiddling with the data could apply to a lot of things in RM2K3. Actors, monsters, items, tilesets...nearly everything in the database. Ideally there should be a plugin that gives comment command access to everything, but of course making such, while conceptually simple, would be a massive amount of slog-work. X)
Mmm...wonder if there'd be a good way of testing that? I'm no programmer and know nothing about how DynRPG works (and don't have the time to learn it), but would be interesting to see. Maybe it doesn't really need to worry about event pages, seeing as the ResistControl bug that Bug did long ago doesn't rely on it at all for enemies and allies. Hmmm.
Runtime Package is damages or not there error. I have the most recent version of Rm2k3 installed, The official english version. Does DynRpg not work with it?
Official version does not work, sadly.
Nope. Gotta be a renegade and get the unofficial translation. Just do a google search for "rpg maker 2003 rpgadvocate" and it should come up. Doesn't hurt to have the official version too though to show support.
So since I had to reinstall everything due to new HDD, I'm wondering if by any chance the RPS+ plugin got fixed at all so that it doesn't crash the game at random? Would really love to be able to use that without all the problems it causes. ^^;

On that note, thinking of what I asked before about being able to change the attributes/conditions/MP Costs/damage/accuracy/etc. for skills, I'm assuming that could be done theoretically with weapons too, as well as characters (granted, I...can't think of what would even be done with characters to fiddle with anyways)? And I'm going to assume that Evasion is a no-go on changing at all due to how it is?
I already asked this question, but I will repeat it again. When I used «Animated monsters plugin», did not correctly work function "transformation of a monster" in a «monster behavior». Replaced all the monster animation, besides the standard posture. Anyone сan fix this? (RM2K3)