Concept for destructable vehicle cosmetics

Ask questions, discuss ideas, get answers
User avatar
Vilespring
Posts: 740
Joined: Sat Nov 24, 2012 5:47 am
Location: Somewere in the United States

Concept for destructable vehicle cosmetics

Post by Vilespring »

I remember reading somewhere about destructible child bundles, but the had the problem that bots die when one is destroyed, even though the piloted are is untouched. So, I slept on the idea, and I came up with a potential solution, well, for cosmetic damage, and I'm here for you guys to see if it would work.

So, my idea still uses the destructible bundles, but a PCO is added to the tank via spawner and held in place, and this PCO with no entrance has the cosmetic pieces to the vehicle, like side skirts, sandbags, etc.

it could actually be used to make ERA armor, now that I think about it.

what do you guys think? :D
A picture is worth a thousand words, but takes up three thousand times the memory.

Area 51: http://battlefieldarea51mod.weebly.com/

Image
"I didn't steal your pizza"
User avatar
Swaffy
Posts: 1715
Joined: Sun Aug 29, 2010 9:25 pm
Location: Cibolo, Texas

Re: Concept for destructable vehicle cosmetics

Post by Swaffy »

It would work well for a player using it client-side, but I'm not sure how well that would go on a server.
(Forum Thread|Download) Swaffy'sMod v0.34 | Download link to come Soon™
User avatar
Vilespring
Posts: 740
Joined: Sat Nov 24, 2012 5:47 am
Location: Somewere in the United States

Re: Concept for destructable vehicle cosmetics

Post by Vilespring »

oh. I think client stress, all the time, I forget online. Well, that's good.
A picture is worth a thousand words, but takes up three thousand times the memory.

Area 51: http://battlefieldarea51mod.weebly.com/

Image
"I didn't steal your pizza"
freddy
Posts: 1267
Joined: Sun Oct 18, 2009 4:58 pm

Re: Concept for destructable vehicle cosmetics

Post by freddy »

Vilespring wrote: for cosmetic damage
check this out viewtopic.php?f=43&t=49
User avatar
Vilespring
Posts: 740
Joined: Sat Nov 24, 2012 5:47 am
Location: Somewere in the United States

Re: Concept for destructable vehicle cosmetics

Post by Vilespring »

That's interesting. My idea was so that parts fly off depending on how they were hit, like if you hit the right side of the tiger, some of the track guards will fly off the right side.

I might combine both of these. I think that's pretty cool, the armor effect code, I might have to flay with it more. :)
A picture is worth a thousand words, but takes up three thousand times the memory.

Area 51: http://battlefieldarea51mod.weebly.com/

Image
"I didn't steal your pizza"
freddy
Posts: 1267
Joined: Sun Oct 18, 2009 4:58 pm

Re: Concept for destructable vehicle cosmetics

Post by freddy »

That would be nice! You can spawn things with the armoreffect so it cold be dropping stuff that way to i guess.

Apache did some funky modding in his heroes mod
User avatar
Vilespring
Posts: 740
Joined: Sat Nov 24, 2012 5:47 am
Location: Somewere in the United States

Re: Concept for destructable vehicle cosmetics

Post by Vilespring »

now how did he do that?!?! :lol:
A picture is worth a thousand words, but takes up three thousand times the memory.

Area 51: http://battlefieldarea51mod.weebly.com/

Image
"I didn't steal your pizza"
User avatar
Apache Thunder
Posts: 1213
Joined: Mon Oct 19, 2009 2:48 am
Location: Levelland Texas, USA
Contact:

Re: Concept for destructable vehicle cosmetics

Post by Apache Thunder »

That's the destructible child objects concept you mentioned in your first post. Basically what I did was just add armor code to the springs so they can take damage. But unfortunately the game can't differentiate the alive status of the host vehicle from the child object correctly, so if a child object gets destroyed it kills all the occupants of the vehicle (it does not matter if they are bots or human).

It was something I was about to add to my BFH'42 mod and that bug came up during single-player testing. The test video I did was done either alone on a local server or in a singleplayer map with the vehicle unoccupied. I didn't know about the bug at the time I made that video. :P

However you might be able to use this concept for other things like building doors/destructible walls on a building that is also destructible. The main thing for it to work correctly in multiplayer is that the child objects have to be PCOs (as if you were coding passenger positions).

As long as you never put entry point objects you don't have to worry about that bug. Actually it's a bad idea to ever allow players to actually occupy a destructible PCO position on a host PCO. If that child object gets destroyed while a player is using it, the game crashes. There's coding to stop players from switching to them though. I think some planes or boats use PCO ID codes to prevent seat switching to certain PCO positions.

Just note that armor effects on child objects most likely do not function. I don't recall armor effects on destructible child objects working in multiplayer.
ImageImageImage
I have cameras in your head!
User avatar
Swaffy
Posts: 1715
Joined: Sun Aug 29, 2010 9:25 pm
Location: Cibolo, Texas

Re: Concept for destructable vehicle cosmetics

Post by Swaffy »

I have an AA variant of an M3 Halftrack and I put static objects around the side and back to act as supplemental armor. But they are static objects and so they cannot be damaged.

Have you tried to add a child PCO to the parent PCO? I guess that would cause collision mesh issues ...
(Forum Thread|Download) Swaffy'sMod v0.34 | Download link to come Soon™
User avatar
Apache Thunder
Posts: 1213
Joined: Mon Oct 19, 2009 2:48 am
Location: Levelland Texas, USA
Contact:

Re: Concept for destructable vehicle cosmetics

Post by Apache Thunder »

You will need to modify the material settings for the material IDs used by your static object child objects so that the projectiles you fire at them do damage to them. Much like with how multiple material IDs can be used on the same mesh, multiple objects with different material IDs can effect the damage projectiles do to the vehicle they are addTemplated to.

Since most materials IDs used on static objects aren't set up to take any damage at all from projectiles, using statics makes certain parts of your vehicle immune to damage. The best fix for that is to code all your projectiles to do some damage to those materials used by the static objects you added to the vehicle. (probably less then what the main vehicle materials do, so you can allow them to act as armor but not make the vehicle immune)

As for PCO's on PCO's, yes that can be done and has been done. The "passenger" positions on all vehicles are done via PCOs as child objects. Though normally, these child PCOs do not have armor turned on.
ImageImageImage
I have cameras in your head!
Post Reply