Updating
//----------------------------------------------------------
// Updating your levels
//----------------------------------------------------------
The water hack that positions all water surfaces (models) downwards by 8 is longer done in this update.
Water is exactly where you place it. So if you require the model to be where it was before with the hack then move your water models down by 8.
//----------------------------------------------------------
// Updating your scripts
//----------------------------------------------------------
There was changes for tactile (controller vibration) support a long time ago for Switch and ps4 and I don't have the change history
for that so comparing all files with the previous version is the only way to see all the changes. Using a program such as WinMerge to compare 2 folders can help with that.
If you've done a lot of scripting for your mod then I'd recommend either doing a file compare and make sure you bring all changes over to your mod or
copying all the games scripts to your mod and then applying your changes over top of them.
Angelscript has been updated and brings new features and changes.
1) Make sure to add: #pragma once
To the very top of each common script file so it will only be included once.
2) There was missing enums before and they have been exposed to scripting. Make sure you aren't redefining any of the enums now.
3) Make sure you aren't overwriting any new exposed function names. such as Math::Clamp
4) I've found that there seems to be problems with having a global variable/function in the map script that has imported a script that was also imported in the game module and they have the same name of a global function in the game module. You may need to rename one of these to avoid this "error". (Name conflict. '' is a global function.)
//----------------------------------------------------------
// Updating localization files
//----------------------------------------------------------
Previously the localization files did not have keys for all words. You must have keys for everything now.
There has been many changes to these files so I recommend copying those files over and applying your changes on top of them.
Files
defs/weaponInfo.txt
New property added: "group" (can also be assigned through scripting and is not needed in the def if done that way)
Binds this weapon to another weapons index.
Example you made a new pistol weapon at index 14 and want to group it with default pistol that has the index 2.
then set your new pistols group to 2 and whenever the user presses the key assigned to the original pistol 2 it will cycle between them. instead of the user having to cycle to the new weapon with next/prev weapon inputs.
defs/environmentInfo.txt
Sectors Ambience value are these defs minus 1. So a sectors ambience value of 3 = "Environment_Cave 2".
Each of these defs can have a reverbType. These are the reverbType values:
0 = Cave
1 = Forest
2 = Underwater
3 = Stone Room
4 = Auditorium
5 = Arena
6 = Default
7 = Generic
8 = Padded Cell
9 = Room
10 = Bathroom
11 = Living Room
12 = Concert Hall
13 = Hanger
14 = Carpeted Hallway
15 = Hallway
16 = Stone Corridor
17 = Alley
18 = City
19 = Mountains
20 = Quarry
21 = Plain
22 = Parking Lot
23 = Sewer Pipe
24 = Small Room
25 = Medium Room
26 = Large Room
27 = Medium Hall
28 = Large Hall
29 = Plate
trails\*.txt files:
"edgeSpawnSpeed" // scales the speed at which more edges spawn. Higher values spawn more often creating a smoother trail but at a big performance cost. default value = 1.0.
------------
defs changes
------------
defs/ammoInfo.txt
Ammo_Rocket, max from 6 to 24, maxBackpack from 24 to 48
defs/damageInfo.txt
Added new Generic damages entry that uses new flag bExplodeReact for the tek arrows and shotgun explosive shells.
S_Damage_Target_React_damage_50 { bExplodeReact 1 randomFactor 1.0 damage 50 }
defs/environmentInfo.txt
added new type to give a reverb effect for the spirit world levels.
Environment_Spiritual 10
{
reverbType 5
}
defs/fileLookoup.txt
fixed filename for Sounds:
$467 = "sounds/shaders/generic_82_humvee_idle__looped_.ksnd"
$468 = "sounds/shaders/generic_83_humvee_accelerate__looped_.ksnd"
Added new Portal type which tells the game which models to apply alpha vertices around the model.
Before it was hardcoded to only work with models: models/dyn_portal01 and models/dyn_portal02
Portal
{
$0 = "models/dyn_portal01.bin"
$1 = "models/dyn_portal02.bin"
}
defs/levelIconInfo.txt
Chrono icons manually set in this file now so it can be customized with mods.
defs/mapInfo.txt
title text for each hub is now localized.
defs/textureSetInfo.txt
Animate tex0550_00. Last level, one of the corner models had this texture that didn't animate.
defs/actors/animals.txt
Added Brachiosaurus used in level 6.
Animal_Bracho 24
defs/actors/misc.txt
Added TakenWeapon used in campaigner fight.
TakenWeapon 801
defs/actors/weapons.txt
Wpn_RocketLauncher 417, pickup.weapon.giveAmmo from 6 to 24
---------------
scripts changes
---------------
scripts/main.txt
line 222: Added empty savegame callback function for modders.
line 262: Added: GameVariables.SetValue("g_gallerymap", "levels/level50.map");
scripts/animations.txt: #pragma once added to top of file for this script to be included only once.
scripts/common.txt: #pragma once added to top of file for this script to be included only once.
scripts/animal.txt: added TurokBracho class. TurokFish now snap to starting height if z position changed (moved up a ramp)
---------------------------------------
scripts/weapons.txt:
**** There was changes for tactile (controller vibration) support a long time ago for switch and ps4.
I do not have the change history for that so comparing this file with the previous version is the only
way to see all the changes. Below is a list of the changes for this version only.
Arrow projectiles now fire using the correct height:
line 317: origin.z += src.ViewHeight() + src.LandingViewOffset();
Check if using alt ammo since the player can switch between ammo types now (similar to Turok 2):
line 339: if(self.Owner().HasAltAmmo()) --> if(self.Owner().UseAltAmmo())
line 436: bFiredExpslosiveShells = Player.HasAltAmmo(); --> bFiredExpslosiveShells = Player.UseAltAmmo()
line 534: if(self.Owner().HasAltAmmo()) --> if(self.Owner().UseAltAmmo())
Rocket Consume ammo from 1 to 4:
line 1034: self.Owner().ConsumeAmmo(1); --> self.Owner().ConsumeAmmo(4);
TurokAccelerator campaigner weapon steal OnBeginFire:
line 1075:
if(Game.GetCurrentMapID() == 0)
{
self.Owner().Actor().PlayerFlags() |= PF_WEAPONSTEAL;
self.PreventFire() = true;
return;
}
TurokFusionCannon campaigner weapon steal OnBeginFire:
line 1316:
if(Game.GetCurrentMapID() == 0)
{
self.Owner().Actor().PlayerFlags() |= PF_WEAPONSTEAL;
self.PreventFire() = true;
return;
}
Vibration file used for TurokFusionCannon changed:
line 1352: "tactile/explo_nuke.bnvib" --> "tactile/explo1p.bnvib"
---------------------------------------
scripts/map/level00_script.txt: line 363: handle screen shake intensity.
scripts/map/level01_script.txt: line 278: handle screen shake intensity.
scripts/map/level42_script.txt: line 85 and 93: passed in false to Game.ShowMainMenu so the mouse does not get centered when opening that menu.
scripts/map/level47_script.txt: Training level. Almost entire script changed to work correctly with the message and sound events.
scripts/map/level48_script.txt: Longhunter level.
line 57: Added: Game.PlaySound("sounds/shaders/generic_87_humvee_jump.ksnd");
scripts/map/level50_script.txt: Gallery level. Completely rewritten and fully functional with additional features and actors to view.
scripts/enemy/enemy.txt:
line 780: check for AF_WOUNDEDMORTALLY flag now from super arrow shot.
line 814: Added OnDamage function so enemies can be frozen by shockwave weapon even when dead.
scripts/enemy/insect.txt: Can freeze this enemy now. line 47: TurokEnemy::OnDeath(killer, damageDef);
scripts/enemy/sentry.txt: Removed OnDeath function so the base class can be called so we can freeze this enemy now.
scripts/enemy/turret.txt:
line 47: Added call to base class TurokEnemy::OnTick();
line 64: changes to OnDeath so enemy can be frozen.
scripts/player.txt:
- functions: KnifeAttack and KnifeParticles now handle custom def properties
- KnifeAttack checks if actor is dead or actor.TriggerInvincibility() for enemies waiting to be triggered to make them not get hit.
- Changed all knife hit values
- OnTick AAF_LAVA lowers the players frictions. AAF_DAMAGE is not needed as well.
scripts/bosses/longhunter.txt
invincible while being in a non fight state.
Added OnPreDamage callback function to change damage based on difficulty.
line 979: replace non working function Math::Clamp
scripts/bosses/hummer.txt
line 122: fixed filepath. self.PlaySound("sounds/shaders/generic_83_humvee_accelerate__looped_.ksnd");
line 301: hummer wheels not stopping
line 707: Added OnPreDamage callback function to change damage based on difficulty
Hummer no longer gets knocked back by weapons like the alien gun.
line 633: self.NoKnockBack() = true;
Hummer death smoke effects play correctly when respawning:
line 674:
self.AnimState().Set(anim_aiDeathStand, 6.0f, ANF_ROOTMOTION);
self.AnimState().SetLastFrame();
self.AnimState().SetPlayTime(4.0f);
scripts/bosses/mantis.txt: handle screen shake intensity. make him invincible while being a statue. Added OnPreDamage callback function to change damage based on difficulty.
scripts/bosses/trex.txt: handle screen shake intensity. Added OnPreDamage callback function to change damage based on difficulty.
scripts/bosses/campainger.txt: lots of changes to steal weapon from the player and be damaged by the correct weapons.
scripts/misc/mantisObjects.txt: line 195: handle screen shake intensity
scripts/misc/quakeSource.txt: line 134: handle screen shake intensity
scripts/misc/catacombWater.txt: Actor 319 origin was suppose to be set to the water height on activation and fixed it from being able to be activated again. Fixes level 5 water outdoor area when the water is draining.
scripts/misc/warpPortal.txt: StoreWarpPoint now sets the actors exact position, yaw and sector.
scripts/misc/traps.txt: Added void Unused24 function to hide falling rocks when idle and show when activated. handle screenshake intensity. Game.ShakeIntensity().