View Full Version : THe weapon files
Ammon Ra
11th Sep 03, 8:30 AM
*.wepn
after some edditing i cleaned the ion cannon weapon up, its patheticly simple though ;)
Lua@X:\Homeworld2\Data\Weapon\Hgn_IonCannon\Hgn_IonCannon.wepn
StartWeaponConfig
{
NewWeaponType
{
Gimble
InstantHit
IonBeam
Normal
AddWeaponResult
Hit
DamageHealth
}
{
Target
Push
setPenetration
PlanetKillerArmour
SubSystemArmour
ResArmour
}
{
setAccuracy
Fighter
Corvette
munition
SetAngles
}
}
and no that formatting wasn't included, i just added as i thought it might be.
Ammon Ra
11th Sep 03, 8:36 AM
this is called the "bigtorpedoelauncher..now there is a destroyer torpedoe weapon, and the mLRS effect of the torpedoe frigate. could this be the larger torpedoe that splits up inot the 4 smaller ones?
Lua@X:\Homeworld2\Data\Weapon\Hgn_BigTorpedoLauncher\Hgn_BigTorpedoLauncher.wepn
StartWeaponConfig
{
NewWeaponType
{
Fixed
Missile
Hgn_LongRangeTorpedo
Special Attack //special? Maybe the MRL effect?
Normal
}
AddWeaponResult
Hit
DamageHealth //the damage the weapon does??
Target
setPenetration
PlanetKillerArmour
setAccuracy
{
Fighter
Corvette
munition
}
setAngles
setMiscValues
well the destroyer torpedoe is almost the same as the above one except for the following:
NewWeaponType
Fixed
Missile
Hgn_LongRangeTorpedo
Normal Only
Normal
it has two normal values...??
still th weapons effects seem to be very simple...Seem...
okay, found the missile folder in the big file. i am surprised that missiles have their own logic...even folder.
ow to continue to tear those files apart and find asmuch info as possible...as i do want to know how the torpedoe frigate missiles work and see what i can do with it :)
Ammon Ra
11th Sep 03, 8:53 AM
Breakthrough..heheh.it seems that relic "forgot" to encode a file...
the missile folder in the hw2.big file..go on take a look ;)
the *.Miss files are still in their original format :D
now to see if changing this file does anythiong to the game..heheheheh...
here ya go, its the clustar missile,EDITthis is clustarmissileA file. it is the large torpedoe that splits up into the 4 smaller ones. those are in the clustarmissileB folder.
Also note that theVaygr infiltrator pod has a missile logic attached to it...
. Go on, tear those files apart!
--===========================================================================
-- Purpose : Lua definition file for Homeworld Ship.
-- Contains loading information and flight dynamics information (among other things?)
--
-- Copyright Relic Entertainment, Inc. All rights reserved.
--===========================================================================
NewShipType = StartMissileConfig()
NewShipType.displayedName="$1558"
NewShipType.sobDescription="$1559"
NewShipType.TOScale=1
NewShipType.TODistanceFade0=7000
NewShipType.TODistanceDisappear0=5000
NewShipType.TODistanceFade1=350
NewShipType.TODistanceDisappear1=300
NewShipType.TODistanceFade2=25000
NewShipType.TODistanceDisappear2=12000
NewShipType.TOGroupScale=1
NewShipType.TOGroupMergeSize=0
NewShipType.mouseOverMinFadeSize=0.045
NewShipType.mouseOverMaxFadeSize=0.1
NewShipType.maxhealth=40
NewShipType.regentime=0
NewShipType.sideArmourDamage=1
NewShipType.rearArmourDamage=1
NewShipType.maxShield=0
NewShipType.shieldRechargeTime=0
NewShipType.nlips=0.0004
NewShipType.nlipsRange=75000
NewShipType.nlipsFar=0.0005
NewShipType.nlipsFarRange=100000
NewShipType.SMRepresentation="Invisible"
NewShipType.meshRenderLimit=4000
NewShipType.dotRenderLimit=4000
NewShipType.minLOD=0.2
NewShipType.upLOD=300
NewShipType.upLOD=500
NewShipType.downLOD=305
NewShipType.downLOD=500
NewShipType.minimumZoomFactor=0.55
NewShipType.selectionPriority=30
NewShipType.weaponName="Hgn_TorpedoLauncher"
NewShipType.lifeTime=20
NewShipType.launchTime=0
NewShipType.detectionDistance=1000
NewShipType.clusterDistance=750
NewShipType.numberSubMunitions=4
NewShipType.subMunitionName="Hgn_ClusterTorpedoB"
NewShipType.clusterAngle=65
NewShipType.sobDieTime=0.5
NewShipType.density=1
NewShipType.thrusterMaxSpeed=250
NewShipType.mainEngineMaxSpeed=250
NewShipType.rotationMaxSpeed=260
NewShipType.thrusterAccelTime=3
NewShipType.thrusterBrakeTime=3
NewShipType.mainEngineAccelTime=3
NewShipType.mainEngineBrakeTime=3
NewShipType.rotationAccelTime=0.6
NewShipType.rotationBrakeTime=0.6
NewShipType.thrusterUsage=0.5
NewShipType.accelerationAngle=60
NewShipType.mirrorAngle=30
NewShipType.maxBankingAmount=85
NewShipType.descendPitch=0
NewShipType.goalReachEpsilon=5
NewShipType.controllerType="Missile"
NewShipType.slowdownFactor=0.5
NewShipType.tumbleStaticX=0
NewShipType.tumbleStaticY=0
NewShipType.tumbleStaticZ=0
NewShipType.tumbleDynamicX=0
NewShipType.tumbleDynamicY=0
NewShipType.tumbleDynamicZ=0
NewShipType.tumbleSpeed=0
NewShipType.targetAngle=5
NewShipType.spiralsPerSecondMin=0.5
NewShipType.spiralsPerSecondMax=0.6
NewShipType.BuildFamily="NotBuildable"
NewShipType.AttackFamily="UnAttackable"
NewShipType.DockFamily="CantDock"
NewShipType.AvoidanceFamily="DontAvoid"
NewShipType.DisplayFamily="Munition"
NewShipType.AutoFormationFamily="Fighter"
NewShipType.ArmourFamily="Unarmoured"
LoadHODFile(NewShipType,1);
setEngineTrail(NewShipType,0,15,"trail_ribbon.tga",0.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/NonMilitary/Engines/"
,0,"HTorpedoEng");
also note that the lines of the missile are very similar to "real" ships...or buildable ones.
EDIT
NewShipType.maxShield=0
NewShipType.shieldRechargeTime=0
SHields!!!! or field frigate upgrade. now people that like shields will be happy, i hope. or relic will be a bit annoyed that i found this file :D:D
Ammon Ra
11th Sep 03, 9:14 AM
Nooo...Bah, ok the big file (the demo) is unmodable, or from what i did. i will double check in any case, just to be sure :D
i set the sub amunition in clustarmissile to "8" but the frigates still break up into 4 sub amunition. or ill change it so that its distinctivly different. note that the damage isn't located in the *.miss file
well, at least we know the ship(missile) format ;)
edit: nope. wont work. well the clock, doesnt work either so...;)
thrawn
11th Sep 03, 10:13 AM
Your changes didn't affect the game because the demo (unlike the full game!) does not look for updated files. But that's no surprise, Half-Life wouldn't have selled that much if all the mods for it worked with the demo. ;)
edit: "NewShipType.AttackFamily="UnAttackable""
Does this mean we can make point-defense-weapons just by removing 2 letters? *thinks of flak frigates being able to shoot down incoming torps* :clap:
Ammon Ra
11th Sep 03, 10:17 AM
lol yeah :(
but still the files reveal alot of information.
And the "patch" folder does rais questions ;)
edit: but i could mod the hw2 demo. heh i even tried some of the mods, and they worked (to a certain extent. :P or as far as my memory holds :D
Arioch
11th Sep 03, 11:17 AM
Good job finding the uncompiled entry... that will help make sense of the others.
Ammon Ra
11th Sep 03, 11:47 AM
also, now that we have an uncompiled lua (miss) file, a compiled file, shouldn't it be possible to figure out the compressing file? the encoding file?
btw, where do i find a sga compressor? i think i found a way to modify the game :flamer: ;)
Arioch
11th Sep 03, 11:55 AM
If we had a compiled and uncompiled version of the same source file we could match up the integer values and figure it out, but not as easily with two different items. I'm looking into the Lua compiler (luac) to see what it does; I may be able to figure out from that what needs to be done. It's not encrypted or anything, just compiled into a binary Lua "chunk".
thrawn
11th Sep 03, 12:00 PM
Well, seems like my last question was quite misplaced (edited old post while a new one was made :P), so here it is again:
NewShipType.AttackFamily="UnAttackable"
Does this mean we can make point-defense-weapons just by removing 2 letters? (For example, making the flak frigate auto-target incoming torps?)
Ammon Ra
11th Sep 03, 12:01 PM
Bleah..true.
well in the nis folder there are some uncompiled scripts...
YAY!!!! found another bunch of uncompiled lua files :D
im getting good at this :p
Edit: yes i guess that if you but it to "attackable" then it the torpedoe can be destroyed. i guess so...not sure
NewResourceType.AttackFamily="Resource"
so you have "unattackabl", "attackable" and "resource" those three i have found.
The dustcloud folder contains them.
--===========================================================================
-- Purpose : Lua definition file for Homeworld Resource.
-- Contains basic resource members.
--
-- Copyright Relic Entertainment, Inc. All rights reserved.
--===========================================================================
NewResourceType = StartDustCloudConfig()
NewResourceType.displayedName="2510"
NewResourceType.sobDescription="2511"
NewResourceType.TOScale=1
NewResourceType.TODistanceFade0=624.999639015442
NewResourceType.TODistanceDisappear0=500
NewResourceType.TODistanceFade1=125
NewResourceType.TODistanceDisappear1=100
NewResourceType.TODistanceFade2=2500
NewResourceType.TODistanceDisappear2=2000
NewResourceType.TOGroupScale=1
NewResourceType.TOGroupMergeSize=0.01
NewResourceType.maxhealth=100000
NewResourceType.regentime=0
NewResourceType.nlips=0
NewResourceType.nlipsRange=0
NewResourceType.nlipsFar=0
NewResourceType.nlipsFarRange=0
NewResourceType.SMRepresentation="Mesh"
NewResourceType.meshRenderLimit=25000
NewResourceType.dotRenderLimit=10
NewResourceType.visibleInSecondary=1
NewResourceType.minLOD=0.25
NewResourceType.upLOD=300
NewResourceType.upLOD=800
NewResourceType.downLOD=315
NewResourceType.downLOD=815
NewResourceType.minimumZoomFactor=0.68
NewResourceType.selectionSizeMin=0
NewResourceType.selectionSizeMax=0.02
NewResourceType.relativeMoveFactor=0
NewResourceType.selectionPriority=35
NewResourceType.useEngagementRanges=0
NewResourceType.pixelSize=1
NewResourceType.pixelColour={1.0, 0.349, 0.199, 1.0}
NewResourceType.lightningEffectName="lightning_combo"
NewResourceType.chargedLightningEffectName="lightning_charged"
NewResourceType.damageMultiplier=1
NewResourceType.DockFamily="Resource"
NewResourceType.AvoidanceFamily="None"
NewResourceType.AttackFamily="Resource"
Ammon Ra
11th Sep 03, 12:06 PM
Found another type of uncompiled lua files
this is in the "cloud" folder. again its a resource. and yes asteroids are compressed
--===========================================================================
-- Purpose : Lua definition file for Homeworld Resource.
-- Contains basic resource members.
--
-- Copyright Relic Entertainment, Inc. All rights reserved.
--===========================================================================
NewResourceType = StartCloudConfig()
NewResourceType.displayedName="2510"
NewResourceType.sobDescription="2511"
NewResourceType.TOScale=1
NewResourceType.TODistanceFade0=624.999639015442
NewResourceType.TODistanceDisappear0=500
NewResourceType.TODistanceFade1=125
NewResourceType.TODistanceDisappear1=100
NewResourceType.TODistanceFade2=2500
NewResourceType.TODistanceDisappear2=2000
NewResourceType.TOGroupScale=1
NewResourceType.TOGroupMergeSize=0.01
NewResourceType.maxhealth=100000
NewResourceType.regentime=0
NewResourceType.nlips=0
NewResourceType.nlipsRange=0
NewResourceType.nlipsFar=0
NewResourceType.nlipsFarRange=0
NewResourceType.SMRepresentation="Mesh"
NewResourceType.meshRenderLimit=25000
NewResourceType.dotRenderLimit=10
NewResourceType.visibleInSecondary=1
NewResourceType.minLOD=0.25
NewResourceType.upLOD=300
NewResourceType.upLOD=800
NewResourceType.downLOD=315
NewResourceType.downLOD=815
NewResourceType.minimumZoomFactor=0.68
NewResourceType.selectionSizeMin=0
NewResourceType.selectionSizeMax=0.02
NewResourceType.relativeMoveFactor=0
NewResourceType.useEngagementRanges=0
NewResourceType.pixelSize=1
NewResourceType.pixelColour={1.0, 0.349, 0.199, 1.0}
NewResourceType.lightningEffectName="lightning_combo"
NewResourceType.chargedLightningEffectName="lightning_charged"
NewResourceType.resourceValue=10000
NewResourceType.blobRadius=4000
NewResourceType.maxVelocity=0
NewResourceType.maxAngularVelocity=0.05
NewResourceType.linearFriction=0.5
NewResourceType.angularFriction=0.5
NewResourceType.mass=13.2
NewResourceType.Ixx=100
NewResourceType.Iyy=100
NewResourceType.Izz=100
NewResourceType.DockFamily="Resource"
NewResourceType.AvoidanceFamily="None"
NewResourceType.AttackFamily="Resource"
So that gives us three styles of uncompressed/encrypted lua files. now if some1 could lead me to a sga compressor i can creat the first hw2 demo mod :D
thrawn
11th Sep 03, 12:16 PM
Nah, it isn't THAT much time until we get the full thing. Just preordered it for 30 euros *including* shipping. I LOVE eBay :D
Ammon Ra
11th Sep 03, 12:17 PM
well, its 15, or 2 weeks untill i get it so :P
thrawn
11th Sep 03, 2:19 PM
Just wanted to show how cool I am, because I get it that cheap, without being called a spamer :D
TyrealMathias
11th Sep 03, 2:51 PM
5 days here... :-D
Arioch
11th Sep 03, 3:07 PM
I've built a 5.0 version of the Lua compiler (luac) from the source code at Lua.org (http://www.lua.org/download.html), and run the uncompiled hgn_clustertorpedoa.miss file through, so now we have both a compiled and uncompiled example. It's likely that the complier is not exactly the same version as that used by Relic, but the output looks very close. I have them uploaded here:
http://homeworldshipyards.com/hw2/lab/
hgn_clustertorpedoa.miss is the uncompiled verison.
lua_hgn_clustertorpedoa.miss is the luac 5.0 compiled version.
I've also included the source code to luac.c and print.c, which is what writes out the bytecodes.
Arioch
11th Sep 03, 4:21 PM
On closer inspection, the output produced by the v5 luac is very similar in pattern to the HW2 files, but not the same; the bytecode is different. Relic is either using an earlier version, or one that they customized themselves.
I've had enough of this.
Naquaii
11th Sep 03, 5:30 PM
Aren't they using lua 4.0 or 4.01 or something like that?
TyrealMathias
11th Sep 03, 6:18 PM
heh, dont give up Arioch, youve gone so far for those luas..
Valkrie
11th Sep 03, 8:13 PM
Yeah it was on another thread. The version of LUA HW2 uses is 4.0.1.
nickersonm
11th Sep 03, 8:47 PM
They use version 4.0, I believe. This could be 4.0.1. Try passing a script (such as texture.lua in the base dir) to lua.exe. It will respond with:
>lua texture.lua
lua: texture.lua too old: read version 4.0; expected at least 5.0
http://forums.relicnews.com/showthread.php?s=&threadid=15249
- nickersonm
Ammon Ra
12th Sep 03, 8:39 AM
Meh...any1 create a 4.0/4.01 luac reader/compiler??? please??? :D
Arioch
12th Sep 03, 11:03 AM
I've downloaded the 4.0 Lua source code and got it to compile. I still get an error loading the .ship files, but this is probably because the .ship file is code that's expecting a table (the ship data structure) that I of course don't have. Since I don't know Lua, it's going to take some time to figure it out.
Ammon Ra
12th Sep 03, 11:15 AM
Hurrah for boo...:D...erm For Arioch!!!
now if knew/had knowledge of how to compile stuff, i would try it also, but im no programmer ;) (lodder/modder/designer)
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.