Frictional Games Forum (read-only)
Update coming! Brave testers needed! - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html)
+--- Thread: Update coming! Brave testers needed! (/thread-23378.html)



Update coming! Brave testers needed! - Patrik - 09-25-2013

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. Smile

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
  1. Download the zip file (updated 11/11/13)
  2. (optional but strongly recommended) Backup your TDD install directory.
  3. Extract the redist folder into your TDD install directory. Replace files when asked to.

Copying the AMFP stuff (optional)
  1. 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.
  2. 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.
  3. 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.
  4. 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

Code:
void SetInDarknessEffectsActive(bool abX)

Sets if standing in darkness turns on night vision and drains sanity.

Code:
void StartInsanityEvent(string &in asEventName)

Starts the specified insanity event.

Code:
void StopCurrentInsanityEvent()

Stops any currently active insanity event.

asEventName- Name of the event.

Code:
void SetPlayerFallDamageDisabled(bool abX)

Disables/enables fall damage.

Code:
void SetEntityVisible(string &in asName, bool abVisible)

Shows/Hides the mesh of the specified entity.

Code:
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

Code:
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.

Code:
void SetPlayerPos(float afX, float afY, float afZ)

Sets the position of the player.

Code:
float GetPlayerPosX()
float GetPlayerPosY()
float GetPlayerPosZ()

Gets the position of the player on the specified axis.

Code:
void SetEntityPos(string &in asName, float afX, float afY, float afZ)

Sets the position of an entity.

Code:
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.

Code:
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

Code:
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.

Code:
void SetEnemySanityDecreaseActive(string &in asName, bool abX)

Enables/disables the sanity drain of the specified entity.

Code:
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.

Code:
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.

Code:
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".

Code:
void SetTeslaPigFadeDisabled(string&in asName, bool abX)

Sets if the specified tesla pig should make the screen turn black when the player is close.

Code:
void SetTeslaPigSoundDisabled(string&in asName, bool abX)

Enables/disables the tesla pig proximity sound for the specified manpig.

Code:
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.

Code:
void ForceTeslaPigSighting(string&in asName)

Forces the specified tesla pig to become visible for a short duration.

Code:
string& GetEnemyStateName(string &in asName)

Returns the name of the state the enemy is currently in.

Code:
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.

Code:
void AlertEnemyOfPlayerPresence(string &in asName)

Gives the specified enemy the player's current position and makes it search the area.

Code:
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!

Code:
float MathSin(float afX)

Calculates the sine of afX.

Code:
float MathCos(float afX)

Calculates the cosine of afX.

Code:
float MathTan(float afX)

Calculates the tangent of afX.

Code:
float MathAsin(float afX)

Calculates the arc sine of afX.

Code:
float MathAcos(float afX)

Calculates the arc cosine of afX.

Code:
float MathAtan(float afX)

Calculates the arc tangent of afX.

Code:
float MathAtan2(float afX, float afY)

Calculates the arc tangent of afX/afY.

Code:
float MathSqrt(float afX)

Calculates the square root of afX.

Code:
float MathPow(float afBase, float afExp)

Returns afBase raised to the power of afExp.

Code:
float MathMin(float afA, float afB)

Returns the smallest value.

Code:
float MathMax(float afA, float afB)

Returns the largest value.

Code:
float MathClamp(float afX, float afMin, float afMax)

Returns afX clamped to afMin and afMax.

Code:
float MathAbs(float afX)

Returns the absolute value of afX.

Code:
int StringToInt(string&in asString)

Converts the string to an int if possible, otherwise returns 0.

Code:
float StringToFloat(string&in asString)

Converts the string to a float if possible, otherwise returns 0.

Code:
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



RE: Update almost ready! Brave testers needed! - Patrik - 09-25-2013

(09-25-2013, 08:43 PM)Robosprog Wrote: So now these are released, we can use AMFP assets, correct?

Yes, the AMFP models should play nice with the update. Smile


RE: Update almost ready! Brave testers needed! - Tychaos - 09-25-2013

Awesome, I will try it out!


RE: Update almost ready! Brave testers needed! - FlawlessHappiness - 09-25-2013

When running AmnesiaTest130925.exe there is no custom_stories button. Is this intended?

Also, it doesn't seem like I can load any files from AAMFP.
I overwrote all files it asked for, including the level editor. (I know this, because my computer didn't recognize the editor).

What did i do wrong?


RE: Update almost ready! Brave testers needed! - Patrik - 09-25-2013

(09-25-2013, 09:24 PM)Darth FlawlessHair Wrote: When running AmnesiaTest130925.exe there is no custom_stories button. Is this intended?

Oops.
I'll get a new version up tomorrow. In the meantime you can change your user cfg file so it directs you to the correct map when pressing start new game.

(09-25-2013, 09:26 PM)Robosprog Wrote: Level Editor just crashed opening up character tab of entities, also a lot of the static objects bar factorybase and newchurch and sewer I think are still too big, a fair few still are in weird positions.

All amfp entities and statics directly imported into respective places.

To clarify, support has been added for the model format used in AMFP, not the entity files. While it should be okay in most cases, certain models might need to be imported by the model editor and have a new ent file created.

Regarding odd positions and sizes, I can check it out tomorrow, but there are definitely some... odd entities in the AMFP folders.

Edit: One thing you want to make sure is that you don't have any msh or anm files from AMFP in those folders.


RE: Update almost ready! Brave testers needed! - FlawlessHappiness - 09-25-2013

Ok. Been doing a little testing with the enemies.

I was able to place the wretch, the engineer and the teslapig in my map and play it.
Problem: When spottet by any of them, they flicker between the running animation and the idle animation.
They don't move an inch.

Placing the dinkywretch makes the editor crash.

The man_pig doesn't have any texture, expept for a pink stretched one. It has the grunt sounds.
It moves though, but as it comes close to the player, it stops doing anything but sounding like a grunt.


What you're saying is we're supposed to delete any .msh files from the folders, when we import the models?


RE: Update almost ready! Brave testers needed! - The chaser - 09-25-2013

Patrik, when the engine is updated, remain to update the engine scripts page, so everyone knows where to find them Smile


RE: Update almost ready! Brave testers needed! - DamnNoHtml - 09-25-2013

Downloading at 0.6kb/s. Kill me. Can someone mirror this? It actually completely stopped downloading at 0.01kb/s, and its not my internet.


RE: Update almost ready! Brave testers needed! - Apjjm - 09-25-2013

Really happy with the scripting additions in general, especially the ability to manipulate positions and mass. I am a little disappointed that there are no trig functions or sqrt exposed [a trivial wrapper to some of the more common stuff in math.h/cmath would be a lifesaver - especially now positions are exposed!] - having to roll your own is a headache, inaccurate and pretty slow Sad

Going to have a play about with the exposed functions later tonight / tomorrow and will post back if i come across anything that hasn't been mentioned yet.


RE: Update almost ready! Brave testers needed! - DamnNoHtml - 09-25-2013

Download just stops at 4.36mb, says it is complete, then fails to open because it is incomplete. Wat. Tried multiple times. This just me?