Summary and instructions
Finally the patch is just about ready for everyone to enjoy. First we want to get it out on a smaller scale to make sure everything is working as expected, and so we turn to our fabulous forum members.
Download the zip file (see guide below), extract the contents of the redist folder to the folder where you installed the game, overwriting any files in the process. You might want to do a backup first. To run the game, run AmnesiaTest13XXXX.exe (where XXXX is the date of the latest update version).
The big new thing is of course support for FBX files and collada models exported in 3D Max. Just load the models up in the editors and all should work like magic.
There's also a new entity type (Enemy_ManPig) and a couple of neat new script functions for you to enjoy.
Some entities are updated, due to a change in how bones are loaded. The change is minimal and in most cases using the old version would only produce an error in the log file and have no other visible effect. The exception being slime_anim_wall and slime_anim_ceiling. Those will not behave properly unless updated.
Give it a go, and post any issues you encounter here in the thread.
Step-by-step guide
First things first
- Download the zip file (updated 11/11/13)
- (optional but strongly recommended) Backup your TDD install directory.
- Extract the redist folder into your TDD install directory. Replace files when asked to.
Copying the AMFP stuff (optional)
- Make copies of the entities, static_objects and textures folders located in your AMFP install directory. Do NOT place them in the TDD folder just yet.
- Search through the folder copies for .msh and .anm and remove any files you find. Preferably use the Windows search functionality for this, so you don't have to manually look through all the folders.
- Now you can safely copy the folders to the TDD folder. Do NOT replace anything this time, you only want the stuff that's unique to AMFP.
- Either delete the .ent files for the new enemies (located in entities/enemy) or open them with the new ModelEditor and resave them.
Issues, notes and such
Where are the AMFP entities located?
The zip file does not contain any assets, you have to copy those from wherever you installed AMFP.
Trouble loading an entity file?
If you've copied the entity from elsewhere, first thing to try is to see if the model has a .msh file in its folder, and if so remove it and try again.
If that doesn't work, note that
the AMFP .ent files are not supported! While most should work anyway, if you run into problems you must import the model into the model editor and create a new entity file for it.
Do NOT replace any TDD .ent file with the AMFP equivalent!
At least not without thinking it through first. Many .ent files from AMFP have different properties than they do in TDD and you risk breaking compatibility with the main game as well as custom stories.
Full changelog
(
bold entries are changed from last test version)
Input
- Fixed Mouse sensitivtiy acting weird at certain aspect ratios
- Added full gamepad support.
- Arrow keys and enter can be used for GUI selection.
Modding
- Added support for FBX files and Collada models exported in 3D Max.
- Added Enemy_ManPig entity type.
- Added script function (SetInDarknessEffectsActive) for disabling the InDarkness effects.
- Added script function (StartInsanityEvent) for starting a specific insanity event.
- Added script function (StopCurrentInsanityEvent) for stopping any currently active insanity event.
- Added script function (SetPlayerFallDamageDisabled) for disabling fall damage
- Added script function (SetEntityVisible) for making an entity's mesh invisible
- Added script function (ReplaceEntity) for replacing an entity with a new one.
- Added script function (PlaceEntityAtEntity) for placing an entity at another entity.
- Added script functions (SetBodyMass, GetBodyMass) for getting and setting mass of bodies.
- Added script function (SetEnemySanityDecreaseActive) for turning off an enemy's sanity effects.
- Added script function (GetEnemyStateName) for getting an enemy's state as a string.
- Added Script function (TeleportEnemyToNode) for teleporting enemies to path nodes.
- Added Script function (TeleportEnemyToEntity) for teleporting enemies to entities.
- Added script function (SetPlayerJumpForceMul) for setting a jump force multiplier.
- Added script function (AlertEnemyOfPlayerPresence) for making enemy search for player around the player's position.
- Added script functions (SetPlayerPos, GetPlayerPosX, GetPlayerPosY, GetPlayerPosZ) for setting and getting the player's position.
- Added script functions (SetEntityPos, GetEntityPosX, GetEntityPosY, GetEntityPosZ) for setting and getting the position of entities.
- Added script functions (StringToInt, StringToFloat, StringToBool) for converting strings to other types.
- Added script functions (MathSin, MathCos, MathTan, MathAsin, MathAcos, MathAtan, MathAtan2, MathSqrt, MathPow, MathMin, MathMax, MathClamp, MathAbs) for doing some math operations.
- Replaced AddAttachedPropToProp with AttachPropToProp. The new version fixes an issue where the Z rotation parameter would be used as the Z position. The old version still works and has the same behavior as before but will trigger a warning message.
Debug
- F2 now does a quick map reload when Debug menu is loaded
- F3 now fast forwards the game when Debug menu is loaded
- Errors and warnings can now be seen in-game by checking a box in the debug menu
Bugfixes
- Fixed crashes related to destroying attached props.
- Removed ModelEditor error message when an animation has step events with no value specified.
- Fixed broken dae file that caused level editor to crash when trying to load the morgue level.
Updated entities
- hand.ent
- agrippa.ent
- alexander.ent
- ritual_prisoner.ent
- rat.ent
- servant_brute.ent
- servant_grunt.ent
- rope_beam02.ent
- spider.ent
- corpse_male.ent
- grunt_body_part1.ent
- grunt_body_part2.ent
- pig_corpse.ent
- rat_corpse.ent
- rag_plague_corpse.ent
- slime_anim_ceiling.ent
- slime_anim_wall.ent
- worn_hay_mattress.ent
- ceiling_doll.ent
- chained_prisoner.ent
- enemy_suitor.ent
- enemy_suitor_alois.ent
- enemy_suitor_basile.ent
- enemy_suitor_malo.ent
- graveyard_corpse.ent
- ritual_prisoner_noillum.ent
- worn_hay_mattress_slow.ent
- spinning_cogwheel_negative.ent
- bone_pile_human2.ent (model only)
New script functions
void SetInDarknessEffectsActive(bool abX)
Sets if standing in darkness turns on night vision and drains sanity.
void StartInsanityEvent(string &in asEventName)
Starts the specified insanity event.
void StopCurrentInsanityEvent()
Stops any currently active insanity event.
asEventName- Name of the event.
void SetPlayerFallDamageDisabled(bool abX)
Disables/enables fall damage.
void SetEntityVisible(string &in asName, bool abVisible)
Shows/Hides the mesh of the specified entity.
void ReplaceEntity(string &in asName, string &in asBodyName, string &in asNewEntityName, string &in asNewEntityFile, bool abFullGameSave)
Removes the specified entity and places a new entity at its location.
asName- the name of the entity that should be replaced.
asBodyName- name of the body in the entity to place the new entity at. If "", the first body in the entity will be used.
asNewEntityName- name of the entity that should be created.
asNewEntityFile- .ent file that the new entitiy should be created from.
abFullGameSave- if ALL properties should be saved for the created entity
void PlaceEntityAtEntity(string &in asName, string &in asTargetEntity, string &in asTargetBodyName, bool abUseRotation)
Places the specifed entity at the position of another enity. Does not work for enemies. Use TeleportEnemyToEntity instead.
asName- The entity to place.
asTargetEntity- The entity at which to place the entity.
asTargetBodyName- Specific body in the target entity to place the entity at. If "", the first body in the entity will be used.
abUseRotation- If the entity should get the rotation of the target body as well as its position.
void SetPlayerPos(float afX, float afY, float afZ)
Sets the position of the player.
float GetPlayerPosX()
float GetPlayerPosY()
float GetPlayerPosZ()
Gets the position of the player on the specified axis.
void SetEntityPos(string &in asName, float afX, float afY, float afZ)
Sets the position of an entity.
float GetEntityPosX(string &in asName)
float GetEntityPosY(string &in asName)
float GetEntityPosZ(string &in asName)
Gets the position of an entity on the specified axis.
void SetBodyMass(string &in asName, float afMass)
Sets the mass of the specified body.
asName- Name of the body. Note that the name of a body in an entity is EntityName_BodyName.
afMass- Mass to set
float GetBodyMass(string &in asName)
Gets the mass of the specified body.
asName- Name of the body. Note that the name of a body in an entity is EntityName_BodyName.
void SetEnemySanityDecreaseActive(string &in asName, bool abX)
Enables/disables the sanity drain of the specified entity.
void TeleportEnemyToNode(string &in asEnemyName, string &in asNodeName, bool abChangeY)
Instantly teleports the enemy to the specified PathNode.
asEnemyName- Enemy to teleport.
asNodeName- Node to teleport to.
abChangeY- if false, the enemy keeps its current y position. Otherwise the y position of the node will be used.
void TeleportEnemyToEntity(string &in asEnemyName, string &in asTargetEntity, string &in asTargetBody, bool abChangeY)
Instantly teleports the enemy to the specified entity.
asEnemyName- Enemy to teleport.
asTargetEntity- Entity to teleport to.
asTargetBody- Specific body in the entity to teleport to, if "" the first body found will be used.
abChangeY- if false, the enemy keeps its current y position. Otherwise the y position of the entity will be used.
void ChangeManPigPose(string&in asName, string&in asPoseType)
Changes the pose of the specifed ManPig.
asName- Name of the ManPig
asPoseType- Pose to set. Can be "Biped" or "Quadruped".
void SetTeslaPigFadeDisabled(string&in asName, bool abX)
Sets if the specified tesla pig should make the screen turn black when the player is close.
void SetTeslaPigSoundDisabled(string&in asName, bool abX)
Enables/disables the tesla pig proximity sound for the specified manpig.
void SetTeslaPigEasyEscapeDisabled(string&in asName, bool abX)
Enables/disables functionality in the specified tesla pig that makes it easier for the player to get away when being hunted.
void ForceTeslaPigSighting(string&in asName)
Forces the specified tesla pig to become visible for a short duration.
string& GetEnemyStateName(string &in asName)
Returns the name of the state the enemy is currently in.
void SetPlayerJumpForceMul(float afMul)
Sets a multiplier for how much force is applied on the player when jumping. Higher values = higher jumps. 1 is the default value.
void AlertEnemyOfPlayerPresence(string &in asName)
Gives the specified enemy the player's current position and makes it search the area.
void AttachPropToProp(string& asPropName, string& asAttachName, string& asAttachFile, float afPosX, float afPosY, float afPosZ, float afRotX, float afRotY, float afRotZ)
Attaches a prop to another prop (fixed version of old AddAttachedPropToProp).
asPropName - the prop to attach another prop at
asAttachName - internal name of the prop that gets attached
asAttachFile - the prop that gets attached extension .ent
afPosX - X position of the attach from the prop
afPosY - Y position of the attach from the prop
afPosZ - Z position of the attach from the prop
afRotX - rotation around X axis of the attach
afRotY - rotation around Y axis of the attach
afRotZ - rotation around ZX axis of the attach
Note: for the purposes of “AddEntityCollideCallback”, attached props will not call the callback function if they collide with a “static_object” or a “StaticProp” entity type!
Calculates the sine of afX.
Calculates the cosine of afX.
Calculates the tangent of afX.
float MathAsin(float afX)
Calculates the arc sine of afX.
float MathAcos(float afX)
Calculates the arc cosine of afX.
float MathAtan(float afX)
Calculates the arc tangent of afX.
float MathAtan2(float afX, float afY)
Calculates the arc tangent of afX/afY.
float MathSqrt(float afX)
Calculates the square root of afX.
float MathPow(float afBase, float afExp)
Returns afBase raised to the power of afExp.
float MathMin(float afA, float afB)
Returns the smallest value.
float MathMax(float afA, float afB)
Returns the largest value.
float MathClamp(float afX, float afMin, float afMax)
Returns afX clamped to afMin and afMax.
Returns the absolute value of afX.
int StringToInt(string&in asString)
Converts the string to an int if possible, otherwise returns 0.
float StringToFloat(string&in asString)
Converts the string to a float if possible, otherwise returns 0.
bool StringToBool(string&in asString)
Converts the string to a bool if possible, otherwise returns false.
ManPig animations
To be sure the ManPig entity type behaves correctly, the entity should have following animations set in its .ent file:
- IdleBiped
- IdleBipedExtra1
- IdleBipedExtra2
- WalkBiped
- RunBiped
- FleeBiped
- NoticeBiped
- ThreatLoopBiped
- AttackBiped1
- AttackBiped2
- AttackBiped3
- BiteBiped
- ChargeBiped
- IdleQuadruped
- IdleQuadrupedExtra1
- IdleQuadrupedExtra2
- WalkQuadruped
- RunQuadruped
- FleeQuadruped
- ThreatLoopQuadruped
- NoticeQuadruped
- AttackQuadruped1
- AttackQuadruped2
- AttackQuadruped3
- BiteQuadruped
- ChargeQuadruped