PDA

View Full Version : Innate Subsystem Problems


XcaliberCrusade
29th Jul 07, 1:37 PM
Hey again, I've got a major issue that is plaguing my modding efforts.

I've set up an innate subsystem, created a .subs folder, and added all the stuff I needed to make it work.

I then added the subsystem build ability to my ship, and the startshiphardpointconfig line as well, but all I get is a crash at the Universe stage...

Hw2.log doesn't recognize an error, and I have luatrace on as well.

I can't figure out whats wrong... :screwy:

-- on error send source file (compiled lua) and this outputfile to Age2uN@gmx.net
--
--
NewShipType = StartShipConfig()
NewShipType.displayedName = "Experimental Sovereign Class"
NewShipType.sobDescription = "Usher in a New Era of Peace"
NewShipType.maxhealth = 500000
NewShipType.regentime = 2000
NewShipType.minRegenTime = 2000
NewShipType.sideArmourDamage = 1.2
NewShipType.rearArmourDamage = 1.2
NewShipType.isTransferable = 0
NewShipType.useEngagementRanges = 1
NewShipType.unitCapsNumber = 1
NewShipType.paradeData = "hgn_carrier_parade"
NewShipType.SquadronSize = 1
NewShipType.passiveFormation = "Spear"
NewShipType.defensiveFormation = "x"
NewShipType.aggressiveFormation = "Claw"
NewShipType.mass = 950
NewShipType.collisionMultiplier = 1
NewShipType.thrusterMaxSpeed = 355
NewShipType.mainEngineMaxSpeed = 355
NewShipType.rotationMaxSpeed = 60
NewShipType.thrusterAccelTime = 3
NewShipType.thrusterBrakeTime = 4
NewShipType.mainEngineAccelTime = 3
NewShipType.mainEngineBrakeTime = 4
NewShipType.rotationAccelTime = 1
NewShipType.rotationBrakeTime = .7
NewShipType.thrusterUsage = .25
NewShipType.accelerationAngle = 170
NewShipType.mirrorAngle = 0
NewShipType.secondaryTurnAngle = 0
NewShipType.maxBankingAmount = 45
NewShipType.descendPitch = 0
NewShipType.goalReachEpsilon = 25
NewShipType.slideMoveRange = 100
NewShipType.controllerType = "Ship"
NewShipType.tumbleStaticX = 2
NewShipType.tumbleStaticY = 4
NewShipType.tumbleStaticZ = 3
NewShipType.tumbleDynamicX = 1
NewShipType.tumbleDynamicY = 2
NewShipType.tumbleDynamicZ = 1
NewShipType.tumbleSpecialDynamicX = 1
NewShipType.tumbleSpecialDynamicY = 2
NewShipType.tumbleSpecialDynamicZ = 1
NewShipType.relativeMoveFactor = 1
NewShipType.swayUpdateTime = 10
NewShipType.swayOffsetRandomX = 10
NewShipType.swayOffsetRandomY = 10
NewShipType.swayOffsetRandomZ = 10
NewShipType.swayBobbingFactor = 0
NewShipType.swayRotateFactor = 0
NewShipType.useTargetRandom = 1
NewShipType.targetRandomPointXMin = -0.1
NewShipType.targetRandomPointXMax = 0.1
NewShipType.targetRandomPointYMin = -0.3
NewShipType.targetRandomPointYMax = 0.5
NewShipType.targetRandomPointZMin = -0.9
NewShipType.targetRandomPointZMax = 0.85
NewShipType.dustCloudDamageTime = 280
NewShipType.nebulaDamageTime = 1200
NewShipType.MinimalFamilyToFindPathAround = "MotherShip"
NewShipType.BuildFamily = "SuperCap_Kpr"
NewShipType.AttackFamily = "BigCapitalShip"
NewShipType.DockFamily = "UltraCap"
NewShipType.AvoidanceFamily = "SuperCap"
NewShipType.DisplayFamily = "Destroyer"
NewShipType.AutoFormationFamily = "SuperCap"
NewShipType.CollisionFamily = "Big"
NewShipType.ArmourFamily = "PlanetKillerArmour"
NewShipType.UnitCapsFamily = "Capital"
NewShipType.fighterValue = 0
NewShipType.corvetteValue = 0
NewShipType.frigateValue = 160
NewShipType.neutralValue = 60
NewShipType.antiFighterValue = 0
NewShipType.antiCorvetteValue = 10
NewShipType.antiFrigateValue = 120
NewShipType.totalValue = 95
NewShipType.buildCost = 1500
NewShipType.buildTime = 1
NewShipType.buildPriorityOrder = 20
NewShipType.retaliationRange = 6500
NewShipType.retaliationDistanceFromGoal = 160
NewShipType.visualRange = 1000
NewShipType.prmSensorRange = 7500
NewShipType.secSensorRange = 8500
NewShipType.detectionStrength = 1
NewShipType.TOIcon = "Arrow"
NewShipType.TOScale = 1
NewShipType.TODistanceFade0 = 14000
NewShipType.TODistanceDisappear0 = 12000
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
NewShipType.nlipsRange = 75000
NewShipType.nlipsFar = 0
NewShipType.nlipsFarRange = 0
NewShipType.SMRepresentation = "Mesh"
NewShipType.meshRenderLimit = 19500
NewShipType.dotRenderLimit = 10
NewShipType.visibleInSecondary = 1
NewShipType.goblinsStartFade = 5000
NewShipType.goblinsOff = 5000
NewShipType.upLOD = 6000
NewShipType.upLOD = 12000
NewShipType.downLOD = 6015
NewShipType.downLOD = 12015
NewShipType.minimumZoomFactor = 0.5
NewShipType.selectionLimit = 150000
NewShipType.preciseATILimit = 0
NewShipType.selectionPriority = 75
NewShipType.militaryUnit = 1
NewShipType.alternativeHyperspaceV = "hyperspace_gate_kpr"
NewShipType.alternativeHyperspaceA = "etg/special/SPECIAL_ABILITIES_HYPERSPACE_IN"
NewShipType.alternativeHyperspaceTime = 12.5
NewShipType.SMHighlightDistMin = 20000
NewShipType.SMHighlightDistMax = 30000
addAbility(NewShipType, "MoveCommand", 1, 0)
addAbility(NewShipType, "CanDock", 1, 1)
NewShipType.dockTimeBetweenTwoFormations = 1
NewShipType.dockTimeBeforeStart = 2
NewShipType.dockNrOfShipsInDockFormation = 1
NewShipType.dockFormation = "delta"
NewShipType.queueFormation = "dockline"
NewShipType.dontDockWithOtherRaceShips = 0
NewShipType.ignoreRaceWhenDocking = 0
addAbility(NewShipType, "CanLaunch")
NewShipType.launchTimeBetweenTwoFormations = 1
NewShipType.launchTimeBeforeStart = 2
NewShipType.launchNrOfShipsInDockFormation = 1
NewShipType.launchFormation = "delta"
NewShipType.dockQueueSelectionQueueMultiplier = 100000
NewShipType.dockQueueSelectionOccupiedMultiplier = 100000
addAbility(NewShipType, "CanBuildShips", 1, "Subsystem_Hgn", "SubSystemModule")
addAbility(NewShipType, "ParadeCommand", 1)
addAbility(NewShipType, "WaypointMove")
addAbility(NewShipType, "HyperSpaceCommand", 1, 2, 500, 1000, 0, 3)
addAbility(NewShipType, "CanAttack", 1, 1, 0, 0, 0.35, .85, "BigCapitalShip, SmallCapitalShip, Capturer, Frigate, SubSystem, Mothership, Corvette, Fighter, Utility, munition", "FlyRound",
{
Fighter = "MoveToTargetAndShoot",
},
{
Corvette = "MoveToTargetAndShoot",
},
{
Utility = "Frontal",
},
{
Munition = "MoveToTargetAndShoot",
},
{
SubSystem = "FrontalVsSubSystem", })
addAbility(NewShipType, "GuardCommand", 74, 3000, 1400)
addAbility(NewShipType, "CanBeCaptured", 160, 0.5)
addAbility(NewShipType, "CanBeRepaired")
LoadModel(NewShipType, 1)
StartShipWeaponConfig(NewShipType, "Hgn_TestPhaser", "Weapon_HullPhaser", "Weapon_HullPhaser")
StartShipWeaponConfig(NewShipType, "Hgn_TestPhoton", "Weapon_QuantumTorpedo", "")
StartShipHardPointConfig(NewShipType, "Main Phaser Array", "Hardpoint_MainPhaserArray", "Weapon", "Innate", "Damageable", "Hgn_SovPhasers", "", "", "", "", "", "", "", "")
addShield(NewShipType, "EMP", 500, 20)
NewShipType.battleScarMaxTriBase = 175
NewShipType.battleScarMaxTriInc = 250
NewShipType.sobDieTime = 4
NewShipType.sobSpecialDieTime = 1
NewShipType.specialDeathSpeed = 40
NewShipType.chanceOfSpecialDeath = 0
NewShipType.deadSobFadeTime = 0
NewShipType.trailLinger = 2
--setEngineBurn(NewShipType, 9, 0.2, 0.5, 300, 1.02, 0.1, 0.25, 380)
--setEngineGlow(NewShipType, 1, 1, 1.02, 20, 300, 50, 1.5,
-- { 1, 0.47, 0, 0.2, })
loadShipPatchList(NewShipType, "data:sound/sfx/ship/Hiigaran/MegaShip/", 0, "Engines/HDreadnaughtEng", "", 1, "Ambience/HMotherShipAmb", "")


-- LuaDC version 1.0.1
-- 7/28/2007 12:46:58 PM
-- LuaDC by Age2uN
-- on error send source file (compiled lua) and this outputfile to Age2uN@gmx.net
--
NewSubSystemType = StartSubSystemConfig()
NewSubSystemType.displayedName = "Primary Phaser Array"
NewSubSystemType.sobDescription = "Phasers"
NewSubSystemType.tacticalIcon = "hexagon"
NewSubSystemType.tacticalIconMinSize = 0.0035
NewSubSystemType.tacticalIconMinFadeSize = 0.0045
NewSubSystemType.tacticalIconMaxFadeSize = 0.008
NewSubSystemType.groupMergeSize = 0.001
NewSubSystemType.mouseOverMinFadeSize = 0.045
NewSubSystemType.mouseOverMaxFadeSize = 0.1
NewSubSystemType.maxhealth = 50000
NewSubSystemType.regentime = 50
NewSubSystemType.nlips = 0
NewSubSystemType.nlipsRange = 0
NewSubSystemType.nlipsFar = 0
NewSubSystemType.nlipsFarRange = 0
NewSubSystemType.meshRenderLimit = 0.004
NewSubSystemType.minimumZoomFactor = 0.68
NewSubSystemType.selectionLimit = 5000
NewSubSystemType.preciseATILimit = 5000
NewSubSystemType.selectionPriority = 37.5
NewSubSystemType.type = "Weapon"
NewSubSystemType.typeString = "MainPhaserArray"
NewSubSystemType.collateralDamage = 1000
NewSubSystemType.inactiveTimeAfterDamage = 20
NewSubSystemType.activateHealthPercentage = 0.1
NewSubSystemType.costToBuild = 2000
NewSubSystemType.timeToBuild = 10
NewSubSystemType.isResearch = 0
NewSubSystemType.visible = 1
NewSubSystemType.innate = 1
LoadHODFile(NewSubSystemType, 1)
NewSubSystemType.BuildFamily = "SubSystem_Hgn"
NewSubSystemType.AttackFamily = "SubSystem"
NewSubSystemType.DockFamily = "CantDock"
NewSubSystemType.DisplayFamily = "SubSystemModule"
NewSubSystemType.ArmourFamily = "SubSystemArmour"
StartSubSystemWeaponConfig(NewSubSystemType, "Hgn_TestPhaserMain", "Weapon_Phaser0", "")
StartSubSystemWeaponConfig(NewSubSystemType, "Hgn_TestPhaserMain", "Weapon_Phaser1r", "")
StartSubSystemWeaponConfig(NewSubSystemType, "Hgn_TestPhaserMain", "Weapon_Phaser1l", "")
StartSubSystemWeaponConfig(NewSubSystemType, "Hgn_TestPhaserMain", "Weapon_Phaser2r", "")
StartSubSystemWeaponConfig(NewSubSystemType, "Hgn_TestPhaserMain", "Weapon_Phaser2l", "")
StartSubSystemWeaponConfig(NewSubSystemType, "Hgn_TestPhaserMain", "Weapon_Phaser3r", "")
StartSubSystemWeaponConfig(NewSubSystemType, "Hgn_TestPhaserMain", "Weapon_Phaser3l", "")
StartSubSystemWeaponConfig(NewSubSystemType, "Hgn_TestPhaserMain", "Weapon_Phaser4r", "")
StartSubSystemWeaponConfig(NewSubSystemType, "Hgn_TestPhaserMain", "Weapon_Phaser4l", "")

vnL
29th Jul 07, 4:38 PM
"", "", "", "", "", "", "", "")
What is that about? I've never seen so many "" in a StartShipHardpointConfig().

"Main Phaser Array",
Try "MainPhaserArray", so with no spaces.


If above doesnt help, try replacing the "Weapon_Phaser0/1/2/3/4" parts in the .sub file by working .wepn names. If that works then you should take a look at your custom created Weapon_Phaser weapon files. Perhaps you are directing to incorrect weaponfire scripts or something is wrong in the fx files?? I can imagine you don't want to give price that much of your modded weaponry, but if you cannot find the problem you have to give more details :)

XcaliberCrusade
29th Jul 07, 5:10 PM
I've tried with or without all those ""'s and I get the crash either way. Those are just there If I wanted a different subsystem there.

I've also tried a bunch of stuff in place of Main Phaser Array to no avail...

I'll try the weapon thing later today, perhaps I just haven't been looking in the right place after all...

XcaliberCrusade
30th Jul 07, 3:45 PM
Sorry to double post here, but nothing is working. I searched the forums and a couple of people have had this issue before, but some didn't solve it and the only solution I can find was a random coincidence and doesn't work for me... :banghead:

If anybody has encountered/fixed this issue please help...

Thanks!

Sobani Exile
30th Jul 07, 4:05 PM
You know insted of double posting you can just edit your post
just to let you know :D :rant: :p

XcaliberCrusade
30th Jul 07, 4:11 PM
Yes, however if I double post the thread will get attention, instead of dissapearing after a single silent edit.

But you didn't hear that from me...

:nervous:

Zatch
31st Jul 07, 6:26 AM
I heard it. Don't double post unless it's been several (http://dictionary.reference.com/search?q=several&x=0&y=0) days, please. :spin:

Sobani Exile
31st Jul 07, 6:43 AM
Zatch why did you link several to a dictionary site? alot of us are old enough to know what several means.

XcaliberCrusade
31st Jul 07, 7:08 AM
Ok sorry 'bout that.

Perhaps we should try to get a little back on topic, no offense.

I still can't find the issue, as I've forced scripting problems and the log catches them. So I think the issue may be with my hod. it is 178 polys with no textures and a material called hw2Shader which has the innatess.st shader applied. I've narrowed down my issues to the following:

Perhaps the fact that the CM is automatically titled Root_CM, the hod is having trouble loading both the ships Root_CM and the Subsystem's at the same time. I don't know how to fix this one.

The subsystem has a BSRM attached, which might cause problems. Y/N?

Thats it for now... 'cept for the stupid trojan remnant (or should I say carcass) on my comp that's messing up my internet...

ford6
31st Jul 07, 7:35 AM
I've had a simular problem.

Try remarking out the subsystems abuilitys "--", and see if the game loads and subsystem is buildable.

If it builds then the problem is in the abuility, if not give the research a good look.

For some reason, when theres an error in a subsystem moduals abuility, its not listed in the log. I guess the games engine dosent know how to tell us where the error is in something called from a subsystem.

I finaly found my prroblem by making the subsystem abuility a abuilty of the ship, and when it errored out, there was the error in the log. Damn typo in the abuility makeing the game look for a non-existant file.

Dim@
31st Jul 07, 2:32 PM
Well, i don't know what your problem is, but i can help you find it.
Here is a what i do every time my game crashes after modifications to a ship, subsystem or weapon

1.
put your modified subsystem on an original (not modded) HW2 ship that is meant to have subsystems, like the hgn carrier. If it works move on to step 2, if not, move on to step 3.

2.
It seems that your problem is with the ship. Try using your modified ship file on the carrier *Hod and vice-versa, each time attaching the subsystem, that way you should figure out what's wrong
END

3.
clearly, your problem is with your subsystem. put your weapon on another subsystem that is meant to have weapons (bc ion turret for instance) and attach that to the carrier. If it works move on to step 4, if not, move on to step 5.

4.
Your problem seems to be with your subsystem. Try using your modified subs file on the bc *hod file and vice-versa, ech time attaching the weapon. That way you should figure out what's wrong. Once you've fixed it, attach your configured subsystem to your modified ship. If the game crashes again, you propably have a problem with your ship as well, so go back to step 1.

5.
your problem is with your weapon. Try and fix it then put it back onto the bc turret. Once it works, put it on your modded subsystem and, if the game crashes, go back to step 3.

If you don't understand something i wrote please ask me to explain

XcaliberCrusade
31st Jul 07, 2:48 PM
Ok, I've gotten to step 4, and need a little elaboration on what exactly you want me to do...

EDIT: Nvm, the issue is with the innateSS.st shader. for some reason it just won't load. If somebody knows how to fix this, please tell me...

XcaliberCrusade
1st Aug 07, 6:02 PM
Ok update here, I can't get the innatess shader to work, so I just applied the normal ship texture/glow with the ship.st shader. Now the subsystem works as normal, however I noticed something wrong...

Instead of 'blending in' with the ship like it should (they have identical textures and proper uv coords) it is very bright.

Upon closer inspection I found that the subsystem was actually better than the ship itself, as my ship, I noticed, was not showing any specular data at all. i.e. the subsystem reflected the star and all of the firing flashes from other ships, while my ship, although the texture could be seen, remained dark.

I don't understand how this is possible since both the subsystem and ship use the same textures with the same shader...

If this is too off topic would a mod split this thread...

Here's some screens:

http://i92.photobucket.com/albums/l10/XcaliberCrusader/ss00007.jpg
http://i92.photobucket.com/albums/l10/XcaliberCrusader/ss00008.jpg