Go Back   RunUO - Ultima Online Emulation > RunUO > RunUO Post Archive

RunUO Post Archive The Archvie

Reply
 
Thread Tools Display Modes
Old 05-26-2004, 10:11 PM   #1 (permalink)
 
Final Realms's Avatar
 
Join Date: Jun 2003
Location: Third Rock from the sun ( Europe, Portugal )
Posts: 108
Post Custom Paladin AI - RunUO 1.0 RC0 v.1.0 Beta

Change Log ( 5th, June, 2004):

New version released.

Version: 1.0.9 Beta 2

Changes:
  • Introduced necromancer Curse spell types recognition,
  • Introduced Mage Curse spell types recognition,
  • Npcs will now use remove curse only when hit by a curse type
    spell.
  • Minor Changes to some recognition instances and situations

Summary:
Customised Paladin AI V1.0

Used for Paladin npcs. This AI enables you to create Paladin npcs, that cast Paladin spells while in combat. A good complement to any customised shard.

To use this script you must have the following items:

Server version: RunUO 1.0 RC0

Paladin Spellbook

Warning: Works only on RunUO 1.0 RC0

For support email me at: elanon@terra.es
Or post on this thread.

Thanks to:

RunUO Dev Team for their great work on the Distribution MageAI, that has been my base & inspiration for these series of scripts.

Description:
This Ai uses a more advanced system, than the previous ones I released. Most of the original AI from RunUO has been tweaked and reworked, introducing new variables for the calculation of the chances that a npc will use certain spells.

This AI is more complex to use as it requires not so much items coded in your server, but rather a few specific code lines ( as shown on sample Paladin.cs ) that must allways be included in order for the code to work.

As allways you will need to add to the npc's equipment the full paladin spell book that comes with the RunUO 1.0 RC0 distribution. How to do this is shown in the sample Paladin npc included in all packages.

As a side note, take a moment to check the npc hue codes, as they may not match the ones intended in your shard. We all have our own hues files so the npc may look a bit wrong in color for you.

A word of warning before you install the files:

Each package carries the all the needed files for you to install the script. Read through the installation notes below to see how to install thosefiles ( which folders they go to ).

Each package is for a type of user only, if you havent downloaded any of my previous AI scripts, download the standalone version, if you have downloaded the necromancer script only, then download the zip file for those who have installed that AI.

If you are a fan ( j/k ) and have all my previous scripts, then download the lats package which comes prepared to support all 3 AI's instantly.

Note that all the files included are from the original BASE distribution, so if you have modified any of these files on your shard, just look for the lines you have tp modify as stated on the install instructions in this post, and in the ReadMe file on the downloads.

Enjoy

Installation Instructions:

To install proceed as follows:

On the file BaseAI.cs:

Under line 26, insert the following:

AI_Paladin

Under line 250, insert the following:

SkillName.Chivalry


On BaseCreature.cs:

Under line 1616, insert the following:

/////////////////PALADINAI//////////////
case AIType.AI_Paladin:
m_AI = new PaladinAI(this);
break;
/////////////////PALADINAI//////////////

Final steps:

After this is done, put the PaladinAI.cs file into your folder:

Scripts/Engines/AI/AI

Start your server after installing, normally.


More info on use:

To use on npcs, declare the AI normally like for any other AI, with the following nuances:

public NpcName() : base( AIType.AI_Paladin, FightMode.Evil, 10, 1, 0.2, 0.4 )

Note that its is best to use the Fightmode.Evil so paladin npcs attack evil creatures ( negative karma ).

if you dont want to attack those evil creatures above all others while in combat, simply modify the fight mode to:

public NpcName() : base( AIType.AI_Paladin, FightMode.Closest, 10, 1, 0.2, 0.4 )

Find my other scripts here:

Custom Necromancer AI v 1.0 - RunUO 1.0 RC0

Custom NecroMage AI v1.0 - RunUO 1.0 RC0

Enjoy
Final Realms is offline   Reply With Quote
Old 05-27-2004, 08:33 AM   #2 (permalink)
 
Final Realms's Avatar
 
Join Date: Jun 2003
Location: Third Rock from the sun ( Europe, Portugal )
Posts: 108
Post AI Features & Npc install location

Forgot to post these:

Features:

  • Usage of Paladin Spells while in Combat
  • Usage of Paladin healing spells
  • Usage of Paladin anti-poison spells
  • Npcs require Tithing points to be hardcoded into them to use this AI.

Npc Install Directory:

Scripts/Custom/Npc

Enjoy
Final Realms is offline   Reply With Quote
Old 05-27-2004, 12:34 PM   #3 (permalink)
 
Join Date: Oct 2002
Age: 23
Posts: 4,689
Default

Good job, just what I was looking for

If it takes tithing for them to do spells.. well I do not really understand this, since I dont believe mages require regeants to cast (NPCs i mean).
XxSP1DERxX is offline   Reply With Quote
Old 05-27-2004, 02:25 PM   #4 (permalink)
 
Final Realms's Avatar
 
Join Date: Jun 2003
Location: Third Rock from the sun ( Europe, Portugal )
Posts: 108
Default

Quote:
Originally Posted by XxSP1DERxX
Good job, just what I was looking for
Thnxs I'm so very glad you liked it

Quote:
Originally Posted by XxSP1DERxX
If it takes tithing for them to do spells.. well I do not really understand this, since I dont believe mages require regeants to cast (NPCs i mean).
I tried not using the tithing points on the npc code, and they wouldnt cast... same for necros.. its not somethign I understand fully but I believe it has to do with the way the Magery, necromancy and Chivalry skills are scripted.

I believe the skill are scripted so-to-speak with regard as to who will use them, and as the base distro doesnt have these AI's it may well be that the reason for having to use this to make it work, is because they where originally intended as player only skills, not really mobile oriented.

Thats about the only thing I can think of, that would justify the behaviour.

Ill be rumaging into skills soon, so I'll let you know what I find, unless Ryan or anyone from Dev could clarify this?.
Final Realms is offline   Reply With Quote
Old 05-27-2004, 02:29 PM   #5 (permalink)
Newbie
 
Join Date: Oct 2002
Location: Brazil
Age: 21
Posts: 74
Send a message via ICQ to Matador Doidao Send a message via MSN to Matador Doidao
Default

lovee it
like a love all other AIs that you share

nice work
__________________
=)
Matador Doidao is offline   Reply With Quote
Old 05-27-2004, 02:35 PM   #6 (permalink)
 
Final Realms's Avatar
 
Join Date: Jun 2003
Location: Third Rock from the sun ( Europe, Portugal )
Posts: 108
Talking

Quote:
Originally Posted by Matador Doidao
lovee it
like a love all other AIs that you share

nice work
Thnxs Glad u like em

Obrigado Cara!!! E optimo que voces gostem dos meus scripts
Final Realms is offline   Reply With Quote
Old 05-27-2004, 02:50 PM   #7 (permalink)
Newbie
 
Join Date: Oct 2002
Location: Brazil
Age: 21
Posts: 74
Send a message via ICQ to Matador Doidao Send a message via MSN to Matador Doidao
Default

se eh brasileiro?
portugues?

pow, massa


are u brazilian?
portuguese?

cool ;p

=x
__________________
=)
Matador Doidao is offline   Reply With Quote
Old 05-27-2004, 03:00 PM   #8 (permalink)
Greatwizard
 
sidsid's Avatar
 
Join Date: Mar 2004
Location: orange county, CA
Age: 27
Posts: 1,111
Talking

always good !
__________________
-deadened with the helium of converses!
sidsid is offline   Reply With Quote
Old 05-27-2004, 08:50 PM   #9 (permalink)
Forum Expert
 
krazeykow's Avatar
 
Join Date: Mar 2004
Location: AR
Age: 19
Posts: 272
Default

*Cries*

I love it! :}
krazeykow is offline   Reply With Quote
Old 05-28-2004, 09:48 AM   #10 (permalink)
 
Final Realms's Avatar
 
Join Date: Jun 2003
Location: Third Rock from the sun ( Europe, Portugal )
Posts: 108
Talking

Quote:
Originally Posted by krazeykow
*Cries*

I love it! :}
Thnxs Glad you like it
Final Realms is offline   Reply With Quote
Old 05-28-2004, 02:56 PM   #11 (permalink)
Newbie
 
Join Date: Oct 2002
Location: Brazil
Age: 21
Posts: 74
Send a message via ICQ to Matador Doidao Send a message via MSN to Matador Doidao
Default

i notice some "problem" with the AI
the npc use Remove Curse without receive a Curse spell (weaken/curse/etc)

this may be fixed for a next release



ps: sidsid, r u from orange county? i love The O.C.
__________________
=)
Matador Doidao is offline   Reply With Quote
Old 05-28-2004, 04:12 PM   #12 (permalink)
 
Final Realms's Avatar
 
Join Date: Jun 2003
Location: Third Rock from the sun ( Europe, Portugal )
Posts: 108
Post

Quote:
Originally Posted by Matador Doidao
i notice some "problem" with the AI
the npc use Remove Curse without receive a Curse spell (weaken/curse/etc)
this may be fixed for a next release
Yeah, I'll fix it so the npcs use that spell only when recieving a curse type spell. This AI is more complex, so please test thoroughly and keep posting adjustments you'd like to see.
Final Realms is offline   Reply With Quote
Old 05-28-2004, 04:15 PM   #13 (permalink)
Greatwizard
 
sidsid's Avatar
 
Join Date: Mar 2004
Location: orange county, CA
Age: 27
Posts: 1,111
Default

Quote:
Originally Posted by Matador Doidao
i notice some "problem" with the AI
the npc use Remove Curse without receive a Curse spell (weaken/curse/etc)

this may be fixed for a next release



ps: sidsid, r u from orange county? i love The O.C.

yea, you know whats funny tho.. my life is NOTHING like that show.
__________________
-deadened with the helium of converses!
sidsid is offline   Reply With Quote
Old 06-05-2004, 02:15 PM   #14 (permalink)
 
Final Realms's Avatar
 
Join Date: Jun 2003
Location: Third Rock from the sun ( Europe, Portugal )
Posts: 108
Post New Version Released - v1.0.9 Beta 2

Updated the AI as per some requests, all packages should be downloaded again, as all have been changed in the AI script, as well as Readme.txt.

See main post for Change Log.

Thnxs for the 132 previous downloads It was quite a suprise you all liked it so much

Enjoy the new version
Final Realms is offline   Reply With Quote
Old 06-06-2004, 07:35 PM   #15 (permalink)
 
hudel's Avatar
 
Join Date: Oct 2003
Location: Germany
Age: 38
Posts: 508
Send a message via ICQ to hudel
Default

Quote:
Originally Posted by Final Realms
Forgot to post these:

Features:

  • Usage of Paladin Spells while in Combat
  • Usage of Paladin healing spells
  • Usage of Paladin anti-poison spells
  • Npcs require Tithing points to be hardcoded into them to use this AI.

Npc Install Directory:

Scripts/Custom/Npc

Enjoy

hmm,... I have to save the NPC's under this path or can I use the path ...\Custom\New\mobiles\npc?
hudel is offline   Reply With Quote
Old 06-06-2004, 10:03 PM   #16 (permalink)
Greatwizard
 
sidsid's Avatar
 
Join Date: Mar 2004
Location: orange county, CA
Age: 27
Posts: 1,111
Default

Quote:
Originally Posted by hudel
hmm,... I have to save the NPC's under this path or can I use the path ...\Custom\New\mobiles\npc?
you can use any directory you want in the scripts dir. Its just a suggested for keeping order.
__________________
-deadened with the helium of converses!
sidsid is offline   Reply With Quote
Old 06-07-2004, 07:27 AM   #17 (permalink)
 
Final Realms's Avatar
 
Join Date: Jun 2003
Location: Third Rock from the sun ( Europe, Portugal )
Posts: 108
Post

Quote:
Originally Posted by hudel
hmm,... I have to save the NPC's under this path or can I use the path ...\Custom\New\mobiles\npc?
That path is perfectly ok

The path I posted for the Npcs is a mere indication of where you should place the Paladin.cs script, but its quite alright to place it anywhere you want
Final Realms is offline   Reply With Quote
Old 06-09-2004, 11:26 PM   #18 (permalink)
 
Join Date: Feb 2004
Posts: 60
Default

my paladins are evil, they kill blue npcs and dont kill monsters.. I want it the other way around, how do I do that?
exide is offline   Reply With Quote
Old 06-10-2004, 05:12 PM   #19 (permalink)
 
Final Realms's Avatar
 
Join Date: Jun 2003
Location: Third Rock from the sun ( Europe, Portugal )
Posts: 108
Post

Quote:
Originally Posted by exide
my paladins are evil, they kill blue npcs and dont kill monsters.. I want it the other way around, how do I do that?
Are you using this AI?, because the AI doesnt make them attack blue players, so its go to be something else.

At any rate, try the following:

On your paladin npc script in tha AI line change the following:

PHP Code:
FightMode.Closest 
to

PHP Code:
FightMode.Evil 
This should make them attack anything, from monsters to players who have bad karma ( negative values ).

Other than that.. I cant really figure out why they would do that, as that is not something written in the AI code.
Final Realms is offline   Reply With Quote
Old 06-10-2004, 09:38 PM   #20 (permalink)
 
Join Date: Jun 2003
Age: 31
Posts: 181
Default

It should, but doesn't. Fight Mode Evil only attacks evil players (neg karma) If you want them to attack monsters too you need to change their team when spawning (easiest way)
__________________
The original Lord of the Rings Shard
-Coming back soon!- (After I get back from Iraq)

Admin Tremerelord-Shard Loremaster-Steward of Gondor
Tremerelord is offline   Reply With Quote
Old 06-11-2004, 05:19 AM   #21 (permalink)
 
Final Realms's Avatar
 
Join Date: Jun 2003
Location: Third Rock from the sun ( Europe, Portugal )
Posts: 108
Post

Quote:
Originally Posted by Tremerelord
It should, but doesn't. Fight Mode Evil only attacks evil players (neg karma) If you want them to attack monsters too you need to change their team when spawning (easiest way)
True... very true.

At any rate, Paladins shouldnt attack other npcs, as per usual method, no npc attacks others unless its a pet you have tamed and you have ( as well as the pet ) negative karma or have ordered your pet to attack them, in which case they will atack both owner and pet. Thats writen in the BaseAI code of RunUO 1.0 RC0.
Final Realms is offline   Reply With Quote
Old 06-12-2004, 12:27 PM   #22 (permalink)
 
Join Date: Feb 2004
Posts: 60
Default

Good script anyway - However, the bums dont fight the necros... (your too, good also) Even though they are in opposition groups.
exide is offline   Reply With Quote
Old 06-12-2004, 09:50 PM   #23 (permalink)
 
hudel's Avatar
 
Join Date: Oct 2003
Location: Germany
Age: 38
Posts: 508
Send a message via ICQ to hudel
Unhappy

Hi all,

I've found a little problem and can't solve it by myself. Maybe someone has an idea.

I use the Paladin that this packet contains. When I place him in a town and a player with neg. karma / fame comes near, the paladin wants to attack. Just in this moment a §&*!( - townsman calls the guards and the paladin is guardwacket. Sounds funny. But I want that paladin as a special knight, that saves the town and like the good old trinsic paladins which killed every evil siner on sight.

Can someone please help me here?
hudel is offline   Reply With Quote
Old 06-13-2004, 11:42 AM   #24 (permalink)
 
Final Realms's Avatar
 
Join Date: Jun 2003
Location: Third Rock from the sun ( Europe, Portugal )
Posts: 108
Talking

Quote:
Originally Posted by hudel
Hi all,

I've found a little problem and can't solve it by myself. Maybe someone has an idea.

I use the Paladin that this packet contains. When I place him in a town and a player with neg. karma / fame comes near, the paladin wants to attack. Just in this moment a §&*!( - townsman calls the guards and the paladin is guardwacket. Sounds funny. But I want that paladin as a special knight, that saves the town and like the good old trinsic paladins which killed every evil siner on sight.

Can someone please help me here?
The Way I use pallys in towns, on my home test shard is I susbtituted the normal base guards for the paladin script, thus if a Evil Player walks into town, he is ok, however if someone calls the guards ( npc, or player ) the paladin shows up and wacks them.

The only other possible choice would be like some have pointed out already on the thread, to make the paladin the same team as the guards, although Im not sure this would work, since a guarded town means players are safe from other players and npcs, be they pets or otherwise, who could attack them.

You might need to do something with regions to enable that paladins work the good ole way they did in trinsic, which after some thought seems like the best idea really.

Outside town, and even in some spots inside town, or even in the whole town, you may place some guard posts with one or two paladins in it, with fightmode.evil in the ai mode, so anyone entering town by land or sea has to pass through those posts, that combined with the regions-inabox script ( I use it myself in this same way ) might enable you to create pass through zones, where the spawned paladins can act as you intend, attacking evil npcs and players alike.

I havent tried to do this yet - but I think you can even diasble calling of guards through that script, which would prevent that which you are saying from happening.

At any rate Im gonna try and figure this out, and Ill post a clear solution here for you, as soon as I can.

Finally, thanks for using the script it makes me happy to see my scripts being used
Final Realms is offline   Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes