Skyrim
0 of 0

File information

Last updated

Original upload

Created by

Ethereal Coder aka Ether Dynamics

Uploaded by

EtherealCoder

Virus scan

Safe to use

Tags for this mod

About this mod

A tool that lets modders control their creations similar to the Left 4 Dead series. Also provides detailed logging for Big Data analysis.

Permissions and credits
Changelogs
Donations
Summary
Version 1.0 of the AI Director has been released.

This mod contains:
  • AI Director: The full open-source code for running an AI Director in Skyrim.
  • AI Director Demo 01: An example implementation of the AI Director in a section of Bthardamz, specifically Bthardamz02.
  • Data Science Tools: The AI Director can export detailed logs for Data Science analysis. I've provided three tools written in Perl, R, and Python to convert the log files into more conventional formats, and then perform a full analysis. Whether you're an aspiring hobbyist or college student, this can help you jump-start your integration of Data Science and game design!
  • Data Science Documentation: A documentation primer to get you up and running with the associated tools.


What IS an AI Director?
For those not familiar with the term, an "AI Director" is a special agent in the game that watches player and enemy behavior, and tries to keep an exciting and fun pace. In the famous "Left 4 Dead" series, the AI Director is renown for finding juuuust the right time to inject a horde of zombies, some Special Infected, or even a Witch or a Tank to keep the players rolling; but it also finds just the right moments to insert a few Health Packs or other power-ups to help the players rest up before the next challenge.

This "throttling" gives players a positive incentive to move forward (more goodies and power-ups), but prevents players from just sitting idle and camping forever. This pull / push dynamic helps keep things exciting, and also means you'll never experience a level the same way twice. For a great exposition of all this functionality, I highly recommend you check out the video below on the "AI and Games" YouTube channel:




What's available here?
As per the summary above, there are three main files here.

AI Director
This is the bare-bones, open-source core of the AI Director. It doesn't affect anything in the game, it just contains the source code and a tiny demo Quest that shows how to attach the code to Quest Aliases to make things happen. It does log info about the player by default -- modders can check out the log files and read the rich information for design analysis.

AI Director Demo 01
This has a quick example of what you can do with the AI Director. I've modified a small section of Bthardamz02, which you can teleport to using the good ol' console ("coc Bthardamz02"). This dungeon has been modified in many subtle ways:

  • Squads: The 6 default Afflicted in this area have been given slight buffs, and have been organized into 2 Squads. When a Squad is injured, or if they face an overwhelmingly powerful opponent, they will fall back to their "last stand" position near the exit.
  • Healing: Each Squad has a healer. When any non-healer is injured, they and the healer will move towards each other to facilitate treatment. If the Healer is significantly injured, they will try to heal themselves rapidly. Note that Healers are dependent on Magicka, so nixing their Magicka pool with things like Shock effects or Magicka Poisons will prevent them from healing. Healers will not heal Random Encounter Actors, even if they're Afflicted (see below).
  • Detect Life: Each Squad also has a spellcaster that can use Detect Life -- this will detect enemies if they're nearby, but can be escaped with sufficient distance. Since the Spell is Detect Life, it won't work on the player if they're a vampire. Note that a Healer might also double with the ability to Detect Life; similarly, Detect Life consumes Magicka, so depleting the Actor's pool will prevent use of the spell. Lastly, no Random Encounter Actors use Detect Life (see below).
  • Random Encounters: The AI Director will control the pace / challenge of the game based on badly the player is hurt. Every 20-35 seconds, it will check the player's status: if the player has not dipped below 33% health, and the player has not suffered 50% damage in the last 20 seconds, then 1-2 Random Encounter Actors will be injected into the dungeon.
    These Random Encounter Actors will patrol the entire dungeon from front-to-back or back-to-front, depending on their spawn point. Up to 4 living Random Encounter Actors can exist at any given time; if all 4 "slots" are filled, no more will be spawned until one is killed and their "slot" opens up. Depending on the nature of the Actor, they may fight the player, the Afflicted, each other, or everyone:


    • Afflicted Tank: 10%
    • Afflicted Wizard: 20%
    • Dwemer Spider: 10%
    • Dwemer Sphere: 10%
    • Dog: 10%
    • Frostbite Spider: 10%
    • Mudcrab: 10%
    • Skeever: 10%
    • Wisp: 10%
    As you can see, there's a 30% chance for Afflicted reinforcements, a 20% chance for Dwemer automatons to charge in, and a 50% for random nasties. This keeps the playthrough fresh, since the static defenders will either be strengthened or weakened by the newcomers -- the player can elect to "wait it out", or can charge in before things get too stacked against them.

    Given this spread, there's a slightly greater chance (30%) that all 4 Random Encounters will eventually "converge" to all Afflicted; however, there's also a chance (20%) that all 4 Random Encounters will eventually "converge" to Dwemer -- the Spheres are significantly more powerful than any individual Afflicted. Either way, this will change for every playthrough!

  • Player-Centric Loot: Lastly, there's a new chest in the upper area, near a bedroll, just before the exit. In addition to random loot, this will always have at least one item which matches up with the Player's highest Skill -- for example, if the player's highest skill is Sneak, then there will always be an item that boosts stealth in some way; if it's Two-Handed, then there will always be a powerful two-handed weapon; etc.. This makes sure the player always gets something useful to their specific character, not just random junk to sell later in town.


As the name implies, "AI Director Demo 01" is a demo, and not intended to be permanently part of your load order -- so feel free to pop it in and give it a spin with whatever character you have, just don't plan on keeping any saves once you remove it. Again, you can jump straight into the action by using "coc Bthardamz02" from the console.

Alternatively, if you'd like to "start from scratch", I've also modified a single room in the Bannered Mare to include two "quick start" books for testing purposes:

  • Pull up the console in the Main Menu (before Loading a game), and use "coc WhiterunBanneredMare".
  • Use "showracemenu" to choose your Race, if you feel like it.
  • Read one of the books sitting on the nightstand.
  • Level yourself up as you see fit, equip items, etc..
  • We now need to allow Skyrim to "catch up" with your new level. Run out of the Bannered Mare into Whiterun, then run out of the city to the Whiterun Stables. After you "discover" the Whiterun Stables, save the game.
  • You're now ready to go! Use "coc Bthardamz02" to teleport to the right spot.


Data Science Tools: If you want to get into Data Science, you can turn on Logging through the AI Director. This will provide incredibly detailed log information about any Actor you choose -- you can then parse out the data to a more standard delimited format, and go nuts with tools written in R or Python. If you'd like to get started down this path, check out the tools and associated documentation.


SSE
None of the components of my mods rely on SKSE. Furthermore, all the scripts are fully open source -- you can just copy and paste them directly into SSE.


Requirements
No requirements, not even the DLC. Have at it! :)


Compatibility
  • AI Director: This doesn't affect anything in-game. It will generate a detailed log export on the player, which can be analyzed later.
  • AI Director Demo 01: This affects a small slice of Bthardamz02, and is only intended for demonstration purposes. Please have fun fighting the enemies here! But I would not leave this as part of your permanent load order.



Permissions
Users may use these materials if and only if they:

1. Give full credit for these underlying components in their main mod description, and provide a link to the AI Director mod page on the Nexus (and eventually Steam, if applicable).
2. Share the source code for any new features they design that reference any piece of this material.

If subsequent modders use or reference any code provided by prior contributors, they must also credit and link the prior contributors as cited above, and similarly share their source code.


Long Term Goals




Extras

YouTube Channel on AI:
[https://www.youtube.com/playlist?list=PL-U2vBF9GrHGORYfnj6DOAFN1FgEzy9UA]