Multiple Addon Meshes?
Moderator: Moderators
-
ROCKET
- Private First Class
- Posts: 80
- Joined: Tue Aug 23, 2005 1:11 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Location: Northern California
Multiple Addon Meshes?
I'm trying to figure out how to add different addon meshes to different bones on a unit. Does anyone know how or have some ideas about it? Below I've outlined what I've tried and what it did:
Option 1 (Mesh 2 shows in-game, Mesh 1 doesn't)
AnimatedAddon = "GROUP1"
GeometryAddon = "Mesh1"
AddonAttachJoint = "Bone1"
AnimatedAddon = "GROUP2"
GeometryAddon = "Mesh2"
AddonAttachJoint = "Bone2"
Option 2 (Neither mesh shows in-game)
AnimatedAddon1 = "GROUP1"
GeometryAddon1 = "Mesh1"
AddonAttachJoint1 = "Bone1"
AnimatedAddon2 = "GROUP2"
GeometryAddon2 = "Mesh2"
AddonAttachJoint2 = "Bone2"
Option 3 (Mesh 2 shows in-game, Mesh 1 doesn't)
AnimatedAddon = "GROUP"
GeometryAddon = "Mesh1"
AddonAttachJoint = "Bone1"
GeometryAddon = "Mesh2"
AddonAttachJoint = "Bone2"
Option 4 (CTD)
AnimatedAddon = "GROUP"
GeometryAddon1 = "Mesh1"
AddonAttachJoint1 = "Bone1"
GeometryAddon2 = "Mesh2"
AddonAttachJoint2 = "Bone2"
Option 1 (Mesh 2 shows in-game, Mesh 1 doesn't)
AnimatedAddon = "GROUP1"
GeometryAddon = "Mesh1"
AddonAttachJoint = "Bone1"
AnimatedAddon = "GROUP2"
GeometryAddon = "Mesh2"
AddonAttachJoint = "Bone2"
Option 2 (Neither mesh shows in-game)
AnimatedAddon1 = "GROUP1"
GeometryAddon1 = "Mesh1"
AddonAttachJoint1 = "Bone1"
AnimatedAddon2 = "GROUP2"
GeometryAddon2 = "Mesh2"
AddonAttachJoint2 = "Bone2"
Option 3 (Mesh 2 shows in-game, Mesh 1 doesn't)
AnimatedAddon = "GROUP"
GeometryAddon = "Mesh1"
AddonAttachJoint = "Bone1"
GeometryAddon = "Mesh2"
AddonAttachJoint = "Bone2"
Option 4 (CTD)
AnimatedAddon = "GROUP"
GeometryAddon1 = "Mesh1"
AddonAttachJoint1 = "Bone1"
GeometryAddon2 = "Mesh2"
AddonAttachJoint2 = "Bone2"
- Maveritchell
- Jedi Admin

- Posts: 7366
- Joined: Mon Aug 21, 2006 11:03 pm
Re: Multiple Addon Meshes?
As far as I know, it can't be done. I've tried before with no success.
-
ROCKET
- Private First Class
- Posts: 80
- Joined: Tue Aug 23, 2005 1:11 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Location: Northern California
Re: Multiple Addon Meshes?
Well then let's try a little more! This is Gametoast, after all. Let's not pull out the c-word (which would be "can't", LOL) quite so quickly! Any crazy ideas to send me off to try?
- Teancum
- Jedi Admin

- Posts: 11080
- Joined: Wed Sep 07, 2005 11:42 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Location: Indiana
Re: Multiple Addon Meshes?
Typically you can look at .exe files in a hex editor and find out if a particular function is supported. That's how I've found a few unique things in games, and SWBF2 should be no different.
- Gogie
- Modeling Master

- Posts: 708
- Joined: Fri Mar 31, 2006 11:02 pm
- Projects :: Tinkering away with LEGO
- Location: alberta, canada
Re: Multiple Addon Meshes?
you can always just add them to a .fx file sorta like the geonosiuan wings, but have multiple meshs at the same time programmed in, so no blending times, unfortunately you wont be able to attach them to any other joints, which ever bone you attach them to they will be stuck there, however, if you want to add a cape to a unit that uses a double jump, your .fx file will make the cape still be atatched to your mesh when your jumping.
-
ROCKET
- Private First Class
- Posts: 80
- Joined: Tue Aug 23, 2005 1:11 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Location: Northern California
Re: Multiple Addon Meshes?
And I'm a hex-editing novice, but I'll give that a try too, Teancum.
And I guess your .fx idea won't quite work for me, Gogie (since it has to be on one bone). But I'll definitely remember it for future reference.
And I did have one other idea which I'm working on (without any luck so far). I've been able to call out multiple meshes on multiple bones with two-bladed melee weapons. So I'm thinking that I can add more meshes to the unit through it's weapon .odf by adding more OffhandGeometryNames and OffhandFirePointNames. If I get that to work, then I'll have to try to add it to ranged-weapon odf's as well. Although it would be kind of funny to have armor, helmets, etc suddenly popping on and off as you switched weapons.
EDIT
The melee ODF idea WORKED! I just had the hard point call-out wrong. I'm just adding a test mesh to the forearms as a proof of concept. Now I can get to work making nicer meshes.

Now to see if I can do something similar in a ranged-weapon ODF.
And I guess your .fx idea won't quite work for me, Gogie (since it has to be on one bone). But I'll definitely remember it for future reference.
And I did have one other idea which I'm working on (without any luck so far). I've been able to call out multiple meshes on multiple bones with two-bladed melee weapons. So I'm thinking that I can add more meshes to the unit through it's weapon .odf by adding more OffhandGeometryNames and OffhandFirePointNames. If I get that to work, then I'll have to try to add it to ranged-weapon odf's as well. Although it would be kind of funny to have armor, helmets, etc suddenly popping on and off as you switched weapons.
EDIT
The melee ODF idea WORKED! I just had the hard point call-out wrong. I'm just adding a test mesh to the forearms as a proof of concept. Now I can get to work making nicer meshes.
Now to see if I can do something similar in a ranged-weapon ODF.
-
Caleb1117
- 2008 Most Original Avatar
- Posts: 3096
- Joined: Sun Aug 20, 2006 5:55 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Location: X-Fire: caleb1117 ಠ_ಠ
Re: Multiple Addon Meshes?
Wait, how did you do that? Add another addon through the unit's weapon ODF?
- Maveritchell
- Jedi Admin

- Posts: 7366
- Joined: Mon Aug 21, 2006 11:03 pm
Re: Multiple Addon Meshes?
It's a second "weapon," just like Aayla's sabers:Caleb1117 wrote:Wait, how did you do that? Add another addon through the unit's weapon ODF?
Hidden/Spoiler:
-
ROCKET
- Private First Class
- Posts: 80
- Joined: Tue Aug 23, 2005 1:11 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Location: Northern California
Re: Multiple Addon Meshes?
Exactly, Maveritchell. Just modify the "NumDamageEdges" to the total number of meshes (weapons plus addons) and add the following for each addon:
OffhandGeometryName = "your_addon_mesh"
OffhandFirePointName = "your_addon_hp your_unit_bone"
LightSaberLength = "0.0"
LightSaberWidth = "0.08"
The only problem is that I think there may be a limit on "NumDamageEdges". Going above "4" doesn't seem to work. But I'm still playing with it.
OffhandGeometryName = "your_addon_mesh"
OffhandFirePointName = "your_addon_hp your_unit_bone"
LightSaberLength = "0.0"
LightSaberWidth = "0.08"
The only problem is that I think there may be a limit on "NumDamageEdges". Going above "4" doesn't seem to work. But I'm still playing with it.
- Maveritchell
- Jedi Admin

- Posts: 7366
- Joined: Mon Aug 21, 2006 11:03 pm
Re: Multiple Addon Meshes?
The easiest and most surefire way would probably be just to hexedit in the MODL chunk of the addon to the unit's mesh, a la RepSharpshooter's method.
-
ARC_Commander
- High General

- Posts: 838
- Joined: Tue Feb 06, 2007 7:18 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
Re: Multiple Addon Meshes?
Here's what I've been trying to do, to add Bly goggles and pauldron onto a unit. I've made an effect file, using the geo_wingsfolded.fx and changing the geometry to that of the pauldron.
The binocs are added through addon meshes, and they show up all right. I've attached the effect like so:
But it doesn't appear in game. Logfile gives me about 40 lines of:
Any ideas?
Hidden/Spoiler:
Code: Select all
AttachDynamic = "1"
AttachEffect = "rep_pauldron"
AttachToHardpoint = "bone_ribcage 0"
Code: Select all
Message Severity: 2
.\Source\FLEffect.cpp(463)
Attach: model '' [ef944c4c] has no hardpoint 'bone_ribcage' [e5b51072]
-
ROCKET
- Private First Class
- Posts: 80
- Joined: Tue Aug 23, 2005 1:11 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Location: Northern California
Re: Multiple Addon Meshes?
I'm not sure yet about the .fx method, but I do have some other results.
I confirmed through the BFlog file that the maximum number of meshes allowed through the melee ODF is 4. I'm guessing they set the limit there to accomodate Grievous's 4 sabers. Still, that's 2 or 3 addon meshes that can be added this way (depending on whether the base melee weapon starts with 1 or 2). I still need to see if I can do something similar with a ranged weapon ODF.
I also tried a few variations of the "NextAddon" idea. I wasn't able to get any additional addons to show up in-game. But one attempt did finally give me this error:
Message Severity: 2
.\Source\EntitySoldier.cpp(11195)
EntitySoldierClass::SetProperty: multiple AnimatedAddon's not supported
So it looks like multiple addons through the unit ODF isn't going to work. I think I may end up taking a crash course in hex editing.
I confirmed through the BFlog file that the maximum number of meshes allowed through the melee ODF is 4. I'm guessing they set the limit there to accomodate Grievous's 4 sabers. Still, that's 2 or 3 addon meshes that can be added this way (depending on whether the base melee weapon starts with 1 or 2). I still need to see if I can do something similar with a ranged weapon ODF.
I also tried a few variations of the "NextAddon" idea. I wasn't able to get any additional addons to show up in-game. But one attempt did finally give me this error:
Message Severity: 2
.\Source\EntitySoldier.cpp(11195)
EntitySoldierClass::SetProperty: multiple AnimatedAddon's not supported
So it looks like multiple addons through the unit ODF isn't going to work. I think I may end up taking a crash course in hex editing.
-
ARC_Commander
- High General

- Posts: 838
- Joined: Tue Feb 06, 2007 7:18 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
Re: Multiple Addon Meshes?
Hmm... I may need to do the same.
-
ROCKET
- Private First Class
- Posts: 80
- Joined: Tue Aug 23, 2005 1:11 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Location: Northern California
Re: Multiple Addon Meshes?
Addons on multiple bones are possible. You get one in the unit ODF, one in the .fx, and 2 or 3 in the weapon ODF. Granted it's a little inelegant to spread it all over the place, but at least it's something!
-
Caleb1117
- 2008 Most Original Avatar
- Posts: 3096
- Joined: Sun Aug 20, 2006 5:55 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Location: X-Fire: caleb1117 ಠ_ಠ
Re: Multiple Addon Meshes?
Does this method work with non-melee weapons?
-
ROCKET
- Private First Class
- Posts: 80
- Joined: Tue Aug 23, 2005 1:11 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Location: Northern California
Re: Multiple Addon Meshes?
No luck yet on the non-melee weapons. But I am still trying. And still open to ideas.
EDIT
Hey, ARC_Commander... I'm finally looking into the .fx strategy and I'm wondering where you found the example of the "AttachDynamic" code? Also, I've been thinking about your hardpoint error. If it's the same as the melee weapon geometry call-out, you would need a hard-point in the model, such as hp_fire, in addition to your unit bone. Your code would become:
AttachToHardpoint = "hp_fire bone_ribcage"
EDIT
Hey, ARC_Commander... I'm finally looking into the .fx strategy and I'm wondering where you found the example of the "AttachDynamic" code? Also, I've been thinking about your hardpoint error. If it's the same as the melee weapon geometry call-out, you would need a hard-point in the model, such as hp_fire, in addition to your unit bone. Your code would become:
AttachToHardpoint = "hp_fire bone_ribcage"
