Support for horses and claim optionsSolved

Would it be possible to add locks to horses?

If the vehicle isn't owned require a claim option.

And put a max claim toggle/line to help prevent players from griefing the server by locking all the cars (or horses if the option is added) the walk by.

Yes, planning to support Horses and Kayaks.

There is a config setting for disallowing locks to be placed on unowned vehicles. With that option, they would need to claim the vehicle via a plugin first. That is also approximately an anti grief option.

I will consider adding a config option for max vehicle locks per player.

Oh right. I did see that. I was thinking about Modular car being unable to be locked. But they have keys :)

I have another vehicle lock plugin, but it has some critical bugs and hasn't been updated for a while. So no modular cars or kayaks. Only thing it has that this system doesn't is a cap.

This collection of plugins is brilliant and really want to make the switch. I just loaded it onto my test server and I'm checking it out.

Something my Modular Car Code Locks plugin had, was the ability to require the car to be on a lif to place a lock. Porting that to this plugin would be one way to address the issue for cars, but it wouldn't address it for horses. It's also possible Modular Cars will eventually be sold by NPC vendors as the trend seems to be going, in which case the Vehicle Vendor Options plugin could assign ownership during the purchase.

Edit: On second thought, I have a Car Lock UI plugin pending approval which just adds the UI from Modular Car Code Locks and integrates with this plugin. Instead of granting the codelock.modularcar permission from this plugin, you can just grant the ui permission which will only allow them to be deployed at lifts (also bypasses ownership checks). Still doesn't address horses though.

I don't think a system to claim and unclaim vehicles belongs in this plugin, so I was thinking along the lines of limiting deployed locks per player. However, I don't see a reason to limit it except for locks deployed to unowned vehicles. When considering that idea, I started leaning toward just having something be responsible for claiming unowned vehicles with limits, so it makes sense why that other plugin went that route. I'm considering implementing a standalone plugin for that, but I have a number of other projects on my list first.

Merged post

Implemented locks on Kayaks and Ridable Horses in v0.4.0. I made sure to block leading the horse or accessing its inventory when locked out.

Horses were a bit tricky. I managed to parent the lock to a particular bone so it moves with the horse as it changes pose while standing still. I also noticed an issue where in many cases the lock could not be interacted with even though clearly in view, presumably due to the way the horse's colliders are seen from the client perspective. It seemed the lock is easier to access while mounted on the horse, allowing the lock to be pretty close, but that prevents a player from coming up to the horse and unlocking it in most cases due to angle issues. They would have to rely on another player to unlock it so they can get on the horse to auth to the lock which is too tedious IMO, so I opted to push the lock outward for usability. Not sure how the other horse lock plugin handled this.

Also, my statement earlier that the Car Lock UI plugin will allow bypassing ownership checks is actually not true. It's basically just an add-on for this plugin so it has basically all the same checks.

Merged post

I thought about this some more. Given that helis and boats can still spawn around the map when using the corresponding cvars, I think it makes sense long term to have the ability to claim unowned vehicles with limits, so I've increased the priority of that project in my queue.

Can you give me anymore information about what kinds of features you want in it? I assume, claiming, unclaiming, and a configurable default limit per player (like 3). Would you want a permission for no limit, or dynamic permission tiers for different limits per permission group?
I implemented a plugin for claiming ownership of vehicles a while back, which just now got approved.
https://umod.org/plugins/claim-vehicle-ownership

I ended up using a cooldown instead of limits since limits can be bypassed by picking up a vehicle since that technically destroys it. I feel like cooldowns are a more natural way to do this. Players can already drive random vehicles to their base and hoard them. If the player takes the time to do that, I don't see why they shouldn't be able to lock them all eventually.
That makes sense. Sounds good.
Locked automatically