[General]
Description=TDA bone for [Osland]Spooky Boi (Skeleton) v2.0
Type=item
AxisScale=0.78
UseAutoRotAdj=0

; bone define, every bone map to a bone in vmd(pmx) model
; note: some bone may not exist in vmd(pmx) model, that's OK.
[BoneDefine]
; format:
; bonename=parent-name:vmd-bone-name:bone-attr[:ik-setting][:track-setting][:limit-setting][:localaxis-setting]
;  bone-attr: rpitl, r=rotation, p=position, i=ik, t=track, l=limit, a=localaxis
; センター
OPTCENTER=:操作中心:rp
ROOT=OPTCENTER:全ての親:rp
CENTER=ROOT:センター:rp
GROOVE=CENTER:グルーブ:rp
BACK_HIPS=GROOVE:腰:r
;ORG_HIP=BACK_HIPS:MY_HIP:rpt:tp,1,SPINE1
; 体
HIPS=BACK_HIPS:体の重心:rp
SPINE1=HIPS:上半身:r
SPINE2=SPINE1:上半身2:r
SPINE3=SPINE2:上半身3:
NECK=SPINE3:首:r
HEAD=NECK:頭:r
JAWS=HEAD:顎:r
WAIST=HIPS:下半身:rp
; 腕
SHOULDER_P_R=SPINE3:右肩P:r
SHOULDER_R=SHOULDER_P_R:右肩:r
SHOULDER_C_R=SHOULDER_R:右肩C:t:tr,-1,SHOULDER_P_R
CLA_P_R=SPINE3:右锁骨P:rt:tr,0.5,SHOULDER_P_R
CLA_R=CLA_P_R:右锁骨:rt:tr,0.5,SHOULDER_R
UPARM_R=SHOULDER_C_R:右腕:r
UPARM_TWIST_R=UPARM_R:右腕捩:rl:l,0.7941262,-0.6076475,-0.01131865,1,0,0
LOWARM_R=UPARM_TWIST_R:右ひじ:r
LOWARM_TWIST_R=LOWARM_R:右手捩:rl:l,0.7962407,-0.6047074,-0.01815981,1,0,0
HAND_R=LOWARM_TWIST_R:右手首:r
HAND_DUMMY_R=HAND_R:右ダミー:rp
SHOULDER_P_L=SPINE3:左肩P:r
SHOULDER_L=SHOULDER_P_L:左肩:r
SHOULDER_C_L=SHOULDER_L:左肩C:t:tr,-1,SHOULDER_P_L
CLA_P_L=SPINE3:左锁骨P:rt:tr,0.5,SHOULDER_P_L
CLA_L=CLA_P_L:左锁骨:rt:tr,0.5,SHOULDER_L
UPARM_L=SHOULDER_C_L:左腕:r
UPARM_TWIST_L=UPARM_L:左腕捩:rl:l,-0.7941262,-0.6076475,-0.01131865,-1,0,0
LOWARM_L=UPARM_TWIST_L:左ひじ:r
LOWARM_TWIST_L=LOWARM_L:左手捩:rl:l,-0.7962407,-0.6047074,-0.01815981,-1,0,0
HAND_L=LOWARM_TWIST_L:左手首:r
HAND_DUMMY_L=HAND_L:左ダミー:rp
;UPARM_TWIST1_R=UPARM_R:右腕捩補正:t:tr,-0.7,UPARM_TWIST_R
; 足
BACK_HIPS_C_R=WAIST:腰キャンセル右:t:tr,-1,BACK_HIPS
UPLEG_R=BACK_HIPS_C_R:右足:r
LOWLEG_R=UPLEG_R:右ひざ:r
FOOT_R=LOWLEG_R:右足首:r
TOE_R=FOOT_R:右つま先:
BACK_HIPS_C_L=WAIST:腰キャンセル左:t:tr,-1,BACK_HIPS
UPLEG_L=BACK_HIPS_C_L:左足:r
LOWLEG_L=UPLEG_L:左ひざ:r
FOOT_L=LOWLEG_L:左足首:r
TOE_L=FOOT_L:左つま先:
; 指
FIG_THUMB01_R=HAND_R:右親指０:r
FIG_THUMB02_R=FIG_THUMB01_R:右親指１:r
FIG_THUMB03_R=FIG_THUMB02_R:右親指２:r
FIG_INDEX01_R=HAND_R:右人指１:r
FIG_INDEX02_R=FIG_INDEX01_R:右人指２:r
FIG_INDEX03_R=FIG_INDEX02_R:右人指３:r
FIG_MIDDLE01_R=HAND_R:右中指１:r
FIG_MIDDLE02_R=FIG_MIDDLE01_R:右中指２:r
FIG_MIDDLE03_R=FIG_MIDDLE02_R:右中指３:r
FIG_RING01_R=HAND_R:右薬指１:r
FIG_RING02_R=FIG_RING01_R:右薬指２:r
FIG_RING03_R=FIG_RING02_R:右薬指３:r
FIG_LITTLE01_R=HAND_R:右小指１:r
FIG_LITTLE02_R=FIG_LITTLE01_R:右小指２:r
FIG_LITTLE03_R=FIG_LITTLE02_R:右小指３:r
FIG_THUMB01_L=HAND_L:左親指０:r
FIG_THUMB02_L=FIG_THUMB01_L:左親指１:r
FIG_THUMB03_L=FIG_THUMB02_L:左親指２:r
FIG_INDEX01_L=HAND_L:左人指１:r
FIG_INDEX02_L=FIG_INDEX01_L:左人指２:r
FIG_INDEX03_L=FIG_INDEX02_L:左人指３:r
FIG_MIDDLE01_L=HAND_L:左中指１:r
FIG_MIDDLE02_L=FIG_MIDDLE01_L:左中指２:r
FIG_MIDDLE03_L=FIG_MIDDLE02_L:左中指３:r
FIG_RING01_L=HAND_L:左薬指１:r
FIG_RING02_L=FIG_RING01_L:左薬指２:r
FIG_RING03_L=FIG_RING02_L:左薬指３:r
FIG_LITTLE01_L=HAND_L:左小指１:r
FIG_LITTLE02_L=FIG_LITTLE01_L:左小指２:r
FIG_LITTLE03_L=FIG_LITTLE02_L:左小指３:r
; IK
IK_ROOT_R=ROOT:右足IK親:rp
IK_FOOT_R=IK_ROOT_R:右足ＩＫ:rpi:i,FOOT_R,LOWLEG_R,UPLEG_R
IK_TOE_R=IK_FOOT_R:右つま先ＩＫ:rpi:i,TOE_R,FOOT_R
IK_ROOT_L=ROOT:左足IK親:rp
IK_FOOT_L=IK_ROOT_L:左足ＩＫ:rpi:i,FOOT_L,LOWLEG_L,UPLEG_L
IK_TOE_L=IK_FOOT_L:左つま先ＩＫ:rpi:i,TOE_L,FOOT_L
; 足D
UPLEG_D_R=BACK_HIPS_C_R:右足D:rt:tr,1,UPLEG_R
LOWLEG_D_R=UPLEG_D_R:右ひざD:rt:tr,1,LOWLEG_R
FOOT_D_R=LOWLEG_D_R:右足首D:rt:tr,1,FOOT_R
TOE_EX0_R=FOOT_D_R:右足先EX:r
TOE_EX1_R=FOOT_D_R:右足先EX1:rt:tr,1,TOE_EX0_R
TOE_EX2_R=FOOT_D_R:右足先EX2:rt:tr,1,TOE_EX0_R
TOE_EX3_R=FOOT_D_R:右足先EX3:rt:tr,1,TOE_EX0_R
TOE_EX4_R=FOOT_D_R:右足先EX4:rt:tr,1,TOE_EX0_R
UPLEG_D_L=BACK_HIPS_C_L:左足D:rt:tr,1,UPLEG_L
LOWLEG_D_L=UPLEG_D_L:左ひざD:rt:tr,1,LOWLEG_L
FOOT_D_L=LOWLEG_D_L:左足首D:rt:tr,1,FOOT_L
TOE_EX0_L=FOOT_D_L:左足先EX:r
TOE_EX1_L=FOOT_D_L:左足先EX1:rt:tr,1,TOE_EX0_L
TOE_EX2_L=FOOT_D_L:左足先EX2:rt:tr,1,TOE_EX0_L
TOE_EX3_L=FOOT_D_L:左足先EX3:rt:tr,1,TOE_EX0_L
TOE_EX4_L=FOOT_D_L:左足先EX4:rt:tr,1,TOE_EX0_L

; bone position, every bone must have a position setting
[BonePosition]
; format:
; bonename=pos-type:pos-value
;  while pos-value diff from pos-type, when pos-type = 
;   b = ref to bone, pos-value is bone-in-char
;   bbs = ref to point between 2 bones, pos-value is first-bone:second-bone:scale-from-first
;   bo = ref to bone and add offset, pos-value is offset (x,y,z)
;   br = ref to bone and reset some axis value, pos-value is reset value (x,y,z), if value of some axis is NAN, that axis left no change
; センター
OPTCENTER=b:Spooky Boi (Skeleton)
ROOT=b:Spooky Boi (Skeleton)
CENTER=bbs:Spooky Boi (Skeleton):hip:0.6
GROOVE=bbs:Spooky Boi (Skeleton):hip:0.61
BACK_HIPS=bo:hip:0,0,-1
;ORG_HIP=b:hip
; 体
HIPS=b:hip
SPINE1=b:l2
SPINE2=b:t12
SPINE3=b:t8
NECK=b:c7
HEAD=b:c1
JAWS=b:jaw
;WAIST=b:l4
WAIST=b:hip
; 腕
SHOULDER_P_R=b:rCollar
SHOULDER_R=b:rCollar
SHOULDER_C_R=b:rShldr
CLA_P_R=b:rCla
CLA_R=b:rCla
UPARM_R=b:rShldr
UPARM_TWIST_R=bbs:rShldr:rForeArm:0.5
LOWARM_R=b:rForeArm
LOWARM_TWIST_R=bbs:rForeArm:rHand:0.5
HAND_R=b:rHand
HAND_DUMMY_R=bo:rHand:0.3,-0.13,0
SHOULDER_P_L=b:lCollar
SHOULDER_L=b:lCollar
SHOULDER_C_L=b:lShldr
CLA_P_L=b:lCla
CLA_L=b:lCla
UPARM_L=b:lShldr
UPARM_TWIST_L=bbs:lShldr:lForeArm:0.5
LOWARM_L=b:lForeArm
LOWARM_TWIST_L=bbs:lForeArm:lHand:0.5
HAND_L=b:lHand
HAND_DUMMY_L=bo:lHand:-0.3,-0.13,0
; 足
BACK_HIPS_C_R=b:rThigh
UPLEG_R=b:rThigh
LOWLEG_R=b:rShin
FOOT_R=b:rFoot
TOE_R=b:rIndexToe1
BACK_HIPS_C_L=b:lThigh
UPLEG_L=b:lThigh
LOWLEG_L=b:lShin
FOOT_L=b:lFoot
TOE_L=b:lIndexToe1
; 指
FIG_THUMB01_R=b:rThumb1
FIG_THUMB02_R=b:rThumb2
FIG_THUMB03_R=b:rThumb3
FIG_INDEX01_R=b:rIndex1
FIG_INDEX02_R=b:rIndex2
FIG_INDEX03_R=b:rIndex3
FIG_MIDDLE01_R=b:rMid1
FIG_MIDDLE02_R=b:rMid2
FIG_MIDDLE03_R=b:rMid3
FIG_RING01_R=b:rRing1
FIG_RING02_R=b:rRing2
FIG_RING03_R=b:rRing2
FIG_LITTLE01_R=b:rPinky1
FIG_LITTLE02_R=b:rPinky2
FIG_LITTLE03_R=b:rPinky3
FIG_THUMB01_L=b:lThumb1
FIG_THUMB02_L=b:lThumb2
FIG_THUMB03_L=b:lThumb3
FIG_INDEX01_L=b:lIndex1
FIG_INDEX02_L=b:lIndex2
FIG_INDEX03_L=b:lIndex3
FIG_MIDDLE01_L=b:lMid1
FIG_MIDDLE02_L=b:lMid2
FIG_MIDDLE03_L=b:lMid3
FIG_RING01_L=b:lRing1
FIG_RING02_L=b:lRing2
FIG_RING03_L=b:lRing3
FIG_LITTLE01_L=b:lPinky1
FIG_LITTLE02_L=b:lPinky2
FIG_LITTLE03_L=b:lPinky3
; IK
IK_ROOT_R=bo:rFoot:0,-0.8,0
IK_FOOT_R=b:rFoot
IK_TOE_R=bbs:rFoot:rIndexToe1:1.1
IK_ROOT_L=bo:lFoot:0,-0.8,0
IK_FOOT_L=b:lFoot
IK_TOE_L=bbs:lFoot:lIndexToe1:1.1
; 足D
UPLEG_D_R=b:rThigh
LOWLEG_D_R=b:rShin
FOOT_D_R=b:rFoot
TOE_EX0_R=b:rBigToe1
TOE_EX1_R=b:rIndexToe1
TOE_EX2_R=b:rMidToe1
TOE_EX3_R=b:rRingToe1
TOE_EX4_R=b:rPinkyToe1
UPLEG_D_L=b:lThigh
LOWLEG_D_L=b:lShin
FOOT_D_L=b:lFoot
TOE_EX0_L=b:lBigToe1
TOE_EX1_L=b:lIndexToe1
TOE_EX2_L=b:lMidToe1
TOE_EX3_L=b:lRingToe1
TOE_EX4_L=b:lPinkyToe1


; bone weight, link vmd bone to actual weight bone, not every bone link to a weight bone
[BoneWeight]
; format:
; bonename=actual-bone-in-char
; センター&体
OPTCENTER=Spooky Boi (Skeleton)
;ORG_HIP=hip
;HIPS=hip
SPINE1=l2
SPINE2=t12
SPINE3=t8
NECK=c7
HEAD=c1
JAWS=jaw
WAIST=hip
;WAIST=l4
; 腕
SHOULDER_R=rCollar
CLA_R=rCla
UPARM_R=rShldr
LOWARM_R=rForeArm
HAND_R=rHand
SHOULDER_L=lCollar
CLA_L=lCla
UPARM_L=lShldr
LOWARM_L=lForeArm
HAND_L=lHand
;UPARM_TWIST1_R=cf_J_ArmLow01_s_R
; 足
UPLEG_D_R=rThigh
LOWLEG_D_R=rShin
FOOT_D_R=rFoot
TOE_EX0_R=rBigToe1
TOE_EX1_R=rIndexToe1
TOE_EX2_R=rMidToe1
TOE_EX3_R=rRingToe1
TOE_EX4_R=rPinkyToe1
UPLEG_D_L=lThigh
LOWLEG_D_L=lShin
FOOT_D_L=lFoot
TOE_EX0_L=lBigToe1
TOE_EX1_L=lIndexToe1
TOE_EX2_L=lMidToe1
TOE_EX3_L=lRingToe1
TOE_EX4_L=lPinkyToe1

; 指
FIG_THUMB01_R=rThumb1
FIG_THUMB02_R=rThumb2
FIG_THUMB03_R=rThumb3
FIG_INDEX01_R=rIndex1
FIG_INDEX02_R=rIndex2
FIG_INDEX03_R=rIndex3
FIG_MIDDLE01_R=rMid1
FIG_MIDDLE02_R=rMid2
FIG_MIDDLE03_R=rMid3
FIG_RING01_R=rRing1
FIG_RING02_R=rRing2
FIG_RING03_R=rRing2
FIG_LITTLE01_R=rPinky1
FIG_LITTLE02_R=rPinky2
FIG_LITTLE03_R=rPinky3
FIG_THUMB01_L=lThumb1
FIG_THUMB02_L=lThumb2
FIG_THUMB03_L=lThumb3
FIG_INDEX01_L=lIndex1
FIG_INDEX02_L=lIndex2
FIG_INDEX03_L=lIndex3
FIG_MIDDLE01_L=lMid1
FIG_MIDDLE02_L=lMid2
FIG_MIDDLE03_L=lMid3
FIG_RING01_L=lRing1
FIG_RING02_L=lRing2
FIG_RING03_L=lRing3
FIG_LITTLE01_L=lPinky1
FIG_LITTLE02_L=lPinky2
FIG_LITTLE03_L=lPinky3

; bone ik setting
[BoneIKSetOverview]
IK_SET_NUMBER=2

[BoneIKSet_1]
NAME=FOOT IK
ENABLE=1
IKBONE=IK_FOOT_R,IK_FOOT_L
;SOLVER=CCDIKSolver
;ITERATIONS=40
CONTROL_WEIGHT=1.98967528
MIN_DELTA=0.0001
LAST_FRAME_WEIGHT=0.9
IK_ROTATION_WEIGHT=0
;MIN_KNEE_ROT=5
USE_LEG=1
SOLVE_METHOD=SolveLeg2

;SOLVER=MMDIKSolver
;ITERATIONS=40
;STEP_ANGLE=114.5916
LIMITS=(((0.5, 180), (0, 0), (0, 0)), None)

SOLVER=MMDIKSolverLeg
ITERATIONS=6
STEP_ANGLE=114.5916
MIN_KNEE_ROT=1

[BoneIKSet_2]
NAME=TOE IK
ENABLE=1
IKBONE=IK_TOE_R,IK_TOE_L
;SOLVER=CCDIKSolver
;CONTROL_WEIGHT=4.18879032
;ITERATIONS=3
;LAST_FRAME_WEIGHT=0.9
;SOLVE_METHOD=Solve
SOLVER=MMDIKSolverNoLimit
ITERATIONS=3
STEP_ANGLE=229.1831

[BoneTwistDisperse]
ARMTWIST_R=ArmTwist:uparm_twist_r:uparm_r:0.6
ARMTWIST_L=ArmTwist:uparm_twist_l:uparm_l:0.6
HANDTWIST_R=HandTwist:lowarm_twist_r:lowarm_r:0.4
HANDTWIST_L=HandTwist:lowarm_twist_l:lowarm_l:0.4

; bone gizmos setting, not every bone need gizmos
[BoneGizmos]
; format:
; bonename=base-style:color:size:parent-bone
; 体
OPTCENTER=t:FF8000:0.2:
ROOT=t:FFFF00:0.15:
BACK_HIPS=c:00ffff:0.12:
HIPS=c:00ffff:0.12:BACK_HIPS
SPINE1=c:00ffff:0.12:
SPINE2=c:00ffff:0.12:SPINE1
NECK=c:00ffff:0.12:SPINE2
HEAD=c:00ffff:0.12:NECK
WAIST=c:00ffff:0.12:
; 腕
SHOULDER_R=c:00ffff:0.12:SPINE2
UPARM_R=c:00ffff:0.12:SHOULDER_R
LOWARM_R=c:00ffff:0.12:UPARM_R
HAND_R=c:00ffff:0.12:LOWARM_R
SHOULDER_L=c:00ffff:0.12:SPINE2
UPARM_L=c:00ffff:0.12:SHOULDER_L
LOWARM_L=c:00ffff:0.12:UPARM_L
HAND_L=c:00ffff:0.12:LOWARM_L
; 足
UPLEG_R=c:00ffff:0.12:WAIST
LOWLEG_R=c:00ffff:0.12:UPLEG_R
FOOT_R=c:00ffff:0.12:LOWLEG_R
TOE_R=c:00ffff:0.12:FOOT_R
UPLEG_L=c:00ffff:0.12:WAIST
LOWLEG_L=c:00ffff:0.12:UPLEG_L
FOOT_L=c:00ffff:0.12:LOWLEG_L
TOE_L=c:00ffff:0.12:FOOT_L
; 指
FIG_THUMB01_R=c:00ff80:0.05:HAND_R
FIG_THUMB02_R=c:00ff80:0.05:FIG_THUMB01_R
FIG_THUMB03_R=c:00ff80:0.05:FIG_THUMB02_R
FIG_INDEX01_R=c:00ff80:0.05:HAND_R
FIG_INDEX02_R=c:00ff80:0.05:FIG_INDEX01_R
FIG_INDEX03_R=c:00ff80:0.05:FIG_INDEX02_R
FIG_MIDDLE01_R=c:00ff80:0.05:HAND_R
FIG_MIDDLE02_R=c:00ff80:0.05:FIG_MIDDLE01_R
FIG_MIDDLE03_R=c:00ff80:0.05:FIG_MIDDLE02_R
FIG_RING01_R=c:00ff80:0.05:HAND_R
FIG_RING02_R=c:00ff80:0.05:FIG_RING01_R
FIG_RING03_R=c:00ff80:0.05:FIG_RING02_R
FIG_LITTLE01_R=c:00ff80:0.05:HAND_R
FIG_LITTLE02_R=c:00ff80:0.05:FIG_LITTLE01_R
FIG_LITTLE03_R=c:00ff80:0.05:FIG_LITTLE02_R
FIG_THUMB01_L=c:00ff80:0.05:HAND_L
FIG_THUMB02_L=c:00ff80:0.05:FIG_THUMB01_L
FIG_THUMB03_L=c:00ff80:0.05:FIG_THUMB02_L
FIG_INDEX01_L=c:00ff80:0.05:HAND_L
FIG_INDEX02_L=c:00ff80:0.05:FIG_INDEX01_L
FIG_INDEX03_L=c:00ff80:0.05:FIG_INDEX02_L
FIG_MIDDLE01_L=c:00ff80:0.05:HAND_L
FIG_MIDDLE02_L=c:00ff80:0.05:FIG_MIDDLE01_L
FIG_MIDDLE03_L=c:00ff80:0.05:FIG_MIDDLE02_L
FIG_RING01_L=c:00ff80:0.05:HAND_L
FIG_RING02_L=c:00ff80:0.05:FIG_RING01_L
FIG_RING03_L=c:00ff80:0.05:FIG_RING02_L
FIG_LITTLE01_L=c:00ff80:0.05:HAND_L
FIG_LITTLE02_L=c:00ff80:0.05:FIG_LITTLE01_L
FIG_LITTLE03_L=c:00ff80:0.05:FIG_LITTLE02_L
; IK
IK_ROOT_R=r:8000ff:0.2:
IK_FOOT_R=r:ff00ff:0.15:IK_ROOT_R
IK_TOE_R=r:ff00ff:0.15:IK_FOOT_R
IK_ROOT_L=r:8000ff:0.2:
IK_FOOT_L=r:ff00ff:0.15:IK_ROOT_L
IK_TOE_L=r:ff00ff:0.15:IK_FOOT_L

; bone rotate axis adjust setting, not every bone need this setting
[BoneRotAxisAdjust]
SHOULDER_R=r,0,0,-10
SHOULDER_L=r,0,0,10
UPARM_R=r,0,0,-32
UPARM_L=r,0,0,32
HAND_DUMMY_R=r,0,0,42
HAND_DUMMY_L=r,0,0,-42

; morph define
; note: morph_detail_name:morph_type[:morph_enable]
;  morph_type can be: eyebrow/eye/mouth/bone
;  morph_enable: set to false or 0 to disable it, default is enabled
[MorphDefine]
; 口
mouth_a=あ:bone
;mouth_i=い:mouth
;mouth_u=う:mouth
;mouth_e=え:mouth
;mouth_o=お:mouth
;mouth_wa=わ:mouth

; 口
[Morph_mouth_a]
JAWS=r:(-10,0,0)
