Page 1 of 1

Vehicle shield effects

Posted: Sun Jun 17, 2012 1:53 am
by Dakota
i was wondering if theres a way to change the effect for when a shielded object is hit instead of just the little rings and fog thing. my main reason behind this is that on large vehicles like the MTT the effect is pretty laggy and also an effect like a blue outline around the vehicle appearing would look cooler in my opinion.

before i go off setting up mshes for the shield's effect i would like to know if its possible or would even work right if the shield did get hit.

i mean if you have a shield effect that shows when you get hit that is basically the model of the vehicle thats 1.001 bigger and blue would it just make a big second vehicle effect pop up when it gets hit in that spot.

if i can't get the outline part to work then i'll just set up a new less laggy effect. i know the tie vanguard in DT2 has a shield sort of like what i am asking but that one is set up like the droideka's in the way that you can turn it on and off while the one i need needs to be always on but yet not appear unless hit and the vehicle has no other weapon slots set up.



Note, if you don't want to read the whole post, simply what i am asking for is this: How do you change the effect that pops up when a shield is hit or is it even possible?

Re: Vehicle shield effects

Posted: Sun Jun 17, 2012 4:00 am
by Bob
You might be interested in com_sfx_shieldimpact_sm.fx and com_sfx_shieldimpact_xl.fx in *installpath*\BF2_ModTools\data_???\Common\effects.

Re: Vehicle shield effects

Posted: Sun Jun 17, 2012 5:03 am
by lucasfart
I'm pretty sure the shield lines in your .odf consist of:

Code: Select all

AddShield = "Regeneration_Rate_Here"
MaxShield = "Max_Shield_Here"
I'm not sure if that's part of what you were asking about, but that's the way it works for units, so I don't see why it wouldn't be the same for vehicles.

Re: Vehicle shield effects

Posted: Sun Jun 17, 2012 7:41 am
by THEWULFMAN
You can change the shield impact fx, by editing the two fx Bob mentioned and using a custom ingame.lvl. However, you can't quite achieve the effect you want. It centers the effect around where it hit the vehicle. Meaning, if you made a large ring-like effect to envelop the entire vehicle, it would look odd when you hit the edges/tops/front/back of the vehicle. Also, you can't specify what vehicle/unit uses what effect. The sm(all) version of the effect is used for the Droideka shield impact effect, and any other unit/vehicle a shield is added to. If the shield is added to a model via Lua, then it will uses the xl(arge) version of the effect. In other words, if you make the small effect large, intending to cover the entire vehicle, then it would look odd on a Droideka.

Re: Vehicle shield effects

Posted: Sun Jun 17, 2012 11:27 am
by Maveritchell
You could use a lua solution and attach an effect every time the vehicle got hit, so long as its shield health is above 0. You could use a very small timer to make sure that the effect goes off after a fraction of a second.

Re: Vehicle shield effects

Posted: Sun Jun 17, 2012 12:56 pm
by THEWULFMAN
Hmm, yes. I could see that working nicely. Nice workaround there Mav. I suppose then you could attach it to the vehicle's matrix, which one would hope and assume is close to the center of the vehicle. Thus you could use a large shield effect that envelops the whole vehicle.

Re: Vehicle shield effects

Posted: Sun Jun 17, 2012 1:44 pm
by Dakota
@Bob: would i need to include the ingame.lvl or anything extra if i modify the effects in the common folder or would i be able to save the modified ones to the sides?

@Lucasfart: i was asking about the effects, the vehicles are already set up with those lines, and a few units too.

@THEWULFMAN: my tank used the large version of the shield effect but it had no LUA calling for the shield what so ever.

@Mav: i'm still pretty horrible when it comes to things involving LUA and really have no idea where to start when it comes to doing what you said.

Re: Vehicle shield effects

Posted: Sun Jun 17, 2012 1:48 pm
by Marth8880
Dakota wrote:@Bob: would i need to include the ingame.lvl or anything extra if i modify the effects in the common folder or would i be able to save the modified ones to the sides?
You could probably do either.

Re: Vehicle shield effects

Posted: Sun Jun 17, 2012 3:58 pm
by Bob
Marth8880 wrote:
Dakota wrote:@Bob: would i need to include the ingame.lvl or anything extra if i modify the effects in the common folder or would i be able to save the modified ones to the sides?
You could probably do either.
Yep, both ways should work (well, second one indeed will work, I did this myself once).

Re: Vehicle shield effects

Posted: Sun Jun 17, 2012 7:14 pm
by Fiodis
THEWULFMAN wrote:I suppose then you could attach it to the vehicle's matrix, which one would hope and assume is close to the center of the vehicle.
I'd assume it's at the vehicle's dummyroot. Anyway, if the vehicle's msh isn't completely static, any moving parts (animations, turrets, etc.) might stick out of the shield effect and look rather odd. That's probably obvious, but I just wanted to get it out there. Depending on how glaring the problem is, you might want to just deal with it; I can't think of any simple way around that.