Suggestion for the AI System

Archive of posts related to former distro versions. Be aware that posts here do not refer to the current distro and may not work.

Moderators: POL Developer, Distro Developer

Locked
User avatar
ELSoft
Journeyman Poster
Posts: 61
Joined: Sun Jun 18, 2006 7:45 pm

Suggestion for the AI System

Post by ELSoft »

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: Select all

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: Select all

NPCTemplate ExampleNPC
{
	// Brain AI Settings
	BrainAISetting	ExampleSettings

	// Brain AI Nerves
	BrainAINerves	ExampleNerves
}
brainAISettings.cfg

Code: Select all

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: Select all

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

}
User avatar
ncrsn
Grandmaster Poster
Posts: 255
Joined: Fri Feb 10, 2006 12:15 am

Post by ncrsn »

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

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