[WIP][Server] Commander Regeneration

Discussion in 'Work-In-Progress Mods' started by wondible, November 10, 2014.

  1. wondible

    wondible Post Master General

    Messages:
    3,315
    Likes Received:
    2,089
    Release Thread

    Commanders slowly regain health.

    - https://github.com/justinlove/commander_regeneration

    Limitations

    No regen occurs while in transports.

    Technical Implementation

    The mod enables the create unit cheat, and then shuts off the normal UI affordances for using it. This is done via `common.js`, so the mod is incompatible with other mods that use the same trick (Puppetmaster and Murder Party) The client periodically creates a zero-health unit which immediately dies and (death weapon) causes a planet-wide explosion that does 1 damage; all armor types reduce this damage to 0, except commander which has a -60 multiplier (62.5 is 0.5% health)

    Alternate Implementations

    I believe this could be ported to server-script, but there would be a small amount of original research in how to set up such mods.

    The mod could be split into create-unit lockdown, and a client mod that performed regeneration, but the regeneration would stop if that client disconnected, and it's also possible that the sim would reject units from a defeated player.

    Trivia

    - Negative damage works for direct fire and splash damage with `splash_damages_allies`.
    - Negative damage is rejected for damage volumes.
    - Negative armor multipliers work, even for damage volumes.
    - Units in transports aren't affected by area damage.
    - Direct fire weapons cannot target your own units.
    - Secondary fire weapons can target the ground near your units.
    Last edited: November 20, 2014
  2. wondible

    wondible Post Master General

    Messages:
    3,315
    Likes Received:
    2,089
    Easy one down: got multiple planets working last night. Note however that units in transports aren't affected by damage, negative or not.
  3. sleepykid12

    sleepykid12 New Member

    Messages:
    28
    Likes Received:
    9
    So wait, could you make a healing nuke using the same hack? You could fire it at your death ball and they all get full health regenerated. This is pretty cool.
    On a side note, couldn't you reclaim the commander and get free metal?
  4. wondible

    wondible Post Master General

    Messages:
    3,315
    Likes Received:
    2,089
    Healing nuke would heal all players, just like a nuke damages all players. It's a hack, so the only options are "all other players" and "all players"

    I may have to make a commander cost reduction mod if it's an issue.
  5. reptarking

    reptarking Post Master General

    Messages:
    1,321
    Likes Received:
    1,577
    so what your saying is if i give a combat fabber a uber cannon kind of weapon and give netgitive dmg multiplers to all units it will then have an AoE healing cannon?
  6. stuart98

    stuart98 Post Master General

    Messages:
    6,009
    Likes Received:
    3,888
  7. wondible

    wondible Post Master General

    Messages:
    3,315
    Likes Received:
    2,089
    Synced event rate to sim speed. Laid some groundwork for handling multiple clients.
  8. wondible

    wondible Post Master General

    Messages:
    3,315
    Likes Received:
    2,089
    Multi-client is theoretically working, but I've only tested up to two.
  9. philoscience

    philoscience Post Master General

    Messages:
    1,022
    Likes Received:
    1,048
    I love the idea of turning PA into a MOBA style game where the commander leads crazy creep charges into the planet. Here is an idea for a conversion mod: buff the hell out of defenses so they are super easy to put up and very strong. Bug the hell out of the commander and give him different weapon loadouts a la burntcustard. Make unit production slower to nerf early rushing. Game then becomes about sending an ever growing trickle of units into a highly fortified base. Once you reach critical mass, you take the commander in for a crazy full out assault. Most games will be decided by decisive exchanges between commander supported armies and the commander themselves. We already see some spiritual precursor to this in Zaphod's old comrush tactics and in comboxing.

    @ZaphodX
  10. zaphodx

    zaphodx Post Master General

    Messages:
    2,350
    Likes Received:
    2,409
    Gonna try a stream to test out this mod some time this weekend and see how it plays.
  11. wondible

    wondible Post Master General

    Messages:
    3,315
    Likes Received:
    2,089
    I'm not very familiar with the previous games. I set the rate where there would be visible regen if you got into a fight early (or had a longer game), but shouldn't have an appreciable impact on a single situation.

Share This Page