Someone PM'ed me about adding commander regen. I've still got a few items in my WIP List, so if anybody has the itch to try and solve this, leave a comment and go for it. I've got a few ideas how it might be done: Server Script The only units the server knows about are the commanders it spawned, and it monitors the commander state in order to handle game over. Unfortunately it seems to be a 'dead' flag rather than HP, but it could be interesting to see if the HP value is available to to the server and if it's a two-way link, or just read-only. The Invisible Hand Using either server script or create-unit containment,create an invisible, invulnerable unit that can only repair with assist-only-build flag, and order it follow the commander around. See Murder Party for most of the details. Caveat: this costs the player metal, because that's the only way the game does repair. You can decrease the commander metal cost (or increase wreckage_health_frac) to improve the metal/health ratio, but that also makes him easier to reclaim. These are all kind of long-shots; any other ideas?
Negative damage is a thing. (Also: I have a pair of dox playing ping-pong ;^) ) But you can't target your own units for direct fire.
A secondary fire weapon with splash_damage_allies can target the ground near a unit. Secondary fire is a 2D command. Create Zero-Health Unit: can occur at either the pointer position, or a 3d coordinate. The pointer won't work. There is the hidden PIP hack to issue a 2D command, but it would take a ping to turn that into a 3D coordinate. Order Unit: if we could create a truly hidden unit, we could use the hidden PIP hack and track-commander to order it to fire at the commander's 2D location.
There are probably more (actual) getters and setters, not just those read-only attributes, but they are not enumerated since they are handled by a wrapper via a catch-all and router system.
Only things I've gotten to work so far: - direct fire weapons, which can only damage enemies - modified uber cannon with splash_damages_allies - modified nuke without a damage volume Anything I've tried as a death weapon either does nothing (I think those were the damage volumes) or crashes the server.
What do you mean by "doesn't work"? Are you invoking it as a property or as a method? If it's a native method, then you won't be able to get the method as an object, you can only invoke the method.
Was property; I would expect something like [native code] instead of undefined if it was a method. Tried calling it anyway and got the expected no-method error message.
Damage volumes can't be negative, but armor_damage_map can, and at least one form (nuke ammo) works as a death weapon.
I guess it's time to summon @chargrove to help then. Let's hope he isn't in one of that "absent from the forums for 3 months" phases again. Bu I can't help to think that this mod would have horrible side-effects given the current control mechanisms. What I'm talking about? Reclaiming, of course, a self regenerating commander is a decent source of metal, even more so that his metal value is rather high compared to his health thanks to those sneaky orbital reclaim snipes. So unless you can disable metal gain on reclaim, regeneration doesn't sound like a smart thing to do either.
Server script is actually less ideal because of the custom server requirement. Negative damage currently has promise. I'll worry about reclaim if actually becomes an issue.