Advance Towns and Villagers

Discussion in 'Archived: Plugin Requests' started by Fariel, Aug 22, 2012.

  1. Offline


    Okay guys, I'm expecting this to be a rather long-winded post, so bear with me. I've been rolling around the idea of creating an advanced interactivity system for the AI in a game, and minecraft fits it the best. However, I don't know java very well, nor do I know much about the minecraft/bukkit code. I am willing to learn, though. This is not /exactly/ a plugin request, as I am willing to do most of the work as long as I have help with it. Otherwise, if someone makes it, I would love them forever if I could review the code and help, too.

    The concept of the plugin is to provide the villagers with more advanced functions to make them seem more alive, or living to be more accurate. It would have to modify one existing entity heavily and create a new, more abstract one.

    Plugin name: AdvancedTowns

    What the plugin would do:

    Modify villagers for the following:
    • Provide villagers with a server-stored inventory
    • Allow villagers to store their inventory in town chests
    • Allow villagers to trade resources with eachother (possibly with players via right clicks and chat)
    • Allow villagers to gather resources / mine
    • Allow villagers to place blocks from inventory in order to build the pre-existing minecraft structures
    • Allow villagers to build golems for defense
    • Allow villagers to have specific roles (farmer, miner, woodcutter) when population reaches milestones
    • Allow villagers to designate a house as their own, or a place of work in the case of farmers or blacksmiths
    Create an abstract "town" that does the following:
    • Allow a population of villagers to be designated as a "town"
    • Perhaps a town name on a sign placed on the town well
    • Towns would maintain population counts
    • Towns would maintain a current jobs list
    • Towns would assign new villagers jobs based on what is needed in the town
    • Towns assign a "current project" that all of the villagers attempt to mine/gather resources for
    • Towns maintain a resource list of all of the resources in the town's chests / inventories
    • Towns tell villagers to start building a new structure once the appropriate resources are gathered

    The entire premise of the plugin is to allow villagers to collect resources, trade with one another, and build structures to live in, which would cause the towns to actually grow over time. The buildings that they create would be pre-existing building templates that (hopefully) exist in minecraft code already. I'm aiming, essentially, for the buildings that minecraft already has. If not, then we would also need to add some building templates for houses, smiths, farms, maybe an inn, a well, etc.
    The towns would attempt to make sure at least every pair of villagers has a home, and from there to ensure that each villager has a role. While the town has a small population it would assign villagers with general jobs like "resource gatherer" that would cause them to collect wood, stone, iron, dirt, etc. Once the population increases enough to support a more diverse economy, it can start giving more narrow jobs like woodcutter, miner, smith, and farmer.
    Towns would need to maintain a list of current jobs (as well as updating if any of the villagers die) so that it can reassign villagers or provide new villagers with jobs as needed, in areas that are lacking. It will also need to keep track of the number of golems that belong to the town so that it can keep adequate defenses.

    I have a list of scope-creep goals that I would like to add in if this plugin actually takes off. These are:
    • Providing a thief job for villagers
    • Causing villagers to attack thieves when they steal (whether they be players or other villagers)
    • Allow towns to declare war on eachother
    • Allow towns to form alliances
    • Allow trading across towns
    • Visually show villagers holding active blocks, like players or endermen
    • Visually show villagers wearing armor

    I have a feeling I'm probably talking about something insane and unfeasible, but, do let me know your opinions and if you would like to help or start the project yourself.
  2. Offline


    Bump for hopeful interest. :(
  3. Offline


    It would be cool to see, but I'd hate to be the one to code it.

    AI and inventory tracking, automated entity based structure creation and a basic economy setup would be needed.

    Maybe it you could trim it down to basics at first it might be simpler and more attractive to coders.
  4. Offline


    Looks that, if it is made, it would be an awesome plugin.
  5. Offline


    In vanilla minecraft, villagers can't attack, hold blocks or wear armor, so to make that happen the client would need spout.
  6. Offline


    AI would be the big thing. Inventory track is already "sort of" implemented via the endermen. I think you could take the code used to store their block and extrapolate it up to a full inventory, add a bit to allow them to choose what theyre holding, and it should be good. Entity based structure creation would be along the lines of the AI, and the AI would be, I think, as simple as "gather" and "place the blocks I have in this template." Industrialcraft has a "place the blocks I have in this template" system, so I know that one is doable as well.

    If someone could just make villagers pick up and store dirt blocks, it would be a great start.

    ScicoPax, thanks. :)

    @Gnomeo78 - I know, but you're referring to my "scope-creep" goals, which are extras if ever the base gets finished. Thanks for pointing it out though. :)

    The big issue I have is I don't know how to code bukkit plugins. :/
    ScicoPax likes this.
  7. Offline


    Fariel: Just because endermen can hold blocks, it doesn't mean villagers can...
  8. Offline


    np98765 Why could you not recycle the enderman code? By hold, I don't mean physically hold. Just as long as the server stores that they are carring things, it doesn't matter if it's visual.
  9. Offline


    nice idea. i'm no computer geek so I can't help code, but I do think notch should really improve villagers/villages. if you beat him to it that would be epic :D
  10. Offline


    Then that would be doable.

    But this would take a ridiculous amount of time to do anyways... You're basically programming villagers to be primitive players. :confused:
  11. Offline


    Quite the goal. It should make the villagers / villages expand over time instead of dwindling out of existence. :)

Share This Page