JediKit
Este módulo proporciona un conjunto de herramientas y recursos compartidos para construir personajes y accesorios en el juego. Ofrece funciones para crear sables de luz, cascos de soldado, cabezas de droide y rifles bláster, así como utilidades para adjuntar accesorios a esquelet…
JediKit
Este módulo proporciona un conjunto de herramientas y recursos compartidos para construir personajes y accesorios en el juego. Ofrece funciones para crear sables de luz, cascos de soldado, cabezas de droide y rifles bláster, así como utilidades para adjuntar accesorios a esqueletos y teñir modelos. También gestiona una lista de combatientes activos para el sistema de combate.
Interface
What this asset declares: the schema it conforms to, what it exposes, and the rendered structured payload.
conforms to
zero/source-extract/v2JediKit — the pieces both sides of this war are built from. One place that knows how a lightsaber, a trooper's helmet, a blaster and a Force shockwave are assembled, so the player's saber and the trooper standing opposite them are made of the same vocabulary.
part(name: string, o: { [string]: any }) →
Build one prop entity: mesh, material, tint, optional collider.
| arg | type | description |
|---|---|---|
| name | string | The entity's name — shown in the editor and used by tools. |
| o | { [string]: any } | mesh / material / tint / tintBlend / position / rotation / scale / collider. |
node(name: string, parent: any) →
A plain empty entity to hang a rig under.
| arg | type | description |
|---|---|---|
| name | string | The entity's name. |
| parent | any | Entity to parent it to, or nil. |
lightsaber(opts: { [string]: any }) →
Assemble a lightsaber: hilt, emitter, blade, glow and a swing pivot. The returned `pivot` is the entity a swing rotates — the blade runs up the pivot's local +Y, so rotating the pivot sweeps the blade through an arc.
| arg | type | description |
|---|---|---|
| opts | { [string]: any } | color = {r,g,b} blade colour; length = blade length in metres. |
trooperHelmet( ) →
A phase-II clone trooper helmet: dome, fin, black T-visor and a breather.
droidHead( ) →
A B1 battle droid's head: a bone-coloured dome with two photo-receptors.
blasterRifle( ) →
A DC-15 blaster rifle: barrel, receiver, scope, stock and grip.
findHumanoid(root: any) →
Find the entity under `root` carrying a Humanoid component.
| arg | type | description |
|---|---|---|
| root | any | The avatar's body entity. |
attachToSocket(body: any, point: string, prop: any) →
Parent `prop` to a named socket on a humanoid (`head`, `righthand`, ...).
| arg | type | description |
|---|---|---|
| body | any | The body entity whose skeleton carries the socket. |
| point | string | Canonical socket name. |
| prop | any | The entity to attach. |
tintBody(root: any, color: { number }, blend: number) →
Tint every skinned mesh under `root` — how one avatar becomes a Jedi in travelling robes or a clone in white plate.
| arg | type | description |
|---|---|---|
| root | any | The avatar's body entity. |
| color | { number } | {r,g,b} to drive the surface toward. |
| blend | number | 0..1 share of the tint. |
paint(e: ?) → void
| arg | type | description |
|---|---|---|
| e | ? |
shockwave(pos: { number }, color: { number }, radius: number) →
An expanding ring of Force energy, gone in under a second.
| arg | type | description |
|---|---|---|
| pos | { number } | World position to centre it on. |
| color | { number } | {r,g,b} of the ring. |
| radius | number | How far it expands, in metres. |
destroyAttached(root: any) → void
Detach every bolt, saber trail and FX hanging off an entity, so a dying character does not leave its weapon in the air.
| arg | type | description |
|---|---|---|
| root | any | Entity whose attached props to clean up. |
spawnBolt(opts: { [string]: any }) →
Fire a blaster bolt as a live projectile entity.
| arg | type | description |
|---|---|---|
| opts | { [string]: any } | origin {x,y,z}; dir {x,y,z} unit aim; owner entity id; damage; friendly bool. |
enlist(side: string, entry: any) → void
Add a combatant to the roster.
| arg | type | description |
|---|---|---|
| side | string | "enemy" or "ally". |
| entry | any | { id = entity id, entity = proxy, hurt = fn(dmg, x, y, z), alive = bool }. |
retire(id: string) → void
Drop a combatant from the roster by entity id.
| arg | type | description |
|---|---|---|
| id | string |
side(side: string) →
Every living combatant on one side.
| arg | type | description |
|---|---|---|
| side | string | "enemy" or "ally". |
nearest(side: string, at: { number }, radius: number) →
The nearest living combatant to a point, within `radius`.
| arg | type | description |
|---|---|---|
| side | string | "enemy" or "ally". |
| at | { number } | {x,y,z} world point. |
| radius | number | Metres. |
Sub-parts
Everything contained inside this part. Assets are composite children (clickable cards). Files are leaf payloads. Expand any row to view its source.
Problems
Everything affecting this asset right now: its own problems, anything wrong inside it, and problems on its direct dependencies.
agent_score is exposed.+ quality × 0.35
+ performance × 0.25
± compat factor
Usability ratings
Did the part work as advertised when consumers tried to drop it in. Separate from upvotes: those are taste; this is "did it function".
Scoped to this part · feeds back into the world's score.