NPC Faction with AI that collects resources, builds buildings, and fights players.

Discussion in 'Archived: Plugin Requests' started by YomatsuShimano, Oct 1, 2012.

  1. Offline

    YomatsuShimano

    Okay, So this is my idea, and it'd be a hell of a lot of work, and take a super long time but has a LOT of potential! I'll just throw a couple ideas out there and if you think you could help me, then we'll start collaborating! If you have any questions, feel free to respond right on this thread, or

    (If you like this idea, Please bump the thread so other's will see it!)


    Plugin category: NPC, Bots, Faction, Monsters

    Suggested name: Project Life

    What I want:
    The idea is simple. An NPC "Faction" that will play and operate like regular players do.

    A plugin that will enable NPC's in the game (possibly powered by the Citizens 2 plugin) to start a village of 2 (or more) NPC's. These NPC's will then go out and start collecting resources, being as efficient as possible. This mod has much influence from the Minecolony mod, so bare with me. The village will thrive until it has the necessary tools to go to war, and fight mobs. It will create a keep or castle, and then spawn soldiers that guard it, as well as soldiers that patrol around the village. Any players that are deemed unfriendly to them will be attacked. (Players might be tagged as unfriendly if they attack the NPC's or maybe if they have hit other players. Some sort of reputation system could be set in place) The plugin could also implement "Spy" NPC's that find buildings that players have made, and study them so that they can later emulate the buildings in their own town. This could be achieved by observing where players place crafting blocks, chests, paintings, doors, ect. NPC's would be paired up with other NPC's and have children which grew into regular NPC's later on, (depending on how many buildings/houses are available). The NPC's would wear armor, weapons and such. They would have a blacksmith and carpenter, a cook and a farmer, ect..​



    (The NPC's would have "Personalities" which would influence how they interact with the world. They may have multiple personalities or just one, depends on how they are rolled. The first 2 NPC's would have every personality in the beginning until we can figure out something better.)
    Personalities
    • Wood Cutter - Cutting down trees and replacing any tree with saplings that fall.
    • Miner - Start's a mine shaft, but makes it look nice and neat and orderly. Not just a hole in the ground. Maybe finds a small hill and starts digging stairs down until it finds a cave, then proceeds through the cave.
    • Farmer - Cuts down grass to find seeds, then set's up a small field where it can, then uses a hoe that was crafted by the elder NPC's to till the ground.
    • Crafter - Crafts items and stores them in chests for the other NPC's upon request. This NPC would be a general Blacksmith/carpenter/alchemist. Either that or implement more personalities.
    • Cook - Cooks food using supplies the farmer and hunter gather.
    • Hunter - Hunts for animals, then brings back meat to the cook, and skins to the supply bins.
    I think you get the point...

    This would take a lot of programming, and a lot of hard work, and a lot of testing. All which I am prepared to undertake. I am terrible at scripting/programming, which is why I'm seeking help.


    When I'd like it by: Eventually. That's all I ask. Just eventually make this a possibility.
     
  2. Offline

    sharp237

    On a scale of 1 to 10, I think that the level of difficulty for this request is 100. :eek:
     
    MrBluebear3 and chakyl like this.
  3. Offline

    SirTyler

    Cause making Artificial Intelligence is so easy... Let alone make one that acts like a player and interact with itself and other plays. It is completely possible, but the majority of the project would just be making the AI and would take a lot of work.
     
  4. Offline

    Kiakaha

    Like the above post says, even though a lot of people would love this
    It's too big a task for a simple plugin here
    Here's some plugins that bring you closer to your goal though

    1. Citizens2 (you probably already know that)
    2. Builder < NPC for Citizens that can build stuff (from world edit schematics)
    3. Denizen < NPC can be a builder at the same time and can be scripted
    4. Sentry < NPC that is a guard/fighting type. They can be configured to Attack or Not Attack certain factions (Factions, Towny and War plugin support)
    Since a very clever configuration of these could already allow for builders to semi randomly wander the world placing buildings and attacking enemies nearby them your request is not that far fetched

    The problems i foresee are
    1. Buildings created by players vary so greatly it would be next to impossible to have the game pick up their schematics alone (But you could make a way for players to manually add their best building to the npcs list)
    2. Npcs can wander randomly but ussually around a fixed point radius (it would require careful scripting to make the npc periodically save a new centre location (so that his position in the world can vary)
    3. Npcs can be set to follow a player or another npc but it would be much more difficult to have a band of npcs that both
    • can wander randomly
    • stick together in a tribe
    I suggest you do this. (since you have the time and inclination but lack the coding knowledge)

    Get Citizens and at least Denizen and start making scripts for NPCS
    the more you do the easier it gets and bigger problems like this will slowly become more approachable through smaller progressive steps such as
    1. Make a script that lets your npc wander but saves a new centre point each couple of minutes
    2. Make a script that makes your npc place a building schematic every hour (or at sunrise, or whatever)
    3. ^Modify the above script to allow your npc to randomly select his building from a predefined list
    4. Make it so that once the first building is down he places the next few in a smaller radius around it (thus creating a knit together village)
    5. Come up with a way for these NPCS to copy each others centre locations so that they can stick together

    ^ As i wrote all that i was thinking

    "Damn this really is all possible and super doable"

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 29, 2016
    makskay likes this.
  5. Offline

    bjsnow

    I was Thinking of this... this morning.... and then I saw this lol
     
  6. Offline

    Necrodoom

  7. Offline

    Piratio

Share This Page