Shard3 to Shard2 portal code problems



  • My code does not run on shard2... My err, I guess main? shard is shard3 and I am looking to expand. But as soon as I send a claimer to shard2, nothing happens. I have tried to put console.logs in my code but nothing is coming into my console. Am I the only one experiencing this? Or is it just me and there is something I can do to fix it?



  • A version of your code should run on all Shards if you have at least one owned object (creep, buildings, tombstone) on-shard. A few things to note about doing multiple shards though:

    • You need to assign CPU to the shard, there's a 'reassign CPU' button at the bottom of the shards menu https://screeps.com/a/#!/shards or it can be done via code: https://docs.screeps.com/api/#Game.cpu.setShardLimits
    • Creeps that travel though an intershard portal lose all memory and are assigned a new ID, their name & ticksToLive will remain the same. So whatever memory you had assigned will be lost, so stuff like role (if using roles) will be gone, meaning the creep doesn't know which module it should be using.