need help with an error
Moderator: Moderators
need help with an error
I decided to make a 2nd unit after the first worked well. I made new scipts and files (basically copies of the other tank) with a different model. But when i load the mod it crashes in the moment it would be spawned (counter hits 0 ) and says "couldnt find unittype behmoth". Im really out of ideas about this bug so help would be very nice.
Re: need help with an error
Several things might cause that. One of the more obvious ones is that the S3O doesn't have the tex1 defined.
Scripts must be named the same as the Unit as well. Check for any small discrepancies between the first unit and the second- usually it's something basic, like a missing comma / semicolon, etc. But the fact that the engine reported the UnitDef name means it's probably the model or script, since you probably haven't started messing with sounds yet.
Scripts must be named the same as the Unit as well. Check for any small discrepancies between the first unit and the second- usually it's something basic, like a missing comma / semicolon, etc. But the fact that the engine reported the UnitDef name means it's probably the model or script, since you probably haven't started messing with sounds yet.
Re: need help with an error
My other tank doesnt have one aswell, they both only have the basic texture with colourmap and housecolour.
Re: need help with an error
That's tex1. So, it's almost certainly something missing in the text files. Post your Unit TDF / Lua files, let's take a look.
Re: need help with an error
These are the files. I compared them and they are identical to the others with only some values different.
- Attachments
-
- Behmoth.lua
- (4.85 KiB) Downloaded 8 times
Re: need help with an error
Here, try this. I actually think the main error is at the very bottom- you had "runner" instead of "Behmoth".
Code: Select all
unitDef = {
unitname = [[Behmoth]],
name = [[Behmoth]],
description = [[>Ground units< >Aircraft<]],
acceleration = 0.5,
brakeRate = 3,
buildCostEnergy = 0,
buildCostMetal = 4000,
builder = false,
buildPic = [[Runner.png]],
buildTime = 1000,
canAttack = true,
canGuard = true,
canMove = true,
canPatrol = true,
canstop = [[1]],
category = [[LAND]],
--corpse = [[DEAD]],
customParams = {
helptext = [[ ]],
},
defaultmissiontype = [[Standby]],
--explodeAs = [[SMALL_UNITEX]],
footprintX = 2,
footprintZ = 2,
--iconType = [[Tank]],
idleAutoHeal = 0,
idleTime = 300,
--leaveTracks = true,
mass = 20.5,
maxDamage = 1000,
maxSlope = 25,
maxVelocity = 3.5,
maxWaterDepth = 22,
movementClass = [[SPECIALHOVER]],
noAutoFire = false,
noChaseCategory = [[]],
objectName = [[T125.s3o]],
seismicSignature = 4,
--selfDestructAs = [[SMALL_UNITEX]],
sfxtypes = {
explosiongenerators = {
-- [[custom:emg_shells_l]],
-- [[custom:flashmuzzle1]],
},
},
sightDistance = 425,
smoothAnim = true,
TEDClass = [[COMMANDER_CTRL_C]],
--trackOffset = 0,
--trackStrength = 8,
--trackStretch = 1,
--trackType = [[ComTrack]],
--trackWidth = 80,
turnRate = 150,
upright = false,
workerTime = 0,
weapons = {
{
def = [[T125Cannon]],
badTargetCategory = [[]],
onlyTargetCategory = [[]],
},
},
weaponDefs = {
T125Cannon = {
name = [[T125Cannon]],
alphaDecay = 0.1,
areaOfEffect = 8,
-- burst = 0,
-- burstrate = 0,
colormap = [[1 0.95 0.4 1 1 0.95 0.4 1 0 0 0 0.01 1 0.7 0.2 1]],
craterBoost = 1,
craterMult = 2,
damage = {
default = 200,
-- Terrordrone=3,
-- Infantry=3,
--Harassment=45,
--ANTI_INF=35,
--ANTI_AIR=40,
--LIGHT_TANK=30,
--Medium_TANK=20,
--Heavy_TANK=15,
--Support=40,
},
endsmoke = [[0]],
--explosionGenerator = [[custom:FLASHPLOSION]],
impactOnly = true,
impulseBoost = 0,
impulseFactor = 0.4,
intensity = 0.7,
interceptedByShieldType = 1,
lineOfSight = true,
noGap = false,
noSelfDamage = true,
range = 500,
reloadtime = 2.0,
renderType = 4,
rgbColor = [[1 0.95 1]],
separation = 1.5,
size = 5.55,
sizeDecay = 0,
--soundStart = [[flashemg]],
sprayAngle = 1180,
stages = 10,
startsmoke = [[0]],
tolerance = 5000,
turret = true,
weaponTimer = 0.1,
weaponType = [[Cannon]],
weaponVelocity = 550,
},
},
}
return lowerkeys({ Behmoth = unitDef })
- Forboding Angel
- Evolution RTS Developer
- Posts: 14673
- Joined: 17 Nov 2005, 02:43
Re: need help with an error
Copying CA unitdefs makes baby jesus cry.
Re: need help with an error
'Specially since they still include stuff like bmcode, which has no meaning in Spring, hehe.
- CarRepairer
- Cursed Zero-K Developer
- Posts: 3359
- Joined: 07 Nov 2007, 21:48
Re: need help with an error
We have an external script that tracks the bowel movements of every unit type, doesn't use spring. bmcode is crucial.
Re: need help with an error
What are you talking of?
And should i type the whole unit definition out of nothing, without errors without any reference file?
btw thx for the help, i think it was the wrong name that caused the error.
And should i type the whole unit definition out of nothing, without errors without any reference file?
btw thx for the help, i think it was the wrong name that caused the error.
- Forboding Angel
- Evolution RTS Developer
- Posts: 14673
- Joined: 17 Nov 2005, 02:43
Re: need help with an error
Lets just say this... CA does unitdefs in a very... interesting way.
Re: need help with an error
So i tried making a thrid unit ( a building this time) and again i get a "couldnt find unittype" error, but im sure that my .Lua file is correct, a script is there and also a model with all the skins.
What can this error mean? Perhaps it would be easier for beginners if the error messages would be a bit more accurate.
For example "Missing script" "Missing skin" and so on instead of always "Couldnt find unittype xyz"
What can this error mean? Perhaps it would be easier for beginners if the error messages would be a bit more accurate.
For example "Missing script" "Missing skin" and so on instead of always "Couldnt find unittype xyz"