Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I create a new structure in Screeps

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)

like image 537
Gareth Parker Avatar asked Nov 20 '14 23:11

Gareth Parker


People also ask

What do extensions do in Screeps?

Each extension can contain up to 50 extra energy units that may be spent on creation of a creep. The exact location of extensions within a room does not matter, but they should be in the same room with the spawn (one extension can be used by several spawns).


2 Answers

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.

like image 173
artch Avatar answered Oct 24 '22 15:10

artch


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

like image 27
Lucas Azevedo Avatar answered Oct 24 '22 14:10

Lucas Azevedo