HPL2/AMFP/NewEntities

From Frictional Wiki
< HPL2‎ | AMFP
Revision as of 17:03, 20 July 2020 by Darkfire (talk | contribs) (Darkfire moved page Hpl2:Machine for pigs:new entity types to HPL2/AMFP/NewEntities: Reorganising old pages)
Jump to navigation Jump to search

New Entity Types

MFP features a few new entity types.

PhoneBox

The entity which executes phonecalls. There's only one such aset in the game, and the entity itself doesn't have and User Defined Settings. In the Level Editor, it has multiple settings:

  • GlowEnabled - If on, the phone will glow like an inventory item until it's interacted with (even when it's not calling).
  • GlowColor - Pick the glow color
  • GlowOutlineColor - doesn't seem to affect anything
  • UpdateAnimationWhenCulled - Whether the animations should play when the phone isn't looked at (?)
  • VoiceFile1 - The .ogg file to play. The file has to be located in the sounds folder or one of its subfolders.
  • TextEntry1 - First subtitle lang entry. Category must be 'Voice'
  • Delay1 - Time until the first subtitle is displayed
  • TextEntry2 through 7 - the next subtitle entries.
  • Delay2 through 7 - Time(s) since the last subtitle after which the next subtitle is displayed.

Not all 7 entries must be used, but there can't be more than that in a single phonecall.

The PhoneBox entity has dedicated functions for it:

StartPhoneRinging(string &in asPhonebox);
StopPhoneRinging(string &in asPhonebox);

asPhonebox - the phone box entity to use

The phone won't start calling until the StartPhoneRinging function is played. StopPhoneRinging can be used when e.g. the player leaves an area without picking up the phone, or takes too long.

When StartPhoneRinging is used, the phone will start ringing (the sound is only hearable in a quite short distance, and a bell animation will play) and the player will be prompted with a custom interaction icon to click on the phone. This will play a switch animation as well as the voice file, and display all the defined subtitles at specified intervals. After the voice file finishes playing, another switch animation will play and the glow will disappear (if it was used).

Something to keep in mind that the green light on the phoneboxes is not a part of the entity - it's a regular ligth which needs to be enabled by manual scripting.

Enemy_ManPig

This enemy type has multiple new settings in the LevelEditor. They are all documented in the editor hover-hints, but some of them require additional explanations:

Hallucination - uses enemy_hallucination_disappear.snt, which isn't in the game files but could be modded in. The hallucination effect now consist of some organic particles instead of the TDD dust particle.
Pose - determines whether the enemy will move and attack upright or on all fours.
ThreatenOnAlert - if ticked, the enemy will play an additional animation before chasing/fleeing from the player.
FleeFromPlayer - the enemy will run away when it notices the player. Running to the furthest pathnode seems to be the main behaviour. The monster will still attack if the player comes too close or encounters the monster after it fled.
Before using this, make sure that your level has PathNodes - otherwise the game will crash when the monster notices the player!
AutoDisableAfterFlee - if the monster flees and can't be seen by the player anymore, it will disappear.
IdleBehaviour - determines what the enemy does when not engaged or patrolling (or when there are no patrol nodes left to walk to). Options are:

  • None - the enemy will stand in place.
  • Stalk - the enemy will walk and on occassions run from node to node, sometimes also pausing along the way.
  • Track - unspecified behaviour. Might be broken, unfinished, or dependant on particular circumstances. Testing resulted in same behaviour as None.

Enemy_Child

It is an enemy variation used for acting out scenes. It has some of the Pig enemy settings. However, they are mostly useless.

This "enemy" doesn't seem to respond to any player input, asides from proximity.

It also has a lot of Level Editor settings (things with ? marks haven't been tested):

  • AutoRemoveAtPathEnd - If enemy should be removed when it reaches the end of the path.
  • AutoReverseAtPathEnd - If enemy should turn around (?) when it reaches the end of the path.
  • IsOccluder - function unknown, possibly related to rendering or lighting
  • AutoRemoveMinPlayerDistance - At what distance from the player to remove the NPC (?)
  • Invisible, Blind, Deaf - don't seem to have any effect.
  • DamageMul - Doesn't seem to be useful since Child NPCs don't even have attack animations.
  • RunSpeedMul - Multiplier; how much faster than in the entities settings (?) should the run
  • PatrolMoveSpeed - Whether this NPC walks or runs along its patrol. One of the few ManPig settings which has actual effects.

AnimatedProp

Doesn't seem to have much to it, it is unclear why it was added (.dae with animations play anyway, and PlayPropAnimation isn't used with AnimatedProps).

VoiceFlashbackTrigger

It's the type of all entities from entities/voice_triggers. It seems that it wasn't used in any of the maps, which makes this entity type unrestorable((The entity type itself will be patched so that it doesn't give errors when loaded into the editor. However, the intended functionality cannot be used and the editors will only show generic settings for the entity.)) .