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

Posts

right click and save link as, or save target as.

usually there is an option for doing a certain action for a certain file type, it must be set on open by default. usually you want it to ask you what to do.

what browser are you using? have you tried a different one?
Saving link as ended up making it work. Hmm.

Well then, time to try it out :D (Thanks for the help.)
author=dragonheartman
DynRPG allows you to make "custom" event commands with the onComment callback. You could do something like this in your standard 2k3 comment:

@getMonsterID 123 4

Could someone make a list of the built in callbacks? I only know the ones from plugins, and even then, the only one I've regularly used is the Pathfinder event (mainly to get characters to exit the screen with stuff in the way, although I did manage a follow hero event).
Saw that before. It did give alot of info on how this stuff is put together, but if you're a non-coder, basically all I wanna know about is onComment stuff, which isn't directly mentioned (I saw nothing at all about getMonsterID, for instance).


This might be helpful, I dunno how to put the syntax. For instance, I might wanna use getItemName (int id) to copy the name of the item ID stored in a variable into a name (I've currently got an easier method, but it takes a zillion lines) and then display it as something like "You got a (Potion/Elixir/Whatever)!" Or maybe have spells target random characters as if they are normal attacks, and not get reflected (again, doable, but the system I've got doesn't have an easy method of displaying missed attacks).
Well, if you use coding terminology without knowing what it means, then obviously you're going to get different answers than what you expect.

OnComment itself is a callback which is triggered whenever a comment line is "executed" in the maker (given that it has the dynrpg patch). Whatever effect you get out of using a plugin and comment commands is not a callback, neither is getMonsterID for that sake (Does it even exist? Closest thing I can see in the documentation is the DatabaseId member of the Monster Class).
Whatever is supposed to happen once a comment is read is up to the developer of the plugin to decide, so of course you won't find details on this on the documentation page.

getItemName is a "function", which you can only access directly by actually coding a plugin in C++. If you want to use it, the minimum requirement is that you're able to write a few lines of code in C++ and manage to compile it properly into a dll. If you can do that, then it shouldn't be too hard too hard to create a plugin with custom a comment command yourself which pretty much does what you describe.

Looking at some C++ source codes from existing plugins can probably help you in your quest here, in terms of how to utilize the onComment callback to make comment commands.
author=Kazesui
If you want to use it, the minimum requirement is that you're able to write a few lines of code in C++ and manage to compile it properly into a dll.

Yes (barely, my C++ is rusty). No (I never learned to make .dll in programming class, and haven't the right compiler anyway).

Damn!

I generally just rely on others to make plugins, because while I can line-edit most programming codes (I mean geez, I got my prog calculator programmed to do trig problems for me since I didn't feel like studying one year) not being able to compile it sorta puts a damper on it.

Someone (hint, Cherry) should build several of these into DynRpg so they can be readily called without an extra plugin.
On the assumption that you tried to follow the instructions given on the DynRPG documentation page, and downloaded Code::Blocks and everything, try to download this,
unzip the file and replace the MinGW folder in your Code::Blocks folder with the one given in this link.
If you do this and follow all of the other instructions on the page, it might just fix your compiling problem.

Better than relying on Cherry, who seems to be rather busy these days anyway
Yeah, he does.

I think I'll pass. Code::Blocks is a working program, even if it didn't do what I'd like. MinGW is bullcrap.

Nonworking installation and fragmented resources.

You know, if you want a program that has a bunch of parts to be user friendly? You put all the crap but the installation software into one package, and if that can't be done, you make a freaking shortcut. You design it to be installable from anywhere and to work standalone (one of these two was probably the error, either not in the right spot, or it was expecting me to have already installed Code::Blocks on this new computer). Wtf, my InstallCreator game.exe worked better, even when it had a glitch.
I was assuming you had installed the Code::Blocks version which came with MinGW (the almost 100 mb big binary file). I don't recall there being any separate installation parts using this, and this would give you a MinGW folder inside your Code::Blocks folder (probably located under Program Files). If you merely swap the existing folder there with the one in the link from my previous post, that should magically fix your problems (no additional installation or anything, just a matter of cut and paste).
...Look, I know how to do stuff with what I know of coding.

But there's this gap of knowledge beyond which it's like "Am I missing something here?" DLL and header working is one of them. Even if the code is there, and works, I have no idea what I'm typing in C++ means, or why it's called what it is. C++ in general is shaky because it was 10+ years since I last worked with it, and a different version than what I can get my hands on.

Cherry doesn't have free time, but you seem to. Let's say I do get the thing to work, as it obviously isn't doing so far. Let's say I give you a sample CPP code. Would you correct any errors that will crop up? And give me back something in actual DLL format?

(I did in fact copy the MinGW file. What do I do now to make a dll?)
Depends on the errors. If it's simple syntax errors, compiling it wouldn't take very long, but if it's beyond that, I might not have time for it myself. I have time to make these posts, and take a quick look at the forums every now and then, but beyond that I'm fairly busy myself these days.

Compiling a DLL isn't that different than compiling an executable, and following the tutorial given on the documentation page, pretty much tells everything you need to get it properly running... well aside from the problems with using the right compiler, since Code::Blocks have updated their compiler in the meantime (used to work with the default compiler they were using).
Aside from that, looking at source code given from plugins should be helpful enough to just edit tiny bits of code to do what you want (as long as you're not trying something overly fancy).

but yeah, if you have some fairly "correct" cpp code, I could potentially compile it for you, and send you the dll back.
Okay then, new question. If it's totally hopeless (very likely given a ten-year gap), if you haven't time to compile, have you time to tell me what's hopeless?

...Yay. I made are_you_sure.dll

Don't even know where to start. I've got a few ideas what I want to do, but much of it is way out of my league since I've only worked some with straight CPP, and some with rpgmaker, but as for how they interact with each other... no idea.

@GetName  "NameOfVariable", Hero/Monster/Item/Attribute/Condition, number or Variable
(stores the item number as a name inside a string variable. Easy enough, if I were working with cpp, it'd be a simple cin>>NameOfVariable followed by some code to locate the number. But yea, I dunno. It should support variables for the last number. "ItemNum" for instance, Item, 1 (which stores the name "potion"). The NameOfVariable might be defined through DynRpg.ini, and there may be a way to make more than one.)

@ShowMessage "message", NameOfVariable/V1/whatever, "more message"
(Basically, works like a glorified cout. It should use the message
box, (since @text seemed to need a picture, which disqualified it from effective use because battles don't allow pictures)

@SetInt Hero/Monster/Skill/Item/Attribute/Condition, Value/Range/Etc, VariableNum
(basically, it would be exactly like what you could do going to variable edit, except you could draw from places like Conditions and stuff. For instance, Condition, 2-12, 232 stores random number between 2 and 12 from the condition list. It could also work for skills or items used on the subject in question)

@CheckCondition Hero/Monster, Value1, Skill/Item/Attribute/Condition, Value2
(this may not be necessary. The basic idea was in battle of some such, it checks whether Monster 11 has for instance condition 2, or Elf is poisoned. There is currently NO way to do this effectively. Also, it's probably supposed to run through hero/monster battlers rather than hero/monsters)

SkillRandomTarget = SkillNumber1, SkillNumber2, SkillNumber3, SkillNumberEtc (stored in DynRpg.ini)
(Basically, the equivalent of all this code, although I can already do so within the code, being able to cut down on some lines of code would be nice, as would having a quick and dirty bite attack that dealt petrify on damage)

Zombie effect = ConditionNum (stored in DynRpg.ini)
(Healing hurts, damage hurts too/heals? until status removed).

Although strictly speaking, I have a feeling the zombie one is kinda hard, and I could do without the random targetting, since I can already do it. So, mainly just being able to make a message that is essentially "The item you just stole was Phoenix Down."

...Something like RPG::Monster or RPG::Actor getName (), then RPG::getItemName, getSkillName, and getConditionName too. But stored in some kind of container, that can be used later.




@GetName  "NameOfVariable", Hero/Monster/Item/Attribute/Condition, number or Variable
Storing a string like this into another string in the dll isn't that hard. The problem arises when you want to display this string somehow. The easiest solution would probably to have an extra hero as temporary string storage, so that you can access it by \n. "NameOfVariable" is by this probably better changed to ID of the hero used as a string storage.

@ShowMessage "message", NameOfVariable/V1/whatever, "more message"
(Basically, works like a glorified cout. It should use the message
box, (since @text seemed to need a picture, which disqualified it from effective use because battles don't allow pictures)

There's a patch for adding picture support in battles.

@SetInt Hero/Monster/Skill/Item/Attribute/Condition, Value/Range/Etc, VariableNum
I'm not entirely sure what you want to do here. you call it "SetInt" which would imply you want to change a given value (which is at odds with you saying "draw from"). It sounds like you want to store an entire object of type condition/item/whatever, but that only makes sense for further work on it in the dll, otherwise you'd rather extract the relevant values you're interested in.

@CheckCondition Hero/Monster, Value1, Skill/Item/Attribute/Condition, Value2
Given how one of the tutorial patches basically draws icons above the actors showing their different Conditions, this should be fairly possible to do. Again, you'll need a way to read the answer though, requiring you to choose a switch id or something to read the return value.

SkillRandomTarget = SkillNumber1, SkillNumber2, SkillNumber3, SkillNumberEtc (stored in DynRpg.ini)
If the SkillNumbers are referring to ID's of actual skills, this can prove tricky since most data of the skills have not yet implemented into the SDK. Alternatively, you might be able to somehow swap the current action of an actor with a "random one", but I don't know how to do that yet, and it would probably require quite a bit of time in terms of playing around to figure it out, if at all possible.

Zombie effect = ConditionNum (stored in DynRpg.ini)
Again, I don't know exactly. It should be all means be perfectly possible, but the effort and approach required is questionable, and these kind of stuff tend to take a lot longer than anticipated once started on, so yeah..

...Something like RPG::Monster or RPG::Actor getName (), then RPG::getItemName, getSkillName, and getConditionName too. But stored in some kind of container, that can be used later.

This is essentially the same as the first one
Comments in blue.

author=Kazesui
@GetName  "NameOfVariable", Hero/Monster/Item/Attribute/Condition, number or Variable
Storing a string like this into another string in the dll isn't that hard. The problem arises when you want to display this string somehow. The easiest solution would probably to have an extra hero as temporary string storage, so that you can access it by \n. "NameOfVariable" is by this probably better changed to ID of the hero used as a string storage.

I figured that might be one of the options. Though ideally, I'd like to instead make a sort of name controlled by dynrpg.ini where it handled the string.

@ShowMessage "message", NameOfVariable/V1/whatever, "more message"
(Basically, works like a glorified cout. It should use the message
box, (since @text seemed to need a picture, which disqualified it from effective use because battles don't allow pictures)

There's a patch for adding picture support in battles.

It's not so much the pictures, as it is that I wanna work using message box anyway, since the DynText plugin didn't really work for me (I had the pixel pic open, and it showed a large blue box instead of the text it was supposed to show)

@SetInt Hero/Monster/Skill/Item/Attribute/Condition, Value/Range/Etc, VariableNum
I'm not entirely sure what you want to do here. you call it "SetInt" which would imply you want to change a given value (which is at odds with you saying "draw from"). It sounds like you want to store an entire object of type condition/item/whatever, but that only makes sense for further work on it in the dll, otherwise you'd rather extract the relevant values you're interested in.

I basically want to make it possible to extract the ID from a monster or condition or whatever, and then use it in an if statement (such as If battler is ID 128, or if item used is ID 16). Somehow. I think this is what's behind the next one too.

@CheckCondition Hero/Monster, Value1, Skill/Item/Attribute/Condition, Value2
Given how one of the tutorial patches basically draws icons above the actors showing their different Conditions, this should be fairly possible to do. Again, you'll need a way to read the answer though, requiring you to choose a switch id or something to read the return value.

This one is supposed to be more the code to read the answer. Basically, I wanted to look at the code and if the hero/monster in question has the condition (or has used the skill or item) return the event as successful (yea, maybe it turns on a switch set that gets defined in dynrpg.ini). If not, it skips the stuff below.

SkillRandomTarget = SkillNumber1, SkillNumber2, SkillNumber3, SkillNumberEtc (stored in DynRpg.ini)
If the SkillNumbers are referring to ID's of actual skills, this can prove tricky since most data of the skills have not yet implemented into the SDK. Alternatively, you might be able to somehow swap the current action of an actor with a "random one", but I don't know how to do that yet, and it would probably require quite a bit of time in terms of playing around to figure it out, if at all possible.

The basic code I was able to do outside SDK was something like this. I had a bunch of switch skills which when turned on would common event a Random Target 1-10. I then set each target with the character I wanted taking a random damage range set in the Monster Events page. If the character wasn't in the party, it'd reroll a few times using label (though sometimes it would miss due to timing out, but better than the alternative of glitching or freezing). Basically what this code I would want to do is to just look for the skill ID, and allow an override with regard to its targetting system (so it doesn't get reflected). But this isn't necessary, since I just finished an entire system that does everything from regular damage to Demi and Karma effects, to status effects.

Zombie effect = ConditionNum (stored in DynRpg.ini)
Again, I don't know exactly. It should be all means be perfectly possible, but the effort and approach required is questionable, and these kind of stuff tend to take a lot longer than anticipated once started on, so yeah..

...Something like RPG::Monster or RPG::Actor getName (), then RPG::getItemName, getSkillName, and getConditionName too. But stored in some kind of container, that can be used later.

This is essentially the same as the first one

Yea that last bit was basically me figuring out part but not all of the first one. I'd still need serious help understanding the precise syntax.

This require its own header, or will the cpp suffice? I'd be happy with the GetName, Text, CheckCondition and maybe finding out which patch allows pictures in battle (I could definitely find a use for that). But let's not cram up this thread with code, so I'll ask the rest of my annoying questions on PM.

Okay, I may have found the pictures in battle patch, holdon. Nope, didn't work. Apparently, changing to David caused it to reject it (found out when I tried to get the thing dragged to the picvarid.exe file). So yes, it definitely will have to run without pictures.

-----
Yay, thanks Kaze. This program (KazString) is good.
Well, geez. Don't halt discussion here on my account.
I'm curious, would there be any way to actually SHOW when MP is damaged/healed using this? It is rather annoying that default 2K3 doesn't show the numbers at all (making it extremely hard to judge when you damage the enemy's MP or how much MP you recover, especially if trying to make "0 MP = Death" viable as a battle strategy (note: I haven't tried this yet)).


I...think there WAS something that did the "O MP = Death", but last I remember it wasn't working 100% too so...the same one with the Quick status (which would be extremely nice but I already use those slots...).


EDIT - Also wondering if there's a way for anyone to adjust Cherry's status icons thing to work with characters that don't use 96x96 battle animations, and/or a way to make it so that icons scroll through the statuses so that if a character has like 8 statuses there's not a crapton of status icons on screen at once x_x;;
@MP: Yes, you could check for MP changes in onFrame and use RPG::Battler::damagePopup (either as colored number or as string like "+10MP" or so, unfortunately the RPG Maker doesn't provide a function to show a colored string) to visualize the change. However you would somehow need to "filter" the normal MP usage caused by skills because that's probably unwanted... Maybe by ignoring MP change done between onDoBattlerAction and onBattlerActionDone, but I am not sure about that. Maybe RPG::Battler::actionStatus might be helpful there...

@EDIT: Shouldn't be too difficult, I think.
Firstly, I'd like to thank Cherry a lot for this work. As for me, I work in RM2k3 just because there are a lot of features, which are easy to do in it, but need scripting (and scripts, as for me, are of little trust). But people always want more - and that's the way of getting more :)
Secondly, I'd like to ask for a small help as a programmer. I tried to make the plugin configurable through using the loadConfiguration function in onStartup callback. It lookes as this:
bool __cdecl onStartup(char *PluginName)
{
    std::map<std::string, std::string> conf;
    char i;
    conf = RPG::loadConfiguration(PluginName);
  ...
    return true;
}

This plugin crashes on startup. Tried to comment the loadConfiguration function - all is fine. Is something wrong with my code?
Actually, it should work fine. That's weird. What's the exact crash address? And have a look at the demo plugin, it uses RPG::loadConfiguration too, does this one work for you?