User Tools

Site Tools


hpl2:machine_for_pigs:notes

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
hpl2:machine_for_pigs:notes [2020/03/30 01:29]
mudbill old revision restored (2020/03/29 23:19)
hpl2:machine_for_pigs:notes [2020/04/04 14:14] (current)
mudbill [Player]
Line 1: Line 1:
-===== Temp notes for wiki =====+===== Engine scripts ​=====
  
-Just gonna use this page for organizing some new content – it will eventually go into other pages of this wiki.+A list of script functions available in A Machine For Pigs (that are not present in The Dark Descent). Many of TDD's scripts are available in AMFP, but not all. Some are replaced by ones listed below, and others are removed.
  
-- Mudbill +<font inherit/​inherit;;#​FF0000;;​inherit>​NOTE</​font> ​   : This page is partially incomplete. Some arguments for the functions listed here have unknown effects. If you wish to contribute, feel free to test them. It's also possible there are additional script functions not listed here that exist within the engine.
- +
-===== Engine scripts =====+
  
-A list of script functions available in A Machine For Pigs (that are not present in The Dark Descent)+----
  
 ==== General ==== ==== General ====
Line 64: Line 62:
 Adds a hint to the player'​s journal. \\ This function replaces TDD's ''​AddDiary''​. Adds a hint to the player'​s journal. \\ This function replaces TDD's ''​AddDiary''​.
  
-  - //​asNameAndTextEntry// ​ - The .lang text entry of the hint. The entry must be in category "​Journal"​ and begin with "​Hint__ckgedit>​ and end with _ckgedit_QUOT__Name" ​for the title and end with "​_Text" ​for the body.+  - //​asNameAndTextEntry// ​ - The .lang text entry of the hint. The entry must be in category "​Journal"​ and use the format Hint_MyHint_Name ​for the title and Hint_MyHint_Text ​for the body, where MyHint replaces the value you put in this argument.
   - //​asImage// ​ - This argument does not seem to be used. Presumed to be for displaying an image but possibly removed functionality. All existing occurrences are empty.   - //​asImage// ​ - This argument does not seem to be used. Presumed to be for displaying an image but possibly removed functionality. All existing occurrences are empty.
 <code c++> <code c++>
Line 83: Line 81:
   - //​abActive// ​ - True to flicker, false to not flicker   - //​abActive// ​ - True to flicker, false to not flicker
 <code c++> <code c++>
-void SetPlayerInfection(const float afInfectionLevel);+void SetPlayerInfection(const float afAmount);
 </​code>​ </​code>​
  
-Sets the infection level for the player. Infection replaces sanity from TDD and acts similar, however it goes from 0-100 instead of 100-0. An infection level above approximately 20 will affect the player'​s ability to move. Infection level above 80 will kill the player. Infection slowly decreases over time, unless high enough. \\ This function replaces TDD's ''​SetPlayerSanity''​.+Sets the [[:​hpl2:​machine_for_pigs:​infection|infection]] ​level for the player. Infection replaces sanity from TDD and acts similar, however it goes from 0-100 instead of 100-0. An infection level above approximately 20 will affect the player'​s ability to move. Infection level above 80 will kill the player. Infection slowly decreases over time, unless high enough. \\ 
 +This function replaces TDD's ''​SetPlayerSanity''​. 
 + 
 +  - //​afAmount// ​ - The level of infection to set 
 +<code c++> 
 +void AddPlayerInfection(const float afAmount);​ 
 +</​code>​ 
 + 
 +Adds an amount of infection to the player'​s current amount. \\ This function replaces TDD's ''​AddPlayerSanity''​. 
 + 
 +  - afAmount - The amount to add 
 + 
 +<code c00> 
 +float GetPlayerInfection();​ 
 +</​code>​ 
 + 
 +Returns the amount of infection the player currently has. \\ This function replaces TDD's ''​GetPlayerSanity''​.
  
-  - //​afInfectionLevel// ​ - The level of infection to set 
 <code c++> <code c++>
 void FadePlayerPitchTo(const float afPitch, const float afDeaccelleration,​ const float afSpeed); void FadePlayerPitchTo(const float afPitch, const float afDeaccelleration,​ const float afSpeed);
Line 153: Line 166:
   - //​asProp// ​ - The name of the entity/prop   - //​asProp// ​ - The name of the entity/prop
 <code c++> <code c++>
-void SetPropAnimationPosition(string@&​ asProp, const float afState);+void SetPropAnimationPosition(string@&​ asProp, const float afPosition);
 </​code>​ </​code>​
  
Line 159: Line 172:
  
   - //​asProp// ​ - The entity that is being animated   - //​asProp// ​ - The entity that is being animated
-  - //afState//  - The time within the animation, in seconds, to jump to+  - //afPosition//  - The time within the animation, in seconds, to jump to
 <code c++> <code c++>
 void SetSwingDoorOpenAmount(string@&​ asEntity, const float afOpenAmount,​ const float afTime, const bool abUnknown); void SetSwingDoorOpenAmount(string@&​ asEntity, const float afOpenAmount,​ const float afTime, const bool abUnknown);
Line 229: Line 242:
  
   - //​asProp// ​ - The attached prop   - //​asProp// ​ - The attached prop
 +<code c++>
 +void AttachAreaToProp(string@&​ asArea, string@&​ asProp, const float afUnknown);
 +</​code>​
 +
 +Attaches an area to a prop, however testing has not yielded any useful results. Originally used to attach a liquid area to a movable water plane entity in the sewers map.
 +
 +  - //​asArea// ​ - The area to attach
 +  - //​asProp// ​ - The prop to attach area to
 +  - //​alUnknown// ​ - Unknown float value
 ==== Sounds ==== ==== Sounds ====
  
Line 392: Line 414:
   - //​asEnemy// ​ - The ManPig enemy.   - //​asEnemy// ​ - The ManPig enemy.
   - //​asType// ​ - The type to set. Type can be "​Freddy",​ "​Rod",​ "​Jane"​   - //​asType// ​ - The type to set. Type can be "​Freddy",​ "​Rod",​ "​Jane"​
 +The three types allegedly describe three different personality types for the AI, according to Peter Howell in [[https://​researchportal.port.ac.uk/​portal/​files/​3364888/​PeterHowell_PhD.pdf|his PhD, section 7.4.4]].
 +
 +Extract:
 +
 +//The initial design of the game’s enemy artificial intelligence system contained three unique sets of behavioural controls. There was only one visual enemy style, however every enemy agent in the game would be assigned one of three possible ‘personalities’,​ referred to in the game’s code as the ‘Rod’, ‘Jane’ and ‘Freddy’ personality types. These personalities each had a different set of behavioural rules, thus allowing enemy agents that may otherwise appear identical to behave very differently to one another.//
 +
 +^Enemy Agent Personality Type ^Primary Behavioural Traits |
 +|Rod |– Will maintain a '​safe'​ distance to the player-character. \\ – unable to do so, will approach player character, investigate them (by getting close and smelling them), before continuing its patrol. |
 +|Jane |– Will maintain a ‘safe’ distance from player-character,​ whilst observing the player-character’s movements. \\ – If unable to maintain ‘safe’ distance, will panic and flee. \\ – If cornered and unable to flee, will attack and knock player-character to floor, then flee. \\ – Will only attack and kill player-character as a last resort. |
 +|Freddy |– Will actively hunt the player-character. \\ – Will attack and kill them if given the opportunity. |
 +
 <code c++> <code c++>
 void PlayEnemyAnimation(string@&​ asEnemy, string@&​ asAnimation,​ const bool abLoop, const float afDelay); void PlayEnemyAnimation(string@&​ asEnemy, string@&​ asAnimation,​ const bool abLoop, const float afDelay);
Line 465: Line 498:
  
   - //​asParticleSystem// ​ - The PS to destroy   - //​asParticleSystem// ​ - The PS to destroy
 +
 +\\
  
hpl2/machine_for_pigs/notes.1585531774.txt.gz · Last modified: 2020/03/30 01:29 by mudbill