[RM2K3] DynRPG AnimationInBattle

Trying to access the members in this class results in an Access violation at 66D110A3 and offset 00000018 of type read. Am I doing something wrong here:

RPG::AnimationInBattle *currentAnim
if(currentAnim->currentAnimationId == specialAnimId)
    getSpecialAction(); //This is not the issue. I have tried omitting this.

I can't find any information on this class aside from this:

[RM2K3] Does DynRPG support map manipulation?

Is it possible to change a specific tile on the map with DynRPG? To calrify, I do not want to change multiple tile types, but a single one. Ideally I would like to be able to create a plugin that allows the user to dynamically change the maps via switches and variables, so that makers don't have to make multiple maps with slight differences when they want an area changed on their map.

[RM2K3] C++ Data Structures

Is there an easy way to update the size of a Vector? I am using a vector to store condition IDs of the actor, but when I erase an element and resize the vector, each time the condition is removed or expired, that vector's size does not update and I get an incorrect value for the number of elements in the vector.

std::vector<int> conditions;
int conditionId;
bool removeCondition;
if(removeCondition == true)
removeCondition = false;
int oldSize = conditions.size();
int i = std::distance(conditions, std::find(conditions, conditions + conditions.size(), conditionId));
conditions.erase (i);
int newSize = conditions.size(); //Why does this still equal the old size?

Should I just be using a different structure to track conditions? If so, what would be a better method?

[RM2K3] DynRPG RPG::Skill::conditionFlag Help!

I am trying to change the condition flag of a skill when a battler "first try" their action during the onDoBattlerAction callback, but it does not do anything. I checked and the skill does get changed, but the affect of changing inflict to remove does not reflect in battle. Is this not possible to do? Changing any of the other RPG::Skill variables during the onDoBattleAction callback will work as intended, but the conditionFlag switch does not appear to have any affect in battle, despite actually being changed.

I would post my code, but it isn't as simple as a few lines in one location, so it would be confusing to post a bunch of snippets of code. I have tried a simpler code to make sure it isn't my coding. Even this won't work:

bool onDoBattlerAction(RPG::Battler* battler, bool firstTry)
    if(firstTry == true))
        RPG::skills[1]->conditionFlag = false;

Again the conditionFlag is accurately changed, but it does not reflect in battle.

[RM2K3] Decreasing attributes

When I try to create a skill that reduces an attribute and deals no damage or other effect, the skill always misses in battle. The attribute that it reduces is a magic type attribute and the influence bars are set to 0. If I add damage to the skill,it will work, but it still won't reduce the attribute ever, but it will still deal damage. I have tried changing the skill settings and nothing I do seems to work. I have tried it on a fresh game, but I still cannot get the skill to reduce the attribute, does anyone know what is wrong?

Something to note is that the monster has a C resistance to the attribute that the skill is trying to reduce and it has not had its attribute resistance increased or decreased prior to the skill being used on it.

[RM2K3] Need help with creating plugin.

I'm currently working on a custom battle system via plugin. I've managed to turn it into a turn based one, but now I'm working on the window management. I have the gauge view style for combat and when it is a character's turn the cursor pops up over their head. I'm trying to get rid of that and directly enter the battle command menu. If I understand right then this should force the window selection when a character is idle?

bool onDoBattlerAction(RPG::Battler* battler, bool firstTry) {
if (battler->actionStatus == RPG::AS_IDLE) {
RPG::battleData->winCommand->choiceActive = true;
RPG::battleData->winCommand->x = 0;
RPG::battleData->winCommand->y = 64;

This doesn't seem to do anything. I'm not sure what controls the stage of the battle. There doesn't seem to be a way to call winCommand, only able create a new window. I'm guessing I want to utilize this, RPG::BattleData::battleProgress? Not sure how to though.

Edit: Can someone explain how Window objects work too. I keep getting "expected primary-expression before '('" and "expected primary-expression before 'int, int, int, int, bool'" when I compile my plugin.

Edit2: I am able to declare window objects, but I am still confused on how to call the declared objects for "RPG::Window:create(int width, int height, int x, int y, bool startHidden)". Using "Menu.RPG::Window:create(int width, int height, int x, int y, bool startHidden)" creates a compiling error asking for declaration of the 4 int and bool objects. When I try to define the objects I get the error that the objects aren't declared.

[RM2K3] Conditional branch ignored during certain animations

Event Pg1 Hero(1) has taken 1x turns
Switch Operation 001:Check Events ON
Branch if Hero(1) Spell Used
Switch Operation 002:Spell ON

Event Pg2 Switch 002:Spell is ON
Switch Operation 001:Check Events OFF
Branch if Switch 002:Spell is ON
Call Common Event Spell

Common Event "Spell"
Change Hero1 Intelligence...

This basically sums up what goes on during my battle events. The problem is on Event Pg2. When checking if 002:Spell is ON during certain battle animations, the branch is ignored. I check with F9 to see the switch is ON and I added a message outside the branch of that event to play to make sure it was triggering, and it was. I then tried a different spell and the events played out as intended.

I started experimenting to see what was going on and noticed it was the battle animation. I first noticed this by changing the battle animation associated with the spell that caused the issue, and it worked. I then tried using a spell that had no issues, but with the same battle animation as the bugged spell and noticed it broke my event again. After experimenting some more, I found that the battle animation ID, in the database, is also bugged. I cleared the bugged animation in the database and tried making a new animation with a different battle graphics set, but it broke my event when using any spells associated with that animation.

Does anyone know what is going on here? I am guessing it is a plugin issue or DynRPG bug.

The mechanics of a turn based system...

I'm currently making a plugin to change the default battle system into a turn based system where each actor(hero/monster) can only input one action until every other actor has had an action. They will take their actions in the order of their agility, if equal then priority is given to the player's actor.

What I need help with is how to implement such a system. So far I have the plugin get the agility values of every actor, then the plugin sets the ATB of the actor with the highest agility to 300,000 (full bar) and every other actor to 0 (no bar). My problem arises after said actor takes an action. I'm not sure how to keep track of the actors who have taken their "turn" and those who haven't. I'm guessing I need to use a boolean array of some kind, but I'm not sure how to implement it.

Also, If anyone knows any websites that teaches the coding of game mechanics please post links, preferably in C++.

[RM2K3] DynRPG Compiling Error

I wanted to start making plugins for DynRPG, but I can't seem to compile an altered plugin that I messed around with. I keep getting these errors, no idea how to resolve them. I have the DynRPG lib linked. I'm sure of this because I got a host of different errors when I didn't have it linked.

Build Log;
obj\Release\main.o:main.cpp:(.text+0x1a2): undefined reference to `RPG::DStringPtr::DStringPtr(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)'
obj\Release\main.o:main.cpp:(.text+0x1f1): undefined reference to `RPG::DStringPtr::~DStringPtr()'
obj\Release\main.o:main.cpp:(.text+0x308): undefined reference to `RPG::DStringPtr::DStringPtr(RPG::DStringPtr&)'
obj\Release\main.o:main.cpp:(.text+0x34a): undefined reference to `RPG::DStringPtr::DStringPtr(RPG::DStringPtr&)'
obj\Release\main.o:main.cpp:(.text+0x5e8): undefined reference to `RPG::DStringPtr::s_str()'
obj\Release\main.o:main.cpp:(.text+0x67a): undefined reference to `RPG::DStringPtr::operator=(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)'
obj\Release\main.o:main.cpp:(.text+0xc96): undefined reference to `RPG::DStringPtr::DStringPtr(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)'
obj\Release\main.o:main.cpp:(.text+0xcf2): undefined reference to `RPG::DStringPtr::~DStringPtr()'
obj\Release\main.o:main.cpp:(.text+0xdec): undefined reference to `RPG::DStringPtr::DStringPtr(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)'
obj\Release\main.o:main.cpp:(.text+0xe42): undefined reference to `RPG::DStringPtr::~DStringPtr()'
obj\Release\main.o:main.cpp:(.text+0x1c8b): undefined reference to `RPG::Actor::partyMember(int)'
obj\Release\main.o:main.cpp:(.text+0x1c9f): undefined reference to `RPG::Actor::partyMember(int)'
obj\Release\main.o:main.cpp:(.text+0x1cdc): undefined reference to `RPG::Actor::partyMember(int)'
obj\Release\main.o:main.cpp:(.text+0x1d69): undefined reference to `RPG::Actor::partyMember(int)'
obj\Release\main.o:main.cpp:(.text+0x1dc3): undefined reference to `RPG::Actor::partyMember(int)'
obj\Release\main.o:main.cpp:(.text+0x1dd6): more undefined references to `RPG::Actor::partyMember(int)' follow
obj\Release\main.o:main.cpp:(.text+0x1fae): undefined reference to `RPG::Battler::getAgility()'
obj\Release\main.o:main.cpp:(.text+0x2099): undefined reference to `RPG::Battler::getAgility()'
obj\Release\main.o:main.cpp:(.text+0x22b2): undefined reference to `RPG::Actor::partyMember(int)'
obj\Release\main.o:main.cpp:(.text+0x22be): undefined reference to `RPG::Actor::partyMember(int)'
obj\Release\main.o:main.cpp:(.text+0x245c): undefined reference to `RPG::Actor::partyMember(int)'
obj\Release\main.o:main.cpp:(.text+0x248d): undefined reference to `RPG::Actor::partyMember(int)'
obj\Release\main.o:main.cpp:(.text+0x2528): undefined reference to `RPG::Actor::partyMember(int)'
obj\Release\main.o:main.cpp:(.text+0x268d): more undefined references to `RPG::Actor::partyMember(int)' follow
obj\Release\main.o:main.cpp:(.text+0x2e3a): undefined reference to `RPG::loadConfiguration(char*, char*)'

[RM2K3] Converting Screen Coordinates to Map Coordinates

I am using a mouse for my game and when you go to cast a spell the tile under the mouse is lit up to indicate where you will cast the spell, but I am having trouble finding it.

I set x,y variables to the screeen coordinates of an event on the upper left tile(0,0) on the map to get an offset and I then multiply it by -1 to get positive coordinates. I then add the mouse's x,y screen coordinates to the x,y variables. Afterwards I divide by 16 and take the terrain id of the x,y variables. This partially works, but for some reason when the mouse isn't in the center of the tile I get the wrong tile coordinates.

Anyone have any ideas how I could get accurate tile coordinates with mouse screen relative coordinates?

FIXED: I did my math wrong, I wasn't suppose to multiply by -1 and I had to adjust the variables some.