Jump to content

[Developers] BuffStuff — A library for custom, temporary buffs


Recommended Posts

A library for creating custom, temporary buffs.

I've created a ModDB entry for this library at: https://mods.vintagestory.at/show/mod/633 However, there are no files to download there, because this library is meant to be included in the source code of your own mods.

This source code library can be included in your mod's source code to support your own buffs.

Buffs can specify their own expiry time, either in game time or real time.

Buff expiry is automatically "paused" for players who leave the server, and also when the server is shutdown.

Buffs get an OnTick method call every 250 ms while active, and there are several other event-based methods which get called, such as OnStart, OnExpire, OnStack, and more.

cd src
git submodule add https://github.com/chriswa/vsmodlib-BuffStuff.git
Or just download it as a zip and unzip it into your src/ directory.

If you need to create buffs in multiple mods, simply include a copy of the library in each mod. (It's very small!)

However, note that you will not be able to access buffs from other mods: each mod has its own BuffManager.


Code blocks don't render well here, so please view the remainder of the README on GitHub.

  • Like 2
  • Mind=blown 2
Link to comment
Share on other sites

  • 1 month later...
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.