====== Naming Convention ====== ===== Level Editor ===== The following is an overview of how different game elements should be named when created inside the Level Editor. For anybody working for Frictional Games, this is a must. For all else, see it as guidelines to have consistent style, which is especially good if you want share your stuff. Remember also to look at existing code and try and copy the looks. NOTE: __Not all entities need to follow the naming convention__. In case of art assets and background elements, it is not mandatory. Object that have a gameplay role or that are called through script, though, should follow the naming convention. ==== Entities ==== ^Type ^Style ^Example ^Info | |Prop |[Name]{_Description}{_#} |Throne \\ Pillar_Left \\ Pot_Blue_12 | | |Item |Item_[Description]{_#} |Item_MagicSword |Item that the player can pick up (ends in Inventory) | |Readable |Readable_[Description]{_#} |Readable_DeathNote |Item that the player can read (ends in Notes) | |Actor |[Type]_[Description]{_#} |Monster_DarkCorridor \\ Flesher_Patrol_2 | | \\ ==== Areas ==== ^Type ^Style ^Example ^Info | |Start Position |Start{_DS}_[Location] |Start_Begin \\ Start_Corridor \\ Start_DS_MonsterNest |The first StartPos is always called Start_Begin \\ Use DS for Death Scenarios | |Trigger |Trigger_[Verb][Object] |Trigger_OpenPortcullis \\ Trigger_ActivateMonster \\ Trigger_StartSeq1 |Triggers are only considered as areas that trigger \\ functions OnCollide and OnLookAt | |Fog |FogArea_[#] |FogArea_14 | | |Death |DeathArea_[Location]{_#} |DeathArea_Chambers_1 \\ DeathArea_Corridor | | |Sound Area |SoundArea_[Description] |SoundArea_RockFalls |Area (empty Trigger) used to position a sound \\ created through script | |Soundscape |Soundscape_[Description]{_#} |Soundscape_MedRoom_2 | | |Path Node |PathNode{_Description}_[#] |PathNode_MonsterTarget_1 \\ PathNode_ChamberRoute_13 | | |Player Path |PlayerPath_[Location]_[#] |PlayerPath_Corridor_14 |Area (empty Trigger, not actual PathNodes) \\ used to define a sequence of player's positions | |Other Types |[AreaType]{_Description}_[#] |GhoulHole_Chambers_1 \\ SpawnArea_4 \\ PosArea_TargetPosition_2 | | \\ ==== Sounds ==== ^Type ^Style ^Example | |Sound |Sound_[Description] |Sound_RockFalls | \\ ==== Lights ==== ^Type ^Name ^Example ^Info | |Any |Light_[Description]{_Type}{_#} |Light_MonsterAppears_Point_2 \\ Light_Sunshine |Allows for good use of wildcards | \\ ==== Particle Systems ==== ^Type ^Style ^Example | |Any |PS_[Description]{_#} |PS_CeilingCrumble | \\ ===== Script ===== The following is an overview of how different game elements should be named when created inside a script. For anybody working for Frictional Games, this is a must. For all else, see it as guidelines to have consistent style, which is especially good if you want share your stuff. Remember also to look at existing code and try and copy the looks. ==== Objects ==== ^Type ^Style ^Example ^Info | |Timer |''Timer_[Description]'' |''Map_AddTimer("Timer_MonsterLeaves",3,"OnTimer_MonsterLeaves");'' |Unless name is used as OnTimer argument | |Sound |''Sound_[Description]'' |''Sound_CreateAtEntity("Sound_MonsterScream", …);'' | | |Particle System |''PS_[Description]{_#}'' |''ParticleSystem_CreateAtEntity("PS_CeilingCrumble", …);'' | | \\ ==== Methods ==== ^Type ^Style ^Example ^Info | |Main Callbacks |''On[Verb]_[Subject]_[Description]'' |''OnLookAt_Player_ChangeCorpsePose(){} \\ OnCollide_Monster_MakeLoudSound(){}'' \\ ''OnCollide_RingBell(){}'' |[Description] can be omitted if stating the subject hinders the clarity of the method name | |Interact |''OnInteract_[Description]'' |''OnInteract_CallElevator(){}'' | | |Death |''OnDeath_[Cause]'' |''OnDeath_MonsterCorridor(){}'' | | |Change State |''OnConnectionStateChange_[Object]'' |''OnConnectionStateChange_PortcullisLever(){}'' | | |End Of Track |''OnEndOfTrack_[MonsterName]'' |''OnEndOfTrack_MonsterCorridor(){}'' | | |Timer |''OnTimer_[TimerDescription]'' |''OnTimer_MonsterLeaves(){}'' | | |Sequence |''Seq_[Description]'' |''Seq_CallElevator(){}'' | | |Other |''[Object]_[Verb]'' |''Corridor_SetupAfterDeath(){}'' \\ ''Corpse_Reset(){}'' \\ ''LeftPillar_Move(){} \\ Monster_ClimbWindow(){}'' | | \\