[MECH] Friendly 1.1 - Customize mob alignments [1240]

Discussion in 'Inactive/Unsupported Plugins' started by Celtic Minstrel, Jun 22, 2011.

  1. Offline

    Celtic Minstrel

    Friendly - Customize mob alignments
    Version: v1.0

    This plugin allows you to change the alignment of mobs. There are three alignments (Friendly, Neutral, and Aggressive) and three contexts (Day, Night, and Nether), and you can control the alignment of each mob in each context separately.

    Currently, you can only lower the alignment (so, no setting pigs to Aggressive) and cannot affect Ghasts or Slimes. Both these limitations will be fixed when I figure out how and/or when it becomes possible.

    Configuration is really easy. Just put sections in the following format in the config file:
    Code:
    <mob-name>:
      <context>: <alignment>
    
    For example, if you want creepers to be neutral at night and friendly during the day, the following config would do that:
    Code:
    CREEPER:
      Day: Friendly
      Night: Neutral
    
    Download

    This plugin was originally written by jordanneil23, but since he hasn't committed to its repository since March, and it allowed exactly what I wanted for my LAN server, I touched it up and then decided I might as well release it.

    Todo list:
    • Support raising the alignment of mobs (eg making cows neutral).
    • Support ghasts.
    • Support slimes.
    • Should detect light level instead of time of day, maybe? Or at least make it an option.
    • Randomness factors (25% neutral, 75& aggressive!)
    • Varying damage
    • Don't target admins
    • Per-world settings
    • Permissions (groups) support
    • Also control mob attitudes towards mobs.

    Changelog:
    Version 1.0
    • New config file format
    • Separate support for alignments in the nether.

    Version 0.1
    • Initial release by jordanneil23
     
  2. Offline

    CaiusTSM

    sounds cool!:D
     
  3. Offline

    Zarius

    Brilliant! Been thinking about this for a while. Any possibility of adding a randomness factor? I'd like to have:

    Code:
    CREEPER:
      - Day
        Aggressive: 60
        Neutral: 35
        Friendly: 5
      - Night
        Aggressive: 90
        Neutral: 7
        Friendly: 3
    
    Not sure if my example's yaml is formatted correctly...
     
  4. Offline

    Liger_XT5

    Kool idea, though when I read the title, I thought that certain mobs will attack other mobs. Always funny watching zombies attack archers :p
     
  5. Offline

    Celtic Minstrel

    @Zarius – You would need a colon after Day and Night for that to work. I suppose randomness might be possible, but I rather think that it wouldn't have the expected effect; it would be a random chance each time it tried to target you, and if I'm not mistaken it'll continuously try to target you as long as you're in range.
     
  6. Offline

    Zarius

    Could you save the entity to a list along with the random state (neutral, aggro, etc) and set it as needed (as I assume you need to keep resetting the entity to friendly at the moment)?
     
  7. Offline

    Celtic Minstrel

    Hm, true, that could work... it already saves a list of entities that have been attacked for the purposes of the Neutral setting.
     
  8. Offline

    Zarius

    Perhaps as soon as one targets you it can be added to the list. Although might be cute to add all entities to the list for the purposes of creating a rare zombie that hunts down any skeletons within range :D Might you also be able to vary their damage/health values slightly too?
     
  9. Offline

    Celtic Minstrel

    I think varying damage may come, since otherwise making animals aggressive will likely just make them follow you without doing anything, but I'm not sure. I probably won't vary health.
     
  10. Offline

    VIROS

    This is really useful! Is there a way to make it so mobs can be set to certain alignments regarding certain usergroups? It would allow you to make it so mobs won't attack your admins, or to create mob-friendly factions.
     
  11. Offline

    Celtic Minstrel

    There isn't, but that's not a bad idea. I'll put it on the todo list.
     
  12. Offline

    gsand

    Permissions-based mob aggressiveness would be the best thing ever.
     
  13. does this work with 935?
    no permissions?
    can i make cows at night aggressive?
    Code:
    PIG:
        Night: Aggressive
        Nether: Passive
        Day: Aggressive
    COW:
        Night: Aggressive
        Nether: Passive
        Day: Aggressive
    CREEPER:
        Night: Aggressive
        Nether: Passive
        Day: Friendly
    ZOMBIE:
        Night: Aggressive
        Nether: Passive
        Day: Passive
    CHICKEN:
        Night: Aggressive
        Nether: Passive
        Day: Aggressive
    animals dont go aggressive :(
    creepers are friendly at day time.
     
  14. Offline

    Tauryuu

    It would be cool if you can change their behaviors based on worlds too :)
     
  15. Offline

    Celtic Minstrel

    Read the opening post next time:

    And on the todo list:
    And yes, it should work fine on 935.

    Agreed. Added to todo list.
     
  16. Offline

    gsand

    Group permissions would be awesome

    Code:
    GROUPS:
        VISITOR:
            CREEPER:
                Day: Friendly
                Night: Friendly
        WOODSMAN:
            CREEPER:
                Day: Friendly
                Night: Neutral
        FERALHUMAN:
            CREEPER:
                Day: Neutral
                Night: Neutral
     
  17. Offline

    Celtic Minstrel

    Huh, I thought that was already on the todo list. Oh well, it's there now.
     
  18. Seems it doesnt apply to Humans(Mob) yet or are they just not named HUMAN?
     
  19. Offline

    TheSmokingMiner

    Does this work in 953 yet?
     
  20. Offline

    Celtic Minstrel

    I think they'd be called MONSTER.

    I'm using it on CraftBukkit 950, so probably.
     
  21. Offline

    Xlaits

    I definitely need this plugin.
    I have a Cult of Creeper religion, and I need the Creepers to be friendly to the Cult members.
    Is there a way you could rig the plugin for that? Or will I finally need to learn how to code?
     
  22. Offline

    Celtic Minstrel

    It's something I can do, yes. Be patient, okay? :p
     
  23. Offline

    Xlaits

    Thank you. You're doing the CoC a great deed, indeed.
     
  24. Offline

    Xlaits

    Just checking in, how's progress?
     
  25. Offline

    Celtic Minstrel

    None yet, I've been working on and off on General. Once I release General 3.5 I should be able to do something on this.
     
  26. Offline

    Xlaits

    Ok, just curious.
     
  27. Offline

    colin8696909

    is it possible to change the aliment of mobs for each other so zombies attack creepers even if they haven't attacked you.
     
  28. Offline

    Celtic Minstrel

    I imagine that the framework to allow you to increase a mob's hostility (eg making pig zombies or spiders or wolves always hostile) would also allow something like that. Not sure though, since said framework hasn't yet been created.
     
  29. Offline

    oilrag

    so can we make mobs attack other mobs with this plug-in?
     
  30. Offline

    Celtic Minstrel

    Not at the moment, but I've added it to the to-do list.

    I'll probably take a break from plugin development this week (except maybe a bugfix or two in General 3.5.x), but this'll probably the next thing I look at when I get back into it.
     

Share This Page