Raidable Shelters

Raidable Shelters 1.7.1

Sign in to download
Your config has a syntax error somewhere in this section:
JSON:
  "Notification": {
    "Notify Surrounding Players Of Shelter Spawn": false,
    "Radius For Notifying Nearby Players": 40.0,
    "Send As Toast": true
  },
i haven't touched the config file, i will try again and see if that helps (fresh install)
 
Ey, I use TruePVE I assume that when using this plugin it will prevent people form raiding the shack there is also no option regarding Zone Manager or anything is this on your todo list ?
and can a command be added to spawn shacks ? For admin purpose, testing things.
 
Ey, I use TruePVE I assume that when using this plugin it will prevent people form raiding the shack there is also no option regarding Zone Manager or anything is this on your todo list ?
and can a command be added to spawn shacks ? For admin purpose, testing things.

True PVE is supported, meaning players can damage raidable shelters. Could you clarify the need for Zone Manager support, what’s the use case there?
 
Im so technophobic! I am getting this message in console:
"Failed to run a 600.00 timer in 'RaidableShelters v1.5.0' (NullReferenceException: Object reference not set to an instance of an object.) at Oxide.Plugins.RaidableShelters+<>c__DisplayClass36_0.b__0 () [0x00000] in :0 at Oxide.Core.Libraries.Timer+TimerInstance.FireCallback () [0x00018] in :0" Cheers and thanks in advance for any advice
 
Im so technophobic! I am getting this message in console:
"Failed to run a 600.00 timer in 'RaidableShelters v1.5.0' (NullReferenceException: Object reference not set to an instance of an object.) at Oxide.Plugins.RaidableShelters+<>c__DisplayClass36_0.b__0 () [0x00000] in :0 at Oxide.Core.Libraries.Timer+TimerInstance.FireCallback () [0x00018] in :0" Cheers and thanks in advance for any advice
Could you please attach your config
 
Sure, I'll have a thought about it (y)
FYI, DynamicPVP implements PVP areas by creating Zone Manager zones with "PVP" in their names, and then calls a TruePVE hook to map the zone ID to the "exclude" ruleset.

I've just finished a FOSS plugin that also does this for player bases (Player Base PVP Zones), but it's still in review on the couple of sites I've submitted it to. This may be even more relevant to your needs since I'm tracking player shelters in addition to player buildings and tugboats.


Separate topic: It would be nice if there was a way to set a spawn chance for items, so that some stuff could be configured to spawn only rarely.
 
I have a player who's reporting that all shelters that spawn near them are empty when they raid them. I cannot reproduce this issue myself and have set minimums in the config such that at least 1 box and 1 furnace will spawn. Any idea why this might be happening? I have not watched the player raiding as they are typically online when I am not.
 
I have a player who's reporting that all shelters that spawn near them are empty when they raid them. I cannot reproduce this issue myself and have set minimums in the config such that at least 1 box and 1 furnace will spawn. Any idea why this might be happening? I have not watched the player raiding as they are typically online when I am not.
Could you share your config
 
Failed to run a 600.00 timer in 'RaidableShelters v1.5.0' (NullReferenceException: Object reference not set to an instance of an object.)
at Oxide.Plugins.RaidableShelters+<>c__DisplayClass36_0.<StartRemovalTimer>b__0 () [0x00000] in <42f0b8a5b20848e781fc367754e32c4c>:0
at Oxide.Core.Libraries.Timer+TimerInstance.FireCallback () [0x00018] in <beb2b64691c64e2b95b99491bd85442c>:0
config: defaults
spawn test (rs.test) then do ent kill and wait for the error

C#:
private void StartRemovalTimer(LegacyShelter shelter, float lifetimeSeconds, ShelterData shelterData)
        {

            timer.Once(lifetimeSeconds, () =>
            {
                ulong shelterId = shelter.net.ID.Value; //<====== What happens if shelter is null here?

                if (shelter != null)
                {
                    foreach (ulong entityId in shelterData.InteriorEntities)
                    {
                        BaseEntity entity = FindEntityById(entityId);
                        if (entity != null)
                            entity.Kill();
                    }

                    shelter.Kill();
                }

                if (_storedData.Shelters.ContainsKey(shelterId))
                {
                    _storedData.Shelters.Remove(shelterId);
                    DataFileUtil.Save(DataFileUtil.GetFilePath(), _storedData);
                }
            });
        }
 
config: defaults
spawn test (rs.test) then do ent kill and wait for the error
Edit: The code you posted doesn't match the latest version?

Possible cleanup of the latest version's logic:
C#:
        private void StartRemovalTimer(LegacyShelter shelter, float lifetimeSeconds, ShelterData shelterData)
        {
            var shelterId = shelter.net.ID.Value;
            if (lifetimeSeconds <= 0)
            {
                CleanupShelter(shelterData, shelter, shelterId);
                return;
            }

            shelterData.RemovalTimer = Time.realtimeSinceStartup + lifetimeSeconds;
            DataFileUtil.Save(DataFileUtil.GetFilePath(), _storedData);

            timer.Once(lifetimeSeconds, () => CleanupShelter(shelterData, shelter, shelterId));
        }

        private void CleanupShelter(ShelterData shelterData, LegacyShelter? shelter, ulong shelterId)
        {
            foreach (ulong entityId in shelterData.InteriorEntities)
            {
                var entity = FindEntityById(entityId);
                entity?.Kill();
            }

            shelter?.Kill();

            if (_storedData.Shelters.Remove(shelterId))
            {
                DataFileUtil.Save(DataFileUtil.GetFilePath(), _storedData);
            }
        }
 
Last edited:
Hey, this is a really nice plugin but there's a feature that would be helpful, which is to set a percentage on item spawn rates something like this:
{
"Shortname": "cctv.camera",
"Skin Id": 0,
"Minimum Amount": 1,
"Maximum Amount": 2,
"Chance to spawn": 50
}
So there would be a 50% chance that a camera will spawn in a box.
 
So after configuring config file all the items i added never all show up in boxes also I never get a furnace only one or two boxes even though I have 2 boxes as minimum I did about 5 /rs.test commands and always same outcome
 

Attachments

Back
Top