Lots of progress made on making a new fish but I ran into a issue I hope some one can point out my mistake.
Making a new fish called "piranha". I used the Salmon shape and most of its code to make a new fish. I can see the new "item" in the creatures but it has not texture or icon.
I'm hoping my code is correct:
{
code: "piranha",
class: "EntityFish",
hitboxSize: { x: 0.5, y: 0.25 },
eyeHeight: 0.2,
drops: [],
habitat: "Underwater",
client: {
renderer: "Shape",
size: 0.7,
shape: { base: "entity/water/piranha" },
texture: { base: "entity/fish/piranha-red" },
behaviors: [
{ code: "repulseagents" },
{ code: "controlledphysics", stepHeight: 0 },
{ code: "interpolateposition" },
{ code: "floatupwhenstuck", onlyWhenDead: true },
{ code: "harvestable" },
{ code: "despawn", minPlayerDistance: 8, belowLightLevel: 8, minSeconds: 300 },
],
animations: [
{
code: "hurt",
animation: "hurt",
animationSpeed: 1,
weight: 10,
blendMode: "AddAverage"
},
{
code: "swim",
animation: "swim"
},
{
code: "swimfast",
animation: "swim"
},
{
code: "die",
animation: "dead",
},
{
code: "flop",
animation: "flopping"
},
{
code: "idle",
animation: "idle",
blendMode: "AddAverage",
animationSpeed: 0.33,
easeOutSpeed: 4,
triggeredBy: { defaultAnim: true },
}
]
},
server: {
behaviors: [
{ code: "repulseagents" },
{ code: "controlledphysics", stepHeight: 1.1251 },
{ code: "despawn", minPlayerDistance: 12, belowLightLevel: 8, minSeconds: 200 },
{ code: "health", currenthealth: 5, maxhealth: 5, },
{ code: "deaddecay", hoursToDecay: 96, decayedBlock: "carcass-tiny" },
{ code: "floatupwhenstuck", onlyWhenDead: true },
{ code: "harvestable", drops: [
{
type: "item",
code: "fish-raw",
quantity: { avg: 2, var: 0 }
}
]
},
{
code: "emotionstates",
states: [
{ code: "fleeondamage", duration: 10, chance: 1, slot: 0, priority: 1, accumType: "max", whenHealthRelBelow: 0.3 },
{
code: "saturated", duration: 1200, chance: 1, slot: 0, priority: 1, accumType: "sum",
belowTempDuration: 600,
belowTempThreshold: -5
},
{ code: "aggressiveondamage", duration: 30, chance: 1, slot: 2, priority: 2, accumType: "noaccum" },
{ code: "alarmherdondamage", chance: 1, slot: 1, priority: 1, accumType: "max" }
]
},
{
code: "taskai",
aitasks: [
{
code: "fishoutofwater",
priority: 2.5,
priorityForCancel: 2.6,
movespeed: 0.005,
animation: "flop",
animationSpeed: 2
},
{
code: "meleeattack",
entityCodes: ["player", "chicken-rooster", "chicken-hen", "chicken-baby", "hare-*", "deer-*-baby", "deer-pudu-*-adult", "deer-water-*-adult", "deer-pampas-*-adult", "deer-redbrocket-*-adult"],
priority: 2,
damage: 3,
damageTier: 2,
damageType: "SlashingAttack",
slot: 1,
mincooldown: 1500,
maxcooldown: 1500,
attackDurationMs: 800,
damagePlayerAtMs: 500,
animation: "swim",
animationSpeed: 2,
sound: "player/stab"
},
{
code: "fleeentity",
entityCodes: ["player"],
priority: 2,
movespeed: 0.06,
seekingRange: 14,
animation: "swim",
animationSpeed: 2,
whenInEmotionState: "fleeondamage"
},
{
code: "wander",
priority: 1.2,
priorityForCancel: 1.35,
movespeed: 0.015,
animationSpeed: 0.9,
animation: "swim"
},
{
code: "fishmovefast",
priority: 1.0,
priorityForCancel: 1.5,
movespeed: 0.045,
animation: "swimfast",
animationSpeed: 2.3
},
{
code: "idle",
priority: 0.9,
priorityForCancel: 1.5,
minduration: 1000,
maxduration: 6000,
mincooldown: 2000,
maxcooldown: 20000,
animation: "eat"
},
{
code: "idle",
priority: 0.9,
minduration: 500,
maxduration: 1000,
mincooldown: 2000,
maxcooldown: 30000,
animation: "idle"
}
]
}
],
spawnconditions: {
worldgen: {
TriesPerChunk: { avg: 0.5, var: 0 },
tryOnlySurface: true,
minLightLevel: 3,
groupSize: { dist: "verynarrowgaussian", avg: 2, var: 3 },
insideBlockCodes: ["water-*"],
minTemp: 4,
maxTemp: 20
},
runtime: {
group: "hostile",
chance: 0.01,
tryOnlySurface: true,
minLightLevel: 3,
groupSize: { dist: "verynarrowgaussian", avg: 2, var: 3 },
insideBlockCodes: ["water-*"],
minTemp: 4,
maxTemp: 20
}
}
}
}
I uploaded the entire zip as well. What did I miss? When I ran ModMaker, it did not capture my new texture so I added that folder path. Did I miss something?
piranha.zip