### Modify Buff Parameters via XML Patch Source: https://warhorse.youtrack.cloud/articles/KM-A-84 To alter the effects of a buff, create a patch XML file named `buff__.xml`. This example modifies the `crime_punishment_pillory_medium` buff to increase agility by 10. ```xml ``` -------------------------------- ### CVar Modification Configuration Source: https://warhorse.youtrack.cloud/articles/KM-A-8 This file is used to set console variable values for your mod. Place it in the mod's directory to override or set specific game variables. This example increases the horse jump height. ```cfg wh_horse_JumpHeight=30.0 ``` -------------------------------- ### Modify RPG Constant via XML Patch Source: https://warhorse.youtrack.cloud/articles/KM-A-84 To change a global RPG constant, create an XML patch file named `rpg_param__.xml` in the appropriate data directory. This example sets `HerbGatherXP` to 20. ```xml ``` -------------------------------- ### Run ShaderCacheGen for Precompilation Source: https://warhorse.youtrack.cloud/articles/KM-A-82 Execute ShaderCacheGen.exe with the /PrecacheShaderList argument to initiate shader precompilation. The IP address is not used but the parameter is required. This step may no longer be needed in version 1.3. ```bash Tools\ShaderCacheGen\ShaderCacheGen.exe /PrecacheShaderList -remoteShaderCompilerIp 127.0.0.1 ``` -------------------------------- ### Run Resource Compiler for Shader Paks Source: https://warhorse.youtrack.cloud/articles/KM-A-82 Use the Resource Compiler (rc.exe) with the specified job target and output path to create essential shader pak files. Ensure the job configuration file (RcJob_WH.xml) is correctly set up. ```bash Tools\rc\rc.exe /jobtarget=ShadersAll /OutputPath=.\EngineMod /CryPakPlatform=D3D12 /crashOnAssert /zip_encrypt=0 /Streaming=1 /IsShaderDebug=0 /p=pc /job=Tools\rc\RcJob_WH.xml ``` -------------------------------- ### Mod Loading Order Configuration Source: https://warhorse.youtrack.cloud/articles/KM-A-8 This file specifies the order in which mods should be loaded. Each line should contain a modid. Ensure your mod's modid is listed here if it needs to load. ```txt horse_megajump ``` -------------------------------- ### System Configuration for Shader Compilation Source: https://warhorse.youtrack.cloud/articles/KM-A-82 Modify the system.cfg file with these settings to prepare for shader recompilation. Ensure these parameters are correctly set before proceeding. ```cfg sys_no_crash_dialog=1 log_IncludeTime=3 log_Verbosity=3 log_FileVerbosity=3 r_driver=DX12 sys_game_folder=Data r_ShadersAsyncCompiling=0 r_ShadersAsyncMaxThreads=16 r_multithreaded=0 r_ShadersSubmitRequestline=0 r_PipelineStatePrecacheMode=3 sys_intromoviesduringinit=0 ``` -------------------------------- ### Define New Player Rule in Custom STORM XML Source: https://warhorse.youtrack.cloud/articles/KM-A-84 Create a new rule in a custom XML file to override or add RPG attributes. This rule will be applied after base game rules due to the patching order. ```XML ``` -------------------------------- ### KCD2 Modding Directory Structure Source: https://warhorse.youtrack.cloud/articles/KM-A-82 This is the expected directory structure for modding tools, specifically showing the location of USER_ShaderCacheGen and its subfolders. ```text KCD2Mod ├ Bin ├ Data ├ Editor ├ Engine ├ ... └ USER_ShaderCacheGen │ ├ ... │ ├ Shaders │ │ ├ cache │ │ │ └ D3D12 │ │ │ ├ PipelineStateBinCache.txt │ │ │ ├ RenderPassBinCache.txt │ │ │ ├ ResourceLayoutBinCache.txt │ │ │ └ VertexFormatBinCache.txt │ │ └ ShaderList.txt │ └ ... ├ ... └ system.cfg ``` -------------------------------- ### Game Log Output for Mod Loading Source: https://warhorse.youtrack.cloud/articles/KM-A-8 This log output shows messages from the game related to mod loading. It indicates whether the mod's manifest was read, if it's enabled, and if its configuration file was loaded. Errors, such as missing localization files, are also reported. ```log [Mod] 'mods/horse_megajump' has no version restrictions in manifest ... [Mod] 'mods/horse_megajump' is not limited to any game version, it will be enabled ... Loading config file 'mods/horse_megajump/mod.cfg' (mods\horse_catapult\mod.cfg) ... <16:22:02> [Mod] Opening paks in mods/horse_megajump/data/*.pak ... <16:22:20> [Error] XML reader: Can't open file 'Localization\text__horse_megajump.xml' ... <16:22:30> Loading lua init script for mod horse_megajump... <16:22:30> Loading and executing script file 'scripts/mods/horse_megajump.lua'... ``` -------------------------------- ### Mod Manifest Configuration Source: https://warhorse.youtrack.cloud/articles/KM-A-8 This XML file defines the metadata for your mod, including its name, ID, description, author, version, and whether it modifies game levels. Ensure the modid contains only lowercase letters and underscores. ```xml Horse mega jump horse_megajump Your horse now jumps over buildings patrik.papso 1.0.0 2024-12-06 false ``` -------------------------------- ### Log RPG Parameters with Lua Source: https://warhorse.youtrack.cloud/articles/KM-A-84 This Lua script attempts to log all parameters within the RPG table. It is noted that this may only list methods and not actual values. ```Lua for k,v in pairs(RPG) do System.LogAlways(tostring(k).. ": "..tostring(v)) end ``` -------------------------------- ### Create Custom Horse Storm Rule Source: https://warhorse.youtrack.cloud/articles/KM-A-79 This XML structure is used to create a patched Storm rule for custom horse appearances. It should be saved in a new XML file, such as 'custom_horse.xml', to override or extend default rules. ```xml ``` -------------------------------- ### Configure Storm Override for Custom Horse Source: https://warhorse.youtrack.cloud/articles/KM-A-79 This XML configuration sets up a storm override to use a custom horse appearance. It specifies the task and the source XML file for the appearance. ```xml ``` -------------------------------- ### Patch STORM Root File to Include Custom XML Source: https://warhorse.youtrack.cloud/articles/KM-A-84 Patch the main storm file to include a new custom XML file. This ensures your custom rules are loaded. ```XML ``` -------------------------------- ### Configure Horse Appearance Rule in Storm Source: https://warhorse.youtrack.cloud/articles/KM-A-79 This XML snippet defines a Storm rule for a specific horse appearance. It sets the body and hair components based on the horse's name. This is a base rule that can be patched. ```xml ``` -------------------------------- ### Define Custom Horse Body and Hair Source: https://warhorse.youtrack.cloud/articles/KM-A-79 This XML snippet defines the body, hair, and beard for a custom horse appearance. It is part of a larger rule set. ```xml ``` -------------------------------- ### Modify Player Henry's RPG Attributes with STORM Source: https://warhorse.youtrack.cloud/articles/KM-A-84 This XML snippet shows a STORM rule to select 'player_henry' and set attributes like agility. It's part of the base game's configuration. ```XML ... ... ... ... ``` -------------------------------- ### Add Horse Zebra Morph to ClothingMorph.xml Source: https://warhorse.youtrack.cloud/articles/KM-A-79 Add this XML element to the ClothingMorph.xml file to define a new morph for horse body types. Ensure the 'Name' attribute matches the intended morph name in Smid. ```xml ``` -------------------------------- ### Calculate Armor Defense Based on Health Source: https://warhorse.youtrack.cloud/articles/KM-A-89 Determine the current defense value of an armor piece using its health and a specific RPG constant. The 'ArmorStatusToDefenseCoef' is set to 0.6. ```text CurrentDefense = Defense*(sqrt(health)*ArmorStatusToDefenseCoef+1-ArmorStatusToDefenseCoef) ``` -------------------------------- ### Modify RPG Constant via LUA Source: https://warhorse.youtrack.cloud/articles/KM-A-84 RPG parameters can be dynamically modified during gameplay using LUA. Accessing `RPG.HerbGatherXP` retrieves its value, while assigning a new value changes it. ```lua RPG.HerbGatherXP = 20 ``` -------------------------------- ### Calculate Weapon Attack Based on Health Source: https://warhorse.youtrack.cloud/articles/KM-A-89 Use this formula to determine a weapon's current attack value, considering its health and a specific RPG constant. The RPG constant 'WeaponStatusToAttackCoef' is set to 0.6. ```text CurrentAttack = Attack*(sqrt(health)*WeaponStatusToAttackCoef+1-WeaponStatusToAttackCoef) ``` -------------------------------- ### Calculate Weapon Price Based on Health Source: https://warhorse.youtrack.cloud/articles/KM-A-89 This formula calculates the current price of a weapon based on its health and a weight constant. The 'ItemHealthPriceStatusWeight' constant is set to 0.99. Note that in-game prices are divided by 10 compared to database values. ```text CurrentPrice = Price*(health*ItemHealthPriceStatusWeight+1-ItemHealthPriceStatusWeight) ``` -------------------------------- ### Calculate Armor Charisma Based on Health Source: https://warhorse.youtrack.cloud/articles/KM-A-89 This formula calculates the current charisma value of an armor piece, factoring in its health and a specific RPG constant. The 'ArmorStatusToCharismaCoef' is set to 0.6. ```text CurrentCharisma = Charisma*(sqrt(health)*ArmorStatusToCharismaCoef+1-ArmorStatusToCharismaCoef) ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.