New account registration is temporarily disabled.

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

Posts

@All: Please update your SDK! I fixed a critical bug: some functions would randomly crash depending on the compiler optimizations.

And there is also now the first "official" plugin of mine, a keyboard and mouse input plugin: http://rpgmaker.net/forums/topics/10286/

By the way, I now recommend Code::Blocks as IDE and added a step-by-step tutorial at the Getting Started section.

=====
Hello, Orochii!

About ATB: Did you have a look at RPG::battleSpeed?

About F4/F5 simulation: You don't need AutoIt. You just need to use they keybd_event function, as said.

Example:
keybd_event(VK_F4, 0, 0, 0); // simulate F4 key down
keybd_event(VK_F4, 0, KEYEVENTF_KEYUP, 0); // simulate F4 key up

You can find out if you are in fullscreen or not by checking RPG::screen->fullScreen (there is also RPG::screen->largeWindow).

About anti-auto-fullscreen: Here is the "trick" I was talking about. There is no "official" way in the SDK, but you can make the game always start in windowed mode by putting the following line into your onStartup handler (don't forget to return true in onStartup):
*reinterpret_cast<short *>(0x48FA57) = 0x9090;
If I may, could I drop suggestions in here for this? Just in the event that something catches yours (or anyone else's who may be doing things for this) eye that could be useful? I'll have to think on some things first (or they may appear as topics anyways depending), but just seeing ahead of time!
@Cherry: Your getting started tutorial was exactly what I needed and it's great but you forgot to mention a few things. You didn't mention how to select a host application in Code::Blocks in order to build and run the plugin. In this case it should be your game's RPG_RT.exe.

You can add this to your getting started tutorial:
In Code::Blocks, click Project and click Set program's arguments...
In the Host Application textbox copy and paste the directory to your game's RPG_RT.exe or find it by clicking on the folder icon beside the text box, once you have selected your game's RPG_RT.exe click ok and press F9 to build and run your plugin.


I was able to successfully make my first plugin using your tutorial. Thank you once again Cherry.
@Xenomic: Of course.
@supremewarrior: Hm, I ran the game from the RPG Maker so I didn't need to set a host application. But I will add that too.
Ah, here's one. I'm not sure if I'm blind or not, but here goes.

Regarding skills that activate using switches and Commands in Battle Layout: Would there be a way to make it so that when using skills that require switches, that it'd be possible to target ONE enemy instead of it targetting everything on-screen? And on that note, when it comes to making Command abilities (i.e. using the Battle Layout tab, this one I'm not sure on at all), is it possible to make it select one ally?
Well, we could use "normal" skills, but without checking any of the stats to decrease.

Then, we could use the onDoBattlerAction handler of DynRPG to find out which skill was used and which target was selected, and set a switch and call RPG::updateBattleEvents or something like that.
That could work yes...I just find it silly that 2k3 forces the "target all" function that it does with switches @_@


Though the question is now, would that apply to Command abilities as well (those that aren't skills but actual commands themselves. I daresay there's none in there that targets one ally at all, but can be set to target one enemy with the Attack subtype)?
author=Cherry
@supremewarrior: Hm, I ran the game from the RPG Maker so I didn't need to set a host application. But I will add that too.

When I tried to build and run before setting a host application, I got a message about a host application needed to be set before the plugin can be run. So I googled that message and did the above and it worked for me that way.

EDIT: I know this is probably a C++ question, I have searched around but I don't understand a few things.
If I do RPG::battler* battler->conditions.size. RPG::battler* is a pointer data type? battler->conditions.size is the battler object using the conditions.size method?

Is it equalivant to the java statement: RPG battler = conditions.size? without the pointer? I'm a bit confused :s
Well, "battler" is probably of RPG::Battler* type. Then battler->conditions is the conditions array which is of type RPG::DArray<short, 1> which is just a helper class for arrays starting with index 1 and containig elements of type "short". battler->conditions.size accesses the "size" member of the array helper class and is a simple "int".

So your statement isn't meaningful and I don't know what you want to do with it... Because the size of the condition array is no battler pointer (RPG::Battler*) but an ordinary int(eger)!

@XenomIc: take a look at the RPG::Action class documentation. Basically, any action could have any targets...
You said we can offer suggestions for plugins?

Problem: When I plug my joystick in to play a 2k3 game, it automatically maps the four main joystick buttons. 2 of which are the same function.

Suggested Plugin: One that prevents 2k3 from auto mapping accept/cancel/shift to the joystick(so I can use joy2key). Or one that remaps the joystick based on the creators preference.
I'll check that... But I am not yet sure how the joystick system of the RM2k3 works...
Ah! I just thought of this one!

Changing the basic attack properties of monsters. Because you know, all monsters have the exact same default attack. It's just a normal attack that you cannot assign any properties to. It'd be nice if there was a way to change that, so that you can duplicate say...a Mindflayer that physically attacks with a Blunt attack that has a chance to inflict Instant Death, or a Cockatrice attacks and has a chance to inflict Petrify. Sure, you COULD make skills to emulate this, but it'd be nice to just do it with normal attacks instead!


And I highly doubt it's impossible to do anything to change the formulas of how damage and speed works in 2k3 right? Because having a 999 ATK character attacking a 1 DEF monster and doing maybe 500, IF 1000 on a critical, with normal everything is kinda lame no?
Changing formulas isn't yet possible with DynRPG and not so easy to implement, sorry. About Physical attacks of monsters: I think it would really be easier to use skills...
Probably.

Also, came across this after updating with the new DynRPG.

"Access violation in module 'RPG_RT.exe' in with address 00493384 and offset A47B97A4 of type Read occured."


This happens anytime I try to buy something in a shop using the Shop command. It lets me SELL items yes, but it won't let me BUY them. If you choose something to buy, it will crash like above.


EDIT - Also of note, I noticed that text boxes don't fully disappear before teleport events. If you have a message directly before you use a teleport event, the textbox does not disappear until after you have teleported and about a second into the next screen. Another thing you want to fix methinks! Though obviously the first one up there is more important since ya know, it crashes the game ^^;
author=Cherry
Changing formulas isn't yet possible with DynRPG and not so easy to implement, sorry. About Physical attacks of monsters: I think it would really be easier to use skills...
I'm on the way to do sothing SIMILAR to that. That is, using a zero-damage skill, then checking it's ID, doing the damage (changing HP value with DynRPG) and then changing the damagePopup value. I'm still doing tests with it, but it's probably possible and even would let one to do multihit skills and other stuff!

And Cherry, thanks for the "autowindowed" code! I was curious how the editor did that thing (and how did the old "Tester" utility from 2k or even your Hyperpatcher2 did the trick for that). I suppose is some redirection or something... aww yeah! I want to investigate how exactly does that works!
And about the BattleSpeed... I think that I'll use it too. With that and set atb change values, I can somehow "customize" the ATB behaviour.

Anyway, thanks for everything,
Orochii Zouveleki
Multihit skills....like Omnislash...delicious! Now if only HP of monsters could exceed 99,999, that'd be even better!

Oh, and of note Cherry, I DID check the older DynRPG patch (the first release I got from ya) and that crash didn't happen there. So it's definitely something in the updated patch of it. Thought I'd let you know about that.
Yes, i will check it out. About textboxes: that's because of the UnlockPicsPatch which is included, I think. A simple wait solves that problem (It's because certain event commands are not blocked anymore while the messagebox is open - or in this case: closing.)

@Orochii: For Multihit, you probably need to call RPG::updateBattle in a loop in order to wait for one popup to finish (battler->damagePopupTimer == 0) before starting the next - the Maker can only display one damagePopup at a time unless you displa the damage in a custom way (e.g. Using RPG::Image::drawText).

By the way, would you mind sharing your plugin with us, even if it's only for educational reasons?
Shop bug is fixed. Please re-download and re-patch!
Would having monsters animate in battle be something that is possible to create with one of your plug-ins?
That's certainly possible and I already have a "super battle" plugin in mind where this would be one of its features.