Builder: Difference between revisions

From Citizens Wiki

No edit summary
No edit summary
Line 3: Line 3:
| AUTHOR      =  jrbudda
| AUTHOR      =  jrbudda
| NAME        = Builder
| NAME        = Builder
| VERSION    = 0.4
| VERSION    = 0.4.1
| CITIZENSBUILD  = [http://ci.citizensnpcs.com/job/Citizens2/ 2.0.2]
| CITIZENSBUILD  = [http://ci.citizensnpcs.com/job/Citizens2/ 2.0.2]
| DEVSTATUS    = InDev
| DEVSTATUS    = InDev
Line 19: Line 19:
==Updates==
==Updates==
{{scrollbox|
{{scrollbox|
'''v. 0.4.1 Beta''' 9/18/2012
* '''Verical Build options''' you can now specify layers:X to build X number of layers at a time. Significantly speeds up building.
* '''Grouping option''' you can specify groupall to build ALL of one group of materials at a time (instead of doing it at every set of layers)
* added commands: origin me, origin current
* excavate works from the top down, as you would expect.
'''v. 0.4 Beta''' 9/16/2012
'''v. 0.4 Beta''' 9/16/2012
* '''New build order''' Builder now places items in groupings based on item type: base blocks, furniture, redstone, liquids, and decorations. This is done ''per layer'' because I didn't like how it looked building all the layers of one type first. Maybe configurable later.
* '''New build order''' Builder now places items in groupings based on item type: base blocks, furniture, redstone, liquids, and decorations. This is done ''per layer'' because I didn't like how it looked building all the layers of one type first. Maybe configurable later.
Line 92: Line 98:


'''/builder origin schematic''' - Sets the origin of the builder's projects to the origin of the loaded schematic. Best used for schematics created from the builder's world with worldedit.
'''/builder origin schematic''' - Sets the origin of the builder's projects to the origin of the loaded schematic. Best used for schematics created from the builder's world with worldedit.
'''/builder origin me''' - Sets the origin of the builder's projects to the player's position. Does not work from the console.
'''/builder origin current''' - Sets the origin of the builder's projects to the origin of the project currently being built. Use this if you forgot to set the origin before starting to build, and need to cancel it to resume later.


'''/builder mark (item)''' - Places a block at the 4 corners of the footprint, then returns to the origin, so you can see where it's going to build. You can specify the item to use, although that item must be allowed in the config.yml. The first item on the list in the config is the default if no item is specified. If the config is missing the builder will use GLASS.
'''/builder mark (item)''' - Places a block at the 4 corners of the footprint, then returns to the origin, so you can see where it's going to build. You can specify the item to use, although that item must be allowed in the config.yml. The first item on the list in the config is the default if no item is specified. If the config is missing the builder will use GLASS.
Line 101: Line 111:
*reversespiral - build outside to inside.
*reversespiral - build outside to inside.
*excavate - The builder will clear out the area of blocks before starting to place them.
*excavate - The builder will clear out the area of blocks before starting to place them.
*layers:# - The builder will build # number of layers at a time, the default is 1.
*groupall - the builder will build all of a group of materials at once, instead of doing it per layer.
*ignoreair - the builder will not place air blocks. (Use to build into an existing structure, pointless if used with excavate)
*ignoreair - the builder will not place air blocks. (Use to build into an existing structure, pointless if used with excavate)
*ignoreliquid - the builder will not place lava or water blocks. (Use if the schematic has unconstrained liquids on the bottom.)
*ignoreliquid - the builder will not place lava or water blocks. (Use if the schematic has unconstrained liquids on the bottom.)
Line 123: Line 135:
*.schematic files should be placed in the /plugins/Builder/schematics/ directory. This directory can be configured in the config.yml
*.schematic files should be placed in the /plugins/Builder/schematics/ directory. This directory can be configured in the config.yml
* Position the builder, or set the builder's '''origin''', to the ''center'' of the footpoint you want to build before calling '''build'''. The size of the schematic is shown upon load.
* Position the builder, or set the builder's '''origin''', to the ''center'' of the footpoint you want to build before calling '''build'''. The size of the schematic is shown upon load.
* It is highly recommended to set the '''Origin''' before building. This will allow you to cancel the build and restart it later, the builder will pick up where he left off.
* You can cancel a build and resume it later if you have an Origin set. Do not try to resume a build with the excavate option!
* The builder will ignore any empty space underneath the schematic object so that it will always rest on the ground where the builder starts.
* The builder will ignore any empty space underneath the schematic object so that it will always rest on the ground where the builder starts.
* The builder will not attempt to replace blocks that are already set properly, this means you can use a builder to quickly 'restore' any changed blocks in something he has previously built.
* The builder will not attempt to replace blocks that are already set properly, this means you can use a builder to quickly 'restore' any changed blocks in something he has previously built.

Revision as of 00:35, 19 September 2012

Builder.png

Builder


Author jrbudda
Version 0.4.1
Citizens build 2.0.2
Other dependencies None required.
Download Link
Description: Citizens NPCs that build schematics.

Builder is NOT compatible with the released Citizens 2 on bukkitdev. Use the link at the right to download the latest Citizens2 dev build to use Builder

Builder is a Citizens 2.0 character trait that gives NPCs the ability to:

  • Build MCEdit/Worldedit schematics, block by block.
  • Rebuild an area, fixing anything that has been changed.

Updates

v. 0.4.1 Beta 9/18/2012

  • Verical Build options you can now specify layers:X to build X number of layers at a time. Significantly speeds up building.
  • Grouping option you can specify groupall to build ALL of one group of materials at a time (instead of doing it at every set of layers)
  • added commands: origin me, origin current
  • excavate works from the top down, as you would expect.

v. 0.4 Beta 9/16/2012

  • New build order Builder now places items in groupings based on item type: base blocks, furniture, redstone, liquids, and decorations. This is done per layer because I didn't like how it looked building all the layers of one type first. Maybe configurable later.
  • New build patterns! builders can use: spiral, linear, reversespiral or reverselinear (this is for the x-z plane, builders still build from the bottom layer up, 1 layer at a time... for now!) the default is spiral.
  • (Okay I'll admit this sort of lets you use up to 4 builders on 1 schematic if they have the same origin and different patterns... but shhh it's our secret :))
  • Excavate mode! builders can optionally dig out the area before building!
  • Configuration! Builder now makes a config.yml that can be used to change the default schematics directory. messages and allowable 'marking' materials.
  • Holding items! Player and Endermen-type builders will now hold the item they are about to place, or a pickaxe if breaking blocks.
  • Fix mob-type builders, they no longer crash clients because cows can't swing their arms!
  • the ignoreliquid and ignoreair commands have been removed specify these options when calling /builder build.
  • Hooked into dynmap to trigger an area render on completion/cancellation of build.

v. 0.3.2 Beta 9/13/2012

  • Builder will remove previous marks before building or placing new ones.
  • Fix skipping first block in schematic.
  • Improved error messages an other minor fixes.
  • Target Java 6 instead of 7.

v. 0.3.1 Alpha 9/12/2012

  • Pathing and other minor bugfixes.
  • fix /builder mark
  • /builder help actually provides help.

v. 0.3 Alpha 9/11/2012

  • Added Denizen Task script execution option on build completion and cancellation.
  • Reduced memory usage of loaded schematics by 80%.
  • Last loaded schematic is now persistent.
  • Lots of updates to messages and info.

v. 0.2.1 Alpha 9/9/2012

  • added commands origin clear, origin schematic, check, compare

v. 0.2 Alpha 9/9/2012

  • Added commands ignoreair, ignoreliquid, origin, info

v. 0.1.1 Alpha 9/9/2012

  • Added Mark command.
  • Better pathing.

v. 0.1 Alpha 9/9/2012

  • First release


|
|
|

Installation

  • Install Citizens 2
  • Place Builder.jar file in /plugins directory.
  • Place .schematic files in /plugins/Builder/schematics/
  • Start Server
  • Create NPC and give the Builder trait.
/npc create Bob --trait builder

or

/npc create Bob
/trait builder

Permissions

  • builder.*
  • builder.[name of command]

Commands

All commands can be run on a selected NPC as shown (/builder [command]), or on a target NPC with /builder [npcid] [command].

/builder load [schematic] - Loads a .schematic file. simply use the name of the schematic. Example

/builder load house

/builder origin - Sets the origin of the builder's projects to the builder's current location. Allows you to re-build in the same spot. If this is not set the builder will always start from his current location.

/builder origin clear - Clears the saved build origin.

/builder origin schematic - Sets the origin of the builder's projects to the origin of the loaded schematic. Best used for schematics created from the builder's world with worldedit.

/builder origin me - Sets the origin of the builder's projects to the player's position. Does not work from the console.

/builder origin current - Sets the origin of the builder's projects to the origin of the project currently being built. Use this if you forgot to set the origin before starting to build, and need to cancel it to resume later.

/builder mark (item) - Places a block at the 4 corners of the footprint, then returns to the origin, so you can see where it's going to build. You can specify the item to use, although that item must be allowed in the config.yml. The first item on the list in the config is the default if no item is specified. If the config is missing the builder will use GLASS.

/builder build (option1) (option2) ... etc - Start building the schematic. This command takes several optional arguments. The order does not matter. you can add to this command the following:

  • linear - build north to south
  • reverselinear - build south to north
  • sprial - build inside to outside (this is the default and thus does not need to be specified.)
  • reversespiral - build outside to inside.
  • excavate - The builder will clear out the area of blocks before starting to place them.
  • layers:# - The builder will build # number of layers at a time, the default is 1.
  • groupall - the builder will build all of a group of materials at once, instead of doing it per layer.
  • ignoreair - the builder will not place air blocks. (Use to build into an existing structure, pointless if used with excavate)
  • ignoreliquid - the builder will not place lava or water blocks. (Use if the schematic has unconstrained liquids on the bottom.)
  • nohold - the builder will not hold the items he his placing (Use this only for compatibility with other plugins like Sentry)
  • oncomplete:Task - the builder will run the Denizen task script on completion of build. See #Advanced Usage
  • oncancel:Task - the builder will run the Denizen task script on cancellation of build. See #Advanced Usage

Examples:

/builder build
/builder build excavate reverselinear
/builder build ignoreair ignoreliquid oncomplete:Celbrate

/builder cancel - Cancel a build job.

/builder info - View a Builder's loaded schematic name and size, as well as the builder's options.

/builder check - Display a list of all the block types/count of the loaded schematic.

/builder compare - Display a list of all the block types/counts of the loaded schematic and compare to the player's inventory. Not really useful for anything, yet.

Usage

  • .schematic files should be placed in the /plugins/Builder/schematics/ directory. This directory can be configured in the config.yml
  • Position the builder, or set the builder's origin, to the center of the footpoint you want to build before calling build. The size of the schematic is shown upon load.
  • You can cancel a build and resume it later if you have an Origin set. Do not try to resume a build with the excavate option!
  • The builder will ignore any empty space underneath the schematic object so that it will always rest on the ground where the builder starts.
  • The builder will not attempt to replace blocks that are already set properly, this means you can use a builder to quickly 'restore' any changed blocks in something he has previously built.
    • To set up a builder to maintain an existing building:
      • Select the building with worldedit and save it as a schematic.
      • Copy the schematic to the builder's schematics directory.
      • Load the schematic to a builder and call /builder origin schematic.
      • Call /builder build and the builder will place any missing blocks or destroy new ones.
  • Builder will NOT create sign text, chest contents, paintings, or anything else that uses extended data. (Hey this is Construction, not Home Decoratin'.)
  • Rail and dispensers my not be placed correctly. (Hey this is Construction, not Engimaneerin'.)

Advanced Usage

  • Builder can be set to run Denizen Task Scripts on completion or cancellation of a build.
    • The NPC must have both the Builder and Denizen Trait.
    • Call /builder build with the optional modifiers oncomplete:TaskName and/or oncancel:TaskName. Example:
/builder build oncomplete:DespawnTask oncancel:AnnounceTask
    • Only certain commands are valid in a Task script of this kind. See ..something
    • This usage would almost always be used from another Denizen script, although you may call it in-game, if you wish.

Planned Additions

0.5

  • preprocess schematic to provide accurate total block count and build % complete info.
  • Configurable build speed.

0.6

  • Rotate/flip before build
  • Chest contents and sign texts

0.7+

  • 'Mimic' mode, builds and digs alongside you!
  • Require materials for building.
  • 'Construction Registry' remembers schematic/location data and can dispatch repairmen later on.

NOT doing:

  • Multiple builders per schematic. Sorry, no. split up the schematic manually with worldedit, it will look better anyway.
  • Built-in economy handling. Use Denizen, much more configurable. Example scripts soon.

Donate to jrbudda