Mods / C&N Effects

Tags:
Other Library
Author:
KenigVovan
Side:
Both
Created:
Jun 18th 2022 at 12:59 PM
Last modified:
4 days ago
Downloads:
19152
Latest release (for Vintage Story 1.22.3, potentially outdated):
effectshud_0.3.6.zip  1-click install

EFFECTS HUD

Status effects framework & customizable HUD for Vintage Story

EffectsHUD adds a framework for applying status effects (buffs and debuffs) to entities and a customizable HUD to track them. Open the HUD with L, the settings menu with Ctrl + L, and the debug effect picker with Shift + L.

New: live HUD settings panel
Press Ctrl + L in‑game — everything saves automatically

HUD Customization

Layout & Position

  • Drag‑to‑move - toggle move mode and place the HUD anywhere on screen
  • Horizontal or vertical - strip or column layout
  • Grow direction - choose whether new effects extend left/right or up/down

Visuals

  • Icon size - slider 16 to 128 px
  • Background & icon alpha 
  • Timer toggle - show or hide the remaining‑time text under each icon
  • Timer text size - 0.5× to 3× scale, with a black outline for readability over any background
  • Tier display - effects with tier > 1

Filtering & Order

  • Filter - show all / only positive / only negative effects
  • Sort - by insertion order, by remaining time ascending, or descending
  • Reverse order - flip the rendered list

Bundled Effects

Positive

  • regeneration  +0.08 HP per second per tier
  • walkspeed  +25% movespeed per tier
  • strengthmelee  +25% melee damage per tier
  • miningspeed  +25% mining speed per tier
  • thorns  reflect 0.09 damage per hit per tier
  • firedamageimmune  full fire damage immunity
  • safefall  negates fall damage
  • extendedmaxbreath  +tier seconds of max breath (tier 2 → +2, tier 3 → +3…)
  • invisibility  invisible to other players (held items still visible)
  • cantemporalcharge  slows temporal stability drops, speeds restoration
  • forgetting  instant; grants one extra .charsel use
  • weight buff  +1000 carry weight per tier (requires Weight mod)

Negative

  • walkslow  -25% movespeed per tier
  • miningslow -25% mining speed per tier
  • weakmelee  -25% melee damage per tier
  • bleeding  0.08 piercing damage per second per tier

Used By

Player Hotkeys

  • L - toggle the HUD
  • Ctrl + L - open HUD settings
  • Shift + L - debug GUI: pick effect, target player, tier and duration (creative only)

Debug Command

/ef <effectName> <durationMinutes> <tier> <nickname>
# requires creative mode

For Modders

Apply an effect from code

// 1. Construct the effect
MiningSlowEffect ef = new MiningSlowEffect();

// 2. Set duration (also: SetExpiryInTicks, ...)
ef.SetExpiryInRealMinutes(3);

// 3. Optionally set tier
ef.Tier = 2;

// 4. Apply to an entity
effectshud.src.effectshud.ApplyEffectOnEntity(entity, ef);
// or use AddEffect on the EBEffectsAffected behavior directly

Query effects on an entity

entity.EntityHasEffect(effectId);                  // bool
entity.TryGetEntityEffect(effectId, out Effect e); // bool, returns instance

Register a custom effect

In StartServerSide:

RegisterEntityEffect("myEffectTypeId", typeof(MyEffectClass));

In StartClientSide:

// (typeId, isPositive, drawInHUD)
RegisterClientEffectData("myEffectTypeId", true, true);   // positive, rendered in HUD with tier overlay
RegisterClientEffectData("myEffectTypeId", true, false);  // positive, not drawn (logic-only)

Config

TICK_EVERY_SECONDS — tick length in real seconds (currently fixed at 1; reserved for future use). All HUD‑related options are live‑edited via the in‑game settings menu (Ctrl + L) and persist across sessions.

Requirements

Credits

Mod Version Mod IdentifierFor Game version Downloads Released Changelog Download 1-click mod install*
0.3.6 effectshud 99 4 days ago effectshud_0.3.6.zip 1-click install
  • character tab with effects
0.3.5 effectshud 146 Jul 6th at 11:27 AM effectshud_0.3.5.zip 1-click install
  • invisible effect change
0.3.4 effectshud 86 Jul 1st at 5:29 PM effectshud_0.3.4.zip 1-click install
  • refactor
0.3.3 effectshud 1116 Jun 1st at 7:48 PM effectshud_0.3.3.zip 1-click install
  • class forgetting effect update
0.3.2 effectshud 504 May 10th at 8:30 PM effectshud_0.3.2.zip 1-click install
  • hud config added
0.3.1 effectshud 140 May 6th at 5:49 AM effectshud_0.3.1.zip 1-click install
  • bleeding effect
0.3.0 effectshud 143 Apr 6th at 1:47 PM Empty effectshud_0.3.0.zip 1-click install
0.2.17 effectshud 1127 Jan 11th at 2:50 PM effectshud_0.2.17.zip 1-click install
  • rebuild
0.2.16 effectshud 1962 Oct 16th 2025 at 5:10 PM Empty effectshud_0.2.16.zip 1-click install
0.2.15 effectshud 684 May 23rd 2025 at 5:46 PM effectshud_0.2.15.zip 1-click install
  • effect's icon and duration overlap fixed
0.2.14 effectshud 735 Feb 18th 2025 at 7:31 PM effectshud_0.2.14.zip 1-click install
  • remove effects on player's death from client ui
0.2.13 effectshud 687 Jan 4th 2025 at 3:43 PM effectshud_0.2.13.zip 1-click install
  • graphic memory leak fixed
  • hud logic updated
0.2.12 effectshud 204 Dec 29th 2024 at 6:43 PM effectshud_0.2.12.zip 1-click install
  • rebuild
0.2.11 effectshud 977 Jun 22nd 2024 at 3:39 PM effectshud_0.2.11.zip 1-click install
  • changed icons
0.2.10 effectshud 993 Jan 14th 2024 at 1:42 PM effectshud_0.2.10.zip 1-click install
  • 1.19
0.2.9 effectshud 1055 Oct 23rd 2023 at 2:57 PM Empty effectshud_0.2.9.zip 1-click install
0.2.8 effectshud 335 Oct 20th 2023 at 3:06 PM Empty effectshud_0.2.8.zip 1-click install
0.2.7 effectshud 290 Oct 18th 2023 at 4:46 PM effectshud_0.2.7.zip 1-click install
  • EntityHasEffect
  • TryGetEntityEffect
0.2.6 effectshud 271 Oct 17th 2023 at 8:10 PM effectshud_0.2.6.zip 1-click install
  • tier didn't update damage per tick for default bleeding effect if was set not through the constructor
0.2.5 effectshud
1.18.5 - 1.18.6-rc.1
990 Jun 19th 2023 at 4:30 PM effectshud_v0.2.5.zip 1-click install

- fix crash on gui opened on server

0.2.4 effectshud
1.18.5 - 1.18.6-rc.1
352 Jun 18th 2023 at 9:42 AM effectshud_v0.2.4.zip 1-click install
  • changed effects' icons
  • tier mark is now drawn above effect's icon
0.2.3 effectshud
1.18.2 - 1.18.3
606 May 14th 2023 at 3:04 PM Empty effectshud_v0.2.3.zip 1-click install
0.2.2 effectshud 377 May 10th 2023 at 3:42 PM effectshud_v0.2.2.zip 1-click install

 - extended max breath time effect added

0.2.1 effectshud 957 Apr 8th 2023 at 9:36 AM Empty effectshud_v0.2.1.zip 1-click install
0.2.0 effectshud 580 Mar 1st 2023 at 7:30 PM Empty effectshud_v0.2.0.zip 1-click install

26 Comments (oldest first | newest first) (threaded | flat)

gatorr16, Jan 28th at 11:20 PM

hey, I was wondering how you managed to make the player invisible. I'm trying to make creative players invisible like spectator but still remain access to using blocks and such.

 

Aldi, Oct 27th 2025 at 9:03 AM

hey I'm testing stuff with it and maybe I'm blind but I can't see any icons when I have a buff/debuff.

bintoss, Oct 16th 2025 at 12:37 PM (modified Oct 17th 2025 at 1:22 AM)

NightDragon Yes. Just don't try to open the HUD. It will crash the game. The mod needs to be recompiled for 1.21.
Edit: hot dang, that turnaround! v0.2.16 is available for VS 1.21.5. Excellent work, KenigVovan!

NightDragon, Oct 14th 2025 at 8:55 AM

it still works ?

KenigVovan , Jan 4th 2025 at 3:50 PM

Snowfious

fixed in last version

Snowfious, Dec 31st 2024 at 10:06 PM

Oh, apologies for not providing more detail. But this issue is actually from your Simple alchemy mod. Image with less details is with Alchemy on, but second one is with alchemy turned off but having this mod still turned on.

1st image

https://imgur.com/a/JKeHSqP

2nd image

https://imgur.com/a/7GqDUUJ

KenigVovan , Dec 30th 2024 at 12:18 PM

Snowfious

what exactly isn't working?

Snowfious, Dec 29th 2024 at 8:24 PM

It would seem this mod causes conflict issues with Extra Info; any way to give it more compatibility?

KenigVovan , Jan 15th 2024 at 4:35 PM

Edel_Recke Yanazake

you both missed comment section for another mod or?

BavarianViking, Jan 14th 2024 at 7:54 PM

Why is the Crosshairs changed? That's really annoying; especially because of the percentage display (which I can't assign anything to anyway and have ignored so far)!
Can i change this?

AzuliBluespots, Jan 14th 2024 at 3:19 PM

Wait, does nickname works in mp and can it be set individually? It shows up indefinitely?

Telemachus, Oct 23rd 2023 at 5:07 PM

Yup, that fixed it. Thanks!

KenigVovan

KenigVovan , Oct 23rd 2023 at 2:57 PM

Telemachus

try 0.2.9

Telemachus, Oct 23rd 2023 at 1:50 PM

Receiving this crash after updating from v0.2.5 to v0.2.8

 

KenigVovan , Oct 20th 2023 at 3:12 PM

I'll look at new effects later, 
bool removedAfterDeath is added to Effect,
with font color/outline I'll take a look as well

Frepo, Oct 20th 2023 at 12:12 PM

Some suggestions for the mod.

New default effects
GlowEffect - Makes the player emit a light, could be this eerie blue/green light that you have for a short while after you died. Higher tier = stronger light effect. VERY handy since it allows you to equip e.g. a shield while still having light i dark caves.
SpelunkerEffect - Makes the player see outlines of ore blocks/chest/translocators through walls. Might be hard to accomplish, but would be very cool. Higher tier = longer "sight radius".
BlindnessEffect - Renders a black filter over the entire screen. Higher tier = more opacity.
JumpEffect - Allows the player to jump higher. Higher tier = increased jump height. (for quality of life this effect should also secure you from taking fall damage from jumping, something similar to safefall. safefallDistance = jumpHeight)
WarmthEffect - Keeps you warm during cold winter nights. Higher tier = incresed bonus to body temperature (or some sort of protection in degrees like clothing has)

New property
DeathPermeable - [type: boolean] if true makes the effect stay after death.

About the hud graphics - Maybe try and change the font color for the timer. It's very hard to see in dark areas when the color is black. I have to look up at the sky to read how much time left. And when the sky is dark at night that wont help either.
Perhaps use green color for positive effects, and red color for negative. Or if possible, keep black color but with white outline, or try inverted (white font with black outline), see whatever works best. 

Frepo, Oct 17th 2023 at 8:23 PM

Excellent! Ty for quick fix

KenigVovan , Oct 17th 2023 at 8:12 PM

Frepo

fixed, tier change not in effect's constructor didn't update damagePerTick, so it had default value everytime here

Frepo, Oct 17th 2023 at 1:27 PM

Looks like setting a tier for the bleeding effect doesn't work correctly. The effect seems to always be tier 1 regardless if I try to set it to something else. Perhaps this is the same for other effects as well, that I don't know. I have only tested bleeding so far.
I've tested tier 1, 3 and 20, and you still take 0,05 damage/tick (at least according to the damage log, and what I can se by hovering over my health bar while bleeding).

The code
BleedingEffect effectBleed = new BleedingEffect();
effectBleed.SetExpiryInRealMinutes(1);
effectBleed.tier = 20;
effectshud.src.effectshud.ApplyEffectOnEntity(__instance, effectBleed);

// tier 20 should result in 1 hp damage/tick

Frepo, Oct 15th 2023 at 1:39 PM

Man, this mod sounds great! I've been longing for some "potion effects" for this game.
I've never used someone else's framework before. How do I get access to it in my source code? (visual studio 2022 community)
Do I have to unpack your mod? If so, must I place the unpacked stuff any place special? I figured I must reference your dll-file in my project. Is that enough or do I need to add your whole project to my solution?
Thanks in advance!

KenigVovan , Jul 3rd 2022 at 6:44 PM

No problems with addons

If you mean to add OnEntityRevive, OnFallToGround, OnInteract, OnEntityReceiveDamage and others from EntityBehavior - i have it in a plan. To make a base for effects like vampirism, protections against(fire, fall, arrows, melee atacks), damage reflection etc.

I'll place source files on git in few days, but it's a mess now

 

jakecool19, Jul 3rd 2022 at 3:50 PM

Would you be ok with mods that add on to this framework? For example adding more hooks to the base Buff class?

KenigVovan , Jul 1st 2022 at 7:48 AM

The main point (at least for now) was to prepare effects handling for potions items.

Mod uses EntityBehavior so it might be expand on other entities, but Effects implementations could require some changes.
(because default Effects here use "Stats" of the player and i'm not 100% sure it's the same with other Entities)

jakecool19, Jun 30th 2022 at 7:21 PM

Amazing work! I have been hoping we would get a proper status effect system for this game for quite awhile. What is the ultimate finished goal for this one? Will it just be for players, or will it work with all entities?

KenigVovan , Jun 19th 2022 at 8:33 AM

It is WIP.
Mod for HUD on which effects (picture of buff/debuff) can be drawn. 
it uses player's WatchedAttributes to track updates.

You can register effect to show by:
RegisterEffect(string watchedBranch, string effectWatchedName, bool showTime, string effectDurationWatchedName, string [] domainAndPath, Vintagestory.API.Common.Func needToShow)

example of use for "miningSpeedMul" in stats:
effectshud.src.effectshud.RegisterEffect("stats", "miningSpeedMul", false, "", new string[] { "canmods:effects/slowmining1", "canmods:effects/slowmining2", "canmods:effects/slowmining3" }, checkminigSpeedMul);

checkminigSpeedMul here is function which is called on branch update and return number of picture which shoud be drawn, if -1 is return that means that effect is not active

public int checkminigSpeedMul()
{
      var t2 = capi.World.Player.Entity.Stats["miningSpeedMul"];
      var t = t2.GetBlended();
      if (t < 0.35)
      {
          return 2;
      }
      else if (t < 0.5)
      {
          return 1;
      }
      else if (t < 0.85)
      {
          return 0;
      }
      return -1;
}

Display of the time is not functinal yet, so choose false for showTime, if you want to try it.

Pictures size used is 64x64.

For HUD to show press "L"

DemonBigj781, Jun 19th 2022 at 2:07 AM

whats this?