Tutorial / Tools > World
Create Buffs
Food, drink, poison and status effects from props, items, stores, zones and scripts.
What it does
Create Buffs manages the server's buff list. A buff is food, drink, poison, a status effect or a drug. It can give or take health and armor, heal or poison over time, change run speed and jump height, and make a player drunk, sick or high.
Players get buffs in several ways. Alt + E on a prop with a buff's model eats it. Food items (stores, shipments, this tool's reload) are eaten with left click or fed to others with right click. Buff zones (World > Zones, type Buff) give the buff every few seconds.
The list starts with 16 vanilla buffs: Burger, Hot dog, Watermelon, Takeout, Soda, Milk, Water, Beer, Coffee, Bleach, Strange jar, Painkillers, Meth, Cocaine, Cannabis and PCP. The list is saved in data/kgx_admin_toolbox/buffs.json and applies on every map.
Where to find it
Q menu > KGX's Admin Toolbox > World > Create Buffs.
Admins can use the tool, and players who are given it in Settings > Player Access. Only superadmins can add, change, remove or reset buffs in the panel. Server settings are in Settings > Furniture & Buffs.
Given to a player (v3.6.11.3): Food for others (not for themselves).
Controls
| Key | What it does |
|---|---|
| Left click | Spawn the selected buff as a prop (Alt + E eats it) |
| Right click | Use the aimed prop's model in the editor |
| Reload | Give yourself 5 of the selected buff as a food item |
While you hold the tool, aiming at a prop shows the buff it stands for and what it does, or "Not a buff prop".
The panel
The top list shows every buff with the columns Buff (name and id), Kind and Does. Click a row to select that buff for the tool and load it into the editor.
Selected / new buff
| Option | What it does | Range |
|---|---|---|
| Id (letters, numbers, _; used by stores and zones) | Unique id. Stores, shipments, zones and commands use it. | Up to 24 characters |
| Name | Name players see. | Up to 32 characters |
| Kind | Food, Drink, Poison, Status effect or Drug (RP). Sets the sound. | Default Food |
| Prop model (empty = only as an item / zone) | Model that counts as this buff in the world. A preview is shown below it. | Must be a models/...mdl path |
| High: screen effect (drugs) | No screen effect, Meth, Cocaine, Cannabis, PCP or Trip. | Default none |
| Health (instant; negative hurts) | Added at once. | -500 to 500 |
| Armor (instant) | Added at once. | -500 to 500 |
| Healing per second / Healing for seconds | Heal over time. | 0-100 / 0-600 |
| Poison damage per second / Poison for seconds | Damage over time. | 0-100 / 0-600 |
| Run speed % (100 = normal, 0 = unchanged) / Speed for seconds | Walk and run speed. | 0-300 / 0-600 |
| Jump height % (100 = normal, 0 = unchanged) / Jump for seconds | Jump power. | 0-300 / 0-600 |
| Drunk for seconds (blurry, swaying) | Drunk view. | 0-600 |
| Sick for seconds (throwing up) | Sickness. | 0-600 |
| High for seconds (screen effect below) | How long the screen effect lasts. | 0-900 |
| Takes % less damage / Resistance for seconds | Damage resistance. | 0-90 / 0-600 |
All number sliders start at 0, which means "nothing". Below them are four buttons (superadmins only):
- Add as a new buff: adds the editor contents as a new buff. The id must not be taken.
- Update the selected buff: overwrites the selected row.
- Remove the selected buff: deletes the selected row.
- Reset to the vanilla buffs: replaces the whole list with the defaults after a confirmation.
Every button saves at once and sends the list to all players.
Find food props
Scan for food props lists models that look like food or drink. It looks in vanilla game folders, the map's props and installed addons. The columns are Model, From and Buff? (yes when a buff already uses it). Double-click a row to put its model in the editor.
How to use it
Make a new food from a prop on the map
- Aim at the prop and right-click. Its model goes into Prop model.
- Type an Id and a Name, and pick a Kind.
- Set the effects with the sliders, for example Health (instant; negative hurts) at 25.
- Click Add as a new buff.
- Players can now press Alt + E on any prop with that model to eat it.
Spawn and test a buff
- Select a buff in the list, for example Burger.
- Left-click on the ground. The prop spawns and can be undone.
- Hold Alt and press E while aiming at it. You get the effect and the prop breaks into gibs.
- Press reload to get 5 as a food item. Left click eats one; right click feeds the player you aim at.
Give buffs from a zone or a store
- For a zone, use World > Zones, type Buff, and enter the buff id. Players inside get it every N seconds.
- For a store or shipment, add an item of type "Food / drink" with the buff id as its class.
Settings and commands
| Setting / command | What it does | Default |
|---|---|---|
kgxat_buffs |
Buffs work. | 1 |
kgxat_buffs_world |
Alt + E on a prop with a buff's model eats or drinks it. | 1 |
kgxat_buffs_map |
Map props with a buff's model can be eaten too (they come back with a cleanup). | 1 |
kgxat_buffs_gibs |
An eaten prop breaks into gibs (0 = it just disappears). | 1 |
kgxat_buffs_force |
Food items can be fed to other players (right click). | 1 |
kgxat_buffs_stack |
Most food items of one kind in one stack (1-100). | 10 |
kgxat_drugs |
Drugs (kind Drug) work. | 1 |
kgxat_drugs_police |
Police see a drug icon over high players nearby. | 1 |
kgxat_buff <player> <buff id> |
Admins: give a player a buff. Respects rank immunity. | |
kgxat_givefood <buff id> [count] |
Admins: give yourself 1-50 of a food, drink or drug item. |
Tips and limits
- The list holds at most 100 buffs. Saving an empty list restores the vanilla buffs.
- A buff without a model works only as an item, in zones and by command. Left click needs a model the server has.
- Permanent props, trash and hard-frozen props cannot be eaten.
- Speed and jump changes end when their time runs out or the player dies. Respawning clears drunk and high.
- Food goes into your hand first. If you hold other food or the hotbar is full, it goes into the backpack.
- Positive health does not go above the player's max health.
- For Lua:
KGXAT.ApplyBuff(ply, id)and the hookKGXAT_BuffApplied(ply, buff, by).