CORTI'S PROFILE

Search

Filter

+++ DynRPG - The RM2k3 Plugin SDK +++

I found the cause of that. It's simple but i didnt see it. I literally didn't see it, because the standard skill menu is hidden and i'm drawing my own.

The cursors can go back to the top whenever the skill menu is not able to scroll the visible part of the list. The standard skill menu allows 4 rows (RPG::Window->rowsPerPage). I'm using a hack that makes it one column instead of two, so for anyone without hacks, the breakpoint would be 8 skills.

Since my skill menu is invisible anyway, i increased the RPG::Window->rowsPerPage, so it works with more skills now. Yay!

+++ DynRPG - The RM2k3 Plugin SDK +++

Hey pepsi, are you still in contact with bugmenot?

I got a new mystery. The skill skill selection window in battle changes it behaviour when it contains more than 4 skills. With 4 or less skills, using the "down"-key when the cursor is at the last entry, moves the curor up to the first entry.

With more than 4 skills, it does not.

+++ DynRPG - The RM2k3 Plugin SDK +++

Scroll up, read my post. ;-)

+++ DynRPG - The RM2k3 Plugin SDK +++

Stats can be increased to 200% and down to 50% of the original monster stat. Battlers do have the "attackDiff" values etc. The methods like getAttack() give the full value. Base value and difference.

My custom condition system uses that for heros and bugmenots monsterscaling plugin for monster conditions, but attackDiff and the other work for monsters too.

author=bulma
The issue with spells that increase/reduce resistance is that they do so for the whole battle, and they do so regardless of condition resistance. Therefore, they are useless because one spell can lower the resistance of ANY monster.

Attribute works. If your spell has "hp" and "atk" checked and it deals 50 damage, it aslo reduces atk by 50. If the attribute changesthe damage, it should also changes the atk reduction.

+++ DynRPG - The RM2k3 Plugin SDK +++

author=AubreyTheBard
Instead of trying to manually call or simulate the target selection system, I'm going to make a plugin that records to variables the results of the various window choices in battle. That way we can just create regular skills that do nothing in the default combat system, and use the skill choice, targeting data, etc. from that in custom systems. Or even just add extra effects to skills that do make use of the default combat system. It won't allow for really intricate stuff like choosing multiple targets for a single skill, but it's better than nothing and I think it'll be sufficient for my own project's purposes.


Try Battler->Action. It contains all you need. You don't need the windows and it's choices, you get the the executed action, the skill-ID, the item ID and the target and target type from the RPG::Action of the battler.

onDoBattlerAction (RPG::Battler *battler, bool firstTry)
onBattlerActionDone (RPG::Battler *battler, bool success)

The callback parameters are slighly misleading. Both are called multiple times. The firstTry parameter is bugged. The success parameter is set on the last call of onBattlerActionDone, it's the right point to remember a battler action.

If you want to override a command, onDoBattlerAction is the place to do it. You should create you own "firstTry"-mechanic. Use a bool that is set on the first call of onDoBattlerAction, so you know the following calls are just duplicates. Reset that bool on onBattlerActionDone when success is true.

You can execute code after actions are done by setting a switch that activates the event page.
There are conditions, where that does not work, the event page just won't execute. For example when the actor is using defend, an item or a skill that changes conditions on the caster ( and some othe weird conditions ). In that case, you can force the event page to execute, by calling RPG::updateBattleEvents. That function is documented as "experimental" for a reason. Calling it outside of onDoBattlerAction/Done-Callbacks can cause strange errors. Don't call it onFrame or any other drawing methods. Calling it when the event page would have been called anyway do the same. So this code:

    

if(battler->action->kind == RPG::AK_BASIC)
{
if(battler->action->basicActionId == RPG::BA_DEFEND)
{
RPG::updateBattleEvents(RPG::BEUM_SWITCH_ACTIVATED , battler);
}
}
else if(battler->action->kind == RPG::AK_ITEM)
{
RPG::updateBattleEvents(RPG::BEUM_SWITCH_ACTIVATED , battler);
}

This can be used to execute the switched event page only exactly when things are done, that don't trigger the event page anyway. I know it's complicated. However, the ATB can interfere and delay the execution in the next battler has chosen but not done his next action.

author=AubreyTheBard
I have a debug popup in onBattlerActionDone (also tried onDoBattlerAction) that shows the currentChoice values of all the windows in battleData, and they're a little inconsistent. I get 0s where I should get something else. More importantly, winMonTarget->currentChoice always seems to be 0, which is the most important thing for making this useful.

winMonTarget->currentChoice does not show you if the window is active. try window->getSelected(). If it returns -1, the window is inactive. onAction is a the wrong callback to output this kind of data, since actions should not happen when the windows is used. Monsters in atb_active mode could trigger it, but that shit is crappy as hell anyway.

Some code example:
I'm using this to draw numbers on screen. It's ugly and damn useful.
http://share.cherrytree.at/showfile-24668/showdebugnumbers.zip

author=AubreyTheBard
Sometimes they work exactly as you'd expect, other times (especially when using actors with higher ID numbers)

The value in currentChoice is the party index, not the database ID It can be 0 to 3.

author=AubreyTheBard
What is surprising is that the onBattlerActionDone function started reporting values accurately, including that of winMonTarget. Heisenbug? Maybe, but it kept reporting accurately even when I commented out the onFrame function.

No heisenbug. Just 2k3's strange programming. The windows itself don't tell you the state of the battle system, you need to take all windows into consideration. In gauge mode, the partySelectionwhataver window is used to select heros when targeting skills even if its not shown while the skill window is open in the background while shown ( traditional afair ) or not ( gauge ). At the same time when selecting skills, you skill window is shown but in the party selection window, the current hero is selected.

If you want to override those menus, you need to take more than one windows' data into consideration.
If you want to track action, just use onBattlerActionDone.

~have a nice day~

+++ DynRPG - The RM2k3 Plugin SDK +++

Hey Ghostrider!
author=GhostRider
i could benefit something that "fix" the resolution of battle event making so that whenever a switch is activated, that page resolves before everything else

Getting that to work was the greatest challenge i had to overcome while working with the 2k3 and DynRPG. Seeing that another human being recognizes the importance of a proper event execution order makes me feel a lot less lonely on this big blue planet. #Drama

The effect of event pages with a switch requirement not being executed is a bug.
  • Melee Attack - Happens

  • Item - Does not happen

  • Defend - Does not happen

  • Skill - Happens, but does not if the skill applies conditions on the caster. There might be other cases, that i don't know yet.


The execution of event pages is also dependent on the ATB system. If another battler gets to act instantly after a turn, that event page will get delayed until there is time.

This is how i solve it:
I don't have any "X uses Command" pages. I only got one "Switch is ON"-Page, and the switch is set on by DynRPG whenever a battler acts. The bug mentioned can be partially supressed.

// Called by: onBattlerActionDone() with success flag when not a monster
void Check(RPG::Battler *battler)
{
if(battler->action->kind == RPG::AK_BASIC)
{
if(battler->action->basicActionId == RPG::BA_DEFEND)
{
RPG::updateBattleEvents(RPG::BEUM_SWITCH_ACTIVATED , battler);
}
}
else if(battler->action->kind == RPG::AK_ITEM)
{
RPG::updateBattleEvents(RPG::BEUM_SWITCH_ACTIVATED , battler);
}
}

This would not fix all problems, it does not address the problem of self targeting conditions. I'm using a custom condition system, so i didn't do a lot of research into it and i don't know the criteria of a skill that requires the fix. updateBattleEvents works in this case. In other cases where the events happen anyways and outside of the onBattlerActionDone callback, especially in onDraw-Callbacks, i've seen this not do things reliably and do strange stuff.

How to track what happened:
My plugin not only activates the switch when some battler acts, it also remembers his action.
So when the event page executes, i can request that data and know exactly what happened. Which acion/skill is used, who attacked and who was attacked by it, which allows all kinds of custom battle effects.

Getting the time right:
I'm done with the 2k3 ATB. No matter how well the speed-controlling plugin is, ATB stays annoying and creates bugs. Thats why i deactivated ATB completely. My plugin calculates the order of actions and filling the ATB is just cosmetic. With standard ATB even with plugins, you will keep some of the bugs.
I haven't found the time to make this releasable yet. Do you want to serve as a guinea pig for it?






+++ DynRPG - The RM2k3 Plugin SDK +++

@FlyingJester:
Your post reminded me, that code needs to be in code tags, or else, content within square brackets like
[i]

does not show.

However, starting the for-loop with i=0 is not right. RPG::commonEvents is a RPG::NamedCatalogPtr<RPG::CommonEvent *> and those NamedCatalogPtr-Types, that are used to access arrays in the database are not using zero-based indices.

+++ DynRPG - The RM2k3 Plugin SDK +++

This works for me.


int eventsCount = RPG::commonEvents.count();
for(int i = 1; i <= eventsCount; i++ )
{
RPG::CommonEvent *comEv = RPG::commonEvents[i];
}

The first index is 1, not zero.

+++ DynRPG - The RM2k3 Plugin SDK +++

Question for bugmenot and/or pepsiotaku:
The WindowMenuSkill class has a field called, which contains a filtered version of a heros learnedSkills data. ( DList< int > * skillSubsets )
The WindowMenuEquip class works similar, it shows all items of one type, so there has to be a filtered version of the inventory data, probably a DList< int > * as well. Does that exist? Where can i find it?

author=Giznads
Anyone have the quickpatch command to remove the MP cost from skill menu in battle?
// Here's the dynrpg version. I don't have a quickpatch for that.
RPG::Window *winMP = (RPG::Window*)( reinterpret_cast<int *> (RPG::battleData->winSkill) );
winMP->x = 320;

Edit:
Not needed anymore. The given data in WindowMenuEquip is enough to manually extract a matching filtered list from the inventory.

+++ DynRPG - The RM2k3 Plugin SDK +++

I don't know of any plugin that can change menu options. I also don't know how that could be done since DynRPG does not give access to that settings yet, as far as i know.

The battle commands can be changed in DynRPG.