PDA

View Full Version : Wierdest thing I've ever experienced


Vipey
21st Apr 09, 4:48 PM
Alright, I'm working on a ship, and I'm adding the weapons; standard procedure.. I have two primary ion cannons and they work. I went to go and add 4 defense weapons, they don't work. The firepower in game doesn't even change. I have NO idea why.

-- LuaDC version 1.0.1
-- 4/14/2009 8:06:39 AM
-- LuaDC by Age2uN
-- on error send source file (compiled lua) and this outputfile to Age2uN@gmx.net
--
NewShipType = StartShipConfig()
NewShipType.displayedName = "Nightmare"
NewShipType.sobDescription = "Heavy Anti-Capital Ship Destroyer"
NewShipType.maxhealth = 125000
NewShipType.regentime = 500
NewShipType.minRegenTime = 250
NewShipType.sideArmourDamage = 1
NewShipType.rearArmourDamage = 1.2
NewShipType.isTransferable = 0
NewShipType.useEngagementRanges = 1
NewShipType.unitCapsNumber = 4
NewShipType.SquadronSize = 1
NewShipType.passiveFormation = "Spear"
NewShipType.defensiveFormation = "x"
NewShipType.aggressiveFormation = "Claw"
NewShipType.mass = 500
NewShipType.collisionMultiplier = 1
NewShipType.thrusterMaxSpeed = 300
NewShipType.mainEngineMaxSpeed = 300
NewShipType.rotationMaxSpeed = 75
NewShipType.thrusterAccelTime = 10
NewShipType.thrusterBrakeTime = 10
NewShipType.mainEngineAccelTime = 10
NewShipType.mainEngineBrakeTime = 10
NewShipType.rotationAccelTime = 0.5
NewShipType.rotationBrakeTime = 0.3
NewShipType.thrusterUsage = 1
NewShipType.accelerationAngle = 30
NewShipType.mirrorAngle = 0
NewShipType.secondaryTurnAngle = 0
NewShipType.maxBankingAmount = 20
NewShipType.descendPitch = 10
NewShipType.goalReachEpsilon = 25
NewShipType.slideMoveRange = 350
NewShipType.controllerType = "Ship"
NewShipType.tumbleStaticX = 10
NewShipType.tumbleStaticY = 20
NewShipType.tumbleStaticZ = 5
NewShipType.tumbleDynamicX = 2
NewShipType.tumbleDynamicY = 10
NewShipType.tumbleDynamicZ = 5
NewShipType.tumbleSpecialDynamicX = 2
NewShipType.tumbleSpecialDynamicY = 10
NewShipType.tumbleSpecialDynamicZ = 5
NewShipType.relativeMoveFactor = 1
NewShipType.swayUpdateTime = 6
NewShipType.swayOffsetRandomX = 10
NewShipType.swayOffsetRandomY = 10
NewShipType.swayOffsetRandomZ = 10
NewShipType.swayBobbingFactor = 0
NewShipType.swayRotateFactor = 0
NewShipType.useTargetRandom = 1
NewShipType.targetRandomPointXMin = -0.15
NewShipType.targetRandomPointXMax = 0.33
NewShipType.targetRandomPointYMin = -0.3
NewShipType.targetRandomPointYMax = 0.5
NewShipType.targetRandomPointZMin = -0.7
NewShipType.targetRandomPointZMax = 0.8
NewShipType.dustCloudDamageTime = 160
NewShipType.nebulaDamageTime = 300
NewShipType.MinimalFamilyToFindPathAround = "MotherShip"
NewShipType.BuildFamily = "SuperCap_Hgn"
NewShipType.AttackFamily = "SmallCapitalShip"
NewShipType.DockFamily = "SuperCap"
NewShipType.AvoidanceFamily = "Capital"
NewShipType.DisplayFamily = "Capital"
NewShipType.AutoFormationFamily = "CapShip"
NewShipType.CollisionFamily = "Big"
NewShipType.ArmourFamily = "HeavyArmour"
NewShipType.UnitCapsFamily = "Capital"
NewShipType.UnitCapsShipType = "Destroyer"
NewShipType.fighterValue = 0
NewShipType.corvetteValue = 0
NewShipType.frigateValue = 40
NewShipType.neutralValue = 10
NewShipType.antiFighterValue = 0
NewShipType.antiCorvetteValue = 0
NewShipType.antiFrigateValue = 30
NewShipType.totalValue = 50
NewShipType.buildCost = 2000
NewShipType.buildTime = 165
NewShipType.buildPriorityOrder = 20
NewShipType.retaliationRange = 6000
NewShipType.retaliationDistanceFromGoal = 160
NewShipType.visualRange = 1000
NewShipType.prmSensorRange = 6500
NewShipType.secSensorRange = 7500
NewShipType.detectionStrength = 1
NewShipType.TOIcon = "Parallelogram"
NewShipType.TOScale = 1
NewShipType.TODistanceFade0 = 11000
NewShipType.TODistanceDisappear0 = 9000
NewShipType.TODistanceFade1 = 5500
NewShipType.TODistanceDisappear1 = 5000
NewShipType.TODistanceFade2 = 12000
NewShipType.TODistanceDisappear2 = 35000
NewShipType.TOGroupScale = 1
NewShipType.TOGroupMergeSize = 0
NewShipType.mouseOverMinFadeSize = 0.045
NewShipType.mouseOverMaxFadeSize = 0.1
NewShipType.healthBarStyle = 2
NewShipType.nlips = 0.00007
NewShipType.nlipsRange = 6000
NewShipType.nlipsFar = 0.000013
NewShipType.nlipsFarRange = 10000
NewShipType.SMRepresentation = "Mesh"
NewShipType.meshRenderLimit = 15600
NewShipType.dotRenderLimit = 10
NewShipType.visibleInSecondary = 1
NewShipType.minLOD = 0.25
NewShipType.goblinsStartFade = 2000
NewShipType.goblinsOff = 2000
NewShipType.upLOD = 2500
NewShipType.upLOD = 3000
NewShipType.downLOD = 2515
NewShipType.downLOD = 3015
NewShipType.minimumZoomFactor = 0.5
NewShipType.selectionLimit = 150000
NewShipType.preciseATILimit = 0
NewShipType.selectionPriority = 75
NewShipType.militaryUnit = 1
NewShipType.SMHighlightDistMin = 15000
NewShipType.SMHighlightDistMax = 25000
addAbility(NewShipType, "MoveCommand", 1, 0)
addAbility(NewShipType, "CanDock", 1, 0)
NewShipType.dockTimeBetweenTwoFormations = 1
NewShipType.dockTimeBeforeStart = 2
NewShipType.dockNrOfShipsInDockFormation = 1
NewShipType.dockFormation = "delta"
NewShipType.queueFormation = "dockline"
NewShipType.dontDockWithOtherRaceShips = 1
NewShipType.ignoreRaceWhenDocking = 0
addAbility(NewShipType, "CanLaunch")
NewShipType.launchTimeBetweenTwoFormations = 1
NewShipType.launchTimeBeforeStart = 2
NewShipType.launchNrOfShipsInDockFormation = 1
NewShipType.launchFormation = "delta"
addAbility(NewShipType, "ParadeCommand", 1)
addAbility(NewShipType, "WaypointMove")
addAbility(NewShipType, "HyperSpaceCommand", 1, 2, 400, 800, 0, 3)
addAbility(NewShipType, "CanAttack", 1, 1, 0, 1, 0.35, 1.5, "Capturer, Frigate, SmallCapitalShip, BigCapitalShip, Mothership, Utility, Corvette", "Frontal",
{
SubSystem = "FrontalVsSubSystem",
},
{
Fighter = "MoveToTargetAndShoot",
},
{
Corvette = "MoveToTargetAndShoot", })
addAbility(NewShipType, "GuardCommand", 1, 3000, 800)
addAbility(NewShipType, "HyperspaceViaGateCommand", 1, 3, 1, 0.3)
addAbility(NewShipType, "CanBeCaptured", 90, 0.5)
addAbility(NewShipType, "CanBeRepaired")
addAbility(NewShipType, "RetireAbility", 1, 1)
LoadModel(NewShipType, 1)
StartShipWeaponConfig(NewShipType, "hgn_nightmaremain", "Weapon_Top", "Fire")
StartShipWeaponConfig(NewShipType, "hgn_nightmareion", "Weapon_Side", "Fire")
StartShipWeaponConfig(NewShipType, "hgn_nightmarePDS", "Weapon_PDS1", "Weapon_HullDefense1")
StartShipWeaponConfig(NewShipType, "hgn_nightmarePDS", "Weapon_PDS2", "Weapon_HullDefense2")
StartShipWeaponConfig(NewShipType, "hgn_nightmarePDS", "Weapon_PDS3", "Weapon_HullDefense3")
StartShipWeaponConfig(NewShipType, "hgn_nightmarePDS", "Weapon_PDS4", "Weapon_HullDefense4")
addShield(NewShipType, "EMP", 1000, 20)
SpawnSalvageOnDeath(NewShipType, "Slv_Chunk_Lrg03", 1, 0.75, 0, 0, 0, 50, 0, 0, 0, 200, 0, 0, 0, 50, 0, 0, 0, 50)
SpawnSalvageOnDeath(NewShipType, "Slv_Chunk_Lrg02", 1, 0.05, 30, -20, 200, 25, 300, 150, 85, 50, 0, 0, 0, 85, 0, 0, 0, 50)
SpawnSalvageOnDeath(NewShipType, "Slv_Chunk_Lrg04", 1, 0.05, 50, 40, -150, 50, 65, 25, 5, 25, 0, 0, 0, 95, 0, 0, 0, 50)
SpawnSalvageOnDeath(NewShipType, "Slv_Chunk_Lrg05", 1, 0.05, 25, 10, -100, 30, 35, 75, 62, 75, 0, 0, 0, 80, 0, 0, 0, 50)
SpawnSalvageOnDeath(NewShipType, "Slv_Chunk_Lrg01", 1, 0.05, 60, 30, 150, 25, 35, 125, 65, 75, 0, 0, 0, 60, 0, 0, 0, 50)
SpawnSalvageOnDeath(NewShipType, "Slv_Chunk_Sml01", 1, 0.01, 80, 125, 60, 75, 125, 80, 65, 75, 0, 0, 0, 60, 0, 0, 0, 50)
SpawnSalvageOnDeath(NewShipType, "Slv_Chunk_Sml02", 1, 0.01, 25, 0, -125, 50, 80, 35, 120, 75, 0, 0, 0, 60, 0, 0, 0, 50)
SpawnSalvageOnDeath(NewShipType, "Slv_Chunk_Sml03", 1, 0.01, 60, 95, 200, 50, 15, 200, 20, 125, 0, 0, 0, 60, 0, 0, 0, 50)
SpawnSalvageOnDeath(NewShipType, "Slv_Chunk_Sml04", 1, 0.01, 10, 60, -300, 25, 35, 80, 65, 75, 0, 0, 0, 60, 0, 0, 0, 50)
SpawnSalvageOnDeath(NewShipType, "Slv_Chunk_Sml05", 1, 0.01, 60, 10, 30, 75, 35, 25, 65, 75, 0, 0, 0, 60, 0, 0, 0, 50)
NewShipType.battleScarMaxTriBase = 150
NewShipType.battleScarMaxTriInc = 200
NewShipType.sobDieTime = 3.5
NewShipType.sobSpecialDieTime = 1
NewShipType.specialDeathSpeed = 40
NewShipType.chanceOfSpecialDeath = 0
NewShipType.deadSobFadeTime = 0.1
NewShipType.trailLinger = 4
setEngineGlow(NewShipType, 1, 1, 1.02, 20, 300, 50, 1.5,
{ 0.27, 0.47, 0.69, 0.25, })
setEngineGlow(NewShipType, 2, 1, 1.02, 20, 300, 50, 1.5,
{ 0.27, 0.47, 0.69, 0.25, })
setEngineGlow(NewShipType, 3, 1, 1.02, 20, 300, 50, 1.5,
{ 0.27, 0.47, 0.69, 0.25, })
setEngineGlow(NewShipType, 4, 1, 1.02, 20, 300, 50, 1.5,
{ 0.27, 0.47, 0.69, 0.25, })
setEngineGlow(NewShipType, 5, 1, 1.02, 20, 300, 50, 1.5,
{ 0.27, 0.47, 0.69, 0.25, })
setEngineGlow(NewShipType, 6, 1, 1.02, 20, 300, 50, 1.5,
{ 0.27, 0.47, 0.69, 0.25, })
loadShipPatchList(NewShipType, "data:sound/sfx/ship/Hiigaran/Frigate/", 0, "Engines/HFrigateEng", "", 1, "Ambience/HFrigateAmb", "")



There's the code. On a lighter note it seems whatever two weapons are coded first, only those two work. Anything after it won't.

ajlsunrise
21st Apr 09, 5:54 PM
are there hardpoints in the hod for "Weapon_PDS4"?

Vipey
21st Apr 09, 6:38 PM
Yes. All of them.
I'm thinking the problem might be HOD related.

adamstrange
21st Apr 09, 6:59 PM
Post the Weapons file and the Weaponsfire file.

Vipey
22nd Apr 09, 8:45 AM
Here:

http://viperslayer.net/nightmare.zip

Probably easier this way.
This bug is halting any more progression on the model. I can't add the phased ion cannon.

I also included FX and weapons not added to the ship yet, some intended, some scrapped just for informational purposes .


EDIT:
For self gratification purposes I'm redoing the hod to see if it's the problem. I hope it is.

Update:

Redoing the hod from the ground up still only allows two weapons.

Guh......

Siber
22nd Apr 09, 12:43 PM
That is very odd. Does the hw2.log indicate any lua errors when you try to use the ship?

Wintermute
22nd Apr 09, 12:53 PM
Are you sure the "Weapon_HullDefense#" is necessary? I do not normally include that extra part in the weaponconfig lines and everything seems to work fine. I'm somewhat doubtful that it is the source of the problem, but perhaps trying removing it and see what happens?

I'm also at a loss here, though. Everything looks right - if it weren't, HW2 should crash when you start a game. There's no clues in the HW2 log file?

Vipey
22nd Apr 09, 1:15 PM
@Wintermute

Wait where is this at?

EDIT: Oh that, I did that myself after this whole problem started to see if it fixed it, and fixed it it didn't.
=\

That is very odd. Does the hw2.log indicate any lua errors when you try to use the ship?
Nope. Not a thing at all. I'm very meticulous when it comes to errors in the log. I fix anything I see all the time.

Vipey
23rd Apr 09, 6:38 AM
I fixed the ship by redoing the shp file. I have no idea what was wrong with it but it works now. I'm in the final states of completing the nightmare. I really like it. I might just texture it.