Factories, new resources, NPC Strongholds


  • Dev Team

    Hello everyone!

    We're happy to introduce one of the biggest content updates in Screeps! We tested it since May on the PTR and private servers with your help, and now we're ready to launch these exciting new features.

    IMPORTANT: Although we put our best effort to make this update as less breaking as possible, some things in your code may break due to the new improved API. See the API Changes section below for details.

    Factory and new resources

    0_1571066451161_factories.gif

    A new structure is now available at RCL 7: Factory. It allows for creating many new types of resources. Four of these are very special — we have added new raw resources to the game. They have Deposit game object type and can be occasionally found in "highway" rooms. You can harvest them as usual, but they will exhaust over time and have a limited lifespan. Deposits are distributed unevenly across the world map: one resource type per map quadrant (NW, NE, SW, SE).

    Using factories, you can produce new resources that we call "trade commodities." These are resources that NPC market traders are most interested in. They have no other purpose other than to be sold and generate credits. Producing high-level commodities is the most profitable business in the game.

    The factory mechanic is tightly linked with the OPERATE_FACTORY power. The full use of factories will be possible only by leveraging the coordinated work of multiple Operators.

    We have developed four production chains of high-level trade commodities (for each new raw resource type). This is how the market now looks:

    0_1571070888142_more-market.png

    We're very excited about this change since it provides much more interesting crafting and trading challenges in the game. If you're an economy gamer, you'll definitely like it! But what if the fighting aspect of Screeps appeals to you more?

    See documentation: Commodities

    PTR forum topic
    Draft discussion

    NPC Strongholds

    0_1571067238124_stronghold5.png 0_1571067259594_invader-core-expand.gif

    NPC Invaders now have a home!

    If you check your sector on the map now, you will see that one room in each sector is claimed by the "Invader" user, and has its base in it. This is a place where all invader creeps in this sector originate from. Now, although it has towers and defender creeps (sometimes quite strong), if you attack and destroy this NPC stronghold, invaders will stop appearing in this sector until a new stronghold reappears elsewhere.

    If you leave the stronghold untouched, it will spawn lesser cores in rooms nearby and reserve them. You'll have to destroy cores to resume harvesting there.

    There is one more reason to conquer an NPC Stronghold — it contains resources in its treasury. Every stronghold has a few containers, and the core structure ruin also will contain valuable resources after you destroy it. Here is an example of a level 5 stronghold loot:

    3_1571067495977_stronghold_loot4.png 2_1571067495977_stronghold_loot3.png 1_1571067495977_stronghold_loot2.png 0_1571067495976_stronghold_loot1.png4_1571067495977_stronghold_loot5.png

    We will continue working on the stronghold defenders AI to make it an exciting fighting challenge for players of all levels.

    See documentation: NPC Strongholds

    PTR forum topic
    Draft discussion

    Ruins

    0_1568982186654_2019-09-20_337.png

    We also introduced a new concept of ruins, which is similar to tombstones. When you destroy a structure, it does not disappear but drops a ruin object. All resources are moved to the ruin's store. In general, player structures ruins have 500 ticks of decay, but some special cases exist:

    • InvaderCore ruins will last the same equal time as the remaining EFFECT_COLLAPSE_TIMER on it.

    • When a user respawns, all structures are converted to ruins with 500,000 decay time.

    • When a novice player initially spawns into the room with another player's structures, all structures are converted to ruins with 100,000 decay time.

    API Changes

    • POSSIBLY BREAKING CHANGE: Implemented new global Store prototype. All structures and creeps now use this prototype as their store property. Old style properties are now considered deprecated. See documentation for more details, and also this previous discussion.

      If you have any troubles because of this change, it most likely falls into one of these categories:

      1. You're checking for structure.store presence to distinguish storages and containers from spawns and extensions. Use structure.structureType check instead, or structure.store.getCapacity(RESOURCE_ENERGY) !== null.

      2. You're comparing .store[resource] === undefined. Now all absent resources are equal to 0.

      3. You're trying to redefine store property, which is now non-configurable.

    • POSSIBLY BREAKING CHANGE: Removed FIND_DROPPED_ENERGY constant, which was deprecated long ago. Use FIND_DROPPED_RESOURCES instead.

    • POSSIBLY BREAKING CHANGE: Removed all Structure*.transfer methods which were deprecated long ago. Use Creep.withdraw instead.

    • New prototypes: StructureFactory, StructureInvaderCore, Deposit, Ruin.

    • A lot of new constants.

    • PWR_OPERATE_FACTORY power is now operational.

    • RoomObject.effects elements now have effect property instead of power. Property power remains for backward compatibility, but is not documented and will be removed in the future.

    • Added new method Game.market.getHistory, which contains historical price data for all resources.

    • Increased per-player market orders limit from 50 to 300.

    • Added expiration period to market orders. An order expires in 30 days after its creation, and the remaining market fee is returned. Extending the order doesn't update its expiration time.

    • Game.market.createOrder now accepts parameters in an object notation in order to minimize mistakes caused by wrong order of parameters:

      Game.market.createOrder({
        type: ORDER_BUY,
        resourceType: RESOURCE_ENERGY,
        price: 0.01,
        totalAmount: 100000,
        roomName: 'W1N1'
      });
      
    • Dismantle does not work through own and public ramparts.

    • Nuke landing does not generate tombstones and ruins, and destroys all existing tombstones and ruins in the room.

    • Removed minimal limit for StructureTerminal.send.

    • Various bug fixes.


    This update is supported in private server version 4.0.0.

    👍


  • Awesome changes!

    Can we please get map "owner control level" icons for when strongholds are present in SK rooms? It's confusing right now, and difficult to tell at a glance whether there is a stronghold present. Having it show the level of the stronghold would be even better.

    👍


  • @davaned This would be helpful. Curently all invader rooms show up as rc8 in the ui even though they have not yet grown into full rc8 strongholds. Players would need this info in order to add cool effects to the room claim assistant tamper monkey script.


  • Dev Team

    @trepidimous Strongholds do not grow, they spawn with some random level and remain as is.


  • Dev Team

    UPDATE:

    We've rebalanced some strongholds parameters:

    • Strongholds are now always spawned in center rooms (or more precisely, SK center rooms, i.e. excluding the most center room).

    • Their badge is shown on the map with the corresponding stronghold level.

    • Decreased strongholds duration from 150k to 75k ticks with 10% random variation.

    • Decreased invader cores hits from 1mil to 100k.

    • Decreased reserveController/attackController power from 100 to 2 per tick.

    • Decreased lesser (level-0) cores spawn interval from 15k to 2k ticks. This means a stronghold can spawn up to 40 lesser cores during its lifetime if remained untouched. But they are now quite weak and can be handled easily.

    • Lesser cores are now spawned at a distance from the controller.

    • Fixed a bug of reserving over 5k if some creep is attacking the controller at the same time.

    All strongholds have been respawned.



  • @artch said in Factories, new resources, NPC Strongholds:

    Decreased lesser (level-0) cores spawn interval from 15k to 2k ticks. This means a stronghold can spawn up to 40 lesser cores during its lifetime if remained untouched. But they are now quite weak and can be handled easily.

    I hope this isn't too much of a challenge for newer players. It's also going to really hurt players who are inactive whose code can't deal with hostile structures appearing in unowned rooms. Or those who can deal with it but use dismantle on them, because that's what you can do to everything else.

    EDIT: Wanted to say the other changes look great, thanks!


  • Dev Team

    @tigga With reservation power equal to 2 your reserver can simply overdo the core. And with 100k hits you can manage the cores using your regular invader creeps hunter.



  • @artch continued reservation of a controller owned by a lesser core will end up removing it? I don't understand what you mean by overdo?


  • Dev Team

    @tun9an0 The core works with the controller using regular reserveController/attackController mechanics. If your creep has more than 2 CLAIM parts, it will attack faster than the core reserves. Or, if it's still your reservation, then your creep will reserve faster than the core attacks.



  • @artch Aha thank you, I shall observe that. I thought it was just wiping the (my) reservation on arrival.



  • @artch said in Factories, new resources, NPC Strongholds:

    @tigga With reservation power equal to 2 your reserver can simply overdo the core. And with 100k hits you can manage the cores using your regular invader creeps hunter.

    On the first point - yes - that makes it just about ok.

    On the second point - I'm more concerned about all those players who aren't around right now. Maybe it doesn't matter. Personally unless I'd updated my code it wouldn't deal with the invader cores in my rooms like this. Firstly my anti-invader creeps don't look for hostile structures because why would they need to? Secondly my anti-building creeps used dismantle, because it used to work on anything that could possibly be in my remote. I've since changed my code.

    All in all, I think given the first point and the fact that cores don't spawn next to the controller any more it's probably alright.



  • @artch said in Factories, new resources, NPC Strongholds:

    Decreased lesser (level-0) cores spawn interval from 15k to 2k ticks. This means a stronghold can spawn up to 40 lesser cores during its lifetime if remained untouched. But they are now quite weak and can be handled easily.

    This doesn't seem to be right. I've had 3 lesser cores spawn since they regenerated. The stronghold has been around (and indestructable) for 1250 ticks.

    Seems to be true with most strongholds.


  • Dev Team

    @tigga It was just a testing run. We've spawned 3 additional cores for every stronghold to test how they expand.

    UPD: Removed them.



  • @artch

    "Strongholds are now always spawned in center rooms (or more precisely, SK center rooms, i.e. excluding the most center room)."

    Can this occur in SK rooms that aren't occupied?

    This seems a bit game/empire breaking for those who are already Source Keeper harvesting.

    Looking around, I'm already seeing people losing 2K parts in less 1000 ticks the stronghold has been active.



  • Yeah I agree. I was fine with the original patch a few days ago. Now that you changed it I am getting emails about sk rooms having trouble. This was not documented or put on ptr for the sk room change. Grrrr



  • They could always spawn in SK rooms before. It was just rare rather than all the time.



  • SKs already being marginally beneficial for energy everyone is probably better of just dropping them altogether until you can effectively tackle and loot strongholds. With the reduced invasions the energy actually becomes more efficient, and stronghold loot is probably selling better then looted boosts from invaders.


  • Dev Team

    There is no such thing as "breaking" when we talk about SK rooms. They are not yours. Even when you manage to farm them steadily, they're still not yours. Any hostile player is free to come and mess with your algorithms. The "Invader" player is just another player in that regard.



  • A player with 6 towers and unlimited boosted creeps 🤔 It is fairly rough, although I do expect we'll see some tick times gained due to players dying off.



  • I'd like to suggest the spawn rate for L3+ strongholds be reduced for a period of time to allow players to ramp up to them.

    Making a hard stronghold be a rare occurrence is reasonable imo and would reduce some of the sudden overwhelming emergency players are feeling



  • @artch : Building towers in a room without a controller is not something that "any hostile player" can do. Invader is not just like some another player. It has some special powers. If game mechanics are changed it may seem to break something that used to work differently (predictably) earlier.

    I understand you need to add new content to this game, but you could have some mercy on us 🙂

    IRL software specifications/requirements changes too and it causes sometimes extra work, so I think we're all good here...