15

So, this is a question about the game screeps. I know that in the simulation, I can create a road by going to the Construct menu on the left, but is there an API reference I can use to create one programmatically? My goal is to have a script that will automatically lay down construction sites between target A and target B. Has anyone found such a reference in the docs?

(I would tag this question with the screeps tag, but it appears I cannot do so with my current reputation. If this is the wrong place to post, please direct me to the right place, I just came here from the screeps website)

J. Steen
  • 15,470
  • 15
  • 56
  • 63
Gareth Parker
  • 5,012
  • 2
  • 18
  • 42

2 Answers2

30

UPDATED: A method Room.createConstructionSite has been added to the API today (changelog). Sample usage:

Game.rooms[roomName].createConstructionSite(10, 15, STRUCTURE_ROAD);

OLD POST: A developer of Screeps is here. Indeed, there is no such API yet, but we plan to add it very soon. I will by update my answer when it is done.

artch
  • 4,487
  • 2
  • 28
  • 35
2

I've checked the Screeps API (http://screeps.com/docs/index.php) and I don't think it's possible to create structures programmatically.

Lucas Azevedo
  • 1,097
  • 15
  • 36