[DYNRPG PLUG-IN] MAIN MENU GAME PLAYTIME CLOCK

Posts

Pages: first prev 12 last
I don't see the changes (I downloaded from this page, so that might not be the main download).

Ah, found it. Yes, that's nice. The variable is a good touch, I strung it to my day and night time, and now the first option varies between whitemist, grey, and darker.png depending on whether it's day, twilight, or night.

I kept one with pure background (the one with the best text). So now I have Day & Night, Forest (which matches my green), Lake (which matches my blue), and Surreal (which doesn't match either of the other two, but is a painting of a giant metallic fish).


Yeah I uploaded it as a plugin this time. I didn't realize the direct link I grabbed & updated the OP with was the old file still. It's been fixed!


No BG Mode too. This thing is win!

Hey, can you make it color select the timer color by variable (usually it'd be default or first color, but my transparent one is, well transparent, meaning I can't see the color. And it'd be cool to change the color with stuff)?
Bulma: I picked those 2 colors since they are pulled from the default color palette. I thought about making those variable controlled, but figured it should just match the rest of the menu. If you want to change them, go to lines 168-170 in the source:


images[1]->RPG::Image::drawText(timeOffset, 184, timeTextShow.str(), 0); // draw the time
images[1]->RPG::Image::drawText(8, 168, configuration["TimeTextDisplay"], 1); //draw the label text
images[1]->RPG::Image::drawText(26, 184, " : : ", 1); // draw the ":" characters

Change the "0" or "1" at the end of each line to:
RPG::variables[####]
Where #### is the variable id, so you'd end up with:


images[1]->RPG::Image::drawText(timeOffset, 184, timeTextShow.str(), RPG::variables[0031]); // draw the time
images[1]->RPG::Image::drawText(8, 168, configuration["TimeTextDisplay"], RPG::variables[0036]); //draw the label text
images[1]->RPG::Image::drawText(26, 184, " : : ", RPG::variables[0036]); // draw the ":" characters

The actual value of the variable must be between 0-19 of course, so the plugin will recognize the color.

Also, why make the time portion transparent and still keep the window border around it to begin with? That doesn't make much sense to me.
This plug-in is now the best THE BEST. Awesome work, PepsiOtaku! :D

Went ahead and tested it and it works great. I may or may not be using that changing FG/BG feature, but it's a very nice addition.
author=PepsiOtaku
Bulma: I picked those 2 colors since they are pulled from the default color palette. I thought about making those variable controlled, but figured it should just match the rest of the menu. If you want to change them, go to lines 168-170 in the source:


images[1]->RPG::Image::drawText(timeOffset, 184, timeTextShow.str(), 0); // draw the time
images[1]->RPG::Image::drawText(8, 168, configuration["TimeTextDisplay"], 1); //draw the label text
images[1]->RPG::Image::drawText(26, 184, " : : ", 1); // draw the ":" characters


Change the "0" or "1" at the end of each line to:
RPG::variables[####]

Where #### is the variable id, so you'd end up with:


images[1]->RPG::Image::drawText(timeOffset, 184, timeTextShow.str(), RPG::variables[0031]); // draw the time
images[1]->RPG::Image::drawText(8, 168, configuration["TimeTextDisplay"], RPG::variables[0036]); //draw the label text
images[1]->RPG::Image::drawText(26, 184, " : : ", RPG::variables[0036]); // draw the ":" characters


The actual value of the variable must be between 0-19 of course, so the plugin will recognize the color.

Also, why make the time portion transparent and still keep the window border around it to begin with? That doesn't make much sense to me.


Because I can, and it's funny.

Also, I tried having the border blank for the transparent, and it didn't mesh well for the black one (clear on black is a bit difficult).
I decided to make it all one color. Hope it works.

Oh, man. I'm gonna design a tie dye color, for my surreal BG. Transparent blends too much, and all the others are boring.



Pure awesomeness.
Anyway, thanks for the help.

My fish is happy, and so am I.
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.
Oooh, that mean you're closer to update?

DynRPG is gonna be so cool, it can shoot laser beams from its mouth.

author=Cherry
        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.

Sounds awesome! I can't wait for the new version. Will there be a way to easily mimick the scroll effect when you hold up/down/left/right in a menu?

Is this what you meant for the rect updates?
 if(rect->top == 0 && rect->left == 0) {
RPG::screen->canvas->draw(rect->left, rect->top, images[2]);
} else {
width = rect->right - rect->left;
height = rect->bottom - rect->top;
// if on the save/load menu, draws specific parts of the background
RPG::screen->canvas->draw(rect->left, rect->top, images[2], rect->left, rect->top, width, height);
RPG::screen->canvas->draw(rect->left, rect->top, images[2], rect->left, rect->top, width, height);
}
It seems to work great. I updated the download for this plugin here: http://rpgmaker.net/engines/rm2k3/utilities/24/
Actually, the condition is wrong, it should always execute the "else" case because otherwise a RECT from, let's say, 0/0 to 100/100 will update the whole screen instead of the upper-left 100x100 pixel corner.
Got it. I updated the download again with this fix.
width = rect->right - rect->left;
height = rect->bottom - rect->top;
// if on the save/load menu, draws specific parts of the background
RPG::screen->canvas->draw(rect->left, rect->top, images[2], rect->left, rect->top, width, height);

Will the DynRPG update have an easy way to draw system windows? It would be nice to just say "drawWindow(x,y,width,height) as opposed to getting all of the parts needed to draw the window via the system png, and piecing it together via image->draw.

Another cool feature would be to replace the default message window (or even expand it to more than 4 lines). I've seen a ton of projects that use custom windows, but it requires you to call a common event before every message box displays.
Depends on whether the RPG::Window class will be included or not, at the moment I would tend to first release a lot of bugfixes and after that concentrating on adding the new features like RPG::Window.

List of changes I have added already (ignore the Doxygen/HTML markup, I don't have time to reformat it for the forum):

\page changelog Changelog
\section v0_20 Version 0.20 (2013/??/??)
<ul><li>On-the-fly patching using IPS files or quick patches
in DynRPG.ini added. </li>
<li>\c AUTO_DLLMAIN define removed, now a \c DllMain function is always
inserted by default, use <tt>#define CUSTOM_DLLMAIN</tt> to prevent
this behaviour.</li>
<li>The automatic \c DllMain function now stores the plugin's instance
handle in the global variable \c hInstance (only if \c CUSTOM_DLLMAIN
is not defined).</li>
<li><b>Critical bug fixed:</b> Game could hang when loading a game after
a new plugin has been added due to an infinite loop bug during \c Save??.dyn
file parsing.</li>
<li><b>Critical bug fixed:</b> Transparency of events (including the hero)
behaved weirdly (changed depending on Y position) and was thus unusable.
This bug also slowed down the event rendering a lot.</li>
<li><b>Bug fixed:</b> Class RPG::DList had members \c count and \c items
swapped. Because DynRPG classes need to have the same memory layout as the
%RPG Maker's internal Delphi counterparts, all accesses of DList classes
(most notably RPG::monsters) crashed the game.</li>
<li><b>Bug fixed:</b> RPG::Catalog::count didn't work (tried to access
\c list.count where it should have been \c list.list->count, causing a
compiler error.</li>
<li><b>Bug fixed:</b> RPG::Image::copy was broken (didn't set the new image
size but silently leaked an RPG::Image instance instead).</li>
<li><b>Bug fixed:</b> RPG::Actor and RPG::System methods sometimes returned
wrong strings (i.e. for RPG::Actor::getName) if they encountered a default
value in the database.</li>
<li><b>Bug fixed:</b> Due to missing string termination, the
RPG::ParsedCommentParameter::text member of a comment command's last
parameter often had garbage appended at the end.</li>
<li><b>Bug fixed:</b> Negative numbers in comment command parameters were
parsed as RPG::PARAM_TOKEN instead of RPG::PARAM_NUMBER.</li>
<li><b>Bug fixed:</b> RPG::Event::doesEventPageExist was broken.</li>
<li><b>Bug fixed:</b> RPG::transparentWindowsEverywhere was
broken.</li>
<li>Modified library to work with newer GCC compilers. Now GCC version
4.7.1 is required. (For tech-guys: Why the hell can GCC now use the ESP
register for an inline asm parameter with the \c "g" constraint?!)</li>
<li><b>Bug fixed:</b> The "cross-map" pictures #1001 to #2000 were not
erased when a new game was started.</li>
<li>Fixed an %RPG Maker bug which caused the HP display in the save menu
to be misaligned when the HP had 4 digits.</li>
<li>Removed the longer skill/item window visibility "improvement" for most
scenarious because it turned out to disrupt battle event processing.
Only the info window shown when a monster executes a skill is still shown
longer, but now only for 50 frames (old DynRPG used 90 frames which
turned out to be annoyingly long, original %RPG Maker used 30 frames which
I think is too short to be readable).</li>
<li>Fixed an %RPG Maker bug which would cause the game to crash when
a "Link to Event" battle command was used right after the item menu
has been opened and then closed with ESC.</li>
<li>Added RPG::Actor::twoWeapons, RPG::Actor::lockEquipment,
RPG::Actor::autoBattle and RPG::Actor::mightyGuard fields.</li>
<li>RPG::System::pedestrianBGM added. Funny name, I know.</li>
<li>The maximum number of plugins has been raised from 30 to 50.</li>
<li><b>Bug fixed:</b> Under some circumstances, the game would crash
during event command execution. It's hard to describe the exact triggers,
but they included "Erase event" commands in common events, loading a game
which was saved while a "Wait until key press" was active and some other,
rarer situations.</li>
<li>Fixed two %RPG Maker bugs with "Small window" mode in battle: The
action, item and skill selection windows had an empty line at the bottom
even though there would have been enough space. This was especially
confusing for the battle action window because it looked like the actor
had only 3 commands available. Also, the selection cursor for "Show choice"
windows in battle was not correctly aligned with the choice texts.</li>
<li>Removed the "higher action window" workaround for the small battle
window mode because a real fix has been implemented now.</li>
<li><b>Bug fixed:</b> DynRPG would sometimes refuse to load a plugin
if additional non-plugin files containing the string ".dll" were in the
DynPlugins directory.</li></ul>
I know this is an old thread but the download link on the first page is dead. :(
The correct link is https://rpgmaker.net/engines/rt2k3/utilities/24/

It's because the old RPG Maker 2003 category ("rm2k3") was renamed to RPG Tsukuru 2003 ("rt2k3") after the official version was released.
Pages: first prev 12 last