Understanding kex engine for Turok moddbility like never seen before.
"Kex 2 is a game engine framework and renderer created by Samuel Villarreal (Kaiser). It is an outgrowth and extension of the Doom64 EX renderer. While a generic engine not directly related to Doom, it is notable for becoming a partial basis for the Strife: Veteran Edition OpenGL hardware renderer" "he kex engine features an enhanced engine derived from Chocolate Strife but with many additional optional features" "iser's primary focus was on the graphics engine, which is largely based on Kex 2, an evolution of the Doom64 EX code base"
A: Kex engine as we know it incorporates components from past aswell as the original version of the kex engine. Becuse of this it may be worth looking at DooM64 EX, and the powerslave remaster, aswell as Turoks and other source codes available related to the kex engine. Some of kex projects aswell as a version of the kex engine's source code is available. A pre-build of the kex engine as we know it in Turok is available to the public and seems to incorporate turoks .bin model animation container file format aswell as specific information on Turoks animation format itself. These formats pretty much have remained completely the same since the available source code version to the already compiled version of kex as seen in our steam Turok version. This info can help us better understand how the kex engine works and how we can go about understanding the kex engine in order to make our own tools for the game.

The developer of the kex engine quoted saying in the steam Turok forums as a respond to a question about how to make custom levels like a custom teleport to other levels key hub "You can add new enemies, bosses, weapons, music, environment types, hubs, map info and scripted levels."The..." (Kex engines) "format is very similar to Hexen/ZDoom so you can utilize the mapinfo definition to create your own hubs". "Kex is the codename for the engine that’s being used by Doom 64 EX. This is a heavily modified Doom engine which will eventually be used as a base to create original games and remakes of other classic console games that were never ported to the PC" As explained on the EX website presumably by the editor of the sites content; Kaiser. kex engine is also said to be based on top of, incorporating components from, or directly founded on Doom3D.
A: it's worth looking into BooM, ZDooM, Gzdoom, 3dDoom, and there respected editor tools already available, aswell as any related source codes available to the public.

" both he models and animations container files are a custom .bin binary format..." Kaiser: "I want to note that exportanim only exports a still frame of the model and not the actual animation data."
A: a custom .bin file is easier to decrypt then most other types of files, using well known file compression software, Turoks .bin files can be scanned and basic LZ4 compression algorithm's exposed for understanding. Turoks original source code already available and touches on a lot of info regarding these .bin formats and how they are used by the engine, information together that would be pretty much needed in order to completely understand how to go about unpacking these .bin files externally from the engine and properly. Regarding to how Turok only exports still frames of 3d source port versions of DooM use a Md2 and/or MD3 model format. These model formats use animations created by means of using "still frame" framebased animation methods. A single static version of a 3D model is snapshoted like a image. Then placed back to back with other static snapshots. They are then placed back to back and compressed into a container file. (Usually a format known as .pk3. Just a .zip file with the extension renamed. the end result is a animated model. Turok still frames can be exported wile in game using the export animation command but this is not properly implemented (yet?) and can be of no use. For now the command will export whatever position (frame) that a animated model is in if the said model is loaded into memory and present in game. It would prove near impossible to extract each and every frame of a animated model using this method even if a incorporation of the slowing down time command, pausing, or sequencal back-to-back animation export using that animation export command. Even then the model would export the still-position of the model as seen in game at the moment of invoking the animation export command but it would also be splitted into a few models upon export, each model being a single node of the model within its own file, witch would add to the difficulty setting, and render the method almost useless. Lastly we do know at this point that us the users could develop a basic angelscript script enabling us to present a custom animated model in game by means of several static framebased models ( the frames of the models animations of the custom animated model) in a compressed .bin container; and have it work in game thus having our own means to adding our own created models and animations into the game.

Here we see a picture of the Turok editor: http://images.akamai.steamusercontent.com/ugc/541921754577601254/7A8EBC0D77BF7D1B052F02138509F7435DAAEC17/

A: in this picture of the level editor gui within the kex editor 1.0 ; we can see a one digit decimal six part digits of one as a default value of orientation scale and rotation of a once placed model. This default value ( granted that in the end the value dose represent default of 0 ) has relation based on what we can assume a value could be within the context of default being 0.000000, in hand with the knowlage that the model can be placed at any giving point then specifically defined with these values... To the value system within the DooMbuilder software tool ( for makeing levels within the gzdoom, ZDooM, gldoom, chocolate doom, 3ddoom, ect., aswell as the original DooM version that all source ports where originally based on. ) DooMbuilder source code is also available specifcly and/or probably made available for hose who devise there own source ports of the DooM engine. ( there very own gameing engine made on top, or with in part on top of The DooM engine. Off topic but I also notice that the kex engine may share libs used in the source code that are directly from or a variant of what was used in a quake engine for console command influences and execution.

Turok dev, Quasardw quote: "Actually it's AngelScript. The best place to learn the basics of it would be on its own website, which is at http://www.angelcode.com/angelscript/ - Kaiser will release details about using the exposed objects eventually."
A: The AngelCode Scripting Library, or AngelScript as it is also known, is an extremely flexible cross-platform scripting library designed to allow applications to extend their functionality through external scripts. It has been designed from the beginning to be an easy to use component, both for the application programmer and the script writer. This is becuse of angel scripts.h and how the angelscript compiler is included in applications. Allowing for external scripts to be compiled on demand with the application onstartup via a virtual machine like method. Efforts have been made to let angelscript to call standard C functions and C++ methods with little to no need for proxy functions. The application simply registers the functions, objects, and methods declared by the scripts or external scripts should be able to work with nothing more that has to be done with your code, the scripts code both external and compiled application code. The same functions used by the application internally can also be used by the scripting engine as stated within the application which eliminates the need to duplicate functionality. New functionality can be declared. With Angelscripts modularscripting feature; Scripts can be compiled into modules that can be dynamically linked with each other and with Angelscripts nature of beig a flexible scripting language incorporating flat C (and C++) dynamic library's (dll), this also enables us to hook within scripts other scripting languages like lua or most others. This all allows for the enabling of new features in game without source code. As of late all of these methods have been used to enable others to use .NET programming with angelscript applications. Such abilitys would easily enable a co-op / multiplayer feature. On a side note it is said that it is said that Angelscripts library provides a secure environment for the compiled scripts or code i.e. the scripts can only access what the application creator explicitly exposes, and any built-in script objects are completely secure. Despite this it is said that angelscript alone presented externaly alone can be used to obtain anything from declarations, functions, even strings and much more important info from within the already compiled application. If the user knows not how two or for whatever reason can not use angelscript to obtain this info then the ability to hook wrappers, injectors, new scripting languages, ect. Could easily be used to obtain any information nessasry. Such methods can also enable a inviroment or mod that could assist assembly code decomplation, decryption, backwords engineering, ect. Of the source code of a already compiled application easily. Also off-topic but Turoks .exe format is that of a specific portable executable format witch in itself is one of the more easier to reverse file formats out there, let alone out of executables. The script engine can directly access and use registered functions, objects, and object members without the need to write proxy functions (where native calling conventions are supported). And a user can do the same regardless if the ability is enabled to the end user or not by enfolding the script engine through a series of function calls within external scripting. In the enda user has the ability to do anything that the original source code creator(s) could do before compiling the application. Some exsamples of mods and random mod ideas that can/could be made for Turok's version of the kex engine would be: in game operating systems with GUI support like a arcade machine, something like the duckpunch arcade machine from doom 3 or something like doom 3's in game control panels for flipping switches or activating software functions by the player by means of walking up to a computer,control panel or touchscreen door airlock and pushing buttons within its displayed GUI and its buttons, another feature or modding idea would be to add computers on desks in game for the player to walk up to and turn on and then go about using. These in game computers could have there very own operating systems with the ability to create, script, calculate and compute all in them selfs. This is becuse of Angelscripts flexible multi-tasking , and multi script execution at one time abilitys. Further more a even crazier yet possible mod idea would be a multiplayer multi player present in game inviroment where players can assemble computers, add peripherals to those computers but mainly in terms of what's stated; players in game can network there own in game computers together. Allowing such things as file sharing, communications like PMs between two computers of players far away from each other within the in game world. Such a mod if done right can easily enable these in game computers to be used by a player for wrighting scripts and compiling applications on these and for these in game computers (off topic but I would make first versions of this mod so these computers OPerating systems are completely constructed using lua, (in the beginning hey days of such mods release only until further brainstorm and abilitys relized and/or implemented allowing for less crude operating systems and more features for them. to witch end the applications made in game on these computers by players created by player who would make the scripts and applications completely out of lua scripts developed and compiled by the player wile he or she is in front of and using the in game computer that would use these very in game computers to run them in game, keep in mind that this would all be possible becuse of angelscripsnwounderfull abilitys to allow for external scripts aswell that are not angelscript, along with angelscript itself, and Angelscripts native compatibility with visual emulation . (with this concept instilled there is a lot of features and and potentially endless possibilitys for a game to have when it comes to the prospective of gamers who Injoy such things). Now then onto other modding ideas; .net/angelscript/c/c++/ and the ability to virtually enable any other scripting language; a co-op, or multiplayer mode can be created (something like play the Turok campaign with 2 to 8 (or more) players witch would work well in hand with a more hardcore,( more bad guys )new difficulty mod. Another mod idea would be player and NPC rag dolling or static object physics, other ideas that come to mind would be a new animation system, a POSSIBLY new rendering system, POSSIBLY a higher frame rate mod. Different and/or more modern 3D model formats in game and there support. I also like the idea of using lua hooked to the game to assist in the detection of surfaces ( this is a wall, this is a floor... .ect) and the assisting with such information in hand to allow for a player to wall run to some extent ( doing tricks on walls to get to other unecssable places within the level that could other wise not be acssable by the player. What comes to mind is some of the player movements as seen in that one parkour game ((I forget the name. You play as some girl jumping from building to building and slight wall running capabilitys)) could be helpful wile in the heat of battle) some more ideas would be the services of a individual who would/could host game inviroment externaly over a network regardless of the players real world position on earth or within a regional area. And finally a idea that comes to mind of creating a mod allowing for editing levels from witin the Turok game itself, possibly enabled by a option at he games main menu. ( + much much more )

Kasier: "You can add new enemies, bosses, weapons, music, environment types, hubs, map info and scripted levels.

The format is very similar to Hexen/ZDoom so you can utilize the mapinfo definition to create your own hubs."
A: NOTE that this comment made is of the upmost importance when it comes to doing the things we have all been asking for, unofficially promised, and disjointed that we did not get ( this info tells us a lot and was the foot through the door for having a guideline on going about makeing a map editor tool, and/or modding/makeing in general custom user made maps for Turok )

Snake Plissken " I will use his post and update it with more when I have a computer in my life once again, and as I develop my own creations I'll use this post to explain tutorials and information on how such things can and are/where done for others to learn from. I'll also add information presented by other steam users this topic will also be used to post more lagitmenly important wile Also being more specifc, technical information, and instructions. His post will also be edited for fixing spellcheck errors, and to better format it."
Last edited by Snake Plissken; Sep 6, 2016 @ 8:33am