Turrets
Turrets
Automatic turrets for Bukkit servers (cleverly disguised as minecarts!)
I moved the project into Beta as there have been more people downloading and, I'm assuming, testing it, with no major issues. There is a lot going on in this plugin, and little changes can have far reaching consequences, let alone big changes, so I still won't stake my name on saying it absolutely won't mess anything on your server up. Please report any problems you have!
Currently working on: DisguiseCraft support. Give me your ideas on what you'd want from this :)
Details: I'm hooked into DisguiseCraft, just need ideas for what kind of features are desirable!
Download
I'll try and keep this up-to-date. If all goes as planned, this version should be the same or newer than the one linked to this BukkitDev entry.
A Jenkins job has been created to house dev builds. You can access it here!
v0.2.3a - Manual turret control!
For those of you antsy about getting a version for 1.4.4, here's an unofficial 1.4.4 dev build.
Link Removed: http://www.mediafire.com/download.php?85saz80idpsafef
Building turrets is easy: Just place a fence post, then right click with a minecart on top. It's so easy, even a guest could do it! (That's why Turrets has permissions support.)
Make sure you attach an ammo chest to the turret (see command page) or set turrets to have unlimited ammo (see config page).
Breaking turrets is also easy: Just left-click it until it breaks, just like a minecart.
Features
- Turrets target hostile mobs
- Turrets will avoid shooting through walls
- Turrets use ammo chests (configurable).
- Turrets are upgradable!
- Upgrade a turret by replacing the block under its fence post: iron -> gold -> diamond
- Better turrets can shoot faster, farther, more accurately
- Firing speed, range, and accuracy can be changed in the configuration
- Turrets are breakable! (With permissions, of course)
Possible future features
Commands
Permission Nodes
Also, thanks to damnnicholas for his YouTube video explaining the plugin.
Oh, just a heads up for you guys. I found a decent work around for manual control of turrets. You aren't technically "riding" the turret as you would a minecart, but other than the visual it's basically the same. You right click to get in, right click to get out, and you can't move while in the cart. And, most importantly, the cart aims where you aim!
There are limits to this right now, as I'm not sure if there's a way to detect if the player's cursor is on an entity, and therefore lock the minecart on that entity. Currently it just aims for the location that is 4 blocks away from the player's head, in the direction of the player's head. I found this, in general, yields pretty good results. I'll look into seeing if I can get it to lock on to an entity if there is one within some small area of the player's cursor for better effective accuracy.
@robotnikthingy
You need to click the turret first, then the chest you wish to add to the turret.
Also, sorry about not being around the past couple days guys, lots of IRL stuff, and was a little bit burnt out on Turrets, as I knew I had to do a big change to the code that was going to be boring and arduous and time intensive. I think I've gotten it all working now though, so back to trying to add some features :)
FYI the change in the code basically made user-specific config stuff make more sense. Before I had the white and blacklists in their own file, and technically things like the max number of turrets per player wouldn't be saved between server restarts, so you couldn't really set that. Now you can! I'll release a new version in a bit. Going to try another crack at manual turret aiming (it is my pipe dream with this plugin).
It wont let me select the chest when i try to use the /turrets addAmmoBox command, it does nothing when i click the chest
@alexrs98
Necesita cambiar la opciĆ³n 'defaultUseAmmoBox' a 'false' en 'config.yml'.
C'mon high school Spanish, don't fail me now!
Also, I found that the spawning problem is both widespread in Bukkit and also particularly worse for Turrets, and I've tried several methods of reloading this automatically in many situations...no idea how to fix it, nothing seems to work ><
What I need to do is get a hold of the Citizens guys. Pretty sure they had this same problem with their citizens and fixed it eventually.
Despues de esta actualizacion las torretas ya no tienen municion ilimitada y solo se puede poner ilimitada por comandos, se puede hacer para que sea default en todas las torretas que se crean? Gracias
@Gemil01
I'll have to check out some of those features and see what's doable.
Also, I've been investigating the turrets not spawning issue, and it turns out (for me at least) it's more than just the turrets. Certain entities, it seems random which (2 of my turrets loaded, other 3 did not, and neither did a nearby sheep) don't "load" when you log in, but if the player runs to another chunk or two, all the nearby entities that didn't spawn right do so. It's not limited to the turrets though, as that nearby sheep followed the exact same spawn behavior as some of my turrets.
I tried to do send a manual chunk reload packet to the client (there is some limited control over the client from bukkit, for example you can ask that the client reload a chunk, which is what I did), but it didn't fix the problem, only walking from chunk to chunk seems to fix the issue without reloading Turrets (which only fixes the turrets, that sheep was still not spawned right).
So sadly I think this is more of a bukkit issue than a Turrets issue, but I'll keep looking into ways to fix the problem, to at least have the turrets spawn correctly, even if the other entities in the area don't.
@Gemil01
I think he doesn't use dispensers because of the pitch and yaw stuff or whatever.
I gave my users permission to /turrets reload and they know to do it if they don't see minecarts on their turrets, though if they're offline and some noob comes up they won't get to be like "Oh, that's a turret" which sucks.
i think its because the minecarts. they are a type of entity which despawn on chunk unloads. it seems that they are not correctly respawn on chunk loading.
maybe you can see some fix in other minecart plugins. the easiest way would be to change the minecart to a block - for example a dispenser.
here another feature request: is it possible to make a virtual ammo chest, when you rightclick on the turret? same functionality as ShowCaseStandalone - where you need no chest to sell/buy things.
Also it would be cool, if you could add a list with possible ammotypes. i cant get the turrets working with other ammotypes then arrows :/
(sry fpr my english, im not a native speaker)
Damn, I was really hoping that wasn't a problem a lot of people saw. I have no clue why that happens, and it has happened to me (sometimes) since the very first version of turrets (before I even took over).
I've tried to figure it out multiple times, but it still eludes me :( I'll look into it more, but this is a problem that is extremely difficult to pinpoint the cause of...
when i restart the server, the minecarts ontop disappered. same happens when the chunk is unloaded.
/tur reload fix the problem - and all minecarts appered.
@romar_morales
So, I'm trying to find out - if you disconnect, do the turrents keep working? I find when I reconnect, the turrets appear to be there, but w/o the minecarts and there's no firing going on. When I try to put minecarts back on top of the fence, it tells me there's a turret already there. I thought it might be some of my other plugins (nolagg & traincarts) but when I removed them, I still get this behaviour.
Is this expected? Are the turrets only supposed to be active when you're logged in to the server?
@n33dy1
I added the new command to the change log and to the commands page as well.
I'm also not sure if I could reproduce your bug, I think if the person got out of range and came back it would have been okay, but I fixed it so it will check before every shot if the player should be shot at or not.
I don't want to change the whitelist/blacklist idea from where it is, just because it looses a lot of flexibility if I change it so the white and blacklists are locked together, and I can't really think of where it would used that much. I know its more commands, but I do think the trouble is worth it :)
As far as doing other things with the lists, I do want to add some more things like allowing a command to list all the players on a specific list and the ability to remove all players from one's list.
Here's that hotfix for the turret targetting problem though :)
Link Removed: http://www.mediafire.com/?fmpxdlb64asj6p4
After removing someone from a blacklist, they continue to be attacked until I do a /turrets reload
My users cannot use /turrets reload, could you maybe have it reload the plugin after each modification?
Also, instead of a whitelist and a blacklist and having /tur blacklist add and /tur whitelist add, etc., you made it a single list and they set the mode of the list with /tur listType <whitelist/blacklist> and simply add a /tur list clear command to wipe it? Less commands that way.
EDIT: I see you added /turrets setAmmoType snowball all but didn't mention it in the changelog nor did you add it to http://dev.bukkit.org/server-mods/turrets/pages/commands/
@Mortalsinn
Not sure how that error could occur, there's nothing in that part of the code that should be throwing a NullPointerException...odd. Hopefully that isn't a widespread problem and hopefully you don't see it again..not sure.
However, I did fix the whitelist/blacklist system to the much simpler and more sensible system. I also fixed the version number so it's actually correct again. Who knows if I'll remember for 0.2.3 :P
Link Removed: http://www.mediafire.com/?g2l5uikuz29bva7
As always, let me know if anything is broked and hopefully I can fix it right quick :)
getting this error now. What's funny is the error says 0.1.9 but this is actually your latest version, 2.1
Are the minecarts supposed to disappear when you disconnect and then reconnect back to the server?
Please make turrets attack Wither bosses and maybe even witches. Perhaps have all the mobs listed in a config file for us to set true/false on each for if the turrets attack them or not?
@Gemil01
Yes, I found what I think is that bug after I redid the whitelist/blacklist stuff. It should be fixed when the new whitelist/blacklist version comes out (which should hopefully be today sometime).
Edit: also, I have to manually adjust the version number that shows up and I often forget to do it :P Someday I'll remember every time. But not this day!
when i try to set a whitelist:
http://pastebin.com/veEsH30S
and yes, its the latest uploaded version (2.1) ....it still says 1.9. i also use latest bukkit beta build for minecraft 1.4.2
@scaccolatrice
I'm not sure what to tell you man :/ Here's what I have when I set up my test server to use essentials with Turrets:
Link Removed: http://www.mediafire.com/download.php?o813sfbsuorb9qt Link Removed: http://www.mediafire.com/download.php?n3ej3nd47gw2v63
In this setup, wristdirect has Owner privileges, which means he (I) can do any and everything.
livingdarkness, on the other hand, has builder privileges, which in the groups.yml file, is defined as the basic essentials group manager builder profile, except with turrets.addturret and turrets.destroyturret added in there.
Using this setup, livingdarkness (an alt of mine) was able to create a turret no problem :/