PDA

View Full Version : The ship files.



Ammon Ra
10th Sep 03, 12:53 PM
Ok, i know that the lua ship files are encodded. however, i still managed to get this bunch of lines. i took this from the HGN_interceptor, but apparently there are lines that dont apply to the interceptor. Therefore the ship statistics can be done in aspreadsheet. and you can use a spreadsheet to encode another spreadsheet. so that would be the spreedsheet that we want. the sheet that can de-code the encoded lua files.

edit: i mean a matrix format. you can encode a matrix file with many othe matricies. technicly a spreadsheet is a matrix.

But still withough the de-coding spreadsheet, i gaines these lines from the interceptor:



Lua X:\Homeworld2\Data\Ship\Hgn_Interceptor\Hgn_Interceptor.ship

NewShipType
StartShipConfig
displayedName
sobDescription

maxhealth XX // max armour
regentime XX //time to regen health (?)
minRegenTime XX //min regen time
sideArmourDamage XX //apparently ships have different armour values for different sides
rearArmourDamage XX
isTransferable XX //you can transfer the ship in MP games
useEngagementRanges XX
unitCapsNumber XX
SquadronSize XX //number of ships that are build. i.e. 5 for bombers
formationSpacing XX
passiveFormation Broad
defensiveFormation Delta
aggressiveFormation Claw
mass XX //self explanatory
collisionMultiplier XX

//thrust and manouverability lines

thrusterMaxSpeed XX
mainEngineMaxSpeed XX
rotationMaxSpeed XX
thrusterAccelTime XX
thrusterBrakeTime XX
mainEngineAccelTime XX
mainEngineBrakeTime XX
rotationAccelTime XX
rotationBrakeTime XX
thrusterUsage XX
accelerationAngle XX mirrorAngle XX
secondaryTurnAngle XX
maxBankingAmount XX
descendPitch XX
goalReachEpsilon XX
slideMoveRange XX
controllerType XX
Ship XX
tumbleStaticX XX
tumbleStaticY XX
tumbleStaticZ XX
tumbleDynamicX XX
tumbleDynamicY XX
tumbleDynamicZ XX
tumbleSpecialDynamicX XX
tumbleSpecialDynamicY XX
tumbleSpecialDynamicZ XX
relativeMoveFactor XX
swayUpdateTime XX
swayOffsetRandomX XX
swayOffsetRandomY XX
swayOffsetRandomZ XX
swayBobbingFactor XX
swayRotateFactor XX
dustCloudDamageTime XX //ion cannons firing into dust/nebulae clouds do X amount of damage to this specific ship (?)
nebulaDamageTime XX //
MinimalFamilyToFindPathAround XX

//manouvers the ship does when attacking certain ships.

SuperCap XX
mirrorAboveManeuver,
ImmelMann_speedy,
OneEightyDegRightTurn,
OneEightyDegLeftTurn,
ImmelMann_speedy,
ImmelMann_speedy,
ImmelMann_speedy
mirrorBelowManeuver
Split_S_speedy,
OneEightyDegRightTurn,
OneEightyDegLeftTurn,
Split_S_speedy,
Split_S_speedy,
Split_S_speedy,
specialTurnLeftManeuver,
NinetyDegLeftTurn,
None, None,
specialTurnRightManeuver,
NinetyDegRightTurn,
None, None,
testManeuver1,
RollCW,
testManeuver2,
RollCCW,
testManeuver3,
Loop,

BuildFamily XX //
Fighter_Hgn XX
AttackFamily Fighter
DockFamily XX
AvoidanceFamily XX
Strikecraft True // ??
DisplayFamily XX
AutoFormationFamily XX
CollisionFamily XX
Small True // ??
ArmourFamily Light // Strikecraft
Unarmoured False //??

//For the ai maybe...or for other purposes
UnitCapsFamily XX
fighterValue XX
corvetteValue XX
frigateValue XX
neutralValue XX
antiFighterValue 1 //Good antifighter
antiCorvetteValue 0 // bad antivette
antiFrigateValue 0 // bad anti frigate
totalValue XX
buildCost 500
buildTime 30
buildPriorityOrder XX
retaliationRange XX //range that ship will attack others //??
retaliationDistanceFromGoal XX
visualRange XX //selfexplanetory
prmSensorRange XX //primary sensor range
secSensorRange XX //secondary sensor range Difference??
detectionStrength XX

//maybe to do with the visual agressive/passive/neutral icons over a ship

TOIcon XX
Triangle XX
TOScale XX
TODistanceFade0 XX
TODistanceDisappear0 XX
TODistanceFade1 XX
TODistanceDisappear1 XX
TODistanceFade2 XX
TODistanceDisappear2 XX
TOGroupScale XX
TOGroupMergeSize XX
mouseOverMinFadeSize XX
mouseOverMaxFadeSize XX
healthBarStyle XX //there are different HB styles!!

//Nlips

nlips XX
nlipsRange XX
nlipsFar XX
nlipsFarRange XX
SMRepresentation XX
HardDot XX
meshRenderLimit XX
dotRenderLimit XX
visibleInSecondary XX
minLOD XX
goblinsStartFade XX //goblins! run :p
goblinsOff XX
upLOD XX
downLOD XX
minimumZoomFactor XX
selectionLimit XX
preciseATILimit XX
selectionPriority XX
militaryUnit XX
addAbility XX
MoveCommand XX

//Carrier, MS, SY, BC commands only i think

CanDock True //false? Destroyers, frigates ect ??
dockTimeBetweenTwoFormations XX //build-able ships only i guess ??
dockTimeBeforeStart XX
dockNrOfShipsInDockFormation XX
dockFormation XX
dockline XX
queueFormation XX
n_delta XX
ignoreRaceWhenDocking XX
CanLaunch XX //carrier/ms/SY/BC only
launchTimeBetweenTwoFormations XX
launchTimeBeforeStart XX
launchNrOfShipsInDockFormation XX
launchFormation XX
ParadeCommand XX
WaypointMove XX

CanAttack:
Fighter, Corvette, Frigate, Utility, SmallCapitalShip, BigCapitalShip, Mothership
FlyBy_Interceptor_vs_Frigate
Flyby_Interceptor_vs_Fighter
SubSystem;
TopAttack_Interceptor_vs_Subsystem
SmallCapitalShip
Flyby_Interceptor_vs_CapShip
BigCapitalShip
Mothership
Flyby_Interceptor_vs_Mothership
ResourceLarge
Flyby_Interceptor_vs_ResourceLarge
GuardCommand
HyperspaceViaGateCommand
RetireAbility
LoadModel
StartShipWeaponConfig
Hgn_KineticAutoGun
Weapon_FrontGun
Fire
addShield
EMP // has emp ??
sobDieTime
sobSpecialDieTime
specialDeathSpeed
chanceOfSpecialDeath
deadSobFadeTime
setEngineTrail
trail_ribbon.tga XX
setEngineBurn XX
loadShipPatchList=data:sound/sfx/ship/Hiigaran/Fighter/


no the lua files arent like this. :p
i spent a few dozen minuits editing the HGN_interceptor to get this "valuable" data.

*waits for relic devs to com and bash self*:p

Arioch
10th Sep 03, 12:59 PM
I was able to get that much as well, but without better formatting it's hard to know for sure which strings represent field names and which are value names. Still, it's more than nothing.

For example, you can tell the number and class-names of weapons, subsystems, etc.

Ammon Ra
10th Sep 03, 1:03 PM
:) still, the format seems very spreadsheet like, or matrix like. and matricies/spreadsheets can be encoded with another matrix/spreadsheet. i guess that's the spreadsheet that mecha is telling us that we need.

in any case the above is a start ;)

Hopalong
10th Sep 03, 1:44 PM
I think it's odd that they used a spreadsheet to compile the .shp files for HW2. When I was modding HW, that's what i did: I had a spreadsheet with a macro that wrote everything to the proper place. It made editing ships much easier. I can't seem to find it at present, and that's a bummer....

TyrealMathias
10th Sep 03, 3:29 PM
I bet money that Relic is stroking their chins thinking "they know too much..." god, i love this community :-D

spreadsheet seems like the most logical approach.. uurrrrgh... I hope the RDN tools are on the HW2 CD.. mwuahahaha....

Alex Drake
10th Sep 03, 3:58 PM
Its this bit that interests me most (in terms of my modding);



SuperCap XX
mirrorAboveManeuver,
ImmelMann_speedy,
OneEightyDegRightTurn,
OneEightyDegLeftTurn,
ImmelMann_speedy,
ImmelMann_speedy,
ImmelMann_speedy
mirrorBelowManeuver
Split_S_speedy,
OneEightyDegRightTurn,
OneEightyDegLeftTurn,
Split_S_speedy,
Split_S_speedy,
Split_S_speedy,
specialTurnLeftManeuver, <---
NinetyDegLeftTurn,
None, None,
specialTurnRightManeuver, <---
NinetyDegRightTurn,
None, None,
testManeuver1,
RollCW,
testManeuver2,
RollCCW,
testManeuver3,
Loop,


I'd just like to direct your attention those two maneuvers. Now if memory serves, deleting those lines will force the comp to choose the opthers. In fact, I'd simply remove the others I marked too (the 90 degree turns may be left in, not sure yet). Now the thing to know is whether there are any frequency values to screw with, as that would let a modder prioritize certain maneuvers rather than flat-out deleting them.

Ghent
11th Sep 03, 2:39 AM
nope, they're encoded so you're not likely seeing the proper formatting of the FlightMan section (that's what we called it in original HW).

My guess is that theres a "header" for the maneuver name, self explanatory really, then following are the types of moves contained within that particular manuever. Just look at the names & structure there in that section.

more like this:


Maneuvers:
{ mirrorAboveManeuver
{ ImmelMann_speedy
OneEightyDegRightTurn
OneEightyDegLeftTurn
ImmelMann_speedy
ImmelMann_speedy
ImmelMann_speedy
}
}

..and so on.

Ammon Ra
11th Sep 03, 7:56 AM
well, in the lua file thare was a comma after those files, but i doubt that the comas were seperators. ;)

if it is that structure, then the ship file could get a bit more complicated to edit.

Btw, spreadsheet, does that mean i neeed to go buy MS exel?!?!?! :p:p :nyah:

Ammon Ra
11th Sep 03, 10:15 AM
Okay, using the missile ship as a bassis, i have turned the above gibberish into this:




--===========================================================================
-- Purpose : Lua definition file for Homeworld Ship.
-- Contains loading information and flight dynamics information (among other things?)
--
-- Copyright Relic Entertainment, Inc. All rights reserved.
--===========================================================================
Lua

X:\Homeworld2\Data\Ship\Hgn_Interceptor\Hgn_Interc
eptor.ship

NewShipType. = StartShipConfig()
NewShipType.displayedName="$333"
NewShipType.sobDescription="$333"
NewShipType.maxhealth=500
NewShipType.regentime=0
NewShipType.minRegenTime=0
NewShipType.sideArmourDamage=1
NewShipType.rearArmourDamage=0
NewShipType.isTransferable=1
NewShipType.useEngagementRanges=
NewShipType.unitCapsNumber=
NewShipType.SquadronSize=5
NewShipType.formationSpacing=
NewShipType.passiveFormation=Broad
NewShipType.defensiveFormation=Delta
NewShipType.aggressiveFormation=Claw
NewShipType.mass=20
NewShipType.collisionMultiplier=
NewShipType.thrusterMaxSpeed=250
NewShipType.mainEngineMaxSpeed=250
NewShipType.rotationMaxSpeed=250
NewShipType.thrusterAccelTime=3
NewShipType.thrusterBrakeTime=3
NewShipType.mainEngineAccelTime=5
NewShipType.mainEngineBrakeTime=1
NewShipType.rotationAccelTime=5
NewShipType.rotationBrakeTime=5
NewShipType.thrusterUsage=0.5 //??
NewShipType.accelerationAngle=50
NewShipType.mirrorAngle=50
NewShipType.secondaryTurnAngle=20
NewShipType.maxBankingAmount=29
NewShipType.descendPitch=0
NewShipType.goalReachEpsilon=5
NewShipType.slideMoveRange=1
NewShipType.controllerType="Fighter" //"strikecraft"
NewShipType.Ship=
NewShipType.tumbleStaticX=0
NewShipType.tumbleStaticY=0
NewShipType.tumbleStaticZ=0
NewShipType.tumbleDynamicX=0
NewShipType.tumbleDynamicY=0
NewShipType.tumbleDynamicZ=0
NewShipType.tumbleSpecialDynamicX=0
NewShipType.tumbleSpecialDynamicY=0
NewShipType.tumbleSpecialDynamicZ=0
NewShipType.relativeMoveFactor=0
NewShipType.swayUpdateTime=0
NewShipType.swayOffsetRandomX=0
NewShipType.swayOffsetRandomY=0
NewShipType.swayOffsetRandomZ=0
NewShipType.swayBobbingFactor=0
NewShipType.swayRotateFactor=0
NewShipType.dustCloudDamageTime=0
NewShipType.nebulaDamageTime=0
NewShipType.MinimalFamilyToFindPathAround=
NewShipType.SuperCap=
NewShipType.mirrorAboveManeuver,
NewShipType.ImmelMann_speedy,
NewShipType.OneEightyDegRightTurn,
NewShipType.OneEightyDegLeftTurn,
NewShipType.ImmelMann_speedy,
NewShipType.ImmelMann_speedy,
NewShipType.ImmelMann_speedy
NewShipType.mirrorBelowManeuver
NewShipType.Split_S_speedy,
NewShipType.OneEightyDegRightTurn,
NewShipType.OneEightyDegLeftTurn,
NewShipType.Split_S_speedy,
NewShipType.Split_S_speedy,
NewShipType.Split_S_speedy,
NewShipType.specialTurnLeftManeuver,
NewShipType.NinetyDegLeftTurn,
NewShipType.None,
NewShipType.None,
NewShipType.specialTurnRightManeuver,
NewShipType.NinetyDegRightTurn,
NewShipType.None, None,
NewShipType.testManeuver1,
NewShipType.RollCW,
NewShipType.testManeuver2,
NewShipType.RollCCW,
NewShipType.testManeuver3,
NewShipType.Loop,
NewShipType.BuildFamily="Buildable
NewShipType.AttackFamily=Fighter
NewShipType.DockFamily="CanDock"
NewShipType.AvoidanceFamily "DontAvoid"
NewShipType.Strikecraft="Fighter_Hgn " //??
NewShipType.DisplayFamily="Fighter"
NewShipType.AutoFormationFamily="Fighter"
NewShipType.CollisionFamily="fighter"
NewShipType.Small=
NewShipType.ArmourFamily="Unarmoured"
NewShipType.UnitCapsFamily=
NewShipType.fighterValue=10
NewShipType.corvetteValue=0
NewShipType.frigateValue=0
NewShipType.neutralValue=0
NewShipType.antiFighterValue=8 NewShipType.antiCorvetteValue=2
NewShipType.antiFrigateValue=0
NewShipType.totalValue=20
NewShipType.buildCost 500
NewShipType.buildTime 30
NewShipType.buildPriorityOrder=
NewShipType.retaliationRange=400
NewShipType.others=
NewShipType.retaliationDistanceFromGoal=500
NewShipType.visualRange=700 //selfexplanetory
NewShipType.prmSensorRange=600 NewShipType.secSensorRange=800
NewShipType.detectionStrength=0
NewShipType.TOIcon=
NewShipType.Triangle=
NewShipType.TOScale=
NewShipType.TODistanceFade0=800
NewShipType.TODistanceDisappear0=
NewShipType.TODistanceFade1=
NewShipType.TODistanceDisappear1=
NewShipType.TODistanceFade2=
NewShipType.TODistanceDisappear2=
NewShipType.TOGroupScale=
NewShipType.TOGroupMergeSize=
NewShipType.mouseOverMinFadeSize=
NewShipType.mouseOverMaxFadeSize=
NewShipType.healthBarStyle=
NewShipType.nlips=0.0004
NewShipType.nlipsRange=
NewShipType.nlipsFar=
NewShipType.nlipsFarRange=
NewShipType.SMRepresentation=
NewShipType.HardDot=
NewShipType.meshRenderLimit=
NewShipType.dotRenderLimit=
NewShipType.visibleInSecondary=
NewShipType.minLOD=
NewShipType.goblinsStartFade=
NewShipType.goblinsOff=
NewShipType.upLOD=
NewShipType.downLOD=
NewShipType.minimumZoomFactor=
NewShipType.selectionLimit=
NewShipType.preciseATILimit=
NewShipType.selectionPriority=1
NewShipType.militaryUnit="Fighter" //1
NewShipType.addAbility=
NewShipType.MoveCommand=
NewShipType.CanDock=
NewShipType.dockTimeBetweenTwoFormations=
NewShipType.ships=
NewShipType.dockTimeBeforeStart=
NewShipType.dockNrOfShipsInDockFormation XX
NewShipType.dockFormation=
NewShipType.dockline=
NewShipType.queueFormation=
NewShipType.n_delta=
NewShipType.ignoreRaceWhenDocking=
NewShipType.CanLaunch=
NewShipType.launchTimeBeforeStart=
NewShipType.launchNrOfShipsInDockFormation=
NewShipType.launchFormation=
NewShipType.ParadeCommand=
NewShipType.WaypointMove=
NewShipType.CanAttack=
NewShipType.Fighter=
NewShipType.Corvette=
NewShipType.Frigate=
NewShipType.Utility=
NewShipType.SmallCapitalShip=
NewShipType.BigCapitalShip=
NewShipType.Mothership=
NewShipType.FlyBy_Interceptor_vs_Frigate=
NewShipType.Flyby_Interceptor_vs_Fighter=
NewShipType.SubSystem=
NewShipType.TopAttack_Interceptor_vs_Subsystem=
NewShipType.SmallCapitalShip=
NewShipType.Flyby_Interceptor_vs_CapShip=
NewShipType.BigCapitalShip=
NewShipType.Mothership=
NewShipType.Flyby_Interceptor_vs_Mothership=
NewShipType.ResourceLarge=
NewShipType.Flyby_Interceptor_vs_ResourceLarge=
NewShipType.GuardCommand=
NewShipType.HyperspaceViaGateCommand=
NewShipType.RetireAbility=
NewShipType.LoadModel=
NewShipType.StartShipWeaponConfig=
NewShipType.Hgn_KineticAutoGun=
NewShipType.Weapon_FrontGun=
NewShipType.Fire=
NewShipType.addShield=0
NewShipType.EMP=0
NewShipType.sobDieTime=0.5
NewShipType.sobSpecialDieTime=1
NewShipType.specialDeathSpeed=40
NewShipType.chanceOfSpecialDeath=
NewShipType.deadSobFadeTime=
setEngineTrail (NewShipType,0,15,"trail_ribbon.tga",2.2,0.5,0.025,8);
setEngineBurn (NewShipType,15,0.5,1,15,0,0.7,0.2,25);
loadShipPatchList (NewShipType, "data:sound/sfx/ship/Hiigaran/Fighter/", 0, "hscouteng");

Mod Man
11th Sep 03, 3:16 PM
what program are you using? and how are you setting it up ?

Ghent
17th Sep 03, 2:08 PM
"NewShipType.SOBDieTime=0.5 "

...heh... relic hasn't lost their dirty mouth since HW and "f--kofftohere" in the Kadeshi missions.

Mod Man
17th Sep 03, 2:18 PM
LOL well at least well be able to find the inportant varables :P

verybad
17th Sep 03, 2:54 PM
Now would it be possible to make them choose to make victory rolls if they defeat an enemy, and no one else is shooting at them at that time?

basically a couple of lines (pseudo code) I don't know how to program)
on enemyDeath
if nearestEnemyRange>x
//where X=max interceptpr sensor range for example)
newManeuver
RollCW
next


Maybe they already do this lol.

Ghent
17th Sep 03, 3:12 PM
probably not. I really go indepth into original HW flightman coding due to AI adjustments I needed to make in the KvT mod, HW:Battleship, and T-MAT mods to alter how ships flew. This is a big assumption, because I know the new method of controlling ship AI and flight maneuvers in HW2 is very different, but I dont think that would be workable. What we probably could do is simply increase the time delays and breakoff distances for maneuvers, so that IF a given ship did destroy something while on a strafing run at it, it would appear to continue to barrel roll into and through the explosion or where the target used to be.