Questions on roles



  • Hello,

    I am fairly new to the game and am just trying to get auto spawning up and running. There does however appear to be a plethora of suggested roles and I would like some clarification on how a optimum room would look like in terms of Screeps roles and what parts each role has (e.g. Harvester[CARRY, MOVE, MOVE, WORK] 3 per room).

    I would really appreciate it if you could offer any help.

    Thanks.



  • Welcome 🙂

    Your role (if you even want to have roles) are up to you and your design. The tutorial gives a few ideas but finding the best combination of parts for each creep is up to you.

    That being said, common suggestions are diggers which sit at the source and only do mining, they need a lot of work, one carry and not much move other than getting to the source.

    You then have movers which travel back and forth between the diggers and your destinations (like a storage or a builder creep) and pick up from the diggers and deliver to the destination, these guys need equal carry and move and nothing else.

    Then you would have your builders/upgraders which would again need a lot of work so they can get the job done quick, while the movers ensure their low/semilow carry capacity is always full.

    You can always look at my setup at E31S12 for inspiration.

    Hope this gets you on your way 🙂

    Cheers,

    Primoz



  • The short answer, and really the best answer is to experiment and see what works for you. There is no real clear this is the only way to do things. I have seen quite a few strategies employed, and I can't really say that one is better than another. However, I can speak to a pretty common strategy I see that many employ.

     

    Dedicated Harvester --- [WORK,WORK,WORK,WORK,WORK,WORK,CARRY,MOVE]

     Moves to a source, and then never moves again. Harvests until it dies. Drops energy to the ground or transfers directly to haulers or transfers to a container. I find the container to be quite convenient and reliable in owned rooms, although there is much to be said for drop harvesters as well particularly for more distant work sites. Typical size is 5-6 work since this will max out your energy per source reliably.

     

    Dedicated Hauler --- [CARRY,CARRY,MOVE]

    Possibly the most complex role, which does take a bit of pre-planning on your part. Does it go simple point A to point B? Does it haul to spawners, expanders, and towers? Does it pick up from the ground? or from a creep? or from a container? It's by far the most complex role to nail down which is why I literally have something like two dozen different variations on this script right now. I'm trying to cut that down a bit. Dedicated haulers come in many sizes, but the typical mold is multiples of 2 carry 1 move.

     

    Dedicated Upgrader --- [WORK,WORK,WORK,WORK,WORK,WORK,CARRY,MOVE]

    This is another very very simple creep. It goes to a spot in range of the controller and waits for energy. as soon as it has energy, it upgrades. Just figure out where it gets energy from, drop, container, or direct transfers. Note that this is a small example of a dedicated upgrader. It costs one work to spend one energy to upgrade one point of control, which is half the speed of your harvesters. So plan on needing a big one, or more than one working together.

     

    This is not the only solution out there by far, nor is it even necessarily the best one. I can say however, that it is a popular one. With this system you also need some other specialist roles, such as builders and repair which you need to decide how to integrate into this system in a way that works for you.



  • You need to understand how movement works before you can make informed decisions about creep bodies and roles.

    • A creep that is 1/2 move parts can always move full speed over plains.
    • A creep that is 1/3 move parts can always move full speed over roads.
    • Empty carry parts don't count for movement, so empty haulers move at full speed even over swamp.
    • Move parts are a waste if you don't move, but taking too long to arrive is a waste of the creep's life too. Some math can demonstrate:

      [WORK,WORK,WORK,WORK,WORK,WORK,MOVE] = 650 energy. Without roads, it will take 150 turns to move 25 squares. That's 10% of its life, or 65 energy, wasted. This makes its 'real cost' 715 (because you would need to spawn its replacement 150 turns early to not have a gap). But adding another move part is not efficient, because this would raise the cost of the creep to 700 energy and lower the 'time cost' of travel from 65 down to 35. Total cost now? 735 energy.

      The move expensive the creep gets, and the longer it has to spend traveling, the move move parts you should add. Your situation (distance traveled over the life of the creep, roads, swamps) will define the optimal choice for you.

    One thing I recommend: keep track of your time spent moving, working, and idling on your creeps. When they die of old age, report this information in to some kind of statistical memory. That will help you make informed decisions about whether your creep body designs are fulfilling their role efficiently in your circumstances.



  • Thanks you for all of your suggestions, I am very thankful.



  • I sometimes watch my neighbours and try and guess how they've set theirs up, and I've seen plenty of highly efficient rooms that are just multiples of 1 move, 1 carry, 1 work, and it looks like that works best when the sources and controllers are close together with plenty of room in the centre for a spawn.

    There's this guy near me who has a bunch of his heavy drones (9W, 9C, 9M) go to one source, drink it dry, and then scurry over to the other side to catch the other one before the source counter ticks down. As they're moving to the other side, the spawn regenerates them.

    I didn't start in a very good area (sources far from controller on opposite ends), so I've ended up with a production line.



  • Im fairly new too.

    Im fan of Multirole creeps that use renewing. When the primary Role cant be fulfilled they automatically switch to do something other. When theyre big enough the harvesters will mine our the sources fast and then switch to building repairing or upgrading until sources are available again.


    I use as many harvesters as the sources have spots to harvest.

    On sources far away its probably useful to use haulers and containers or some more harvesters than the source can take. (beware of pathing though. if its too tight default pathing can lock multiple cpreeps in place)


    When there is storage available ill probably introduce a Hauler that hauls from containers to towers,spawn and storage (in that order) and if containers are empty towers and spawn are filled from storage.


    One Primary builder,repairer and upgrader so those task wont get neglected that take their energy from containers, and storage. (spawn energy is only used to spawn and renew creeps)



  • Multi-role creeps are rarely efficient. For example, anytime a balanced (MOVE/WORK/CARRY) creep is harvesting a source into a container, all those MOVE and CARRY are wasted. Even builders and controller-upgraders should have different bodies, because a builder moves a lot and burns through 5 energy per tick (per WORK), while a controller moves rarely and burns through only 1 energy per tick (per WORK). So a builder needs more MOVE and CARRY than an upgrader.



  • Hey,

    As a noob myself I found these two links quite usefull to learn more about creeps and creeps mechanics :

    How to play, Spawning Creeps : http://support.screeps.com/hc/en-us/articles/203022092-Spawning-creeps

    API doc : http://support.screeps.com/hc/en-us/articles/203013212-Creep