[RM2K3] MONSTER: DO NOTHING ADJUSTMENT PLUGIN REQUEST

Posts

Pages: 1
I'm requesting a plugin for an adjustment to the monster command Do Nothing to stop monsters from flashing and making a sound effect when they perform the command.

To go with Bulma's turn-based template, but without having the monsters flash every second.

Added a video to highlight the flashing issue in both versions of the animated monsters plugin issue (the flashing is less noticeable without that plugin active).
Funny, I am working on this bug exactly this moment.
Awesome, looking forward to the fix.
The problem with this idea is that monsters still use turns with Do Nothing, so not displaying that makes certain problems with not knowing time gauge.

As it is, there's a glitch to trying to do turn-based in that something like Snow (slow drain hp) or Countdown (slow death) try to rush through turns at MonsterNumber X turn, meaning something that in the standard ATB (I've tested without Turn Wait, it doesn't do this) would involve acting out full turns as 1 (wait), 2 (wait), 3 (wait), etc. will instead do 123456789 as a rapid constant tick. So yea, countdown before I did a fix for it (using the turn change, meaning you'd have to make actions as a party) used to instant kill the party instead.

Either it splits into Do Nothing as actually skipping the turn, and Observe Battle as using a turn, or it's actually just hiding the problem. I could really stand battle actually being able to use Turns 25 again.

Added a video to highlight the flashing issue in both versions of the animated monsters plugin issue (the flashing is less noticeable without that plugin active).

author=bulmabriefs144
As it is, there's a glitch to trying to do turn-based in that something like Snow (slow drain hp) or Countdown (slow death) try to rush through turns at MonsterNumber X turn, meaning something that in the standard ATB (I've tested without Turn Wait, it doesn't do this) would involve acting out full turns as 1 (wait), 2 (wait), 3 (wait), etc. will instead do 123456789 as a rapid constant tick. So yea, countdown before I did a fix for it (using the turn change, meaning you'd have to make actions as a party) used to instant kill the party instead.

I've not had this problem, unless I don't exactly get what you mean.
My character with the MP Regen condition regens 1MP every turn for as long as the condition is active on him. Trying this out in your turn-based system works perfectly well.
Enemy makes its move = +1MP
Next enemy makes its move = +1MP
My character makes its move = +1MP
My next character makes its move = +1MP
I notice it when I have large monster parties. If you're using the animated monster for everything, you probably don't have large parties.

Ummmm, how do you animate? I'll show you.

Thief girl's HP started at 6798. HP metered down, without any party member acting, at 3 1hp clicks at once (because that's the number of monsters with turns).



It's down to 6743. I haven't even moved yet, all that happened was I let these monsters take Do Nothing turns, subtracting 3 hp per round. If there were 8 monsters, this would be really out of control. A Turn 10 wait done in two of these.

This could be fixed two ways.

  • Turns only get used if monsters use something other than Do Nothing (I can see this screwing things up, with even the slightest margin for error, making it hard to advance turns)
  • When using Do Nothing, the entire monster party's turns count as a single turn (meaning whether they have 1 or 8, I lose only 1 hit per round, not 1-8)
Hm, that's strange.
I made a video to show how it works for me (including recording lag (lol) and 1 shy monster running off screen). Watch the MP bar of the girl character when she gets her MP Regen buff. edit: On her first MP increase it goes up by 3 (+2 MP from using Attack, +1 MP from MP Regen buff).
Probably has something to do with the fact that our animation plugins are completely different.

Yours is the one done by dragonheartman and does all the extra attack frames. Mine keeps the old format (just animation, no attack/movement, and no wandering offscreen), and adds the ability to make folders for animated (they have to be the same name), or unanimated monster graphics. This was done by Cherry and seems to handle stuff fairly normally (I tried it without, and it still did it, which is why I dunno why it doesn't happen to you).

I think you emailed me with why you couldn't use my animation plugin? It's probably because you have to throw away some crap (mine only has the 6 frames), and there's nothing needed in DynRpg.ini.

Okay, in your video, with the buff, it went from 10 to like 14, after each enemy attack? This is what it's doing after each Do Nothing. And then the monster cycles again, after about a second.
Ah, I see what goes wrong now. The condition counts every time monsters perform Do Nothing, while it should only count when they during their real turn. It does just the same in your version of the Animated Battlers plugin. The problem with the plugin isn't not being able to use it, but it crashes my game when editing anything in it.

Although couldn't this regen/degen issue be prevented from happening by placing a hidden stun condition on all monsters during player turn, and remove it after the player's made his moves? I'm going to try it out.
It probably could. I'd rather not put it on all monsters though (some of my monsters ignore Turn Wait, since they are aggressive. This is especially true of bosses and dragons). Hence the desire for a plugin that makes the process work as those creatures were stunned, if they Do Nothing.

I think I know the problem with your testing. You were trying to use the newer one, with 11 sprites? Yea, that doesn't work. Only the old one with the 6 poses works, because of the fact it doesn't know how to handle the attack cycling.

Holdon, I'm gonna "update" the animated monsters thing.

http://rpgmaker.net/media/content/users/3388/locker/animated_monsters_check_file.zip

It's not great (doesn't have the full animation), but it should compile. Tell me if it doesn't.
Yeah, I just tried placing Stun on all monsters when it's the player's turn, but that makes them automatically perform Do Nothing, resulting in pretty much the same thing.

author=bulmabriefs144
I think I know the problem with your testing. You were trying to use the newer one, with 11 sprites? Yea, that doesn't work. Only the old one with the 6 poses works, because of the fact it doesn't know how to handle the attack cycling.

At first yes, but I get the exact same results when I use your version.

author=bulmabriefs144
Holdon, I'm gonna "update" the animated monsters thing.

http://rpgmaker.net/media/content/users/3388/locker/animated_monsters_check_file.zip

It's not great (doesn't have the full animation), but it should compile. Tell me if it doesn't.

What do you mean? Like, to see if I can edit the new version? It still gives me the same problem. As soon as I change anything in the code and build+run it, it crashes my game on start-up.
author=Millenim
As soon as I change anything in the code


Does it run as is? (unless you are willing to make the function compatible with with your new code, it's not taking it)

The code isn't designed to run any of the newer stuff. As in, not, "oh, I can make it designed to do this" as in there is literally at least one function lacking that would make it even remotely able to do this.

When I tried to do it on the 11 one, even under ideal circumstances, it would routinely check through every single thing to make sure it was there. It was okay with the main six, but then it got to attacks, movement, and casting. and the files were missing. I never even tried having those files, but I'm betting money that had I loaded them on, I'd get a similar crash.

Further, you have to understand how this works. I make a Monster name like DarthVoydTheGreat, then I have to name it exactly that, letter for letter, to get it to animate. You can't have anything related to animated_monsters in the ini (it'd probably screw with it), and no, you probably can't do much to customize it, without first making sure you can get the original plugin to work. If you can't get the original plugin to work, you're probably configured wrong to start with, and you won't know what's wrong until you test as is, then make minor changes a little at a time.
author=bulmabriefs144
author=Millenim
As soon as I change anything in the code
Does it run as is? (unless you are willing to make the function compatible with with your new code, it's not taking it)

The code isn't designed to run any of the newer stuff. As in, not, "oh, I can make it designed to do this" as in there is literally at least one function lacking that would make it even remotely able to do this.

When I tried to do it on the 11 one, even under ideal circumstances, it would routinely check through every single thing to make sure it was there. It was okay with the main six, but then it got to attacks, movement, and casting. and the files were missing. I never even tried having those files, but I'm betting money that had I loaded them on, I'd get a similar crash.

Further, you have to understand how this works. I make a Monster name like DarthVoydTheGreat, then I have to name it exactly that, letter for letter, to get it to animate. You can't have anything related to animated_monsters in the ini (it'd probably screw with it), and no, you probably can't do much to customize it, without first making sure you can get the original plugin to work. If you can't get the original plugin to work, you're probably configured wrong to start with, and you won't know what's wrong until you test as is, then make minor changes a little at a time.

Well, when I said it stops working when I change anything, I mean literally anything. Even if only editing a single letter in a comment.
Also, when creating a new project, and copying the exact same code over to it, crashes the game on start-up. I doubt it has to do with settings, because it runs the first tutorial thing on Cherry's site just fine in a new project.
I don't have anything animated_monsters related in my .ini file.
Anyway, I'll ask Cherry about it some time, but it's unlikely I'll be able to do anything meaningful with the code anyway as I have about 0% experience with coding.

On-topic (actually no, it's still off-topic, LOL): I found a way around the unintentional regen/degen issue. It's not the most elegant solution, but I can't think of any other way to do it without a patch/plugin. It's also a lot of extra work, depending on how many characters, and how many different sorts of regen/degen conditions you use in your game. How to make it work:
-Have your Common Event that runs every single battle turn.
-Conditional Branch [if Switch that makes monsters skip turns (Do Nothing) is active) add a reverse effect on the exact amount of regen/degen for each character + possible regen/degen combination.
As I said, it does work, but when using it with any sort of HP regen/degen, numbers still pop-up. Also, it still very briefly shows the change in HP/MP before reverting back.
I made a video to show both HP and MP regen in action while monsters are waiting for their turn. Probably should watch it in full screen to make it easier to see the numbers change.


Oh yeah, I also found a way to exploit the turn-based system. Making 1 character move, having the other character select a target for next move and wait until the 1st character can move again. 2nd character makes it move, and quickly chose attack/skill and a target on the 1st character, and wait until the 2nd character can move again. Rinse and repeat.
It doesn't always completely work, sometimes an enemy will get an attack in if you have unlucky timing, but it's a cheap exploit anyway.

Another issue I found with the system is making my character attack/use a skill, and then have the monsters move before my character does. It's not a big issue, but it could potentially mess you up in a tough fight with a weakened party where you need that heal to go off first.
1000th edit: Although this is probably an issue with RM2K3's combat itself.

To be honest, it would probably be easier if someone could pick up what Cerberus left, and fix the game freezing bug with that plugin. It would make for a more stable and solid combat system. If not, I'm probably going to go with the standard, lame ABS, because however great a turn-based system working on switches and variables may be (I'm amazed you actually have managed to pull off something like it with just ingame resources), it lacks the stability and consistency that a combat system requires.
That's why I recommend against altering it. Cherry helped me with the code, but it was awhiiiiiiiiile ago. That's why it's so difficult, I have no idea how it works, or if the current version is actually the plugin.

Here's email notes, see if this helps any.

author=]
02/09/2013 11:34 PM
Oh, I just noticed a little flaw in my logic: Although this will work, it will cause a lot of unnecessary harddisk activity because it's checking for the file every time the image is drawn...

There are ways to handle it once for every monster (and saving the info that this monster is not animated), but it's too complicated for now (I don't have time for it right now), so as a quick fix, we'll read it from the configuration...

Basically, all we need to do is changing the isBattlerAnimated function to this:

// Checks if a monster is animated, by checking if there is a 1.png file for it

bool isBattlerAnimated(RPG::Battler *battler) {

if(!battler->isMonster()) return false; // Only monsters are handled, no actors

RPG::Monster *monster = (RPG::Monster *)battler; // Cast the battler to a monster pointer, so that we can access databaseId



// Assemble the key name of the configuration entry, e.g. Monster123Animated

std::stringstream keyName;

keyName << "Monster" << monster->databaseId << "Animated";



// Check if Monster123Animated (for example) is set to 1 in the configuration and return result

return configuration[keyName

.compare("1") == 0;

}




The doesFileExist function can be removed.

This new isBattlerAnimated function just reads from the configuration if the monster is animated or not.

In DynRPG.ini, you need to create a section called "animated_monsters" (or whatever name your DLL file has) and put entries like this:



Monster8Animated=1

Monster14Animated=1

Monster39Animated=1

Monster774Animated=1



Where 8/14/39/77 is the ID in the database. "=1" is always the same (putting anything else, like "0" or just nothing means "not animated").



First version actually used the ini. I wasn't much into this one.

author=]You are right, it needs to be keyname.str() in this line.

And no, the Animated is not necessary but it makes sense because there might be other per-monster settings in the future.

It's not about Harddisk space but about activity, the other code is opening and closing a file 120 to 960 times a second (depending on how much monsters you are fighting with), which probably causes unnecessary performance problems.

Oh, I just noticed a little flaw in my logic: Although this will work, it will cause a lot of unnecessary harddisk activity because it's checking for the file every time the image is drawn...

There are ways to handle it once for every monster (and saving the info that this monster is not animated), but it's too complicated for now (I don't have time for it right now), so as a quick fix, we'll read it from the configuration...

Basically, all we need to do is changing the isBattlerAnimated function to this:

// Checks if a monster is animated, by checking if there is a 1.png file for it

bool isBattlerAnimated(RPG::Battler *battler) {

if(!battler->isMonster()) return false; // Only monsters are handled, no actors

RPG::Monster *monster = (RPG::Monster *)battler; // Cast the battler to a monster pointer, so that we can access databaseId



// Assemble the key name of the configuration entry, e.g. Monster123Animated

std::stringstream keyName;

keyName << "Monster" << monster->databaseId << "Animated";



// Check if Monster123Animated (for example) is set to 1 in the configuration and return result

return configuration[keyName

.compare("1") == 0;

}




It gave me an error in the second case. I removed the file check function, as noted, and on the

return configuration.compare("1") == 0;

part it gave me the

no match for operator in configuration

. Also, is the "Animated" part at the end necessary, or would

keyName << "Monster" << monster->databaseId;

also work?

I'm gonna try the 11 frame code and see how that works.


author=]My idea is just to check if 1.png exists, and if it doesn't, the monster is not animated.

On this computer I don't have the RPG Maker or DynRPG or Code::Blocks, etc. installed, so I didn't test it yet (so I also didn't post it on the forums), but this should work:

0. Start with the original source code of DHM, not with the modified one with the comparing stuff.

1. At the top, below "#include <sstream>", add this line:

#include <fstream>


This includes the "fstream" (file stream) library, which is needed for "std::ifstream" later.

2. Above the onStartup function, add these functions:

// Checks if a file exists

bool doesFileExist(std::string filename) {

std::ifstream ifile(filename); // Try to open file for reading

return (bool)ifile; // Casted to bool here, so true if ifile != null, i.e. it exists

}



// Checks if a monster is animated, by checking if there is a 1.png file for it

bool isBattlerAnimated(RPG::Battler *battler) {

// Build full path string (e.g. Monster\Slime\1.png)

std::stringstream fileName;

fileName << "Monster\\" << battler->getName() << "\\1.png";

// Check if the file exists and return result

return doesFileExist(fileName.str());

}


The first function checks if a file exists. This is done by opening it for reading (std::ifstream means an input file stream), and if this succeeds, it means that the file exists. The second function checks if a battler is animated, by checking if the corresponding 1.png file exists. I have put this in a function because it's needed two times and I don't want to repeat myself.

3. In both onDrawBattler and onBattlerDrawn, change the line "if(isMonster)" so it looks like this:

if(isMonster && isBattlerAnimated(battler))



This should do the trick.

Best wishes,
Cherry[/quote

Sorry, all of this is scrambled about, thanks to the magic of PMs. But if any of this gives you a better idea on how it's supposed to work, great.
Pages: 1