PTR Changelog 2017-06-23

  • I spent awhile trying to track down an issue, and it turned out to be that Game.getObjectById(undefined) is returning a seemingly random object in one of my rooms (it changes), but with the id field undefined.

    I have many calls in my code that will call Game.getObjectById(undefined) and expect to get null back, and that has never caused problems on the main server. No idea if this issue is related in any way to having a different DB.

  • Dev Team

    @WarInternal has it happened right after you activated your account on the PTR, or kept happening after that? I can see now that E59S39 is active, is something wrong with it right now?

    @stuy486 Could you please show an exact snippet of code and the result of it? What is the object with id field undefined?

  • Code in my main loop:

    module.exports.loop = function () {


    Output on the console:



    Now that I'm typing this up, I've gone and looked at that room and there's actually two roads at that spot, one with an ID and one without.

    So, I suppose it's possible Game.getObjectById() is functioning properly, and the real problem is that there are structures without IDs in various places in my rooms.

  • @Artem It's ongoing. 

    Found a bug. Everything in my `Game.structures` is reporting the property structureType as road. Explains all (or most of) the problems I'm having actually.

  • Dev Team

    Undefined objects and invalid structureTypes must be fixed now, please confirm.

  • structureType fix confirmed, thank you.

  • Drop-harvest mining (work parts without carry) without container appears to create a resource pile if none exists, but does not add to an existing pile, so energy is lost until the previous pile decays. 

  • YP

    I respawned on the ptr and noticed that my MOVE,MOVE,CARRY,WORK creep gets fatigue when running over plain terrain:

     2 when empty, 4 when full!/room/E83S84

  • Dev Team

    New fixes arrived, please confirm.

  • Cool. I'm completely out of energy from some of the last bugs. If you inject some energy into my storage and/or terminals I'll be able to test a lot faster.

  • Culture

    I got the same issue, I'm completely out of energy.

  • Dev Team

    OK, PTR data has been re-deployed from the main server.

  • Nice!

    Possible bug to report: I nuked myself in E28N61. At the time the nuke dropped, my 3 spawns had creeps spawning with 30 - 150 ticks remaining each. When the spawn animation completed, none of the creeps came out. I think they're still supposed to spawn, but I don't have a lot of experience with nukes, so I may just be misinformed.

  • Culture

    All creeps should be killed regardless of spawn time when a nuke lands 😄 I do agree that the spawn should stop spawning after a nuke hits. But that's a different topic.

  • Ah, interesting, didn't realize that. Thanks!

  • I just claimed two rooms and they don't appear to be listed in overview

    and Game.time froze around tick 19915153, everything stopped updating. I think we broke something.

    (Edit: Appears to be ticking again)

  • YP

    BUG: I respawned... it not only removed all my objects from the room.. it also removed the controllers 😉



  • Dev Team

    BUG: I respawned… it not only removed all my objects from the room.. it also removed the controllers 😉


    I just claimed two rooms and they don’t appear to be listed in overview and Game.time froze around tick 19915153, everything stopped updating. I think we broke something.

    Do I get this right that ticks had stopped running right after rooms have been claimed?

  • Sorry, that was poorly worded. That was two separate things. And checking my memory, the freeze occurred 80 to 116 ticks after room claims, so likely unrelated.

  • Game.getObjectById(undefined) is returning an object again. Game.getObjectById(null) works correctly. 

    Specifically in this case it's giving me an extra road in my rooms. I've seen this appear in a few of my rooms and I'm confused as to how. So far each time it's an extra road segment in the same place as an existing road segment. Similar hp. This of course is causing some weirdness as I have come to expect goid undefined to give back an undefined/null return value. As it turns out, undefined is a perfectly legal object key, so it's keyed to _something_ at register._objects[undefined], and the || null doesn't fire.

    Here's the excess road segment stringified, in case it helps:
      "room": {
        "name": "E58S43", "mode": "world",
        "energyAvailable": 137, "energyCapacityAvailable": 300,
        "visual": { "roomName": "E58S43" }
        "pos": { "x": 14, "y": 35, "roomName": "E58S43"},
        "id": "undefined",
        "ticksToDecay": 635,
        "hits": 4000, "hitsMax": 5000,
        "structureType": "road"