From 742705839d60b1e6ba18082029870f28b5108c66 Mon Sep 17 00:00:00 2001 From: The_miro Date: Mon, 24 Aug 2026 15:12:58 +0200 Subject: [PATCH] Gems that stay on the limb they were cut into MIAPI draws a module's model in the pass its own origin names, and positions it from the entry of the transform stack filed under that same name - a model with no origin is drawn only for the inventory icon, from the entry a transform lands in when it names none. Armory's gemstone names no origin, so it was never drawn on worn armour by any route, and a slot transform aimed at the body reached neither the limb nor the icon. So the gems are ours now: one per limb, tagged so a left pauldron gem cannot go in a knee and be drawn on the wrong arm, and an Apothic case beside each on the same model and placement. The cases keep counting one Apotheosis socket apiece - ApothicSockets already listed these module ids, so the Java is unchanged and two armed cases still make two sockets on the chestplate. Each carries two model entries, because one transform cannot aim both places: a limb entry drawn under the part's animated pose, so it follows the walk cycle, and an origin-less entry with its own offset for the icon. The limb placements were solved rather than tried - the target taken in body space, Armory's limb chain inverted, the result decomposed - and land on the pauldron face and the knee to the pixel. The icon offsets sit on the pauldron boss and the knee band of each of the four sprites. The sockets themselves are drawn here too, under the limb origin, so there is a setting for the stone to sit in. Their textures are unwrap templates for now and want painting. The Apothic case wears the gemstone's model rather than its own art, its materials unchanged. Co-Authored-By: Claude Opus 5 --- .../assets/cmmodular/lang/en_us.json | 8 ++ .../armor/model/arm_left/socket/default.json | 91 ++++++++++++++++++ .../armor/model/arm_right/socket/default.json | 91 ++++++++++++++++++ .../armor/model/leg_left/socket/default.json | 82 ++++++++++++++++ .../armor/model/leg_right/socket/default.json | 82 ++++++++++++++++ .../textures/equipment/arm_left_socket.png | Bin 0 -> 141 bytes .../textures/equipment/arm_right_socket.png | Bin 0 -> 141 bytes .../textures/equipment/leg_left_socket.png | Bin 0 -> 126 bytes .../textures/equipment/leg_right_socket.png | Bin 0 -> 126 bytes .../miapi/modules/gem/apothic_case.json | 4 +- .../miapi/modules/gem/limb/case_arm_left.json | 47 +++++++++ .../modules/gem/limb/case_arm_right.json | 47 +++++++++ .../miapi/modules/gem/limb/case_leg_left.json | 47 +++++++++ .../modules/gem/limb/case_leg_right.json | 47 +++++++++ .../miapi/modules/armor/socket/arm_left.json | 22 ++++- .../miapi/modules/armor/socket/arm_right.json | 22 ++++- .../miapi/modules/armor/socket/leg_left.json | 22 ++++- .../miapi/modules/armor/socket/leg_right.json | 22 ++++- .../miapi/modules/gem/limb/gem_arm_left.json | 48 +++++++++ .../miapi/modules/gem/limb/gem_arm_right.json | 48 +++++++++ .../miapi/modules/gem/limb/gem_leg_left.json | 48 +++++++++ .../miapi/modules/gem/limb/gem_leg_right.json | 48 +++++++++ 22 files changed, 804 insertions(+), 22 deletions(-) create mode 100644 src/main/resources/assets/cmmodular/models/item/armor/model/arm_left/socket/default.json create mode 100644 src/main/resources/assets/cmmodular/models/item/armor/model/arm_right/socket/default.json create mode 100644 src/main/resources/assets/cmmodular/models/item/armor/model/leg_left/socket/default.json create mode 100644 src/main/resources/assets/cmmodular/models/item/armor/model/leg_right/socket/default.json create mode 100644 src/main/resources/assets/cmmodular/textures/equipment/arm_left_socket.png create mode 100644 src/main/resources/assets/cmmodular/textures/equipment/arm_right_socket.png create mode 100644 src/main/resources/assets/cmmodular/textures/equipment/leg_left_socket.png create mode 100644 src/main/resources/assets/cmmodular/textures/equipment/leg_right_socket.png create mode 100644 src/main/resources/packs/apotheosis/data/cmmodular/miapi/modules/gem/limb/case_arm_left.json create mode 100644 src/main/resources/packs/apotheosis/data/cmmodular/miapi/modules/gem/limb/case_arm_right.json create mode 100644 src/main/resources/packs/apotheosis/data/cmmodular/miapi/modules/gem/limb/case_leg_left.json create mode 100644 src/main/resources/packs/apotheosis/data/cmmodular/miapi/modules/gem/limb/case_leg_right.json create mode 100644 src/main/resources/packs/armory/data/cmmodular/miapi/modules/gem/limb/gem_arm_left.json create mode 100644 src/main/resources/packs/armory/data/cmmodular/miapi/modules/gem/limb/gem_arm_right.json create mode 100644 src/main/resources/packs/armory/data/cmmodular/miapi/modules/gem/limb/gem_leg_left.json create mode 100644 src/main/resources/packs/armory/data/cmmodular/miapi/modules/gem/limb/gem_leg_right.json diff --git a/src/main/resources/assets/cmmodular/lang/en_us.json b/src/main/resources/assets/cmmodular/lang/en_us.json index d020a47..5f5fad3 100644 --- a/src/main/resources/assets/cmmodular/lang/en_us.json +++ b/src/main/resources/assets/cmmodular/lang/en_us.json @@ -25,6 +25,14 @@ "miapi.module.cmmodular.armor.socket.leg_right.name": "%s Heavy Socket Right Pants", "miapi.module.cmmodular.armor.socket.leg_right.description": "Heavy Pants with a Gemstone set into the Knee", "miapi.module.cmmodular.gem.apothic_case.name": "Apothic Gem Case", + "miapi.module.cmmodular.gem.limb.gem_arm_left.name": "%s Left Pauldron Gemstone", + "miapi.module.cmmodular.gem.limb.case_arm_left.name": "Left Pauldron Apothic Gem Case", + "miapi.module.cmmodular.gem.limb.gem_arm_right.name": "%s Right Pauldron Gemstone", + "miapi.module.cmmodular.gem.limb.case_arm_right.name": "Right Pauldron Apothic Gem Case", + "miapi.module.cmmodular.gem.limb.gem_leg_left.name": "%s Left Knee Gemstone", + "miapi.module.cmmodular.gem.limb.case_leg_left.name": "Left Knee Apothic Gem Case", + "miapi.module.cmmodular.gem.limb.gem_leg_right.name": "%s Right Knee Gemstone", + "miapi.module.cmmodular.gem.limb.case_leg_right.name": "Right Knee Apothic Gem Case", "miapi.material.cmmodular.bone.dragonbone": "Dragonbone", "miapi.material.cmmodular.bone.hippogryph_talon": "Talon", "miapi.material.cmmodular.bone.sea_serpent_fang": "Sea Serpent Fang", diff --git a/src/main/resources/assets/cmmodular/models/item/armor/model/arm_left/socket/default.json b/src/main/resources/assets/cmmodular/models/item/armor/model/arm_left/socket/default.json new file mode 100644 index 0000000..ac6fce4 --- /dev/null +++ b/src/main/resources/assets/cmmodular/models/item/armor/model/arm_left/socket/default.json @@ -0,0 +1,91 @@ +{ + "comment": "Gem socket drawn under left_arm, so it moves with the limb. MIAPI draws a model in the pass its own origin names, and Armory's gemstone names none, so the socket has to be ours for anything here to follow the limb at all.", + "texture_size": [ + 16, + 8 + ], + "textures": { + "0": "cmmodular:equipment/arm_left_socket", + "particle": "cmmodular:equipment/arm_left_socket" + }, + "elements": [ + { + "name": "pauldron socket", + "from": [ + -2.5, + -0.25, + -1.5 + ], + "to": [ + -2.0, + 1.75, + 1.5 + ], + "rotation": { + "angle": -22.5, + "axis": "z", + "origin": [ + 0, + 0, + 0 + ] + }, + "faces": { + "up": { + "texture": "#0", + "uv": [ + 3.0, + 0.0, + 4.0, + 3.0 + ] + }, + "down": { + "texture": "#0", + "uv": [ + 4.0, + 0.0, + 5.0, + 3.0 + ] + }, + "west": { + "texture": "#0", + "uv": [ + 0.0, + 3.0, + 3.0, + 5.0 + ] + }, + "north": { + "texture": "#0", + "uv": [ + 3.0, + 3.0, + 4.0, + 5.0 + ] + }, + "east": { + "texture": "#0", + "uv": [ + 4.0, + 3.0, + 7.0, + 5.0 + ] + }, + "south": { + "texture": "#0", + "uv": [ + 7.0, + 3.0, + 8.0, + 5.0 + ] + } + } + } + ] +} diff --git a/src/main/resources/assets/cmmodular/models/item/armor/model/arm_right/socket/default.json b/src/main/resources/assets/cmmodular/models/item/armor/model/arm_right/socket/default.json new file mode 100644 index 0000000..cd13d36 --- /dev/null +++ b/src/main/resources/assets/cmmodular/models/item/armor/model/arm_right/socket/default.json @@ -0,0 +1,91 @@ +{ + "comment": "Gem socket drawn under right_arm, so it moves with the limb. MIAPI draws a model in the pass its own origin names, and Armory's gemstone names none, so the socket has to be ours for anything here to follow the limb at all.", + "texture_size": [ + 16, + 8 + ], + "textures": { + "0": "cmmodular:equipment/arm_right_socket", + "particle": "cmmodular:equipment/arm_right_socket" + }, + "elements": [ + { + "name": "pauldron socket", + "from": [ + 2.0, + -0.25, + -1.5 + ], + "to": [ + 2.5, + 1.75, + 1.5 + ], + "rotation": { + "angle": 22.5, + "axis": "z", + "origin": [ + 0, + 0, + 0 + ] + }, + "faces": { + "up": { + "texture": "#0", + "uv": [ + 3.0, + 0.0, + 4.0, + 3.0 + ] + }, + "down": { + "texture": "#0", + "uv": [ + 4.0, + 0.0, + 5.0, + 3.0 + ] + }, + "west": { + "texture": "#0", + "uv": [ + 0.0, + 3.0, + 3.0, + 5.0 + ] + }, + "north": { + "texture": "#0", + "uv": [ + 3.0, + 3.0, + 4.0, + 5.0 + ] + }, + "east": { + "texture": "#0", + "uv": [ + 4.0, + 3.0, + 7.0, + 5.0 + ] + }, + "south": { + "texture": "#0", + "uv": [ + 7.0, + 3.0, + 8.0, + 5.0 + ] + } + } + } + ] +} diff --git a/src/main/resources/assets/cmmodular/models/item/armor/model/leg_left/socket/default.json b/src/main/resources/assets/cmmodular/models/item/armor/model/leg_left/socket/default.json new file mode 100644 index 0000000..cfb2cff --- /dev/null +++ b/src/main/resources/assets/cmmodular/models/item/armor/model/leg_left/socket/default.json @@ -0,0 +1,82 @@ +{ + "comment": "Gem socket drawn under left_leg, so it moves with the limb. MIAPI draws a model in the pass its own origin names, and Armory's gemstone names none, so the socket has to be ours for anything here to follow the limb at all.", + "texture_size": [ + 8, + 4 + ], + "textures": { + "0": "cmmodular:equipment/leg_left_socket", + "particle": "cmmodular:equipment/leg_left_socket" + }, + "elements": [ + { + "name": "knee socket", + "from": [ + -1.5, + -2.95, + -2.7 + ], + "to": [ + 1.5, + -0.95, + -2.2 + ], + "faces": { + "up": { + "texture": "#0", + "uv": [ + 1.0, + 0.0, + 4.0, + 1.0 + ] + }, + "down": { + "texture": "#0", + "uv": [ + 4.0, + 0.0, + 7.0, + 1.0 + ] + }, + "west": { + "texture": "#0", + "uv": [ + 0.0, + 1.0, + 1.0, + 3.0 + ] + }, + "north": { + "texture": "#0", + "uv": [ + 1.0, + 1.0, + 4.0, + 3.0 + ] + }, + "east": { + "texture": "#0", + "uv": [ + 4.0, + 1.0, + 5.0, + 3.0 + ] + }, + "south": { + "texture": "#0", + "uv": [ + 5.0, + 1.0, + 8.0, + 3.0 + ] + } + } + } + ] +} diff --git a/src/main/resources/assets/cmmodular/models/item/armor/model/leg_right/socket/default.json b/src/main/resources/assets/cmmodular/models/item/armor/model/leg_right/socket/default.json new file mode 100644 index 0000000..e891fdc --- /dev/null +++ b/src/main/resources/assets/cmmodular/models/item/armor/model/leg_right/socket/default.json @@ -0,0 +1,82 @@ +{ + "comment": "Gem socket drawn under right_leg, so it moves with the limb. MIAPI draws a model in the pass its own origin names, and Armory's gemstone names none, so the socket has to be ours for anything here to follow the limb at all.", + "texture_size": [ + 8, + 4 + ], + "textures": { + "0": "cmmodular:equipment/leg_right_socket", + "particle": "cmmodular:equipment/leg_right_socket" + }, + "elements": [ + { + "name": "knee socket", + "from": [ + -1.5, + -2.95, + -2.7 + ], + "to": [ + 1.5, + -0.95, + -2.2 + ], + "faces": { + "up": { + "texture": "#0", + "uv": [ + 1.0, + 0.0, + 4.0, + 1.0 + ] + }, + "down": { + "texture": "#0", + "uv": [ + 4.0, + 0.0, + 7.0, + 1.0 + ] + }, + "west": { + "texture": "#0", + "uv": [ + 0.0, + 1.0, + 1.0, + 3.0 + ] + }, + "north": { + "texture": "#0", + "uv": [ + 1.0, + 1.0, + 4.0, + 3.0 + ] + }, + "east": { + "texture": "#0", + "uv": [ + 4.0, + 1.0, + 5.0, + 3.0 + ] + }, + "south": { + "texture": "#0", + "uv": [ + 5.0, + 1.0, + 8.0, + 3.0 + ] + } + } + } + ] +} diff --git a/src/main/resources/assets/cmmodular/textures/equipment/arm_left_socket.png b/src/main/resources/assets/cmmodular/textures/equipment/arm_left_socket.png new file mode 100644 index 0000000000000000000000000000000000000000..602c54c62b57a69597b397d65180a8317995b0b2 GIT binary patch literal 141 zcmeAS@N?(olHy`uVBq!ia0vp^0zk~c!3HEhl+{lMQX!r$jv*Cuk`o-5Hb?LIcl_7% zf9VR01``*}P-8Rrb)Egd+&2Y3WSKYjD902r?`Jr??__Jw51xd?goFfxFXl}j_}+t< n2_2h0wM!IyRanX=1GFy2U*OG*sB?RO<}-M@`njxgN@xNAk0LVA literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/cmmodular/textures/equipment/arm_right_socket.png b/src/main/resources/assets/cmmodular/textures/equipment/arm_right_socket.png new file mode 100644 index 0000000000000000000000000000000000000000..602c54c62b57a69597b397d65180a8317995b0b2 GIT binary patch literal 141 zcmeAS@N?(olHy`uVBq!ia0vp^0zk~c!3HEhl+{lMQX!r$jv*Cuk`o-5Hb?LIcl_7% zf9VR01``*}P-8Rrb)Egd+&2Y3WSKYjD902r?`Jr??__Jw51xd?goFfxFXl}j_}+t< n2_2h0wM!IyRanX=1GFy2U*OG*sB?RO<}-M@`njxgN@xNAk0LVA literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/cmmodular/textures/equipment/leg_left_socket.png b/src/main/resources/assets/cmmodular/textures/equipment/leg_left_socket.png new file mode 100644 index 0000000000000000000000000000000000000000..67c7a2b8bd549cbb507764e3faa11440e5032965 GIT binary patch literal 126 zcmeAS@N?(olHy`uVBq!ia0vp^96-#%!3HEZpRM}