Thread: Programming AI
View Single Post
  #13  
Old 01-19-2009, 01:11 AM
Deimos
Hill Giant
 
Join Date: Jun 2004
Posts: 135
Default

Ok, well for storage and initial setup, it's getting kinda complex and it looks like I might have to end up making my own scripting language o-o.

Ok... here goes..

First, each NPC has their own object that they can refer to. The objects are automatically created and what not if they don't exist and all directories are auto made and so on.

From here, initialization of the object takes place in the NPC's local quest file under the INI sub routine. This is only if the file isn't already there : ).

Also, I have something that's getting setup to make NPCs load specific initialization files based on special labels for them and what not. I also setup something so that they load up a config file O_o. Not sure what to use this for yet or how I'm going to read it and store it (this is where I think I might end up doing a custom scripting language).

It's just getting kinda complex ^_-.

I figure I'm going to store memories and what not in their object file. However, I could store anything I wanted in their, so I could let people completely do all of their stuff in that one object (special flags, and so on, w/e they want).

Actually, now that I think about it, the object file can just be custom information people want that NPC to have. The configuration file can be the stuff the AI Engine runs with. I suppose this configuration file could be the thing that really runs the AI. Eh, but loading up lots of files is going to slow things down...

I could add a new table to the DB for NPCs, but no, that wouldn't be good... I think hashes stored in files (that can be treated as extremely dynamic objects) are the best bet. So then... the configuration file can be used simply to run the AI dll and determine how the NPC acts and what not. The object file can store the NPC's memories and everything under the AI Category (which will be reserved I suppose).

What do you guys think?

Am I being too ambitious? (This storage system thingie is all working thus far ^^).
__________________
//The Path of Chaos Server-
//Fate Industries
//Lots of stuff O-o
Reply With Quote