Skip to content

Creating New Generators

This guide details the process of adding a new Generator type to the Tycoon (Astra) server.

Files to Modify

All files are located in: server_configs/tycoon/plugins/Skript/scripts/

  1. gens_item.sk: Define the item appearance.
  2. gens_main.sk (or gens_list.sk): Define the generator properties.
  3. gens_shop.sk: Add to the shop GUI.

Step 1: Define Item (gens_item.sk)

Add the item definition to the on script load section.

# Example
set {item::gen::10} to red terracotta named " <#ff0000>Ruby Gen"
set line 1 of {item::gen::10}'s lore to "&7Generates Ruby"
# ... set NBT
set int tag "custom;genID" of nbt of {item::gen::10} to 10

Step 2: Configure Properties (gens_main.sk)

Add the generator's stats to the configuration lists.

# Name
set {gen::name::10} to "Ruby"

# Drop Item (What it produces)
set {gen::drop::10} to red dye named "&cRuby"

# Price (Cost to buy)
set {gen::price::10} to 50000

# Upgrade Path (Next Gen ID)
set {gen::next::10} to 11

# Tier/Speed
set {gen::tier::10} to 2 # Speed multiplier

Step 3: Add to Shop (gens_shop.sk)

Locate the function openGenShop(p: player) and add the new generator to the GUI matrix.

make gui slot 15 with {item::gen::10}:
    buyGen({_p}, 10)

Step 4: Reload

Reload scripts in order: 1. /sk reload gens_item 2. /sk reload gens_main 3. /sk reload gens_shop

NBT Requirements

Crucial NBT tags for the item to function as a generator: - custom;genID: The unique ID of the generator type. - custom;genOwner: The UUID of the player who placed it (set automatically on place).