No award weapons in custom map [Solved]

In this forum you will find and post information regarding the modding of Star Wars Battlefront 2. DO NOT POST MOD IDEAS/REQUESTS.

Moderator: Moderators

Post Reply
Cattermelon
Private
Posts: 41
Joined: Mon Aug 28, 2017 12:14 pm
Projects :: No Mod project currently.
xbox live or psn: No gamertag set

No award weapons in custom map [Solved]

Post by Cattermelon »

I made a custom map, and everything is working properly, except that I can't unlock any of the award weapons. I'm really new to the modding community, so I don't really have any more information to give. Sorry, lol!
User avatar
Anakin
Master of the Force
Master of the Force
Posts: 4817
Joined: Sat Sep 19, 2009 11:37 am
Projects :: RC Side Mod - Remastered - SWBF3 Legacy
Location: Mos Espa (germany)

Re: No award weapons in custom map

Post by Anakin »

take a look at the stock weapons for reference.

For those weapons are the award weapon and the ability to gain the award enabled
Cattermelon
Private
Posts: 41
Joined: Mon Aug 28, 2017 12:14 pm
Projects :: No Mod project currently.
xbox live or psn: No gamertag set

Re: No award weapons in custom map

Post by Cattermelon »

Like, check in the odf files for the stock weapons? I did, and there's no lines of code for unlocking the corresponding award weapons.
User avatar
Anakin
Master of the Force
Master of the Force
Posts: 4817
Joined: Sat Sep 19, 2009 11:37 am
Projects :: RC Side Mod - Remastered - SWBF3 Legacy
Location: Mos Espa (germany)

Re: No award weapons in custom map

Post by Anakin »

well, there is. Look for something like LockForMedalsType = "only available if you gain the award" and ScoreForMedalsType = "gain the award"
or something similar to that. I don't have the exact names in mind and I'm not on my desktop computer at the moment.
Cattermelon
Private
Posts: 41
Joined: Mon Aug 28, 2017 12:14 pm
Projects :: No Mod project currently.
xbox live or psn: No gamertag set

Re: No award weapons in custom map

Post by Cattermelon »

I checked all the odf files for that sides stock weapons, and none of them had a line of code that resembled that at all. As a matter of fact, I checked another sides stock weapons odf's and the code isn't in those either.
User avatar
Anakin
Master of the Force
Master of the Force
Posts: 4817
Joined: Sat Sep 19, 2009 11:37 am
Projects :: RC Side Mod - Remastered - SWBF3 Legacy
Location: Mos Espa (germany)

Re: No award weapons in custom map

Post by Anakin »

com_weap_award_rifle.odf
Hidden/Spoiler:
[code][WeaponClass]
ClassLabel = "cannon"

[Properties]
MedalsTypeToUnlock = 1
ScoreForMedalsType = 1

AnimationBank = "rifle"

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

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

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

MinRange = "0"
OptimalRange = "24"
MaxRange = "64"

LockOnRange = "40.0"
LockTime = "0.4"
lockOnAngle = "1.0"

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

YawSpread = "0.25"
PitchSpread = "0.25"

SpreadPerShot = "1.2"
SpreadRecoverRate = "4.8"
SpreadThreshold = "1.6"
SpreadLimit = "5.0"

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

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

RoundsPerClip = "36"
ReloadTime = "1.5"
ShotDelay = "0.75"
TriggerSingle = "0"

DisplayRefire = "0"

SalvoCount = "3"
SalvoDelay = "0.08"
InitialSalvoDelay = "0.0"
SalvoTime = "0.0"


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

MuzzleFlash = "small_muzzle_flash"
FlashColor = "255 80 80 255"
FlashLength = 0.025
FlashColor = "255 100 100 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"
[/code]
com_weap_inf_rifle.odf
Hidden/Spoiler:
[code][WeaponClass]
ClassLabel = "cannon"

[Properties]
ScoreForMedalsType = 1
MedalsTypeToLock = 1

AnimationBank = "rifle"

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

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

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

MinRange = "0"
OptimalRange = "24"
MaxRange = "64"

LockOnRange = "40.0"
LockTime = "0.4"
lockOnAngle = "1.0"

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

YawSpread = "0.225"
PitchSpread = "0.225"

SpreadPerShot = "0.75"
SpreadRecoverRate = "2.0"
SpreadThreshold = "3.0"
SpreadLimit = "1.25"

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

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

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

DisplayRefire = "0"

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


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

MuzzleFlash = "small_muzzle_flash"
FlashColor = "255 80 80 255"
FlashLength = 0.025
FlashColor = "255 100 100 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"
[/code]

pretty sure you didn't checked the base classes. Do you understand the heritage concept??
Cattermelon
Private
Posts: 41
Joined: Mon Aug 28, 2017 12:14 pm
Projects :: No Mod project currently.
xbox live or psn: No gamertag set

Re: No award weapons in custom map

Post by Cattermelon »

yeah, I understand the heritage concept, i just didn't notice those files had a parent class. Should I have copied the folder containing the file you mentioned into my maps sides folder? Also, I just realized while testing something on my map that I get the award rifle, but no other award weapons.
User avatar
Anakin
Master of the Force
Master of the Force
Posts: 4817
Joined: Sat Sep 19, 2009 11:37 am
Projects :: RC Side Mod - Remastered - SWBF3 Legacy
Location: Mos Espa (germany)

Re: No award weapons in custom map

Post by Anakin »

Of course you need the common files from the common folder as well. You can check for parent files in the first or 2nd line. Actually you should always look through the whole file and find things like com_inf_... or rep_weap_.. everything with a _ in it references a file and that file is needed in your project. Otherwise there can be munge or runtime errors.

Best way to get all files needed is starting with the req file that references the off file and from there you check every parent or child files and the same for those until there are no more parents or childs. Later, after you understand the structure better it will be more easy to you to get all files you need because you know exactly what you want.

Simply copying the common folder from the assets is no solution, because they needn't be complete and your project is wasted by unused - and as such unneeded - stuff.
Cattermelon
Private
Posts: 41
Joined: Mon Aug 28, 2017 12:14 pm
Projects :: No Mod project currently.
xbox live or psn: No gamertag set

Re: No award weapons in custom map

Post by Cattermelon »

So you're saying that I need to find the first parent file for all the award weapons, then find all the odf files they reference, and then find all the odf files THEY reference, etc., until there are no more files being referenced, and then copy them all to my worlds sides folder. Is that correct?
User avatar
Anakin
Master of the Force
Master of the Force
Posts: 4817
Joined: Sat Sep 19, 2009 11:37 am
Projects :: RC Side Mod - Remastered - SWBF3 Legacy
Location: Mos Espa (germany)

Re: No award weapons in custom map

Post by Anakin »

Start with your side's req file (rep_inf_ep2_rifleman.req) as an example.
Hidden/Spoiler:
[code]ucft
{
REQN
{
"class"
"rep_inf_ep2_rifleman"
}
}
[/code]
So you see it references the rep_inf_ep2_rifleman(.odf) file
Hidden/Spoiler:
[code][GameObjectClass]
ClassParent = "rep_inf_default_rifleman"

[Properties]
Label = "Republic Trooper"
UnitType = "trooper"
IconTexture = "rep_trooper_icon"

GeometryName = "rep_inf_trooper"
GeometryLowRes = "rep_inf_trooper_low1"
FirstPerson = "REP\reptroop;rep_1st_trooper"
[/code]
In this file you find the ClassParent rep_inf_default_rifleman, the IconTexture rep_trooper_icon, and the both mesh files rep_inf_trooper and rep_inf_trooper_low1

So copy the both mesh files with all textures, .tga.option and .msh.option files
The IconTexture is as far as i remember in the common or ingame, so as long as you don't make your own of this, you don't need to care about that (it is this little arrow on the map)
Hidden/Spoiler:
[code][GameObjectClass]
ClassParent = "rep_inf_default"


[Properties]
WEAPONSECTION = 1
WeaponName = "rep_weap_inf_rifle"
WeaponAmmo = 4

WEAPONSECTION = 2
WeaponName = "rep_weap_inf_pistol"
WeaponAmmo = 0

WEAPONSECTION = 3
WeaponName = "rep_weap_inf_thermaldetonator"
WeaponAmmo = 4
WeaponChannel = 1

WEAPONSECTION = 4
WeaponName = "rep_weap_award_rifle"
WeaponAmmo = 4

WEAPONSECTION = 5
WeaponName = "rep_weap_award_pistol"
WeaponAmmo = 6

VOUnitType = 121[/code]
Ok, so next you find all weapons for this unit, go and copy these odf files, too. And the rep_inf_default.odf. In the com_inf_default, that is referenced in the rep_inf_default, is nothing you need to take care as long as you don't go too much in detail.

Hidden/Spoiler:
[code][WeaponClass]
ClassParent = "com_weap_inf_rifle"
GeometryName = "rep_weap_inf_rifle.msh"

[Properties]
GeometryName = "rep_weap_inf_rifle"
HighResGeometry = "rep_1st_weap_inf_rifle"
OrdnanceName = "rep_weap_inf_rifle_ord"
FirePointName = "hp_fire"

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

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


FireSound = "rep_weap_inf_rifle_fire"
ReloadSound = "com_weap_inf_reload_med"
ChangeModeSound = "com_weap_inf_equip_med"
FireEmptySound = "com_weap_inf_ammo_empty"
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"[/code]
You need the geometries, classparent and ordnance files here. And so you go on and on until nothing is left. In the ordnance you'll find something like this LaserTexture = "com_sfx_laser_blue" you find it in the effect folder and is needed as well.

Here is a list of what you need to search for in an odf file
*.odf
- Parent (odf or hardcoded class)
- property odf
- property mesh
- property textures
- property effects

and here in a effect file
*.fx
- texture (.tga)

Structure in general:

Side.req (1x)
- unit.req (0 to infinit)
- unitFP(optional)
- unit.odf (1)
- parent
- weapons

where a weapon has in general those files:

rifle, blaster:
base.odf
base_ord.odf

Rocketlauncher, grenades,..
base.odf
base_ord.odf
base_exp.odf


I hope this makes the start a little bit easier to you
Cattermelon
Private
Posts: 41
Joined: Mon Aug 28, 2017 12:14 pm
Projects :: No Mod project currently.
xbox live or psn: No gamertag set

Re: No award weapons in custom map

Post by Cattermelon »

Your solution worked! Thank you so much for the help!
User avatar
Anakin
Master of the Force
Master of the Force
Posts: 4817
Joined: Sat Sep 19, 2009 11:37 am
Projects :: RC Side Mod - Remastered - SWBF3 Legacy
Location: Mos Espa (germany)

Re: No award weapons in custom map [Solved]

Post by Anakin »

you're welcome
Post Reply