Is it possible that it is harder to find surf stones in the game ?
Reduce sulfur spawn rates
- 1
- 2
Does anyone know?
prabobly no
ArtiIOMI
prabobly no
WTF :(
Merged post
No one has any answer ?
Server parameters spawn.min_rate, spawn.min_density, spawn.max_rate, spawn.max_density will affect the quantity of nodes, barrels, etc. but dont think there is something just for sulfur nodes.
Lorenzo
Server parameters spawn.min_rate, spawn.min_density, spawn.max_rate, spawn.max_density will affect the quantity of nodes, barrels, etc. but dont think there is something just for sulfur nodes.
Thanks for the reply but I just need for sulfur nodes. Too bad umod don't have a plugin for a thing like this.
You could delete some of them as they spawn.
The plugin "EntityReducer" can be used to limit all ore spawns, but not specific to sulfur .
Usualy, server use a gather control plugin to reduce or increase the amount of resource available.
It does not change the amount of nodes, but change the amount gathered for each nodes.
I just started a project to try and limit ore spawning (per ore). It can't increase spawns, just limit them (by canceling/removing ores as they spawn depending on your wanted spawn-percentage).
Merged post
First attempt (pls don't kill me).
Save this code as PrefabLimiter.cs and put it in oxide/plugins as oxide/plugins/PrefabLimiter.csYou will find the spawn-chances inside the file oxide/data/PrefabLimiter.json
To lower the chance of Sulfur spawn, set the value for any or all [ores/sulfur-ore, ores_sand/sulfur-ore, ores_snow/sulfur-ore] to anything lower than 100 inside the config - then reload the plugin with /prefabLimiterReload.
😄 100 means guaranteed spawn!
🤬 0 means they won't spawn.
🧐 1-99 is a chance in percentage.
The command prefabLimiterReload will reload your config so your changes takes effect.
If a prefab isn't in the config, then it will be treated with 100%.
using Oxide.Core;
using System.Collections.Generic;
namespace Oxide.Plugins
{
[Info("PrefabLimiter", "HoverCatz", "1.0.0")]
class PrefabLimiter : RustPlugin
{
Dictionary<string, int> spawnChances = new Dictionary<string, int>();
void OnServerInitialized()
{
/* Load config */
spawnChances = Interface.Oxide.DataFileSystem.ReadObject<Dictionary<string, int>>("PrefabLimiter") ?? spawnChances;
if (spawnChances == null)
spawnChances = new Dictionary<string, int>();
if (spawnChances.Count <= 0)
AddDefaultConfig();
Interface.Oxide.DataFileSystem.WriteObject("PrefabLimiter", spawnChances);
Puts($"PrefabLimiter successfully initialized. Loaded {spawnChances.Count} config values.");
}
private void AddDefaultConfig()
{
spawnChances.Add("assets/bundled/prefabs/autospawn/resource/ores/metal-ore.prefab", 100); // 100% chance to spawn
spawnChances.Add("assets/bundled/prefabs/autospawn/resource/ores/stone-ore.prefab", 100); // 100% chance to spawn
spawnChances.Add("assets/bundled/prefabs/autospawn/resource/ores/sulfur-ore.prefab", 100); // 100% chance to spawn
spawnChances.Add("assets/bundled/prefabs/autospawn/resource/ores_sand/metal-ore.prefab", 100); // 100% chance to spawn
spawnChances.Add("assets/bundled/prefabs/autospawn/resource/ores_sand/stone-ore.prefab", 100); // 100% chance to spawn
spawnChances.Add("assets/bundled/prefabs/autospawn/resource/ores_sand/sulfur-ore.prefab", 100); // 100% chance to spawn
spawnChances.Add("assets/bundled/prefabs/autospawn/resource/ores_snow/metal-ore.prefab", 100); // 100% chance to spawn
spawnChances.Add("assets/bundled/prefabs/autospawn/resource/ores_snow/stone-ore.prefab", 100); // 100% chance to spawn
spawnChances.Add("assets/bundled/prefabs/autospawn/resource/ores_snow/sulfur-ore.prefab", 100); // 100% chance to spawn
// Add more prefabs here if you want
// https://www.corrosionhour.com/rust-prefab-list/
}
void Unload()
{
Interface.Oxide.DataFileSystem.WriteObject("PrefabLimiter", spawnChances);
}
[ConsoleCommand("prefabLimiterReload")]
void ReloadConfig(ConsoleSystem.Arg _)
{
/* Reload config */
spawnChances = Interface.Oxide.DataFileSystem.ReadObject<Dictionary<string, int>>("PrefabLimiter") ?? spawnChances;
if (spawnChances == null)
spawnChances = new Dictionary<string, int>();
if (spawnChances.Count <= 0)
AddDefaultConfig();
Interface.Oxide.DataFileSystem.WriteObject("PrefabLimiter", spawnChances);
Puts($"PrefabLimiter successfully reloaded {spawnChances.Count} config values.");
}
void OnEntitySpawned(BaseNetworkable entity)
{
int intChance;
string name = entity.name;
if (!spawnChances.TryGetValue(name, out intChance))
return; // Doesn't exist in our list? 100% chance to spawn
if (intChance == 100)
return; // 100% chance, spawn.
else
if (intChance == 0)
{
entity.AdminKill(); // Destroy the Prefab! No chance check.
return;
}
float fChance = intChance / 100f;
float rnd = UnityEngine.Random.value;
if (rnd > fChance)
entity.AdminKill(); // Destroy the Prefab!
}
}
} I may be wrong , but if I recall correctly metal nodes left untouched for I believe 30mins turn into sulfur nodes automatically.
Many maps are built with the prefab Random Node, so it may be difficult to stop sulfur nodes respawning without custom map.
You can use these plugins .. just try a bit.
https://umod.org/plugins/entity-reducer
https://umod.org/plugins/gather-manager
2 strong plugins that could bring your request to fruition.
Where do you see solution for less spawn only sulfur ore?MeinRustYou can use these plugins .. just try a bit.
https://umod.org/plugins/entity-reducer
https://umod.org/plugins/gather-manager
2 strong plugins that could bring your request to fruition.
Really? You completely skipped my hard work? Check my reply lmao!ArtiIOMI
Where do you see solution for less spawn only sulfur ore?
HoverCatz
Really? You completely skipped my hard work? Check my reply lmao!
??? :D
I posted code ^ up there, you don't see it? Is it hidden?ArtiIOMI
??? :D
https://umod.org/community/rust/39153-reduce-sulfur-spawn-rates?page=1#post-9
- 1
- 2