-
Posts
6,320 -
Joined
-
Last visited
-
Days Won
211
Content Type
Profiles
Warranty Claims
Downloads
Forums
Store
Services
Downloads Plus Support
DOWNLOADS EXTRA
Reels
Everything posted by nivex
-
Changed Status from Pending to Closed
-
Changed Status from Pending to Closed
-
you're welcome, enjoy
-
heya, Most of this added in the next update: All hooks are updated to provide an event ID A new hook for OnRaidableBaseStart(Guid eventId, Vector3 pos, float protectionRadius, int level, string baseName, bool allowPVP, ulong ownerId, BasePlayer owner) is called before an event pastes (OnRaidableBaseStarted has a different signature which is documented, and is called when events become raidable) A new hook for OnRaidableBaseEnded(Guid eventId, Vector3 pos, float protectionRadius, int level, string baseName, bool allowPVP, ulong ownerId, BasePlayer owner) which matches the Start parameters A new hook for OnRaidableBaseLocationChanged(Guid guid, Vector3 previous, Vector3 current) when its position is updated (this happens exactly once for bases not copied at their center) A new GetAllEvents API to compliment this All of these ensure events can be tracked without issue No despawn API will be exposed, sorry. SpawnRandomBase exposes API for spawning manual events already, and will remain undocumented. Here is an example of how to use it, along with comments. I won't expose more than this, sorry: private void SpawnRandomBaseEvent(string baseName, Vector3 position, int level, int type, bool bypassDisabledProfiles) { // Deliberately made with certain limitations: // baseName: Provide a copypaste filename from your profiles to spawn that base, or provide null to spawn random. // position: The position where the event will paste, bases not copied properly will have their position recentere and this one-time update is called via OnRaidableBaseLocationChanged hook. // level: The difficulty level found in your profiles. Pass -1 to be random. Defaults: Easy=0,Medium=1,Hard=1,Expert=2,Nightmare=4 // type: Valid types are Manual=1, Scheduled=2, Maintained=4, do not pass 0 or 3 // bypassDisabledProfiles: Profiles that are disabled cannot be spawned unless true is passed Plugin rb = plugins.Find("RaidableBases"); if (rb == null || !rb.IsLoaded) { Puts("RaidableBases not found or not loaded."); return; } object result = rb.Call("SpawnRandomBase", baseName, position, level, type, bypassDisabledProfiles); if (result is true) return; // success if (result is string str) Puts("Error while spawning base: {0}", str); // Do not use LogError or LogWarning } Example GetAllEvents API (provided in the next update): public void UpdateRaidableBaseTerritories() { _rbEvents.Clear(); using var events = Pool.Get<PooledList<(Guid guid, Vector3 pos, float protectionRadius, int level, string baseName, bool allowPVP, ulong ownerId, BasePlayer owner)>>(); RaidableBases?.Call("GetAllEventsNonAlloc", events); if (events.Count == 0) { return; } foreach (var evt in events) { float radius = evt.protectionRadius + 100f; _rbEvents.Add((evt.pos, radius * radius, evt.guid)); } } How to use _rbEvents: private List<(Vector3 pos, float radiusSqr, Guid guid)> _rbEvents = new(); private void OnRaidableBaseStart(Guid guid, Vector3 pos, float protectionRadius) { float radius = protectionRadius + 100f; float radiusSqr = radius * radius; for (int i = 0; i < _rbEvents.Count; i++) { if (_rbEvents[i].guid == guid) { _rbEvents[i] = (pos, radiusSqr, guid); return; } } _rbEvents.Add((pos, radiusSqr, guid)); } private void OnRaidableBaseLocationChanged(Guid guid, Vector3 previous, Vector3 current) { for (int i = 0; i < _rbEvents.Count; i++) { if (_rbEvents[i].guid == guid) { _rbEvents[i] = (current, _rbEvents[i].radiusSqr, guid); return; } } } private void OnRaidableBaseEnded(Guid guid, Vector3 pos, float protectionRadius) { for (int i = _rbEvents.Count - 1; i >= 0; i--) { if (_rbEvents[i].guid == guid) { _rbEvents.RemoveAt(i); return; } } } private bool RaidableBaseTerritory(Vector3 position) { foreach (var (pos, radiusSqr, _) in _rbEvents) { if ((position - pos).sqrMagnitude <= radiusSqr) { return true; } } return false; }
-
heya, your lockouts are configured properly. lockout ui should not appear after completing a purchased event. lockouts are given to automatically spawned events. custom monuments require a monument marker and building/monument topology to cover the bounds of the entire monument or it will not be blocked properly. if events can spawn partially inside of monuments then this is why. you have 5 workarounds: ensure it has a monument marker, seen by a visible name on the in-game map. if it has this, then only its topology needs to be fixed. this is not ideal for your current wipe. block them using Block Spawns At Positions in the config. next update will let you block by grid as well. spawn cupboard.tool at the position to block RB events in that area. this is the easiest solution. allow players to reset their buyable cooldowns by using /buyraid reset when Reset Cooldown Costs are enabled. not ideal. #3 is the easiest solution. increase Extra Distance To Spawn From Monuments beyond 100 meters, but that's not ideal as it affects all monuments, and it's not recommend to set this above 50 for that reason. there is no way to bypass a buyable cooldown being set when using /rbe despawn. I can add an option for that in the next update.
-
heya, I don't think it's unbalanced, but it's not possible to provide a package that every server will agree with though, because each server has their own economy and needs and what they consider balanced. players will always find something to complain about though, especially loot. they always want more but loot profits should be a gamble, not a guarantee. there's a very good loot table editor made by beee that you can use to make adjustments: https://codefling.com/tools/raidable-bases-boats-loot-editor/ or you can simply increase Amount Of Items To Spawn or Loot Amount Multiplier in the profiles. the packages are working and will receive an update soon too =]
-
Changed Status from Pending to Closed Changed Fixed In from Not set to Next Version
-
heya, I understand. Kill Deployables Before Spawning A Base is set to false by default. its purpose is to delete player deployables when set to true and an event spawns on deployables. so yep, if you manually spawn an event inside of your base it will delete them. I'll block unknown arguments in the next update, but /rbe by itself will always spawn a random base where you are looking at. that is its purpose. the command shouldn't be used inside of someone's base though
-
hi, i can change it. players should not be given raidablebases.allow though, thats an admin perm. players only need raidablebases.despawn.buyraid to despawn their own events
-
ah ya that would explain it no worries
-
heya, tier 1 has 2 bases per difficulty level. if you have 8 per difficulty then install the config again as this cannot happen with the tier 1 config which enables Require All Bases To Spawn Before Respawning An Existing Base I recommend getting some additional bases too. you can find more on Codefling or download them off Fortify on Steam:)
-
Changed Status from Pending to Closed
-
you're welcome, enjoy
-
hi, players should only be ejected when trying to enter the base, not the sphere. events can overlap other players bases so this is necessary.
-
Hi, sorry for no response. The plugin is a mess and was missing a lot of functionality for many lights. I started work on it recently. It will remain a free plugin and be updated to my standards. I will release it once it's completed, not sure when that will be but the work I've done so far looks promising. 104 lights supported now.