1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  1. l OneShot l

    l OneShot l Scavenger

    Hey,

    I am looking to see if there is a way to change how strong Murders (Zombies) are. Now I know there is BotSpawn but that controls the bots that are spawned with said plugin. I would like to know if you can change what the servers spawns randomly via the halloween.murdererpopulation command for their health. I appreciate your time looking this and I hope to hear from someone soon!

    Thanks,

    OneShot23
     
  2. Steenamaroo

    Steenamaroo Plugin Developer

    Directly modifying their health isn't easy, I don't think - I don't do that in BotSpawn.

    All I've done is a damage modifier based on the 'health' you specify.
    So if the config dictates 200 health, all I do is 100/200 to get 0.5 then apply that as the damage multiplier OnEntityTakeDamage.

    For all intents it works fine but if, for example, you have a plugin that displays health, it will show 100-0, going down at half the normal rate.
    Not ideal, I know.

    BotSpawn only affects its own bots (recorded in a dictionary when they're spawned), as you say, but it would be easy to make a global equivalent for any and all NPCPlayers by taking the relevant code and stripping away the BotSpawn dictionary checks.
     
  3. l OneShot l

    l OneShot l Scavenger

    Interesting and thanks for the update on this. The method you are currently doing would be enough to be honest. I am not using any mods or plan to that.
     
  4. Steenamaroo

    Steenamaroo Plugin Developer

    Re-reading, having a random value per bot makes it a little tricker, but still perfectly do-able.
    You could add each bot's userID to a dictionary when it is spawned, and have the random health multiplier set as value.

    OnEntityTakeDamage you'd look up that value and OnEntityDeath/OnPlayerDie remove the ID from the dictionary.