Enemy Action Sets
#1
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...)

[Image: QrnbKlx.jpg]
[Image: sGz1ErF.png]    [Image: liM4ikn.png]    [Image: fdzKgZA.png]    [Image: sj0H81z.png]
[Image: QL7oRau.png]    [Image: uSqjY09.png]    [Image: GAA3qE9.png]    [Image: 2Hmnx1G.png]    [Image: BwtNdKw.png%5B]
  Above are clickable links
Reply }
#2
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!
Reply }
#3
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.^^
Reply }
#4
EEP!  Shocked 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...)

[Image: QrnbKlx.jpg]
[Image: sGz1ErF.png]    [Image: liM4ikn.png]    [Image: fdzKgZA.png]    [Image: sj0H81z.png]
[Image: QL7oRau.png]    [Image: uSqjY09.png]    [Image: GAA3qE9.png]    [Image: 2Hmnx1G.png]    [Image: BwtNdKw.png%5B]
  Above are clickable links
Reply }
#5
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^^
Reply }
#6
BRAVO!!!!! Very cheery 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. Blushing + Cheery
Up is down, left is right and sideways is straight ahead. - Cord "Circle of Iron", 1978 (written by Bruce Lee and James Coburn... really...)

[Image: QrnbKlx.jpg]
[Image: sGz1ErF.png]    [Image: liM4ikn.png]    [Image: fdzKgZA.png]    [Image: sj0H81z.png]
[Image: QL7oRau.png]    [Image: uSqjY09.png]    [Image: GAA3qE9.png]    [Image: 2Hmnx1G.png]    [Image: BwtNdKw.png%5B]
  Above are clickable links
Reply }
#7
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:

[Image: rtwuYek.png]

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.
Reply }
#8
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...)

[Image: QrnbKlx.jpg]
[Image: sGz1ErF.png]    [Image: liM4ikn.png]    [Image: fdzKgZA.png]    [Image: sj0H81z.png]
[Image: QL7oRau.png]    [Image: uSqjY09.png]    [Image: GAA3qE9.png]    [Image: 2Hmnx1G.png]    [Image: BwtNdKw.png%5B]
  Above are clickable links
Reply }
#9
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.
Reply }
#10
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)
Reply }


Possibly Related Threads…
Thread Author Replies Views Last Post
   Angie's Equipment Sets DerVVulfman 3 9,483 08-04-2024, 01:44 AM
Last Post: DerVVulfman
   VARIABLE ENEMY HP & SP DerVVulfman 0 836 06-14-2024, 07:18 PM
Last Post: DerVVulfman
   Saumon's Enemy Reveals DerVVulfman 0 848 03-12-2024, 08:40 PM
Last Post: DerVVulfman
   Enemy Challenge for Experience DerVVulfman 0 3,224 11-25-2019, 12:30 AM
Last Post: DerVVulfman
   Leveled Enemy Lists DerVVulfman 0 3,417 09-13-2019, 04:06 AM
Last Post: DerVVulfman
   Enemy Melee Status Attacks DerVVulfman 3 8,811 10-15-2015, 07:22 PM
Last Post: Steel Beast 6Beets
   DerVV's Quickie Enemy Info Chance DerVVulfman 0 5,259 06-28-2015, 11:48 PM
Last Post: DerVVulfman
   [XP][XAS] XAS Enemy Kill Counter Narzew 0 5,005 03-28-2015, 05:44 PM
Last Post: Narzew
   Lycan Enemy Bars / MGC Mode7 Edit Patch DerVVulfman 0 5,786 06-12-2014, 04:05 AM
Last Post: DerVVulfman
   Lycan Oversized Enemy Targeting DerVVulfman 0 5,019 06-05-2014, 03:42 AM
Last Post: DerVVulfman



Users browsing this thread: 2 Guest(s)