HPL2/AMFP/NewEntities

From Frictional Wiki
< HPL2‎ | AMFP
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 asset in the game, and the entity file doesn't have any 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 two dedicated functions for it:

void StartPhoneRinging(string &in asPhonebox);
void 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).

Keep in mind that the green light which appears on the phoneboxes is not a part of the entity - it's a regular lamp entity which needs to be enabled by 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.
Alert icon.png Warning: Before setting this as true, 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:
    1. None - the enemy will stand in place.
    2. Stalk - the enemy will walk and on occassions run from node to node, sometimes also pausing along the way.
    3. 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, most of them seem to have no effects.

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

It also has a lot of Level Editor settings (statements marked with (?) marks haven't been confirmed):

  • 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 many times faster than in the entities' settings (?) should the enemy run
  • PatrolMoveSpeed - Whether this NPC walks or runs along its patrol. One of the few ManPig settings which has actual effects in this entity type.

AnimatedProp

This type doesn't seem to have any particular use. It is unclear why it was added, as.dae with animations will play automatically anyway, and PlayPropAnimation() isn't used with AnimatedProps.

VoiceFlashbackTrigger

It's the type of all entities from entities/voice_triggers. It seems that these entities weren't used in any of the maps, which makes this entity type unrestorable.

Note icon.png Note: This entity type is patched in the custom config 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.