UPDATE: This has been implemented as per this post: http://support.screeps.com/hc/en-us/articles/203852251-New-feature-code-branches?page=1#comment_200263891
Thanks Screeps Team! You guys rock!
UPDATE: This has been implemented as per this post: http://support.screeps.com/hc/en-us/articles/203852251-New-feature-code-branches?page=1#comment_200263891
Thanks Screeps Team! You guys rock!
I'm not super impressed by the road decay changes either. I think a better solution would be some kind of "road budget" whereby each room has a predetermined limit on the number of roads you can build. This could be a constant or could be a formula based on Room Controller level, GCL, number of extensions, etc.
Having a quick decay rate makes the game less enjoyable for those of us who appreciate the "base building" aspect of the game. And having gigantic increases in HP for these structures to counterbalance the decay rate doesn't really help.
Just my 2 cents.
Just noticed that the "properties inspector" now shows the ID of the object in question. Awesome!
I've observed (more than once) creeps being assigned the same name (this is when passing undefined into the spawnCreep method). This results in one of the creeps being inaccessible when looping through the Game's list of creeps (since it is a map).
@Artem that's perfect! Sorry I must have missed those, but that is exactly what I was looking for. Cheers!
It would be really nice to have the ability to define "widgets" that appear in the info bar (on the right side of the screen) when clicking on an object.
As an example, all of my creeps have a memory.role = "XXX" where XXX is used by my code to determine their behaviour.
Rather than resorting to the console (or memory watch) to see what role (or other memory data) the creep has, it would be nice to have this appear as part of the "inspector" UI.
Example:
Game.inspectors = {
"creep": [
"role",
"..."
],
"spawn": [
"..."
]
]
Would define "inspectors" for creeps and spawns. (Replace ... with whatever memory.XXX keys you are interested in).
And if you wanted to get really fancy you could even define "control types" for each field i.e. gauges, icons, coloured text, etc. to specially format this information.
It would be nice to have different code in play for simulations than what is running in the game. Right now changes you make to the simulation are used in the real game and vice versa. This makes it difficult to prototype new AI in the simulation without interrupting your "known good" code in the real game.
Separate spaces for code would be:
1. The game
2. Tutorial
3. Survival
4. Custom mode
1. Player 1
2. Player 2
This would be nice to have for the sole purpose of being able to test AI behaviour that is aware of the controller level. For example, your code may do things differently if you have a controller level of 8 vs. 1. Getting the controller to this level by upgrading it (as per normal gameplay) simply takes too long.
1) Make changes to your script but don't save
2) Click the expand/tear-off button (top-right)
3) Make changes in the new window
The changes you made are not reflected in the new window. This makes it possible to get into a state where you have two script windows each with different content.
The tear-off button should be disabled if there are unsaved changes -or- the new window should include the uncommitted changes.
function do_harvester(creep) {
var sources = creep.room.find(FIND_SOURCES);
if (creep.memory.source === undefined) {
creep.memory.source = sources[0];
return;
}
if(creep.energy < creep.energyCapacity) {
// this line works fine
creep.moveTo(creep.memory.source);
// CRASH!
creep.harvest(creep.memory.source);
}
// do more stuff here
}
This causes an error message in the console:
TypeError: undefined is not a function
at Creep.harvest (/opt/engine/dist/game/creeps.js:186:21)
at Object.module.exports [as behaviour] (harvester:37:9)
at main:124:11