3.461
77
3.461
77
Have you disappointed with weapons clearing their blood by just switching to another weapon? Or have you disappointed with the fact blood of weapons gets cleared when generated by popping from inventories of pedestreans?
This script/plugin keeps weapon blood and resolves those issues, just like in Left 4 Dead 2 and Dying Light. This mod also restores weapon blood state as is when the player collects some pickup thanks to EasyHook (if you want to know how to hook some of the game code or place detours into it with C# scripts/plugins, you should view the source code below!).
Available as a script for ScriptHookVDotNet and a plugin for RAGE Plugin Hook.
For your information, the weapon blood issues mentioned above are also present in RDR2. I think weapon blood feature deserved more attention by Rockstar Games, but they didn't add additional space for weapon blood states (so the game restore them when ped switch their weapons) to ped inventory item struct in CPedInventory in both GTA V and RDR2.
About
Installation
Install either version, but not both.
For ScriptHookVDotNet Version
For RAGE Plugin Hook Version
This script/plugin itself is highly optimized for both runtimes, but if you don't mind using either version, I would recommend the ScriptHookVDotNet version. RPH does not seem to continuously improve performance of the runtime (if you doubt it, use a profiler like one of Visual Studio with the source code of this mod for CPU usage) like SHVDN has done. Even without NoScriptThread (this mod use this flag) and in v3.6.0, SHVDN still performs better than RPH.
However, you should note that ScriptHookVDotNet suffers the compatibility issue with any programs that throws C++ exceptions or SEH exceptions (including debuggers) and RAGE Plugin Hook until v3.6.0 (will be solved in v3.7.0). If you have SHVDN v3.6.0 or earlier installed and you use RPH at the same time, RPH may crash the entire game when one of the loaded RPH plugins crashes for a unhandled exception (intended behavior: only the crashed RPH plugin stops executing).
Configuration
Console Commands
Future Features
- change blood states by performing stealth kill
Change Log
v1.1:
- Add options for water blood cleaning and cheat codes for blood cleaning for the player.
- Made the script/plugin add 2 console commands (although these commands are pseudo ones in SHVDN).
v1.0:
- First release
Note For CamoDiffuseTexIdxs
This field is a binary dictionary map data of CWeaponInfo (used in weapons.meta files), which enables to use up to 8 alternative camo diffuse textures. Texture names for this feature must be named as "w_camo_%d" ("%d" will be filled in a number between 1 and 8 inclusive, but the field of weapons.meta takes a number between 0 and 7). Probably materials must also be set up for weapon models.
Source Code
Can be found on GitHub. Licensed under the MIT License.
This script/plugin keeps weapon blood and resolves those issues, just like in Left 4 Dead 2 and Dying Light. This mod also restores weapon blood state as is when the player collects some pickup thanks to EasyHook (if you want to know how to hook some of the game code or place detours into it with C# scripts/plugins, you should view the source code below!).
Available as a script for ScriptHookVDotNet and a plugin for RAGE Plugin Hook.
For your information, the weapon blood issues mentioned above are also present in RDR2. I think weapon blood feature deserved more attention by Rockstar Games, but they didn't add additional space for weapon blood states (so the game restore them when ped switch their weapons) to ped inventory item struct in CPedInventory in both GTA V and RDR2.
About
- This script/plugin tracks blood states (strictly CamoDiffuseTexIdxs values) of weapons and restores when switched to them again.
- Trackes for all pedestrians (peds), including the player ped of course.
- When peds lose some weapons with variable blood states, this script/plugin drops the states.
- Applies the blood states when peds drop their weapons with non-default blood states.
- When the player collect weapon pickups with non-default blood states, the blood states will be restored when they switch to the weapons again. Supported for all peds just in case.
- When you switched to another character and a new ped is created, this mod can't track blood states of the weapons they had before.
- Makes the water cleans blood off all of the weapons the ped has (optional).
- Supports (at least intended to support) all game versions, at least for ScriptHookVDotNet version (tested in b2845, b2699, and b372).
- For RAGE Plugin Hook version, this plugin may not work in some older game versions.
- No dedicated support for cracked/pirated game versions.
Installation
Install either version, but not both.
For ScriptHookVDotNet Version
- Install Script Hook V
- Install Script Hook V .NET (v3.6.0 or later required)
- Create a "scripts" folder in your GTA V directory if it doesn't already exist.
- Copy PersistentWeapoBlood.dll and EasyHook.dll to the "scripts" folder in your GTA V directory.
- For EasyHook.dll, you can put it in the root directory. You must use 2.7.7097.0 (or later version, but probably no more updates expected) of EasyHook.dll.
For RAGE Plugin Hook Version
- Install RAGEPluginHook:
- You can download from the official Discord server of RAGE Plugin Hook, under the "necessities" channel.
- Alternatively LSPDFR contains the latest RAGE Plugin Hook.
- Install .NET Framework 4.8
- Create a "Plugins" folder in your GTA V directory if it doesn't already exist.
- Copy PersistentWeapoBlood.dll to the "Plugins" folder in your GTA V directory.
- Copy EasyHook.dll to your root GTA V directory.
- You can use 2.7.6578.0 or later version of EasyHook (this plugin intentionally specifies 2.7.6578.1 since LSPDFR uses 2.7.6578.0 version of EasyHook.dll).
This script/plugin itself is highly optimized for both runtimes, but if you don't mind using either version, I would recommend the ScriptHookVDotNet version. RPH does not seem to continuously improve performance of the runtime (if you doubt it, use a profiler like one of Visual Studio with the source code of this mod for CPU usage) like SHVDN has done. Even without NoScriptThread (this mod use this flag) and in v3.6.0, SHVDN still performs better than RPH.
However, you should note that ScriptHookVDotNet suffers the compatibility issue with any programs that throws C++ exceptions or SEH exceptions (including debuggers) and RAGE Plugin Hook until v3.6.0 (will be solved in v3.7.0). If you have SHVDN v3.6.0 or earlier installed and you use RPH at the same time, RPH may crash the entire game when one of the loaded RPH plugins crashes for a unhandled exception (intended behavior: only the crashed RPH plugin stops executing).
Configuration
- You can change the configure of this script/plugin via PersistentWeapoBlood.ini.
- If the ini file does not exist, this script/plugin just uses default values. If this script/plugin fails to parse some value, the default value will be used.
- Always use a decimal point as a decimal separator regardless of your locale setting even for SHVDN version.
- The confingable values are the following one (don't use double quotes for any keys or values):
- [WaterCleaningForPedSubmersion]
- Description: The feature where water will clean blood off all of the ped weapons for the peds submersion or swimming.
- "TargetPeds"
- Description: Determines the target peds whose weapons the water cleans.
- Possible value: "AllPeds", "PlayerOnly", "None". Case-insensitive.
- Default value: "AllPeds"
- "SubmersionLevelThreshold"
- Description: Determines the submersion level threshold.
- Possible value: A floating point value in the range of 0 to 1 inclusive. 1 means weapon blood will clean if the ped is fully submerged (or swimming).
- Default value: "0.875
- [ClearWeaponBloodCommands]
- "RegisterCheatCodes"
- Description: Specifies whether the cheat codes for weapon cleaning can be used.
- Available Cheats
- CLEANALLPLAYERMELEEWEAPONS: Cleans all of melee weapons of the player.
- CLEANCURRENTPLAYERMELEEWEAPON: Cleans the current melee weapon of the player. Do nothing if the current weapon can't have a non-default CamoDiffuseTexIdxs value.
- "RegisterCheatCodes"
- [WaterCleaningForPedSubmersion]
Console Commands
- This script/plugin provides 2 console commands for SHVDN/RPH consoles. The available commands are the following:
- CleanAllPlayerMeleeWeapons
- Cleans blood off all of the melee weapons of the player.
- CleanCurrentPlayerMeleeWeapon:
- Cleans blood off the current melee weapon of the player. Do nothing if the current weapon can't have a non-default CamoDiffuseTexIdxs value.
- For SHVDN version, you will have to type like "PersistentWeaponBlood.Commands.CleanAllPlayerMeleeWeapons()" to call these commands since SHVDN does not provide dedicated custom console commands as of v3.6.0.
- CleanAllPlayerMeleeWeapons
Future Features
- change blood states by performing stealth kill
Change Log
v1.1:
- Add options for water blood cleaning and cheat codes for blood cleaning for the player.
- Made the script/plugin add 2 console commands (although these commands are pseudo ones in SHVDN).
v1.0:
- First release
Note For CamoDiffuseTexIdxs
This field is a binary dictionary map data of CWeaponInfo (used in weapons.meta files), which enables to use up to 8 alternative camo diffuse textures. Texture names for this feature must be named as "w_camo_%d" ("%d" will be filled in a number between 1 and 8 inclusive, but the field of weapons.meta takes a number between 0 and 7). Probably materials must also be set up for weapon models.
Source Code
Can be found on GitHub. Licensed under the MIT License.
Πρωτοανέβηκε: 30 Απρίλιος 2023
Πιο πρόσφατη ενημέρωση: 3 Μάιος 2023
Last Downloaded: 14 hours ago
17 σχόλια
More mods by kagikn:
Have you disappointed with weapons clearing their blood by just switching to another weapon? Or have you disappointed with the fact blood of weapons gets cleared when generated by popping from inventories of pedestreans?
This script/plugin keeps weapon blood and resolves those issues, just like in Left 4 Dead 2 and Dying Light. This mod also restores weapon blood state as is when the player collects some pickup thanks to EasyHook (if you want to know how to hook some of the game code or place detours into it with C# scripts/plugins, you should view the source code below!).
Available as a script for ScriptHookVDotNet and a plugin for RAGE Plugin Hook.
For your information, the weapon blood issues mentioned above are also present in RDR2. I think weapon blood feature deserved more attention by Rockstar Games, but they didn't add additional space for weapon blood states (so the game restore them when ped switch their weapons) to ped inventory item struct in CPedInventory in both GTA V and RDR2.
About
Installation
Install either version, but not both.
For ScriptHookVDotNet Version
For RAGE Plugin Hook Version
This script/plugin itself is highly optimized for both runtimes, but if you don't mind using either version, I would recommend the ScriptHookVDotNet version. RPH does not seem to continuously improve performance of the runtime (if you doubt it, use a profiler like one of Visual Studio with the source code of this mod for CPU usage) like SHVDN has done. Even without NoScriptThread (this mod use this flag) and in v3.6.0, SHVDN still performs better than RPH.
However, you should note that ScriptHookVDotNet suffers the compatibility issue with any programs that throws C++ exceptions or SEH exceptions (including debuggers) and RAGE Plugin Hook until v3.6.0 (will be solved in v3.7.0). If you have SHVDN v3.6.0 or earlier installed and you use RPH at the same time, RPH may crash the entire game when one of the loaded RPH plugins crashes for a unhandled exception (intended behavior: only the crashed RPH plugin stops executing).
Configuration
Console Commands
Future Features
- change blood states by performing stealth kill
Change Log
v1.1:
- Add options for water blood cleaning and cheat codes for blood cleaning for the player.
- Made the script/plugin add 2 console commands (although these commands are pseudo ones in SHVDN).
v1.0:
- First release
Note For CamoDiffuseTexIdxs
This field is a binary dictionary map data of CWeaponInfo (used in weapons.meta files), which enables to use up to 8 alternative camo diffuse textures. Texture names for this feature must be named as "w_camo_%d" ("%d" will be filled in a number between 1 and 8 inclusive, but the field of weapons.meta takes a number between 0 and 7). Probably materials must also be set up for weapon models.
Source Code
Can be found on GitHub. Licensed under the MIT License.
This script/plugin keeps weapon blood and resolves those issues, just like in Left 4 Dead 2 and Dying Light. This mod also restores weapon blood state as is when the player collects some pickup thanks to EasyHook (if you want to know how to hook some of the game code or place detours into it with C# scripts/plugins, you should view the source code below!).
Available as a script for ScriptHookVDotNet and a plugin for RAGE Plugin Hook.
For your information, the weapon blood issues mentioned above are also present in RDR2. I think weapon blood feature deserved more attention by Rockstar Games, but they didn't add additional space for weapon blood states (so the game restore them when ped switch their weapons) to ped inventory item struct in CPedInventory in both GTA V and RDR2.
About
- This script/plugin tracks blood states (strictly CamoDiffuseTexIdxs values) of weapons and restores when switched to them again.
- Trackes for all pedestrians (peds), including the player ped of course.
- When peds lose some weapons with variable blood states, this script/plugin drops the states.
- Applies the blood states when peds drop their weapons with non-default blood states.
- When the player collect weapon pickups with non-default blood states, the blood states will be restored when they switch to the weapons again. Supported for all peds just in case.
- When you switched to another character and a new ped is created, this mod can't track blood states of the weapons they had before.
- Makes the water cleans blood off all of the weapons the ped has (optional).
- Supports (at least intended to support) all game versions, at least for ScriptHookVDotNet version (tested in b2845, b2699, and b372).
- For RAGE Plugin Hook version, this plugin may not work in some older game versions.
- No dedicated support for cracked/pirated game versions.
Installation
Install either version, but not both.
For ScriptHookVDotNet Version
- Install Script Hook V
- Install Script Hook V .NET (v3.6.0 or later required)
- Create a "scripts" folder in your GTA V directory if it doesn't already exist.
- Copy PersistentWeapoBlood.dll and EasyHook.dll to the "scripts" folder in your GTA V directory.
- For EasyHook.dll, you can put it in the root directory. You must use 2.7.7097.0 (or later version, but probably no more updates expected) of EasyHook.dll.
For RAGE Plugin Hook Version
- Install RAGEPluginHook:
- You can download from the official Discord server of RAGE Plugin Hook, under the "necessities" channel.
- Alternatively LSPDFR contains the latest RAGE Plugin Hook.
- Install .NET Framework 4.8
- Create a "Plugins" folder in your GTA V directory if it doesn't already exist.
- Copy PersistentWeapoBlood.dll to the "Plugins" folder in your GTA V directory.
- Copy EasyHook.dll to your root GTA V directory.
- You can use 2.7.6578.0 or later version of EasyHook (this plugin intentionally specifies 2.7.6578.1 since LSPDFR uses 2.7.6578.0 version of EasyHook.dll).
This script/plugin itself is highly optimized for both runtimes, but if you don't mind using either version, I would recommend the ScriptHookVDotNet version. RPH does not seem to continuously improve performance of the runtime (if you doubt it, use a profiler like one of Visual Studio with the source code of this mod for CPU usage) like SHVDN has done. Even without NoScriptThread (this mod use this flag) and in v3.6.0, SHVDN still performs better than RPH.
However, you should note that ScriptHookVDotNet suffers the compatibility issue with any programs that throws C++ exceptions or SEH exceptions (including debuggers) and RAGE Plugin Hook until v3.6.0 (will be solved in v3.7.0). If you have SHVDN v3.6.0 or earlier installed and you use RPH at the same time, RPH may crash the entire game when one of the loaded RPH plugins crashes for a unhandled exception (intended behavior: only the crashed RPH plugin stops executing).
Configuration
- You can change the configure of this script/plugin via PersistentWeapoBlood.ini.
- If the ini file does not exist, this script/plugin just uses default values. If this script/plugin fails to parse some value, the default value will be used.
- Always use a decimal point as a decimal separator regardless of your locale setting even for SHVDN version.
- The confingable values are the following one (don't use double quotes for any keys or values):
- [WaterCleaningForPedSubmersion]
- Description: The feature where water will clean blood off all of the ped weapons for the peds submersion or swimming.
- "TargetPeds"
- Description: Determines the target peds whose weapons the water cleans.
- Possible value: "AllPeds", "PlayerOnly", "None". Case-insensitive.
- Default value: "AllPeds"
- "SubmersionLevelThreshold"
- Description: Determines the submersion level threshold.
- Possible value: A floating point value in the range of 0 to 1 inclusive. 1 means weapon blood will clean if the ped is fully submerged (or swimming).
- Default value: "0.875
- [ClearWeaponBloodCommands]
- "RegisterCheatCodes"
- Description: Specifies whether the cheat codes for weapon cleaning can be used.
- Available Cheats
- CLEANALLPLAYERMELEEWEAPONS: Cleans all of melee weapons of the player.
- CLEANCURRENTPLAYERMELEEWEAPON: Cleans the current melee weapon of the player. Do nothing if the current weapon can't have a non-default CamoDiffuseTexIdxs value.
- "RegisterCheatCodes"
- [WaterCleaningForPedSubmersion]
Console Commands
- This script/plugin provides 2 console commands for SHVDN/RPH consoles. The available commands are the following:
- CleanAllPlayerMeleeWeapons
- Cleans blood off all of the melee weapons of the player.
- CleanCurrentPlayerMeleeWeapon:
- Cleans blood off the current melee weapon of the player. Do nothing if the current weapon can't have a non-default CamoDiffuseTexIdxs value.
- For SHVDN version, you will have to type like "PersistentWeaponBlood.Commands.CleanAllPlayerMeleeWeapons()" to call these commands since SHVDN does not provide dedicated custom console commands as of v3.6.0.
- CleanAllPlayerMeleeWeapons
Future Features
- change blood states by performing stealth kill
Change Log
v1.1:
- Add options for water blood cleaning and cheat codes for blood cleaning for the player.
- Made the script/plugin add 2 console commands (although these commands are pseudo ones in SHVDN).
v1.0:
- First release
Note For CamoDiffuseTexIdxs
This field is a binary dictionary map data of CWeaponInfo (used in weapons.meta files), which enables to use up to 8 alternative camo diffuse textures. Texture names for this feature must be named as "w_camo_%d" ("%d" will be filled in a number between 1 and 8 inclusive, but the field of weapons.meta takes a number between 0 and 7). Probably materials must also be set up for weapon models.
Source Code
Can be found on GitHub. Licensed under the MIT License.
Πρωτοανέβηκε: 30 Απρίλιος 2023
Πιο πρόσφατη ενημέρωση: 3 Μάιος 2023
Last Downloaded: 14 hours ago
This file has been approved automatically. If you think this file should not be here for any reason please report it.
Very nice
doesnt work to me
Two suggestions:
-Make it so if player submerges in the water, the melee weapons clean itselves
-Add a cheat code to clean the melee weapon that's accessible through the cheat input thing (tilde key)
@HeySlickThatsMe Both suggestions sound good to me. Will add both. I thought it was good time to add console commands to SHVDN console, but I didn't even know SHVDN v3.6.0 doesn't provide ways to add custom console commands.
@edy smecheru More info needed to investigate your issue, such as your game version and how this script doesn't work to you (such as the immediate game crash or weapon blood gets cleaned by just switching your weapon as if this script is not running).
@kagikn weapon gets no stain after i pull it second time its just clear as brand new i also have scripts such as gsw2 brain blast car jack plus finite cops engine overheat fuel reloaded and gear shift animation
RIP, I have surpassed you in downloads, good mod btw!
i always got bummed out when rockstar editor didnt add the blood. will this add it in?
@azzman_01 Not planning. Have to let arbitrary scripts/plugins tick when Rockstar Editor is open first before you can even bother to mess the game with scripts/plugins. I can't even use RPH console when Rockstar Editor is open.
@edy smecheru Couldn't repro your issue with GSW2, Carjack Plus, Brain Blast, Finite Cops. It would be better if how to reproduce your issue would be provided, though.
I see that Cerberus guard hiding in there :P
@kagikn Is this compatible with modded weapon models? I'm using the Gerber Knife from Jridah's Weapon Pack Vol. III, and the SHVDN version, and there aren't any bloodstains on the knife when stabbing someone. Same with using the bat too, but that's unmodded.
After testing things more, a modded knife gives me no bloodstains, but an unmodded switchblade gives me bloodstains.
Hey is it this mod that doesn't get rid of the blood on the player? I go to the hospital but I still have blood on franklins face
Doesn't work anymore....
@Lj82 Works for me in v1.0.3351.0. Please report how to reproduce when you claim some mod doesn't work for you, especially when you do with a low rate. Rating low without how to reproduce an issue or a constructive feedback wouldn't be justified.
@kagikn i didn't rate your file
i will test again
@kagikn ok it works but i didn't use your easyhook so it could be that
my bad bro