Vehicle shield effects

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
User avatar
Dakota
Field Commander
Field Commander
Posts: 991
Joined: Mon Dec 06, 2010 8:21 pm
Projects :: making random weapon assets
Games I'm Playing :: SWBF2 and more
xbox live or psn: PS3 beats xbox
Location: at a computer desk floating around in space

Vehicle shield effects

Post 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?
Bob
Brigadier General
Brigadier General
Posts: 633
Joined: Thu May 27, 2010 4:28 am
Location: at home

Re: Vehicle shield effects

Post 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.
User avatar
lucasfart
Sith
Sith
Posts: 1440
Joined: Tue Feb 24, 2009 5:32 am
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Australia

Re: Vehicle shield effects

Post 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.
THEWULFMAN
Space Ranger
Posts: 5557
Joined: Tue Aug 17, 2010 3:30 pm
Projects :: Evolved 2
Location: Columbus, Ohio
Contact:

Re: Vehicle shield effects

Post 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.
User avatar
Maveritchell
Jedi Admin
Jedi Admin
Posts: 7366
Joined: Mon Aug 21, 2006 11:03 pm

Re: Vehicle shield effects

Post 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.
THEWULFMAN
Space Ranger
Posts: 5557
Joined: Tue Aug 17, 2010 3:30 pm
Projects :: Evolved 2
Location: Columbus, Ohio
Contact:

Re: Vehicle shield effects

Post 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.
User avatar
Dakota
Field Commander
Field Commander
Posts: 991
Joined: Mon Dec 06, 2010 8:21 pm
Projects :: making random weapon assets
Games I'm Playing :: SWBF2 and more
xbox live or psn: PS3 beats xbox
Location: at a computer desk floating around in space

Re: Vehicle shield effects

Post 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.
Marth8880
Resistance Leader
Posts: 5042
Joined: Tue Feb 09, 2010 8:43 pm
Projects :: DI2 + Psychosis
Games I'm Playing :: Silent Hill 2
xbox live or psn: Marth8880
Location: Edinburgh, UK
Contact:

Re: Vehicle shield effects

Post 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.
Bob
Brigadier General
Brigadier General
Posts: 633
Joined: Thu May 27, 2010 4:28 am
Location: at home

Re: Vehicle shield effects

Post 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).
User avatar
Fiodis
Master of the Force
Master of the Force
Posts: 4145
Joined: Wed Nov 12, 2008 9:27 pm
Projects :: Rannoch + Tientia + Tools Programming

Re: Vehicle shield effects

Post 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.
Post Reply