Seed Search (WIP) - moulins/amidst GitHub Wiki

This page describes a work-in-progress feature which may not be working as described. All the information present here may change without notice.

TODO: Write overview of the feature

Filter syntax

AMIDST uses a .json format to specify the search parameters; its syntax is explained here

Notes

  • An optional property is enclosed in brackets [like this]
  • Coordinates are notated [x,y], for example [150,-10]
  • Unless specified, all optional booleans are false by default
  • Checkboxes indicate the status of the feature:
    • Empty checkbox: not implemented
    • Full checkbox: fully implemented

Root structure

  • [groups]: A list of named criteria (see criterion format below). The seed will be tested against each group, and the results displayed (unless the group is ignore'd).
  • [match]: A criterion used to filter the seeds: only the seeds which match this criterion will be displayed. If not specified, all seeds which match at least one group will be displayed.
  • [ignore]: A list of groups to ignore: their match information won't be displayed and they won't participate in the global match score.
  • [defaults]: Default parameters for all criteria
    • [center]: The default center of the filter, act as a global offset for all criteria; world spawn if not specified.
    • [shape]: The default shape for biome and structure criteria; "circle" if not specified.

Criterion format

There are five types of criterion:

  • Biome criterion: Search for specific biomes inside an area.
  • Structure criterion: Search for specific structures inside an area.
  • And criterion: Matches only if all of its children match.
  • Or criterion: Matches only if at least one of its children matches.
  • Group reference: References another group.

Shared properties

These properties are shared by all criteria:

  • [negate]: Negate the criterion.
  • [score]: The score of the criterion. (see Scoring section below).

Biome criterion

The properties center and radius can also be specified on "containers" criteria (and, or), and will be inherited by all descendants, unless explicitely modified.

  • [center]: The center of the criterion (default [0;0]). This is always relative to the parent's value (or the global value if the criterion has no parent).
  • radius: The radius of the area to search the biome/structure in.
  • biomes: A list of biome names (see the Biome Color Table for a list of possible biomes). If one of these biomes is found, the criterion matches.
  • [variants]: If true, all variants of a biome will match their "main" counterpart. For example, a Forest M biome will match ["Forest"].
  • [shape]: The shape of the area. The possible values are : "circle", "square", "circle_nocheck", "square_nocheck".

Structure criterion

  • All the biome criterion properties are usable in a structure criterion.
  • structures: A list of structure names. If one of these structures is found, the criterion matches.
  • [biomes]: If specified, only the structures which are on a biome in this list will match.
  • [cluster]: If specified, search for a cluster of structures of the same type.
    • size: The number of structures in the cluster.
    • [radius]: All structures must be inside a circle of this radius (i.e. the maximum distance between two structures is 2*radius). If not specified, there is no maximum radius.

Shorthand: "cluster": 42 is equivalent to "cluster": { "size": 42 }.

And criterion

  • and: The list of criteria which must be matched. Children criteria with a score don't need to match for the and criterion to match.

Shorthand: [...] is equivalent to { "and": [...] }.

Or criterion

  • or: The criterion will match if at least one of the criteria in this list matches.
  • [min]: If specified, at least min children must match for the criterion to match (1 by default).
  • [minScore]: If specified, the sum of all of the children's score must be at least minScore for the criterion to match (0 by default).

Group reference

  • group: The name of the group to reference. It is illegal for group references to form a cycle, directly or indirectly. If such a cycle exists, an error message will be displayed when launching the search.

Shorthand: "foo" is equivalent to { "group": "foo" }.

Examples

{
  "match":{
    "center": [0,0],
    "radius": "20",
    "biomes": ["Ocean"],
    "variants": "false",
    "shape": "circle"
  }
}

TODO

Scoring

TODO