According to my observations, the transfer of energy from one link to another deducts 3% energy, and the transfer of energy from a link to a creep deducts another 3%. This means that any energy transferred from one link to another and then used for anything incurs a 6% penalty (possibly quite a bit higher if the amounts are small, due to rounding). The documentation states "Remote transfer process implies 3% energy loss" and doesn't say anything about a loss for a local (adjacent) transfer.
Posts made by super_aardvark
-
Link costs 6% to use, not 3% as the documentation says
-
findPath: heuristicWeight values?
What is the range of meaningful values for heuristicWeight?
-
RE: Can't view room
More info: as soon as I own anything in the room (even a flag), it becomes visible as normal. As soon as I don't own anything in the room, the room map disappears. Other rooms don't behave this way; is this an intended effect in some rooms? If so, is there a Room property that can distinguish this?
-
Pathfinding problem
It seems that the pathfinding doesn't deal well with swamps near exits, at least when heuristicWeight is low (I didn't try this kind of situation before the default was changed, but specifying a high value caused the creep to avoid this issue). The issue is that the creep will move onto an exit in order to avoid a swamp. Then it will be in the wrong room, and will go to the closest exit -- which is exactly where it came from. It will keep moving back and forth between the rooms without making any progress toward the goal, when all it needs to do is move over the swamp (or use a different exit position that avoids the swamp).
-
RE: Spawn.transferEnergy fails but returns OK
Okay, I guess I'll have to create some kind of priority system to make sure that energy gets delivered to the creeps that need it most, since only one can receive it each tick.
-
RE: Losing screen
It also doesn't account for energy in Extensions. That used to be useless without energy in the Spawn, but now you can build new creeps with energy in Extensions only.
-
RE: Spawn.transferEnergy fails but returns OK
Wait a minute... can you also not transfer energy out of a spawn more than once in a tick, even if there's plenty of energy to go around? E.g. spawn.transferEnergy(creep1), spawn.transferEnergy(creep2). Will the second creep always receive no energy?
-
RE: Spawn.transferEnergy fails but returns OK
Ok, so given tscmoo's answer, this must be a real bug in the game, and not just a problem with my script. If the transfer from the spawn to the creep was succeeding the first time, the console command wouldn't make a difference.
-
RE: Spawn.transferEnergy fails but returns OK
One more piece of info: if I use the console to transfer energy to the creep, it receives it, and goes about its normal operations until it returns to the spawn for more energy, at which point it returns to the state described above. I'm fairly certain it's not doing anything like putting the energy back as soon as it takes it out. If it was, though, would using the console override that? Is it possible to transfer energy back and forth multiple times in one tick?
-
Spawn.transferEnergy fails but returns OK
My code (note that my source variable is not a Source object, but a Spawn):
var source = Game.getObjectById(creep.memory.sourceId); if (source) { creep.moveTo(source); console.log("Before: Mine: " + creep.energy + "/" + creep.energyCapacity + " - theirs: " + source.energy + "/" + source.energyCapacity); var result = source.transferEnergy(creep); console.log("Transferring energy from " + source + " - result: " + result); console.log("After: Mine: " + creep.energy + "/" + creep.energyCapacity + " - theirs: " + source.energy + "/" + source.energyCapacity); } else { console.log("Invalid source ID, finding new spawn"); source = creep.pos.findClosest(FIND_MY_SPAWNS); creep.memory.sourceId = source.id; creep.moveTo(source); source.transferEnergy(creep); }
Output:
[11:23:30 AM]Before: Mine: 0/50 - theirs: 3277/6000
[11:23:30 AM]Transferring energy from [spawn Spawn1] - result: 0
[11:23:30 AM]After: Mine: 0/50 - theirs: 3277/6000
[11:23:31 AM]Before: Mine: 0/50 - theirs: 3280/6000
[11:23:31 AM]Transferring energy from [spawn Spawn1] - result: 0
[11:23:31 AM]After: Mine: 0/50 - theirs: 3280/6000The creep is right next to the spawn, so there's no reason for it to fail, and in fact it returns 0, OK. But the energy is not transferred.
This same creep was doing this operation successfully several times, and then it suddenly encountered this bug. I think it will stay this way until it dies of old age, and the new one I build to replace it will operate correctly for a while and then encounter the bug (Otherwise my whole operation would surely have broken by now).
-
Error moving to room controller
I suddenly started getting the following stack trace, with no changes to my code or situation:
TypeError: Cannot read property 'undefined' of undefined at Grid.setWalkableAt (/opt/PathFinding.js/src/core/Grid.js:117:18) at Room.findPath (/opt/engine/dist/game/rooms.js:619:12) at RoomPosition.findPathTo (/opt/engine/dist/game/rooms.js:810:19) at Creep.moveTo (/opt/engine/dist/game/creeps.js:147:25) at module.exports (upgrader:23:23) at main:23:13
Line 23 of my 'upgrader' module is this:
creep.moveTo(creep.room.controller);
-
RE: Can't view room
Now that I've placed my first spawn, I understand that the walls along the exit are placed by the game when you spawn, so this probably isn't related to the bug. I still cannot view room W4N3. Whether I click on it from the world map or the regional (3x3) map, it simply fails to load and the area where the main room view should appear remains blank.
-
Can't view room
Room W4N3 doesn't show up when I click on it from the world map (though I can see its structure in the world map and the region map). I'm in the process of selecting my first spawn location; I don't know if it affects players with existing spawns. I can view all the nearby rooms. This room has no sources, but there are others like that which I can view. This room is the only one connected to W4N2, and the player there has built walls all along his exit; maybe that's the cause?
-
Memory not cleared when starting new Survival game
Whenever (or, almost every time) I start a new Survival game, the Memory contains all the same information that it did at the end of my last game. This includes incorrect state information that I've stored, and IDs for game objects that don't exist. I can't even write a script to clear the memory at the beginning, because any flag that I set to indicate this has already been done would be carried over to a new game as well.
-
RE: Survival game broken, can't quit
Windows 7, Google Chrome (Version 42.0.2311.135 m)
-
RE: Survival game broken, can't quit
Update 2: aaaand now I'm back to the original problem. I'll just find something else to do for a day or two while you guys sort this out.
-
RE: Survival game broken, can't quit
Update: I can now start a new Survival game, and it seems to be working normally... except the Memory seems to be preserved from before. Shouldn't it clear out the memory when I start a new game?
-
Survival game broken, can't quit
My survival game seems to be broken. Time isn't passing, there's no log output, and no code is being executed. When first load the game (by clicking Play from the Survival screen with the high-score list), I see the room as I left it, the only panels on the right are Display Options and Cursor, and the bottom panel is missing. After about 20 seconds, the bottom panel appears, as does the Survival Mode panel on the right. However, when I click "Finish game," I get a little animation at the top of the window and nothing else happens. The game does not end, and I can't start a new game.