Knowledge Base implentations for AI

Post » Wed Feb 01, 2017 5:22 pm

BACKGROUND


Hello there! I'm currently a master's student doing research into AI systems and how to improve the look and feel of societies in games. Being a fan on the ES series and the open modding community of said series, I decided to do my research in Skyrim.



I am trying to set up a multi-tiered AI knowledge base to hold variables for controlling rumor spreading and emotion-based refactoring of AI packages, but I'm getting caught up on the starting elements of this build.



I would like to have a couple of scripts communicating at different levels of the world space: the whole of Skyrim, a Hold (Whiterun for example) , and a City (Whiterun for my test case again). The scripts would need to be persistant so that variables inside them could be changes, which leads me to think of a "Singleton" architecture. A "Singleton" (for those not familiar with OOP architecture) is a object that is instantiated at run-time that can only have one global instance, but the class is able to be used by Static Functions. Basically, I need something that would stay accessible wherever I am, even if I have loaded another cell.



I have been looking through the CreationKit website, but I don't think I'm seeing the script or Object I need to implement in order to make this work. I know that there are scripts that run either at or near to global level, like cell reloading and such, but I don't know how to make something like this.



I have some theories though on how this could be accomplished (see below), and I'd like to get some opinions on how would be the best way to accomplish this.



QUESTIONS


Would using a hidden Quest be viable for recording information from renown quest(You become Arch-mage), recording crime, storing variables between multiple levels (a hidden quest for each city and one for the worldspace to share information from), and altering AI packages on a consistent basis based on said variables?



Is there established methods of creating "Singleton" Architectures in Papyrus?



Would SKSE have to be involved? I have not looked into it much, but if the functionality is in such an extender I will use it.



Am I completely on the wrong path of trying to create this in the method described above?




I will provide as much information that I can from feedback and questions, and if requested will even post the white papers that I am basing my research on.



Thank you in advance for ya'lls help ^_^


User avatar
Baby K(:
 
Posts: 3395
Joined: Thu Nov 09, 2006 9:07 pm

Post » Wed Feb 01, 2017 5:06 pm

Yes, quests are what you want to use. Set up a quest for each area like you mentioned. Give each quest a script marked with the Conditional flag and then you can also include conditional properties that can be accessed by dialogue entries and AI packages. The quests themselves are also natural places to house any dialogue and you can use quest reference aliases to apply additional AI packages to existing NPCs.

User avatar
Scott Clemmons
 
Posts: 3333
Joined: Sun Sep 16, 2007 5:35 pm

Post » Wed Feb 01, 2017 12:54 pm

You'd almost assuredly have to keep track of it through game time, b/c from what I've seen throughout the beth games is that if you're in City A, then nothing is happening in City B.



You cannot keep things happening unless the Cell is actually pre-loaded or loaded into memory. The game works based on the time it is, which is why you can fast travel to a city and see people crawl into bed at 4pm, because their packages get evaluated based on the time you fast traveled, then it takes a minute or two for their ai packages to update to the current time.

User avatar
Nany Smith
 
Posts: 3419
Joined: Sat Mar 17, 2007 5:36 pm


Return to V - Skyrim