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

Posts

Another question/idea. Would it be possible to render the screen in 256 color/32-bit instead of 256 color/8-bit using DynRPG?
http://rpgmaker.net/games/2752/images/14856/

As that EasyRPG screen comparison shows, it would make a huge improvement on gradient and picture quality (256 color images would be 1:1 instead of getting downgraded when they're called in RPG_RT). I assume there's a lot of things to consider like how it would affect performance, but it would be very useful for color-junkies like me (I'm a graphic designer IRL).
Why wouldn't you just use 24(/32)-bit color all the way?
You can directly draw onto the screen using DynRPG, and the RPG Maker screen uses 16 bit.

So a plugin for displaying 16-bit pictures would be possible, even with alpha (though a bit complicated).
By the way:
author=bulmabriefs144
Be specific. I have onStartup, initializeBattle, onDrawBattler, onBattlerDrawn, and onFrame.
What's the initialiseBattle? It's not documented. Or I simply didn't find it?
Hmmm, it's... I actually don't know. It's dragonheartman's code.

http://rpgmaker.net/forums/topics/10855/

The code goes like this:


/*
animated_monsters.cpp
A dynRPG plugin to animate your monsters with the DBS!
Feel free to use or modify this as you see fit.
Your safety is not guaranteed.

--dragonheartman
6 JUN 2012


*/

#define AUTO_DLLMAIN
#define NUM_POSES 7
#define MAX_MONSTERS 8

#include <DynRPG/DynRPG.h>
#include <sstream>

RPG::Image* monsterPoses[MAX_MONSTERS][NUM_POSES]; /* table containing all images created */
RPG::Image* oldPose; /* rm2k3's old monster pose, saved off */
boolean resetTable = false; /* reset table flag */
int frameTimer = 0; /* global frame updater */
int hurtTimer[MAX_MONSTERS]; /* a timer for how many frames we ought to show the hurt pose */
int oldHP[MAX_MONSTERS]; /* old hp vals to check for damaged enemy */
int poseIndex[MAX_MONSTERS]; /* which monster pose do we show? */
int animationCycle[NUM_POSES] = {1, 2, 3, 2, 4, 5, 6}; /* index for which animation file to display */
int animationType; /* which animation type? 0=idle, 1=hurt, 2=dead */
/* 1-3 idle, 4 dead, 5-6 hurt */

// We store the configuration here
std::map<std::string, std::string> configuration;

// We store the images of the conditions here
std::map<int, RPG::Image *> images;


//when I tried to compile with isAnimated it gave me alot of not defined errors, for keyname, isAnimated, etc.

bool onStartup(char *pluginName) {
// We load the configuration from the DynRPG.ini file here
configuration = RPG::loadConfiguration(pluginName);
//not sure if it goes inside here or outside, or how to define it


return true; // Don't forget to return true so that the start of the game will continue!
}


// destroy ALL the images!!
void initializeBattle()
{
// update our initial pose indexes (0-3)
for (int i=0; i<MAX_MONSTERS; i++)
{
poseIndex[i]=i%4;
hurtTimer[i]=0;
oldHP[i]=0;

// destroy any remaining images -- no leaks pls
for (int j=0; j<NUM_POSES; j++)
{
if(monsterPoses[i][j])
{
RPG::Image::destroy(monsterPoses[i][j]);
}
}
}
}

// called every time a batter is drawn
bool onDrawBattler(RPG::Battler *battler, bool isMonster, int id)
{

//probably change this to isAnimated? I want the conditions_icon code for config
//before here (the one that does Condition 1-whatever only called "Monsters")
if(isMonster && ((battler->getName().compare("Elias") == 0) || (battler->getName().compare("Ambrosia") == 0) || (battler->getName().compare("EvilOracle") == 0) || (battler->getName().compare("Lilith") == 0) || (battler->getName().compare("Michael") == 0)))
{ //don't want getName().compare, I want it to run from config

// if the current HP is less than old HP, we need to set the appropriate hurt timer
// else: reset oldhp in the case where the enemy is healed
if(battler->hp < oldHP[id])
{
hurtTimer[id] = 30;
oldHP[id] = battler->hp;
}
else if(battler->hp > oldHP[id])
{
oldHP[id] = battler->hp;
}

// if the monster has hurt poses to display, we need to hard set the frame index to 5 (HURT)
if(hurtTimer[id] > 0)
{
poseIndex[id] = 5 + (frameTimer-1)/5;
hurtTimer[id]--;
}

// if the monster dies, we want to hard set the frame index to 4 (DEAD)
if(battler->hp <= 0)
{
poseIndex[id]=4;
}

if(!monsterPoses[id][animationCycle[poseIndex[id]]])
{
// create the new blank image
monsterPoses[id][animationCycle[poseIndex[id]]] = RPG::Image::create();
monsterPoses[id][animationCycle[poseIndex[id]]]->useMaskColor = true;

// load the image file into our image we created
std::stringstream fileName;
//The issue is here. We need a branch so it normally loads without creating an animation cycle
//then if a folder exists it needs to check the animation cycle.

fileName << "Monster\\" << battler->getName() << "\\" << animationCycle[poseIndex[id]] << ".png";
monsterPoses[id][animationCycle[poseIndex[id]]]->loadFromFile(fileName.str(), true);


}
// we do this (UGLY) cast to update the monster's image to the image in the loader table
oldPose = static_cast<RPG::Monster*>(battler)->image;
static_cast<RPG::Monster*>(battler)->image = monsterPoses[id][animationCycle[poseIndex[id]]];

}
return true;
}

// after the battler is drawn, we need to set the monster's default image to point back to the saved off image
bool onBattlerDrawn(RPG::Battler *battler, bool isMonster, int id)
{
//possibly add the keyname section here too, not sure.

//s for string length
//probably change this to isAnimated too?
if(isMonster && ((battler->getName().compare("Elias") == 0) || (battler->getName().compare("Ambrosia") == 0) || (battler->getName().compare("EvilOracle") == 0) || (battler->getName().compare("Lilith") == 0) || (battler->getName().compare("Michael") == 0)))
{
static_cast<RPG::Monster*>(battler)->image = oldPose;
}
return true;
}


// called every frame refresh
void onFrame(RPG::Scene scene)
{

// for battle scenes only, we update a frame timer
if(RPG::system->scene == RPG::SCENE_BATTLE)
{
frameTimer++;

// every ten frames, update the index to be displayed in our monster's image
if(frameTimer > 10)
{
frameTimer=0;
for(int i=0; i<MAX_MONSTERS; i++)
{
if(hurtTimer[i]==0)
{
poseIndex[i] = (poseIndex[i]+1)%4;
}
}
}

// set a flag notifying that we need to reset the loader table after combat
resetTable = true;

}
else if (resetTable)
{

// reset the loader table post-battle
initializeBattle();
resetTable = false;

}
}

See that BattleName compare thing? With some help (okay, basically hand-holding) from him, I wrote that. But of course, if you wanted it to work, you'd have to custom build it for your file. That's ummmm, not really an acceptable improvement. (Btw, without that, unless you have every single monster as a folder, you get an error saying "missing MonsterWhatever/1.png, missing MonsterWhatever/2.png, missing MonsterWhatever/3.png, missing MonsterWhatever/4.png, missing MonsterWhatever/5.png" and then it doesn't show a picture which is in fact there.

So I wanted it to only worry about things that have folders, and failing C++ plugin actually knowing what a folder looks like, you have to do this either by manually putting names for it to check and ignoring everything else, or allow config process, to only check for names in config.

So, yes, this manual process technically works, but it's a five-minute patch of the problem, not something that would seriously help if someone else was wanting this too (let's face it, alot of people would probably want just one or two bosses animated). So, I nagged dragonheartman to gimme a real code solution. He more or less mentioned the the condition_icons code as a good place to start, and told me a few more codes.

/*
animated_monsters.cpp
A dynRPG plugin to animate your monsters with the DBS!
Feel free to use or modify this as you see fit.
Your safety is not guaranteed.

--dragonheartman
6 JUN 2012

Edited by bulmabriefs144, thanks to Andrew Keturi

*/

#define AUTO_DLLMAIN
#define NUM_POSES 7
#define MAX_MONSTERS 8

#include <DynRPG/DynRPG.h>
#include <sstream>

RPG::Image* monsterPoses[MAX_MONSTERS][NUM_POSES]; /* table containing all images created */
RPG::Image* oldPose; /* rm2k3's old monster pose, saved off */
boolean resetTable = false; /* reset table flag */
int frameTimer = 0; /* global frame updater */
int hurtTimer[MAX_MONSTERS]; /* a timer for how many frames we ought to show the hurt pose */
int oldHP[MAX_MONSTERS]; /* old hp vals to check for damaged enemy */
int poseIndex[MAX_MONSTERS]; /* which monster pose do we show? */
int animationCycle[NUM_POSES] = {1, 2, 3, 2, 4, 5, 6}; /* index for which animation file to display */
int animationType; /* which animation type? 0=idle, 1=hurt, 2=dead */
/* 1-3 idle, 4 dead, 5-6 hurt */

// We store the configuration here
std::map<std::string, std::string> configuration;

// We store the images of the conditions here
std::map<int, RPG::Image *> images;

std::stringstream keyName;


//when I tried to compile with isAnimated it gave me alot of not defined errors, for keyname, isAnimated, etc.

bool onStartup(char *pluginName) {
// We load the configuration from the DynRPG.ini file here
configuration = RPG::loadConfiguration(pluginName);
//not sure if it goes inside here or outside, or how to define it


return true; // Don't forget to return true so that the start of the game will continue!
}


// destroy ALL the images!!
void initializeBattle()
{
// update our initial pose indexes (0-3)
for (int i=0; i<MAX_MONSTERS; i++)
{
poseIndex[i]=i%4;
hurtTimer[i]=0;
oldHP[i]=0;

// destroy any remaining images -- no leaks pls
for (int j=0; j<NUM_POSES; j++)
{
if(monsterPoses[i][j])
{
RPG::Image::destroy(monsterPoses[i][j]);
}
}
}
}

// called every time a batter is drawn
bool onDrawBattler(RPG::Battler *battler, bool isMonster, int id)
{
for(int i = 1; i <= battler->conditions.size; i++) {
if(battler->conditions[i] > 0) {
if(!images[s]) {
images[s] = RPG::Image::create();
images[s]->useMaskColor = true;
// It should be "Monster12" for condition 12, for example
// moved std::stringstream keyName; to global since it failed here
keyName << s;
//Not really sure what to put here, originally it was
// "Monster" << s

// Now, we try to load the image. If loading the image fails,
// nothing special will happen (because of the "false" at the
// "showErrors" parameter), the image will just be empty.
images[s]->loadFromFile(configuration[keyName.str()], false);
}
}
}
//so then dragonheartman told me to try something along these lines
if(isMonster && ((battler->getName().compare(configuration[keyName.str()]) == 0)))
{ //don't want getName().compare, I want it to run from config

// if the current HP is less than old HP, we need to set the appropriate hurt timer
// else: reset oldhp in the case where the enemy is healed
if(battler->hp < oldHP[id])
{
hurtTimer[id] = 30;
oldHP[id] = battler->hp;
}
else if(battler->hp > oldHP[id])
{
oldHP[id] = battler->hp;
}

// if the monster has hurt poses to display, we need to hard set the frame index to 5 (HURT)
if(hurtTimer[id] > 0)
{
poseIndex[id] = 5 + (frameTimer-1)/5;
hurtTimer[id]--;
}

// if the monster dies, we want to hard set the frame index to 4 (DEAD)
if(battler->hp <= 0)
{
poseIndex[id]=4;
}

if(!monsterPoses[id][animationCycle[poseIndex[id]]])
{
// create the new blank image
monsterPoses[id][animationCycle[poseIndex[id]]] = RPG::Image::create();
monsterPoses[id][animationCycle[poseIndex[id]]]->useMaskColor = true;

// load the image file into our image we created
std::stringstream fileName;
//The issue is here. We need a branch so it normally loads without creating an animation cycle
//then if a folder exists it needs to check the animation cycle.

fileName << "Monster\\" << battler->getName() << "\\" << animationCycle[poseIndex[id]] << ".png";
monsterPoses[id][animationCycle[poseIndex[id]]]->loadFromFile(fileName.str(), true);


}
// we do this (UGLY) cast to update the monster's image to the image in the loader table
oldPose = static_cast<RPG::Monster*>(battler)->image;
static_cast<RPG::Monster*>(battler)->image = monsterPoses[id][animationCycle[poseIndex[id]]];

}
return true;
}

// after the battler is drawn, we need to set the monster's default image to point back to the saved off image
bool onBattlerDrawn(RPG::Battler *battler, bool isMonster, int id)
{
//possibly add the keyname section here too, not sure.

//s for string length
//probably change this to isAnimated too?
if(isMonster && ((battler->getName().compare(configuration[keyName.str()]) == 0)))
{
static_cast<RPG::Monster*>(battler)->image = oldPose;
}
return true;
}


// called every frame refresh
void onFrame(RPG::Scene scene)
{

// for battle scenes only, we update a frame timer
if(RPG::system->scene == RPG::SCENE_BATTLE)
{
frameTimer++;

// every ten frames, update the index to be displayed in our monster's image
if(frameTimer > 10)
{
frameTimer=0;
for(int i=0; i<MAX_MONSTERS; i++)
{
if(hurtTimer[i]==0)
{
poseIndex[i] = (poseIndex[i]+1)%4;
}
}
}

// set a flag notifying that we need to reset the loader table after combat
resetTable = true;

}
else if (resetTable)
{

// reset the loader table post-battle
initializeBattle();
resetTable = false;

}
}

So, yea, this is great and all, but it doesn't animate anything. And by this point, I'm about ready to kill dragonheartman, for being so cryptic, and not coming out and telling me at the very least, what lines to edit to what. He later told me that the whole
(battler->getName().compare(configuration[keyName.str()]) == 0)]
only worked if my monster's name was "True". So, yes, I'm still very much at a loss in how to do the config.


What can I advise:
1. Use the configuration in this way: Animated=1,3,5,10... (numbers of monsters which are to be animated in database). This format (if it's followed correctly) is very easy to parse. I can't write it now (limited in time), but if you want, I'll do it when I'm free.
2. Make the global variable bool *Animate (or, maybe, char *) and int maxnum. Alloc memory for it by the largest number in config (that will be maxnum), and then set to true (or 1) all the elements which numbers are in list above, and to false (or 0) all another ones.
3. So, is the monster to be animated - is checked easily:
if ((battler->databaseId>maxnum) && (Animate[battler->databaseId-1]))
- animate, else - nothing to do.

Of course, it's not the ultimate truth. It's simply how I would do this.
author=Cerberus
What can I advise:
1. Use the configuration in this way: Animated=1,3,5,10... (numbers of monsters which are to be animated in database). This format (if it's followed correctly) is very easy to parse. I can't write it now (limited in time), but if you want, I'll do it when I'm free.
2. Make the global variable bool *Animate (or, maybe, char *) and int maxnum. Alloc memory for it by the largest number in config (that will be maxnum), and then set to true (or 1) all the elements which numbers are in list above, and to false (or 0) all another ones.
3. So, is the monster to be animated - is checked easily:
if ((battler->databaseId>maxnum) && (Animate[battler->databaseId-1]))
- animate, else - nothing to do.

Of course, it's not the ultimate truth. It's simply how I would do this.

Do it whenever you're free. Dragonheartman's been explaining for a solid month. I really don't understand his code. I sort of understand the lines you put, but without really knowing what I'm doing, the slightest error, and it won't work, and I wouldn't know why.
Looks like I've understood the source. Won't be able to replicate it by myself, though :)
That's the code modification I've tested. Only a bit, because have to run now, but it seems to work.

/*
	animated_monsters.cpp
	A dynRPG plugin to animate your monsters with the DBS!
	Feel free to use or modify this as you see fit.
	Your safety is not guaranteed.

	--dragonheartman
	6 JUN 2012

*/

/*
    Modification by Cerberus:
    only several monsters are animated
    26 JAN 2013
*/
#define AUTO_DLLMAIN
#define NUM_POSES 7
#define MAX_MONSTERS 8

#include <DynRPG/DynRPG.h>
#include <sstream>

RPG::Image* monsterPoses[MAX_MONSTERS][NUM_POSES];		/* table containing all images created */
RPG::Image* oldPose;									/* rm2k3's old monster pose, saved off */
boolean resetTable = false;								/* reset table flag */
int frameTimer = 0;										/* global frame updater */
int hurtTimer[MAX_MONSTERS];							/* a timer for how many frames we ought to show the hurt pose */
int oldHP[MAX_MONSTERS];								/* old hp vals to check for damaged enemy */
int poseIndex[MAX_MONSTERS];							/* which monster pose do we show? */
int animationCycle[NUM_POSES] = {1, 2, 3, 2, 4, 5, 6};	/* index for which animation file to display */
/* 1-3 idle, 4 (RPG::monsters[id]->databaseId<=maxnum) &&
      (Animate[RPG::monsters[id]->databaseId]))dead, 5-6 hurt */

int maxnum=0; //in fact, it's the size of Animate array; basely, it means "no animations at all"
bool *Animate; //if Animate[i]=true, the monster which DB number is i+1 is to be anmated
std::map<std::string, std::string> configuration;
bool in_use=false; //is the battler drawn now animated?

bool onStartup(char *pluginName)
{
    int i, len, curnum=0;
               // We load the configuration from the DynRPG.ini file here
               configuration = RPG::loadConfiguration(pluginName);
                if (configuration["Animate"][1]) // i.e. found the list
                {
                    for (i=0, len=configuration["Animate"].length(); i<len; i++)
                    {
                        if (isdigit(configuration["Animate"][i]))
                            curnum=curnum*10+configuration["Animate"][i]-'0';
                        else
                        {
                            if (curnum>maxnum)
                                maxnum=curnum;
                            curnum=0;
                        }
                    }
                    if (curnum>maxnum)
                        maxnum=curnum;
                    curnum=0;
                    //we run through the list and found the highest number
                    //better would be to know how many monster are in DB, but I haven't found this
                    Animate=(bool *)malloc((maxnum+1)*sizeof(bool));
                    memset (Animate, 0, (maxnum+1)*sizeof(bool)); // all the array is filled with "false"
                    curnum=0;
                    for (i=0, len=configuration["Animate"].length(); i<len; i++)
                    {
                        if (isdigit(configuration["Animate"][i]))
                            curnum=curnum*10+configuration["Animate"][i]-'0';
                        else
                        {
                            Animate[curnum]=true;
                            //it's correct, because curnum<=maxnum
                            curnum=0;
                        }
                    }
                    Animate[curnum]=true;
                    //it's correct, because 0<=curnum<=maxnum
                    curnum=0;
                }
                //now, we have an array of booleans, where true means "animate this"
               return true;
}


// destroy ALL the images!!
void initializeBattle()
{
    // update our initial pose indexes (0-3)
    for (int i=0; i<MAX_MONSTERS; i++)
    {
        poseIndex[i]=i%4;
        hurtTimer[i]=0;
        oldHP[i]=0;

        // destroy any remaining images -- no leaks pls
        for (int j=0; j<NUM_POSES; j++){
			if(monsterPoses[i][j])
			{
				RPG::Image::destroy(monsterPoses[i][j]);
			}
        }
    }
}

// called every time a batter is drawn
bool onDrawBattler(RPG::Battler *battler, bool isMonster, int id)
{
    // we will be updating the battler dynamically iff the battler is of type RPG::Monster
    if ((isMonster) &&
        (RPG::monsters[id]->databaseId<=maxnum) &&
        (Animate[RPG::monsters[id]->databaseId]))
    // first, as mentioned above, is that we check is it the monster or the actor
    // second, we check whether the third will be correct
    // third, we check whether the monster have to be animated (according to DynRPG.ini)
    // if one of conditions isn't met, we simply don't do anything
    {
        in_use=true; //this monster is animated, so we need to perform actions after it's drawn
        // if the current HP is less than old HP, we need to set the appropriate hurt timer
        // else: reset oldhp in the case where the enemy is healed
        if(battler->hp < oldHP[id])
        {
            hurtTimer[id] = 30;
            oldHP[id] = battler->hp;
        }
        else if(battler->hp > oldHP[id])
        {
            oldHP[id] = battler->hp;
        }

        // if the monster has hurt poses to display, we need to hard set the frame index to 5 (HURT)
        if(hurtTimer[id] > 0)
        {
            poseIndex[id] = 5 + (frameTimer-1)/5;
            hurtTimer[id]--;
        }

        // if the monster dies, we want to hard set the frame index to 4 (DEAD)
        if(battler->hp <= 0)
        {
            poseIndex[id]=4;
        }

        if(!monsterPoses[id][animationCycle[poseIndex[id]]])
        {
        	// create the new blank image
			monsterPoses[id][animationCycle[poseIndex[id]]] = RPG::Image::create();
			monsterPoses[id][animationCycle[poseIndex[id]]]->useMaskColor = true;

			// load the image file into our image we created
			std::stringstream fileName;
			fileName << "Monster\\" << battler->getName() << "\\" << animationCycle[poseIndex[id]] << ".png";
			monsterPoses[id][animationCycle[poseIndex[id]]]->loadFromFile(fileName.str(), true);
        }
		// we do this (UGLY) cast to update the monster's image to the image in the loader table
        oldPose = static_cast<RPG::Monster*>(battler)->image;
		static_cast<RPG::Monster*>(battler)->image = monsterPoses[id][animationCycle[poseIndex[id]]];
    }
    return true;
}

// after the battler is drawn, we need to set the monster's default image to point back to the saved off image
bool onBattlerDrawn(RPG::Battler *battler, bool isMonster, int id)
{
	if ((isMonster) && (in_use))
	{
		static_cast<RPG::Monster*>(battler)->image = oldPose;
	}
	else in_use=false;
	return true;
}

// called every frame refresh
void onFrame(RPG::Scene scene)
{

    // for battle scenes only, we update a frame timer
    if(RPG::system->scene == RPG::SCENE_BATTLE)
    {
        frameTimer++;

        // every ten frames, update the index to be displayed in our monster's image
        if(frameTimer > 10)
        {
            frameTimer=0;
            for(int i=0; i<MAX_MONSTERS; i++)
            {
                if(hurtTimer[i]==0)
                {
                    poseIndex[i] = (poseIndex[i]+1)%4;
                }
            }
        }

        // set a flag notifying that we need to reset the loader table after combat
        resetTable = true;

    }
    else if (resetTable)
    {

        // reset the loader table post-battle
        initializeBattle();
        resetTable = false;
        in_use=false;
    }
}

onFrame remains unchanged, in onDrawBattler and onBattlerDrawn there are several new conditions, and new onStartup.
Hope that's what you want. And sorry if something is wrong in the comments :)
Uh oh.

Haven't tested it yet vs the stuff on my list, but this is what it did on stuff that wasn't on the list.

What about just checking if 1.png exists in order to decide if a monster is animated?
Yes, that might be fine, then I wouldn't even need a config. I'm gonna go out on a limb and say that you probably know the best way to do that?

What parts should I change from my original (or Cerberus's) code?

------------------
Been archive skimming...
author=Xenomic
1) Allowing more Conditional Branches for monsters: I don't know if C++ can do this, but I find it silly that you can't do that many conditional branches for monsters, like for say if they have a status on.

I noticed this too. It's a real shame, 2k3 has a load of built-in battle systems (battlers with no scripting is a biggie), but there isn't an easy way to do so. It really screws things up too, since it means you can't for instance have something that does a special event if an enemy is, say, turned to stone.

2) Allowing Switch abilities to target one target: I think I mentioned this before, but aside from using the Attack type, you cannot target one enemy ever with an ability with custom coding (Switch abilities don't work this way). Likewise, would be nice to be able to target your own allies with a Command ability (Link to Event doesn't work for this, and there's no way to target your allies manually for abilities or to even attack).

For the party, a workaround was to inflict them with status effects, to act as a sort of "marker" for the event. But because there's neither a status condition for monsters, nor a variable handler for battlers, you're kinda screwed if you want complex targetting.

3) Avoiding attacks: This one is another one that I'm irked about. So if a character is KO'd, that character will never be targeted by enemies or by any abilities that doesn't revive or target dead allies. However, it's impossible to copy this (you cannot just copy/paste the Death status as it doesn't do the same thing), so there's no way to set ANY status to where the target will not be attacked if they're under that status (for instance, say I want to have a character with the Exclusion status, and instead of having to custom code the status, I just make the character disappear completely and set No Action. I'd like to be able to not have that character targeted by anything so that the character won't be damaged/healed/buffed/etc.). I'm sure there's a way to replicate this somehow, and would be nice to have as it would make some statuses even more dangerous (that, and having something that does 0 damage regardless to a character with specific statuses. For instance, Invincible or Petrify).

You can do this by having a condition to change the class of the character (I made a Soulless class), and having it immune to all elements as well as evasion. But it's horribly roundabout...

...Someone should make a 2k13. Something compatible with Win 7/8, with essentially the same stuff built-in as 2k3 (I like the easy code, and the built-in battler means you don't need to do alot of scripting to make a FF game, and 2009 is good), but with more stuff added in.

  • Monster status as a condition. Added stuff to condition branches, and variables. More places to put variables into (from what I tested with DynRpg, most of them work, meaning there's no reason why some of it shouldn't have access, but it doesn't.
  • Status with priority 100 behaves like Dead (no target except trying to remove the effect)
  • More battle stuff. Including a Zombie status and having Actor attacks target either monsters or actors (maybe an either skill target too).
  • Basic Skills (They behave like items or basic attacks, in that they can't be reflected)
  • Page 4 of the event commands has just two commands, Change Class and Change Battle Commands. Hmmmm, besides that, we could have Change Menu Properties (For shorter menus like Save/Quit), Change Frame, Change Battle Graphics, Change ATB Mode (for doing things like switching modes in battle, speaking of which Wait could be more turn-based than it is), Change Title Screen, Change Gameover Screen, and whatever else you can think of.
  • Page 2 of the Strings could have more.
  • Items could have more options (maybe a Spells Penetrate Reflection, Opal Ring style effect). Also, Common Event items (in addition to Switch style)
  • Local switches. Seriously... treasure chests.
  • Importable from 2k3.

author=bulmabriefs144
Uh oh.

Haven't tested it yet vs the stuff on my list, but this is what it did on stuff that wasn't on the list.
Strange. Started it in Battle Test with one monster animated and one not - had a bug too (not a crash, though). Ingame this battle worked fine.
Is there any way to change the sound effect or music volume globally (or even make sound effects & music volume controlled by variables? After converting my music over to mp3, I noticed they're a lot quieter in-game than they should be (compared to midi). I went through all of the music tracks in Audacity, and made sure they're amplified correctly, so I would basically have to go through all of the sound effects referenced (which would be a huge hassle) and lower the volume of them by 3 or 4 notches in order to get them to the same level, since all of the music is at its max.

You can kind of see what I mean in the video I posted below. Go to the battle at 1:14.
http://rpgmaker.net/games/20/media/774/
Quick Plugin

This allows you to control the volume (and pitch) of all event sound effects with a single comment command.
Other sound effects which are stored in the database are not affected (at least they shouldn't be)

Those should be easier to locate and fix manually though I guess, so I suppose this could be of some assistance
(ATB Comment Mode)

Nah, screw it. Messing with the faster ATB using comments wasn't working.
author=Kazesui
Quick PluginThis allows you to control the volume (and pitch) of all event sound effects with a single comment command.
Other sound effects which are stored in the database are not affected (at least they shouldn't be)

Those should be easier to locate and fix manually though I guess, so I suppose this could be of some assistance


Thanks Kaz! This is very helpful. The biggest pain will be going through the sound effects in the battle animations though. Do you think you could send me the source so I could mess around with it?

author=bulmabriefs144
(ATB Comment Mode)

Nah, screw it. Messing with the faster ATB using comments wasn't working.


I'll comment on this since I was also messing with the source of this plugin. You kind of have to set the ATB to an absolute value (like 200 or 300) via the plugin's source (or create some kind of ini setup) rather than controlling it in-game because you would run into this issue:

Say you had 2+ save files setup. In both save files, the ATB mode was set to 200. If you were to go into one of them and change it to 400 (via an event through some kind of custom menu), quit back to the title screen and then go into the other save file that in theory should be 200, it would now be set to 400. Therefor, you could have a menu slider that says "Battle Speed: 200" since that's what the variables say, but it could still be different based on one of your other saves. If you absolutely had to give the player the ability to change battle speed in-game, it would have to be a setting in the title screen you build.

I had written a similar variation of that plugin to say "if a variable is 0 (default): use 200 battle speed, if 1: use 100 battle speed, if 2: use 200, if 3: use 300, if 4: use 400," but it was quickly scrapped after I found out the above.
I'm still working out how to get config to function properly (haven't had much luck using it for animated_monsters). Also, what I was trying to do was make a split ATB where the active speed was much different than the wait. And then, at some point, I was wanting to change it by comment, and have some sort of system to display something on the battle screen whether it was Active or Wait. (The original idea was sort of a day/night system where at night it would be Active, and during the Day it would be Wait) I also had two System2 meter systems, one with an ATB bar and one without (but I've never worked with graphics, and I don't fully understand what namespaces work and why).

Far from being able to do this, it didn't even seem to switch using the code from Faster ATB
RPG::system->atbMode = RPG::ATBM_WAIT;
not in NewGame, LoadGame, and the onComment code didn't appear to work at all. And it seemed to only run at one speed, not two. This was code that was already there, not my code, so I dunno what was wrong.

Well, if you're trying to use loadConfiguration (like in one of the DynRPG example programs), you need to install the GCC 4.6.1 compiler and copy it into your CodeBlocks folder. Then anything related to loadConfiguration will compile correctly. The newer GCC that comes with CodeBlocks breaks something about it.

I kind of see what you're saying about changing the ATB speed in Wait mode vs Active. Try mixing what was coded in DynRPG with what's in faster ATB:

bool onSetSwitch(int id, bool value) {
if (id == 369){ // 369 is the Switch ID
if (value == true){
RPG::system->atbMode = RPG::ATBM_ACTIVE;
RPG::battleSpeed = 150; // Default = 100

}else{
RPG::system->atbMode = RPG::ATBM_WAIT;
RPG::battleSpeed = 300; // Default = 100
}

}
return true;
}

That would at least control it by switch, but I think you would still run into a similar issue as the one I described before.
author=PepsiOtaku
Thanks Kaz! This is very helpful. The biggest pain will be going through the sound effects in the battle animations though. Do you think you could send me the source so I could mess around with it?


source
This won't help you in terms of controlling the battle animation sound effects though, no matter how much you mess with it.
As far as I see, the SDK gives no control over the battle animations in any way, meaning you'll most likely have to simply do those the manual way.
Still, wish you fun with the source

As for the problems you mentioned with conflicting data for different savefiles, this can be remedied by using the onLoad and onSave callbacks. This way you can store savefile specific data (like the battle speed), and reload it upon loading.
I found this code today. Turn-Based. This is pretty much what I want (so yea, I'm happy), even though ideally, I'd like a way to switch between this mode and ATB on the fly.

I'm gonna figure out other things that can be changed about battle for Day/Night. It seems like the turn order in TB battles is unaffected by Haste, and instead seems to be influenced by this.



I'm gonna tinker around with something, and try to make a Day Night System.