I've recently replied to someone with a step-by-step analysis of how sliders are put together. Gonna document it here.
We're looking at the Calf Bulk slider. It's a good example, because it contains both scaling and translation.
$CME_CalfBulk, 1385, 202, Dummy, 0.1, NPC L Calf [LClf], x, NPC R Calf [RClf], x, NPC R Foot [Rft ], (1/x), NPC L Foot [Lft ], (1/x), +CME L Knee [LKne], x, 0, 0, -24, +CME R Knee [RKne], x, 0, 0, -24
- $CME_CalfBulk is the slider name, it's replaced ingame by the name defined in the language file
- , is a separator. Get used to seeing them.
- 1385 is the slider's unique ID
- ,
- 202 is the slider type (202 is scale and/or translation) 1
- ,
- Dummy, 0.1 - Dummy is a special imaginary node. It exists to ensure that even if one of the nodes/bones that follow don't exist, the slider will still show up ingame and operate on any bones/nodes that do exist. It's also required to translate more than one node in a line. It also conveniently provides somewhere to define x. Speaking of x...
- The 0.1 following the first node in a slider (in this case Dummy) defines x for that slider, becoming the slider's default maximum/minimal amounts. In this case the slider's minimum and maximum are 0.9/1.1 (because sliders are 1 + x), displayed ingame as -0.1/0.1.
- ,
- NPC L Calf [LClf], x - the bone name, followed by the slider maximum (defined here if not using Dummy) - this is intended to scale, you can tell because there's only one "number" (in this case, x)
- ,
- NPC R Foot [Rft ], (1/x) - same as above, but (1/x) effectively inverts the change, keeping the bone the same size
- ,
- + in front of a node (always a node, bones are immutable because animations directly translate/rotate them) appears to enter it into a small array. Needed for translating nodes if the slider type is 202.
- +CME L Knee [LKne], x, 0, 0, -24 - "x, 0, 0, -24" is "slidermaximum, X, Y, Z" respectively. As you can see, it uses the slider maximum set by Dummy (x=0.1), does nothing on the X and Y axis, but moves the node by (x*-24) for each step of the slider.
Based on what we know from the above, the Calf Bulk slider at "maximum" will:
Scale the NPC L/R Calf bones to 1.1
Scale the NPC L/R Foot bones to 0.9 to keep their size constant
Move the CME L/R Knee nodes by -2.4
*1 There are several slidertypes, however, the most commonly used are 1, 200, 202 and 203
- 1 switches between models (e.g. lip, nose, eye shapes)
- 101 is also in the ini and appears to do the same as 1
- 200 fades between morphs (e.g. eye size doesn't directly change the size of the eyes, it fades between two morphs of minimal/maximal sizes)
- 202 is scaling and/or translation (translation supported only if the slider uses a Dummy)
- 203 is translation only, and seems to be extremely limited in what it can do (to the point where it's better to only use 202 even when 203 should be the obvious choice)
Slider minimums/maximums are scaled according to the setting in \meshes\CharacterMakingExtender\sliderscale.ini. Note that this is (probably) an integer, not a float, so don't be sticking non-whole numbers in there and expecting them to work right.
(though if you do and something exciting happens, do be sure to post a reply)
0 comments