Skip to content

Working with Equipment

Mad Hatter edited this page Oct 13, 2024 · 1 revision

Assumptions

Basic understanding of GDscript Basic understanding of the Node tree A HumanizerEditorTool Node has been placed somewhere in your node tree and you have referenced it as a variable called "het" as shown below

Attaching Equipment to a Node

To attach a piece of equipment to a humanizer editor node, the following line of code can be executed, the EQUIPMENT_NAME is defined in the .mhclo file as "name" and the texture is used if multiple textures are available for the same object. for instance body's skin. het.add_equipment(HumanizerEquipment.new("EQUIPMENT_NAME","EQUIPMENT_TEXTURE"))

Remove Equipment based on slot

If you know the slot name, you can remove the equipment that is in that slot using the following code.

het.humanizer.remove_equipment_in_slot("SLOT_NAME")

Slot names can be looked up by looping through the items in HumanizerRegistry.equipment and getting the slots for each item.

Remove Equipment based upon Equipment name

if you know what file was equipped you can remove the equipment from all of the slots using the following line of code. het.add_equipment(HumanizerEquipment.new("EQUIPMENT_NAME"))

Clone this wiki locally