documentation/Creating your Craft/Notes about the .craft format

These are the basic options. For advanced features, like ship collisions and sinking, refer to this: http:dev.bukkit.org/bukkit-plugins/movecraft/pages/documentation/advanced-customization-options/

General

  • You can't use tabs in this file. You have to use spaces instead.
  • Use # to put comments in your file. The # character and everything after it on that line will be ignored.
  • .craft files are a YAML format file, and any .craft file in the types directory will be loaded.
  • Your .craft file must consist of at least the following fields (example data values provided):

name: Aircraft
maxSize: 10000000
minSize: 10
allowedBlocks:

- 5

forbiddenBlocks:

- 12

blockedByWater: true
speed: 10.0
tryNudge: false
flyblocks:

20:

- 0.0
- 100.0

To download some example .craft files for you to look at, use the download link in the bottom of the description on this youtube video: http://www.youtube.com/watch?v=0fqiFtyz3FE

Please note these are only provided as examples, and it is highly recommended you make your own .craft files that meet your needs.

name

  • This is the name of the craft type, and in order to pilot a craft of this type the user must right click a sign on the craft that has exactly this name as its first line.

allowedBlocks

  • This is a list of blocks, using their Block ID, you can make your craft out of. If you have a block that isn't on the list, that block won't be part of your ship. This could prevent your craft from being able to be piloted or possible being able to move, because it is blocking the ship.
  • Use the # comment to remind yourself what the block is. For example:

- 35 # Wool

forbiddenBlocks

  • This is a list of blocks that if your ship is touching when you go to pilot a craft, will cause it to fail.

blockedByWater (previously canFly)

  • If false, then the craft can move through water. Note that technically a water based craft can "fly", although this would still be set to false to allow it to move through water.

speed

  • Speed in metres per second. Maximum is 20.0, however 10.0 is recommended as the maximum for smooth movement and decent performance. If this is a large craft it is recommended to keep this very low to avoid lag, and compensate for this using a cruiseSkipBlocks (see Advanced Customization off the main page for details) Important: you must have a trailing ".0" after the number here. IE: 5.0, not just 5

tryNudge

  • Under development. Recommend you set this to false.

flyblocks

  • This is the type of block your craft must have to be piloted. The two numbers that follow give a range of percentages that the total number of flyblocks in your ship must have. For example, let's say you have the following (don't type the extra line between the numbers, it is done here because this page won't format correctly without it):

35:

- 25.0

- 50.0

If the total number of blocks in your craft equal 100. 25 of those blocks, but no more than 50, must be wool blocks. The rest can be any other allowedBlocks. Important: you must have the trailing ".0" after the percentages. IE 25.0, not just 25


Comments

Posts Quoted:
Reply
Clear All Quotes