Skip to content

How make custom skin for NPC? #915

@debna007316-cloud

Description

@debna007316-cloud

How make custom skin (e.g maverick ,traders and difference player skin) for my code?

const [x, y, z] = thisPos;
let mob = api.attemptSpawnMob("NPC", x, y, z, {
name: "TEST",
playSoundOnSpawn: true, variation: "default"
});
api.setMobSetting(mob, "ownerDbId", null)

api.setDefaultMobSetting("NPC", "maxHealth", 100);
api.setDefaultMobSetting("NPC", "baseWalkingSpeed", 4);
api.setDefaultMobSetting("NPC", "baseRunningSpeed", 7);
api.setDefaultMobSetting("NPC", "initialHealth", 100);
api.setDefaultMobSetting("NPC", "attackDamage", 20)
api.setDefaultMobSetting("NPC", "chaseRadius", 10)
api.setDefaultMobSetting("NPC", "territoryRadius", 100)
api.setDefaultMobSetting("NPC", "hostilityRadius", 0)
api.setDefaultMobSetting("NPC", "attackRadius", 1)
api.setDefaultMobSetting("NPC", "attackInterval", 4.5)
api.setDefaultMobSetting("NPC", "ridingSpeedMult", 2.5)
api.setDefaultMobSetting("NPC", "maxFollowingRadius", 10)
api.setDefaultMobSetting("NPC", "minFollowingRadius", 0.9)
api.setDefaultMobSetting("NPC", "onTamedHealthMultiplier", 500)
api.setMobSetting(mob, "tameInfo", {
tameItemName: [
"White Paintball",
],
probabilityOfTame: 5,
isSaddleable: true,
supportsFriendship: true,
likedFoods: [
"Red Paintball Explosive Item",
"Orange Paintball Explosive Item",
"Yellow Paintball Explosive Item",
"Lime Paintball Explosive Item",
"Green Paintball Explosive Item",
"Cyan Paintball Explosive Item",
"Light Blue Paintball Explosive Item",
"Blue Paintball Explosive Item",
"Purple Paintball Explosive Item",
"Magenta Paintball Explosive Item",
"Pink Paintball Explosive Item",
"Brown Paintball Explosive Item",
"Black Paintball Explosive Item",
"Gray Paintball Explosive Item",
"Light Gray Paintball Explosive Item",
"White Paintball Explosive Item"
],
neutralFoods: [
"Gray Paintball"
],
dislikedFoods: [
"Black Paintball"
],
guaranteedDrop: "Gold Coin",
commonDrops: [
"Gold Coin"
],

levelUpBonuses: {
1: "Renaming",
2: "Special Drops",
3: "Mob Yield",
4: "Damage +",
5: "Poison Claws"
}
})
api.setDefaultMobSetting(mob, "petInfo", {
friendshipPoints: 100,
lastFedAt: 10000,
highestFriendshipLevelReached: 1,
superlikedFood: 5,
superlikedFoodKnown: true,
bonusesGained: [100],
})

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions