Jump to content

Recommended Posts

  • Leadership Team

About BotReSpawn 

Quote

Spawns set numbers of customised npcs at monuments,
various events, supply drops, biomes, custom locations, and 'toplayer'.

Plugin Description.
Highly customisable and intuitive npc plugin, setup almost exclusively in UI.
See images for an overview of the available options globally, and per npc profile.
Every option in the UI is clickable, showing a detailed description of its use.

Optional dependencies -

Kits (free at uMod.org)

CustomLoot

Permissions.

botrespawn.allowed - Required for non-admin use

Chat commands.

/botrespawn - Opens UI.

/botrespawn add *profilename* - Adds a custom profile then opens UI. (please don't use spaces or hyphens)

/botrespawn remove *profilename* - Removes a custom profile.

/botrespawn info - Tells you about the npc you're looking at.

Console commands.

bot.count - Gives total number of spawned npcs.

bots.count - Gives a breakdown of spawned npcs per profile.

addspawn - Enabled via UI, in Edit Spawnpoints menu - for keybinding.

botrespawn toplayer NameOrId ProfileName amount(optional)

botrespawn enable/disable "Profile name here"

botrespawn tempspawn "Profile name here" - Spawns npcs from a profile at random points around that profile's location

botrespawn showspawns - Added for binding convenience.

botrespawn checknav - Added for binding convenience.


Default locations.
All major monuments are automatically included, plus profiles for the four biomes.
The following events also have default profiles

Airdrop (supply grenade optional)

Locked Crate Spawn

Locked Crate Hack Start

APC Kill

PatrolHeli Kill

CH47 Kill


Configurable via json, per profile.

BotNames

BotNamePrefix

Announcement_Text

Instant_Death_From_Headshot_Allowed_Weapons (accepts item shortnames)

See note at end for weapon list formatting.
Everything else is configurable via UI - All options have a description in UI, accessible by clicking the name/label.

Kits.
Kits are managed, per profile, in UI.
As with BotSpawn, kit probability can be balanced by assigning a number to a kit.
When selecting multiple kits, increasing a kit's number increases its chances of being picked.
Only kits with weapons in the belt are shown in UI.
Please stick to normal bullet weapons and melee weapons for now, with your npcs.
There are plans to support the more unusual weapons in future.

Spawnpoints.
Adding and managing spawnpoints is done, per profile, in UI,
or by enabling 'add by command' in spawnpoints menu, then using 'addspawn' console command.
You can bind this command for your convenience.
When opting to use the 'addspawn' command, a button will show in UI main page, allowing you to quickly return to the profile you were editing.
A new feature is that each spawn point can have overrides, forcing that specific npc to have different values to the rest of the profile's npcs.
At present you can override

Stationary

Kits

Health

RoamRange


If you choose to use Parent_Monument, you can select it via UI, but do so before you add custom spawn points (if applicable).
Parent_Monument ensures that your profile and its spawn points will relocate after a map change,
so that they are in the same place, relative to that chosen monument.

If a profile uses custom spawn points, but does not have enough custom spawn points to cover the whole population,
it will spawn randomly placed npcs to make up the numbers, in accordance with the profile "Radius" setting.
EG :
Day_Time_Spawn_Amount 10
Number of custom spawn points 5
Result : 5 npcs on custom spawn points, and 5 randomly placed around the area, within the specified radius.

Murderer
Murderer true/false is no longer an option.
Instead, the AI will respond differently based on the weapons you give it.
If you want the AI to run directly at victims and attack, give it melee weapons only.
I believe you can still make murderer-style kits, although you also have Frankenstein clothing options built into the the UI options now.

Peacekeeper
Peacekeeper is now based on whether or not players are marked hostile.

An additional option 'Peacekeeper_Uses_Damage' restores the old behaviour,
where peacekeeper npcs will completely ignore players until attacked by them.

Configuration.

"DataPrefix": "default", (tells BotReSpawn which data files to load),

"UseServerTime": Uses server IsNight check, instead of manual day/hour settings,

"Show_Profiles_Seconds": 10,

"DayStartHour": 8,

"NightStartHour": 20,

"SuicideBoom": true, (toggles explosion sound for suicide npcs),

"APC_Safe": true,

"Turret_Safe": true,

"Animal_Safe": true,

"Supply_Enabled": false, (spawn 'airdrop' bots for user-called supplys),

"Ignore_Skinned_Supply_Grenades": true,

"Remove_BackPacks_Percent": 100 is always : 0 is never,

"Remove_KeyCard": true, (any keycards in bot default loot will be destroyed),

"Remove_Frankenstein_Parts": true, (any frankenstein parts in bot default loot will be destroyed),

"Ignore_Sleepers": true/false,

"Pve_Safe": true, (bots will not be injured by fire/barbs, etc.),

"Max_Chute_Fall_Speed": 100,

"Staggered_Despawn": false,

"Disable_Non_Parented_Custom_Profiles_After_Wipe": false

"Announce_Toplayer": false

"RustRewards_Whole_Numbers": true

"XPerience_Whole_Numbers: true

"NPCs_Damage_Armour": true

"Limit_ShortRange_Weapon_Use": false

"Allow_Ai_Dormant": false

"Prevent_Biome_Ai_Dormant": false

"Scale_Meds_To_Health": false (increases npc heal amount relative to npc's max health.

"Ignore_Factions": false - Makes all profiles fight all profiles if true.

"Reduce_Damage_Over_Distance: false

"Deaggro_Memory_Duration: 20 - Number of seconds it takes an npc to forget you outside deaggro range/line of sight.

"Ignore_HackableCrates_With_OwnerID" - Makes hackable crate profiles only respond to crates with OwnerID 0 (server spawned)

"NPCs_Assist_NPCs" - true/false. When a botrespawn npc is attacked, nearby botrespawn npcs will also respond and defend.

"Enable_Targeting_Hook": false

"Allow_AlphaLoot": true Can be used to prevent AlphaLoot from giving loot to BotReSpawn npcs.

"Parachute_From_Height": 200

"Smooth_Damage_Scale": false

"Allow_Oilrigs": false - NPCs here must be custom spawn point and stationary true.

These values are adjustable and described in detail in in-game UI, with the exception of DataPrefix.

Profile values.
Each profile value and description is not listed here, but all (apart from text strings) are now configurable via UI,
and have sensible default values.
Every option has a full in-game description, accessible by clicking an option's name/label.
If any specific setting/value is unclear, please just ask in CF discord, my discord, or the support section here.

Notes :
Durations which used to be in seconds are now in minutes.
"Type" is an internal use variable - Users should not change this option.
Profile copy/paste does not include location, Parent_Monument, or custom spawnpoints.

BotNames, and Headshot weapons should be formatted as follows:
["name1"], for single or ["name1", "name2", "name3"], for many.
["rifle.lr300"], for single or [ "rifle.lr300", "pistol.m92" ], for many.

Faction and Subfaction of 0 means this profile will not fight any other, and will not be attacked by any other.
Faction and Subfaction settings greater than 1 are used for configuring which profiles should be allies / enemies.

API :
string[] AddGroupSpawn(Vector3 location, string profileName, string group, int quantity)
string[] RemoveGroupSpawn(string group)
string NPCProfile(NPCPlayer npc) (returns "No Name" for non BotReSpawn npcs)

object OnBotReSpawnNPCTarget(ScientistNPC npc, BasePlayer player)

void OnBotReSpawnNPCSpawned(ScientistNPC npc, string profilename, string group)
void OnBotReSpawnNPCKilled(ScientistNPC npc, string profilename, string group, HitInfo info)

bool IsBotReSpawn(NPCPlayer npc)
bool IsBotReSpawn(ulong id)

For preventing BotReSpawn npc spawns for event profiles.
object OnBotReSpawnCrateDropped(HackableLockedCrate crate)
object OnBotReSpawnCrateHackBegin(HackableLockedCrate crate)
object OnBotReSpawnAPCKill(BradleyAPC apc)
object OnBotReSpawnPatrolHeliKill(PatrolHelicopterAI heli)
object OnBotReSpawnCH47Kill(CH47HelicopterAIController ch)
object OnBotReSpawnAirdrop(SupplyDrop drop)

Example usage.
[PluginReference]
private Plugin BotReSpawn;

Vector3 location = new Vector3(0,0,0);
string[] Spawn = BotReSpawn?.Call("AddGroupSpawn", location, "The Dome 0", "MadeUpNameHere", 5) as string[];

Puts($"{Spawn[0]}");
Puts($"{Spawn[1]}");
Passing 0 for quantity will spawn the appropriate amount of npcs for the time of day, according to the profile.


Method call OnBotReSpawnNPCSpawned(ScientistNPC npc, string profile, string group, notifies of spawned npcs.
Example.
void OnBotReSpawnNPCSpawned(ScientistNPC npc, string profile, string group)
{
if (String.IsNullOrEmpty(group))
Puts($"BotReSpawn spawned an npc from profile {profile}");
else
Puts($"BotReSpawn spawned an npc from profile {profile} - API group name {group}");
}

Download LINK:

This is the hidden content, please

Link to comment
https://easy-code.ro/topic/1021-rust-bot-respawn/
Share on other sites

  • Guest changed the title to RUST - Bot Respawn

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.

Board Life Status


Board startup date: October 22, 2021 17:08:30


×
×
  • Create New...