### StartTimeMeasurement Source: https://github.com/aintunez/darkscript3/blob/master/DarkScript3/Resources/ds3-emedf.html Starts a time measurement for a playlog. Currently unused. ```APIDOC ## StartTimeMeasurement ### Description Starts a time measurement for a playlog. Currently unused. ### Signature ``` StartTimeMeasurement( uint measurementId, uint playlogName, byte overwrite) ``` ### Parameters - **measurementId** (uint) - Required - The ID of the measurement. - **playlogName** (uint) - Required - The name identifier of the playlog. - **overwrite** (byte) - Required - Whether to overwrite an existing measurement. ### Usage Unused. ``` -------------------------------- ### CreatePlaylog Source: https://github.com/aintunez/darkscript3/blob/master/DarkScript3/Resources/ds3-emedf.html Creates a playlog entry. Currently unused. ```APIDOC ## CreatePlaylog ### Description Creates a playlog entry. Currently unused. ### Signature ``` CreatePlaylog( uint playlogName) ``` ### Parameters - **playlogName** (uint) - Required - The name identifier of the playlog. ### Usage Unused. ``` -------------------------------- ### IfElapsedFrames Source: https://github.com/aintunez/darkscript3/blob/master/DarkScript3/Resources/ds3-emedf.html Condition instruction that checks if a specified number of frames have elapsed since the start of the event. ```APIDOC ## IfElapsedFrames ### Description Condition instruction that checks if a specified number of frames have elapsed since the start of the event. ### Parameters - **resultConditionGroup** (sbyte) - Required - The condition group to set the result. - **targetTimeFrames** (int) - Required - The target time in frames. ### Usage Used in common_func, m34_01_00_00, m37_00_00_00, m40_00_00_00. ``` -------------------------------- ### IfElapsedSeconds Source: https://github.com/aintunez/darkscript3/blob/master/DarkScript3/Resources/ds3-emedf.html Condition instruction that checks if a specified number of seconds have elapsed since the start of the event. ```APIDOC ## IfElapsedSeconds ### Description Condition instruction that checks if a specified number of seconds have elapsed since the start of the event. ### Parameters - **resultConditionGroup** (sbyte) - Required - The condition group to set the result. - **targetTimeSeconds** (float) - Required - The target time in seconds. ### Usage Used in common_func, m30_00_00_00, m31_00_00_00, m32_00_00_00, m33_00_00_00, m34_01_00_00, m35_00_00_00, m37_00_00_00, m38_00_00_00, m39_00_00_00, m40_00_00_00, m41_00_00_00, m45_00_00_00. ``` -------------------------------- ### RegisterAllMapPiecesAsBackground Source: https://github.com/aintunez/darkscript3/blob/master/DarkScript3/Resources/ac6-emedf.html Registers all map pieces as background. Used in mission m01_01_40_00. ```APIDOC ## RegisterAllMapPiecesAsBackground ### Description Registers all map pieces as background. Used in mission m01_01_40_00. ### Signature ``` RegisterAllMapPiecesAsBackground() ``` ### Parameters None. ``` -------------------------------- ### RequestCharacterAIReplan Source: https://github.com/aintunez/darkscript3/blob/master/DarkScript3/Resources/ds1-emedf.html Requests a replan of the character's AI. ```APIDOC ## RequestCharacterAIReplan ### Description Requests a replan of the character's AI. ### Method Instruction 2004[20] ### Parameters - **entityId** (int) - Required - The ID of the character entity. ``` -------------------------------- ### UseFarviewCamera Source: https://github.com/aintunez/darkscript3/blob/master/DarkScript3/Resources/nr-emedf.html Uses a farview camera. This instruction is currently unused. ```APIDOC ## UseFarviewCamera ### Description Uses a farview camera. This instruction is currently unused. ### Method Instruction ### Signature ``` UseFarviewCamera( uint farviewId, uint assetEntityId, int dummypolyId) ``` ### Parameters - **farviewId** (uint) - Required - The ID of the farview camera. - **assetEntityId** (uint) - Required - The ID of the asset entity. - **dummypolyId** (int) - Required - The ID of the dummypoly. ``` -------------------------------- ### PlayCutsceneAndWarpPlayerWithEnvReset Source: https://github.com/aintunez/darkscript3/blob/master/DarkScript3/Resources/ac6-emedf.html Plays a cutscene and warps the player with an environment reset. Includes warp point, map, and player entity IDs. ```APIDOC ## PlayCutsceneAndWarpPlayerWithEnvReset ### Description Plays a cutscene and warps the player with an environment reset. Includes warp point, map, and player entity IDs. ### Signature ``` PlayCutsceneAndWarpPlayerWithEnvReset( int cutsceneId, uint playbackMethod, uint warpPointEntityId, int mapId, uint playerEntityId) ``` ### Parameters - **cutsceneId** (int) - Required - Identifier of the cutscene to play. - **playbackMethod** (uint) - Required - Method of playback. - **warpPointEntityId** (uint) - Required - Entity ID of the warp point. - **mapId** (int) - Required - Identifier of the map. - **playerEntityId** (uint) - Required - Entity ID of the player to warp. ``` -------------------------------- ### ShowTextOnLoadingScreen Source: https://github.com/aintunez/darkscript3/blob/master/DarkScript3/Resources/nr-emedf.html Shows or hides text on the loading screen. This instruction is currently unused. ```APIDOC ## ShowTextOnLoadingScreen ### Description Shows or hides text on the loading screen. This instruction is currently unused. ### Method Instruction ### Signature ``` ShowTextOnLoadingScreen( byte state) ``` ### Parameters - **state** (byte) - Required - Whether to disable or enable the text. ### Simplified Versions - `DisableTextOnLoadingScreen()` - Disables the text on the loading screen. - `EnableTextOnLoadingScreen()` - Enables the text on the loading screen. ``` -------------------------------- ### PlayGarageReturnCutscene Source: https://github.com/aintunez/darkscript3/blob/master/DarkScript3/Resources/ac6-emedf.html Plays the garage return cutscene. Currently unused. ```APIDOC ## PlayGarageReturnCutscene ### Description Plays the garage return cutscene. Currently unused. ### Signature ``` PlayGarageReturnCutscene() ``` ### Parameters None. ``` -------------------------------- ### SetPsuedoMultiplayerReturnPosition Source: https://github.com/aintunez/darkscript3/blob/master/DarkScript3/Resources/nr-emedf.html Sets the return position for pseudo multiplayer. This instruction is currently unused. ```APIDOC ## SetPsuedoMultiplayerReturnPosition ### Description Sets the return position for pseudo multiplayer. This instruction is currently unused. ### Method Instruction ### Signature ``` SetPsuedoMultiplayerReturnPosition( uint areaEntityId) ``` ### Parameters - **areaEntityId** (uint) - Required - The ID of the area entity. ``` -------------------------------- ### ParameterOutput Source: https://github.com/aintunez/darkscript3/blob/master/DarkScript3/Resources/ds3-emedf.html Outputs a playlog parameter. Currently unused. ```APIDOC ## ParameterOutput ### Description Outputs a playlog parameter. Currently unused. ### Signature ``` ParameterOutput( byte category, uint playlogName, byte outputMultiplayerStatus) ``` ### Parameters - **category** (byte) - Required - The category of the playlog parameter. - **playlogName** (uint) - Required - The name identifier of the playlog. - **outputMultiplayerStatus** (byte) - Required - Whether to output multiplayer status. ### Usage Unused. ``` -------------------------------- ### HandleMinibossDefeat Source: https://github.com/aintunez/darkscript3/blob/master/DarkScript3/Resources/ac6-emedf.html Handles miniboss defeat logic. ```APIDOC ## HandleMinibossDefeat ### Description Handles miniboss defeat logic. ### Signature ``` HandleMinibossDefeat( uint entityId) ``` ### Parameters - **entityId** (uint) - Required - Miniboss entity. ``` -------------------------------- ### PlayCutsceneToAll Source: https://github.com/aintunez/darkscript3/blob/master/DarkScript3/Resources/ac6-emedf.html Plays a cutscene to all players. Specifies the cutscene ID and playback method. ```APIDOC ## PlayCutsceneToAll ### Description Plays a cutscene to all players. Specifies the cutscene ID and playback method. ### Signature ``` PlayCutsceneToAll( int cutsceneId, uint playbackMethod) ``` ### Parameters - **cutsceneId** (int) - Required - Identifier of the cutscene to play. - **playbackMethod** (uint) - Required - Method of playback. ``` -------------------------------- ### OpenWorldMapPoint Source: https://github.com/aintunez/darkscript3/blob/master/DarkScript3/Resources/nr-emedf.html Opens a world map point. Used in common_func scripts. ```APIDOC ## OpenWorldMapPoint ### Description Opens a world map point. ### Method Instruction ### Signature ``` OpenWorldMapPoint( int worldMapPointParamId, float distance) ``` ### Parameters - **worldMapPointParamId** (int) - Required - The ID of the world map point parameter. - **distance** (float) - Required - The distance at which the point opens. ``` -------------------------------- ### PlayCutsceneAndWarpPlayer Source: https://github.com/aintunez/darkscript3/blob/master/DarkScript3/Resources/ac6-emedf.html Plays a cutscene and warps the player to a specified point. Includes map and player entity IDs. ```APIDOC ## PlayCutsceneAndWarpPlayer ### Description Plays a cutscene and warps the player to a specified point. Includes map and player entity IDs. ### Signature ``` PlayCutsceneAndWarpPlayer( int cutsceneId, uint playbackMethod, uint pointEntityId, int mapId, uint playerEntityId) ``` ### Parameters - **cutsceneId** (int) - Required - Identifier of the cutscene to play. - **playbackMethod** (uint) - Required - Method of playback. - **pointEntityId** (uint) - Required - Entity ID of the warp point. - **mapId** (int) - Required - Identifier of the map to warp to. - **playerEntityId** (uint) - Required - Entity ID of the player to warp. ``` -------------------------------- ### InitiatePassiveServermediatedMultiplayerItem Source: https://github.com/aintunez/darkscript3/blob/master/DarkScript3/Resources/ds2-emedf.html Initiates a passive server-mediated multiplayer item. Used in SpEffectRing. ```APIDOC ## InitiatePassiveServermediatedMultiplayerItem ### Description Initiates a passive server-mediated multiplayer item. ### Signature ``` InitiatePassiveServermediatedMultiplayerItem( byte passiveServerItemType) ``` ### Parameters - **passiveServerItemType** (byte) - Required - Type of passive server item. ### Usage Contexts - SpEffectRing ``` -------------------------------- ### ShowFreeDialog Source: https://github.com/aintunez/darkscript3/blob/master/DarkScript3/Resources/ac6-emedf.html Shows a free dialog of the specified type and ID. Used in multiple mission scripts. ```APIDOC ## ShowFreeDialog ### Description Shows a free dialog with the given type and ID. ### Signature ``` ShowFreeDialog( int freeDialogType, int freeDialogId) ``` ### Parameters - **freeDialogType** (int) - Required - The type of free dialog to show. - **freeDialogId** (int) - Required - The ID of the free dialog to show. ### Usage Used in m01_20_90_00, m01_20_91_00, m01_20_92_00, m01_20_93_00, m01_23_90_00, m01_24_90_00, m01_90_02_00. ``` -------------------------------- ### InitializeEvent Source: https://github.com/aintunez/darkscript3/blob/master/DarkScript3/Resources/er-emedf.html Initializes an event with a specified event slot ID, event ID, and optional parameters. This is a system-level instruction used across many map scripts. ```APIDOC ## InitializeEvent ### Description Initializes an event with the given event slot ID, event ID, and optional parameters. ### Method Instruction 2000[00] ### Signature ``` InitializeEvent( int eventSlotId, uint eventId, uint... parameters) ``` ### Parameters - **eventSlotId** (int) - The event slot identifier - **eventId** (uint) - The event identifier - **parameters** (uint...) - Optional additional parameters ``` ```APIDOC ## SetNetworkSyncState ### Description Sets the network synchronization state for the event system. ### Method Instruction 2000[02] ### Signature ``` SetNetworkSyncState( byte state) ``` ``` -------------------------------- ### Unknown200391 Source: https://github.com/aintunez/darkscript3/blob/master/DarkScript3/Resources/nr-emedf.html An unknown instruction with ID 2003[91]. Used in common_func and m60_45_36_30 scripts. ```APIDOC ## Unknown200391 ### Description An unknown instruction with ID 2003[91]. Used in common_func and m60_45_36_30 scripts. ### Method Instruction ### Signature ``` Unknown200391( uint entityId, float distance) ``` ### Parameters - **entityId** (uint) - Required - The ID of the entity. - **distance** (float) - Required - The distance parameter. ``` -------------------------------- ### PlayCutsceneAndDisplayResults Source: https://github.com/aintunez/darkscript3/blob/master/DarkScript3/Resources/ac6-emedf.html Plays a cutscene and displays results. Specifies the cutscene ID and playback method. ```APIDOC ## PlayCutsceneAndDisplayResults ### Description Plays a cutscene and displays results. Specifies the cutscene ID and playback method. ### Signature ``` PlayCutsceneAndDisplayResults( int cutsceneId, uint playbackMethod) ``` ### Parameters - **cutsceneId** (int) - Required - Identifier of the cutscene to play. - **playbackMethod** (uint) - Required - Method of playback. ``` -------------------------------- ### InitiateClientmediatedMultiplayerItem Source: https://github.com/aintunez/darkscript3/blob/master/DarkScript3/Resources/ds2-emedf.html Initiates a client-mediated multiplayer item. Used in SpEffectActiveItem and SpEffectCondition. ```APIDOC ## InitiateClientmediatedMultiplayerItem ### Description Initiates a client-mediated multiplayer item. ### Signature ``` InitiateClientmediatedMultiplayerItem( byte clientItemType) ``` ### Parameters - **clientItemType** (byte) - Required - Type of client item. ### Usage Contexts - SpEffectActiveItem - SpEffectCondition ``` -------------------------------- ### Condition Functions Source: https://github.com/aintunez/darkscript3/blob/master/DarkScript3/Resources/ds1-emedf.html Documentation for condition functions used in DarkScript3 event scripting, including their signatures, parameters, and simpler versions. ```APIDOC ## Compare ### Description Compares two integer values using a specified comparison type. ### Signature ``` Compare( sbyte comparisonType, int lefthandSide, int righthandSide) ``` ### Parameters - **comparisonType** (sbyte) - Required - The type of comparison to perform. - **lefthandSide** (int) - Required - The left-hand side value. - **righthandSide** (int) - Required - The right-hand side value. ### Simpler Versions - `== != > < >= <=` - Comparing `leftHandSide` and `rightHandSize`. ``` ```APIDOC ## ElapsedSeconds ### Description Checks if a specified number of seconds have elapsed. ### Signature ``` ElapsedSeconds( float targetTimeSeconds) ``` ### Parameters - **targetTimeSeconds** (float) - Required - The target time in seconds. ``` ```APIDOC ## ElapsedFrames ### Description Checks if a specified number of frames have elapsed. ### Signature ``` ElapsedFrames( int targetTimeFrames) ``` ### Parameters - **targetTimeFrames** (int) - Required - The target time in frames. ``` ```APIDOC ## RandomElapsedSeconds ### Description Checks if a random number of seconds within a range have elapsed. ### Signature ``` RandomElapsedSeconds( float targetSecondsMin, float targetSecondsMax) ``` ### Parameters - **targetSecondsMin** (float) - Required - The minimum target seconds. - **targetSecondsMax** (float) - Required - The maximum target seconds. ``` ```APIDOC ## RandomElapsedFrames ### Description Checks if a random number of frames within a range have elapsed. ### Signature ``` RandomElapsedFrames( int targetFramesMin, int targetFramesMax) ``` ### Parameters - **targetFramesMin** (int) - Required - The minimum target frames. - **targetFramesMax** (int) - Required - The maximum target frames. ``` ```APIDOC ## EventFlagState ### Description Checks the state of an event flag. ### Signature ``` EventFlagState( byte desiredFlagState, byte targetEventFlagType, int targetEventFlagId) ``` ### Parameters - **desiredFlagState** (byte) - Required - The desired state of the flag. - **targetEventFlagType** (byte) - Required - The type of event flag. - **targetEventFlagId** (int) - Required - The ID of the event flag. ### Simpler Versions - `EventFlag(int targetEventFlagId)` - Where `targetEventFlagType = TargetEventFlagType.EventFlag` and `desiredFlagState = ON or OFF`. - `ThisEvent()` - Where `targetEventFlagType = TargetEventFlagType.EventID` and `targetEventFlagId = 0` and `desiredFlagState = ON or OFF`. - `ThisEventSlot()` - Where `targetEventFlagType = TargetEventFlagType.EventIDAndSlotNumber` and `targetEventFlagId = 0` and `desiredFlagState = ON or OFF`. ``` ```APIDOC ## BatchEventFlagsState ### Description Checks the state of a batch of event flags. ### Signature ``` BatchEventFlagsState( byte desiredFlagState, byte targetEventFlagType, int startingTargetEventFlagId, int endingTargetEventFlagId) ``` ### Parameters - **desiredFlagState** (byte) - Required - The desired logical state of the flags. - **targetEventFlagType** (byte) - Required - The type of event flags. - **startingTargetEventFlagId** (int) - Required - The starting flag ID. - **endingTargetEventFlagId** (int) - Required - The ending flag ID. ### Simpler Versions - `AllBatchEventFlags(int startingTargetEventFlagId, int endingTargetEventFlagId)` - Where `targetEventFlagType = TargetEventFlagType.EventFlag` and `desiredFlagState = LogicalOperationType.AllON or LogicalOperationType.NotAllON`. - `AnyBatchEventFlags(int startingTargetEventFlagId, int endingTargetEventFlagId)` - Where `targetEventFlagType = TargetEventFlagType.EventFlag` and `desiredFlagState = LogicalOperationType.NotAllOFF or LogicalOperationType.AllOFF`. ``` ```APIDOC ## InOutsideArea ### Description Checks if an entity is inside or outside a specified area. ### Signature ``` InOutsideArea( byte desiredState, int targetEntityId, int areaEntityId) ``` ### Parameters - **desiredState** (byte) - Required - The desired state (inside or outside). - **targetEntityId** (int) - Required - The ID of the target entity. - **areaEntityId** (int) - Required - The ID of the area entity. ### Simpler Version - `InArea(int targetEntityId, int areaEntityId)` - Where `desiredState = InsideOutsideState.Inside or InsideOutsideState.Outside`. ``` ```APIDOC ## EntityInOutsideRadiusOfEntity ### Description Checks if one entity is within a certain radius of another entity. ### Signature ``` EntityInOutsideRadiusOfEntity( byte desiredState, int targetEntityAId, int targetEntityBId, float targetDistance) ``` ### Parameters - **desiredState** (byte) - Required - The desired state (inside or outside). - **targetEntityAId** (int) - Required - The ID of the first entity. - **targetEntityBId** (int) - Required - The ID of the second entity. - **targetDistance** (float) - Required - The radius distance. ### Simpler Version - `EntityInRadiusOfEntity(int targetEntityAId, int targetEntityBId, float targetDistance)` - Where `desiredState = InsideOutsideState.Inside or InsideOutsideState.Outside`. ``` ```APIDOC ## PlayerHasDoesntHaveItem ### Description Checks if the player has or does not have a specific item. ### Signature ``` PlayerHasDoesntHaveItem( byte itemType, int itemId, byte desiredPossessionState) ``` ### Parameters - **itemType** (byte) - Required - The type of the item. - **itemId** (int) - Required - The ID of the item. - **desiredPossessionState** (byte) - Required - The desired possession state (owns or does not own). ### Simpler Version - `PlayerHasItem(byte itemType, int itemId)` - Where `desiredPossessionState = OwnershipState.Owns or OwnershipState.DoesntOwn`. ``` -------------------------------- ### InitiateServermediatedMultiplayerItem Source: https://github.com/aintunez/darkscript3/blob/master/DarkScript3/Resources/ds2-emedf.html Initiates a server-mediated multiplayer item. Used in SpEffectActiveItem and SpEffectCondition. ```APIDOC ## InitiateServermediatedMultiplayerItem ### Description Initiates a server-mediated multiplayer item. ### Signature ``` InitiateServermediatedMultiplayerItem( byte serverItemType) ``` ### Parameters - **serverItemType** (byte) - Required - Type of server item. ### Usage Contexts - SpEffectActiveItem - SpEffectCondition ``` -------------------------------- ### SendNPCSummonHome Source: https://github.com/aintunez/darkscript3/blob/master/DarkScript3/Resources/nr-emedf.html Sends an NPC summon home. This instruction is currently unused. ```APIDOC ## SendNPCSummonHome ### Description Sends an NPC summon home. This instruction is currently unused. ### Method Instruction ### Signature ``` SendNPCSummonHome( uint npcEntityId) ``` ### Parameters - **npcEntityId** (uint) - Required - The ID of the NPC entity. ``` -------------------------------- ### CreateNPCPart Source: https://github.com/aintunez/darkscript3/blob/master/DarkScript3/Resources/ds1-emedf.html Creates an NPC part for a character entity. ```APIDOC ## CreateNPCPart ### Description Creates an NPC part for a character entity. ### Method Instruction 2004[22] ### Parameters - **entityId** (int) - Required - The ID of the character entity. - **npcPartId** (short) - Required - The NPC part ID. - **npcPartGroupIndex** (short) - Required - The NPC part group index. - **npcPartHP** (int) - Required - The HP of the NPC part. - **damageCorrection** (float) - Required - Damage correction multiplier. - **bodyDamageCompensation** (float) - Required - Body damage compensation. - **isInvincible** (bool) - Required - Whether the part is invincible. - **startInStoppedState** (bool) - Required - Whether to start in a stopped state. ``` -------------------------------- ### HandleBossDefeat Source: https://github.com/aintunez/darkscript3/blob/master/DarkScript3/Resources/ac6-emedf.html Handles boss defeat logic. ```APIDOC ## HandleBossDefeat ### Description Handles boss defeat logic. ### Signature ``` HandleBossDefeat( uint entityId) ``` ### Parameters - **entityId** (uint) - Required - Boss entity. ``` -------------------------------- ### PlayCutsceneToPlayerWithWeatherAndTime Source: https://github.com/aintunez/darkscript3/blob/master/DarkScript3/Resources/nr-emedf.html Plays a cutscene to a specific player with optional weather and time changes. Unused. ```APIDOC ## PlayCutsceneToPlayerWithWeatherAndTime ### Description Plays a cutscene to a specific player with optional weather and time changes. ### Method Instruction 2002[10] ### Parameters - **cutsceneId** (int) - Required - The ID of the cutscene to play. - **playbackMethod** (uint) - Required - The playback mode for the cutscene. - **playerEntityId** (uint) - Required - The entity ID of the player to play the cutscene to. - **shouldChangeWeather** (bool) - Required - Whether to change the weather. - **weather** (sbyte) - Required - The weather to set. - **weatherLifespanSeconds** (float) - Required - How long the weather lasts in seconds. - **shouldChangeTime** (bool) - Required - Whether to change the time of day. - **hours** (byte) - Required - The hour to set. - **minutes** (byte) - Required - The minute to set. - **seconds** (byte) - Required - The second to set. ### Usage Unused. ``` -------------------------------- ### RegisterBackgroundByAssetId Source: https://github.com/aintunez/darkscript3/blob/master/DarkScript3/Resources/ac6-emedf.html Registers a background by asset ID. Used in mission m01_01_40_00. ```APIDOC ## RegisterBackgroundByAssetId ### Description Registers a background by asset ID. Used in mission m01_01_40_00. ### Signature ``` RegisterBackgroundByAssetId( uint assetId) ``` ### Parameters - **assetId** (uint) - Required - The asset ID of the background to register. ``` -------------------------------- ### PlayCutsceneWithSeamlessCameraAngleMoveAndEnvReset Source: https://github.com/aintunez/darkscript3/blob/master/DarkScript3/Resources/ac6-emedf.html Plays a cutscene with seamless camera angle move and environment reset. Specifies playback location, warp point, map, and angle reference entity. ```APIDOC ## PlayCutsceneWithSeamlessCameraAngleMoveAndEnvReset ### Description Plays a cutscene with seamless camera angle move and environment reset. Specifies playback location, warp point, map, and angle reference entity. ### Signature ``` PlayCutsceneWithSeamlessCameraAngleMoveAndEnvReset( int cutsceneId, uint playbackMethod, uint playbackLocationPointEntityId, uint warpPointEntityId, int mapId, uint angleReferenceEntityId) ``` ### Parameters - **cutsceneId** (int) - Required - Identifier of the cutscene to play. - **playbackMethod** (uint) - Required - Method of playback. - **playbackLocationPointEntityId** (uint) - Required - Entity ID of the playback location point. - **warpPointEntityId** (uint) - Required - Entity ID of the warp point. - **mapId** (int) - Required - Identifier of the map. - **angleReferenceEntityId** (uint) - Required - Entity ID used as reference for camera angle. ``` -------------------------------- ### IsOnline Source: https://github.com/aintunez/darkscript3/blob/master/DarkScript3/Resources/ac6-emedf.html Condition function to check if the game is in online mode. ```APIDOC ## IsOnline ### Description Condition function to check if the game is in online mode. ### Full Signature OnlineModeState(bool onlineMode) ### Simpler Version IsOnline() Where onlineMode = true or false ### Parameters - **onlineMode** (bool) - Required - Whether the game is in online mode (true) or not (false). ``` -------------------------------- ### RegisterAreaAsBackground Source: https://github.com/aintunez/darkscript3/blob/master/DarkScript3/Resources/ac6-emedf.html Registers an area as background. Used in mission m01_01_40_00. ```APIDOC ## RegisterAreaAsBackground ### Description Registers an area as background. Used in mission m01_01_40_00. ### Signature ``` RegisterAreaAsBackground( uint areaEntityId) ``` ### Parameters - **areaEntityId** (uint) - Required - The entity ID of the area to register as background. ``` -------------------------------- ### IfNPCPartHP Source: https://github.com/aintunez/darkscript3/blob/master/DarkScript3/Resources/er-emedf.html Condition instruction to check the HP of an NPC part. ```APIDOC ## IfNPCPartHP ### Description Condition function to check the HP of a specific NPC part against a threshold. ### Signature ``` IfNPCPartHP( sbyte resultConditionGroup, uint targetEntityId, int npcPartId, int hpThreshold, sbyte comparisonType) ``` ### Parameters - **resultConditionGroup** (sbyte) - Required - The condition group to set the result. - **targetEntityId** (uint) - Required - The entity ID of the target character. - **npcPartId** (int) - Required - The ID of the NPC part. - **hpThreshold** (int) - Required - The HP threshold to compare against. - **comparisonType** (sbyte) - Required - The comparison type for the condition. ### Condition Function `NPCPartHP` ``` -------------------------------- ### RequestAnimationPlayback Source: https://github.com/aintunez/darkscript3/blob/master/DarkScript3/Resources/ac6-emedf.html Requests playback of an animation on an entity. Used in many mission files. ```APIDOC ## RequestAnimationPlayback ### Description Requests playback of an animation on an entity. ### Signature ``` RequestAnimationPlayback( uint entityId, int animationId, bool shouldLoop, bool shouldWaitForCompletion, sbyte comparisonType = Equal, float numberOfTargetCharacters = 1) ``` ### Parameters - **entityId** (uint) - Required - Entity to play animation on. - **animationId** (int) - Required - Animation to play. - **shouldLoop** (bool) - Required - Whether to loop the animation. - **shouldWaitForCompletion** (bool) - Required - Whether to wait for completion. - **comparisonType** (sbyte) - Optional - Default: Equal. - **numberOfTargetCharacters** (float) - Optional - Default: 1. ``` -------------------------------- ### ShowFreeImage Source: https://github.com/aintunez/darkscript3/blob/master/DarkScript3/Resources/ac6-emedf.html Shows a free image with the specified dialog type and image ID. Used in m01_20_93_00. ```APIDOC ## ShowFreeImage ### Description Shows a free image with the given dialog type and image ID. ### Signature ``` ShowFreeImage( int freeDialogType, int imgId) ``` ### Parameters - **freeDialogType** (int) - Required - The type of free dialog. - **imgId** (int) - Required - The ID of the image to show. ### Usage Used in m01_20_93_00. ``` -------------------------------- ### PlayCutsceneWithSeamlessCameraAngleMove Source: https://github.com/aintunez/darkscript3/blob/master/DarkScript3/Resources/ac6-emedf.html Plays a cutscene with a seamless camera angle move. Specifies playback location, warp point, map, and angle reference entity. ```APIDOC ## PlayCutsceneWithSeamlessCameraAngleMove ### Description Plays a cutscene with a seamless camera angle move. Specifies playback location, warp point, map, and angle reference entity. ### Signature ``` PlayCutsceneWithSeamlessCameraAngleMove( int cutsceneId, uint playbackMethod, uint playbackLocationPointEntityId, uint warpPointEntityId, int mapId, uint angleReferenceEntityId) ``` ### Parameters - **cutsceneId** (int) - Required - Identifier of the cutscene to play. - **playbackMethod** (uint) - Required - Method of playback. - **playbackLocationPointEntityId** (uint) - Required - Entity ID of the playback location point. - **warpPointEntityId** (uint) - Required - Entity ID of the warp point. - **mapId** (int) - Required - Identifier of the map. - **angleReferenceEntityId** (uint) - Required - Entity ID used as reference for camera angle. ``` -------------------------------- ### SetPlayerPositionDisplay Source: https://github.com/aintunez/darkscript3/blob/master/DarkScript3/Resources/nr-emedf.html Sets the player position display. This instruction is currently unused. ```APIDOC ## SetPlayerPositionDisplay ### Description Sets the player position display. This instruction is currently unused. ### Method Instruction ### Signature ``` SetPlayerPositionDisplay( byte state, bool aboveground, byte areaId, byte blockId, byte regionId, byte indexId, float x, float y, float z) ``` ### Parameters - **state** (byte) - Required - Whether the display is disabled or enabled. - **aboveground** (bool) - Required - Whether the position is above ground. - **areaId** (byte) - Required - The area ID. - **blockId** (byte) - Required - The block ID. - **regionId** (byte) - Required - The region ID. - **indexId** (byte) - Required - The index ID. - **x** (float) - Required - The x coordinate. - **y** (float) - Required - The y coordinate. - **z** (float) - Required - The z coordinate. ``` -------------------------------- ### ActionBit Source: https://github.com/aintunez/darkscript3/blob/master/DarkScript3/Resources/sekiro-emedf.html Condition function that checks whether an action bit is set. ```APIDOC ## ActionBit ### Description Checks whether a specific action bit is set or not. ### Function Signature ``` ActionBitState( byte actionstartbit, bool bitSet) ``` ### Parameters - **actionstartbit** (byte) - Required - The action bit to check. - **bitSet** (bool) - Required - Whether the bit should be set (true) or not (false). ### Simplified Version - `ActionBit(byte actionstartbit)` Where `bitSet = true or false` ``` -------------------------------- ### SkipIfNumberOfCoopClients Source: https://github.com/aintunez/darkscript3/blob/master/DarkScript3/Resources/bb-emedf.html Skips lines based on the number of co-op clients. Unused. ```APIDOC ## SkipIfNumberOfCoopClients ### Description Skips lines based on the number of co-op clients. Unused. ### Signature SkipIfNumberOfCoopClients( byte numberOfSkippedLines, byte comparisonType, byte targetNumberOfClients) ### Parameters - **numberOfSkippedLines** (byte) - Required - Number of lines to skip if condition is true. - **comparisonType** (byte) - Required - Comparison type (e.g., equal, greater than). - **targetNumberOfClients** (byte) - Required - Target number of clients. ### Condition Function `NumberOfCoopClients` ``` -------------------------------- ### NumberOfCoopClients Source: https://github.com/aintunez/darkscript3/blob/master/DarkScript3/Resources/ds3-emedf.html Condition function that compares the number of co-op clients to a target value. ```APIDOC ## NumberOfCoopClients ### Description Condition function that compares the number of co-op clients to a target value. ### Full Signature ``` CompareNumberOfCoopClients( byte comparisonType, byte targetNumberOfClients) ``` ### Simpler Version ``` NumberOfCoopClients() == value ``` Comparing `targetNumberOfClients` (`== != > < >= <=`) ### Parameters - **comparisonType** (byte) - Required - The comparison type (==, !=, >, <, >=, <=). - **targetNumberOfClients** (byte) - Required - The target number of clients. ### Usage Used in m39_00_00_00. ``` -------------------------------- ### PlayCutsceneToPlayerAndWarpWithWeatherAndTime Source: https://github.com/aintunez/darkscript3/blob/master/DarkScript3/Resources/nr-emedf.html Plays a cutscene to a specific player, warps them, and optionally changes weather and time. Unused. ```APIDOC ## PlayCutsceneToPlayerAndWarpWithWeatherAndTime ### Description Plays a cutscene to a specific player, warps them, and optionally changes weather and time. ### Method Instruction 2002[12] ### Parameters - **cutsceneId** (int) - Required - The ID of the cutscene to play. - **playbackMethod** (uint) - Required - The playback mode for the cutscene. - **areaEntityId** (uint) - Required - The entity ID of the area to play the cutscene to. - **mapId** (int) - Required - The ID of the map to warp to. - **playerEntityId** (uint) - Required - The entity ID of the player to warp. - **unknown14** (int) - Required - Unknown parameter. - **unknown18** (bool) - Required - Unknown parameter. - **shouldChangeWeather** (bool) - Required - Whether to change the weather. - **weather** (sbyte) - Required - The weather to set. - **weatherLifespanSeconds** (float) - Required - How long the weather lasts in seconds. - **shouldChangeTime** (bool) - Required - Whether to change the time of day. - **hours** (byte) - Required - The hour to set. - **minutes** (byte) - Required - The minute to set. - **seconds** (byte) - Required - The second to set. ### Usage Unused. ``` -------------------------------- ### PlayCutsceneToPlayerAndWarp Source: https://github.com/aintunez/darkscript3/blob/master/DarkScript3/Resources/nr-emedf.html Plays a cutscene to a specific player and warps them to a map. Used in m10_00_00_00, m12_00_00_00. ```APIDOC ## PlayCutsceneToPlayerAndWarp ### Description Plays a cutscene to a specific player and warps them to a map. ### Method Instruction 2002[11] ### Parameters - **cutsceneId** (int) - Required - The ID of the cutscene to play. - **playbackMethod** (uint) - Required - The playback mode for the cutscene. - **entityId** (uint) - Required - The entity ID of the player to play the cutscene to. - **mapId** (int) - Required - The ID of the map to warp to. - **playerEntityId** (uint) - Required - The entity ID of the player to warp. - **unknown** (int) - Required - Unknown parameter. - **unknown** (bool) - Required - Unknown parameter. - **unknown** (bool) - Required - Unknown parameter. ### Usage Used in m10_00_00_00, m12_00_00_00. ``` -------------------------------- ### SetAreaWelcomeMessageState Source: https://github.com/aintunez/darkscript3/blob/master/DarkScript3/Resources/ds3-emedf.html Sets the state of the area welcome message. Used in common and various map scripts. ```APIDOC ## SetAreaWelcomeMessageState ### Description Sets the state of the area welcome message. ### Signature ``` SetAreaWelcomeMessageState( byte state) ``` ### Parameters - **state** (byte) - Required - Whether the welcome message is disabled or enabled. ### Usage Used in common_func, m30_00_00_00, m40_00_00_00, m45_00_00_00. ``` -------------------------------- ### IssueEndOfPseudoMultiplayerNotification Source: https://github.com/aintunez/darkscript3/blob/master/DarkScript3/Resources/nr-emedf.html Issues a notification for the end of pseudo multiplayer. This instruction is currently unused. ```APIDOC ## IssueEndOfPseudoMultiplayerNotification ### Description Issues a notification for the end of pseudo multiplayer. This instruction is currently unused. ### Method Instruction ### Signature ``` IssueEndOfPseudoMultiplayerNotification( bool success) ``` ### Parameters - **success** (bool) - Required - Whether the pseudo multiplayer ended successfully. ``` -------------------------------- ### ActionButtonBossFog Source: https://github.com/aintunez/darkscript3/blob/master/DarkScript3/Resources/ds1-emedf.html Condition function that checks if the player is interacting with a boss fog wall via an action button. ```APIDOC ## ActionButtonBossFog ### Description Condition function that checks if the player is interacting with a boss fog wall via an action button. ### Signature ``` ActionButtonBossFog( int targetEntityType, int targetEntityId, float reactionAngleDeg, short dummypolyId, float reactionDistance, int helpMessageId, byte reactionType, int padId) ``` ### Parameters - **targetEntityType** (int) - Required - The type of the target entity. - **targetEntityId** (int) - Required - The ID of the target entity. - **reactionAngleDeg** (float) - Required - The reaction angle in degrees. - **dummypolyId** (short) - Required - The dummy polygon ID. - **reactionDistance** (float) - Required - The reaction distance. - **helpMessageId** (int) - Required - The help message ID. - **reactionType** (byte) - Required - The type of reaction. - **padId** (int) - Required - The pad ID. ### Usage Used in m16_00_00_00. ``` -------------------------------- ### Compare Source: https://github.com/aintunez/darkscript3/blob/master/DarkScript3/Resources/ac6-emedf.html Condition function that compares two unsigned integers using a comparison type. It is currently unused. ```APIDOC ## Compare ### Description Compares two unsigned integers using a specified comparison type. Currently unused. ### Signature ``` Compare( sbyte comparisonType, uint lefthandSide, uint righthandSide) ``` ### Parameters - **comparisonType** (sbyte) - Required - The comparison operator (==, !=, >, <, >=, <=). - **lefthandSide** (uint) - Required - The left-hand side value. - **righthandSide** (uint) - Required - The right-hand side value. ### Usage Unused. ``` -------------------------------- ### SetNPCPartHP Source: https://github.com/aintunez/darkscript3/blob/master/DarkScript3/Resources/ds1-emedf.html Sets the HP of an NPC part. ```APIDOC ## SetNPCPartHP ### Description Sets the HP of an NPC part. ### Method Instruction 2004[23] ### Parameters - **entityId** (int) - Required - The ID of the character entity. - **npcPartId** (int) - Required - The NPC part ID. - **desiredHP** (int) - Required - The desired HP value. - **shouldAllowHPAboveMaxHP** (bool) - Required - Whether to allow HP above max HP. ``` -------------------------------- ### PlayerSen Source: https://github.com/aintunez/darkscript3/blob/master/DarkScript3/Resources/sekiro-emedf.html Condition function that compares the player's Sen (currency) amount against a target value. ```APIDOC ## PlayerSen ### Description Compares the player's Sen amount against a target value using a comparison type. ### Function Signature ``` ComparePlayerSen( sbyte comparisonType, uint targetAmount) ``` ### Parameters - **comparisonType** (sbyte) - Required - The comparison type (==, !=, >, <, >=, <=). - **targetAmount** (uint) - Required - The target Sen amount to compare against. ### Simplified Version - `PlayerSen() == value` Comparing `targetAmount` (`== != > < >= <=`) ``` -------------------------------- ### HasMultiplayerState Source: https://github.com/aintunez/darkscript3/blob/master/DarkScript3/Resources/ds3-emedf.html Condition function that checks the current multiplayer state. ```APIDOC ## HasMultiplayerState ### Description Condition function that checks the current multiplayer state. ### Full Signature ``` HasMultiplayerState( sbyte desiredMultiplayerState) ``` ### Parameters - **desiredMultiplayerState** (sbyte) - Required - The desired multiplayer state. ### Usage Used in all but m30_01_00_00. ``` -------------------------------- ### IfPlayerStandingOnHit Source: https://github.com/aintunez/darkscript3/blob/master/DarkScript3/Resources/nr-emedf.html Condition instruction (unused) to check if the player is standing when a hit occurs. It takes a condition group result and a hit entity ID. ```APIDOC ## IfPlayerStandingOnHit ### Description Condition instruction (unused) to check if the player is standing when a hit occurs. ### Signature ``` IfPlayerStandingOnHit( sbyte resultConditionGroup, uint hitEntityId) ``` ### Parameters - **resultConditionGroup** (sbyte) - The condition group to store the result. - **hitEntityId** (uint) - The ID of the hit entity. ### Associated Condition Function `PlayerStandingOnHit` ``` -------------------------------- ### HasMultiplayerState Source: https://github.com/aintunez/darkscript3/blob/master/DarkScript3/Resources/ds1-emedf.html Condition function that checks the current multiplayer state. ```APIDOC ## HasMultiplayerState ### Description Condition function that checks the current multiplayer state. ### Signature ``` HasMultiplayerState( sbyte desiredMultiplayerState) ``` ### Parameters - **desiredMultiplayerState** (sbyte) - Required - The desired multiplayer state to check. ### Usage Used in all maps. ``` -------------------------------- ### EndCurrentCutscene Source: https://github.com/aintunez/darkscript3/blob/master/DarkScript3/Resources/ac6-emedf.html Ends the currently playing cutscene. ```APIDOC ## EndCurrentCutscene ### Description Ends the currently playing cutscene. ### Signature ``` EndCurrentCutscene() ``` ### Parameters None. ``` -------------------------------- ### PlayerStandingOnHit Source: https://github.com/aintunez/darkscript3/blob/master/DarkScript3/Resources/ds1-emedf.html Condition function that checks if the player is standing when hit by a hitbox. ```APIDOC ## PlayerStandingOnHit ### Description Checks if the player is standing when hit by the specified hitbox. ### Signature ``` PlayerStandingOnHit( int hitboxEntityId) ``` ### Parameters - **hitboxEntityId** (int) - Required - The entity ID of the hitbox. ```