The PainKiller script designed to enhance NPC behavior by allowing them to use painkillers when their health drops below a certain threshold. This mod simulates a realistic response to injury by giving NPCs a chance to recover health through painkillers, adding a dynamic element to the game.
Key Features:
Painkiller Activation for NPCs:
Configurable Settings: NPCs can use painkillers based on customizable settings including regeneration amount, cooldown time, and invincibility duration.
Health Threshold: Painkillers are activated when NPC health drops below a configurable percentage or if the NPC is injured.
Specific NPC Settings: Customize painkiller effects for specific NPCs based on their model.
Cooldown Management: Ensures NPCs cannot use painkillers continuously by managing cooldown times.
Player Painkiller Mechanics:
Automatic or Manual Use: Players can automatically use painkillers or activate them manually using a configurable key.
Regeneration and Invincibility: Painkillers restore a percentage of health and provide temporary invincibility.
Cooldown and Duration: Configurable cooldown and invincibility duration for painkillers.
Animation and Effects:
Painkiller Animation: NPCs and players will play a specific animation when using painkillers.
Health Restoration: Painkillers restore health based on a percentage of the maximum health.
Invincibility: Provides temporary invincibility, making the player or NPC immune to damage for a short period.
Configuration Options:
INI File Configuration: All settings, including regeneration amounts, cooldowns, and activation thresholds, are customizable through an INI file.
Player and NPC Settings: Separate configurations for player and NPC painkiller effects to tailor the experience as desired.
Performance Considerations:
Efficient Handling: The script manages NPC and player painkiller effects efficiently to minimize performance impact.
Animation Loading: Handles animation loading to ensure smooth playback during painkiller use.
INI Options:
PainKillerEnabled: Toggle the entire painkiller functionality on or off.
PainKillerForEveryone: Apply the painkiller logic to all NPCs or only to specific NPCs defined in the settings.
PainKillerRegenAmount: Specifies the percentage of health restored by the painkiller.
CooldownSeconds: The cooldown period in seconds before an NPC can use painkillers again.
GodModeDurationSeconds: Duration for which the NPC is invincible after using a painkiller.
PainKillerActivationThreshold: Health percentage threshold below which painkillers can be activated.
NPC-specific Settings: Customizable settings for different NPC models.
Player Settings: Customizable settings for Player Character.
Installation:
-Place the all files into your scripts folder.
-Edit the PainKiller.ini file to configure NPCs.
-Launch the game and enjoy!
Requirements:
–Script Hook V
–Script Hook V .NET
Credits:
GogetaSsj4