Announcement
Announcement
| 2nd Quarter Contest Announcement posted! See the Community Announcements section. |
New threads (complete scripts) here will go into a moderation queue. You will not see your thread appear when you create it. A moderator will decide if it will be approved or denied.
![]() ![]() |
Feb 28 2009, 08:44 AM
Post
#1
|
|
![]() Scripter ![]() Type: Coder Alignment: True Neutral |
Enemy AI State v 1.0 by Mithran Introduction This one is a little hard to explain. This script makes the actor mimic the action list of an enemy by adding a state. When the state is inflicted, the character will autobattle using the action list of the enemy specificed by the state. Certain enemy actions can be excluded altogether. Features - force actor into autobattle, using enemy action lists, by using a state How to Use Install on its own script page in the materials section of the script editor above main and below default scripts. Also move below any custom battle systems. Script » Click to show Spoiler - click again to hide... « FAQ q: I want to make my own AI list and give it to an actor. a: For now, you can create a 'dummy enemy' not used in game. Make the state use enemy AI from the dummy enemy. q: I want to mimic the stats and or auto states of the enemy, also. a: Well, you can set something up with my State Parameters PLUS script and Conditional Autostate script. Both are found in my signature. q: How about a full 'rage' system like on 'Gau' from FFVI? a: I dont have time for another full system at the moment. For now, you will have to event this out. Credit and Thanks - Mithran - requested by squareenix Author's Notes Feedback is welcome. Please do not redistribute without asking. I may expand on this at some point. -------------------- My scripts:
Spoiler: Searching for one of my snippets? Mithran's Snippet Repository My current scripting projects: Mithran's Script Development Thread Who says I'm always idle in the IRC? Spoiler: |
|
|
|
Feb 28 2009, 08:48 AM
Post
#2
|
|
![]() Sneaking into the night ![]() Type: Designer |
wow mithran. you've been pumping out a lot of quality scripts recently. Nice job!
-------------------- ![]() Story-90%, Event/scripts-25%, Maps-5%, Other-10% Thanks for the userbar Zabre! ![]() GrandmaDeb's Resource Index GrandmaDeb's Script Index ![]() Thanks Even Angels! You call me arrogant because I speak the truth when I proclaim myself to be superior to you. If it wasn't the truth, then you would be calling me a liar not arrogant. you can only get the clap so many times before it turns into applause |
|
|
|
Feb 28 2009, 09:20 AM
Post
#3
|
|
![]() Type: Undisclosed Alignment: Unaligned |
Very cool, Mithran. Scripter of the Year in 10 months time for sure.
This can be used to customize the Auto Battle AI of actors like if they only join you for a short time. This is probably the closest way to customize the priority of usage for skills used by Auto Battle members aside from events. Got a question: Did you script this normally and it turned out to be compatible with the SBS or was there anything you needed to add for it to work? -------------------- I no longer support Tankentai.
|
|
|
|
Feb 28 2009, 09:37 AM
Post
#4
|
|
![]() Scripter ![]() Type: Coder Alignment: True Neutral |
Very cool, Mithran. Scripter of the Year in 10 months time for sure. This can be used to customize the Auto Battle AI of actors like if they only join you for a short time. This is probably the closest way to customize the priority of usage for skills used by Auto Battle members aside from events. Got a question: Did you script this normally and it turned out to be compatible with the SBS or was there anything you needed to add for it to work? The methods used for determining auto battle are, thankfully, the same in ATB/SBS as they are in the default battler. It was requested to be compatable with SBS and ATB. This probably would have been compatible with SBS had I just made it for the normal battler. I just turned the autobattle flag on if any of the actor's states specified AI input, then directed them to make their action according to the list, which is essentialy the same methods enemies use with very minor changes for certain conditions (party level) and exclusion of certain actions from the list (like escape). The only bug I ran into with this is that actor's stayed in command input mode if hit by one of these states, when they should have been forced into autobattle. All I really had to do here for ATB compatability is to have, on state add, if the actor's enemy AI index changed, to reset the battler's currently charging(atc, I think?) atb action and to subtract 1 from the atb counter (if full) to kill 'input' mode (so actor command window closes and they use the action list instead). After changing that, everything ran smoothly. Oh, and in case you were wondering why I had options to exclude items from the action list, well.. I *might* do something with that at some point. -------------------- My scripts:
Spoiler: Searching for one of my snippets? Mithran's Snippet Repository My current scripting projects: Mithran's Script Development Thread Who says I'm always idle in the IRC? Spoiler: |
|
|
|
Feb 28 2009, 11:04 AM
Post
#5
|
|
|
*O* ~(>_<)~ ![]() Type: Coder |
Is it really compatible with ABS?
This would be definitely a good script. ^^/ Nice work as always, Mithran -------------------- |
|
|
|
Feb 28 2009, 11:07 AM
Post
#6
|
|
![]() Scripter ![]() Type: Coder Alignment: True Neutral |
Is it really compatible with ABS? This would be definitely a good script. ^^/ Nice work as always, Mithran Yep, tested compatable with all three wait modes in the RPG Tankentai Sideview Battle System. Let me know if there are any issues. -------------------- My scripts:
Spoiler: Searching for one of my snippets? Mithran's Snippet Repository My current scripting projects: Mithran's Script Development Thread Who says I'm always idle in the IRC? Spoiler: |
|
|
|
Feb 28 2009, 11:23 AM
Post
#7
|
|
|
*O* ~(>_<)~ ![]() Type: Coder |
Is it worked with PRABS or Requiem?
-------------------- |
|
|
|
Feb 28 2009, 12:08 PM
Post
#8
|
|
![]() Scripter ![]() Type: Coder Alignment: True Neutral |
Is it worked with PRABS or Requiem? Sorry, I meant to say compatable with ATB. As for ABS, uses pretty much the methods to determine action as normal enemy actions do. If ATB has some extra or redefined methods to determine enemy actions, I can update it to use those too for ATB compatability. How about a link? -------------------- My scripts:
Spoiler: Searching for one of my snippets? Mithran's Snippet Repository My current scripting projects: Mithran's Script Development Thread Who says I'm always idle in the IRC? Spoiler: |
|
|
|
Feb 28 2009, 02:02 PM
Post
#9
|
|
|
*O* ~(>_<)~ ![]() Type: Coder |
I think most ABS scripts don't use the same way to determine action.
That's why I'm pretty much surprised when you said it worked with ABS. >_>" Though, still a nice script. ^^ -------------------- |
|
|
|
Feb 28 2009, 04:03 PM
Post
#10
|
|
![]() Type: Undisclosed |
Sorry for the late reply.
Thanks a million! EDIT: For some reason, whenever an actor in this state tries to do a skill that attacks all enemies, he/she attacks themselves instead. Any suggestions? This post has been edited by squareenix: Mar 1 2009, 07:58 AM |
|
|
|
Mar 2 2009, 01:53 AM
Post
#11
|
|
![]() Scripter ![]() Type: Coder Alignment: True Neutral |
Sorry for the late reply. Thanks a million! EDIT: For some reason, whenever an actor in this state tries to do a skill that attacks all enemies, he/she attacks themselves instead. Any suggestions? Im not seeing this problem. I gave a dummy enemy a few 'attack all' spells (sickle weasel, poison breath, blizzard II) and gave their AI state to Ulrika. Tested it in the ATB/SBS demo and it worked just fine. Is it a particular skill you are having a problem with? Is it just the animation? Not sure how reflect works in SBS, but maybe they are reflecting? Perhaps they fell under 'confusion' before the attack executed, which will force them to attack allies over using the AI list (confusion, berzerk take priority). -------------------- My scripts:
Spoiler: Searching for one of my snippets? Mithran's Snippet Repository My current scripting projects: Mithran's Script Development Thread Who says I'm always idle in the IRC? Spoiler: |
|
|
|
May 24 2010, 01:15 PM
Post
#12
|
|
![]() Type: Undisclosed |
Hey Mitrhan, this is one of my favorite scripts. I see no one has posted here for a while, so I hope this isn't a necropost, seeing as you're an active member of the forum.
I'm using this script extensively for my auto battle actors (in my game, you essentially only control the main character), but I've changed it a bit so they only use skills if they have learned them already. On line 161, I changed it to: CODE return super if use_enemy_ai_index > 0 && @skills.include?(skill.id) This allows me to set up more conditions where a skill can be used by an auto battle actor. Before I was just using switches for each and every skill that an actor could learn, but of course that got tedious. It's amazing what a tiny line of code can achieve...(or in some cases, ruin). I'm just posting my results here just in case someone else had similar preferences. There don't seem to be any bugs so far. I'm also using this in conjunction with Yanfly's YEZ Aggro/AI script. Now my autobattle actors are geniuses. Thanks Mithran. |
|
|
|
May 24 2010, 07:57 PM
Post
#13
|
|
![]() Scripter ![]() Type: Coder Alignment: True Neutral |
Yep, that will work. You can also accomplish the same by simply commenting out the entire definition for 'skill_can_use?' here, because the only thing it accomplishes is to allow actors to use skills they wouldn't otherwise have access to. Thanks for pointing that out.
-------------------- My scripts:
Spoiler: Searching for one of my snippets? Mithran's Snippet Repository My current scripting projects: Mithran's Script Development Thread Who says I'm always idle in the IRC? Spoiler: |
|
|
|
May 26 2010, 09:29 AM
Post
#14
|
|
![]() Type: Undisclosed |
Thanks for all your hard work Mithran.
This post has been edited by John Dane: May 26 2010, 09:42 AM |
|
|
|
May 26 2010, 11:00 AM
Post
#15
|
|
![]() ![]() Type: Artist Alignment: Chaotic Neutral |
Did I understand, or with this the actor can completely imitate the enemy actions?
Serious this is the most "Gau" thing xD Awesome script^^ Whould you give me authorization to show it in an brazilian community? Thanks and See ya^^ -------------------- |
|
|
|
Jul 28 2011, 10:56 PM
Post
#16
|
|
![]() Cold Fire ![]() Type: Coder Alignment: Neutral Good |
Hey Mithran found a little fix for someones issue with using skills they don't want. Thought you could put this in or make your own edit.
Spoiler: -------------------- My Scripts and Snippets
Spoiler: |
|
|
|
Sep 14 2012, 01:09 AM
Post
#17
|
|
![]() Type: Undisclosed |
Sorry if this is against the rules (for the necropost), but I have a question about the script. How do I set which enemy is used for the state? I want to pick enemy 001 (only attacks), but I have no idea how to customize it.
|
|
|
|
Sep 14 2012, 07:39 AM
Post
#18
|
|
![]() Scripter ![]() Type: Coder Alignment: True Neutral |
Sorry if this is against the rules (for the necropost), but I have a question about the script. How do I set which enemy is used for the state? I want to pick enemy 001 (only attacks), but I have no idea how to customize it. This script operates off note tags. All you need to do is put the appropriate text in the note box of a state, and whoever is inflicted with that state will use the specified enemy AI. The note tag is: CODE <enemy ai n> Where n is the id of the enemy. So in order to have the state make the character use enemy 1's AI: CODE <enemy ai 1> When the state is inflicted upon an actor, they will use the AI of the enemy ID 1. However, no script is needed if all you want to do is have the actor uncontrollably attack enemies with normal attack, all you need to do is have a state with the restriction field set to "always attack enemies". This script is intended to instead have actors autobattle with a certain skillset they wouldn't otherwise have access to. -------------------- My scripts:
Spoiler: Searching for one of my snippets? Mithran's Snippet Repository My current scripting projects: Mithran's Script Development Thread Who says I'm always idle in the IRC? Spoiler: |
|
|
|
![]() ![]() |
| Lo-Fi Version | Time is now: 21st May 2013 - 05:18 AM |
|
|