Skip to content

ID aliases#

A feature that has been introduced with version 1.8.96 is plugin id aliases. They can be useful if you want to change the ids of objects that can be used by others (e.g. light definitions). Since changing the ids would break plugins that depend on the former ids you can now specify aliases for the id under which the plugin can be found, too.

Let's assume you have the following json code:

[
  {
    "id": "myoldid",
    ...
  }
]

You can now define an alias just like that:

[
  {
    "id": "myoldid",
    "alias": "newid",
    ...
  }
]

You can also define multiple aliases:

[
  {
    "id": "myoldid",
    "aliases": ["newid", "anothernewid"],
    ...
  }
]

It doesn't matter if you write alias or aliases as attribute name, both can take a single string or an array of strings. Plugin references to other plugins by id should behave equivalent no matter if it uses the original id or an alias id of it.

This page has been adapted from a topic on the official TheoTown forum.