Drop Item.

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
Caleb1117
2008 Most Original Avatar
Posts: 3096
Joined: Sun Aug 20, 2006 5:55 pm
Projects :: No Mod project currently.
xbox live or psn: No gamertag set
Location: X-Fire: caleb1117 ಠ_ಠ

Drop Item.

Post by Caleb1117 »

Ok, I made this wicked cool power up item the heals, give you energy, and buffs defense, and offense, and gave it to one Mandalorian unit, so he could be a medic type class for the Mando's.

It works fine, then I decided to have it so that whenever you kill a Mando, as a reward, you have about a 50% chance of them dropping this uber stimulant.

After a bit of ODF searching, I found the lines I needed.

Code: Select all

DropItemClass = "com_item_powerup_mand"
DropItemProbability = 0.50
I put the line in each Mando ODF.
The powerup ODF, msh, tga, etc are all in the mandalorian side, and in the common/munged/odf, of my map.

Like I said before, dispensing the stim works.
But ingame if I kill the one of the Duros, it will drop the stim, no problem, but if I kill eather the sniper mando, or the one with the beam tube, I crash.

Que Error.
Message Severity: 3
.\Source\EntitySoldier.cpp(11111)
Soldier "man_inf_mand1" drop item "com_item_powerup_mand" not found

Message Severity: 3
.\Source\EntitySoldier.cpp(11111)
Soldier "man_inf_mand2" drop item "com_item_powerup_mand" not found
Heres the Duros ODF:
Hidden/Spoiler:
[quote="man_duros_noob.ODF"][GameObjectClass]

ClassParent = "com_inf_default"


[Properties]

GeometryName = "cis_inf_nemodian_trooper"
GeometryLowRes = "cis_inf_nemodian_trooper_low1"
FirstPerson = "IMP\impoff;imp_1st_officer"

UnitType = "pilot"
HealthType = "person"
MaxHealth = 400.0

CapturePosts = 0

NoEnterVehicles = 1

MaxSpeed = 6.0
MaxStrafeSpeed = 5.0
MaxTurnSpeed = 5.0
JumpHeight = 4.0

ImmuneToMines = "1"

WEAPONSECTION = 1
WeaponName = "rep_weap_inf_commando_pistol"
WeaponAmmo = 0

WEAPONSECTION = 2
WeaponName = "rep_weap_inf_powerup_dispenser"
WeaponAmmo = 10
WeaponChannel = 1

DropItemClass = "com_item_powerup_mand"
DropItemProbability = 0.50
[/quote]
The sniper Mando
Hidden/Spoiler:
[quote="Man_inf_mand1.ODF"][GameObjectClass]
ClassParent = "com_inf_default"
GeometryName = "blu_inf_clonecommander.msh"

[Properties]
AISizeType = "hover"
GeometryName = "blu_inf_clonecommander"
GeometryLowRes = "blu_inf_clonecommander_low1"
FirstPerson = "cis\cisfett;cis_1st_jangofett"

CapturePosts = 0

HealthType = "person"
MaxHealth = 600.0


NoEnterVehicles = 1

MaxSpeed = 6.0
MaxStrafeSpeed = 5.0
MaxTurnSpeed = 5.0
JumpHeight = 4.0
RecoverFromTumble = "1"


CollisionScale = "0.0 0.0 0.0" // don't take damage from collisions
//Jet Jump End

WEAPONSECTION = 1
WeaponName = "cis_weap_inf_sniperrifle"
WeaponAmmo = 0

WEAPONSECTION = 2
WeaponName = "man_weap_inf_wrist_flammethrower"
WeaponAmmo = 0
WeaponChannel = 1





//SOUND
//SndHeroSelectable = ""
//SndHeroSpawned = "hero_maul_spawn"
//SndHeroDefeated = "hero_maul_exhausted"
//SndHeroKiller = "hero_maul_exhausted"

//VOSound = "hero_maul_AcquiredTarget AcquiredTarget"
//VOSound = "hero_maul_KillingSpree4 KillingSpree4"

VOUnitType = 0181
//SoldierMusic = "cis_hero_Maul_lp"
HurtSound = ""
DeathSound = ""
AcquiredTargetSound = ""
HidingSound = ""
ApproachingTargetSound = ""
FleeSound = ""
PreparingForDamageSound = ""
HeardEnemySound = ""
//ShockFadeOutTime = "0.8"
//ShockFadeInTime = "2.0"
ShockFadeOutGain = ""
ShockSound = ""
ClothingRustleSound = ""
//LowHealthSound = "com_inf_saber_ambient"
LowHealthThreshold = "1.1"
FoleyFXClass = "rep_inf_soldier"

DropItemClass = "com_item_powerup_mand"
DropItemProbability = 0.50
[/quote]
Beam tube Mando:
Hidden/Spoiler:
[quote="man_inf_mand2"][GameObjectClass]
ClassParent = "com_inf_default"
GeometryName = "red_inf_stormtrooperhansolo.msh"

[Properties]
AISizeType = "hover"
GeometryName = "red_inf_stormtrooperhansolo"
GeometryLowRes = "red_inf_stormtrooperhansolo"
FirstPerson = "IMP\impboba;imp_1st_bobafett"

CapturePosts = 0

HealthType = "person"
MaxHealth = 600.0


NoEnterVehicles = 1

MaxSpeed = 6.0
MaxStrafeSpeed = 5.0
MaxTurnSpeed = 5.0
JumpHeight = 4.0
RecoverFromTumble = "1"


CollisionScale = "0.0 0.0 0.0" // don't take damage from collisions
//Jet Jump End

WEAPONSECTION = 1
WeaponName = "man_weap_inf_gun"
WeaponAmmo = 0

WEAPONSECTION = 2
WeaponName = "man_weap_inf_gun1"
WeaponAmmo = 0
WeaponChannel = 1


//SOUND
//SndHeroSelectable = ""
//SndHeroSpawned = "hero_maul_spawn"
//SndHeroDefeated = "hero_maul_exhausted"
//SndHeroKiller = "hero_maul_exhausted"

//VOSound = "hero_maul_AcquiredTarget AcquiredTarget"
//VOSound = "hero_maul_KillingSpree4 KillingSpree4"

VOUnitType = 0181
//SoldierMusic = "cis_hero_Maul_lp"
HurtSound = ""
DeathSound = ""
AcquiredTargetSound = ""
HidingSound = ""
ApproachingTargetSound = ""
FleeSound = ""
PreparingForDamageSound = ""
HeardEnemySound = ""
//ShockFadeOutTime = "0.8"
//ShockFadeInTime = "2.0"
ShockFadeOutGain = ""
ShockSound = ""
ClothingRustleSound = ""
//LowHealthSound = "com_inf_saber_ambient"
LowHealthThreshold = "1.1"
FoleyFXClass = "rep_inf_soldier"

DropItemClass = "com_item_powerup_mand"
DropItemProbability = 0.50[/quote]
User avatar
Maveritchell
Jedi Admin
Jedi Admin
Posts: 7366
Joined: Mon Aug 21, 2006 11:03 pm

Re: Drop Item.

Post by Maveritchell »

Huh. I'm surprised you got any of them to drop it at all on death - I haven't been able to get a custom "death drop" to work at all, and I've had the same problem as you - as soon as someone tries to drop it, I get a crash. If I had to guess, the only reason your Duros unit can drop it is because he has the powerup dispenser himself. Why that makes a difference baffles me, but it's the likeliest explanation.

Btw, let me know if you do get a custom death drop to work, I'd like to implement them.
Caleb1117
2008 Most Original Avatar
Posts: 3096
Joined: Sun Aug 20, 2006 5:55 pm
Projects :: No Mod project currently.
xbox live or psn: No gamertag set
Location: X-Fire: caleb1117 ಠ_ಠ

Re: Drop Item.

Post by Caleb1117 »

Hmm, ever try giving the line to a class parent?
User avatar
Maveritchell
Jedi Admin
Jedi Admin
Posts: 7366
Joined: Mon Aug 21, 2006 11:03 pm

Re: Drop Item.

Post by Maveritchell »

Can't remember. Regardless, whatever I did, it wouldn't read the updated .odf for the item whether I had it in my sides folder or my world folder. (I don't think it'll munge if it's in the common folder either - I'm pretty sure I've tried munging from there before with no effect.)
Caleb1117
2008 Most Original Avatar
Posts: 3096
Joined: Sun Aug 20, 2006 5:55 pm
Projects :: No Mod project currently.
xbox live or psn: No gamertag set
Location: X-Fire: caleb1117 ಠ_ಠ

Re: Drop Item.

Post by Caleb1117 »

Ok, so it seems it will work, if the powerup is loaded via a dispenser weapon.

Is there a way to add a weapon into a units ODF, and keep it from being used? As in, not even able to switch to it?
User avatar
Maveritchell
Jedi Admin
Jedi Admin
Posts: 7366
Joined: Mon Aug 21, 2006 11:03 pm

Re: Drop Item.

Post by Maveritchell »

Don't think so. You could try adjusting the weaponchannel to one that doesn't exist (WeaponChannel = 2).
FragMe!
Gametoast Staff
Gametoast Staff
Posts: 2244
Joined: Sat May 13, 2006 12:34 am
Projects :: Not sure keep changing my mind.
Games I'm Playing :: F1 and SWBF
xbox live or psn: No gamertag set
Location: Origin name GT_FragMe
Contact:

Re: Drop Item.

Post by FragMe! »

Just for something fun to do and hey why not :D

Try adding com_item_powerup_mand to the sides xxxshell.req under the model heading. If the side doesn't have one copy one from any shipped side and edit and rename to suit your purposes.
Caleb1117
2008 Most Original Avatar
Posts: 3096
Joined: Sun Aug 20, 2006 5:55 pm
Projects :: No Mod project currently.
xbox live or psn: No gamertag set
Location: X-Fire: caleb1117 ಠ_ಠ

Re: Drop Item.

Post by Caleb1117 »

FragMe! wrote:Just for something fun to do and hey why not :D

Try adding com_item_powerup_mand to the sides xxxshell.req under the model heading. If the side doesn't have one copy one from any shipped side and edit and rename to suit your purposes.
Tried that, no luck unfortunately.
Syth
General
General
Posts: 784
Joined: Thu Apr 13, 2006 8:46 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: happy fun island

Re: Drop Item.

Post by Syth »

I tried the same thing and got that problem too... did you try makeing reqs for the item and manually loading it into the map? Might be hard coded.
Caleb1117
2008 Most Original Avatar
Posts: 3096
Joined: Sun Aug 20, 2006 5:55 pm
Projects :: No Mod project currently.
xbox live or psn: No gamertag set
Location: X-Fire: caleb1117 ಠ_ಠ

Re: Drop Item.

Post by Caleb1117 »

You mean, make it a req, and then add it to the side req.
and then loading it in the lua?
Syth
General
General
Posts: 784
Joined: Thu Apr 13, 2006 8:46 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: happy fun island

Re: Drop Item.

Post by Syth »

yah, just like a unit
User avatar
[RDH]Zerted
Gametoast Staff
Gametoast Staff
Posts: 2982
Joined: Sun Feb 26, 2006 7:36 am
Projects :: Bos Wars AI - a RTS game
Games I'm Playing :: SWBF2 and Bos Wars
xbox live or psn: No gamertag set
Location: USA
Contact:

Re: Drop Item.

Post by [RDH]Zerted »

Yes, your error says that the game does not know what com_item_powerup_mand is, meaning it isn't loaded. It should be included in a req somewhere and read into the game.
Caleb1117
2008 Most Original Avatar
Posts: 3096
Joined: Sun Aug 20, 2006 5:55 pm
Projects :: No Mod project currently.
xbox live or psn: No gamertag set
Location: X-Fire: caleb1117 ಠ_ಠ

Re: Drop Item.

Post by Caleb1117 »

Well, I just tried that, and it crashed.
I could have done it wrong, but I don't think so.
User avatar
[RDH]Zerted
Gametoast Staff
Gametoast Staff
Posts: 2982
Joined: Sun Feb 26, 2006 7:36 am
Projects :: Bos Wars AI - a RTS game
Games I'm Playing :: SWBF2 and Bos Wars
xbox live or psn: No gamertag set
Location: USA
Contact:

Re: Drop Item.

Post by [RDH]Zerted »

Maveritchell wrote:I don't think it'll munge if it's in the common folder either - I'm pretty sure I've tried munging from there before with no effect.
I've added things to a map's common.lvl before. You need to make sure it's in the correct folder and that it's in common's req. Try putting your droppable item in common.lvl.
Post Reply