-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Important
Hey Stefano, I figure you probably read this wiki whenever you have time to work on your mods, and I can't seem to find any way to get in touch with you because you are kind of a ghost outside your YouTube channel and GitHub. So could you maybe join my Discord server or DM me on Twitter or something?
Caution
The library is still WIP !
Welcome to the KAI wiki, the wikis' purpose is to document the KAI (Koala AI) Library and its' usage, serving as a code reference for classes, methods, and variables. It may not be a full substitute for having to look at the libraries' codebase, but it should at least reduce the need to do so.
Aside from code reference. The wiki also contains a few guides on tasks like setting up the library, and using it to make custom NPCs with it. (TBD)
NOTE: It is assumed that you have at least a basic understanding of ZScript and/or GZDoom. If you do not, then it is suggested that you read Agent Ash's ZScript guide first, before trying to use the KAI or any other ZScript library.
For info on how to use the library in your own mods/maps, read this page.
For help, suggestions, etc. My Discord server can be found here: https://discord.gg/SxU9Cem3ef
The NPC base classes. For a (Mostly) full list of KAI classes, check the sidebar. The whole concept of NPC types and their layout is vaguely modelled after VJ Base.
The library includes the following server-side CVARs.
Allows debugging console messages to actually be printed if on, off by default. Due to ZScript not allowing for passing varargs between functions, there is no generic debug print function. So you must manually check if this CVAR is on before each debug message printed like this:
If (KAI_DebugPrintMessages) Console.Printf ("aeiou");
Makes vehicle turrets produce 2 particle trace lines every time they call AimAtTarget. A white line, that is aimed at the direction the turret wants to traverse to. And a yellow one, aimed at the direction the turret is actually aiming at.
Makes DetermineHitChance() print debug information on the values by its' Basic and Smart algorithms, such as what actor called the function. For the latter, it also prints out the start and end position of each trace. Along with showing successful traces in green, and failed ones in red.
Prints info about any events that occur to NPC groups in the console. Like if an actor in a group was killed, it will print a message of the pointer and class names of both the affected actor, and the group they're in.
Shows the next position that an NPC wants to move to, marked by a plasma ball graphic.
Print information on the flying movement of actors that use KAI_MoveTowards() with KMT_3D, both from the function itself, and the KMT_3D_*
sub-functions it calls to move the actor in 3D space. Such as velocity, how far the velocity vector is facing from TargetPos's direction, etc.
Visualize what KAI_AvoidObstacles() is doing by showing temporary markers on each position it checked around the caller. Valid positions are a normal colored plasma balls, unreachable positions are red plasma balls, and the final return of the function is a large plasma ball. This CVAR sets how long these markers last before vanishing, and value of 0 turns this off entirely.
Visualize what KAI_CheckCorners3D is doing by spawning temporary markers for each position checked for visibility against Targ. This CVAR sets how long the markers last in tics, where 0 turns it off entirely.
Visualizes the traces fired by KAI_AvoidObstacles3D. Where the plasma ball is the averaged position to go to, green traces are unobstructed ones, and red ones were blocked by something to influence the average. The CVAR is how long the visualization lasts in ticks.
Prints information about all the groups the actor in front of the player is in, if any, easy way to check for group info from particular actors.
Prints information about all the hazards the actor in front of the player is in range of, if any.
- Home
- Features
- Classes
- Functions
- Guides