PenUltima Online

It is currently Sun Oct 12, 2008 1:45 am

All times are UTC - 8 hours




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Suggestion for the AI System
PostPosted: Thu May 15, 2008 12:27 pm 
Offline
User avatar

Joined: Sun Jun 18, 2006 7:45 pm
Posts: 36
I believe that a problem of the configuration of the AI of every npc is that very tedious sets all the parameters for give AI to a npc.

Instead of putting all lines for the AI in the npcdesc.cfg, putting these in another cfg, to group them and to call them from npcdesc by means of an alone name of reference

Currently:

npcdesc.cfg
Code:
NPCTemplate ExampleNPC
{
   // Brain AI Settings
   AISetting   AreaSize   i5
   AISetting   CycleWait   i10
   AISetting   DblClickRange   i10
   AISetting   FleeLevel   i50 // 50%
   AISetting   HearGhosts   i1
   AISetting   HearSpeech   i1
   AISetting   IdleTicks   i5
   AISetting   ListenRange   i10
   AISetting   SleepWait   i1800

   // Brain AI Nerves
   AIScript   Combat      :brainAI:bundled/exampleNPC/combat
   AIScript   Cycle      :brainAI:bundled/exampleNPC/cycle
   AIScript   DblClick   :brainAI:bundled/exampleNPC/doubleClick
   AIScript   Disengaged   :brainAI:bundled/exampleNPC/disengaged
   AIScript   EnterArea   :brainAI:bundled/exampleNPC/enteredArea
   AIScript   GoneCriminal   :brainAI:bundled/exampleNPC/goneCriminal
   AIScript   Init      :brainAI:bundled/exampleNPC/init
   AIScript   ItemGiven   :brainAI:bundled/exampleNPC/itemGiven
   AIScript   LeftArea   :brainAI:bundled/exampleNPC/leftArea
   AIScript   LookAround   :brainAI:bundled/exampleNPC/lookAround
   AIScript   Listen      :brainAI:bundled/exampleNPC/listen
   AIScript   Merchant   :brainAI:bundled/exampleNPC/merchant
   AIScript   Restart      :brainAI:bundled/exampleNPC/restart
   AIScript   Sleep      :brainAI:bundled/exampleNPC/sleep
   AIScript   ShouldWatch   :brainAI:bundled/exampleNPC/shouldWatch
   AIScript   Virtual      :brainAI:bundled/exampleNPC/virtual
   AIScript   EndFight   :brainAI:bundled/exampleNPC/endFight

}



My suggest, something like this:

npcdesc.cfg
Code:
NPCTemplate ExampleNPC
{
   // Brain AI Settings
   BrainAISetting   ExampleSettings

   // Brain AI Nerves
   BrainAINerves   ExampleNerves
}


brainAISettings.cfg
Code:
AISettings ExampleSettings
{
        AISetting   AreaSize   i5
   AISetting   CycleWait   i10
   AISetting   DblClickRange   i10
   AISetting   FleeLevel   i50 // 50%
   AISetting   HearGhosts   i1
   AISetting   HearSpeech   i1
   AISetting   IdleTicks   i5
   AISetting   ListenRange   i10
   AISetting   SleepWait   i1800
   
}


brainAINerves.cfg
Code:
AINerves ExampleNerves
{
   AIScript   Combat      :brainAI:bundled/exampleNPC/combat
   AIScript   Cycle      :brainAI:bundled/exampleNPC/cycle
   AIScript   DblClick   :brainAI:bundled/exampleNPC/doubleClick
   AIScript   Disengaged   :brainAI:bundled/exampleNPC/disengaged
   AIScript   EnterArea   :brainAI:bundled/exampleNPC/enteredArea
   AIScript   GoneCriminal   :brainAI:bundled/exampleNPC/goneCriminal
   AIScript   Init      :brainAI:bundled/exampleNPC/init
   AIScript   ItemGiven   :brainAI:bundled/exampleNPC/itemGiven
   AIScript   LeftArea   :brainAI:bundled/exampleNPC/leftArea
   AIScript   LookAround   :brainAI:bundled/exampleNPC/lookAround
   AIScript   Listen      :brainAI:bundled/exampleNPC/listen
   AIScript   Merchant   :brainAI:bundled/exampleNPC/merchant
   AIScript   Restart      :brainAI:bundled/exampleNPC/restart
   AIScript   Sleep      :brainAI:bundled/exampleNPC/sleep
   AIScript   ShouldWatch   :brainAI:bundled/exampleNPC/shouldWatch
   AIScript   Virtual      :brainAI:bundled/exampleNPC/virtual
   AIScript   EndFight   :brainAI:bundled/exampleNPC/endFight

}

_________________
Dark Dungeons Scripter


Top
 Profile  
 
 Post subject:
PostPosted: Thu May 22, 2008 7:24 am 
Offline
User avatar

Joined: Fri Feb 10, 2006 12:15 am
Posts: 223
I like the idea. Hope it does fit in the distro.

If so happens, who's going to do it? Huh!


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC - 8 hours


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Style based on FI Subice by phpBBservice.nl