Skip to content

joshie-app/SharedStructures

Repository files navigation

OUTDATED README

SharedStructures (Hytale Plugin)

A plugin that lets you inject your own prefab structures into newly generated chunks, while reusing the game's vanilla prefab placement rules

Warning: Early Access
The game Hytale is in early access, and so is this project! Features may be incomplete, unstable, or change frequently. Please be patient and understanding as development continues.

Introduction

This project contains a Gradle project that can be imported into IDEA and used as the foundation for custom Hytale plugins. The template will add the Hytale server to your classpath and create a run configuration that can be used to run your plugin on the server. It can also be used to build a sharable JAR file that contains your plugin.

Requirements

Please ensure all the requirements are met before getting started.

  1. Download Hytale using the official launcher.
  2. Have Intellij IDEA installed. Community edition is fine.
  3. Download Java 25 and set it as the SDK in IDEA.

Configuring Template

It is important to configure the project before using it as a template. Doing this before importing the project will help avoid running into caching issues later on.

1: Project Name

Set the name of the project in settings.gradle. This should be the name of your plugin. We recommend capitalizing your project name and avoiding whitespace and most special characters. This will be used as the base name for any files produced by Gradle, like the sharable JAR file.

2: Gradle Properties

Review the properties defined in gradle.properties. You should change the maven_group to match your project. You should also change the version property before making a new release, or set up CI/CD to automate it.

3: Manifest

The manifest file provides important information about your plugin to Hytale. You should update every property in this file to reflect your project. The most important property to set is Main which tells the game which class file to load as the entry point for your plugin. The file can be found at src/main/resources/manifest.json.

This template has configured Gradle to automatically update the Version and IncludesAssetPack property to reflect your Gradle properties every time you run the game in development, or build the plugin. This is a workaround to allow the in-game asset editor to be used when working on your project.

Importing into IDEA

When opening the project in IDEA it should automatically create the HytaleServer run configuration and a ./run folder. When you run the game it will generate all the relevant files in there. It will also load the default assets from the games.

If you do not see the HytaleServer run configuration, you may need to open the dropdown or click Edit Configurations... once to unhide it.

Connecting to Server

Once the server is running in IDEA you should be able to connect to Local Server using your standard Hytale client. If the server does not show up automatically, add the IP as 127.0.0.1 manually.

Using SharedStructures

SharedStructures scans all loaded asset packs for JSON files under:

  • Server/WorldGen/SharedStructures/Prefabs/*.json

Each JSON file can contain:

  • A single object
  • An array of objects
  • An object with Entries: [ ... ]

Entry fields

  • Id: Optional string identifier (used for logging + deterministic seeding).
  • ZoneMask: Optional array of strings (supports * wildcard). Empty means “all zones”.
  • BiomeMask: Optional array of strings (supports * wildcard). Empty means “all biomes”.
  • Prefab: String or array of strings. These resolve like vanilla prefab keys (they are looked up across all loaded packs).
  • Weight: Optional number or array of numbers matching Prefab length.
  • Pattern: A JSON object that is passed to the vanilla PrefabPatternGeneratorJsonLoader.

Example

See src/main/resources/Server/WorldGen/SharedStructures/Prefabs/Example.SharedStructures.json.

About

Hytale WorldGen v1 Structure Placement Plugin

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages