I have the same problem, can't get my private development sever working.
Posts made by ayrtep
-
RE: Local server doesn't render map
-
RE: Is moveTo the enemy of cpu ?
ATM I am using moveTo for in-room movement. For inter room movement, I am storing paths created by PathFinder in memory (as a one move per character string). Store paths between relevant spawns, controllers, sources and minerals in memory, then use moveTo to move onto the path and the path after that. If the path gets blocked by a newly built structure, I can use PathFinder to regenerate the path.
After I did this CPU went from around 2*creep numbers to 0.4 creep numbers.
-
RE: Trading help
@at_t30 said in Trading help:
So I have another question, are boosts worth it, and if so which ones? They seem quite expensive and they still cost energy and they only affect creeps for a short duration of time.
As before the answer is "do the maths".
In general, I think they are all good if you can use them, assuming your code's OK of course.
Consider a harvester WWWWWMMMMMC So 800 energy and 33 ticks to spawn.
Now consider W* boosting work with utrium alkalide +400% harvest.
So W*CM does exactly the same thing as WWWWWMMMMMC, but it costs 200energy and 9 spawn ticks.
So how much does the bost cost you, that allows you to push out harvesters at four times the rate and a quarter the cost?
Well 20 energy for the boost and 30xU, 30xH and 60xO plus lab and reaction time. You can probably buy UH and O for around the energy value or mine yourself; Either way, it is a gain if you can do the code.
Can do a similar analysis for each boost type.
-
RE: Trading help
It depends on whether you want to code for boosting creeps or not.
If not, then yes mine oxygen to sell for energy, but first, do the calculation to see if it's showing a profit. So the cost of oxygen mining creeps, harvesting and transporting, plus the cost of trade against the energy you get back. Also, consider cpu time and spawn ticks.
Alternately sell half your oxygen for another resource and make boosts for one of your creep types.
Best maybe to start mining neutral rooms for energy and minerals which give you more options for boosting and trading.
-
Where is the currently supported ECMAScript made known?
I found this https://support.screeps.com/hc/en-us/articles/203731552-Changelog-2015-07-22 from 2015. Has it changed?
I was trying to do stuff with class variables and getting problems so I don't think its the latest ECMAScript.
-
RE: is dismantle useful ?
dismantle only works on buildings. So
Attack with work parts - your main focus is in dismantling buildings. You only care about opposing creeps if they try to stop you.
Defend with attack parts.
-
RE: Option to start game by claiming controller
Do you have a link? I am probably staring at it https://steamcommunity.com/workshop/browse/?appid=464350&browsesort=trend§ion=readytouseitems&days=90
-
Option to start game by claiming controller
At the moment we start a game by building a spawn. This works well for new players, who want to start doing stuff quickly before they lose interest.
However, for someone with an existing code base, it makes sense for the code to place the first spawn. Just leaving the choice of choosing the first room to the player.
So when starting you can either place a spawn as now or select the controller. There will then be a 'claim controller' option in the sidebar.
-
RE: Newbie Shard instead of Newbie Zones
@qzarstb said in Newbie Shard instead of Newbie Zones:
The problem is that you can't simply keep adding shards. There needs to be a mechanism to end/clean up existing shards as well.
Do you really need to clean up existing shards? The payment methods should have been set up so that they pay for themselves as long as people are using it. Plus if new people stop joining the old shard will likely get boring and many will leave.
-
RE: Turn off full screen.
Wow! that worked. Tks.
Maybe 'Steam remote play' should be tested or disabled.
Anyway is there any simple (and tested?!?) way of getting the server command line prompt from the remote.
-
RE: Turn off full screen.
I have the private server running though steam on my laptop.
I open steam on my desktop.
On screeps' tab in steam, I select the laptop from the play button, which now changes to connect.
I now hit connect and the display on the laptop now appears in full screen on the desktop.
How do I change from full-screen to windowed?
-
Turn off full screen.
For some reason when I access my private server from another machine it defaults to full-screen mode, and I am embarrassed to admit I can't work out how to leave full-screen mode.
Anyone else know how to turn off full-screen mode?
-
RE: Newbie Shard instead of Newbie Zones
One suggestion might be to start new 'independent' shards which use a Shard Control Level (SCL) in place of GCL.
So for a while, everyone starts on even terms. My guess is that almost all new players will prefer these which suggests that something like this is a good idea. Old players will still have the advantage of proven code.
-
RE: Find empty spawn in room with full extensions.
Happened again. Looks like restarting a steam private server is very likely to set the spawn energy and hence room energy to null.
-
RE: Find empty spawn in room with full extensions.
@deft-code said in Find empty spawn in room with full extensions.:
Game.spawns.Spawn1.energyCapacity
Ok, It happened again. The trigger this time might have been stopping the server for eight hours then restarting.
I tried
console.log("Game.spawns.Spawn1.store.getCapacity()", Game.spawns.Spawn1.store.getCapacity()); console.log("Game.spawns.Spawn1.store.getCapacity(RESOURCE_ENERGY)", Game.spawns.Spawn1.store.getCapacity(RESOURCE_ENERGY)); console.log("Game.spawns.Spawn1.store.getCapacity('energy')", Game.spawns.Spawn1.store.getCapacity('energy')); console.log("Game.spawns.Spawn1.energyCapacity", Game.spawns.Spawn1.energyCapacity);
and got
Game.spawns.Spawn1.store.getCapacity() null
Game.spawns.Spawn1.store.getCapacity(RESOURCE_ENERGY) null
Game.spawns.Spawn1.store.getCapacity('energy') null
Game.spawns.Spawn1.energyCapacity 0 -
RE: Find empty spawn in room with full extensions.
Thanks, I'll try that the next time I reproduce.
I have reset my private server with a system.resetAllData(), and the new game does not have this problem.
It could easily be some form of corruption. My development cycle involves deleting and replacing the files in my .../127_0_0_1___21025/default directory every few minutes.
-
RE: Find empty spawn in room with full extensions.
@likeafox said in Find empty spawn in room with full extensions.:
@ayrtep I would use room.energyCapacityAvailable to figure out how big you can build you're creeps, that way you don't have to count you're spawns/extensions.
If you read what I said above
room.energyCapacityAvailable returns null
so I just created a wrapper function to do it the long way until the 'bug?' gets fixed and room.energyCapacityAvailable returns the room's energyCapacityAvailable.
I checked the creep.transfer. The transfer is successful, but as far as I can tell no energy is transferred to the spawn. On the GUI the spawn's energy status stays around 50-80. Sometimes it goes up in ones, I think after I use the energy in the extensions to make a creep.
I am not sure if this is relevant, but it's happening on a steam private server.
-
RE: Find empty spawn in room with full extensions.
Thanks, I'll try your suggestion.
I am also using room.energyCapacity to work out how big to build my creeps. I guess I will have to replace that with something that explicitly counts spawns and extensions. Plus my spawn no longer accepts energy despite having only 67 energy.
Might be an idea to move this post to the bugs forum.
-
RE: Find empty spawn in room with full extensions.
So this is the first time I have looked at the screeps engine, so I am probably missing stuff. However
https://github.com/screeps/engine/blob/master/src/game/game.js#L316
register.rooms[object.room].energyAvailable += object.store.energy;
register.rooms[object.room].energyCapacityAvailable += object.storeCapacityResource.energy;
We are += on something that could be null, in which case it would just turn null and stay that way forever!
https://github.com/screeps/engine/blob/master/src/game/store.js#L28
Here stuff in the store is set to "null" rather than "0" if the resource is missing.
I am just guessing, but I suspect there might be an issue here. The bit in game.js was only done 11 months ago. https://github.com/screeps/engine/commit/879b4ca215f1e0b7fd92c7b32c7e59bdc4722cfc#diff-47818c887f19982321abd70c2e741871
-
RE: Find empty spawn in room with full extensions.
@gadjung said in Find empty spawn in room with full extensions.:
room.find(FIND_MY_SPAWNS).filter((s:StructureSpawn) => s.store.getUsedCapacity(RESOURCE_ENERGY) === 0)
Thanks for replying, but this answer does not find any extensions unless you are saying that you should never fill extensions?!?
Anyway, I am still really confused. I have a room with:
room.energyAvailable 317
room.energyCapacityAvailable null
I don't understand how "Total amount of energyCapacity of all spawns and extensions in the room." is null here? https://docs.screeps.com/api/#Room.energyCapacityAvailable
The 317 is 50 from each of 5 extensions and 67 from the spawn. Querying the spawn gives.
spawn store {"energy":67}
spawn getCapacity null
spawn getFreeCapacity null
spawn getUsedCapacity 67
Which seems to be saying that the spawn which has 67 energy, has no energy capcity.
Code I used to get this.
const home = Game.rooms["W7N7"];
console.log("home energyAvailable", home.energyAvailable, "energyCapacityAvailable",home.energyCapacityAvailable);
const spawn = Game.spawns["Spawn1"];
console.log("spawn store", JSON.stringify(spawn.store), "spawn getCapacity", spawn.store.getCapacity(RESOURCE_ENERGY), "spawn getFreeCapacity", spawn.store.getFreeCapacity(RESOURCE_ENERGY), "spawn getUsedCapacity", spawn.store.getUsedCapacity(RESOURCE_ENERGY));
With result:
home energyAvailable 317 energyCapacityAvailable null spawn store {"energy":67} spawn getCapacity null spawn getFreeCapacity null spawn getUsedCapacity 67