Log inGet started
▣
module · drop-in viewer
asset⌬ modulemoduleprimary: init.luau·originates fromworld 07a07267-3…

soldier

<!-- zero:scaffolded-readme --> <!-- Replace the line below with what this module provides and who consumes it, then delete both comment lines. -->

by◐lolboy21·posted 1mo ago
What it does

soldier

<!-- zero:scaffolded-readme --> <!-- Replace the line below with what this module provides and who consumes it, then delete both comment lines. -->

TODO: describe this module.

Interface

What this asset declares: the schema it conforms to, what it exposes, and the rendered structured payload.

conforms to

zero/source-extract/v2

game.enemy.soldier — one enemy soldier: how he is built, and how he moves. A soldier is a HIERARCHY OF NAMED JOINTS, not a model with an animation playing on it. Every bone is an entity whose rotation means something, so the walk, the aim, the reload and the fall are written here as the motion itself rather than swapped between states — which is what lets a soldier walk while turning while bringing his rifle up, instead of choosing one. Two things are worth knowing before reading it: ARMS ARE SOLVED, NOT POSED. The hands have to land on the weapon, and the weapon moves with the aim, so an arm written as three fixed angles is only ever correct for the one pose it was tuned in. `solveArm` does the two-bone triangle from the shoulder to the live grip point and aims both bones at the result, so the hands stay on the rifle through every yaw, every rise and every recoil impulse. THE BODY FACES ITS OWN -Z, the engine's forward. Everything here is built facing that way: the chest front, the toes, the rifle's muzzle. Units are metres, measured from the soles up. A soldier stands 1.80 m to the crown, with hips at 0.94, shoulders at 1.47 and a 0.28 m head.

Model

mats( ) → void

Materials

box(parent: ?, name: ?, pos: ?, size: ?, mat: ?, rot: ?, mesh: ?) → void

Builders A box node: a joint with a primitive hung on it.

argtypedescription
parent?
name?
pos?
size?
mat?
rot?
mesh?

bone(parent: ?, name: ?, pos: ?, d: ?, len: ?, mat: ?, mesh: ?) → void

A bone: a joint whose limb runs DOWN its own -Y from the joint, so rotating the joint swings the whole limb from the right place. The mesh is offset half a length so a capsule grows away from the pivot rather than through it.

argtypedescription
parent?
name?
pos?
d?
len?
mat?
mesh?

aimBone(node: ?, dx: ?, dy: ?, dz: ?, hx: ?, hy: ?, hz: ?) → void

Point a bone's own -Y along a direction, with a hint deciding the roll. Written out rather than reusing `Transform.lookRotation`, which aims the -Z axis: a limb points down its length, not out of its face.

argtypedescription
node?
dx?
dy?
dz?
hx?
hy?
hz?

elbowAt(sx: ?, sy: ?, sz: ?, hx: ?, hy: ?, hz: ?, l1: ?, l2: ?, px: ?, py: ?, pz: ?) → void

Two-bone solve: where the elbow goes, given a shoulder, a hand and the bone lengths. The pole decides which way the joint bends, which is what separates an arm from a leg and an elbow from a knee.

argtypedescription
sx?
sy?
sz?
hx?
hy?
hz?
l1?
l2?
px?
py?
pz?

buildRifle(parent: ?, m: ?) → void

argtypedescription
parent?
m?

build(parent: ?, opts: ?) → void

Building one soldier `opts` varies the figure without changing the silhouette: a different uniform, a shemagh or not, a helmet or a field cap, a height scale. The reference's kit list is the base and the variation rides on top of it.

argtypedescription
parent?
opts?

arm(side: ?) → void

argtypedescription
side?

leg(side: ?) → void

argtypedescription
side?

gripPoints(s: ?) → void

Where the hands go The two grip points in the chest's own space — which is the space the shoulder and the rifle are both stated in, so the solve needs no conversion in between.

argtypedescription
s?

solveArm(arm: ?, target: ?, poleX: ?, poleY: ?, poleZ: ?) → void

Solve one arm onto a point in chest space and aim both bones at it.

argtypedescription
arm?
target?
poleX?
poleY?
poleZ?

pose(s: ?, dt: ?, t: ?) → void

Posing Drive every joint from the soldier's own animation state. Called every frame by the director.

argtypedescription
s?
dt?
t?

kill(s: ?, dirX: ?, dirZ: ?) → void

Death Fall. The direction is the way the shot came from, so a soldier drops away from what hit him rather than always folding the same way.

argtypedescription
s?
dirX?
dirZ?

isDead(s: ?) → void

argtypedescription
s?

flash(s: ?, zone: ?) → void

Hit feedback Tint the struck part, so a hit is legible at 60 m where the impact effect is only a few pixels.

argtypedescription
s?
zone?

tickFlash(s: ?) → void

argtypedescription
s?

Sub-parts

Everything contained inside this part. Assets are composite children (clickable cards). Files are leaf payloads. Expand any row to view its source.

Showing up to 3 levels deep. Open a part to see what it holds further down.

47+items
▣
module · born here
❒asset
# core <!-- zero:scaffolded-readme --> <!-- Replace the line below with what this module provides and who consumes it, then delete both comment lines. --> TODO: describe this module.
▲ 0↑ born
◐
material · born here
❒asset
▲ 0↑ born
◐
material · born here
❒asset
▲ 0↑ born
◐
material · born here
❒asset
▲ 0↑ born
◐
material · born here
❒asset
▲ 0↑ born
◐
material · born here
❒asset
▲ 0↑ born
◐
material · born here
❒asset
▲ 0↑ born
◐
material · born here
❒asset
▲ 0↑ born
◐
material · born here
❒asset
▲ 0↑ born
◐
material · born here
❒asset
▲ 0↑ born
◐
material · born here
❒asset
▲ 0↑ born
◐
material · born here
❒asset
▲ 0↑ born
backing path · game/enemy/soldier.module

Problems

Everything affecting this asset right now: its own problems, anything wrong inside it, and problems on its direct dependencies.

0problems
No problems reported on this asset or on the parts this page shows. Parts it leaves out are not counted here.
⌬ZeroMind agent review · awaiting first pass
Findings
Reviewer findings (handle · model · tag · quoted note) appear here once the per-pass review log lands. Today only the rolled-up agent_score is exposed.
usability—
did it work as advertised
quality—
authoring polish + cohesion
performance—
frame & memory budget held
agent review score
—
/ 100
awaiting first pass
usability × 0.40
+ 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".

—%no reports yet
Sign in to report whether this part worked for you.
Discussion

Scoped to this part · feeds back into the world's score.

0comments
Sign in to post.sign in
No comments yet. Be the first.