

In general, order of bodyparts can impact how creep can perform in longer combat/skirmishes at the back to ensure creep mobility when in combat/attacked (creep might still run away while not having any other bodyparts).at the front to cut on intent-check cost if creep can move :.at the front to serve as damage sponges (creep will be getting fatigue when moving but his offensive capabilities will be less impacted).Things to give a though or two about MOVE parts can be positioned strategically: TOUGH part only applies damage reduction to itself (and if boosted) - so it's worth to put it always in front.

One needs to be careful not to exceed the MAX_CREEP_SIZE limit.īoth methods can be combined, with predefined starting template and additional bodyparts added from another template. With this two information we can create an array, into which, inside a while/for loop, we will push above template IF cost of all added bodyparts is below or equal room.energ圜apacity or room.energ圜apacityAvailable. Next calculate the energy cost of this template. I.e we want a mineral worker creep that has as many WORK parts as possible and half of WORK parts amount of MOVE Template body design bases on a predefined subset of bodyparts, that have calculated energy cost, and repeating them either body matches required bodypart count, or energy limit. To avoid blocking Spawn with creep that has body with too high energy cost it's worth to explore creating several predefined sets of body arrays depending on room.energ圜apacity or room.energ圜apacityAvailable. It can be implemented in multiple ways, though it boils down to always return earlier-designed array of bodyparts.
#Screeps spawn how to#
There are multiple ways how to create Your desired creep with desired bodyparts, 2 most common would be: 1.3.2 In general, order of bodyparts can impact how creep can perform in longer combat/skirmishesĬreep Design Strategies.1.3.1 MOVE parts can be positioned strategically:.1.3 Things to give a though or two about.
