I added the following to my plugin file. Maybe the Developer can add it in his plugin by default.
In "#region functions MonumentRadiation" block:
startsRadTimers():Code:# new function private int getTimerRandom(int iOnOff) { if (iOnOff == 0) { return UnityEngine.Random.Range(5, 20); } else { return UnityEngine.Random.Range(25, 55); } }
Changes in LoadConfigVariables():Code:private void startRadTimers() { OnTimer = timerOn * 60; timer.Repeat(1, OnTimer, () => { OnTimer--; if (OnTimer == 0) { ConVar.Server.radiation = false; if (broadcastTimer) { // ############################# code added here ## if (timersRandom) { timerOff = getTimerRandom(0); } // ########################################### MessageAllPlayers(lang.GetMessage("RadsOffMsg", this), timerOff); } OffTimer = timerOff * 60; timer.Repeat(1, OffTimer, () => { OffTimer--; if (OffTimer == 0) { ConVar.Server.radiation = true; if (broadcastTimer) { // ############################# code added here ## if (timersRandom) { timerOn = getTimerRandom(1); } // ########################################### MessageAllPlayers(lang.GetMessage("RadsOnMsg", this), timerOn); } startRadTimers(); } }); } }); }
json-file:Code:CheckCfg("Options - Timers - Amount of time Random", ref timersRandom); if (timersRandom) { Puts("====== Using random timers"); timerOff = getTimerRandom(0); timerOn = getTimerRandom(1); } else { Puts("====== Using static timers"); CheckCfg("Options - Timers - Amount of time deactivated (mins)", ref timerOff); CheckCfg("Options - Timers - Amount of time activated (mins)", ref timerOn); }
Code:"Options - Timers - Amount of time Random": true,
Monument Radiation
Create radiation zones at designated monuments
Total Downloads: 5,467 - First Release: Dec 25, 2015 - Last Update: Dec 30, 2017
- 5/5, 22 likes
-
@k1lly0u: I love your plugin, but have a question: Players on my server keep telling me that there is radiation at atleast two random locations like in the middle of nowhere, but at the same time the radiation for all monument-locations seem to work properly. Do you have an idea how i can fix this? Cause it destroys immersion somehow :-( I am using Zonesmanager 2.3.2.
-
[MonumentRadiation] Created 0 monument radiation zones
Why??
Map Hapisisland -
-
I've fixed some your issues with adding zones every restart if plugin was not unloaded properly.
the way it is:
Code:void OnServerInitialized() { if (!plugins.Exists("ZoneManager")) { Puts(lang.GetMessage("noZoneM", this)); return; } if (!Interface.Oxide.DataFileSystem.ExistsDatafile("MR_data")) //check { Puts("Creating new MR_data"); findAllMonuments(); // for creating zones and calling ZoneManager } if (ConVar.Server.radiation == false) { RadsOn = false; ConVar.Server.radiation = true; } if (useRadTimer) startRadTimers(); }
Code:private void findAllMonuments() { Puts("Reading MR_data"); ZoneData = Interface.Oxide.DataFileSystem.GetFile("MR_data"); ZoneData.Settings.Converters = new JsonConverter[] { new StringEnumConverter(), new UnityVector3Converter(), }; LoadData(); LoadVariables(); var allobjects = UnityEngine.Object.FindObjectsOfType<GameObject>(); foreach (var gobject in allobjects) { var pos = gobject.transform.position; if (radsLighthouse)..................................................................
Ive got 100% some logical mistakes here but it works pretty good.
If u want to disable plugin - just unload it and all radzones instantly remove from MR_data and ZoneManager (as it was previously by GrandPluginMaster k1lly0u)
But to enable it back, you should delete empty file MR_zone, otherwise plugin wouldnt add zones (cuz of added Check)
K1llyou, it would be kind of you, if you would take this little idea and realize it properly in your plugin.Attached Files:
-
-
I just had a look at the plugin and it turns out I have fixed the issue with multiple zones, I must have forgotten to post it. It was a while ago because I don't remember doing it
@Vaalberith, the reason I have the zones wipe on unload and startup and not just check for existing is because if there is existing data and the user has changed the map seed the monuments will be in different locations
@b1343779 I have added option for random timers to the update I am about to post.
Thanks for the input guys -
k1lly0u updated Monument Radiation with a new update entry:
0.1.7
-
The plugin dosn't find the Monuments on Hapisisland. Is there a way to add the zones manually ? I made a zone named satellite_1 and gave it the same amount of rad as in the config, after that i reloaded the monument plugin but it didn't work. Any idea ?
Add:
Can someone tell me whats inside the MR_data.json(oxide/data) after creating the zones or can even upload me one. I guess i can add the zones manually with that. -
-
The monuments on HapisIsland are not the same monuments as a procedural map, it looks like they have placed individual parts from each monument to build new areas so there is no way to detect them. I have gone around and recorded the position of them all and will post a update
-
k1lly0u updated Monument Radiation with a new update entry:
0.1.8
-
-
Deleted text cos I did not check version of plugin
Seems I was using older version and have now updated plugin , will see how it goes , but hopefully will be ok,Last edited by a moderator: Mar 28, 2016 -
Make sure to delete your old zone manager data and also edit the zone options in the monument radiation config. They get updated so changing them through zonemanager won't work
-
Thanks, seems to be working 100% now and along with the wolves added through another plugin stops players sitting in radtowns waiting for loot respawns
-
i enter mr_list and get reply as monument radiation none
any help would be appreciated ? -
Evening, my monument radiation isnt working on my server?
I've tried redownloading it and uploading it again. It doesn't seem to work.
I have editing the files in anyway, and am currently on procedural map.
Any ideas would be much appreciated. -
-
I used to work before and hadn't been edited. Thank you once again.