Pacifist

Rust PVE PVP Plugin for Oxide & Carbon

PVE and PVP players on one server. Everyone is passive until they attack someone; a coloured bubble round every player shows who is passive, willing to fight or hostile.

new Carbon Oxide v0.6.0 Updated

Overview

Pacifist lets players who want PVE and players who want PVP share one server, without a single rule for anyone to read or a single argument in chat.

Every player starts passive: no other player can hurt them. Build, farm, explore and run monuments in peace. A player who attacks someone turns hostile and can be hurt by anyone for the next 5 minutes. Stop fighting, and you are passive again.

Players who are up for a fight can say so by setting themselves willing to fight. Everyone can see who is who at a glance: a coloured bubble round every player shows it, green for passive, purple for willing to fight and red for hostile.

There is no permission to grant and nothing to set up. Drop the file in and the rules hold for every player on the server.

Highly configurable depending on your needs. Eg its hard for hostile players to hide with a big red halo around them - so you may choose to turn that off and just show passive players as green and everyone else without a halo. The option is yours.

Why run it
  • One server, two kinds of player. Builders and farmers get a PVE game. Fighters get a PVP game, against everyone else who wants one. Neither has to go and find another server.
  • No griefing the peaceful. A passive player cannot be shot, rammed out of their vehicle, raided or looted while they sleep.
  • No hiding behind the rules. You cannot shoot first from behind your own protection. Your first hit does nothing at all except turn you red, and from then on anyone can hit back.
  • No logging out of a fight. The hostile cooldown keeps running while you are offline and through a restart, and dying does not reset it.
  • Everyone knows where they stand. The bubble shows every player's state, and a badge beside your compass shows your own and counts the cooldown down.
Passive, willing to fight, hostile
  • Passive (green). No player can hurt you, your vehicle, your horse or your base, or loot your sleeping body, corpse or backpack.
  • Willing to fight (purple). A signal to everyone else that you are up for it. You are still protected exactly like a passive player until you attack someone. Two players who are both willing to fight can raid each other's bases.
  • Hostile (red). You attacked a player. Anyone can hurt you, and your corpse and backpack can be looted, until the cooldown runs out since your last attack. Then you go back to passive or willing, whichever you had chosen.

Choose passive or willing to fight with /pacifist, or bind pacifist.mode toggle to a key to swap between them. Going from passive to willing is immediate. Going back to passive is immediate too, unless you have fought while willing: then there is a short wait (5 minutes, after any hostile cooldown), so it cannot be used to slip out of a fight. Chosen while you are hostile, either takes effect when the cooldown ends. Nothing ever cuts a hostile cooldown short.

The rules

Each of these is a setting, and all of them are on by default.

  • The first hit does no damage. A passive or willing player's first hit, every pellet of it, only turns them hostile. Nobody can open a fight from behind their own protection.
  • Passive bases cannot be raided. Only players who are both willing to fight can damage each other's bases. It goes by the mode the owner chose, so a passive player who is red from a fight still has a safe base, and damaging a base never turns anyone hostile.
  • Vehicles and horses are protected while a passive or willing player is aboard. A vehicle ramming a player is treated as an accident: it is stopped, and it turns nobody hostile.
  • Loot is protected. A passive or willing player's sleeping body, corpse and dropped backpack can be looted only by them and their team.

And these always hold:

  • Turrets, traps and landmines work as the game has them, on everyone, and never change their owner's state. They are not covered by base protection either: whatever can shoot you, you can destroy, so nobody can farm passive players with an unbreakable turret.
  • Team mates never count as attacking each other.
  • Animals, NPCs, falls, cold, hunger and radiation hurt everyone as usual (see below for the option that changes this).
Animals and NPCs (optional, off by default)

Two more settings take the same idea to the AI:

  • NPC truce. Animals and NPCs (scientists, sharks, the Bradley, and the patrol helicopter's guns) cannot hurt a player until that player attacks one. Then all of them can, until the hostile cooldown has run out since their last attack. A message says when the truce is off and when it is back. The patrol helicopter's rockets and fire carry no attacker in the game, so they are not held back.
  • Attacking an NPC turns a player hostile, as attacking a player does. Farm animals never count.
The bubble and the badge
  • A coloured bubble round every player: green, purple or red. It is the game's own sphere, so there is nothing for players to download. Sleepers have one too.
  • A badge beside the compass shows your own state and counts your cooldown down.
  • Hide your own bubble with /pacifist bubble, or the button in the panel, if you find it gets in the way. Everyone else still sees it, and it shows to you for a second whenever your state changes, so you know.
  • Server settings switch the bubble off for passive, willing or hostile players separately, or altogether, and set its size and height.
For admins
  • SETTINGS in /pacifist for pacifist.admin: every setting changed in game, applied on SAVE with no reload.
  • Console tools: pacifist.status lists who is willing or hostile and for how long; pacifist.calm clears a player's cooldown; pacifist.hostile makes a player hostile for as long as you say.
  • Light on the server. One damage hook and a once-a-second check of online players. The badge is sent only when it changes. Bubbles are not saved with the map.
  • Wipe-friendly. A new map clears every hostile cooldown and keeps each player's choice of passive or willing.
Settings
  • Seconds a player stays hostile after attacking a player: 300 (10 to 86,400)
  • Seconds before switching from willing back to passive takes effect: 300 (0 to 86,400)
  • First hit does no damage and only turns the attacker hostile: on
  • Passive bases cannot be damaged; only willing players raid each other: on
  • Vehicles and horses with a passive player aboard cannot be damaged: on
  • Sleeping bodies, corpses and backpacks looted only by owner and team: on
  • Animals and NPCs cannot hurt a player until that player attacks one: off
  • Attacking an animal or NPC turns a player hostile: off
  • Show a coloured bubble round every player: on
  • Bubble round passive / willing / hostile players: on / on / on
  • Bubble width in metres: 2.5 (0.2 to 10)
  • Bubble height above the player's feet, in metres: 0.9 (0 to 4)
  • Bubble round sleeping players: on
  • Badge with your own state beside the compass: on
Languages

English, Russian, German, French, Spanish, Brazilian Portuguese and Simplified Chinese are built in, with no lang files to install. Each player sees the language their own client is set to.

Every download is licensed to you and watermarked with your details.

Features

  • PVE and PVP players on one server
  • Every player passive until they attack another player
  • Attackers turn hostile and can be hurt by anyone for 5 minutes
  • Players can set themselves willing to fight, and swap with one key
  • A green, purple or red bubble round every player shows who is who
  • A badge beside the compass counts your own cooldown down
  • The first hit does no damage, so nobody shoots from behind their protection
  • Passive bases cannot be raided; willing players can raid each other
  • Vehicles and horses protected while a passive player is aboard
  • Sleeping bodies, corpses and backpacks protected from looting
  • Cooldowns keep running offline and through restarts; dying does not reset them
  • Turrets and traps work as vanilla, and can always be destroyed
  • Optional truce with animals and NPCs until a player attacks one
  • Every setting changed in game, with no reload
  • No permissions to set up: the rules hold for everyone
  • Seven languages built in

Install

  1. Download Pacifist.cs from My Plugins.
  2. Drop it into oxide/plugins or carbon/plugins.
  3. That's it. The rules apply to every player straight away; there is no permission to grant for players.

To let your admins change the settings in game, grant:

o.grant group admin pacifist.admin

On Carbon use c.grant instead of o.grant.

The file name must stay Pacifist.cs, because Oxide matches it to the class name.

The config is written to oxide/config/Pacifist.json (or carbon/configs/Pacifist.json) on first load. Change it in game with SETTINGS in /pacifist, or edit the file and reload the plugin (o.reload Pacifist or c.reload Pacifist).

Config

{
  "Seconds a player stays hostile after attacking another player": 300,
  "Seconds before a switch from willing to fight back to passive takes effect (counted from the end of any hostile cooldown)": 300,
  "A passive player's first hit does no damage and only turns them hostile": true,
  "A passive player's base cannot be damaged by other players; only players willing to fight can raid each other": true,
  "A vehicle or horse carrying a passive player cannot be damaged by other players": true,
  "A passive player's sleeping body, corpse and backpack can be looted only by them and their team": true,
  "Animals and NPCs cannot hurt a player until that player attacks one (then all can, for the hostile cooldown)": false,
  "Attacking an animal or NPC turns a player hostile, as attacking a player does": false,
  "Show a coloured bubble round every player": true,
  "Bubble: show it round passive players": true,
  "Bubble: show it round players willing to fight": true,
  "Bubble: show it round hostile players": true,
  "Bubble: its width in metres": 2.5,
  "Bubble: the height of its middle above the player's feet, in metres": 0.9,
  "Show the bubble round sleeping players too": true,
  "Show each player a badge with their own state beside the compass": true
}

Commands & Permissions

Commands

Chat

  • /pacifist — open the panel: your state, PASSIVE / WILLING TO FIGHT, and your bubble
  • /pacifist passive — set yourself passive
  • /pacifist willing — set yourself willing to fight
  • /pacifist toggle — swap between passive and willing to fight
  • /pacifist bubble — hide or show your own bubble (others still see it)
  • /pacifist setup — open SETTINGS (pacifist.admin)

Console (bindable)

  • pacifist.mode passive|willing|toggle — for example bind f6 pacifist.mode toggle
  • pacifist.bubble — hide or show your own bubble
  • pacifist.open, pacifist.setup — open the panel or SETTINGS

Admin console (server console, RCON or pacifist.admin)

  • pacifist.status — who is willing or hostile, and for how long
  • pacifist.calm <player> — end a player's hostile cooldown
  • pacifist.hostile <player> [seconds] — make a player hostile

Permissions

  • pacifist.admin — SETTINGS in the panel, and the admin console commands

There is no pacifist.use: the rules hold for every player on the server.

Changelog

VersionReleasedChanges
v0.6.0 latest —