d13forme / All xStarbound Lua Docs.md

0 likes
0 forks
1 files
Last active 1762902765

Armour/cosmetic item instance values

The following non-vanilla armour/cosmetic item instance values are supported by xStarbound. All are quietly ignored without errors by clients that don't support them, and in all cases, values of the wrong type are quietly ignored, ensuring full backwards compatibility with stock Starbound. Except as noted below, only the viewer needs xClient to see the effects of the parameters below — the wearer can use any other client, which can come in handy for certain cases!

  • humanoidConfig: [xClient and OpenStarbound.] Optional JSON object (key-value map) that contains (mostly) cosmetic humanoid config overrides. For the most part, overrides specified in this object are identical to those specified in $assets/humanoid.config and in "humanoidOverrides" in your species or image path's .species file, but some bear special mention. Aside from a few exceptions mentioned below, a normal non-nulling JSON merge is performed to merge the overrides into the base humanoid configuration for the player or NPC's species or image path. [Also supported by OpenStarbound.]

    • "movementParameters": If "movementParameters" overrides are present, these overrides, while having non-cosmetic in-game effects, are respected and applied by xStarbound and OpenStarbound, but are overridden by Lua scripts that modify or control movement parameters. Movement parameter overrides also show up in mcontroller.parameters (added to actor movement controller bindings on both xStarbound and OpenStarbound). Like other "humanoidConfig" overrides, overridden movement parameters are only applied if the armour item is not visually hidden.

    • "identity": [xClient only, but renders on all clients if the wearer is on xClient using "broadcast".] Optional humanoid identity overrides. All five exceptions to the JSON merge rule exist here: The "bodyDirectives", "emoteDirectives", "hairDirectives", "facialHairDirectives" and "facialMaskDirectives" keys (or «slots»). Any directive «slot» whose string contains any <base> tags undergoes special cumulative tag merging as described under <base>'s entry in Cosmetic replacement tags below. There is one new optional "identity" key — "broadcast". If this is set to true after all merges, the identity overrides are «broadcast» in a way that makes them visible to all clients, including stock clients; otherwise, only xClient clients and xServer servers can see the overrides. Overrides affect the result of world.entityPortrait on clients and servers that are allowed to see them, and are always visible in team bar portraits due to how they're networked. Any "gender" overrides also affect which gender's armour sprites are used on clients that are allowed to see them.

      Tip: If using xStarbound's "nudehuman" and "undyhuman" image paths, consider leaving "broadcast" off to avoid having an invisible body (and logging errors) on non-xClient clients (and consider avoiding team invites to avoid harmless, but annoying logged errors from your networked portrait).

d13forme / WA CDX Usage

0 likes
0 forks
1 files
Last active 1753336844
Newer Older