Attaching effects to units (Solved)

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

Attaching effects to units (Solved)

Post by Fiodis »

How do you attach an effect to a unit? Can you do it via ODF, or must you hex-edit the msh, or make an entirely new msh? An example of what I mean is that the bomb flans in Spira: Besaid had fire and smoke coming out of them. How does that work?
Last edited by Fiodis on Thu Jan 22, 2009 5:13 pm, edited 1 time in total.
YaNkFaN
Field Commander
Field Commander
Posts: 943
Joined: Sat Dec 13, 2008 8:17 am

Re: Attaching effects to units

Post by YaNkFaN »

i'm a little knowledgeable on this but i can only talk about props on a prop .odf you attach effect to a hardpoint ie

AttachToHardPoint = "hp_steampipe_a"
AttachToHardPoint = "hp_steampipe_b"
AttachToHardPoint = "hp_steampipe_c"
AttachToHardPoint = "hp_steampipe_d"
AttachToHardPoint = "hp_steampipe_e"

i'm not sure if units have harpoints but you could open their .msh and search for hp_* and see
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: Attaching effects to units

Post by Fiodis »

I searched for hp_* and didn't find anything. Here's something, though:

From the bomb's odf:
Hidden/Spoiler:
[code]CHUNKSECTION = "CHUNK1"
ChunkGeometryName = "ffx_weap_inf_grenadethermal"
ChunkNodeName = "dummyroot"
ChunkTerrainCollisions = "1"
ChunkTerrainEffect = "dirtspray"
ChunkTrailEffect = "ffx_inf_droid_exp"
ChunkPhysics = "FULL"
ChunkOmega = "4.0 4.0 4.0"
ChunkSpeed = 8.0

CHUNKSECTION = "CHUNK2"
ChunkGeometryName = "ffx_weap_inf_grenadethermal"
ChunkNodeName = "dummyroot"
ChunkTerrainCollisions = "1"
ChunkTerrainEffect = "dirtspray"
ChunkTrailEffect = "ffx_inf_droid_exp"
ChunkPhysics = "FULL"
ChunkOmega = "4.0 4.0 4.0"
ChunkSpeed = 8.0[/code]


In particular it's ChunkTrailEffect that I'm interested in. Is that the answer?
User avatar
Maveritchell
Jedi Admin
Jedi Admin
Posts: 7366
Joined: Mon Aug 21, 2006 11:03 pm

Re: Attaching effects to units

Post by Maveritchell »

Those were invisible chunks I added so that the unit could have an explosion (units must have chunks to explode). They were unrelated to the flame effect I had on them.

What I used to attach an effect to the units is the same thing used to attach damage effects (like sparks or flames) to vehicles. The only change I made was that the "damage effect" starts when the vehicle is at 100% (undamaged) and lasts until 0% (death). You want to do it this way (also from the ffx_inf_bomb .odf):

Code: Select all

DamageStartPercent      = 100.0
DamageStopPercent      = 0.0
DamageEffect         = "kas1_bonfire"
DamageAttachPoint      = "hp_burn"
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: Attaching effects to units

Post by Fiodis »

Thanks, but what would I set as the AttachPoint? I want the effect originating from a Wampa's torso. I'm not sure what label that has.
User avatar
Maveritchell
Jedi Admin
Jedi Admin
Posts: 7366
Joined: Mon Aug 21, 2006 11:03 pm

Re: Attaching effects to units

Post by Maveritchell »

I'd use "bone_ribcage."
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: Attaching effects to units

Post by Fiodis »

Thanks for that, Mav. Actually, I got it to work before I read your response. I went into the Wampa's lightsaber's odf and got out hp_fire_lightsabre bone_head. Anyway, this can be marked as solved.

Thanks again!
Post Reply