Base item blocker / beacon

  • Offline LouD
  • Silent but deadly ;)
  • Moderator
  • Veteran
  • ******
  • Posts: 1415

Base item blocker / beacon

« posted: Mar 09, 2015, 05:00 PM »
I really want to create an beacon which you can put inside a self created base.

This beacon would have the following features:
  • Act like protection for the baseparts you have placed. Rendering them unremovable by others.
  • Make all baseparts only removable by the owner of the beacon or pre set friends
  • Resave the baseparts within the baseparts saving time set in main_config
  • Would give of some sort of warning to the owner (if online) when someone enters their base
  • This beacon would cost a lot of money e.g. 100k
  • You would have to reactivate your beacon within the set baseparts saving time in main_config
  • Or you would have to buy one every X days
  • When the beacon gets destroyed everything becomes unlocked immediatly

But since i'm not that good a coder I could use some help. Anyone interested?

Possible problems:

Many bases scattered across the map.
Deserted bases.
Many baseparts in your database which make your server slower.

Re: Base item blocker / beacon

« Reply #1 posted: Mar 09, 2015, 05:09 PM »
Awesome idea.
I also cannot make this occur but how about an option to 'refresh' base which unlocks and relocks everything in their same positions, making things last longer before being cleaned up?

Have that cost a moneyvalue, say, 20-50k?

Re: Base item blocker / beacon

« Reply #2 posted: Mar 09, 2015, 07:49 PM »
LouD, I'm working on precisely this right now.  I'm using a laptop as the interface point.  I've pretty much planned all of the features you've brought up.  I'm hoping to have something relatively functional by this weekend, depending on what happens with all of the servers and their respective needs. 

Re: Base item blocker / beacon

« Reply #3 posted: Mar 09, 2015, 09:55 PM »
Mmm, im also dabbling with something like that and as usual i "Frankenstein" stuff as i don't know any better.

Im using a object bought in the store, its just a portable generator (could be set as any object) which i call "Re Locker", i used the admin menu as base for it so the "owner" which is either the one who bought it or locked it (you can use it without locking it right now). And i use (i think) badvolts password stuff (i hope i remembered to give credits in the scripts).

At this you can lock(ie, as long as you bought them and the objects have ownerUID to them you can just put em down and pay the cost at the re locker, if the item was found( spawned in towns) you would have to lock em yourself the first time but you could just change the script to lock everything but i didnt want that) or re lock all owned items(even objects locked or owned by others so your whole team can  help out) within a set radius (for now 30m, but easily adjustable, unfortunately you have to edit several files to get all script to the same radius). and some other stuff like turning on or of lights etc.

ill just copy in the explanation from steam http://steamcommunity.com/groups/SNAFUwasteland/discussions/0/610574394234494446/
Code: [Select]
"Re Lock base objects", this option locks or re locks all "owned" base items withing 30m radius
"Show objects owned by you" this option creates private markers on the map for the object "you" own within 30m radius.
"Show Base Border" this option creates a temporary circle of red arrows (in game) at 30m radius around the Re Locker, this is visible by everyone nearby
"Lights OFF" this option turns off all lights (ie street lights etc not vehicle lights) within 30m radius
"Lights ON" take a wild guess what this does.
"Lock Down Base" this option should make it impossible for anyone to unlock or lock objects within the 30m radius (state saves)
"Release Lock Down" this option removes the "Lock Down" status so you can lock/unlock stuff again.
"Change Password" this option is only visible to the "owner" and sets a PIN for using the Re Locker so any one with the PIN can operate it.
.

Im probably dropping the coowner feature as it feels a bit unnecessary when you can just enter a PIN to get access to most options (except change PIN unless youre the owner).
But the idea was so owners could do all, coowners the same except changing PIN and any one would be able to relock and pay maintenance (even enemies, who could blame em if they wanna pay).

All the stuff is in addons/BoS/, i was suppose to use an independant menusystem but for now its called from playerActions while im working on the other one.

Its somewhat untested so "your mileage may vary".
  • Offline LouD
  • Silent but deadly ;)
  • Moderator
  • Veteran
  • ******
  • Posts: 1415

Re: Base item blocker / beacon

« Reply #4 posted: Mar 10, 2015, 02:14 PM »
Can you give me a link to the exact script parts on your Git Cael?

Re: Base item blocker / beacon

« Reply #5 posted: Mar 11, 2015, 11:02 AM »
Im afraid of git, ill upload the whole mission someday, but pull it from my server in the meantime =).

Most of it is in addons/BoS and i added a check (for unlock and lock) in objectLockStateMachine.sqf

I need to set a initial "password" because if the players dont bother you can open the "non owner" menu by not entering a password, but i guess you can just add in the UID or something randomized when buying the item, not a big issue for those who set a password (as you always should on everything). Or maybe a !isNil check but i didnt have time to modify badvolts password thingy.
  • Offline Jes
  • First Blood
  • ***
  • Posts: 62

Re: Base item blocker / beacon

« Reply #6 posted: Mar 18, 2015, 08:50 PM »
This looks very interesting, I´ll follow this thread for updates. :)))
  • Offline LouD
  • Silent but deadly ;)
  • Moderator
  • Veteran
  • ******
  • Posts: 1415

Re: Base item blocker / beacon

« Reply #7 posted: Mar 22, 2015, 04:38 PM »
I am cherry picking your relocker now Cael. Changing some stuff, but it's working with iniDB and extDB now.

Re: Base item blocker / beacon

« Reply #8 posted: Mar 22, 2015, 07:10 PM »
Cool =)
Doing slight updates to it myself so i might steal it back later =)
  • Offline LouD
  • Silent but deadly ;)
  • Moderator
  • Veteran
  • ******
  • Posts: 1415

Re: Base item blocker / beacon

« Reply #9 posted: Mar 22, 2015, 07:43 PM »
Cool =)
Doing slight updates to it myself so i might steal it back later =)
What you updating? Would like to use newest files :P
  • Offline LouD
  • Silent but deadly ;)
  • Moderator
  • Veteran
  • ******
  • Posts: 1415

Re: Base item blocker / beacon

« Reply #11 posted: Mar 23, 2015, 05:33 PM »
Didnt it throw any erros for you with
Code: [Select]
_password = _obj getVariable "password";
if (!isNil "_password") then
{
   _variables pushBack ["password", _password];
};
?

Think i had to do
Code: [Select]
_password = _obj getVariable ["password", ""];

if (_password != "") then {
_variables pushBack ["password", _password];
};
but it could have been something else....don't really remember now, was a late night =)

Also im having some issues with markOwned.sqf need relocking, it only says "was relocked this session", this worked fine when i ran it with micoverys mission version (except for vehicles, which i need to do something else for), anyway, i probably need to broadcast "baseSaving_hoursAlive"...
  • Offline LouD
  • Silent but deadly ;)
  • Moderator
  • Veteran
  • ******
  • Posts: 1415
  • Offline Jes
  • First Blood
  • ***
  • Posts: 62

Re: Base item blocker / beacon

« Reply #13 posted: Mar 28, 2015, 07:33 PM »
First of all, the base locker is super. :) Exactly what I have been looking for.

I have a zone around the stores (radius 100 m.), where base items can´t be locked to avoid players blocking the stores.
If a player buys the base locker at general store, he can use the "re-lock base objects", outside the store and block it completely. The base items standing around the store, is now locked (after re-lock base items) and no one can move it/access the store anymore.

Can I avoid this in any way?
I´m thinking, could you do a check if near the stores before re-lock base items is possible?
Another possibility can be to force a manual "lock object" before accessing the Base Locker (This only applies in my situation, where locking is disabled around stores.)
  • Offline LouD
  • Silent but deadly ;)
  • Moderator
  • Veteran
  • ******
  • Posts: 1415

Re: Base item blocker / beacon

« Reply #14 posted: Mar 28, 2015, 11:38 PM »
First of all, the base locker is super. :) Exactly what I have been looking for.

I have a zone around the stores (radius 100 m.), where base items can´t be locked to avoid players blocking the stores.
If a player buys the base locker at general store, he can use the "re-lock base objects", outside the store and block it completely. The base items standing around the store, is now locked (after re-lock base items) and no one can move it/access the store anymore.

Can I avoid this in any way?
I´m thinking, could you do a check if near the stores before re-lock base items is possible?
Make sure your base relocker doesn't locked unlocked items and only locked items.