PTR Changelog 2019-09-20: NPC Strongholds



  • 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?



  • How does the invulnerability effect work? Right now my creeps are attacking an invulnerable core in https://screeps.com/ptr/#!/room/shard2/W8S32 and are damaging it just fine. I kinda feel it shouldn't be taking damage.


  • Dev Team

    @tigga In centre room with no controller strongholds won't claim or reserve controller. Invulnerability should work, I'll double-check that, thank you for your reports, for all of them.


  • Dev Team

    PTR is updated.

    Thank all of you for your feedback and suggestions!

    • Strongholds claim rooms where they appear (setting RCL to 8 instantly) and unclaim them when destroyed or decayed. It would make a room more like a player's room and solve some inconsistencies.

    • Strongholds will clear its area when being deployed removing all room objects there.

    • Nuke impact is updated: now creeps that killed by nukes don't leave tombstones and structures destroyed by nukes don't leave ruins. Also, all existing tombstones and ruins will be removed when a nuke lands. So it's still possible to destroy a Stronghold with a nuke, but you won't have the loot, and new Stronghold will be deployed to the same sector shortly which means that you'll not have an invasion-free time either.

    • Ruin.structureType is replaced by Ruin.structure - it's an instance of Structure or OwnedStructure with basic data about the destroyed structure: identifier, type, owner (for OwnedStructure), hits. Remember that this is an instance of Structure or OwnedStructure, not an instance of a real structure class (like StructureStorage). Also, we removed owner and my properties from ruins because they exist in Ruin.structure for OwnedStructure.

    • StructurePowerBank now leave ruin with 10 TTL (see RUIN_DECAY_STRUCTURES constant). We believe that the challenge of bringing enough haulers just about time must be preserved.

    • RoomObject.effects is reworked, now the effect field is mandatory, and it contains the identifier of both power and non-power effects. Also, we're preserving the power field (now it contains id for non-power effect either) for sake of backward compatibility (although using it is not recommended, this is why it's removed from the documentation; consider it deprecated). This is done to make new effects less breaking.

    • When a player despawns, his structures are being turned into ruins with 500000 TTL

    • Nuke land doesn't reduce upgradeBlocked of a controller if it's over 200 ticks

    • Fixed few bugs and regressions

    It's still not the final state of Strongholds, but definitely a few steps closer.

    As usual, your suggestions and reports are appreciated!



  • A really minor but to me interesting change:

    Can the ruins from player respawn have randomized expiration durations? e.g. anywhere between 400k and 600k? Would add some immersion to the world if there are "half collapsed" rooms here and there, instead of everything disappearing at exactly the same tick.

    Not sure how much overhead this would cause and if that's a reason not to do it, as I have no clue how often people respawn and how many structures they tend to have.

    👍


  • So, if I claim a room from a player who has respawned, and their ruins have a 500,000 tick timeout... can I destroy the ruins? I mean... it's already destroyed. As far as I know, you can't destroy a tombstone.

    Is it just going to sit there for 20 days waiting to decay?


  • Dev Team

    This update has been deployed to ptr private server branch (version 4.0.0-beta.6) on both npm and Steam:

    npm install screeps@ptr
    

    There are two new CLI commands to make testing strongholds easier:

    > help(strongholds);
    Available methods:
     - strongholds.spawn(roomName, [opts]) - Create a new NPC Stronghold, and spawn it to the specified room. 'opts' is an object with the following optional properties:
        * templateName - the name of stronghold template to spawn, default is random
        * x - the X position of the spawn in the room, default is random
        * y - the Y position of the spawn in the room, default is random
        * user - id of user which stronghold structures should belong to, default is "2" (Invader)
        * deployTime - delay in ticks until the stronghold is deployed
     - strongholds.expand(roomName) - Force an NPC Stronghold to spawn a new lesser Invader Core in a nearby room.
    Stronghold templates:
     - bunker1 [Level 1 bunker-style Stronghold]
     - bunker2 [Level 2 bunker-style Stronghold]
     - bunker3 [Level 3 bunker-style Stronghold]
     - bunker4 [Level 4 bunker-style Stronghold]
     - bunker5 [Level 5 bunker-style Stronghold]
    

  • Dev Team

    New update:

    • Updated defenders AI (although we will be improving it constantly even after release).
    • NPC Strongholds now have real loot amounts. Here is an example of level 5 loot:

    4_1570872695480_2019-10-12_373.png 3_1570872695480_2019-10-12_372.png 2_1570872695479_2019-10-12_371.png 1_1570872695479_2019-10-12_370.png 0_1570872695479_2019-10-12_374.png

    And here we're announcing the release date of this feature: October 15! It will go live to production along with all other planned features.