English | 中文
If you plan to redistribute this mod, please note the following requirements:
- Remove loading validation: You must remove the loading validation logic from the mod (located in the
OnAfterSetupmethod inDuckovCustomModel.ModLoader/ModBehaviour.cs). This validation is used to prevent unauthorized redistribution. Please modify it according to your needs. - Modify or remove update logic: You must modify the update check source (located in
DuckovCustomModel/Managers/UpdateChecker.cs), or completely remove the update checking functionality. Redistributed versions should not use this repository's data source for update checks. - Adjust info.ini description text: You must modify the
descriptionfield in theDuckovCustomModel/info.inifile and adjust the description text to meet your distribution needs. The description text in this file contains warnings about unauthorized redistribution. Please modify or remove it according to your actual situation. - Comply with MIT License requirements: You must comply with the MIT License requirements specified in the LICENSE file, including retaining copyright notices and license text
A custom player model mod for Duckov game.
- Custom Model Replacement: Allows players to use custom models to replace character models in the game
- Model Selection Interface: Provides a graphical interface for browsing and selecting available models
- Model Search: Supports searching models by name, ID, and other keywords
- Model Management: Automatically scans and loads model bundles, supports multiple model bundles simultaneously
- Incremental Updates: Uses hash caching mechanism to only update changed model bundles, improving refresh efficiency
- Multi-Object Support: Each model target type can correspond to multiple game objects, applying changes uniformly to all objects when switching
- Quick Switch: Supports quick model switching in-game without restarting
Configuration files are located at: <Game Installation Path>/ModConfigs/DuckovCustomModel
Note: If the game installation directory is read-only (such as certain installation methods on macOS), the mod will automatically switch the configuration file path to ModConfigs in the parent directory of the game save directory (Windows: AppData\LocalLow\TeamSoda\Duckov\ModConfigs\DuckovCustomModel, macOS/Linux: corresponding user data directory). The mod will automatically detect and handle this situation without manual configuration.
UI interface related configuration.
{
"ToggleKey": "Backslash",
"AnimatorParamsToggleKey": "None",
"EmotionModifierKey1": "Comma",
"EmotionModifierKey2": "Period",
"ShowDCMButton": true,
"DCMButtonAnchor": "TopLeft",
"DCMButtonOffsetX": 10.0,
"DCMButtonOffsetY": -10.0
}ToggleKey: Key to open/close the model selection interface (default:Backslash, i.e., backslash key\)- Supported key values can refer to Unity KeyCode enum
AnimatorParamsToggleKey: Key to open/close the animator parameters window (default:None, i.e., no key)- Users need to actively set it in the settings interface
- Supported key values can refer to Unity KeyCode enum
- When set to
None, the hotkey feature will be disabled
EmotionModifierKey1: Emotion shortcut modifier key 1 (default:Comma, i.e., comma key,)- Used for emotion shortcut functionality, hold this key + F1-F8 to set
EmotionValue1parameter (value 0-7) - Supported key values can refer to Unity KeyCode enum
- Can be set by clicking the button in the settings interface
- Used for emotion shortcut functionality, hold this key + F1-F8 to set
EmotionModifierKey2: Emotion shortcut modifier key 2 (default:Period, i.e., period key.)- Used for emotion shortcut functionality, hold this key + F1-F8 to set
EmotionValue2parameter (value 0-7) - Supported key values can refer to Unity KeyCode enum
- Can be set by clicking the button in the settings interface
- Used for emotion shortcut functionality, hold this key + F1-F8 to set
ShowDCMButton: Whether to show the DCM button in the main menu and inventory interface (default:true)- When set to
true, the DCM button will automatically appear in the main menu or inventory interface - Can be toggled in the settings interface
- When set to
DCMButtonAnchor: Anchor position of the DCM button (default:"TopLeft")- Valid values:
"TopLeft","TopCenter","TopRight","MiddleLeft","MiddleCenter","MiddleRight","BottomLeft","BottomCenter","BottomRight" - Can be selected through a dropdown menu in the settings interface
- Valid values:
DCMButtonOffsetX: X-axis offset value of the DCM button (default:10.0)- X-axis offset relative to the anchor position (in pixels)
- Can be set through an input field in the settings interface
DCMButtonOffsetY: Y-axis offset value of the DCM button (default:-10.0)- Y-axis offset relative to the anchor position (in pixels)
- Can be set through an input field in the settings interface
Hide equipment configuration.
{
"Version": 2,
"TargetTypeHideEquipment": {
"built-in:Character": false,
"built-in:Pet": false,
"built-in:AICharacter_*": false
}
}Version: Configuration file version (currently2)TargetTypeHideEquipment: Dictionary type, where keys are target type IDs (string format, such as"built-in:Character","built-in:Pet","built-in:AICharacter_*"or"built-in:AICharacter_<character name>"), and values are booleanbuilt-in:Character: Whether to hide character's original equipment (default:false)- When set to
true, the character model's Animator'sHideOriginalEquipmentparameter will be set totrue - Can be toggled in the settings area of the model selection interface
- When set to
built-in:Pet: Whether to hide pet's original equipment (default:false)- When set to
true, the pet model's Animator'sHideOriginalEquipmentparameter will be set totrue - Can be toggled in the settings area of the model selection interface
- When set to
built-in:AICharacter_*: Default hide equipment setting for all AI charactersbuilt-in:AICharacter_<character name>: Hide equipment setting for specific AI characters
HideEquipment(Dictionary<ModelTarget, bool>) - Obsolete, useTargetTypeHideEquipmentinsteadHideAICharacterEquipment(Dictionary<string, bool>) - Obsolete, useTargetTypeHideEquipmentinstead
Compatibility Note:
- The system will automatically migrate from v1 format to v2 format
Current model configuration in use.
{
"Version": 2,
"TargetTypeModelIDs": {
"built-in:Character": "",
"built-in:Pet": "",
"built-in:AICharacter_*": "",
"built-in:AICharacter_Cname_Wolf": "",
"built-in:AICharacter_Cname_Scav": ""
}
}Version: Configuration file version (currently2)TargetTypeModelIDs: Dictionary type, where keys are target type IDs (string format, such as"built-in:Character","built-in:Pet","built-in:AICharacter_*"or"built-in:AICharacter_<character name>"), and values are model IDs (string, uses original model when empty)built-in:Character: Currently used character model ID- After setting, the game will automatically apply this model to all character objects when loading levels
- Can be modified through the model selection interface, changes will be automatically saved to this file
built-in:Pet: Currently used pet model ID- After setting, the game will automatically apply this model to all pet objects when loading levels
- Can be modified through the model selection interface, changes will be automatically saved to this file
built-in:AICharacter_*: Default model for all AI characters- When an AI character doesn't have an individual model configured, this default model will be used
- If this key is also not configured, the original model will be used
built-in:AICharacter_<character name>: Model configuration for specific AI characters- Can configure models for each AI character individually
- Can be modified through the model selection interface, changes will be automatically saved to this file
ModelIDs(Dictionary<ModelTarget, string>) - Obsolete, useTargetTypeModelIDsinsteadAICharacterModelIDs(Dictionary<string, string>) - Obsolete, useTargetTypeModelIDsinstead
Compatibility Note:
- The system will automatically migrate from v1 format to v2 format
- If old
ModelIDorPetModelIDfields exist in the configuration file, the system will automatically migrate them to the newTargetTypeModelIDsdictionary format
Idle audio automatic playback interval configuration.
{
"Version": 2,
"TargetTypeIdleAudioIntervals": {
"built-in:Character": { "Min": 30.0, "Max": 45.0 },
"built-in:Pet": { "Min": 30.0, "Max": 45.0 },
"built-in:AICharacter_*": { "Min": 30.0, "Max": 45.0 },
"built-in:AICharacter_Cname_Wolf": { "Min": 20.0, "Max": 30.0 }
},
"TargetTypeEnableIdleAudio": {
"built-in:Character": false,
"built-in:Pet": true,
"built-in:AICharacter_*": true
}
}-
Version: Configuration file version (currently2) -
TargetTypeIdleAudioIntervals: Dictionary type, where keys are target type IDs (string format), and values are objects containingMinandMaxbuilt-in:Character: Idle audio playback interval for player characters (in seconds, default:Min: 30.0, Max: 45.0)built-in:Pet: Idle audio playback interval for pet characters (in seconds, default:Min: 30.0, Max: 45.0)built-in:AICharacter_*: Default interval for all AI charactersbuilt-in:AICharacter_<character name>: Interval configuration for specific AI characters- Can configure idle audio playback interval for each AI character individually
- If not configured, the interval for
built-in:AICharacter_*will be used
Min: Minimum interval time (default:30.0, cannot be less than0.1)Max: Maximum interval time (default:45.0, cannot be less thanMin)- The system will randomly select an interval time between the minimum and maximum values
-
TargetTypeEnableIdleAudio: Dictionary type, where keys are target type IDs (string format), and values are boolean values that control whether the target type is allowed to automatically play idle audiobuilt-in:Character: Whether player characters are allowed to automatically play idle audio (default:false)built-in:Pet: Whether pet characters are allowed to automatically play idle audio (default:true)built-in:AICharacter_*: Default value for all AI characters (default:true)built-in:AICharacter_<character name>: Configuration for specific AI characters- Can configure whether each AI character is allowed to automatically play idle audio individually
- If not configured, the value for
built-in:AICharacter_*will be used
IdleAudioIntervals(Dictionary<ModelTarget, IdleAudioInterval>) - Obsolete, useTargetTypeIdleAudioIntervalsinsteadAICharacterIdleAudioIntervals(Dictionary<string, IdleAudioInterval>) - Obsolete, useTargetTypeIdleAudioIntervalsinsteadEnableIdleAudio(Dictionary<ModelTarget, bool>) - Obsolete, useTargetTypeEnableIdleAudioinsteadAICharacterEnableIdleAudio(Dictionary<string, bool>) - Obsolete, useTargetTypeEnableIdleAudioinstead
Notes:
- Minimum interval time cannot be less than 0.1 seconds
- Maximum interval time cannot be less than minimum interval time
- Only models with
"idle"tagged sounds will automatically play idle sounds - Only target types with automatic playback enabled will automatically play idle sounds (controlled by
TargetTypeEnableIdleAudioconfiguration) - Player characters are not allowed to automatically play idle sounds by default, but can be enabled through configuration
Model audio toggle configuration.
{
"Version": 2,
"TargetTypeEnableModelAudio": {
"built-in:Character": true,
"built-in:Pet": true,
"built-in:AICharacter_*": true
},
"TargetTypeModelAudioVolume": {
"built-in:Character": 1.0,
"built-in:Pet": 1.0,
"built-in:AICharacter_*": 1.0,
"built-in:AICharacter_Cname_Wolf": 0.8
}
}Version: Configuration file version (currently2)TargetTypeEnableModelAudio: Dictionary type, where keys are target type IDs (string format, such as"built-in:Character","built-in:Pet","built-in:AICharacter_*"or"built-in:AICharacter_<character name>"), and values are boolean values that control whether the target type uses model audiobuilt-in:Character: Whether player characters use model audio (default:true)- When set to
false, all model audio for player characters will not play (including key press triggers and idle audio) - Can be toggled in the target settings area of the model selection interface
- When set to
built-in:Pet: Whether pet characters use model audio (default:true)- When set to
false, all model audio for pet characters will not play (including AI automatic triggers and idle audio) - Can be toggled in the target settings area of the model selection interface
- When set to
built-in:AICharacter_*: Default value for all AI characters (default:true)built-in:AICharacter_<character name>: Configuration for specific AI characters- Can configure whether each AI character uses model audio individually
- Configuration Selection Logic: Audio settings will be selected based on the actually used model
- If the AI character uses its own model configuration (a model is individually configured for that AI character in
UsingModel.json), the audio setting for that AI character will be used - If the AI character uses the fallback model (
*, i.e., the default model for "all AI characters"), the audio setting for*will be used
- If the AI character uses its own model configuration (a model is individually configured for that AI character in
- Can be toggled in the target settings area of the model selection interface
TargetTypeModelAudioVolume: Dictionary type, where keys are target type IDs (string format), and values are float numbers (0-1) that control the model audio volume for the target typebuilt-in:Character: Model audio volume for player characters (default:1.0, i.e., 100%)- Can be adjusted via slider in the target settings area of the model selection interface
built-in:Pet: Model audio volume for pet characters (default:1.0, i.e., 100%)- Can be adjusted via slider in the target settings area of the model selection interface
built-in:AICharacter_*: Default volume for all AI characters (default:1.0, i.e., 100%)built-in:AICharacter_<character name>: Volume configuration for specific AI characters- Can configure volume for each AI character individually
- If an AI character has no specific configuration, it will fall back to
built-in:AICharacter_*configuration - Can be adjusted via slider in the target settings area of the model selection interface
EnableModelAudio(Dictionary<ModelTarget, bool>) - Obsolete, useTargetTypeEnableModelAudioinsteadAICharacterEnableModelAudio(Dictionary<string, bool>) - Obsolete, useTargetTypeEnableModelAudioinstead
Notes:
- When model audio is disabled, all model audio for the corresponding character will not play, including:
- Player key press triggered audio (
"normal"tag) - AI automatically triggered audio (
"normal","surprise","death"tags) - Idle audio (
"idle"tag)
- Player key press triggered audio (
- This configuration is independent from the
EnableIdleAudioconfiguration inIdleAudioConfig.json:ModelAudioConfig.jsoncontrols whether to use model audio (master switch)EnableIdleAudioinIdleAudioConfig.jsoncontrols whether to allow automatic playback of idle audio (only affects automatic playback of idle audio)- If model audio is disabled in
ModelAudioConfig.json, idle audio will not play even ifEnableIdleAudioistrue- If
"*"is also not configured, default value will be used (true)
- If
- Configuration Selection Logic: Audio settings will select configuration based on the actually used model
- If an AI character uses its own model configuration (a model is individually configured for that AI character in
UsingModel.json), it will use that AI character's audio settings - If an AI character uses the fallback model (
*, i.e., the default model for "All AI Characters"), it will use*audio settings
- If an AI character uses its own model configuration (a model is individually configured for that AI character in
- Default value:
true(use model audio) - Can be toggled in the target settings area of the model selection interface
Notes:
- When model audio is disabled, all model audio for the corresponding character will not play, including:
- Player key press triggered audio (
"normal"tag) - AI automatic triggered audio (
"normal","surprise","death"tags) - Idle audio (
"idle"tag)
- Player key press triggered audio (
- This configuration is independent from the
EnableIdleAudioconfiguration inIdleAudioConfig.json:ModelAudioConfig.jsoncontrols whether to use model audio (master switch)EnableIdleAudioinIdleAudioConfig.jsoncontrols whether to allow automatic playback of idle audio (only affects automatic playback of idle audio)- If model audio is disabled in
ModelAudioConfig.json, idle audio will not play even ifEnableIdleAudioistrue
The model selection interface provides the following features:
- Target Type Switching: Switch between "Character", "Pet", and "AI Character" to manage character models, pet models, and AI character models separately
- Model Browsing: Scroll to view all available models (filtered based on the currently selected target type)
- Model Search: Quickly search models by name, ID, and other keywords
- Model Selection: Click the model button to apply the model to all objects of that target type
- Model Information: Each model card displays the model name, ID, author, version, and the Bundle name it belongs to
- AI Character Selection: When selecting "AI Character" target type, first select a specific AI character, then select a model for that character
- Settings Options: In the settings tab, you can configure the following options:
- Hotkey: Configure the hotkey to open/close the model selection interface
- Can be set by clicking the button in the settings interface
- Animator Parameters Hotkey: Configure the hotkey to open/close the animator parameters window
- Default value is no key, users need to actively set it
- Can be set by clicking the button in the settings interface
- Animator Parameters Display Interface: Used to view and monitor Animator parameter values in real-time
- Opening Method:
- Click the "Show Animator Parameters" toggle in the settings interface, or use the configured hotkey to open
- Press
ESCkey or click the close button in the top-right corner of the window to close the interface
- Character Switching: Select different characters from the dropdown at the top to view their Animator parameters
- The dropdown displays all available characters (including main character, pet, and AI characters)
- Each character displays its name, hash value, and distance information
- Type Filtering: Filter parameter types through the type filter dropdown
- Supports multi-select filtering:
float,int,bool,trigger - Multiple types can be selected simultaneously for filtering
- Supports multi-select filtering:
- Usage Status Filtering: Filter parameter usage status through the usage status filter dropdown
- Supports multi-select filtering:
Used,Unused - "Used" means the parameter is used in the Animator Controller
- "Unused" means the parameter is not used in the Animator Controller
- Supports multi-select filtering:
- Search Functionality: Quickly find parameters through the search box
- Normal Search: Directly enter keywords of parameter names, supports case-insensitive matching
- By default, all input is treated as normal search
- Example: Entering
Movematches all parameters containing "Move" (such as "MoveSpeed", "MoveDirX", etc.)
- Regular Expression Search: Use JavaScript-style regular expression format for more precise matching of parameter names
- Format: Use
/pattern/format to enable regular expression search - Note: Regular expression search is case-insensitive by default
- Examples:
/^Move.*/matches all parameters starting with "Move" (such as "MoveSpeed", "MoveDirX")/.*Speed$/matches all parameters ending with "Speed" (such as "MoveSpeed", "AmmoRate" won't match)/(Move|Run|Dash).*/matches parameters containing "Move", "Run", or "Dash"/^[A-Z].*/matches all parameters starting with an uppercase letter
- Note: Regular expression search is only enabled when using
/pattern/format, otherwise treated as normal search
- Format: Use
- Search filters the parameter list in real-time and can be combined with type filtering and usage status filtering
- Normal Search: Directly enter keywords of parameter names, supports case-insensitive matching
- Parameter Display:
- Parameters are displayed in a grid layout, showing each parameter's name, type, and current value
- Parameter values update in real-time, showing the actual values in the Animator
- Parameter colors change based on status:
- White: Parameter value is the same as the initial value
- Yellow: Parameter value differs from the initial value (changed)
- Orange: Parameter value is currently changing
- Window Operations:
- Supports dragging the window title bar to move the window position
- Supports dragging window edges to resize the window
- Window size has a minimum limit (400x300 pixels)
- Opening Method:
- Emotion Shortcut Modifier Keys: Configure two modifier keys for the emotion shortcut functionality
- Modifier key 1 (default: Left Shift): Hold this key + F1-F8 to set
EmotionValue1parameter (value 0-7) - Modifier key 2 (default: Right Shift): Hold this key + F1-F8 to set
EmotionValue2parameter (value 0-7) - Can be set by clicking the button in the settings interface
- Operation: Hold the modifier key, then press F1-F8 to set the corresponding emotion parameter value
- Modifier key 1 (default: Left Shift): Hold this key + F1-F8 to set
- Hide Original Equipment: Separate options for "Hide Character Equipment" and "Hide Pet Equipment"
- These options are immediately saved to the configuration file
- Affect the Animator's
HideOriginalEquipmentparameter value
- Show Animator Parameters: Toggle whether to show the animator parameters window
- Show DCM Button in Main Menu and Inventory: Control whether to show the DCM button when in the main menu or inventory interface
- DCM Button Position: Configure the anchor position and offset values of the DCM button
- Anchor Position: Select one of 9 positions through a dropdown menu (top-left, top-center, top-right, middle-left, middle-center, middle-right, bottom-left, bottom-center, bottom-right)
- Offset Values: Set X and Y axis offset values (in pixels)
- Configuration changes will be immediately applied to the button position
- Target Settings: In the target settings area, you can configure the following options (displayed based on the currently selected target type):
- Enable Model Audio: Control whether to use model-provided audio
- When disabled, all model audio for the corresponding character will not play (including key press triggers, AI automatic triggers, and idle audio)
- Supports separate configuration for characters, pets, and AI characters
- This option is immediately saved to
ModelAudioConfig.json
- Enable Idle Audio: Control whether to allow automatic playback of idle audio
- This option is immediately saved to
IdleAudioConfig.json
- This option is immediately saved to
- Idle Audio Interval: Configure the playback interval for idle audio (minimum and maximum values)
- This option is immediately saved to
IdleAudioConfig.json
- This option is immediately saved to
- Hide Equipment: Control whether to hide original equipment
- This option is immediately saved to
HideEquipmentConfig.json - Affects the Animator's
HideOriginalEquipmentparameter value
- This option is immediately saved to
- Enable Model Audio: Control whether to use model-provided audio
- AI Character Equipment Settings: When selecting "AI Character" target type and a specific AI character, a "Hide Equipment" toggle option for that AI character will be displayed at the top of the model list page
- Each AI character has an independent hide equipment setting
- This option is immediately saved to the configuration file
- Affects the Animator's
HideOriginalEquipmentparameter value
- Default key:
\(backslash key) - Can be changed by modifying
ToggleKeyinUIConfig.json - Press
ESCkey to close the interface - DCM Button: When in the main menu or inventory interface, a fixed DCM button will appear on the screen (default position: top-left)
- Click the button to quickly open/close the model selection interface
- Button position and visibility can be configured in the settings interface
- Button position supports 9 anchor positions (top-left, top-center, top-right, middle-left, middle-center, middle-right, bottom-left, bottom-center, bottom-right) and custom offset values
- Configuration changes will be immediately applied to the button position without restarting the game
Place model bundles at: <Game Installation Path>/ModConfigs/DuckovCustomModel/Models
Note: If the game installation directory is read-only, the mod will automatically switch the model path to ModConfigs in the parent directory of the game save directory (Windows: AppData\LocalLow\TeamSoda\Duckov\ModConfigs\DuckovCustomModel\Models, macOS/Linux: corresponding user data directory). The mod will automatically detect and handle this situation without manual configuration.
Each model bundle should be placed in a separate folder, containing model resource files and configuration information.
Each model bundle folder should contain the following files:
Model Bundle Folder/
├── bundleinfo.json # Model bundle configuration file (required)
├── modelbundle.assetbundle # Unity AssetBundle file (required)
└── thumbnail.png # Thumbnail file (optional)
{
"BundleName": "Model Bundle Name",
"BundlePath": "modelbundle.assetbundle",
"Models": [
{
"ModelID": "unique_model_id",
"Name": "Model Display Name",
"Author": "Author Name",
"Description": "Model Description",
"Version": "1.0.0",
"ThumbnailPath": "thumbnail.png",
"PrefabPath": "Assets/Model.prefab",
"DeathLootBoxPrefabPath": "Assets/DeathLootBox.prefab",
"TargetTypes": ["built-in:Character", "built-in:AICharacter_*", "built-in:AICharacter_Cname_Wolf", "built-in:AICharacter_Cname_Scav"],
"CustomSounds": [
{
"Path": "sounds/normal1.wav",
"Tags": ["normal"]
},
{
"Path": "sounds/surprise.wav",
"Tags": ["surprise", "normal"]
},
{
"Path": "sounds/death.wav",
"Tags": ["death"]
},
{
"Path": "sounds/idle1.wav",
"Tags": ["idle"]
}
],
"BuffAnimatorParams": {
"HasBuff1": [
{ "Id": 123 },
{ "DisplayNameKey": "buff_key_1" }
],
"HasBuff2": [
{ "Id": 456 }
]
}
}
]
}BundleName (required): Model bundle name, used for identification and display
BundlePath (required): AssetBundle file path, relative to the model bundle folder
Models (required): Model information array, can contain multiple models
ModelInfo Fields:
ModelID(required): Unique identifier for the model, used to reference the model in configuration filesName(optional): Name displayed in the interfaceAuthor(optional): Model authorDescription(optional): Model description informationVersion(optional): Model version numberThumbnailPath(optional): Thumbnail path, external file path relative to the model bundle folder (e.g.,"thumbnail.png")PrefabPath(required): Model Prefab resource path inside the AssetBundle (e.g.,"Assets/Model.prefab")DeathLootBoxPrefabPath(optional): Death loot box Prefab resource path inside the AssetBundle (e.g.,"Assets/DeathLootBox.prefab")- When a character using this model dies, if this field is configured, the death loot box will use the custom Prefab to replace the default model
- If this field is not configured, the death loot box will use the default model
TargetTypes(optional): Array of target type IDs the model applies to (default:["built-in:Character"])- Uses string-format target type IDs, supporting built-in types and extension types
- Built-in type examples:
"built-in:Character"(character),"built-in:Pet"(pet),"built-in:AICharacter_*"(all AI characters),"built-in:AICharacter_<character name>"(specific AI character) - Extension type examples:
"extension:CustomType"(custom type registered by third-party extensions) - Can contain multiple values, indicating the model is compatible with multiple target types
- The model selection interface will filter and display compatible models based on the currently selected target type
- Examples:
- For character and all AI characters:
["built-in:Character", "built-in:AICharacter_*"] - For specific AI characters:
["built-in:AICharacter_Cname_Wolf", "built-in:AICharacter_Cname_Scav"] - For character, pet, and all AI characters:
["built-in:Character", "built-in:Pet", "built-in:AICharacter_*"]
- For character and all AI characters:
Target(optional): Array of target types the model applies to (obsolete, useTargetTypesinstead)- Valid values:
"Character"(character),"Pet"(pet),"AICharacter"(AI character marker) - System will automatically migrate from
TargetandSupportedAICharacterstoTargetTypes - Note:
"AICharacter"is just a marker indicating thatSupportedAICharactersneeds to be processed, it is not converted to a target type itself
- Valid values:
SupportedAICharacters(optional): Array of supported AI character name keys (obsolete, useTargetTypesinstead)- Only effective when
Targetcontains"AICharacter" - Can specify which AI characters this model applies to
- Special value
"*": Indicates the model applies to all AI characters - If empty array and
Targetcontains"AICharacter", the model will not be applied to any AI character - Important: If
Targetdoes not contain the"AICharacter"marker, even ifSupportedAICharactershas values, they will not be processed - System will automatically convert
TargetandSupportedAICharacterstoTargetTypesformat (e.g.,"built-in:AICharacter_*"or"built-in:AICharacter_<character name>")
- Only effective when
CustomSounds(optional): Array of custom sound information, supports configuring tags for sounds- Each sound can be configured with multiple tags (
normal,surprise,death) - Defaults to
["normal"]when no tags are specified - The same sound file can be used for multiple scenarios
- Sound file paths are specified in
Path, relative to the model bundle folder
- Each sound can be configured with multiple tags (
SoundTagPlayChance(optional): Sound tag playback probability configuration- Dictionary type, where keys are sound tags (case-insensitive) and values are playback probabilities (0-100)
- When a sound with this tag is triggered, whether it plays is determined by the configured probability
- If not configured or probability is 0, always plays (default behavior)
WalkSoundFrequency(optional): Footstep trigger frequency per second when walking- Used to control the playback frequency of footstep sounds when the character walks
- If not specified, will automatically use the original character's walk footstep frequency setting
RunSoundFrequency(optional): Footstep trigger frequency per second when running- Used to control the playback frequency of footstep sounds when the character runs
- If not specified, will automatically use the original character's run footstep frequency setting
BuffAnimatorParams(optional): Buff-driven animator parameter configuration- Dictionary type, key is animator parameter name (bool type), value is array of Buff matching conditions
- When the character has matching Buffs, the corresponding animator parameter will be set to
true, otherwisefalse - Each condition can specify
Id(Buff ID) orDisplayNameKey(Buff display name key), satisfying any one condition is sufficient - Example configuration:
"BuffAnimatorParams": { "HasBuff1": [ { "Id": 123 }, { "DisplayNameKey": "buff_key_1" } ], "HasBuff2": [ { "Id": 456 } ], "HasAnyBuff": [ { "DisplayNameKey": "buff_key_1" }, { "DisplayNameKey": "buff_key_2" } ] }
- Configured Buff parameters will be displayed in the debug interface, after custom parameters and animator parameters
To ensure that equipment (weapons, armor, backpacks, etc.) in the game can be correctly bound to custom models, the model Prefab needs to include corresponding locator point GameObjects.
The model Prefab's child objects need to include Transforms with the following names as locator points:
LeftHandLocator: Left hand locator point for binding left hand equipmentRightHandLocator: Right hand locator point for binding right hand equipmentArmorLocator: Armor locator point for binding armor equipmentHelmetLocator: Helmet locator point for binding helmet equipmentFaceLocator: Face locator point for binding face equipmentBackpackLocator: Backpack locator point for binding backpack equipmentMeleeWeaponLocator: Melee weapon locator point for binding melee weapon equipmentPopTextLocator: Pop text locator point for displaying pop textVehicleLocator: Vehicle locator point for indicating the player's position when riding a vehicle
In addition to the required locator points, models can also include the following optional locator points:
PaperBoxLocator: Paper box locator point for binding paper boxes- When a custom model includes this locator point, paper boxes spawned in the game will automatically attach to this point
- Paper boxes will follow the custom model's position and rotation
- If the model does not include this locator point, paper boxes will use the original model's locator point
CarriableLocator: Carriable item locator point for binding carriable items- When a custom model includes this locator point, carriable items will automatically attach to this point when the character carries them
- Carriable items will follow the custom model's position and rotation
- When carrying an item, the original position, rotation, and scale information are saved and will be restored when the item is dropped
- If the model does not include this locator point, carriable items will use the original model's locator point
- The mod automatically searches for these locator points in custom models
- Found locator points will be set as binding points for the game's equipment system
- Equipment will be bound according to the position and rotation of the locator points
- If a locator point does not exist, the corresponding equipment will not display correctly on the custom model
- Locator point names must exactly match (case-sensitive)
- Locator points can be empty GameObjects, just need to set the correct position and rotation
- It is recommended to set locator point positions based on the original model's equipment positions
Custom model Prefabs need to include an Animator component and configure the corresponding Animator Controller.
The Animator Controller can use the following parameters:
Grounded: Whether the character is on the groundDie: Whether the character is deadMoving: Whether the character is movingRunning: Whether the character is runningDashing: Whether the character is dashingGunReady: Whether the gun is readyLoaded: Whether the gun is loaded (updated byOnLoadedEventwhen holdingItemAgent_Gun)Reloading: Whether reloadingRightHandOut: Whether the right hand is extendedActionRunning: Whether an action is currently running (determined byCharacterMainControl.CurrentAction)Hidden: Whether the character is in hidden stateThermalOn: Whether thermal imaging is enabledInAds: Whether aiming down sights (ADS)HideOriginalEquipment: Whether to hide original equipment (controlled by the corresponding target type ID configuration inHideEquipmentConfig.json)LeftHandEquip: Whether there is equipment in the left hand slot (determined by equipment TypeID,truewhen TypeID > 0)RightHandEquip: Whether there is equipment in the right hand slot (determined by equipment TypeID,truewhen TypeID > 0)ArmorEquip: Whether there is equipment in the armor slot (determined by equipment TypeID,truewhen TypeID > 0)HelmetEquip: Whether there is equipment in the helmet slot (determined by equipment TypeID,truewhen TypeID > 0)HeadsetEquip: Whether there is equipment in the headset slot (determined by equipment TypeID,truewhen TypeID > 0)FaceEquip: Whether there is equipment in the face slot (determined by equipment TypeID,truewhen TypeID > 0)BackpackEquip: Whether there is equipment in the backpack slot (determined by equipment TypeID,truewhen TypeID > 0)MeleeWeaponEquip: Whether there is equipment in the melee weapon slot (determined by equipment TypeID,truewhen TypeID > 0)HavePopText: Whether there is pop text (checks if the pop text slot has child objects)Sleeping: Whether the character is in sleeping stateIsVehicle: Whether the character is a vehicleIsControllingOtherCharacter: Whether the character is controlling another characterIsControllingVehicle: Whether the character is controlling a vehicle (whentrue,IsControllingOtherCharacteris alwaystrue)IsPlayerControlling: Whether the player is currently controlling this character.
MoveSpeed: Movement speed ratio (normal walk 0~1, running can reach 2)MoveDirX: Movement direction X component (-1.0 ~ 1.0, character local coordinate system)MoveDirY: Movement direction Y component (-1.0 ~ 1.0, character local coordinate system)VelocityX: Velocity X componentVelocityY: Velocity Y componentVelocityZ: Velocity Z componentVelocityMagnitude: Velocity magnitude (length of velocity vector)AimDirX: Aim direction X componentAimDirY: Aim direction Y componentAimDirZ: Aim direction Z componentAdsValue: Aim down sights value (0.0 - 1.0, aiming progress)AmmoRate: Ammo ratio (0.0 - 1.0, current ammo / max ammo capacity)HealthRate: Health ratio (0.0 - 1.0, current health / max health)WaterRate: Water ratio (0.0 - 1.0, current water / max water)WeightRate: Weight ratio (current total weight / max carrying capacity, may exceed 1.0)ActionProgress: Action progress percentage (0.0 - 1.0, current action progress, obtained fromIProgress.GetProgress().progress)Time: Current 24-hour time (0.0 - 24.0, obtained fromTimeOfDayController.Instance.Time, -1.0 when unavailable)Mod:ShoulderSurfing:CameraPitch: Camera pitch value from ShoulderSurfing mod (requires ShoulderSurfing mod to be installed, defaults to 0.0 when not installed)
CurrentCharacterType: Current character type0: Character1: Pet2: AI Character (AICharacter)-1: Custom type (Extension, target types registered by third-party extensions)
CustomCharacterTypeID: Custom type ID (only effective whenCurrentCharacterTypeis-1)- Hash value generated from
targetTypeIdstring, used to uniquely identify custom target types - When
CurrentCharacterTypeis not-1, this parameter value is0
- Hash value generated from
HandState: Hand state0: Default state1: Normal2: Gun3: Melee weapon4: Bow-1: Carrying state
ShootMode: Shoot mode (determined by gun'striggerModewhen holdingItemAgent_Gun)0: Auto1: Semi-automatic2: Bolt-action
GunState: Gun state (determined by gun'sGunStatewhen holdingItemAgent_Gun)0: Shoot cooling (shootCooling)1: Ready2: Fire3: Burst each shot cooling (burstEachShotCooling)4: Empty5: Reloading
AimType: Aim type (determined byCharacterMainControl.AimType)0: Normal aim1: Character skill2: Handheld skill
WeightState: Weight state (only effective in Raid maps)0: Light (WeightRate ≤ 0.25)1: Normal (0.25 < WeightRate ≤ 0.75)2: Heavy (0.75 < WeightRate ≤ 1.0)3: Overloaded (WeightRate > 1.0)
WeaponInLocator: Current locator type where the weapon is placed (0 when no weapon)0: No weapon1: Right hand locator (normalHandheld)2: Melee weapon locator (meleeWeapon)3: Left hand locator (leftHandSocket)- When weapon type is left hand but the model doesn't have a left hand locator, it will automatically use the right hand locator (value is
1)
LeftHandTypeID: TypeID of equipment in left hand (0 when no equipment)RightHandTypeID: TypeID of equipment in right hand (0 when no equipment)ArmorTypeID: TypeID of armor equipment (0 when no equipment)HelmetTypeID: TypeID of helmet equipment (0 when no equipment)HeadsetTypeID: TypeID of headset equipment (0 when no equipment)FaceTypeID: TypeID of face equipment (0 when no equipment)BackpackTypeID: TypeID of backpack equipment (0 when no equipment)MeleeWeaponTypeID: TypeID of melee weapon equipment (0 when no equipment)ActionPriority: Action priority (determined byCharacterMainControl.CurrentAction.ActionPriority())0: Whatever1: Reload2: Attack3: usingItem4: Dash5: Skills6: Fishing7: Interact- When
ActionRunningistrue, the action priority can be used to approximately determine what action the character is performing
ActionType: Action type ID (defined byCharacterActionDefinitions, -1 when no action)1: Action_Fishing2: Action_FishingV23: CA_Attack4: CA_Carry5: CA_Dash6: CA_Interact7: CA_Reload8: CA_Skill9: CA_UseItem10: CA_ControlOtherCharacter (control other character)- When
ActionRunningistrue, the action type can precisely determine what action type the character is performing - The action type definition library supports extensions, new action types can be registered via
CharacterActionDefinitions.RegisterActionType<T>(id)
ActionFishingRodTypeID: TypeID of fishing rod used in fishing action (only valid whenActionTypeis1or2, otherwise0)ActionBaitTypeID: TypeID of bait used in fishing action (only valid whenActionTypeis1or2, otherwise0)ActionUseItemTypeID: TypeID of item used in use item action (only valid whenActionTypeis9, otherwise0)Weather: Current weather state (obtained fromTimeOfDayController.Instance.CurrentWeather, -1 when unavailable)0: Sunny1: Cloudy2: Rainy3: Stormy_I4: Stormy_II
TimePhase: Current time phase (obtained fromTimeOfDayController.Instance.CurrentPhase.timePhaseTag, -1 when unavailable)0: Day1: Dawn2: Night
EmotionValue1: Emotion parameter value 1 (int type, initial value 0)- Can be set via emotion shortcut functionality: Hold modifier key 1 (default comma key
,) + F1-F8 to set (value 0-7) - Modifier key 1 can be configured in the settings interface (
EmotionModifierKey1)
- Can be set via emotion shortcut functionality: Hold modifier key 1 (default comma key
EmotionValue2: Emotion parameter value 2 (int type, initial value 0)- Can be set via emotion shortcut functionality: Hold modifier key 2 (default period key
.) + F1-F8 to set (value 0-7) - Modifier key 2 can be configured in the settings interface (
EmotionModifierKey2)
- Can be set via emotion shortcut functionality: Hold modifier key 2 (default period key
RidingVehicleType: The type of vehicle the character is riding (int type, initial value 0)
The mod supports adding additional animator parameters through extension modules. These parameters use the Mod:ExtensionName:ParameterName naming format with colon separators to clearly identify them as mod extension parameters:
Mod:ShoulderSurfing:CameraPitch: Camera pitch value from ShoulderSurfing mod (float type)- Requires ShoulderSurfing mod to be installed
- When ShoulderSurfing mod is not installed or not active, the parameter value is
0.0 - Parameter value reflects the current camera pitch angle in real-time
Attack: Attack trigger (used to trigger melee attack animations)Shoot: Shoot trigger (triggered byOnShootEventwhen holdingItemAgent_Gun)Hurt: Hurt trigger (automatically triggered when the character takes damage)Dead: Death trigger (automatically triggered when the character dies)HitTarget: Hit target trigger (automatically triggered when the character hits a target)KillTarget: Kill target trigger (automatically triggered when the character kills a target)CritHurt: Critical hurt trigger (automatically triggered when the character takes critical damage)CritDead: Critical death trigger (automatically triggered when the character dies from critical damage)CritHitTarget: Critical hit target trigger (automatically triggered when the character critically hits a target)CritKillTarget: Critical kill target trigger (automatically triggered when the character critically kills a target)
If the model contains melee attack animations, you can add an animation layer named "MeleeAttack":
- Layer name must be
"MeleeAttack" - This layer is used to play melee attack animations
- Layer weight will be automatically adjusted based on attack state
The mod provides three state machine behaviour components that can trigger sounds, dialogue, or control parameters when animation states are entered:
Automatically controls Animator parameters when animation states are entered, similar to Unity's built-in Animator Parameter Driver.
parameters: Array of parameter operations, can configure multiple parameter operationstype: Operation typeSet: Directly set parameter valueAdd: Add specified value to existing valueRandom: Randomly set parameter value (supports range randomization and probability triggering)Copy: Copy value from source parameter to target parameter (supports range conversion)
name: Target parameter name (parameter to be written to)source: Source parameter name (for Copy operation, parameter to be read from)value: Value used for the operation (for Set and Add operations)valueMin/valueMax: Minimum and maximum values for randomization (for Random operation)chance: Trigger probability (0.0 - 1.0), controls whether the operation executesconvertRange: Whether to perform range conversion (for Copy operation)sourceMin/sourceMax: Source parameter range (for Copy operation range conversion)destMin/destMax: Target parameter range (for Copy operation range conversion)
debugString: Debug message (optional), will be output in logs for debugging- Supports all Animator parameter types (Float, Int, Bool, Trigger)
- Automatically applies parameter driver when animation state enters
- Supports parameter validation, ensuring target and source parameters exist before applying driver
Triggers sound effect playback when animation state enters.
soundTags: Array of sound tags, can configure multiple tagsplayOrder: Tag selection method (Random: random selection, Sequential: sequential selection)playMode: Sound playback mode (Normal, StopPrevious, SkipIfPlaying, UseTempObject)eventName: Event name for sound playback management (optional, uses default name if empty)
Stops sound effect playback when animation state enters or exits.
stopAllSounds: Whether to stop all currently playing sounds (true: stop all, false: stop sound by specified event name)useBuiltInEventName: Whether to use built-in event name (true: use built-in event name likeidledirectly, false: use custom trigger event name)eventName: Event name- When
stopAllSoundsis false anduseBuiltInEventNameis false: Custom trigger event name (optional, uses default nameCustomModelSoundTriggerif empty) - When
stopAllSoundsis false anduseBuiltInEventNameis true: Built-in event name (required, e.g.,idle)
- When
stopOnEnter: Whether to stop on state enter (true: stop on enter, false: stop on exit)
Notes:
- When
useBuiltInEventNameis true,eventNamemust be specified, otherwise a warning will be displayed - Custom trigger event names use the format
CustomModelSoundTrigger:{eventName}, consistent withModelSoundTrigger - Built-in event names (e.g.,
idle) are used directly without prefix
Triggers dialogue playback when animation state enters.
fileName: Dialogue definition file name (without extension)dialogueId: Dialogue ID, corresponding to the dialogue ID in the dialogue configuration filedefaultLanguage: Default language, used when the current language file is missing
- The mod automatically reads game state and updates Animator parameters
- Movement, jumping, dashing, and other states are synchronized in real-time to the custom model's Animator
- Actions like attacking and reloading trigger corresponding animation parameters
- If the
MeleeAttacklayer exists, its weight will be automatically adjusted during attacks to play attack animations - When the character holds
ItemAgent_Gun, the mod automatically subscribes to the gun'sOnShootEventandOnLoadedEventeventsOnShootEvent: Sets theShoottrigger when triggeredOnLoadedEvent: Updates theLoadedboolean value when triggered
- When the character switches held items (
OnHoldAgentChangedevent), related subscriptions are automatically updated - Combat-related triggers are automatically triggered when corresponding events occur:
- Hurt/Death: Automatically triggers
Hurt/DeadorCritHurt/CritDeadwhen the character takes damage or dies (based on whether it's a critical hit) - Hit/Kill: Automatically triggers
HitTarget/KillTargetorCritHitTarget/CritKillTargetwhen the character hits or kills a target (based on whether it's a critical hit)
- Hurt/Death: Automatically triggers
The mod supports configuring sounds for custom models, including both player key press triggers and AI automatic triggers.
Sounds can be configured in ModelInfo within bundleinfo.json:
{
"ModelID": "unique_model_id",
"Name": "Model Display Name",
"CustomSounds": [
{
"Path": "sounds/normal1.wav",
"Tags": ["normal"]
},
{
"Path": "sounds/normal2.wav",
"Tags": ["normal"]
},
{
"Path": "sounds/surprise.wav",
"Tags": ["surprise", "normal"]
},
{
"Path": "sounds/death.wav",
"Tags": ["trigger_on_death"]
}
]
}Path(required): Sound file path, relative to the model bundle folderTags(optional): Array of sound tags, used to specify sound usage scenarios"normal": Normal sound, used for player key press triggers (F1 quack) and AI automatic triggers (normal state and surprise state)"surprise": Surprise sound, used for AI surprise state (shares the same interrupt group with"normal"tag)"idle": Idle sound, used for automatic playback by characters (can be controlled through configuration to determine which character types are allowed to automatically play)"trigger_on_hurt": Hurt trigger sound, automatically plays when the character takes damage (skips if a hurt sound is already playing)"trigger_on_death": Death trigger sound, automatically plays when the character dies (stops all currently playing sounds before playing)"trigger_on_hit_target": Hit target trigger sound, automatically plays when the character hits a target (skips if a hit sound is already playing)"trigger_on_kill_target": Kill target trigger sound, automatically plays when the character kills a target (skips if a kill sound is already playing)"trigger_on_crit_hurt": Critical hurt trigger sound, automatically plays when the character takes critical damage (skips if a hurt sound is already playing)"trigger_on_crit_dead": Critical death trigger sound, automatically plays when the character dies from critical damage (stops all currently playing sounds before playing)"trigger_on_crit_hit_target": Critical hit target trigger sound, automatically plays when the character critically hits a target (skips if a hit sound is already playing)"trigger_on_crit_kill_target": Critical kill target trigger sound, automatically plays when the character critically kills a target (skips if a kill sound is already playing)"search_found_item_quality_xxx": Plays when a searched item of the specified quality is revealed;xxxcan benone,white,green,blue,purple,orange,red,q7, orq8"footstep_organic_walk_light","footstep_organic_walk_heavy","footstep_organic_run_light","footstep_organic_run_heavy": Organic material footstep sounds (light/heavy walk, light/heavy run)"footstep_mech_walk_light","footstep_mech_walk_heavy","footstep_mech_run_light","footstep_mech_run_heavy": Mechanical material footstep sounds (light/heavy walk, light/heavy run)"footstep_danger_walk_light","footstep_danger_walk_heavy","footstep_danger_run_light","footstep_danger_run_heavy": Danger material footstep sounds (light/heavy walk, light/heavy run)"footstep_nosound_walk_light","footstep_nosound_walk_heavy","footstep_nosound_run_light","footstep_nosound_run_heavy": No sound material footstep sounds (light/heavy walk, light/heavy run)"footstep_horse_walk_light","footstep_horse_walk_heavy","footstep_horse_run_light","footstep_horse_run_heavy": Horse footstep sounds (light/heavy walk, light/heavy run)- Can contain multiple tags, indicating the sound can be used in multiple scenarios
- Defaults to
["normal"]when no tags are specified
- When a character model has sounds configured, pressing the
Quackkey (F1) in-game will trigger a sound - Only sounds tagged with
"normal"will be played - Randomly selects one sound from all sounds tagged with
"normal" - Only player characters respond to key presses, pets do not trigger
- When playing a sound, it also creates an AI sound, allowing other AIs to hear the player's sound
- Sound Interrupt Mechanism: Player key press triggered sounds share the same interrupt group with AI automatic triggered sounds (
"normal"and"surprise"tags), newly played sounds will interrupt sounds playing in the same group
- AI will automatically trigger sounds with corresponding tags based on game state
"normal": Triggered during AI normal state"surprise": Triggered during AI surprise state- Sound Interrupt Mechanism: AI automatic triggered sounds (
"normal"and"surprise"tags) share the same interrupt group with player key press triggered sounds, newly played sounds will interrupt sounds playing in the same group "trigger_on_hurt": Automatically plays when the character takes damage (applies to all character types)- Sound Interrupt Mechanism: If a hurt sound is already playing, the new hurt sound will be skipped to avoid duplicate playback
"trigger_on_hit_target": Automatically plays when the character hits a target (applies to all character types)- Sound Interrupt Mechanism: If a hit sound is already playing, the new hit sound will be skipped to avoid duplicate playback
"trigger_on_kill_target": Automatically plays when the character kills a target (applies to all character types)- Sound Interrupt Mechanism: If a kill sound is already playing, the new kill sound will be skipped to avoid duplicate playback
"trigger_on_crit_hurt": Automatically plays when the character takes critical damage (applies to all character types)- Sound Interrupt Mechanism: If a hurt sound is already playing, the new hurt sound will be skipped to avoid duplicate playback
"trigger_on_crit_dead": Automatically plays when the character dies from critical damage (applies to all character types)- Sound Interrupt Mechanism: Before playing the death sound, all currently playing sounds will be stopped, then the death sound will play
"trigger_on_crit_hit_target": Automatically plays when the character critically hits a target (applies to all character types)- Sound Interrupt Mechanism: If a hit sound is already playing, the new hit sound will be skipped to avoid duplicate playback
"trigger_on_crit_kill_target": Automatically plays when the character critically kills a target (applies to all character types)- Sound Interrupt Mechanism: If a kill sound is already playing, the new kill sound will be skipped to avoid duplicate playback
"idle": Characters with automatic playback enabled will automatically play idle sounds at random intervals- Play interval can be configured in
IdleAudioConfig.json - Default interval is 30-45 seconds (random)
- Will not play when the character is dead
- Which character types are allowed to automatically play can be controlled through
EnableIdleAudioandAICharacterEnableIdleAudioconfigurations - By default, AI characters and pets are allowed to automatically play, while player characters are not (can be enabled through configuration)
- Play interval can be configured in
"trigger_on_death": Automatically plays when the character dies (applies to all character types)- Sound Interrupt Mechanism: Before playing the death sound, all currently playing sounds will be stopped, then the death sound will play
- If a sound with the specified tag doesn't exist, the original game event will be used (no fallback to other tags)
- Footstep sounds are automatically triggered based on ground material and movement state when characters move
- Supports four ground materials: organic, mech, danger, and no sound
- Supports four movement states: light walk (walkLight), heavy walk (walkHeavy), light run (runLight), and heavy run (runHeavy)
- The system automatically selects the corresponding sound tag based on the character's
footStepMaterialTypeandFootStepTypes - Sound Interrupt Mechanism: Footsteps have their own independent interrupt group, newly played footsteps will interrupt footsteps playing in the same group
- If the model doesn't have footstep sounds configured for the corresponding material and state, vanilla footstep sounds will be used
- When the player finishes searching or inspecting an item and its quality is revealed, the corresponding sound tag is triggered
- Use
search_found_item_quality_xxx, wherexxxmatches the same quality suffix listed inTags:none,white,green,blue,purple,orange,red,q7,q8 - If no sound is configured for that quality, nothing plays and the vanilla behavior remains unchanged
- Can use
ModelSoundTriggercomponent in animation state machines to trigger sounds when states are entered- Supports configuring multiple sound tags, can choose random or sequential playback
- Supports configuring sound playback modes for finer audio control
- Sound tags can be any custom tags, no longer restricted to predefined tags
- Can use
ModelSoundStopTriggercomponent in animation state machines to stop sound playback- Supports stopping sounds by specified event name (custom triggers or built-in event names like
idle) - Supports stopping all currently playing sounds
- Supports triggering stop operation on state enter or exit
- Provides user-friendly configuration interface in Unity editor with conditional display and warning prompts
- Supports stopping sounds by specified event name (custom triggers or built-in event names like
- Sound files should be placed inside the model bundle folder
- Supports audio formats used by the game (typically WAV, OGG, etc.)
- Sound file paths are specified in
Path, relative to the model bundle folder - Example: If the model bundle folder is
MyModel/and the sound file isMyModel/sounds/voice.wav, thenPathshould be set to"sounds/voice.wav"
In ModelInfo within bundleinfo.json, you can configure playback probability for sound tags:
{
"ModelID": "unique_model_id",
"Name": "Model Display Name",
"SoundTagPlayChance": {
"trigger_on_hurt": 50.0,
"trigger_on_hit_target": 30.0
}
}SoundTagPlayChance(optional): Dictionary type, where keys are sound tags (case-insensitive) and values are playback probabilities (0-100)- Probability values are automatically converted to floats between 0-1 (divided by 100)
- When a sound with this tag is triggered, whether it plays is determined by the configured probability
- If not configured, always plays (default behavior)
- If probability is 0, never plays
- If probability is less than 100, there's a chance the sound won't play
- If a model has no sounds configured, it will not affect other functionality
- Sound tags are no longer restricted to predefined tags, any custom tags can be used
- Custom tags can be triggered through the
ModelSoundTriggercomponent in animation state machines
The mod supports configuring dialogue for custom models, allowing dialogue bubbles to be displayed when triggered in animation state machines.
Dialogue configuration files should be placed inside the model bundle folder, with file naming format: {filename}_{language}.json
Examples:
dialogue_English.json: English dialogue filedialogue_Chinese.json: Chinese dialogue file
Dialogue configuration file format:
[
{
"Id": "dialogue_id_1",
"Texts": [
"Dialogue text 1",
"Dialogue text 2",
"Dialogue text 3"
],
"Mode": "Sequential",
"Duration": 2.0
},
{
"Id": "dialogue_id_2",
"Texts": [
"Random dialogue 1",
"Random dialogue 2"
],
"Mode": "Random",
"Duration": 3.0
}
]Id(required): Unique identifier for the dialogue, used to reference inModelDialogueTriggerTexts(required): Array of dialogue texts, containing all possible texts for this dialogueMode(optional): Dialogue playback mode (default:Sequential)Sequential: Sequential playback, plays in array order, restarts from the beginning after the last oneRandom: Random playback, randomly selects one text from the array each timeRandomNoRepeat: Random no-repeat playback, randomly selects texts until all have been played, then restartsContinuous: Continuous playback, plays all texts sequentially in order
Duration(optional): Dialogue display duration in seconds (default:2.0)
- Use
ModelDialogueTriggercomponent in animation state machines to trigger dialogue when states are entered - Configure
fileName(dialogue file name without extension) anddialogueId(dialogue ID) - Configure
defaultLanguage(default language), used when the current language file is missing - Dialogue bubbles will automatically appear above the character, position automatically adjusts based on the character model
- Dialogue files support multiple languages, the system automatically loads the corresponding language file based on the current game language
- If the current language's dialogue file doesn't exist, it will fall back to the language file specified by
defaultLanguage - Language file naming rules:
{filename}_{language}.json- Chinese (Simplified/Traditional):
Chinese - Other languages: Use the string form of
SystemLanguageenum values (e.g.,English,Japanese, etc.)
- Chinese (Simplified/Traditional):
- If a model has no dialogue configured, it will not affect other functionality
- Dialogue files must contain valid JSON format and at least one dialogue definition
- Dialogue IDs must be unique, duplicate IDs will be overwritten (uses the last one)
The mod supports configuring custom models for AI characters in the game, allowing different models to be configured for different AI characters.
In the model's bundleinfo.json, you need to:
- Include
"AICharacter"in theTargetarray, indicating the model applies to AI characters - Specify supported AI character name keys in the
SupportedAICharactersarray
Example:
{
"ModelID": "ai_model_id",
"Name": "AI Model",
"Target": ["AICharacter"],
"SupportedAICharacters": ["Cname_Wolf", "Cname_Scav", "*"]
}- If
SupportedAICharacterscontains"*", it means the model applies to all AI characters - If
SupportedAICharacterscontains specific AI character name keys, the model only applies to those AI characters - If
SupportedAICharactersis an empty array, the model will not be applied to any AI character
In UsingModel.json, you can configure models for each AI character individually:
Recommended Method (v1.10.0+):
{
"Version": 2,
"TargetTypeModelIDs": {
"built-in:AICharacter_Cname_Wolf": "wolf_model_id",
"built-in:AICharacter_Cname_Scav": "scav_model_id",
"built-in:AICharacter_*": "default_ai_model_id"
}
}Obsolete Method (Backward Compatible):
{
"AICharacterModelIDs": {
"Cname_Wolf": "wolf_model_id",
"Cname_Scav": "scav_model_id",
"*": "default_ai_model_id"
}
}Configuration priority:
- First check if the AI character has an individually configured model (
built-in:AICharacter_<character name>or obsoleteAICharacterModelIDs[<character name>]) - If not, check the default model corresponding to
"built-in:AICharacter_*"or obsoleteAICharacterModelIDs["*"] - If neither exists, use the original model
The keys for AI unit targets (such as "Cname_Wolf", "Cname_Scav") can be found in the game's localization files:
- File location: CSV files in the
<Game Installation Directory>/Duckov_Data/StreamingAssets/Localizationdirectory - How to find: Open any language CSV file (e.g.,
ChineseSimplified.csv), find theCharacterssheet (worksheet), and the key column contains the AI character name keys - These keys can be used in the
SupportedAICharactersarray andAICharacterModelIDsdictionary
- Open the model selection interface (default key:
\) - Select "AI Character" from the target type dropdown menu
- Select the AI character to configure (or select "All AI Characters" to set default configuration items)
- Browse and select the model to apply
- Configuration will be automatically saved to
UsingModel.json
You can configure whether to hide original equipment for each AI character individually:
- In the model selection interface, select "AI Character" target type
- Select a specific AI character (or select "All AI Characters" to set the default value)
- A "Hide Equipment" toggle option for that AI character will be displayed in the target settings area
- Each AI character has an independent hide equipment setting, and you can also set a default value for "All AI Characters"
- Configuration Selection Logic: Audio, equipment hiding, and other settings will select configuration based on the actually used model
- If an AI character uses its own model configuration (a model is individually configured for that AI character in
UsingModel.json), it will use that AI character's settings - If an AI character uses the fallback model (
*, i.e., the default model for "All AI Characters"), it will use*settings
- If an AI character uses its own model configuration (a model is individually configured for that AI character in
- Configuration will be automatically saved to
HideEquipmentConfig.json
- AI character models need to meet the same requirements as character models (locator points, Animator configuration, etc.)
- Models must explicitly declare support for AI characters in their
bundleinfo.json- Recommended method (v1.10.0+): Include
"built-in:AICharacter_*"or"built-in:AICharacter_<character name>"inTargetTypes - Obsolete method (backward compatible): Include
"AICharacter"inTargetand declare supported AI characters inSupportedAICharacters
- Recommended method (v1.10.0+): Include
- If the model is not properly configured, AI characters will use the original model