-
Notifications
You must be signed in to change notification settings - Fork 188
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement the RPG_RT Autobattle algorithm #1586
Comments
Any help with this one? |
Hero AI:
How secondary scores are assigned:
Only valid targets are considered. MP modifier: Above, there is an "MP modifier" mentioned. The MP modifier is the value of 0.25 * (MP Cost / Max MP). The case of 0/0 is handled as 0. Subtracting the MP modifier can never make the score become negative, it will become zero in that case. How primary scores are assigned:
Auto-battle from the battle menu just works as if all characters had the auto-battle option set. Monster AI
*: An action is invalid on a target if the target is dead (unless it's a skill that can revive), if it's a reviving skill and the target is alive, if it's a skill that would heal a status and the target doesn't have this status, or if it's a skill that would increase elemental resistance and the target's resistance for that element is already increased. If a skill has multiple effects, it is invalid if all of them fall into one of the invalidness definitions above. (For example, a skill that heals a status and heals HP would always be valid, even if the status is not inflicted. The HP heal is unconditionally valid regardless of actual HP, since it's not in the list of invalid things above.) |
So this means the AI is not cheating? |
No, it is, because this...
...uses information (an enemy's current HP) which would normally not be available to the player (at least not easily, only if the player knows the enemy's max HP and kept track of the damage dealt). |
When determining how much the effect of the attack would be.. Am I right to assume the autobattle algo ignores random variance? |
Basic attacks don't have variance as far as I know, and for skills, the variance is part of the effect calculation. So, that means that the "prediction" from the AI will become more inaccurate the higher the skill's variance is, because the result of the effect calculation during AI decision-marking and the one during actual execution of the action can be wildly different... (Which is good, otherwise it would be even more cheating. However, I agree that it would sort of make sense to then not apply the variance at all during decision-making.) |
Figure out and implement the RPG_RT auto battle algorithm.
Using it for the
AutoBattle
command is a bit controversial. Using it for an actor withAutoBattle
flag set however is not. If a game dev created an actor with auto battle, the game experience probably demands that actor does more than just attack random enemies. There can also be some smarts from RPG_RT we can reuse event if we don't want to change theAutoBattle
command to use skills.I did some testing and one thing I saw. I had an actor with no skills set on autobattle. He would always attack the first enemy. This is better AI than attacking randomly, as at least he works on killing 1 at a time instead of randomly spreading the damage.
Also I noticed he would attack a different enemy only if his weapon would kill that enemy in a single hit. Adjusting the enemy HP would change which target he chose.
That's all I've got for now.
The text was updated successfully, but these errors were encountered: