PEPSIOTAKU'S DYNRPG PLUGIN EMPORIUM!

Posts

Pepsi, can you make a Minus only one? The plus part is glitching for me (that 768 thing). I'd remove it myself, but I kinda have a headache right now (God, thanks Xenomic, arguing with me half the night) even if I did fully understand the code.



Actually....now that I think about it, would it be possible to show increases/decreases to stats when they're used? I don't know if that's doable or not, but it could be useful.
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);
bulma: Does that come up all the time? Is it constant, or does it just do that once? Try unloading all plugins except the MP display, and see if that bug still occurs. I'm wondering if there's some weird kind of interaction going on. It shouldn't do anything like that.

Also, why would you only want to display MP subtracting?

Cherry: That's a great point. Since it's all variable/switch controlled though, I could always have it check the state of those variables/switches on Load too instead of having to save plugin data. I'll update it when I have time.

Xenomic: Yeah, that should be possible. I think you just have to use getDefense, getIntelligence, getAgility, and check for changes. This is exactly what I do with my mp display plugin. I could add that after the existing bugs have been worked out.

http://rpg-maker.cherrytree.at/dynrpg/class_r_p_g_1_1_battler.html#a3193319dbea14e93df45b4bae535102a



So apparently I'm having the same issue that Bulma is having...I...I don't know what's going on. This seems to happen regardless of what Sakuya here does from what a tester of mine says (and you can't even see the HP damage now because of this). Note, I did not touch any of the defaults when putting it in so...it's doing SOMETHING...


EDIT - For reference, I am using the David/Goliath patch, have version 1.08 of DynRPG/2K9, and also using your Game Clock and Provoke Skill plugins.
hey, sorry to bother with this stuff again but...
well, first thing, i quote xenomic's idea to have also a atk/def/intellect/speed change display system similar to the mp display (maybe all in one plugin since in the config menu we can enable/disable some things we may not want), secondly i was wondering if there is a way to prevent MP loss for popping up when the battler (whether it's a character or a monster) is consuming MP to cast a spelli, and only have it display when we heal mp or are taken away by an enemy spell?

also, i just had another idea for what would be a cool battle plugin, and that is to make skills that consume the caster's HP when they're used (like Risk Arts in Vagrant Story, if anyone is old enought to remember it lol).
The image doesn't show because it requires registration at www.shrinemaiden.org...
I apologize for that. It should now be up...I didn't realize that it was on the forums itself. Thought it'd be in Photobucket. >_>;;

But yes, I think it's using a variable somewhere no? Or something...unlike Bulma who was having 778 MP or whatever restored all the time, I'm having 9984 MP restored all the time (well, my tester was. I should've waited before putting this into the game and releasing an update patch but oh well~ ^^; ).
author=PepsiOtaku
bulma: Does that come up all the time? Is it constant, or does it just do that once? Try unloading all plugins except the MP display, and see if that bug still occurs. I'm wondering if there's some weird kind of interaction going on. It shouldn't do anything like that.

Also, why would you only want to display MP subtracting?

Cherry: That's a great point. Since it's all variable/switch controlled though, I could always have it check the state of those variables/switches on Load too instead of having to save plugin data. I'll update it when I have time.

Xenomic: Yeah, that should be possible. I think you just have to use getDefense, getIntelligence, getAgility, and check for changes. This is exactly what I do with my mp display plugin. I could add that after the existing bugs have been worked out.

http://rpg-maker.cherrytree.at/dynrpg/class_r_p_g_1_1_battler.html#a3193319dbea14e93df45b4bae535102a

I want to represent that magic is being used up, or drained. I don't particularly care about MP restore items showing it, and MP regen is the only thing that heals it, but I have alot of things that remove MP (mp absorb, mp attacks, Rain, Yomi (which totally wipes it out until healed), and there are two monsters that die at zero mp).

I tried it my tutorial with only faster_atb, condition_icons, and battle_id, and it doesn't show up. It appears to be related to my turn system, though as my other partial game with turn system gives 512 for the number just for one character. Oracle of Tao has 768 for heroes and monsters. I suspect these are switches or variables, and are related to the turn system.

I'm gonna try it without/with my turn system. Not the turn system, it's one of my plugins.

Tutorial has faster_atb, condition_icons, and battle_id (it's not causing it, so these can be ruled out). Partial game has animated monsters (Cherry customized it to run with... holdon I don't need animated monsters for the partial game, it's not gonna have battles, I'll test without), date/time (tested without), dynptr , kazstring, keyboard mouse, pathfinder, save detector, system menu, besides it. Oracle of Tao has the above two sets, plus game_clock. (ruled out because it already exists on partial without it)

I seriously just ruled out everything via removal. I have no idea.
Huh...I wonder what it is for me then since I'm using the default battle system. What exactly did you use for the coding Pepsi? It has to be using some kind of variable to be checking this, no???
I think I found out what was causing that bug. I had a couple arrays defined as unsigned char (which only supposed values up to 255), so i think because it was trying to store MP higher than that, it produced that bug. I changed those arrays to unsigned short ints instead (which supports up to 65535).

I also added the ability to toggle MP adding. Just add ShowMpPlus=true to your ini

http://rpgmaker.net/users/PepsiOtaku/locker/battle_mp_display.rar

Cherry: Speaking of which, what is the best way to add boolean ini settings? I wrote this function that I'm not sure is working correctly, because if you set MonMpPlus=true & MonMpMinus=false, the monster's MP won't show at all. All other true/false scenarios (4 settings total) seem to work.


bool getConfigBool(std::string str) {
bool y = true;
std::string boolFalse = "false";
if(str == boolFalse.c_str()) {y = false;}
return y;
}

bool onStartup (char *pluginName) {
configuration = RPG::loadConfiguration(pluginName);
confShowMpPlus = getConfigBool(configuration["ShowMpPlus"].c_str());
}

Is there a better way?
Yay, that did it! No constant number stuff, and I just used a mp drain attack. Sometimes it worked



and sometimes it instead wasted 5 mana without having an effect.
author=Xenomic
So apparently I'm having the same issue that Bulma is having...I...I don't know what's going on. This seems to happen regardless of what Sakuya here does from what a tester of mine says (and you can't even see the HP damage now because of this). Note, I did not touch any of the defaults when putting it in so...it's doing SOMETHING...


EDIT - For reference, I am using the David/Goliath patch, have version 1.08 of DynRPG/2K9, and also using your Game Clock and Provoke Skill plugins.

Me too (btw, Pepsi fixed this on the latest update).

Gah, dbl post. I saw my post, and later saw Xenomic's post and figured more people had posted.
Yeah, I already know. Got it and it works like a charm, though funny when I tested it myself, the number constantly popped up and would never go away originally lol.
@PepsiOtaku: First, why are you using .c_str() all the time, even when you pass an std::string to your function which expects an std::string parameter? You are converting it to a char* and then implicitly back to std::string (thus creating a new temporary string object), I don't see the point.

Anyway, I'd do it like this:

confShowMpPlus = configuration["ShowMpPlus"] == "true";

This considers "true" as true and everything else as false. The other way round (only "false" as false and everything else as true, which would be counter-intuitive for me, though) would work like that:
confShowMpPlus = configuration["ShowMpPlus"] != "false";


Personally, I'd use "1" instead of "true" (so you put 0 or 1 in the INI) because that's more common at INI files... but that's a matter of taste.
Aaah, that definitely makes sense. A lot easier than what I was trying to do! I forgot you could use "==" to determine true/false in a simple expression like that (outside of if statements). Here's the update:

http://rpgmaker.net/users/PepsiOtaku/locker/battle_mp_display.rar
(No real difference in game, just more efficient)

I updated the battle layout changer to fix that oversight that Cherry brought up in another post. The plugin now keeps track of the default settings stored in the database and compares those values with the variable/switch values stored in the save file and loads the settings accordingly. This makes for seamless changing of battle layout settings between save files!

http://rpgmaker.net/users/PepsiOtaku/locker/battle_layout_changer.rar
that's great news, still think it's funny that mp loss pops out when i'm spending them to cast a spell, but then again it's better than not showing up at, so i really thank you for the plugin. Are you planning on implementing atk/def/int/speed changes display in the future (just asking)?

Also i have some other suggestions for some plugins that would make the battle system more intriguing:

1) Spells that cost HP (i know i already said that, just bringing this up lol)
2) Spells that repeat themselves multiple times
3) Spells that activate switches on battle (yea i know you can already create switch spells, but the problem is they don't fit in any of the customizable skillsets that you can create in the command editor, in battle they only appear in the normal "Skills" command that contains all the skill that character possesses).

and that's it for now, i don't really need those right now so it's not really a request, just a suggestion if you're bored and want to try something lol
#3 can be done natively with a really dodgy MP recording method, but...I've already detailed why it's ultimately not a very efficient and very irritating thing to go through with in another topic. I've currently placed my project on pause waiting for a solution even. 8V
author=GhostRider
that's great news, still think it's funny that mp loss pops out when i'm spending them to cast a spell, but then again it's better than not showing up at, so i really thank you for the plugin. Are you planning on implementing atk/def/int/speed changes display in the future (just asking)?

When I have time. I've been working on these every chance I get since starting this thread. I want to clean up the code in my gameplay clock plugin first before anything new though. More plugins = more code I will have to maintain.

I think the issue with doing atk/def/int/speed is how to differentiate between all the colors of text. Including HP & MP, you're talking about 12 total colors that the player will have to recognize as "okay, this is a defense increase" or "this is a defense decrease." I'm worried it might be overkill. With that said, I could probably do it, but it's not a big priority for me at the moment.

1) Spells that cost HP (i know i already said that, just bringing this up lol)

This should be pretty easy. I gotta figure out the best method for doing this though. Probably a skill with a 0MP cost, with a note in the description about the HP cost, and then the plugin does the legwork from there.

2) Spells that repeat themselves multiple times

The main issue with this is forcing an action out of turn. As I mentioned in previous post, this is considered "experimental" by the SDK, so it probably produces unpredictable results.

3) Spells that activate switches on battle (yea i know you can already create switch spells, but the problem is they don't fit in any of the customizable skillsets that you can create in the command editor, in battle they only appear in the normal "Skills" command that contains all the skill that character possesses).

Well you can group skills in categories. Go into the database, Battle Layout and click the "Set" on the top right. You'll get a database of skill categories, and the archetypes you set them to. Set the archetype to "Skill Subset" Then you can go into your skills tab and those subsets can be selected in the "Type". You're right though. You can't generally turn on a switch when those spells are activated. You can do this for an individual enemy when you setup their skills, but the in-battle timing for the Switch ON state can be kind of inconsistent.

I wonder if making it plugin controlled would make a difference. It might be workaround needed in order to force an action. I'll experiment with it at some point.
About stats: What about popping up "+23 DEF", "-4 ATK", etc. as text? The down side is that there is no color option for text, you can only use color 0.