CHERRY'S PROFILE

Search

Filter

[DynRPG Plug-in] Main Menu Game Playtime Clock

author=trance2
... get this, I've been doing a search on my computer to look for the elusive save files and... it's in some strange AppData subfolder called "Virtual Store" or something. It's got a few other folders in there of other programs as well. So it seems the problem is with Windows; sorry. This'll require further research...


http://rpgmaker.net/forums/topics/8599/?post=274110#post274110
http://blogs.msdn.com/b/chinmay_palei/archive/2011/01/16/windows-7-application-compatibility-issues-fix-centre.aspx (section 6)

author=PepsiOtaku
trance2: Yeah I haven't attempted to do anything with storing strings yet. I don't think you can call something directly from another plugin. It has to be called from rpg maker 2003 using the existing dynrpg calls, or from an external file (which would require a separate plugin). There's a number of things you could do. I wouldn't mind seeing the location in the menu either, but the issue would be space. Where could you fit it? :)


You could add a configuration to show arbitrary text at arbitrary coordinates and load the text from, let's say, a hero name, or by getting it from a comment call (then you have to store it on saving/loading, of course).

By the way, technically there is a way to call code in other plugins (or just check if they are loaded): If a function is exported using __declspec(dllexport), other plugins can call it.

Example:

Code in plugin A ("plugin_a.dll")
extern "C" {

__declspec(dllexport) int addNumbers(int a, int b) {
return a + b;
}
}


Code in plugin B
HINSTANCE pluginAInstance = GetModuleHandle("plugin_a");

if(pluginAInstance) {
int (*addNumbers)(int a, int b) = GetProcAddress(pluginAInstance, "addNumbers");
if(addNumbers) {
int c = addNumbers(12, 34); // c should be 46 afterwards
} else {
// Plugin found but function addNumbers not found
}
} else {
// Plugin "plugin_a" not found
}


        if(rect->top == 0 && rect->left == 0) {

RPG::screen->canvas->draw(0, 0, images[2]);
} else {
// if on the save/load menu, draws specific parts of the background
RPG::screen->canvas->draw(0, 32, images[2], 0, 32, 320, 8);
RPG::screen->canvas->draw(0, 232, images[2], 0, 232, 320, 8);

}


You shouldn't hardcode the coordinates but get them from the rect parameter. Reason: In a next update I will add support for adding custom windows and menu systems and then there will be a function "drawSystemBackground(rect)". If people want to draw a different part of the background then, your plugin will instead draw the save/load menu parts which will mess up the functionality of other plugins.

PepsiOtaku's DynRPG Plugin Emporium!

author=PepsiOtaku
Battle Layout Changerhttp://rpgmaker.net/users/PepsiOtaku/locker/battle_layout_changer.rar

This plugin allows you to change the System2 set & Battle Layout (Traditional/Alternative/Gauge) by setting a variable for either, and setting Large/Short Windows & Window Transparency by switch! See the readme for the full documentation.

There is something you overlooked: These things are not meant to be changed ingame (from the RPG Maker's view) so the RPG Maker doesn't expect them to change. Therefore, the RPG Maker doesn't save/load these settings to/from savegames either.

This means if your plugin changes something, the change will persist across all savegames until the game was closed.

You need to save your changes manually using savePluginData in onSaveGame and restore your changes in onLoadGame. Also you need to save the initial settings (and the initial image, using RPG::Image::copy, because currently you don't have access to the current System2 filename) in onInitFinished and restore them at onNewGame (or in onLoadGame if, for example, the System2 image wasn't changed).

PS: I just remembered RPG::Image::copy had a bug... Fixed here:
	void copyImage(Image *dest, Image *src) {
if(!src->pixels) {
dest->free();
} else {
dest->init(src->width, src->height);
dest->memcpy(pixels, src->pixels, src->width * src->height);
}
dest->setPalette(src->palette);
dest->useMaskColor = src->useMaskColor;
dest->alpha = src->alpha;
dest->autoResize = src->autoResize;
dest->colorControl1->red = src->colorControl1->red;
dest->colorControl1->green = src->colorControl1->green;
dest->colorControl1->blue = src->colorControl1->blue;
dest->colorControl1->chroma = src->colorControl1->chroma;
dest->colorControl2->red = src->colorControl2->red;
dest->colorControl2->green = src->colorControl2->green;
dest->colorControl2->blue = src->colorControl2->blue;
dest->colorControl2->chroma = src->colorControl2->chroma;
}

Because the RPG::Image::create(templateImage) function will still use the internal (buggy) RPG::Image::copy, use this instead:
RPG::Image *backupImage = RPG::Image::create();
copyImage(backupImage, RPG::system->systemGraphics->system2Image);

+++ DynRPG - The RM2k3 Plugin SDK +++

But somehow, I never learned how to use -> . *pointers or namespaces, so that sorta thing confuses me.

So you don't really know C++. It's like "I know some cooking but I have no idea of boiling things". I would recommend you to take some tutorials about pointers and about object-oriented programming in C++! I think all these things will make much more sense then. From what I saw until now, it looks to me like you are often just poking around with trial and error and if something works, you cannot 100% be sure why, which also means you overlook mistakes which make you code not instantly fail but have other sideeffects.

You have to declare your SkillVar, etc. globally.
http://www.learncpp.com/cpp-tutorial/42-global-variables/

[2K3] Removing limit on number of battle animations allowed

I hope you made a backup. Did you check whether you have the right version? Otherwise you have just corrupted your RPG Maker instead of improving it.

You have mail.

Flickering screen in FULL SCREEN

[2K3] Removing limit on number of battle animations allowed

[2K3] Removing limit on number of battle animations allowed

For the others (and 1.08 only): Open RPG2003.exe in a hex editor (make backup first!) and two bytes at offset 9E696 to 90 90.

[DynRPG] CMS Tools: Menu Transition Tweaks

I'd rather use "Show Screen: Fade In" otherwise the new screen will pop up without a transition from black...

[DynRPG] CMS Tools: Save Cleanup

This plugin is not a very good idea I am afraid because the point of the *.dyn files is to save data across sessions! It's as if you would write a plugin which removes all the *.lsd files... doesn't sound very nice.

The RPG Maker stores its data in the lsd files. They have a structure which is made to hold all the data the RPG Maker needs. But plugins may need more than that so plugins can call savePluginData inside the onSaveGame callback to store their own data inside the new dyn files and they automatically get their data back as parameter of the onLoadGame callback.

PepsiOtaku's DynRPG Plugin Emporium!

author=PepsiOtaku
Cherry: It was kind of a broad statement, and varies as to what I'm doing. There's a couple things that could probably be documented better, like how to use/change the filename of the system2image. Is that even possible? I see that it references RPG::Image, but I don't quite understand how to call it correctly. Something like this:

images[0] = RPG::SystemGraphic::system2Image->loadFromFile(configuration[strSys2Image.str()], false);
just seems to give me a compile error. Overall, it's the things that are vaguely documented.

RPG::SystemGraphic is a class and system2Image is not static so you can't use RPG::SystemGraphic::system2Image of course. If you enter "SystemGraphic" in the search box you will see that there is a member "systemGraphic" of the RPG::System class. The system game object is named RPG::system (lower-case s) so the right way would be RPG::system->systemGraphic->system2Image->loadFromFile(...) :-)

Please also check the edits I made at my last post if you haven't already!