While I'm working on redoing vehicles and adding in support for modular weapons (so that the weapon chosen has its own model that appears on the tank) It occurred to me to make provisions for modular armor as well. I could put mount points on various portions of the hull for us to attach armor pieces that show everyone the type of armor the tank us using. Is this doable? Practical? Should I do this? I know people would love it and from an art view it really wouldn't be that hard. I'm wondering about code.
It would be one effect for each armor. Thats not that much, Empty. Also the modular loadout idea is a classic that I would love to see, but I doubt that I'm good enough to implement the code myself atm. A senior coder would have to do that.
Well it's not just an effect, it has to be cheap up close, it h as to be unique, it has to look good, it has to be interesting and it has to reflect how the armor behaves.
it's not hard, actually. create an entity, such as CEmpArmor, spawn it, and parent it to the armor attachment point. It's probably 3 lines of code in the vehicle's spawn function. The only thing I'm concerned about is the cost of the function. I'd prefer MOOtant to weigh in on this as to how much this would impact performance. I think, if we a sane way of attaching crap together, it shouldn't be too hard on the server.
Considering we only have about 20 tanks max and source can handle well over 500 physics ents, I doubt 60 extra total props will make a huge difference.
A single model, with submodels for multiple armour plates, if that would be done as well, multiple skins for different armour types, which would then be parented to a tank on creation, isn't all that costly. Making the armour take damage is another thing though.
I like this a lot, the armors shine/look different. BUT, what difference does it make, what kind of effect you got when you shoot at it? I mean, explosions from the big guns you usually use on tanks kind of don't leave any more space for armor-specific effects. This leaves the effects normal infantry weapons and machine guns have, which definitely should change from the normal HL2 effect, since everybody in the mod community seems to hate those leftovers. What effects does it leave then? Regen effect, when it actually regenerates. Reactive swirls and moves? Absorbent is dark, absorbs light etc.
I've got tons of impact effects for bullets and such, they just crash. The SGL guys hooked up custom impacts, if you give me code support I can make small arms fire make unique effects for each tank.
Reactive uses electrical discharges to destroy incoming projectiles. It doesn't move :p The moving thing would make sense for Absorbent or Regenerative though IMO.
No moving armor, but I am thinking Regenerative might be a living substance for the NF. I'll post some mock ups.
A few thought provoking but possibly dumb questions. The only way that you are going to be able to see the effects is up close and when the armor is not getting hit by something with a big effect. Is it worth it in terms of performance to check to see if the weapon effect is going to cover the armor effect What about using the blood o the uniform effect for tank damage or is that too random. If this is useful, is it possible to remove the damage to armor effect when you repair at the repair pad and not have it appear on regen armor.