Page 1 of 1

weapon odf

Posted: Wed Aug 22, 2007 10:24 pm
by lieutenantcoda
this must be one of the most noob questions i have ever or anyone has ever asked.

is this odf correct for a standard blaster rifle?:
[GameObjectClass]
ClassLabel = "cannon"
GeometryName = "rep_weap_inf_blaster_rifle.msh"

[Properties]
AnimationBank = "rifle"
GeometryName = "rep_weap_inf_blaster_rifle"
HighResGeometry = "rep_1st_weap_inf_blaster_rifle"

//***********************************************
//************* TARGET & RANGE VALUES **********
//***********************************************

TargetEnemy = "1"
TargetNeutral = "0"
TargetFriendly = "0"

TargetPerson = "1"
TargetAnimal = "1"
TargetDroid = "1"
TargetVehicle = "1"
TargetBuilding = "1"

MinRange = "0"
OptimalRange = "16"
MaxRange = "40"

LockOnRange = "64.0"
LockTime = "0.4"
lockOnAngle = "1.0"

ZoomMin = "2.0"
ZoomMax = "2.5"
ZoomRate = "0.0"

YawSpread = "0.25"
PitchSpread = "0.25"

SpreadPerShot = "1.1"
SpreadRecoverRate = "4.8"
SpreadThreshold = "1.6"
SpreadLimit = "6.0"

StandStillSpread = "0.0"
StandMoveSpread = "0.0"
CrouchStillSpread = "0.0"
CrouchMoveSpread = "0.0"
ProneStillSpread = "0.0"
ProneMoveSpread = "0.0"

//***********************************************
//*********** WEAPON PERFORMANCE VALUES *********
//***********************************************

RoundsPerClip = "75"
ReloadTime = "1.5"
ShotDelay = "0.2"
TriggerSingle = "0"

SalvoCount = "1"
SalvoDelay = "0.0"
InitialSalvoDelay = "0.0"
SalvoTime = "0.0"

OrdnanceName = "imp_weap_inf_rifle_ord"
FirePointName = "hp_fire"

//***********************************************
//*********** HUD & CONTROLLER VALUES *********
//***********************************************

IconTexture = "IMP_blasterrifle_icon"
ReticuleTexture = "reticule_rifle"
ModeTexture = "HUD_weap_fullauto"

MuzzleFlash = "small_muzzle_flash"
FlashColor = "255 80 80 255"
FlashLength = 0.025
FlashLightColor = "255 220 220 175"
FlashLightRadius = "2.0"
FlashLightDuration = "0.25"
Discharge = "small_smoke_effect"

RecoilLengthLight = "0.1"
RecoilLengthHeavy = "0.1"
RecoilStrengthLight = "1.0"
RecoilStrengthHeavy = "0.2"
RecoilDecayLight = "0.0"
RecoilDecayHeavy = "0.0"

//******************************************************
//*************** SOUND ****************
//******************************************************

FireSound = "imp_weap_inf_rifle_fire"
FireEmptySound = "com_weap_inf_ammo_empty"
FireLoopSound = ""
ReloadSound = "com_weap_inf_reload_med"
ChargeSound = ""
ChargeSoundPitch = ""
ChangeModeSound = "com_weap_inf_equip_med"
WeaponChangeSound = "com_weap_inf_equip_med"
JumpSound = "com_weap_inf_rifle_mvt_jump"
LandSound = "com_weap_inf_rifle_mvt_land"
RollSound = "com_weap_inf_rifle_mvt_roll"
//ProneSound = "com_weap_inf_rifle_mvt_lie"
SquatSound = "com_weap_inf_rifle_mvt_squat"
//StandSound = "com_weap_inf_rifle_mvt_getup"
and why in the assets do i see the odfs like this:
[WeaponClass]
ClassParent = "com_weap_inf_rifle"
GeometryName = "imp_weap_inf_rifle.msh"

[Properties]
GeometryName = "imp_weap_inf_rifle"
HighResGeometry = "imp_1st_weap_inf_rifle"
OrdnanceName = "imp_weap_inf_rifle_ord"
FirePointName = "hp_fire"

ShotDelay = "0.166"

//******************************************************
//*************** SOUND ****************
//******************************************************

FireSound = "imp_weap_inf_rifle_fire"
FireEmptySound = "com_weap_inf_ammo_empty"
FireLoopSound = ""
ReloadSound = "com_weap_inf_reload_med"
ChargeSound = ""
ChargeSoundPitch = ""
ChangeModeSound = "com_weap_inf_equip_med"
WeaponChangeSound = "com_weap_inf_equip_med"
JumpSound = "com_weap_inf_rifle_mvt_jump"
LandSound = "com_weap_inf_rifle_mvt_land"
RollSound = "com_weap_inf_rifle_mvt_roll"
//ProneSound = "com_weap_inf_rifle_mvt_lie"
SquatSound = "com_weap_inf_rifle_mvt_squat"
//StandSound = "com_weap_inf_rifle_mvt_getup"

RE: weapon odf

Posted: Wed Aug 22, 2007 10:36 pm
by SBF_Dann_Boeing
yes urs is fine, but the stuff in assets often refer to a file in the common side since many weapons have the same properties.

Posted: Thu Aug 23, 2007 3:49 am
by MercuryNoodles
The odfs like the bottom are like that because of the parenting system. You can make a separate weapon that's similar without having to rewrite the entire odf, or only change the parent if the change is meant to be global, which was meant to be a convenience for the devs. That's why they appear to have less data in them. They're simply variations of the parent, and usually little changes between them besides geometry and sound values.

Re: weapon odf

Posted: Thu Aug 23, 2007 4:40 am
by Penguin
Here you go, noob friendly answer for a noob question. (no offence)

#1: This is the parent odf, any other odf linking to this odf will use it as a template (ClassParent = "com_weap_inf_rifle") Easier to edit all rifle .odfs for all sides with this 1 file, since this is the parent ODF.

#2: This is an odf, again. but it contains this line in it (ClassParent = "com_weap_inf_rifle") Which makes it a child ODF, ingame it will load everything from the parent odf in as if they were in this ODF.

Note: Anything in the child ODF will over right the same line in the parent ODF, eg:

Parent ODF: ShotDelay = "0.2"

Child ODF: ShotDelay = "0.1"

The line in the Child ODF will be the one that is used ingame for that single ODF.

RE: Re: weapon odf

Posted: Thu Aug 23, 2007 4:42 am
by -_-
Whatever gets load last is the value used by the game.