Builder for Citizens2
Builder is a character plugin for the NPC plugin Citizens2. With Builder, A NPC can be given a mcedit/worldedit schematic file and build it block by block. Builder NPCs can also maintain an existing building, replacing changed blocks or removing new ones.
Features
Builde' NPCs can:
- Build MCEdit/Worldedit schematics, block by block.
- Rebuild an existing structure, fixing anything that has been changed.
- Require players to supply the building materials before starting to build.
Installation
- Install Citizens2 Please use Latest Dev Builds
- Unzip Builder.zip to your minecraft /plugins/ directory.
- This will install Builder jar, create the Builder/schematics/ folder and put house.schamatic in it.
- Start your server.
Usage
- Create a NPC with Citizens and give it the 'builder' trait.
/npc create Bob --trait builder
- Load a schematic with /builder load, Example:
/builder load house
- This will load the included example house.schematic file.
- Position the NPC in the center of the area in which it should build.
- Start the NPC building with:
/builder build
More detailed instructions and other commands can be found on the Citizens 2 Wiki
FAQ
Q: How can I use multiple builders on one project?
A: You can use up to 4 builders on one project by giving them all the same schematic and origin, but different build patterns. You can also manually split your schematic into multiple parts with WorldEdit or MCEdit.
Q: How can I make builders go faster?
A: Use the /builder timeout command to set the max time between blocks. You can also make the builder walk faster with "/npc speed"
@Kiak
Water is not a problem, make sure you haven't set /builder ignoreliquid. Also know it gets placed last.
Next version will break up the construction into 5 passes by material type, that may accomplish a lot of what you're doing there.
@jrbudda
I've found that Builder doesnt seem to be able to place water (havent tried lava but guessing the same)
he also seems to fail when placing on top of water (but no fix needed. common sense is better)
A mode where he places the blocks from your inventory and pauses to whine at you if you run out of supplies would be epic! (but for this i dont mind using Denizens to charge for the whole building before hand)
@Horusx6
Horus what i have done is grabbed my old building schematics and divided them up into different sections!
Then you can assign the builders different parts of the house!
I make my guy do it in a nice order for realism
(as long as the later stages overlap and include the steps b4 hand it works and looks AWESOME
@Horusx6
1 builder. 1 schematic.
is it right that ich can create more than one Builder and they work together one one schmatic Projekt? or can i only build one schematic with one Builder per time?
@xH3LLRAIZ3Rx
Extended data (chest contents, paintings, sign text.. etc) will be added at a future unknown date.
can you make it to were the npc builders load the chests full of the items that the chests had when the schematic was saved
You are a legend.
If anyone else has gmwatson's problem (null response to /builder load) it's a plugin conflict (not sure which) and will be fixed in 0.3.3
Dude I love this so much!
@gmwatson
if you can come to our IRC chat, maybe we can figure this out. http://webchat.esper.net/?channels=citizens
@jrbudda
Yes I have about 40 schematics I have used to build my spawn and arena worlds. All have loaded and pasted without any issues. I'm a network guy so I have no idea what jNBT is..lol I have put a ticket in with the hosting company to find out what OS the VM is running on. I will also start disabling plugins later to night and see if that works.
@gmwatson
Does worldedit load the schematics OK? if so it's something to do with your OS and the version of jNBT I'm using.
@jrbudda
I tried the house and a few other ones. I also made a simple totem of 6 blocks and saved it as a schematic. I uninstalled both build and citezens2 and re installed both with that newest versions. (now getting the errors from the last post.) My bukkit is 1.3.1-R2 would that have any thing to do with it? I'm pulling my hair out here..lol This plug is (if I can get it to work) one of the best plugins I have ever seen..
@gmwatson
Have you tried re-extracting the schematic file? looks like it got corrupted or truncated. Have you tried another schematic file?
@Kiak I think paste -a doesn't PLACE air? (e.g.. it won't destroy blocks) which is what /builder ignoreair does
@Kiak I'm deliberately ignoring the offset that is saved in worledit schems. You would have to have knowledge of what that offset is in order to use it. The way i have it set up is you put your builder in the middle of where the thing goes, use marks to see the corners, adjust if necessary, and go. I dunno why you would want to have to position your builder to the west of something.
The item for marking will be adjustable, either in the config, or in the command. Also at some point when there's Item Requirements the player will need the marker items too, and will get them back when done.
Kiak you should join us in IRC, you're all over the Citizens pages.
Sorry for mass requests but I have more :)
Builder marks out his schematics from the centre of it's radius. but is it possible to make him use the same relative positioning that a normal "/ /paste" would use
If i save a house standing west of it. It will always paste it to my east (relative to pos) If i saved the same house from inside. it would paste the walls around me (relative)
So is there any chance of this? because im figuring the info for original save location must be in the schematics anyway. (/builder origin schematic) is not quite what i need here because it always pastes to the same world location (rather than relative to npc/player location)
And Lastly. Can you change the marker from Glowstone to Glass (or config option) This way noone gets free materials when they repeatedly mark out an area (i plan to make denizen scripts to allow charging for a building)
When you're using worldedit you can "/ /paste -a" and it DOESNT overwrite air blocks from the schem
I wonder if you could make the builder do the same thing?
For example. I want the builder to be able to Dig a staircase down into the earth. but since hes digging diagonally his schematic either needs to include heaps of dirt or leave big gaps to fill in later.
Is it possible for you to replicated that " -a argument"? (can imagine it being pretty tricky but fingers crossed.)
@jrbudda
Okay I was able to generate errors..
WARNING] [Builder] Builder encountered an error attempting to load: plugins/Builder/schematics/house.schematic 2012-09-13 18:45:32 [SEVERE] java.io.EOFException 2012-09-13 18:45:32 [SEVERE] at java.io.DataInputStream.readFully(DataInputStream.java:197) 2012-09-13 18:45:32 [SEVERE] at java.io.DataInputStream.readFully(DataInputStream.java:169) 2012-09-13 18:45:32 [SEVERE] at org.jnbt.NBTInputStream.readTag(NBTInputStream.java:29) 2012-09-13 18:45:32 [SEVERE] at org.jnbt.NBTInputStream.readTag(NBTInputStream.java:20) 2012-09-13 18:45:32 [SEVERE] at net.jrbudda.builder.MCEditSchematicFormat.load(MCEditSchematicFormat.java:38) 2012-09-13 18:45:32 [SEVERE] at net.jrbudda.builder.Builder.onCommand(Builder.java:443) 2012-09-13 18:45:32 [SEVERE] at org.bukkit.command.PluginCommand.execute(PluginCommand.java:40) 2012-09-13 18:45:32 [SEVERE] at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:168) 2012-09-13 18:45:32 [SEVERE] at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:492) 2012-09-13 18:45:32 [SEVERE] at net.minecraft.server.NetServerHandler.handleCommand(NetServerHandler.java:878) 2012-09-13 18:45:32 [SEVERE] at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:825) 2012-09-13 18:45:32 [SEVERE] at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:807) 2012-09-13 18:45:32 [SEVERE] at net.minecraft.server.Packet3Chat.handle(Packet3Chat.java:44) 2012-09-13 18:45:32 [SEVERE] at net.minecraft.server.NetworkManager.b(NetworkManager.java:276) 2012-09-13 18:45:32 [SEVERE] at net.minecraft.server.NetServerHandler.d(NetServerHandler.java:109) 2012-09-13 18:45:32 [SEVERE] at net.minecraft.server.ServerConnection.b(SourceFile:35) 2012-09-13 18:45:32 [SEVERE] at net.minecraft.server.DedicatedServerConnection.b(SourceFile:30) 2012-09-13 18:45:32 [SEVERE] at net.minecraft.server.MinecraftServer.q(MinecraftServer.java:581) 2012-09-13 18:45:32 [SEVERE] at net.minecraft.server.DedicatedServer.q(DedicatedServer.java:212) 2012-09-13 18:45:32 [SEVERE] at net.minecraft.server.MinecraftServer.p(MinecraftServer.java:474) 2012-09-13 18:45:32 [SEVERE] at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:406) 2012-09-13 18:45:32 [SEVERE] at net.minecraft.server.ThreadServerApplication.run(SourceFile:539) 2012-09-13 18:45:43 [INFO] <Porkchops [Dedicated] baconhoney> Ah
@Horusx6
Update your Citizens2. See the note at the top of the wiki, and in the Known Caveats page here on bukkit.