Posts: 11,229
Threads: 648
Joined: May 2009
02-28-2021, 11:12 PM
(This post was last modified: 07-02-2021, 06:09 PM by DerVVulfman.)
Enemy Action Sets
Version: 1.2
Introduction
The malevolent lich that you faced just placed a shell of healing upon one of its zombie minions after you sliced through its chest. But now that it is fully healed, the lich cast a spell and the same zombie who was healed is now bathed in the same arcane energies of restoration. Shouldn't the enemies you encounter pay attention to such details? One would think so.
Enemy Action Sets is a system that allows you, the game designer, to give an enemy a completely new and more specific set of combat routines to perform whilst engaged in battle.
So now that evil lich need not waste a healing spell on a minion until absolutely needed, or give an orc the insight to see that one of your heroes is close to death so it can bring forth its mighty mace to finish him off.
Much more is available, and now monsters are not as random as before.
Features- Enemy can now target those with lowest or Highest HP
- Able to use skills on targets with or without already existing status effects
- Can now target specific actors by thier ID
- An edit of RPG Advocate's Pointless Actions Fix
- A built in error checker
Demo
Clck here to enjoy
Box.Com link.
Instructions
There's too much to be posted here. The demo includes the instructions. But be mindful that there is a lot of features to control and options you may be able to craft.
Compatibility
This script actively rewrites the make_action method from Game_Enemy, and rewrites the exclude_pointless_actions method from the classic '05 script by RPG Advocat at his now-gone Phylomortis.Com website.
Other than that, it should be quite compatible with most traditional styled battlesystems.
Credits and Thanks
Obviously RPG Advocate for the basis of the Exclude Pointless Actions fix. And to Melana for discovery of the 'User/Caster' bug.
Terms and Conditions
Free for use, even within commercial games. However, due credit to both RPG Advocate and myself are required.
Up is down, left is right and sideways is straight ahead. - Cord "Circle of Iron", 1978 (written by Bruce Lee and James Coburn... really...)
Above are clickable links
Posts: 5
Threads: 2
Joined: Mar 2021
in 2021 it's good to see a new RMXP demo with the old ghost battler ^,^
after choosing to attack, an error message occurred...
Code: line 361: Name Error - uninitialized constant Game_Enemy::AutomatedActors
hope that helps!
Posts: 449
Threads: 18
Joined: Sep 2015
Yep I got the same error when I tried to cast a fireball.
Beside that this script sound really powerful and amazing.
I'm doing similar stuff with tons of event pages and ingame variables but this might be alot better.^^
Posts: 11,229
Threads: 648
Joined: May 2009
03-02-2021, 09:51 PM
(This post was last modified: 03-02-2021, 09:51 PM by DerVVulfman.)
EEP! I still had that AutomatedActors in there? Any instance of AutomatedActors needs to be replaced EnemyActionSets.
But if you want it PURE....
BUMP
To version 1.1
Now you should have absolutely no problem with this. The incidents were in two methods related to targeting and crisis HP systems.
Up is down, left is right and sideways is straight ahead. - Cord "Circle of Iron", 1978 (written by Bruce Lee and James Coburn... really...)
Above are clickable links
Posts: 449
Threads: 18
Joined: Sep 2015
06-30-2021, 03:48 PM
(This post was last modified: 06-30-2021, 03:53 PM by Mel.)
There might be an configuration error in your given example from the script instructions.
When I copy the header from the configuration site above the EXAMPLE pattern it doesn't really fit.
Code: # Rate Prio Trig Type Skil Targ Stat
# ==== ==== ==== ==== ==== ==== ====
# MY_EXAMPLE = [ [ 5, 0, 0, nil, 0 ], # Random melee attack
# [ 3, 0, 1, nil, 0 ], # Basic Defend
# [ 3, 0, 2, 33, 4, 3 ], # Venom on no-state Actor
# [ 1, 1, 1, 1, 1 ] ] # Priority Heal on Enemy
It seems the trigger ID is missing so it should look like this:
Code: # Rate Prio Trig Type Skil Targ Stat
# ==== ==== ==== ==== ==== ==== ====
MY_EXAMPLE = [ [ 5, 0, 1, 0, nil, 0 ], # Random melee attack
[ 3, 0, 1, 1, nil, 0 ], # Basic Defend
[ 3, 0, 1, 2, 33, 4, 3 ], # Venom on no-state Actor
[ 1, 1, 1, 1, 1, 1 ] ] # Priority Heal on Enemy
Please correct me If I'm wrong here^^
Posts: 11,229
Threads: 648
Joined: May 2009
BRAVO!!!!! You CAUGHT ON!!!
You fully read the instructions and noticed the minor error within the instruction's example. You saw that the Trigger is set to '0', a value that always brings up that there is a Trigger Error warning display. And you noted that the action type needs to be from 0-4, and not nil.
Your analysis is perfect.
Up is down, left is right and sideways is straight ahead. - Cord "Circle of Iron", 1978 (written by Bruce Lee and James Coburn... really...)
Above are clickable links
Posts: 449
Threads: 18
Joined: Sep 2015
07-01-2021, 11:15 AM
(This post was last modified: 07-01-2021, 11:18 AM by Mel.)
Yes I'm reading all of it^^
I'm actually starting to use this system now so I try to understand all of it's features.
It seems there are still a few bugs:
Right now I'm trying to make an enemy which gives itself a buff, but only when the buff state expired.
So the configuration line looks like this.
Code: # Rate Prio Trig Type Skil Targ Stat
# ==== ==== ==== ==== ==== ==== ====
GRAWLOK_PHASE_2 = [[ 10, 0, 1, 2, 1493, 4, 161 ], # Casting Buff
The first thing I noticed is when I set the scope of the skill to "The User" the games crashes with this message:
When I set it to "One Ally" it works, but the enemy should only buff himself, not his minions.
The second thing is the fourth target option where the skill should only be used on targets without a specific state.
My enemy is always using his buffskill even when everyone is already buffed.
You can easily test that issue in the demo. The Basilisk will still use the Venom skill even when all actors are already poisened with it.
Posts: 11,229
Threads: 648
Joined: May 2009
BUMP
To version 1.2
DISCUSSION TIME!!!!
Alas, Melana found a bug indeed. The system that acquires the target by Status Effects recognized three specific scopes: One Enemy, One Ally and One Ally (0HP). It did not account for any others. So when the scope of a skill was set to the User/Caster, it drew no target which caused the issue in question.
This has been fixed, now adding a feature to retrieve the user itself as a target if so defined. But I went further and made the routine exit if the invalid scopes for All Allies and All Enemies were set. The system that acquires the actual target is meant to return merely one and not a variety... thus said scopes would be invalid. It is a preventative measure.
Now, as to the selection of an action...
Actions are selected based upon the 'Rating' of the action, and optionally given a boost by its 'Priority' if the action is based on the target's HP score. If a spell is meant to poison the caster's enemies, the spell is cast as often as the rating dictates. And if the spell is set by this system to target those that have not yet been poisoned, it will exclude those targets when it attempts to perform the skill.
However, the actions are 'nudged' towards the desired goal. Rather than preventing other from being performed, actions that have a higher priority merely have a greater chance of being executed. And while an action may with to target specific individuals based on their hit point or status effect state, the action has already been chosen prior towards the target-selection upgrade.
Before the system performs this 'nudge', the action is already chosen, it is defined and default targets are set. This is to allow enemies not covered by the system to be able to perform. So an action for an enemy like a Poisonous Snake to bite and transmit 'Venom' to a target will already be set before the system takes hold.
If the system nudges the snake to bite targets that have not been poisoned, the snake will go after any other target. But one way or another, it is performing this Venomous Bite as often as its Rating so dictates. And if it has already bitten everyone, it falls back upon the default target it selected prior.
The only thing I can think of doing is to upgrade the Priorities option which currently covers:
0 = No Priorities
1 = Party Crisis
2 = Troop Crisis
Perhaps setting a '3' and '4' priority (Party/Troop State Crisis) could come into play. Very annoying a feature to be sure ... from a coder's point of view. Just as it reads each attack pattern line and checks if an actor/enemy has low HP, it would have to run a separate check to see if an actor/enemy is subject to a change in state. And if said target was subject, then its rating would be increased as it would be for the other priority ratings.
This would not eliminate the Snake from biting a target already poisoned, but it would allow better control.
But this is a theoretical idea right now.
ow you should have absolutely no problem with this. The incidents were in two methods related to targeting and crisis HP systems.
Up is down, left is right and sideways is straight ahead. - Cord "Circle of Iron", 1978 (written by Bruce Lee and James Coburn... really...)
Above are clickable links
Posts: 449
Threads: 18
Joined: Sep 2015
Okay, that makes sense.
I thought the enemy is supposed to ignore the whole command if all targets already received the specific state.
Thank you for clarifying this.
I already made this buffing mechanic via battle-event so it's all fine now.
Posts: 449
Threads: 18
Joined: Sep 2015
I don't know if this is intended but in line 319 of the engine script the command to prevent the enemy from doing nothing, for example when he is out of mana, is commented-out.
Code: # next if exclude_pointless_actions?(action)
|