Skip to content

Structure Editing

TheCodex6824 edited this page Sep 23, 2020 · 2 revisions

Warning: although everything here should work in theory, it is as of yet mostly untested. Please report any issues you have with the system!

Thaumic Augmentation structures (currently, just the Spire) all use structure files under the hood for their generation and creation. As a result, they take the form of standard resources - meaning they can be overridden and added to.

Editing an Existing Template

To completely replace an existing piece, you need to place the overriding file into the "data" folder in the world directory (due to 1.12 lacking data packs). As an example, to replace the "base_0.nbt" spire piece, put the new NBT file in "/data/thaumicaugmentation/structures/spire/base_0.nbt".

Adding a New Template

You may have noticed that there are incrementing numbers after some piece names, and even if there is a single piece, it still has a "0" at the end. This was done intentionally to allow adding extra pieces to the pool of generatable pieces.

To do this, add a new NBT file with the same name but an ending number 1 higher than the previous (remembering that the counting starts at 0). As an example, to add an extra variant of the spire base, your file would be named "base_1.nbt" and placed in the same directory structure as if overriding. Since the outside stairs already have 4 variants, adding another would mean the file would be called "stairs_4.nbt", with the next being "stairs_5.nbt", and so on.

The game will check consecutive numbers of all structure piece names, and add all of them to the list of pieces to choose from. There cannot be any skips in the numbers, or the game will stop processing them at the skip. For example, if there is a "base_1.nbt", "base_3.nbt", and "base_4.nbt", only "base_1.nbt" will be loaded, since "base_2.nbt" was skipped.

Limitations

Sadly, in addition to data packs, Jigsaw blocks are another thing missing from 1.12 that would have been very helpful in creating an extensible structure system. Them not existing means that pieces have been placed together in the code manually. Keep in mind the following limitations when making new structure pieces:

  • If they are not the same size as the piece they are replacing / being a variant of, they probably will not generate properly
  • It is not possible to apply extra transformations to the pieces outside of the usual structure block settings and the rotations / mirroring applied by TA.

Structure Helpers

To make creating certain objects easier/feasible, there are some special structure data block tags that can be used. To use these, place a structure block in "data" mode where you want the object, and paste the desired tag from the list below into the block, without the colon. Examples of tags include "loot_0" and "autocaster".

Spire

  • loot_x
    • x is the loot table id, corresponding to those below
    • loot_0: Spawn common urn
    • loot_1: Spawn uncommon urn
    • loot_2: Spawn rare urn
  • pedestal_
    • Multiple parts, format: pedestal_t_l
    • t: pedestal material, e for eldritch, a for ancient, r for arcane stone
    • l: loot table id, 0 for common, 1 for uncommon, 2 for rare
    • example tag for rare eldritch pedestal: pedestal_e_2
  • autocaster
    • spawns eldritch autocaster
  • autocaster_random
    • 50% chance to spawn eldritch autocaster, seeded with world seed and position
  • eg
    • spawns TA eldritch guardian
  • inz
    • spawns inhabited zombie
  • crab
    • spawns single eldritch crab
  • vent
    • spawns crusted opening
  • obelisk_t
    • t is type, either e for eldritch or a for ancient
    • note that this is a structure obelisk, so it will break when it detects the structure ward is removed
  • lock_front_d
    • spawns Impetus lock, with d being horizontal direction
    • e: east
    • s: south
    • w: west
    • n: north
  • lock_d_t
    • spawns interior lock, with direction d and type t
    • Directions:
      • e: east
      • s: south
      • w: west
      • n: north
    • Types:
      • maze: Runed tablet key
      • prison: Spiked sigil key
      • library: Tome key
      • boss: Sinister blade key
  • key_t_k
    • spawns pedestal with key item, pedestal type t and key type k
    • Pedestal Types:
      • e: eldritch
      • a: ancient
      • r: arcane
    • Key Types:
      • maze: Runed tablet key
      • prison: Spiked sigil key
      • library: Tome key
      • boss: Sinister blade key
  • spawner_t
    • Creates vanilla spawner with t as mob type
    • Types:
      • mspider: mind spiders
      • crab: eldritch crabs
      • wisp: wisps
  • altar_t
    • Creates altar of type t, with matching obelisk above it
    • t is either e for eldritch or a for ancient
  • eg_mb
    • Creates eldritch guardian mini-boss, meaning it gets extra absorption and a difficulty-defined void shield