Jump to content
Official BF Editor Forums
eggman

Problem With Barb Wire

Recommended Posts

We have some barb wire. I added negative supply objects to it. This works.

HOWEVER... we have a 10m length of barb wire. So in order to have "pain" all the way along it, I placed several negative supply objects along it, each with a small radius.

HOWEVER... what happens now is that on a map with lots of barb wire it lags like hell (and also lags the editor).

Is there another way to cause pain by a soldier interacting with barb wire?

I notice EA has a 666 material type that causes instant death when you interact with it. Can a custom material type applied to the barb wire object cause pain without using supply objects?

Share this post


Link to post
Share on other sites

I haven't had any success with the 'death_material' . It gives you the pain sounds when touching it, but it doesn't affect the health of the soldier, as far as i tested it. On the other side, i don't encounter the lag you're reporting even with five SupplyObjects per barrier ....

Share this post


Link to post
Share on other sites

ok, will look into it some more. I'll post back any results of messing with materials which would seem to be a much more efficient way of doing it. Wierd that the 666 material kills / damages you in some places, but not in others ??? I notice it has a damage mod of 666, so I'll look at the source objects and see if there is anything unique applied to them that enables the 666 material to cause damage.

when I say lots of barbed wire, I mean a 4km map with realistic length airfields and the entire airport is surrounded by razor wire and each 10m length of razor wire has about 10 supply objects on it. when I disable the supply object, frame rates are smooth, when I enable them, frame rate meter shows 50fps, but its choppy like it was 15 fps).

Share this post


Link to post
Share on other sites
On the other side, i don't encounter the lag you're reporting even with five SupplyObjects per barrier ....

put down around abouts 100 of these or so then you will find the lag :)

Share this post


Link to post
Share on other sites
put down around abouts 100 of these or so then you will find the lag :)

Hmmmmm...... Hmmmmm....

Tempting - but no, i won't :P:D hehehe

Edited by mschoeldgen[Xww2]

Share this post


Link to post
Share on other sites

i can confirm this problem.

you have to be moving a certain speed (it's above the sprint speed, but i'm not sure what it is exactly) to have a soldier -> thing impact. at which point the large multiplier on barbed_wire will magnify the small amount of damage you got from the collision such that you're killed.

so walking over barbed_wire causes the sound effect, but causes no damage because you're never going fast enough.

you can verify this using collisionLog. turn on godmode, run over the barbedwire and notice no output. then make the jump multiplier 8 or so, and jump so you land on a barbed wire - now you get 8000 damage.

is a way of an effectbundle causing damage which works on dedicated servers?

Edited by [FH]ctz

Share this post


Link to post
Share on other sites
is a way of an effectbundle causing damage which works on dedicated servers?

Interesting notion.. a static fire object with no visible flame perhaps?

Share this post


Link to post
Share on other sites
Same Problem

meaning that the approach of using an invisible flame effect will also cause lag? Is this because it's effectively a supply object embedded into an effect?

Share this post


Link to post
Share on other sites

I think it would be possible by using the original properties of the 'death_material' and raise its damage level. Unfortunately, all collisions in BF2 are calculated based on speed, so you might have a problem when you want to avoid vehicles being damaged by the modded barbwire.

And this would be my question to D_Fast: How does a vehicle react when crossing your razorwire ? Can you avoid excessive damage to it with a modified col1 ?

Edit: Yeah, i got it working withe the 'death_material' (666) :D My basic problem was not obeying the 'col0 must be bigger than col1 and 2' rule. As soon as i stretched my col0 to enclose the other two colmeshes, the death_material started killing soldiers. (vehicles can be saved by making an approprite col1 mesh) A damageMod of 1000 for the collision with human bodies seems to high, though, but that can be adjusted in the materialmanager settings.

Thanks D_Fast for this fresh approach !

Edited by mschoeldgen[Xww2]

Share this post


Link to post
Share on other sites

I knew someone would get it!

You are correct, if u dont want the vehciles touching the 666 material then dont use it on the col1 ;)

barb_wire_example.jpg

The only tricking thing is for the mappers, when placing these objects they must view collision meshes on a reg basis when terrain editing. One can easly cover up the 666 pad causeing a breach in the wire.

As the Solider collision mesh (im sure U already know) comes to a point.

bf2_sold_col.jpg

Here is my changes for the 666 material, as seen in the video.

MaterialManagerSettings.con

MaterialManager.createCell 666 0
MaterialManager.createCell 666 22
MaterialManager.damageMod 25
MaterialManager.createCell 666 23
MaterialManager.damageMod 25
MaterialManager.setSoundTemplate 0 S_Walk_Barbwire
MaterialManager.createCell 666 24
MaterialManager.damageMod 25
MaterialManager.setSoundTemplate 0 S_Walk_Barbwire
MaterialManager.createCell 666 25
MaterialManager.damageMod 25
MaterialManager.setSoundTemplate 0 S_Walk_Barbwire
MaterialManager.createCell 666 31
MaterialManager.damageMod 25
MaterialManager.createCell 666 32
MaterialManager.damageMod 666
MaterialManager.createCell 666 51
MaterialManager.damageMod 666
MaterialManager.createCell 666 60
MaterialManager.damageMod 25
MaterialManager.createCell 666 71
MaterialManager.damageMod 666
MaterialManager.createCell 666 72
MaterialManager.damageMod 666
MaterialManager.createCell 666 98
MaterialManager.damageMod 666
MaterialManager.createCell 666 110
MaterialManager.damageMod 666

As u can see I left the Vehcile ID damagemod intact as this material is used as a counter to the clipping into closed statics "aka glitching"

So with these tweaks if one does glitch into a closed static. He wont get insta-gibbed any longer, but instead slowly die from a barbwire efx :P but anythings better then 300 supply objects lying around our maps ;)

Now lets talk more about this Death_Material

It also seems hardcoded to me.

As in the ID (666)

Because I tried creating my own, copying that death material tic for tac and changing its ID # to something unique, and it all stops working. Well besides the sounds. As im not totaly positive what all that Death_material is being used for, besides the glitching.

Share this post


Link to post
Share on other sites

thanks d_fast, good stuff!

i'm not surprised that 666 is hardcoded. there are a number of other materials hardcoded by id. ladders and small arms bullets come to mind.

Share this post


Link to post
Share on other sites

I think its kinda internal joke, too when looking at the damageMod (set to 666 for quite a few materials :P ) I wanted the vehicles with rubber wheels to get some damage, too, so now i made a col1 with a ramp on both sides with 666 and give the rubber materials some cells with damageMod.

Share this post


Link to post
Share on other sites

Yeah, i had some busy days after this find :D Did anybody try that already on the fires ? Maybe one can attach an object with a collision mesh made of the death material to it to get the damage working.

Share this post


Link to post
Share on other sites
Yeah, i had some busy days after this find :D Did anybody try that already on the fires ? Maybe one can attach an object with a collision mesh made of the death material to it to get the damage working.

Yes thanks D_Fast! We got damaging razor wire again but without the lag.

That's also a great idea wrt the wreck fires and such.... have to think about that. I hate the fact that wreck fires don't cause pain.

Share this post


Link to post
Share on other sites

Yeah, its intolerable for any realism mod :P I have made death surfaces on all my burning wrecks now, hehe.

I thought about a pressureplate-formed col2 which is attached to the fires. As the ambient effects are bundles, it should be possible to attach an invisible mesh with the death collision to them.

Share this post


Link to post
Share on other sites
Yeah, its intolerable for any realism mod :P I have made death surfaces on all my burning wrecks now, hehe.

I thought about a pressureplate-formed col2 which is attached to the fires. As the ambient effects are bundles, it should be possible to attach an invisible mesh with the death collision to them.

Interesting idea .. you saying that you can specify 666 as the material type for a wreck ? Seems like a potentially simple way to make burning wrecks hurt players... would that work?

Share this post


Link to post
Share on other sites
Interesting idea .. you saying that you can specify 666 as the material type for a wreck ? Seems like a potentially simple way to make burning wrecks hurt players... would that work?

Yes, it works :D Of course i don't alter all faces of the wreck to carry the death material but only the areas where i placed my wreck fires. Hopping on the hood of a burning wreck is dangerous now :P

We don't have exploding wrecks in XWW2 but have them laying around for some time, so its worth the effort , hehe

Will check out the fire idea from above today and be back laters. Maybe a pyramid shaped colmesh is better than a pressureplate, makes it easier for the mappers.

Share this post


Link to post
Share on other sites

Hey Gents,

Thanks to D_Fast from PoE and matt.b from the Project Reality team we were able to get this working great!

As a "cheers mates" gesture, we're making this razor wire available for all mods to use freely (as long as you are not reselling the product the razor wire is used in).

You can download the Razor Wire here:

http://www.gloryhoundz.com/prmm/downloads/pr_razorwire.zip

There is a read me included that indicates the material changes needed to make it work, which are the same as those described by D_Fast above.

Cheers mates!

Share this post


Link to post
Share on other sites

Sorry for the potential necro, but I have a question about this. I am building a vBF2 map and understand I would have to create an objects_client and objects_server file as described here,

Do I add a line "run MaterialManagerSettings.con" in tmp.con or somewhere else?

Thanks!

CE

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×