Turok: Dinosaur Hunter Forums!
Turok Games => Turok 2 Seeds of Evil => Turok 2 Seeds of Evil Modding/Mapping => Topic started by: BehemothProgrammer on March 29, 2017, 02:13:36 PM
-
This page will help get you up and running with a decent integrated development environment for AngelScript to be used with Turok 2. The IDE will not be able to check for errors or debug but it comes with coloring and code completion and that last one is important. If you are thinking about working with T2 scripts no matter your skill level, I highly recommend following the instructions below to downloading CodeLite. The following instructions and Turok 2 API scripts were written by BehemothProgrammer.
The original plain script api text file is still located here: https://pastebin.com/kFhBNYqS (https://pastebin.com/kFhBNYqS)
I recommend following the instructions below.
Note: All Turok 2 Scripts are currently based on version 1.5.6 of the game.
1. Download CodeLite 9.0
- Download CodeLite 9.0: https://sourceforge.net/projects/codelite/files/Releases/codelite-9.0/ (https://sourceforge.net/projects/codelite/files/Releases/codelite-9.0/)
- You cannot use any newer version (at 10.0 as of now) as the auto complete will not work correctly.
2. Download Turok2API.zip
- Download Latest update of the Turok2API.zip file: https://turoksanctum.com/download/turok-2-api/ (https://turoksanctum.com/download/turok-2-api/) (Includes Help File)
- Mirror Turok2API.zip file: https://www.dropbox.com/s/oyff8tb6z9klsgm/Turok2API.zip?dl=0 (https://www.dropbox.com/s/oyff8tb6z9klsgm/Turok2API.zip?dl=0) (Includes Help File)
3. Install and launch CodeLite 9.0
- Launch CodeLite. If it asks to download a compiler just skip it as we don't need one. (mine was set to Visual C++ 11 by default)
4. Configure CodeLite 9.0:
- Settings->Code Completion->Display and Behavior: Activate "Keep function signature un-formated", "Display type info tooltips", "Display function calltip".
- Settings->Code Completion->Colouring: Enable colour local variables.
- (optional) Settings->Code Completion->Colouring: Enable colour workspace tags, also enable enumerator and macro but leave the rest with default setting.
- (optional) Settings->Code Completion: Configure the rest to your liking. For example, auto-show & case sensitive enabled.
5. Create CodeLite 9.0 Workspace and Project
- Create a new workspace. Do this by going to File->New->New Workspace menu and select a C++ Workspace. Name is as you like and set the workspace path as you like.
- Create a new project in the workspace. Do this by right-clicking on the workspace in the list to the left and choose the "Create New Project" option. Select others -> Non-code project. Name as you like and leave rest as default. Leave the compiler and debugger options alone and press Finish.
6. Add the Turok 2 Script API
- Unzip the Turok2API.zip file you downloaded in step 2.
- Add the unzipped folder to the project. Do this by right-clicking on the project in the list to the left and choose the "Import Files From Directory" option.
- Browse to the Turok2API_Scripts folder and select the folder to import. You should also add the *.txt extension to the "file extension to import" text field then press OK.
7. Add in your mods scripts and defs
- Just like in Step 6 you add your own mods scripts into the project by right-clicking on the project in the list to the left and choose the "Import Files From Directory" option.
- Browse to your scripts folder (located in your Steam or GOG Turok 2 folder) select the scripts and defs(if you have this folder) folder to import. You should also add the *.txt extension to the "file extension to import" text field then press OK. (Note: the only file you need to import from the defs folder is any common def scripts you have, the game comes with common.txt, you can remove the other files in that folder as they are not needed, but you might want to keep them for easy viewing later. your choice.)
8. Launching Turok 2 through CodeLite
- Once you have your scripts working with autocomplete you can configure CodeLite to launch Turok 2 by going to Plugins->External Tools->Configure external tools...
- Add a new external tool. Select a tool ID, Name it something like Turok 2. Set the Tool path to your horus_x64.exe. Leave the rest blank. (You may want to check the "Save all files before executing this tool" option)
- Go to Settings->Keyboard Shortcuts and type "external" in the search bar to bring up a list of external tool shortcuts. Select the External Tool ID you gave the Turok 2 executable and set your desired shortcut key to launch the game and test your scripts.
9. Working in Codelite 9.0 Additional Notes
- Workspace->Parse Workspace
- I find that everytime I import scripts in the project I need to select Workspace->Parse Workspace in order to update the auto complete options and fix coloring.
- So if you find your coloring is wrong or auto complete not working select the Workspace->Parse Workspace option to update them both.
- Rename your script extensions to .cpp I've found that .txt files do not support the auto complete so renaming them to .cpp will fix this. The only file you can't rename in the scripts folder is the games main.txt file it must always be named that.
Congratulations you should now have a decent AngelScript IDE with coloring and auto completion to help you with your Turok 2 mods!
(https://i.imgur.com/PmSyd4A.jpg)
-
Dude! really this is going to save me a bit of time and digging. Thanks a lot which reminds me I still really need to dig in your Wolfenstein Turok kpf files. Madman work. Behemoth Madman 8)
-
I don't know if this is a question or a thought, do you know where to find lighting variables for the editor? They seem random in studio and some don't have any effect.
-
Having it written out like that is pretty awesome. Nice job, subject pinned for users to find easy.
-
I don't know if this is a question or a thought, do you know where to find lighting variables for the editor? They seem random in studio and some don't have any effect.
In the properties window panel(F4) under the kexLightComponent Tab. But like most of the things in the editor (at least for now) things don't work or are missing.
-
Yes, and it's confusing tracking shit down. I guess there's a lightmap created by a "sun" actor and vertex light added by the spot, point or box light actors. Time will unravel all things.
Fine job on the scripting. I'm trying to pack up a map but the game is not recognizing it. kpf in the mods folder. I think the problem is that hubInfo.txt number.
-
Updated with more details on the kEnemyAIComponent and some of the missing ActorFlags. Added a link to the AngelScript docs on Arrays.
-
Updated with more details on the kEnemyAIComponent and some of the missing ActorFlags. Added a link to the AngelScript docs on Arrays.
Thank you!
-
Hey thanks for this saves me time I don't have at all. I know how to use scripts for Doom so I'm not a noob or anything but how the heck do we call on these? I want to maybe control an enemies ondamage??
| Messages to ScriptObject
//------------------------------------------------------------------------------------------------------------------------
void OnBeginLevel(void)
void OnTick(void)
void OnEndLevel(void)
void OnSpawn(void)
void OnPreDamage(kDamageInfo& in dmgInfo)
void OnDamage(kDamageInfo& in dmgInfo)
void OnLevelLoad(kDictMem@ pDict)
void OnDeath(kDamageInfo& in dmgInfo)
void OnTouch(kActor@ pInstigator)
void OnTrigger(kActor@ pInstigator, const int msg)
void UserEvent(const float x, const float y, const float z, const float f1, const float f2, const float f3, const float f4) //4 flag values for various uses?
void OnCollide(kActor@ pCollider)
void OnSerialize(kDict& out dict)
void OnDeserialize(kDict& in dict)
//------------------------------------------------------------------------------------------------------------------------
-
After you unzip the "game.kpf" file use this to view and copy files to your Turok 2 directory. In your Turok 2 directory create a "scripts" folder and a "defs/actors" folder.
If we wanted to display the damage done to an enemy on the screen, the first thing we need to do is create a script for enemies.
So first create a new file and call it "Enemy.txt" and place it in the scripts folder. Edit the file and create a class named Enemy and add the OnDamage callback function like so:
class Enemy : ScriptObject
{
kActor@ self;
Enemy(kActor@ actor)
{
@self = actor;
}
void OnDamage(kDamageInfo& in dmgInfo)
{
Hud.AddMessage("Enemy took " + dmgInfo.hits + " damage");
}
}
Now we just have to hook this script up to all the enemies in the game, but for testing let's just hook it up to the Raptoid enemy.
All the definitions of everything in the game is in the folder "defs". enemies are in "defs/actors/enemies.txt"
So first let's copy the "defs/actors/enemies.txt" file that was in the game.kpf that you unzipped before, and paste that into "Turok 2 - Seeds of Evil/defs/actors/enemies.txt"
Edit the file and the first entry is the Raptoid enemy. It's already defined all the properties and components needed by enemies in the game so we are going to add our custom script component class to the enemy by adding:
Begin_Component "kexScriptComponent"
scriptClass "Enemy"
End_Component
That's all you need to do. Run the game - make sure you're in developer mode by opening the console and typing "developer 1" if you weren't you need to close and reopen the game after setting it. When a Raptoid is damaged it should display that damage text.
-
https://www.dropbox.com/sh/yj01yv4rsl4u6xd/AABbxi7fznHiAB0C-zzHWxlfa?dl=0 (https://www.dropbox.com/sh/yj01yv4rsl4u6xd/AABbxi7fznHiAB0C-zzHWxlfa?dl=0)
This ScriptAPI.txt file contains all the exposed functions to the scripting engine in Turok 2 as of the 2017-03-22 update.
Some small explanations on whatever I know and the rest is question marks or the same as Turok 1. Hope this helps someone. If you want to help fill out the missing parts of these please post here so I can update it. Thanks!
Also since I went and found the enemy actor types that were not defined in the scripts for some reason, heres the remaining defs:
#define kActor_AI_Fireborn 203
#define kActor_AI_FleshSentinel 400
#define kActor_AI_DeathGuard 401
#define kActor_AI_LordoftheFlesh 402
#define kActor_AI_CaveSpider 503
#define kActor_AI_Nala 507
#define kActor_AI_WarClub 600
#define kActor_AI_HiveSoldier 710
#define kActor_AI_LordoftheDead 803
#define kActor_AI_SisterofDespair 804
#define kActor_AI_PrimagenTrooper 900
#define kActor_AI_BioBot 901
#define kActor_AI_PrimagenGuard 902
the Compsognathus is the same as the Leaper with different properties.
And zPlaceholder_67.particle is the annoying Deadman seeking blood projectile.
I extracted all usable functions from the compiled .exe including everything and anything that can be used in the scripts, Defs, and particle files. A few are not used in game yet. I'm going to reply with a epic thank you on this when I get home, I'll also compare it. I'm glad to see this released becuse, I know how much work it takes to a obtain the info and b organize it for placeing on display to others.
Also dang saved me a few by pointing out the particle name for the dead mans blood toss.
Off topic: at the moment I'm looking into hooking into all instances of the kexenemi ai component.
Class kexenemyai :kexenemyai
Selfy@ kexenemiai
~kexenemiai( kenemyai @selfy )
{
}
Void onDamage(void)
{
}
And included at main
Something or another... not at my computer at the moment.
-
After you unzip the "game.kpf" file use this to view and copy files to your Turok 2 directory. In your Turok 2 directory create a "scripts" folder and a "defs/actors" folder.
If we wanted to display the damage done to an enemy on the screen, the first thing we need to do is create a script for enemies.
So first create a new file and call it "Enemy.txt" and place it in the scripts folder. Edit the file and create a class named Enemy and add the OnDamage callback function like so:
class Enemy : ScriptObject
{
kActor@ self;
Enemy(kActor@ actor)
{
@self = actor;
}
void OnDamage(kDamageInfo& in dmgInfo)
{
Hud.AddMessage("Enemy took " + dmgInfo.hits + " damage");
}
}
Now we just have to hook this script up to all the enemies in the game, but for testing let's just hook it up to the Raptoid enemy.
All the definitions of everything in the game is in the folder "defs". enemies are in "defs/actors/enemies.txt"
So first let's copy the "defs/actors/enemies.txt" file that was in the game.kpf that you unzipped before, and paste that into "Turok 2 - Seeds of Evil/defs/actors/enemies.txt"
Edit the file and the first entry is the Raptoid enemy. It's already defined all the properties and components needed by enemies in the game so we are going to add our custom script component class to the enemy by adding:
Begin_Component "kexScriptComponent"
scriptClass "Enemy"
End_Component
That's all you need to do. Run the game - make sure you're in developer mode by opening the console and typing "developer 1" if you weren't you need to close and reopen the game after setting it. When a Raptoid is damaged it should display that damage text.
im still reading the posts so ill delete this if you touched on it after you stated it but in my opnion, it would be a proper way if we were to hook into the script class and not declare a new one? do we then not need to script much more stuff inorder to make things work and this stuff would have nothing to do with are orignal goal, other then it needed to be done inorder to pull it off from this prospective. anyways this is how i looked at it so i been going down this road when tryin to pull it off. testing now
-
im so sorry for flooding i just noticed i did that here ill fix it. i also added scriptClass "BrutalEnemy" to the def index for the raptoid actor, its the first one in the text document def file, not sure why i said that. i added #include "scripts/BrutalTestHook.txt" to main.txt . i created a BrutalTestHook.txt and added what you said but i named the class BrutalEnemy in BrutalTestHook.txt so it would line up with scriptClass. this is what you have said or am i incorrect? sorry thnx for the help im sure you know what im trying to do. lol your the man thnx.
anyways i do all of this and. the game loads but nothing prints to screen or to the hub/cmd/ anywhere. im going to do some further testing. i know scriptclass is a param in this version of the engine for a def file but i also know what className dose. however i fear that without proper hooking i would have to rebuild more then what im out to do. im going to read over your posts again and do some more testing. thnx.
EDITED a hour or so later:
oh wow ok I got it thanks. hey pretty cool when it phrazes the defs it stores the information to some extent, allowing for us to redfine another's that we can then add to the collection that is a single actor with a bunch of cool stuff now thanks, I have my understanding on how to hook to instances of actors, or an understanding, you helped and that's cool. im gonna get back to work on things, if I have a issue applying using this method under a certain circumstances ill make sure to throw my treble's past you in a post. behemoth your great thanks. ill try to get my api list compared to this one soon I feel I was incorrect about a past one I mentioned however I still see a few missing from whats been collected in this post. but back on topic: thanks again pale for the trobleshooting. even if I did flood this with comments it still really helped. I can delete some of my posts I made a bunch but idk maby someone else will see it from the way I came at it and idk maby something can help.
-
Updated with important notes on some of the event functions sent to ScriptObject as well as a execution order of the event startup functions.
ParticleFactory - IMPORTANT:
Particles are not guaranteed to spawn and may return null. Even with 100 probability set they may not spawn for unknown reasons (rare).
-
Update #2 brings a little bit of new scripting functionality mainly the new HitScan method on the WorldComponent. Finally a non hacky way to do a raycast just like Turok 1 scripting.
- new Class: kClipInfo
- new WorldComponent Method: void HitScan(kClipInfo&out, const kVec3&in origin, const kVec3&in targetOrigin, const uint EnumClipFlags, const float=0)
-
After you unzip the "game.kpf" file use this to view and copy files to your Turok 2 directory. In your Turok 2 directory create a "scripts" folder and a "defs/actors" folder.
If we wanted to display the damage done to an enemy on the screen, the first thing we need to do is create a script for enemies.
So first create a new file and call it "Enemy.txt" and place it in the scripts folder. Edit the file and create a class named Enemy and add the OnDamage callback function like so:
class Enemy : ScriptObject
{
kActor@ self;
Enemy(kActor@ actor)
{
@self = actor;
}
void OnDamage(kDamageInfo& in dmgInfo)
{
Hud.AddMessage("Enemy took " + dmgInfo.hits + " damage");
}
}
Now we just have to hook this script up to all the enemies in the game, but for testing let's just hook it up to the Raptoid enemy.
All the definitions of everything in the game is in the folder "defs". enemies are in "defs/actors/enemies.txt"
So first let's copy the "defs/actors/enemies.txt" file that was in the game.kpf that you unzipped before, and paste that into "Turok 2 - Seeds of Evil/defs/actors/enemies.txt"
Edit the file and the first entry is the Raptoid enemy. It's already defined all the properties and components needed by enemies in the game so we are going to add our custom script component class to the enemy by adding:
Begin_Component "kexScriptComponent"
scriptClass "Enemy"
End_Component
That's all you need to do. Run the game - make sure you're in developer mode by opening the console and typing "developer 1" if you weren't you need to close and reopen the game after setting it. When a Raptoid is damaged it should display that damage text.
That is really helpful man thanks a lot. Yeah keep up the good work can't wait to see your Turok 2 mod :)
-
After you unzip the "game.kpf" file use this to view and copy files to your Turok 2 directory. In your Turok 2 directory create a "scripts" folder and a "defs/actors" folder.
If we wanted to display the damage done to an enemy on the screen, the first thing we need to do is create a script for enemies.
So first create a new file and call it "Enemy.txt" and place it in the scripts folder. Edit the file and create a class named Enemy and add the OnDamage callback function like so:
class Enemy : ScriptObject
{
kActor@ self;
Enemy(kActor@ actor)
{
@self = actor;
}
void OnDamage(kDamageInfo& in dmgInfo)
{
Hud.AddMessage("Enemy took " + dmgInfo.hits + " damage");
}
}
Now we just have to hook this script up to all the enemies in the game, but for testing let's just hook it up to the Raptoid enemy.
All the definitions of everything in the game is in the folder "defs". enemies are in "defs/actors/enemies.txt"
So first let's copy the "defs/actors/enemies.txt" file that was in the game.kpf that you unzipped before, and paste that into "Turok 2 - Seeds of Evil/defs/actors/enemies.txt"
Edit the file and the first entry is the Raptoid enemy. It's already defined all the properties and components needed by enemies in the game so we are going to add our custom script component class to the enemy by adding:
Begin_Component "kexScriptComponent"
scriptClass "Enemy"
End_Component
That's all you need to do. Run the game - make sure you're in developer mode by opening the console and typing "developer 1" if you weren't you need to close and reopen the game after setting it. When a Raptoid is damaged it should display that damage text.
Oh wow it worked for me thanks a ton! I wasn't doing anything specific just messing around with the structure. Sixty Four was telling me how he could put some of you guys guides on Turok Sanctum too. And I definitely vote for that. A guide section of posts for that site is a good idea. This one should go there too for sure ;)
-
Really helpful, thanks.
I added some AI scripts in so I can put them in Raptor Fest. Might add more later
Fireborn, Biobot, Primagen Guard, Primagen Trooper, Nala, Cave Spider, Flesh Sentinal, Death Guard, and Lord of the Flesh
Fireborn kActor_AI_Fireborn
{
className "kexActor"
placeable TRUE
health 40
initialScale "0.5 0.5 0.5"
Begin_Component "kexRenderMeshComponent"
mesh "char/Fireborn.skinnedmesh"
anim "anims/Fireborn.anim"
End_Component
Begin_Component "kexWorldComponent"
radius 40.959999
wallRadius 51.199997
height 122.879997
deadHeight 20.480000
heightOffset 0.000000
bTrackGround TRUE
End_Component
Begin_Component "kexEnemyAIComponent"
commonFlags 40372
startHealth 40
startAnimID 0
startSoundID 0
painSoundID 0
deathItemDropFlags1 0
deathItemDropFlags2 0
leashRadius 2048.000000
aggressionLevel 0
tranqHealth 2
flags 17072176
attackCombatRadius 163.839996
attackLeapRadius 245.759995
attackDartRadius 245.759995
attackProjectileRadius 1024.000000
attackWeaponRadius 1228.799927
groundBehavior 1
airBehavior 0
underwaterBehavior 0
extremeDeathModelIndex 1
explodeDeathModelIndex 1
headBlownDeathModelIndex 1
leftArmBlownDeathModelIndex 2
rightArmBlownDeathModelIndex 3
bodyHoleDeathModelIndex -1
extremeDeathAnimID 7315
explodeDeathAnimID 7310
headBlownDeathAnimID 7310
leftArmBlownDeathAnimID 7345
rightArmBlownDeathAnimID 7345
bodyHoleDeathAnimID 0
idleAnimFlags 33
moveAnimFlags 8452
patrolAnimFlags 1057
evadeAnimFlags 0
combatAnimFlags 1
leapAnimFlags 0
dartAnimFlags 0
projectileAnimFlags 4
weaponAnimFlags 0
comboAnimFlags 0
normalDeathAnimFlags 8452
movingDeathAnimFlags 4
violentDeathAnimFlags 0
explosiveDeathAnimFlags 1
alertAnimFlags 1
takeCoverAnimFlags 0
leftArmWoundAnimFlags 1
rightArmWoundAnimFlags 1
fleeAnimFlags 1
End_Component
}
CaveSpider kActor_AI_CaveSpider
{
className "kexActor"
placeable TRUE
health 150
initialScale "0.500000 0.500000 0.500000"
Begin_Component "kexRenderMeshComponent"
mesh "char/Spider_Adult.skinnedmesh"
anim "anims/Spider_Adult.anim"
End_Component
Begin_Component "kexWorldComponent"
radius 61.4
wallRadius 92.2
height 112.6
deadHeight 61.43
heightOffset 0.000000
bTrackGround TRUE
End_Component
Begin_Component "kexEnemyAIComponent"
commonFlags 6420
startAnimID 11200
deathItemDropFlags1 0
deathItemDropFlags1 0
leashRadius 2560.0
aggressionLevel 0
tranqHealth 20
startSoundID 0
painSoundID 841
flags 0
attackCombatRadius 204.799988
attackLeapRadius 163.83
attackDartRadius 163.83
attackProjectileRadius 921.59
attackWeaponRadius 1842.19
groundBehavior 1
airBehavior 0
underwaterBehavior 0
extremeDeathModelIndex -1
explodeDeathModelIndex -1
headBlownDeathModelIndex -1
leftArmBlownDeathModelIndex -1
rightArmBlownDeathModelIndex -1
bodyHoleDeathModelIndex -1
extremeDeathAnimID 0
explodeDeathAnimID 0
headBlownDeathAnimID 0
leftArmBlownDeathAnimID 0
rightArmBlownDeathAnimID 0
bodyHoleDeathAnimID 0
idleAnimFlags 1057
moveAnimFlags 1057
patrolAnimFlags 1056
evadeAnimFlags 0
combatAnimFlags 1
leapAnimFlags 0
dartAnimFlags 0
projectileAnimFlags 0
weaponAnimFlags 1
comboAnimFlags 0
normalDeathAnimFlags 1057
movingDeathAnimFlags 0
violentDeathAnimFlags 0
explosiveDeathAnimFlags 1
alertAnimFlags 0
takeCoverAnimFlags 0
leftArmWoundAnimFlags 0
rightArmWoundAnimFlags 0
fleeAnimFlags 0
startHealth 150
pathTID -1
End_Component
}
Nala kActor_AI_Nala
{
className "kexActor"
placeable TRUE
health 30
initialScale "0.5 0.5 0.5"
Begin_Component "kexRenderMeshComponent"
mesh "char/Nala_normal.skinnedmesh"
anim "anims/Nala_normal.anim"
End_Component
Begin_Component "kexWorldComponent"
radius 10.2
wallRadius 51.199997
height 71.68
deadHeight 20.480000
heightOffset 0.000000
bTrackGround TRUE
End_Component
Begin_Component "kexEnemyAIComponent"
commonFlags 7444
startAnimID 0
startSoundID 0
painSoundID 0
deathItemDropFlags1 0
deathItemDropFlags2 0
leashRadius 2560.000000
aggressionLevel 0
tranqHealth 20
flags 0
attackCombatRadius 81.839996
attackLeapRadius 163.8
attackDartRadius 163.8
attackProjectileRadius 1024.000000
attackWeaponRadius 409.599927
groundBehavior 1
airBehavior 0
underwaterBehavior 0
extremeDeathModelIndex 1
explodeDeathModelIndex 1
headBlownDeathModelIndex 1
leftArmBlownDeathModelIndex -1
rightArmBlownDeathModelIndex -1
bodyHoleDeathModelIndex 1
extremeDeathAnimID 7300
explodeDeathAnimID 7300
headBlownDeathAnimID 7300
leftArmBlownDeathAnimID 0
rightArmBlownDeathAnimID 0
bodyHoleDeathAnimID 7300
idleAnimFlags 1057
moveAnimFlags 1059
patrolAnimFlags 1056
evadeAnimFlags 0
combatAnimFlags 0
leapAnimFlags 0
dartAnimFlags 0
projectileAnimFlags 1
weaponAnimFlags 0
comboAnimFlags 0
normalDeathAnimFlags 1057
movingDeathAnimFlags 0
violentDeathAnimFlags 0
explosiveDeathAnimFlags 0
alertAnimFlags 0
takeCoverAnimFlags 0
leftArmWoundAnimFlags 0
rightArmWoundAnimFlags 0
fleeAnimFlags 0
startHealth 30
pathTID -1
End_Component
}
PrimagenGuard kActor_AI_PrimagenGuard
{
className "kexActor"
placeable TRUE
health 100
initialScale "0.5 0.5 0.5"
Begin_Component "kexRenderMeshComponent"
mesh "char/Elite_Guard.skinnedmesh"
anim "anims/Elite_Guard.anim"
End_Component
Begin_Component "kexWorldComponent"
radius 51.959999
wallRadius 51.199997
height 174.879997
deadHeight 51.480000
heightOffset -2.500000
bTrackGround TRUE
End_Component
Begin_Component "kexEnemyAIComponent"
commonFlags 40324
startAnimID 0
deathItemDropFlags1 33554432
deathItemDropFlags2 0
leashRadius 1024.000000
aggressionLevel 0
tranqHealth 20
startSoundID 0
painSoundID 0
flags 0
attackCombatRadius 225.279
attackLeapRadius 358.759995
attackDartRadius 163.759995
attackProjectileRadius 409.000000
attackWeaponRadius 2048.799927
groundBehavior 0
airBehavior 0
underwaterBehavior 0
extremeDeathModelIndex 1
explodeDeathModelIndex 5
headBlownDeathModelIndex 4
leftArmBlownDeathModelIndex 2
rightArmBlownDeathModelIndex 3
bodyHoleDeathModelIndex -1
extremeDeathAnimID 7300
explodeDeathAnimID 7325
headBlownDeathAnimID 7325
leftArmBlownDeathAnimID 7100
rightArmBlownDeathAnimID 7100
bodyHoleDeathAnimID 0
idleAnimFlags 1057
moveAnimFlags 1057
patrolAnimFlags 1057
evadeAnimFlags 0
combatAnimFlags 1
leapAnimFlags 1
dartAnimFlags 0
projectileAnimFlags 0
weaponAnimFlags 3
comboAnimFlags 0
normalDeathAnimFlags 1057
movingDeathAnimFlags 0
violentDeathAnimFlags 1
explosiveDeathAnimFlags 0
alertAnimFlags 1
takeCoverAnimFlags 0
leftArmWoundAnimFlags 0
rightArmWoundAnimFlags 0
fleeAnimFlags 0
startHealth 100
pathTID 5000
End_Component
}
Biobot kActor_AI_BioBot
{
className "kexActor"
placeable TRUE
health 40
initialScale "0.5 0.5 0.5"
Begin_Component "kexRenderMeshComponent"
mesh "char/Bio-bot.skinnedmesh"
anim "anims/Bio-bot.anim"
End_Component
Begin_Component "kexWorldComponent"
radius 71.959999
wallRadius 40.199997
height 81.879997
deadHeight 30.480000
heightOffset -17.500000
bTrackGround TRUE
End_Component
Begin_Component "kexEnemyAIComponent"
commonFlags 530692
startAnimID 0
deathItemDropFlags1 8192
deathItemDropFlags2 0
leashRadius 1024.000000
aggressionLevel 0
tranqHealth 20
startSoundID 0
painSoundID 0
flags 0
attackCombatRadius 307.279
attackLeapRadius 614.759995
attackDartRadius 163.759995
attackProjectileRadius 409.000000
attackWeaponRadius 2560.799927
groundBehavior 1
airBehavior 0
underwaterBehavior 0
extremeDeathModelIndex 3
explodeDeathModelIndex -1
headBlownDeathModelIndex 3
leftArmBlownDeathModelIndex 1
rightArmBlownDeathModelIndex 2
bodyHoleDeathModelIndex -1
extremeDeathAnimID 7300
explodeDeathAnimID 0
headBlownDeathAnimID 7300
leftArmBlownDeathAnimID 7345
rightArmBlownDeathAnimID 7345
bodyHoleDeathAnimID 0
idleAnimFlags 1072
moveAnimFlags 1057
patrolAnimFlags 1057
evadeAnimFlags 0
combatAnimFlags 1
leapAnimFlags 0
dartAnimFlags 0
projectileAnimFlags 0
weaponAnimFlags 1
comboAnimFlags 0
normalDeathAnimFlags 1057
movingDeathAnimFlags 0
violentDeathAnimFlags 0
explosiveDeathAnimFlags 1
alertAnimFlags 0
takeCoverAnimFlags 0
leftArmWoundAnimFlags 0
rightArmWoundAnimFlags 0
fleeAnimFlags 0
startHealth 40
pathTID -1
End_Component
}
PrimagenTrooper kActor_AI_PrimagenTrooper
{
className "kexActor"
placeable TRUE
health 60
initialScale "0.5 0.5 0.5"
Begin_Component "kexRenderMeshComponent"
mesh "char/Trooper.skinnedmesh"
anim "anims/Trooper.anim"
End_Component
Begin_Component "kexWorldComponent"
radius 40.959999
wallRadius 40.199997
height 174.879997
deadHeight 40.480000
heightOffset -2.500000
bTrackGround TRUE
End_Component
Begin_Component "kexEnemyAIComponent"
commonFlags 34196
startAnimID 0
deathItemDropFlags1 262144
deathItemDropFlags2 0
leashRadius 2560.000000
aggressionLevel 0
tranqHealth 20
startSoundID 0
painSoundID 0
flags 0
attackCombatRadius 225.279
attackLeapRadius 256.759995
attackDartRadius 163.759995
attackProjectileRadius 409.000000
attackWeaponRadius 3072.799927
groundBehavior 0
airBehavior 0
underwaterBehavior 0
extremeDeathModelIndex 1
explodeDeathModelIndex 4
headBlownDeathModelIndex 5
leftArmBlownDeathModelIndex 2
rightArmBlownDeathModelIndex 3
bodyHoleDeathModelIndex -1
extremeDeathAnimID 7300
explodeDeathAnimID 7325
headBlownDeathAnimID 7335
leftArmBlownDeathAnimID 7345
rightArmBlownDeathAnimID 7345
bodyHoleDeathAnimID 0
idleAnimFlags 1057
moveAnimFlags 1057
patrolAnimFlags 1057
evadeAnimFlags 1
combatAnimFlags 1
leapAnimFlags 0
dartAnimFlags 0
projectileAnimFlags 0
weaponAnimFlags 0
comboAnimFlags 0
normalDeathAnimFlags 1057
movingDeathAnimFlags 0
violentDeathAnimFlags 1
explosiveDeathAnimFlags 3
alertAnimFlags 1
takeCoverAnimFlags 0
leftArmWoundAnimFlags 0
rightArmWoundAnimFlags 0
fleeAnimFlags 0
startHealth 60
pathTID 5005
End_Component
}
LordoftheFlesh kActor_AI_LordoftheFlesh
{
className "kexActor"
placeable TRUE
health 80
initialScale "0.5 0.5 0.5"
Begin_Component "kexRenderMeshComponent"
mesh "char/Lord_Of_The_Flesh.skinnedmesh"
anim "anims/Lord_Of_The_Flesh.anim"
End_Component
Begin_Component "kexWorldComponent"
radius 20.959999
wallRadius 61.199997
height 122.879997
deadHeight 20.480000
heightOffset 0.0
bTrackGround TRUE
End_Component
Begin_Component "kexEnemyAIComponent"
commonFlags 40340
startAnimID 0
deathItemDropFlags1 0
deathItemDropFlags2 0
leashRadius 2560.000000
aggressionLevel 0
tranqHealth 5
startSoundID 0
painSoundID 0
flags 0
attackCombatRadius 81.91
attackLeapRadius 163.839
attackDartRadius 163.839
attackProjectileRadius 409.59
attackWeaponRadius 1843.199
groundBehavior 0
airBehavior 0
underwaterBehavior 0
extremeDeathModelIndex 1
explodeDeathModelIndex 5
headBlownDeathModelIndex 4
leftArmBlownDeathModelIndex 2
rightArmBlownDeathModelIndex 3
bodyHoleDeathModelIndex -1
extremeDeathAnimID 7300
explodeDeathAnimID 7500
headBlownDeathAnimID 7000
leftArmBlownDeathAnimID 7345
rightArmBlownDeathAnimID 7345
bodyHoleDeathAnimID 0
idleAnimFlags 1057
moveAnimFlags 1057
patrolAnimFlags 1057
evadeAnimFlags 0
combatAnimFlags 1
leapAnimFlags 0
dartAnimFlags 0
projectileAnimFlags 0
weaponAnimFlags 6
comboAnimFlags 0
normalDeathAnimFlags 1057
movingDeathAnimFlags 1
violentDeathAnimFlags 1
explosiveDeathAnimFlags 1
alertAnimFlags 1
takeCoverAnimFlags 0
leftArmWoundAnimFlags 1
rightArmWoundAnimFlags 1
fleeAnimFlags 1
startHealth 80
pathTID 5000
End_Component
}
DeathGuard kActor_AI_DeathGuard
{
className "kexActor"
placeable TRUE
health 50
initialScale "0.5 0.5 0.5"
Begin_Component "kexRenderMeshComponent"
mesh "char/Death_Guard.skinnedmesh"
anim "anims/Death_Guard.anim"
End_Component
Begin_Component "kexWorldComponent"
radius 20.959999
wallRadius 61.199997
height 122.879997
deadHeight 20.480000
heightOffset 0.0
bTrackGround TRUE
End_Component
Begin_Component "kexEnemyAIComponent"
commonFlags 40852
startAnimID 0
deathItemDropFlags1 0
deathItemDropFlags2 0
leashRadius 2560.000000
aggressionLevel 0
tranqHealth 3
startSoundID 0
painSoundID 0
flags 0
attackCombatRadius 81.91
attackLeapRadius 163.839
attackDartRadius 163.839
attackProjectileRadius 1024.59
attackWeaponRadius 1843.199
groundBehavior 0
airBehavior 0
underwaterBehavior 0
extremeDeathModelIndex 3
explodeDeathModelIndex 4
headBlownDeathModelIndex 5
leftArmBlownDeathModelIndex 1
rightArmBlownDeathModelIndex 2
bodyHoleDeathModelIndex -1
extremeDeathAnimID 7300
explodeDeathAnimID 7200
headBlownDeathAnimID 7335
leftArmBlownDeathAnimID 7345
rightArmBlownDeathAnimID 7345
bodyHoleDeathAnimID 0
idleAnimFlags 1057
moveAnimFlags 1057
patrolAnimFlags 1057
evadeAnimFlags 3
combatAnimFlags 7
leapAnimFlags 0
dartAnimFlags 0
projectileAnimFlags 1
weaponAnimFlags 1
comboAnimFlags 0
normalDeathAnimFlags 1057
movingDeathAnimFlags 1
violentDeathAnimFlags 1
explosiveDeathAnimFlags 3
alertAnimFlags 1
takeCoverAnimFlags 0
leftArmWoundAnimFlags 1
rightArmWoundAnimFlags 1
fleeAnimFlags 1
startHealth 50
pathTID 5000
End_Component
}
FleshSentinel kActor_AI_FleshSentinel
{
className "kexActor"
placeable TRUE
health 30
initialScale "0.5 0.5 0.5"
Begin_Component "kexRenderMeshComponent"
mesh "char/Sentinel.skinnedmesh"
anim "anims/Sentinel.anim"
End_Component
Begin_Component "kexWorldComponent"
radius 10.959999
wallRadius 51.199997
height 117.879997
deadHeight 20.480000
heightOffset 0.0
bTrackGround TRUE
End_Component
Begin_Component "kexEnemyAIComponent"
commonFlags 8084
startAnimID 0
deathItemDropFlags1 0
deathItemDropFlags2 0
leashRadius 2560.000000
aggressionLevel 0
tranqHealth 2
startSoundID 0
painSoundID 0
flags 2
attackCombatRadius 81.91
attackLeapRadius 163.839
attackDartRadius 163.839
attackProjectileRadius 1024.59
attackWeaponRadius 409.199
groundBehavior 1
airBehavior 0
underwaterBehavior 0
extremeDeathModelIndex 3
explodeDeathModelIndex 5
headBlownDeathModelIndex 4
leftArmBlownDeathModelIndex 1
rightArmBlownDeathModelIndex 2
bodyHoleDeathModelIndex -1
extremeDeathAnimID 7300
explodeDeathAnimID 7201
headBlownDeathAnimID 7335
leftArmBlownDeathAnimID 7345
rightArmBlownDeathAnimID 7345
bodyHoleDeathAnimID 0
idleAnimFlags 1057
moveAnimFlags 1057
patrolAnimFlags 1058
evadeAnimFlags 3
combatAnimFlags 3
leapAnimFlags 0
dartAnimFlags 0
projectileAnimFlags 1
weaponAnimFlags 0
comboAnimFlags 0
normalDeathAnimFlags 1057
movingDeathAnimFlags 1
violentDeathAnimFlags 1
explosiveDeathAnimFlags 3
alertAnimFlags 0
takeCoverAnimFlags 0
leftArmWoundAnimFlags 1
rightArmWoundAnimFlags 1
fleeAnimFlags 1
startHealth 30
pathTID -1
End_Component
}
-
Updated the ScriptAPI.txt file with the additional actor func void AddToGallery(void) added in last update. As well I detailed some of the enemy common flags. And added a few notes here and there.
-
So I finally took the time to get a decent IDE up and running with AngelScript and Turok 2. I've included instructions and download links in the first post. So if you are thinking about working with T2 scripts no matter your skill level, I highly recommend following those instructions.
-
Man we were just talking about Doom does this xD You're awesome thanks! Under "Turok 2 tools" on Turok Sanctum. Just pm me if any changes to that post are needed there.
https://turoksanctum.com/turok-2-api/
-
Have no idea how you do these things but really cool. I'm an absolute noob in scripting so if I ever try it I would definitely use this. Good work!
-
Wow that's crazy thanks for this. That's very nice and helpful too.
-
I added the AngelScript Array class in so autocomplete would work for it and added some more notes on the mainpage of the help to include some known bugs in the game.
-
So I finally took the time to get a decent IDE up and running with AngelScript and Turok 2. I've included instructions and download links in the first post. So if you are thinking about working with T2 scripts no matter your skill level, I highly recommend following those instructions.
(https://i62.servimg.com/u/f62/18/47/51/53/milita10.jpg)
Tnx, man! : ) I just hope next remaster patch will move things on positive scale, in mp... : O
-
I added the AngelScript Array class in so autocomplete would work for it and added some more notes on the mainpage of the help to include some known bugs in the game.
As soon as I get time to check it out I will. Thanks for good work.
-
I wasn't sure where to put this additional info I've collected about T2 so I just throw it into a text file here - https://pastebin.com/raw/jjbgSStB (https://pastebin.com/raw/jjbgSStB)
It tells you what the behaviour property values means for EnemyAIComponent. The meaning of EventLink Trigger Types for some components. Mission Objectives. Mission Teleports. Cinema Types. Hidden cvars. and all the mode state values. All stuff for when your making SP maps.
-
This was a little thing I made to help enter EnemyAI flag values, think people might find it useful. https://www.dropbox.com/s/b3chdu3sig32ybp/T2Flags.zip?dl=0 (https://www.dropbox.com/s/b3chdu3sig32ybp/T2Flags.zip?dl=0)
And here's Model and Animation data editors for both Turok: Dinosaur Hunter and Turok 2 in Unity. https://www.dropbox.com/s/n3cng6coohfwjqi/TurokModelAnimEditors.zip?dl=0 (https://www.dropbox.com/s/n3cng6coohfwjqi/TurokModelAnimEditors.zip?dl=0)
-
EventLynx
-
EventLynx
Basically that's what they are xD
Behemoth thanks the flag tool could be useful for me.
:campaigner:
-
I updated the package to include new info I found. I also added several additional subpages in the help file for descriptions on stuff like all the modeStates, Event Links, more EnemyAIComponent Info, Regions, Cinematics, etc. And I added the T2Flags program for EnemyAIComponents into the zip file.