How to create schematics for structures - Historical

Applied By itpao25: Apr 18, 2021 at 2:50 PM

How to create schematics for structures
CraftOfClans - How to create schematics for structures

You can create an unlimited number of levels for each structure.
Each structure has its own item in the gui of the /coc shop command that allows it to be purchased.

An example of an item is as follows:
Under section structures-gui in the config.yml:
Code (Text):
   active: true
   material: '159:4'
   title: '&e&lBuild a Gold mine'
   slot: 1
   - '&cPlace this item at the point where you want'
   - '&cbuild the Gold mine level 1!'

Each item is linked to an entry in the structures-core section of the config.yml

Code (Text):
     # Can be moved? TRUE
     can-be-moved: true
     # Max number of times that can be built
          1: 2
          2: 3
               # Costs
               # You can use:
               # - cost_gems (for gems)
               # - cost_elixir (for elixir)
               # - cost_gold (for gold)
               # - cost_dark_elixir (for dark elixir)
               cost_elixir: 150
               # maximum capacity
               capacity: 500
               # increase in resources by minute
               increment-forminute: 3.33
               # Schematics name located in /plugins/CraftOfClans/schematics
               schematics-name: 'GOLDMINE_1'
               schematics-name: 'GOLDMINE_2'
               cost_elixir: 300
               capacity: 1000
               increment-forminute: 6
               schematics-name: 'GOLDMINE_3'
               cost_elixir: 700
               capacity: 1500
               increment-forminute: 10
               # Town Hall level required
               townhall-required: 2

Explanation of items:
  • can-be-moved - If true the structure can be moved once positioned in the village
  • limit-based-townhall-level - this list allows you to set the maximum number for this facility based on the level of the town hall. E.g.: - 1:2, in town hall level 1 you can place two of those structures
  • max-for-eachvillage - Alternatively, you can use max-for-eachvillage which is disconnected from the town hall level.
  • Levels: beginning of levels declaration
    For each level you can set a cost, valid values are: cost_gold, cost_elixir, cost_dark_elixir and cost_gems.
    You can also use numbers with decimals (separated by dot, e.g. 10.10)
    • increment-forminute - is used for structures that collect resources every minute. It is possible to indicate numbers with decimals
    • capacity - is used for structures that can contain resources
    • townhall-required - you can set the level of the town hall needed for that level of structure
    • schematics-name - The name of the schematic (without the .schematic extension) located in the CraftOfClans/schematics folder

Another example of options for defense structures:

Code (Text):
    can-be-moved: true
    # Max number of times that can be built
    max-for-eachvillage: 3
             cost_gold: 2000
             damage-range: 2
             damage-bomb: 2
             schematics-name: 'WIZARD_TOWER_1'
             townhall-required: 2
             cost_gold: 3000
             damage-range: 3
             damage-bomb: 3
  • damage-range - radius in which the structure will notice the player and start attacking him
  • damage-bomb/damage-arrow - Bombs used for some structures and arrows used for archers.
    is the damage that the structure will do to the player

Decorative structures
See the section Decorative structures

How to create a structure level

Just copy the section of the layer above and change the settings as you like. The important thing is to have a progressive number of levels

How to change/create a new schematic

Using WorldEdit you have to select the two blocks in the end of the structure (without leaving empty borders), like in the example below the orange blocks, then use //schem save <schematic name at will>

At this point just go to the WorldEdit folder, take the schematic inside the schematics folder and paste it into the CraftOfClans/structures folder.

After that go to config.yml and set the schematic name as the schematics-name of the desired level.