/// <summary> /// returns the model number being used for the body part and creature specified /// The model number returned is for the body part when the creature is not wearing /// armor (i.e. whether or not the creature is wearing armor does not affect /// the return value). /// Note: Only works on part based creatures, which is typically restricted to /// the playable races (unless some new part based custom content has been /// added to the module). /// returns CREATURE_PART_INVALID if used on a non-creature object, /// or if the creature does not use a part based model. /// - nPart (CREATURE_PART_*) /// CREATURE_PART_RIGHT_FOOT /// CREATURE_PART_LEFT_FOOT /// CREATURE_PART_RIGHT_SHIN /// CREATURE_PART_LEFT_SHIN /// CREATURE_PART_RIGHT_THIGH /// CREATURE_PART_LEFT_THIGH /// CREATURE_PART_PELVIS /// CREATURE_PART_TORSO /// CREATURE_PART_BELT /// CREATURE_PART_NECK /// CREATURE_PART_RIGHT_FOREARM /// CREATURE_PART_LEFT_FOREARM /// CREATURE_PART_RIGHT_BICEP /// CREATURE_PART_LEFT_BICEP /// CREATURE_PART_RIGHT_SHOULDER /// CREATURE_PART_LEFT_SHOULDER /// CREATURE_PART_RIGHT_HAND /// CREATURE_PART_LEFT_HAND /// CREATURE_PART_HEAD /// </summary> public static int GetCreatureBodyPart(CreaturePartType nPart, uint oCreature = OBJECT_INVALID) { Internal.NativeFunctions.StackPushObject(oCreature); Internal.NativeFunctions.StackPushInteger(nPart.InternalValue); Internal.NativeFunctions.CallBuiltIn(792); return(Internal.NativeFunctions.StackPopInteger()); }
/// <summary> /// Sets the body part model to be used on the creature specified. /// The model names for parts need to be in the following format: /// p /// m / f /// race letter /// phenotype /// _ /// body part /// model number /// .mdl /// - nPart (CREATURE_PART_*) /// CREATURE_PART_RIGHT_FOOT /// CREATURE_PART_LEFT_FOOT /// CREATURE_PART_RIGHT_SHIN /// CREATURE_PART_LEFT_SHIN /// CREATURE_PART_RIGHT_THIGH /// CREATURE_PART_LEFT_THIGH /// CREATURE_PART_PELVIS /// CREATURE_PART_TORSO /// CREATURE_PART_BELT /// CREATURE_PART_NECK /// CREATURE_PART_RIGHT_FOREARM /// CREATURE_PART_LEFT_FOREARM /// CREATURE_PART_RIGHT_BICEP /// CREATURE_PART_LEFT_BICEP /// CREATURE_PART_RIGHT_SHOULDER /// CREATURE_PART_LEFT_SHOULDER /// CREATURE_PART_RIGHT_HAND /// CREATURE_PART_LEFT_HAND /// CREATURE_PART_HEAD /// - nModelNumber: CREATURE_MODEL_TYPE_* /// CREATURE_MODEL_TYPE_NONE /// CREATURE_MODEL_TYPE_SKIN (not for use on shoulders, pelvis or head). /// CREATURE_MODEL_TYPE_TATTOO (for body parts that support tattoos, i.e. not heads/feet/hands). /// CREATURE_MODEL_TYPE_UNDEAD (undead model only exists for the right arm parts). /// - oCreature: the creature to change the body part for. /// Note: Only part based creature appearance types are supported. /// i.e. The model types for the playable races ('P') in the appearance.2da /// </summary> public static void SetCreatureBodyPart(CreaturePartType nPart, int nModelNumber, uint oCreature = OBJECT_INVALID) { Internal.NativeFunctions.StackPushObject(oCreature); Internal.NativeFunctions.StackPushInteger(nModelNumber); Internal.NativeFunctions.StackPushInteger(nPart.InternalValue); Internal.NativeFunctions.CallBuiltIn(793); }
public CreaturePart GetPartPrefab(CreaturePartType type) { if (queuedCreatureParts.ContainsKey(type)) { var queuedPart = queuedCreatureParts[type]; queuedCreatureParts.Remove(type); return queuedPart; } var part = creatureCreator.GetRandomPartPrefab(type); if (part.PairedTo != null) { queuedCreatureParts.Add(part.PairedTo.Type, part.PairedTo); } return part; }