Talk:StendhalRefactoringCreatures
Jump to navigation
Jump to search
For AI:
You could do something like a simple scripting language, e.g. in Baldurs Gate they use LUA i think, and then create AI defs in there. As you say you could have a set of standard modules of behaviour that you could call in each script.
e.g.
script Kobol
behaviour()
{
if player within 10meters
Follow(player); <- premade module
if player within 3 meters
Attack_If_Not_Injured(hitpoints); <- another module
else
Roam_For_Food();
}
Yes, but something more modular like:
script Kobol
behaviour()
{
add(Coward(HP<30%))
add(Attack(Player))
add(Group(KoboldGroup))
add(Patrol(30 meters around))
add(NoSpeaker)
}
The whole point is to avoid coding as much as possible.
About using Lua or python or anything like that I prefer to skip it. Java is already a script language, we can do it too with java in the same way we would did with python/lua. --MiguelAngelBlanchLardin 01:40, 31 Oct 2005 (PST)