Page 1 of 2

Explosive Barrel

Posted: Sun Dec 26, 2010 12:10 am
by Swaffy
I know nothing about how to create an eplosive barrel. I can only edit existing files, not create new ones. So if the process of creating an explosive barrel that works means that I have to create new mesh objects or something, I would like someone to create them for me or show me a mod that has working explosive barrel.

Thanks for any given help.

Re: Explosive Barrel

Posted: Wed Dec 29, 2010 4:40 am
by tekk
One of ApacheThunders mods has a exploding barrel on elalamein I recall , i think its DC Unathorized, just youtube it to make sure which one has it.

Re: Explosive Barrel

Posted: Wed Dec 29, 2010 5:54 pm
by Herrmann
Explosive Barrel
Do you can find it in the "DC Unauthorisated 3.3" Mod on the "GIZA Map".
I dont know any active mod which using this interesting code.:-)
Its a DCU 3.3 special.

Re: Explosive Barrel

Posted: Wed Dec 29, 2010 7:13 pm
by Apache Thunder
Well the jist of it is you have to convert what ever object you want destructible into a PCO. Then you have to either modify the object's collision mesh to have a material ID that would respond to projectiles/explosions or you would have to modify the damage system to add the object's current mat ID to be damaged by projectiles.

Re: Explosive Barrel

Posted: Fri Dec 31, 2010 12:13 am
by Swaffy
Do you mind if I copy yours over to my mod?
I'm the only one who plays my mod.

I thought DCX has one, but I was wrong.

Re: Explosive Barrel

Posted: Sun Jan 02, 2011 2:29 am
by Apache Thunder
Sure, feel free to use any of my coding and other stuff I had made. :D

Re: Explosive Barrel

Posted: Tue Jan 04, 2011 6:48 am
by Swaffy
Thank you sir, I'll check it out.

Re: Explosive Barrel

Posted: Fri Jan 07, 2011 1:02 am
by Swaffy
What files do I need to gather? This is what I have [Excluding the Green Barrel, as I will only use the Yellow Barrel]:

Objects.rfa
BF2_Objects/Statics/Objects.con
BF2_Objects/Statics/Special/BF2_Barrels
BF2_Objects/Statics/Special/spawners
MOVE_FILES/Stebarrel1/AI/Objects.con
MOVE_FILES/Stebarrel1/Objects.con

StandardMesh.rfa
BF2/Statics/Yellow_Barrel_m1.rs
BF2/Statics/Yellow_Barrel_m1.sm
BF2/Statics/Yellow_Barrel_wreck.rs
BF2/Statics/Yellow_Barrel_wreck.sm

Texture.rfa
BF2/Statics/barell_wreck_s.dds
BF2/Statics/barell_yw_c.dds

That is all I have. What else am I missing for the barrel to work in-game?
Also, what object name do I add when spawning the object on a map? Is it "Stebarrel1"?

Re: Explosive Barrel

Posted: Sat Jan 08, 2011 8:41 am
by Swaffy
Alright, I have a barrel working in-game on the map. But when I shoot the barrel, it disappears and there is no explosion.

It still pushes vehicles to the side and damages things, but there is no visible explosion or the sound of an explosion.

How can I fix this problem? I reckon it has to do with these two lines?

ObjectTemplate.create PlayerControlObject destructible_BF2_barrel
ObjectTemplate.geometry Yellow_Barrel_M1
ObjectTemplate.networkableInfo BarrelInfo
ObjectTemplate.cullRadiusScale 4.0
ObjectTemplate.hasCollisionPhysics 1
ObjectTemplate.hasResponsePhysics 1
ObjectTemplate.hasDynamicShadow 1
ObjectTemplate.explosionRadius 5

ObjectTemplate.explosionMaterial 205
objectTemplate.criticalDamage 10
ObjectTemplate.hpLostWhileCriticalDamage 0.1
ObjectTemplate.HasArmor 1
ObjectTemplate.HitPoints 25
ObjectTemplate.MaxHitPoints 25

ObjectTemplate.Material 45
ObjectTemplate.timetoliveafterdeath 0.1
ObjectTemplate.addArmorEffect 0 e_ExplGas_tank 0/0/0
ObjectTemplate.addArmorEffect 0 e_BF2Barrel_w 0/2/0
ObjectTemplate.addArmorEffect 0 e_scrapmetal 0/0/0
ObjectTemplate.addArmorEffect 0 e_scrapmetalsmoke 0/0/0
ObjectTemplate.setVehicleCategory VCLand
ObjectTemplate.setVehicleIcon "Empty.dds"
ObjectTemplate.setMinimapIcon "Empty.dds"
ObjectTemplate.setPcoId 0
ObjectTemplate.GUIIndex 30

Re: Explosive Barrel

Posted: Sat Jan 08, 2011 9:42 am
by motoko
Wouldn't the view of explosion be caused by a different file, say, animation? I wouldn't know, just sayin' as I'm mostly SSM.