• 202
  • 6
  • 16
  • 6,609


since 2014/9/21

Recipe Manager Recipe Books

Basic Recipes | Advanced Recipes | Recipe Flags | Recipe Books | Name Index | Commands & Permissions

Recipe Books

This plugin auto-generates written book items with recipes written in them.
Books are configured and stored in /plugins/RecipeManager/books/ as .yml files.
There should already be a recipe book there containing all your server’s existing recipes, you can edit that as you like or even remove it.
You can create new books just by creating a new .yml file in that folder but unlike recipes that folder does not support sub-folders.
The book’s filename defines the book’s ID which will be used to identify books even if they’re renamed.
This is useful when editing books that players already have which the plugin will automatically update, if you edit the file name their old book items will not be updated any more.
A book’s .yml file can have:

title: The Book Title
author: RecipeManager
description: Book description written on the first page

# book settings and their defaults
# (ブックの設定とそのデフォルト値)
  pervolume: 50
  cover: true
  contents: true
  end: true
  customend: ''

# list of recipes to be automatically distributed in volumes
# (レシピのリストは自動的に文書に配信される)
- list of
- recipe names or
- + special arguments

# or you can directly define individual volumes
# (また直接個々の文書を定義することもできます)
volume 1:
- recipe name
- ...
volume 2:
- recipe name
- etc ...
volume ...

# these are comments by the way but they will not be preserved since the plugin will rewrite the files.

Note that a book can not contain the same recipe twice.
title‘ (optional, default file name) must not be longer than 64 characters, supports colors.
title(タイトル)‘ (任意, 初期値はファイル名) 64文字より長いのはダメ。色をサポートしています.
author‘ (optional, default “RecipeManager”), must not be longer than 64 characters, supports colors.
author(著者)‘ (任意, 初期値は “RecipeManager”), 64文字より長いのはダメ。色をサポートしています.
description‘ (optional, default nothing) must not be longer than 100 characters, supports colors.
description(説明)‘ (任意, 初期値は空欄) 100文字より長いのはダメ。色をサポートしています.
pervolume (optional, default 50) defines the max amount of recipes per volume the ‘recipes’ node allocates.This does not limit you from adding more recipes in volumes.
pervolume(文書あたり…)’ (任意, 初期値は 50) レシピ当たりの「レシピ」節の文書の割当の最大量の定義。これは文書内のレシピを追加することから、あなたを制限するものではない。
cover‘, ‘contents‘ and ‘end‘ (optional, default all true) toggle if the cover, contents or end pages are generated for the book.You can toggle them any time but you need to reload the books for them to have effect.
cover(表紙)‘, ‘contents(内容)‘ そして ‘end(巻末)‘ (任意, 初期値は全て真) 表紙か内容か巻末ページが本に作成されるかどうかを切り替える。あなたはそれらについていつでも切り替えることが出来るが、それらを有効にするには本を再読込する必要があります。
customend‘ sets a custom text for the last page, only works if ‘end’ is true. Supports colors and \n for newlines.
customend‘ 「end」が真(true)の場合のみ、最後のページにカスタムテキストを設定できます, 色と\n(改行)による行の追加がサポートされています。
Then you can use ‘recipes’ node to list the recipes you want to add or use special arguments (see below).Once ‘recipes’ is defined and book is loaded, the node will be deleted and will auto-generate the volumes according to the recipe-per-volume limit.
You can add the ‘recipes’ node again to append recipes to the existing volumes automatically or you can just add them directly to the volumes you want.
To add recipes to a book, give it a custom name or use the @addtobook flag.
本にレシピを追加するには、それにカスタム名を付与するか、 @addtobook フラグを使用します。
Recipe names must be unique when defined in their recipe files, but if recipes do not have a name defined they will have a uniquely generated name.That generated name contains the recipe type, its ingredient(s) and its result(s).
You can also use special arguments to add a lot of recipes at once, the available special arguments are:
+existing <all/workbench/smelt/fuel>This is replaced by existing recipes matching the type specified.Using ‘all’ will add workbench, smelt and fuel recipes in order.
+existing(存在している) <all(全て)/workbench(作業台)/smelt(かまど)/fuel(燃料)>これは指定されたタイプに一致する既存のレシピに置き換えられます。’all’を使用すると、作業台、かまど、燃料レシピが追加されます。
+custom <all/workbench/smelt/fuel>This is replaced by custom recipes (added with this plugin) matching the type specified.Using ‘all’ will add workbench, smelt and fuel recipes in order.
+custom(カスタム) <all(全て)/workbench(作業台)/smelt(かまど)/fuel(燃料)>これは指定されたタイプに一致したカスタムレシピに置き換えられます(このプラグインで追加)。’all’を使用すると、作業台、かまど、燃料レシピが追加されます。
+file </path/to/file.ext>+folder </path/to/folder>These are replaced by the recipes defined in the recipe file defined or the recipe files from the defined folder.
+file(ファイル) </path/to/file.ext>+folder(フォルダ) </path/to/folder>これらは定義されたレシピファイル、またはフォルダから、レシピファイルに定義されたレシピに置き換えられます。
Paths are relative to ‘/plugins/RecipeManager/recipes’ so defining ‘/’ as path would mean the root of ‘recipes’ folder.
Once the book is loaded by the server, these arguments will be replaced in the file with the recipes they find.
If you use any +argument in ‘recipes’ node they will be automatically distributed throughout volumes as defined by the ‘recipes-per-volume’ limit.
However, if you add them directly to volumes they will be added to that volume directly because you are not bound by the volume limit, only the ‘recipes’ node is.
Also, when a book file is loaded it will have a header comment appended to it specifying the last date/time it was read.
After adding your recipes you can just move them around or remove them if you want.
Now your book should be ready.
To see available recipe books type ‘rmbooks’ in server console or as an operator.
You can use @getrecipebook flag in a recipe to craft a recipe book.
あなたはレシピ本を作るために @getrecipebook フラグを使用することができます。
Additionally you can get books with the ‘rmgetbook’ command, available to operators.

Example book:

title: Stuff!
description: Random things.(ランダムな物)
- flaming sword of doom
- oblivion ice axe
- shaped 3x2 (76 331:0 76 / 1 1 1) diode
- shaped 1x3 (5 / 5 / 280:0) wood_sword
- shaped 3x3 (5 5 5 / 0 280:0 0 / 0 280:0 0) wood_pickaxe
- some non-existent recipe name here
- shaped 1x3 (4 / 4 / 280:0) stone_sword

Which, after using reload, rmreload or rmreloadbooks command, the book’s contents will be converted to:

# Recipe book configuration (last loaded at May 2, 2013 12:19:45 PM)
# Read 'recipe books.html' file to learn how to configure books.

title: Stuff!
description: Random things.
volume 1:
- flaming sword of doom
- oblivion ice axe
- shaped 3x2 (76 331:0 76 / 1 1 1) diode
- shaped 1x3 (5 / 5 / 280:0) wood_sword
- shaped 3x3 (5 5 5 / 0 280:0 0 / 0 280:0 0) wood_pickaxe
- shaped 1x3 (4 / 4 / 280:0) stone_sword

NOTE You’re not supposed to write the auto-generated recipe names manually!
メモ あなたが手動で自動生成されたレシピの名前を書くことはサポートされていない
As said before, you can give them a custom name or use the @addtobook flag.
前述の通り、あなたはそれらのカスタム名か、@addtobook フラグを使う事で与える事が出来る。
For existing recipes you can use the +existing special argument to get all the names then remove the ones you don’t need.
After that you can still change its contents, rearrange recipes, remove recipes, change its title, description, whatever you want!
Just be sure that you do not rename the file if people already have copies of the book, in that case their books won’t update!