Hello everyone, I seem to have finally exploded something in my mod and could use a brain or two to get this working for me again. Thanks in advance!
I was messing with one of my monster definitions in my monsters.lua and now whenever I try to run the editor with this specific floor enabled it crashes with this error.
Im like 99% certain it had to do with this monster in particular, but I am afraid to mess with years of spaghetti code any further or attempt to redefine him. Some of this I wrote years ago and it just worked somehow...
Code: Select all
-- This file has been generated by Dungeon Editor 2.1.9
-- TODO: place your custom monster definitions here
defineObject{
name = "skeleton_aspect",
baseObject = "base_monster",
components = {
{
class = "Model",
model = "assets/models/monsters/skeleton_knight_commander.fbx",
storeSourceData = true, -- must be enabled for mesh particles to work
},
{
class = "Animation",
animations = {
idle = "assets/animations/monsters/skeleton_knight_commander/skeleton_knight_commander_idle.fbx",
moveForward = "assets/animations/monsters/skeleton_knight_commander/skeleton_knight_commander_walk.fbx",
turnLeft = "assets/animations/monsters/skeleton_knight_commander/skeleton_knight_commander_turn_left.fbx",
turnRight = "assets/animations/monsters/skeleton_knight_commander/skeleton_knight_commander_turn_right.fbx",
attack = "assets/animations/monsters/skeleton_knight_commander/skeleton_knight_commander_attack.fbx",
attack2 = "assets/animations/monsters/skeleton_knight_commander/skeleton_knight_commander_attack2.fbx",
moveAttack = "assets/animations/monsters/skeleton_knight_commander/skeleton_knight_commander_move_attack.fbx",
rangedAttack = "assets/animations/monsters/skeleton_knight_commander/skeleton_knight_commander_ranged_attack.fbx",
summonUndead = "assets/animations/monsters/skeleton_knight_commander/skeleton_knight_commander_summon_undead.fbx",
turnAttackLeft = "assets/animations/monsters/skeleton_knight_commander/skeleton_knight_commander_turn_attack_left.fbx",
turnAttackRight = "assets/animations/monsters/skeleton_knight_commander/skeleton_knight_commander_turn_attack_right.fbx",
turnAroundAttack = "assets/animations/monsters/skeleton_knight_commander/skeleton_knight_commander_turn_around_attack.fbx",
getHitFrontLeft = "assets/animations/monsters/skeleton_knight_commander/skeleton_knight_commander_get_hit_front_left.fbx",
getHitFrontRight = "assets/animations/monsters/skeleton_knight_commander/skeleton_knight_commander_get_hit_front_right.fbx",
getHitBack = "assets/animations/monsters/skeleton_knight_commander/skeleton_knight_commander_get_hit_back.fbx",
getHitLeft = "assets/animations/monsters/skeleton_knight_commander/skeleton_knight_commander_get_hit_left.fbx",
getHitRight = "assets/animations/monsters/skeleton_knight_commander/skeleton_knight_commander_get_hit_right.fbx",
fall = "assets/animations/monsters/skeleton_knight_commander/skeleton_knight_commander_get_hit_front_left.fbx",
},
currentLevelOnly = true,
onAnimationEvent = function(self, event)
if event == "summon_undead_begin" then
self.go.handLeftParticle:restart()
self.go.handRightParticle:restart()
self.go.spellLight:fadeIn(2.7)
elseif event == "summon_undead_end" then
self.go.spellLight:fadeOut(0.1)
end
end,
},
{
class = "Monster",
meshName = "skeleton_knight_commander_mesh",
footstepSound = "skeleton_footstep",
hitSound = "skeleton_hit",
dieSound = "skeleton_die",
hitEffect = "hit_dust",
capsuleHeight = 0.7,
capsuleRadius = 0.25,
collisionRadius = 0.6,
health = 325,
protection = 12,
evasion = 0,
immunities = { "sleep", "blinded", "frozen" },
resistances = {
["poison"] = "immune",
["frost"] = "immune",
["shock"] = "weak",
},
traits = { "undead" },
exp = 350,
lootDrop = { 100, "long_sword", 25, "long_sword" },
},
{
class = "SkeletonCommanderBrain",
name = "brain",
sight = 6,
allAroundSight = true,
morale = 100, -- fearless
},
{
class = "MonsterMove",
name = "move",
sound = "skeleton_commander_walk",
cooldown = 2,
},
{
class = "MonsterTurn",
name = "turn",
sound = "skeleton_commander_walk",
},
{
class = "MonsterAttack",
name = "basicAttack",
attackPower = 17,
accuracy = 27,
pierce = 17,
woundChance = 20,
cooldown = 4,
sound = "skeleton_commander_attack",
onBeginAction = function(self)
-- randomize animation
if math.random() < 0.5 then
self:setAnimation("attack")
else
self:setAnimation("attack2")
end
end,
},
{
class = "MonsterAttack",
name = "turnAttack",
attackPower = 27,
accuracy = 27,
pierce = 17,
woundChance = 20,
cooldown = 0,
sound = "skeleton_commander_turn_attack",
turnToAttackDirection = true,
},
{
class = "MonsterAttack",
name = "rangedAttack",
attackPower = 30,
cooldown = 15,
animation = "rangedAttack",
sound = "skeleton_commander_ice_shards",
onAttack = function(self)
-- cast ice shards
local dx,dy = getForward(self.go.facing)
local spell = spawn("ice_shards", self.go.level, self.go.x + dx, self.go.y + dy, self.go.facing, self.go.elevation)
spell.iceshards:setRange(5)
spell.tiledamager:setAttackPower(32)
end,
},
{
class = "MonsterMoveAttack",
name = "moveAttack",
attackPower = 27,
accuracy = 45,
pierce = 17,
woundChance = 25,
cooldown = 6,
animation = "moveAttack",
sound = "skeleton_commander_move_attack",
},
},
}
I can run the mod inside the editor if I disable this floor from the editor list but it wont launch as an executable. Thank you for your help!