PTR Changelog 2019-09-20: NPC Strongholds


  • Dev Team

    @thmsn it has the structureType property similar to construction sites.

    👍

  • YP

    Looking forward to test it on my private server 🙂



  • Example for tombstones taken from the docs:

    room.find(FIND_TOMBSTONES).forEach(tombstone => {
        if(tombstone.creep.my) {
            console.log(`My creep died with ID=${tombstone.creep.id} ` +
                 `and role=${Memory.creeps[tombstone.creep.name].role}`);
        }
    });
    

    How I think ruins should look like, for consistency and to make it easier to detect what was destroyed (for rebuilding or clearing relevant cached values):

    room.find(FIND_RUINS).forEach(ruin => {
        if(ruin.structure.my) {
            console.log(`My ${ruin.structure.structureType} with ID=${ruin.structure.id} was destroyed`);
        }
    });
    


  • Are ruins walkable? Or does it depend on what they are a ruin of? Do roads make ruins? Edit: I may jump on PTR and have a play next week



  • I like the ruins concept. I already liked the strongholds, so this is all win.

    Question: If I destroy a structure to create a ruin with a 500 tick timeout, can I use that to essentially bypass the "can't withdraw from a nuker" constraint? With proper placement, it should be possible to yoink the up to 400K energy from the Nuker's ruins to the storage in times of dire need.



  • I see in the docs that ruins are walkable. What about building on top of them? Is it allowed or not?



  • Reading the docs:

    An Invader Core has two lifetime stages: deploy stage and active stage. When it appears in a random room in the sector, it has ticksToDeploy property, public ramparts around it, and doesn't perform any actions. While in this stage it's invulnerable to attacks (has EFFECT_INVULNERABILITY enabled). When the ticksToDeploy timer is over, it spawns structures around it and starts spawning creeps, becomes vulnerable, and receives EFFECT_COLLAPSE_TIMER which will remove the stronghold when this timer is over.

    What is to stop me from placing 50xT3 boosted dismantle creeps on the public raparts and as soon as the core becomes open, just chewing it down very quickly? The stronghold ramparts will protect me, and my damage/tick is huge.

    Also, how do the structures handle a creep being where they want to spawn?

    I'm not sure I understand why we need this two-phase deployment.



  • I would also feel more comfortable if the "main" stronghold in a sector was owned by Invaders, rather than just being reserved. Feels more consistent. I'm currently going through code adding checks against the reservation username and fixing things where I use stuff like CONTROLLER_STRUCTURES[STRUCTURE_TOWER][room.controller.level]

    👍


  • https://screeps.com/ptr/#!/room/shard2/W19S15 There is a stronghold in this room but it isn't reserved. Is this intended?



  • I knocked up some code and thought about testing it on PTR, but for whatever reason my CPU usage is very high on PTR, and 10 second ticks doesn't really suit debugging that well. No shard specific code or anything and the same code is running fine on MMO.

    I guess I'll wait until they're on private servers.

    EDIT: Oh. Now it's fast. Thanks!



  • I got the following error:

    TypeError: Cannot read property 'energy' of null
        at exports.make.register.wrapFn.Object.defineProperties.C.RESOURCES_ALL.reduce (:41357:40)
        at Array.reduce ()
        at new  (:41355:29)
        at Object._storeGetter [as store] (:41284:12)
        at Object.get [as store] (eval at exports.defineGameObjectProperties (:1093:9), :7:61)
    

    When doing:

    for (let ruin of room.find(FIND_RUINS)) {
    	loot += _.sum(ruin.store)
    }
    

    Specifically, _.sum(ruin.store) seems to be failing. Not sure which room or ruin, just saw it in some logs.

    EDIT: Could be I'm getting the store of a ruined object that didn't have a store property - like a wall? Probably my fault and I was just confused by the error.

    EDIT2: Ok, the issue shows just seeing if there is a store property on a ruin: if (ruin.store) {

    W9S39 [ruin (extractor) #5d84b9f57c29e164bd6fcf85]
    [16:01:53][shard2]TypeError: Cannot read property 'energy' of null
        at exports.make.register.wrapFn.Object.defineProperties.C.RESOURCES_ALL.reduce (:41357:40)
        at Array.reduce ()
        at new  (:41355:29)
        at Object._storeGetter [as store] (:41284:12)
        at Object.get [as store] (eval at exports.defineGameObjectProperties (:1093:9), :7:61)
    

  • Dev Team

    We've migrated the Public Test Realm to our new cluster based on Intel Core i9-9900K and Nodejs 10, so you can test NPC Strongholds with a bit higher performance.



  • Something funky going on with caravans on PTR.

    https://screeps.com/ptr/#!/room/shard2/W0S20 tick 19029510

    Caravan creeps with no owner that aren't visible (but are clickable) on the room view, but are visible on the map view.


  • Dev Team

    This post is deleted!

  • Dev Team

    All: thank you very much for your reports and suggestions!

    @eduter We're currently working on structure information in ruin, should be on PTR later this week.

    @QGazQ all ruins are walkable.

    @Smokeman yes, with proper placement you'll probably be able to loot ruins before ruin decays.

    @Zyzyzyryxy building on top of ruins is allowed. If you're fast enough, you can build something on top of a ruin, destroy it again and stack ruins

    @duckymirror no, this is a bug, we'll investigate it, thanks.

    @Tigga creeps standing in the deployment area will be removed. We're currently reworking stronghold/controller interaction, strongholds will claim rooms where they are. Thanks for reporting the Ruin.store issue, the fix will be deployed to the PTR later this week. Caravans should be already fixed.



  • isActive() currently returns false on Invader towers. I guess that will be fixed with controller ownership?



  • There is a breaking change with RoomObject.effects.

    Previously an object in that array was guarenteed to have a power field. This is no longer true. Any code that assumes it does will fail.



  • There's a couple of stronghold exploits I've not tested but I'm pretty sure would break things:

    1. The current AI will fill towers to 1000 energy if they drop below 500. It is also possible for the player to withdraw energy from hostile towers. Depending on the order of operations a player could farm a stronghold for 500-1000 energy/tick per tower by emptying the towers out with haulers.
    2. Less bad, but if a stronghold can spawn a 50 part creep with 40 T3 boosts in 50 ticks then those are farmable for 240 T3 boosts in 50 ticks. Now a squad of 4 50xT3 boosted creeps would cost 200 T3 boosts in those 50 ticks, but once you've cleared out everything but the invader core you can probably farm pretty cheaply.

  • Dev Team

    An update deployed, now strongholds have ownership on their base room.



  • @artch said in PTR Changelog 2019-09-20: NPC Strongholds:

    An update deployed, now strongholds have ownership on their base room.

    How does that work if the stronghold is in a centre room with no controller?