Sentry for Citizens2
![]() | ![]() |
---|
Sentry is a character plugin for the NPC plugin Citizens2. With Sentry, NPC's can be set to guard areas or act as bodyguards. Hostile targeting, retaliation, and a variety of options and stats allow a Sentry NPC to be customized to almost any guarding or combat situation.
Features
Sentries Can:
- Attack monsters, players, and groups automatically. Sentry also has built-in support for Factions, Towny, War and SimpleClans
- Kill, and be killed by, players, monsters, and the environment.
- Guard locations, paths, players, or other NPCs.
- Use ranged or melee weapons. Shoot arrows, fireballs, snowballs, eggs, lightning, and potions with deadly accuracy.
- Be configured with stats such as Strength, Health, Armor, Speed, Range and even Night Vision!
- Ride mounts!
- Work with Denizen to become Bosses and Quest NPCs that run scripts upon death.
Installation
- Install Citizens2 You must use the correct version for your version of Bukkit
- Download the correct Sentry from the Citizens Wiki. You must use the correct version for your version of Bukkit
- Place Sentry.jar in your minecraft /plugins/ directory. Start your server.
- Create a NPC with Citizens and give it the 'sentry' trait.
/npc create Town Guard --trait sentry
- Customize your Sentry's stats and options and you're ready to go.
A full list of commands and options is available on the Citizens 2 Wiki
Configuration
Sentry makes a config.yml in the plugins/Sentry folder on first load. Use this to tailor Sentry to your server. You can:
- Set defaults for new sentries
- Change or disable the item used for various attack types
- Add potion effects like slow or blindness to certain Sentry weapons.
- Add armor, strength and speed buffs to armor and weapons for Sentries.
- Set critical hit chances and messages.
The config.yml is commented with instructions.
@Kiak
click here and come plead your case so I understand what you're after exactly.
http://webchat.esper.net/?channels=citizens
@jrbudda
You say you wont do aggression towards traits because people can make more in future which is fine..
But how about just doing one just for "sentry" because that would still be extremely useful
Example...
"Shadowclone" Sentry npc WILL attack other Kiakaha Sentry Npcs (target add trait:sentry) but ignore the "Kiakaha" Denizen npc i have in my spawn
@jrbudda
That is what i'm currently doing but because of the way i made my clones It's still possible to mass up enough of them to run them past the stormcallers
I guess il just work on a way to limit clone amounts probably can track clone (player) deaths with Vtriggers to make it work
I still think you should create this weapon (limited to sentry range though) but just default it OFF in the config.
@Kiak
Hmm i don't really see that happening. that has many potentially problematic consequences. You could use a archer or stormcaller with very high damage and attack rate to clear out other npcs pretty quick.
@skore87
/sentry speed does not affect the rate sentries attack. /sentry attackrate does this for projectiles. The attack rate of melee sentries is fixed in code.
@jrbudda
When I use the sentry speed, that modifies the speed at which they attack, not their movement speed.
Is there a way to stop sentries entering certain areas without turning off guard <player>
If not ... Could you make a sentry "weapon" type that kills all npcs in its range each time it "shoots"
(so yes it hits All npc entities at once)
this could be used to stop guards/clones being taken into innappropriate areas?
@jrbudda
Thanks mate, I'd missed /ignore clear. thats a real handy one
In my final conclusion on this note. I've decided to just stop using my Player named NPCS as admin bots and replace them with some "admin bot" or something
I liked having the sweet line up of our own skins, but its just too troublesome to stop npcs either attacking/guarding them :(
@skore87
It's supposed to do that with /sentry speed.. bug in Citizens2 core at the moment.
I would like to see a feature to have an in-combat run speed instead of the constant one assigned. That way I can have my guards do their patrol at a walk speed and if they go to attack someone they "run" instead of walk.
@Kiak
If you could give them unique names you could group them up anyway you wanted. Aggression toward citizens traits is probably not going to happen as people keep making new ones and npcs can have multiple traits.
@rossyell
A Denizen could maybe do that with the SWITCH command and a location trigger to fire.
@Kiak
Ah that's a case sensitivity problem, I'll fix it. In the meantime if you use ENTITY:OWNER in the config it will be removable. You could also use /sentry ignore clear
I found another bug in the lastest version
If you set default ignore to entity:owner in the config it will not let you use "/sentry ignore remove entity:owner" ( it says it worked but it stays on the ignore list)
I just love this plugin. Am using sentries in towers to "guard" an airshipyard - at last some loyal friends who do not get bored in my sad little world !. Once we get the design of the airship sorted will set up the builder NPC to reproduce it. Am also thinking of putting a front and rear platform on the airship with sentries to shoot down on targets as we fly the airship. Still a while to go - but it also got me thinking - an item on my wish list would be to extend sentry to automate arrow/other dispensers which would then be sentry pods ?
I don't understand how permission groups helps that?
to be specific i want Npcs to Attack Sentry NPCS but NOT attack untraited or differently traited NPCS.
I dont see how permission groups helps here because i have 2 different NPCS that share my playername, so they either both have the same group or both dont have a group.
@Kiak
If you need that level of specificity just use a permission group.
One more thing My Npc Bodyguards have Entity:npc as a target so they can fight other npcs
but this makes them target NON sentry npcs in my town
Can you make a "entity:sentry" that is exclusive to traited npcs? (better yet, make it work for "entity:builder" "entity:denizen" and "entity:trader" (this will allow you to have Bandits who target the shopkeepers or Goblins who stop Builders from working)
If there is already a flag for this can you point me to it? because i've clearly missed it :)
Cool, That fix and il have it working great
With variable triggers i made a /clone command that
Clones can battle each other in epic wars super fun
@kustimork
No but you can give them waypoints to make them.. dodgier. I think also Denizen WANDER works with archers so they're unpredictable-er, I think you need to set the wander priority to like 10 or something.
@Kiak
Update Sentry, that should be fixed, latest is on the wiki.
The default strength setting for npcs in the config doesnt seem to work
Other default settings apply to new npcs correctly but strength currently always 0 :(
I'm trying to make Shadow Clones that you can spawn with 1 life and weak stats. Working perfectly except for that so far :(
Possibly it's because of the strength gains of items that you also added (i currently have them all commented out as in default config.yml)
@jrbudda
Is there a way to make the npc run at you when you shoot them? They seem to just stand there and take it until they die.
@kustimork
ah. that. that's a bug introduced in citizens2 core buld 358, hoping its fixed soon. I think you roll back to build 357 for the time being.