Submit Your Article


 
RPG Maker

Welcome Guest ( Log In | Register )


  Games Resources RPG Maker VX RPG Maker XP Scripts Tutorials Downloads

2 Pages V   1 2 >  
Closed TopicStart new topic
> Kread's AI Packages (Cross-engine), Stupid bosses are too annoying.
Kread-EX
post May 10 2010, 05:46 AM
Post #1


(=___=)/
Group Icon

Group: +Gold Member
Posts: 4,136
Type: Scripter
RM Skill: Undisclosed




Kread's AI Packages


Version: 1.2

Author: Kread-EX

Release Date: 9/11/2010


Introduction
This script provides pre-programmed AI Packages, in order to make your life easier when you want to create intelligent enemies. Note that this is only a tool, meant to be used in conjunction with battle events, and doesn't dispense the developper to put a little effort in designing the enemies. Misuse of this script can result in horribly overpowered monsters. Warning given. Although developped for XP, this script is cross-engine and will adapt itself to RMVX.

Instructions
There are 5 provided Packages:
Healy: Enemies using this AI package will try to heal and cure as much as possible, and only if needed. Only if healing is useless, the default AI will resume.
Protect: Enemies using this package will firstly try to buff themselves, then heal, then debuff the party. If nothing of this can work, the default AI will resume.
Support: This package doesn't give any priority. The character will just spam support skills with 0 power. If none of the skills can work, the default AI will resume. I recommand to give a rating of 1 to support skills with this package, and a high rating to attack skills, so the default AI won't try to use ineffective skills.
Wild: Then again, this package doesn't give priority. The characters will just calculate the average damage caused by all their attacks and always select the most damaging.
Balanced: No priorities again, and no orientation either. Basically, this package choose a random skill but only if it works and against a acceptable target. Best used in conjunction with Battle Events.

In the beginning of the script, you have a few constants named AIHealy, AIProtect, AISupport, AIWild and AIBalanced. Very simple, just put in here the IDs of enemies using the selected package, separated by commas.
For VX users: The ever-so-convenient note boxes are here. Just add one of these in the box.
<package: healy>
<package: protect>
<package: support>
<package: wild>
<package: balanced>

If you need to change a package during a battle, use a Call Script command:
$game_troop.enemies[member_index].package = :healy, :protect, :support, :wild or :balanced.

Script
DDL

Compatibility
Should work with all Battle systems, except TBS. Might clash with Tankentai, but I'm not sure.

Terms and Conditions
You are free to adapt this work to suit your needs.
You can use it for both non-commercial and commercial purposes. Credit is appreciated.


__________________________
FRACTURE - a SMT inspired game (demo) made by Rhyme, Karsuman and me. Weep and ragequit.

My blog.

Click here for my e-peen


Go to the top of the page
 
+Quote Post
   
Shanghai
post May 10 2010, 09:20 AM
Post #2


Level 31
Group Icon

Group: Revolutionary
Posts: 747
Type: Developer
RM Skill: Skilled




This is quite the awesome cross engine script you've given us. Let's hope to see this more in RPG's.


__________________________
Go to the top of the page
 
+Quote Post
   
AresWarrior
post May 10 2010, 06:41 PM
Post #3


Level 5
Group Icon

Group: Member
Posts: 69
Type: None
RM Skill: Beginner




wow Kread-X you are an awesome scripter! i might use this script for my game. thanks!
Go to the top of the page
 
+Quote Post
   
crazydragon
post Sep 24 2010, 05:39 PM
Post #4



Group Icon

Group: Member
Posts: 3
Type: None
RM Skill: Undisclosed




Is this script incompatible with Melody? Always get the same error from melody V when I assign a package through noteboxes. Also get a no method from the script call to switch packages.

Attached File  adad.png ( 4.91K ) Number of downloads: 29
Go to the top of the page
 
+Quote Post
   
Kread-EX
post Sep 24 2010, 10:32 PM
Post #5


(=___=)/
Group Icon

Group: +Gold Member
Posts: 4,136
Type: Scripter
RM Skill: Undisclosed




I don't experience any error with Melody...
Plus, the error you are showing comes from a method I haven't touched.
Could you give me more info? Like what other battle scripts you are using, their order in the editor...


__________________________
FRACTURE - a SMT inspired game (demo) made by Rhyme, Karsuman and me. Weep and ragequit.

My blog.

Click here for my e-peen


Go to the top of the page
 
+Quote Post
   
joey101
post Sep 25 2010, 04:02 AM
Post #6


DeadlyWeapon6
Group Icon

Group: Revolutionary
Posts: 196
Type: Developer
RM Skill: Skilled






QUOTE (crazydragon @ Sep 24 2010, 06:39 PM) *
Is this script incompatible with Melody? Always get the same error from melody V when I assign a package through noteboxes. Also get a no method from the script call to switch packages.

Attached File  adad.png ( 4.91K ) Number of downloads: 29

ummm mabye take a look at both scripts but i dont really know what Melody is

This post has been edited by joey101: Sep 25 2010, 04:04 AM


__________________________
Go to the top of the page
 
+Quote Post
   
crazydragon
post Sep 25 2010, 07:28 AM
Post #7



Group Icon

Group: Member
Posts: 3
Type: None
RM Skill: Undisclosed




QUOTE (Kread-EX @ Sep 24 2010, 11:32 PM) *
I don't experience any error with Melody...
Plus, the error you are showing comes from a method I haven't touched.
Could you give me more info? Like what other battle scripts you are using, their order in the editor...


Only battle scripts I'm using are the Engine Melody's I through V. They're in their original order, and I've tried this with the AI Package script before and after them. My project file isn't using YEM AI or YEM Enemy levels either. Just to make sure, I tried using this with the original Melody 1.00_m demo and I get the same error. I forgot to mention that I'm using ATB in Sideview, if that makes a difference. In my enemy's notebox,
"<package: protect>" is pasted exactly like that. Before the fight even starts, I get the error I posted above.

Since I couldn't get the battle to start while the enemy had a package assigned, I tried to assign one through the script call during battle. When switch 10 is turned on, my battle event tab calls "$game_troop.enemies[46].package = :wild" and the switch gets turned off. I receive this error both on my project and the Melody 1.00m demo-
Attached File  54345.png ( 3.94K ) Number of downloads: 4

I'm not familiar with script calls, so I'm pretty sure this is an error on my part and I applied it in an incorrect manner?

When I switched the battle system type to PressTurn battle, I was able to assign a package, but my above method of switching packages gave me the same error.

*edit- I only get the error I posted before in ATB when an enemy starts off with the protect, balanced, or wild package.

This post has been edited by crazydragon: Sep 25 2010, 07:42 AM
Go to the top of the page
 
+Quote Post
   
Kread-EX
post Sep 25 2010, 10:21 AM
Post #8


(=___=)/
Group Icon

Group: +Gold Member
Posts: 4,136
Type: Scripter
RM Skill: Undisclosed




For your error during the script call, it's because you are calling a non-existent enemy. The index you need to put in $game_troop.enemies[index] is not the ID in the database, but the order in the troop. In your example, you are trying to pinpoint the 46th enemy in the current troop.

I'm searching for the incompatibility problem with ATB. I'll get back to you once I found it.


__________________________
FRACTURE - a SMT inspired game (demo) made by Rhyme, Karsuman and me. Weep and ragequit.

My blog.

Click here for my e-peen


Go to the top of the page
 
+Quote Post
   
crazydragon
post Sep 25 2010, 10:48 AM
Post #9



Group Icon

Group: Member
Posts: 3
Type: None
RM Skill: Undisclosed




Ah I see. That makes sense : P. Unfortunately when I tried this, I still received the same error. It now reads like this=

$game_troop.enemies[1].package = :wild

My troop only has 1 enemy so this should be the correct number, right? I've tried it with the packages that work with ATB (healy and support)
and still received the same error. Just to make sure, I'm supposed to be calling this from "Script..." under "Advanced" from the third tab in
Event Commands, right?

Thanks for the support, by the way.
Go to the top of the page
 
+Quote Post
   
Kread-EX
post Sep 25 2010, 11:02 AM
Post #10


(=___=)/
Group Icon

Group: +Gold Member
Posts: 4,136
Type: Scripter
RM Skill: Undisclosed




No, with only 1 enemy, the correct number is 0. ^^

As for your ATB problem, I don't seem to be able to replicate it at all. All packages work for me... Are you sure you are using the version 1.1? Because the first version of the script had a bug making the wild package only working with RMXP.


__________________________
FRACTURE - a SMT inspired game (demo) made by Rhyme, Karsuman and me. Weep and ragequit.

My blog.

Click here for my e-peen


Go to the top of the page
 
+Quote Post
   
XaineC
post Nov 8 2010, 07:43 PM
Post #11



Group Icon

Group: Member
Posts: 3
Type: None
RM Skill: Undisclosed




I get an error with Wild enemies: "Script 'Enemy AIs' line 489: AugmentError occured. comparison of String with 436 failed."
Go to the top of the page
 
+Quote Post
   
Kread-EX
post Nov 8 2010, 11:15 PM
Post #12


(=___=)/
Group Icon

Group: +Gold Member
Posts: 4,136
Type: Scripter
RM Skill: Undisclosed




Oh, I completely forgot to take strings into consideration. I believe the error appears when the skill is supposed to miss (physical ones for instance).
Anyway, I fixed the problem so you need to download the script again. Now the enemies will not use the skill if it misses when they test it.


__________________________
FRACTURE - a SMT inspired game (demo) made by Rhyme, Karsuman and me. Weep and ragequit.

My blog.

Click here for my e-peen


Go to the top of the page
 
+Quote Post
   
Bigace
post Nov 8 2010, 11:39 PM
Post #13


The King of Spades
Group Icon

Group: Revolutionary
Posts: 400
Type: Developer
RM Skill: Intermediate




Im getting a
QUOTE
Script 'Kread's AI Package' Line 575: SyntaxError occured.
Error after I uploaded your new version.


__________________________



Use Dropbox to upload your files. Much simpler than other upload sites, you can simply place a folder on your desktop that will sync with your DropBox account.

QUOTE ('Exiled One')
"If you are one of the very few teenagers that know what real rap is and don't blindly listen to the hate statements (rap is crap), then put this in your sig. I say this in the name of Common, Mos Def, Lupe Fiasco, 2Pac, Nas, Talib Kweli, Eminem, and many others."
Go to the top of the page
 
+Quote Post
   
Kread-EX
post Nov 8 2010, 11:42 PM
Post #14


(=___=)/
Group Icon

Group: +Gold Member
Posts: 4,136
Type: Scripter
RM Skill: Undisclosed




Typo. tongue.gif
Forgot to close the parenthesis.


__________________________
FRACTURE - a SMT inspired game (demo) made by Rhyme, Karsuman and me. Weep and ragequit.

My blog.

Click here for my e-peen


Go to the top of the page
 
+Quote Post
   
Bigace
post Nov 8 2010, 11:50 PM
Post #15


The King of Spades
Group Icon

Group: Revolutionary
Posts: 400
Type: Developer
RM Skill: Intermediate




QUOTE (Kread-EX @ Nov 9 2010, 02:42 AM) *
Typo. tongue.gif
Forgot to close the parenthesis.


That's a facepalm to myself, because I should of notice something so simple. cool.gif


__________________________



Use Dropbox to upload your files. Much simpler than other upload sites, you can simply place a folder on your desktop that will sync with your DropBox account.

QUOTE ('Exiled One')
"If you are one of the very few teenagers that know what real rap is and don't blindly listen to the hate statements (rap is crap), then put this in your sig. I say this in the name of Common, Mos Def, Lupe Fiasco, 2Pac, Nas, Talib Kweli, Eminem, and many others."
Go to the top of the page
 
+Quote Post
   
XaineC
post Nov 9 2010, 11:20 AM
Post #16



Group Icon

Group: Member
Posts: 3
Type: None
RM Skill: Undisclosed




Oh no! The site with the script is down! T.T

This post has been edited by XaineC: Nov 9 2010, 11:23 AM
Go to the top of the page
 
+Quote Post
   
Kread-EX
post Nov 9 2010, 01:08 PM
Post #17


(=___=)/
Group Icon

Group: +Gold Member
Posts: 4,136
Type: Scripter
RM Skill: Undisclosed




Well, if Pockethouse is down, go to Gate of Babylon - I put the script there too. It's no big deal anyway, every site in the world has its downtime.


__________________________
FRACTURE - a SMT inspired game (demo) made by Rhyme, Karsuman and me. Weep and ragequit.

My blog.

Click here for my e-peen


Go to the top of the page
 
+Quote Post
   
finalholylight
post Apr 17 2011, 11:05 PM
Post #18



Group Icon

Group: Member
Posts: 1
Type: None
RM Skill: Beginner




Link died,please fix the link,I need this script,thanks.
Go to the top of the page
 
+Quote Post
   
Kread-EX
post Apr 18 2011, 01:58 AM
Post #19


(=___=)/
Group Icon

Group: +Gold Member
Posts: 4,136
Type: Scripter
RM Skill: Undisclosed




I've put the code directly in the first post. Until Pockethouse is up again (I hope it will).


__________________________
FRACTURE - a SMT inspired game (demo) made by Rhyme, Karsuman and me. Weep and ragequit.

My blog.

Click here for my e-peen


Go to the top of the page
 
+Quote Post
   
wsensor
post Apr 27 2011, 11:13 PM
Post #20


Level 2
Group Icon

Group: Member
Posts: 21
Type: None
RM Skill: Undisclosed




QUOTE (Kread-EX @ Apr 18 2011, 05:58 AM) *
I've put the code directly in the first post. Until Pockethouse is up again (I hope it will).


Question could this be made to work with AI controlled party members?

Also would their be a way to make it so that an AI could learn as the game goes on enemies weaknesses?

IE: Learning AI:
CODE
Enemy: Slime
Weaknesses: Blank
Strengths: Blank

Controlled Character uses attack (melee damage) Normal Melee attack is ineffective so Learning AI now knows not to use this.
Learning AI party member uses (melee piercing) ineffective it will now no longer try this one on this enemy/enemy type.
Controlled Character uses Fire spell (fire element) enemy takes more than 100% damage. Learning AI now will attempt to use this spell type. (but it should try other types or base them off of players trials and errors.)
Controlled Character uses Water Element spell. Slime heals. Learning AI says ok I will never ever use water on this slime.


I think that would be a great idea have several learning ai's for use with a AI party member. (Perhaps even allow information to be entered for stuff the AI should already know. IE: Learning AI Party Member is a Vampire Slayer: It should know most if not all weaknesses/strengths of vampires and not make mistakes when battling them even if it messes up on other enemies.)

Would it also be possible to right an AI that checks for enemies health/status and uses the correct strength spells?
IE: Will not cast Fire 3 when the enemy could/would die from a Fire 1 spell. (Hmm maybe a slightly bad idea since I am not sure if an AI should always know that unless you always show an enemies hp to the player. Just I don't think over killing and wasting precious mp is a good idea lol.)
Go to the top of the page
 
+Quote Post
   

2 Pages V   1 2 >
Closed TopicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

Lo-Fi Version Time is now: 22nd May 2013 - 08:10 AM
RPG RPG Revolution is an Privacy Policy and Legal
eXTReMe Tracker