Log inGet started
World

Builtin Library

Branchmain
Branchesmainpublish
Commitdd348ac6c3

README.md

procgen.search

Searches the procedural-graph library: every .procGraph asset this engine can see (asset.list("procGraph")), the ones the world authored and the ones it ships. Ask it before building something from nothing: a graph that already makes what you need is two calls away.

  • query is free text, matched case-insensitively against each graph's name, its identity, the description its .metadata carries and its tags. Each word of three letters or more counts on its own, a graph holding at least half of them is found, and the whole query found as written counts again, so the results come best first (score).
  • tag keeps the graphs carrying that tag; category the graphs whose .metadata names that category.

Every filter is optional: procgen.search() with none lists every .procGraph asset, and a library holding none answers an empty list. procgen.find searches by what a graph produces instead.

tools.use("procgen", "search", { query = "pebbles" })

Part of procgen.toolbox, called as tools.use("procgen", "search", ...) (zero procgen search in the engine shell). Returns { results, count }, each result { name, id, description, tags, path, score }.