PenUltima Online Forum Index Official Core: 096.7
Official Core: 097 2008-02-26
Donate towards the POL web hosting bill!
 POL Home   FAQ   Search    Memberlist   Usergroups    Register    Profile   Log in to check your private messages   Log in
Suggestion for the AI System

 
Post new topic   Reply to topic    PenUltima Online Forum Index -> Development Discussion
Display posts from previous:   

Author Message
ELSoft



Joined: 18 Jun 2006
Posts: 36

PostPosted: Thu May 15, 2008 4:27 pm    Post subject: Suggestion for the AI System Reply with quote

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

}

Author Message
ncrsn



Joined: 10 Feb 2006
Posts: 165

PostPosted: Thu May 22, 2008 11:24 am    Post subject: Reply with quote

I like the idea. Hope it does fit in the distro.

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

Post new topic   Reply to topic    PenUltima Online Forum Index -> Development Discussion All times are GMT - 4 Hours
Page 1 of 1

 




Powered by phpBB © 2001, 2005 phpBB Group :: Theme & Graphics by GHS & Scott E. Royalty