Changelogs

Changelog 2017-06-26

  • Refactored creep damage and heal apply logic in a more consistent fashion. The main part of its logic can be found here:
    1. All incoming damage and heal is counted first, but not applied.
    2. Total heal and damage are applied to the creep's hits.
    3. hits <= 0 and hits > maxHits checks are made.
    4. The creep’s body is recalculated, including CARRY capacity.
  • Market order prices now can be set with 0.001 precision. However, all real credits transactions still work with 0.01 precision, i.e. when you execute a deal, the resulting transaction (amount * price) is rounded up. You cannot execute a deal for a total amount less than 0.01 credits, the Game.market.deal method will return ERR_INVALID_ARGS.

    This means you can sell/buy energy for 0.001 per unit, but with amounts not less than 10 energy units per transaction.

These changes are supported in private server v2.7.1.


Have comments or feedback? You can discuss this post here.

Changelog 2017-05-26: public memory segments

Introduced new public memory segments feature. Now you can mark some of your memory segments as public, and other players will have read-only access to them using RawMemory API.

These changes are supported in private server v2.7.0.


Have comments or feedback? You can discuss this post here.

Changelog 2017-05-18: hard resets fix

A Node.js contributor and Screeps player Marcel Laverdet managed to track down a bug in the built-in Node.js vm module that caused a race condition when sandboxed code timed out. It was the primary reason of so called “hard resets” of player code execution in Screeps. A fix for this bug is manually patched into Node.js on Screeps runtime servers, and the number of hard resets is greatly reduced now. This change takes effect starting from now.

The patch is proposed to Node.js upstream repo. If you want it to be included to your own Node.js instance running your private Screeps server, you can give it a thumb up on GitHub. Well done Marcel!

There are still some other reasons that cause hard resets occasionally. We’re working on tracking them down right now.


Have comments or feedback? You can discuss this post here.

Changelog 2017-05-11

  • Updated runtime Node.js version to 7.10.0 (with V8 5.5).

  • Changed terminal transfer energy cost formula:

    energy_cost = resources_amount * (1 - Math.exp(-range / 30))
    

  • Introduced new StructureTerminal.cooldown feature. It is triggered on both StructureTerminal.send and Game.market.deal methods and is equal to 10 ticks regardless of the transaction size and range. Methods will return ERR_TIRED code if the cooldown is active. New TERMINAL_COOLDOWN constant is added.

  • Removed non-intuitive behavior of auto-attacking objects on Creep.move. This fixes an exploit of doing attack and heal simultaneously which is prohibited.

  • Runtime virtual machine now uses breakOnSigint feature. CPU limit reached error messages have three types now:

    • Script execution timed out - when the soft timeout is fired
    • Script execution has been interrupted - when SIGINT signal received
    • Script execution has been interrupted with a hard reset - when SIGKILL signal received (runtime process restart).

    These differences are mostly for informational purposes and don’t affect anything currently.

  • Changed boost effects of UO, UHO2, XUHO2 according to the documentation.

These changes are supported in private server v2.6.0.


Have comments or feedback? You can discuss this post here.

Changelog 2017-03-09

Introduced new kind of world map zones: Respawn Areas.

  • Respawn Areas are highlighted with blue color on the world map.
  • They are isolated from the rest of the world with a wall. The wall has a timer similar to Novice Areas. Any player can place the first spawn in this area, but nobody can come here from the outside world while the timer is up.
  • The only restriction in Respawn Area is nukes usage - a nuke cannot be launched from or to a room in a Respawn Area.
  • Players with GCL 4 or higher are no longer able to start playing in Novice Areas. They have to either respawn in a regular room or in a room within a Respawn Area that will keep them safe for a while and allow to claim as many rooms as their GCL allows.

Other changes

  • When a Novice or Respawn Area is being planned in an inner sector, all free rooms in this sector will be signed by the game with the following message:

  • Added new constants SYSTEM_USERNAME, SIGN_NOVICE_AREA, SIGN_RESPAWN_AREA. You can use them to programmatically check the signs in the rooms that are important to you and reserve them if such a message detected.

These features are supported in private servers v2.5.0.

Changelog 2017-02-27

Memory segments

Introduced new memory segments feature:

  • You can have up to 10 MB of additional memory by activating asynchronous memory segments.
  • Each memory segment is a string with an ID from 0 to 99.
  • Maximum segment data length is 100 KB.
  • Segments are asynchronous, you should request them using RawMemory.setActiveSegments. The data will be available on the next tick.
  • You cannot have more than 10 segments active at the same time.
  • Active segments are available in RawMemory.segments object and are saved automatically.
  • Activating and saving segments have no added CPU cost.

Example:

RawMemory.setActiveSegments([0,3]);
// on the next tick
console.log(RawMemory.segments[0]);
console.log(RawMemory.segments[3]);
RawMemory.segments[3] = '{"foo": "bar", "counter": 15}';

You can use this feature to store data which is not needed every tick, for example pathfinding caches, or collected statistics. Offloading data structures from Memory to asynchronous segments will allow to save some CPU spent on Memory parsing.

Other changes

  • You can now create a RoomVisual object using the constructor without a roomName parameter and post visuals to all rooms simultaneously:

    new RoomVisual().circle(30,30, {fill: 'red'});
    new RoomVisual('W1N1').rect(10,10,40,40);

    This code will display both the circle and the rectangle in the room W1N1, and only the circle in any another room.

  • Changed RoomVisual.text method style options:
    • Renamed size option to font. It can be either a number or a string in one of the following forms:
      • 0.7
      • 0.7 serif
      • bold italic 1.5 Times New Roman
      • 20px sans-serif - absolute size in pixels
    • Added new stroke and strokeWidth options.
    • Added new backgroundColor and backgroundPadding options.

    Example:

    new RoomVisual().text('Text 123', 10, 10, {
       font: 'bold italic .7 serif', 
       color: 'white', 
       backgroundColor: '#88ff88', 
       backgroundPadding: .3,
       stroke: '#005500',
       strokeWidth: .15         
    });


These features are supported in private server v2.4.0.

Changelog 2017-02-06

We introduced an exciting new major feature - RoomVisual API. Now you can draw simple shapes (lines, circles, rectangles, polygons, text labels) right at the game field in any room to debug your code and/or display arbitrary info. For example, you can visualize your creep path (using the new visualizePathStyle move option), plan your future structures placement, display debugging text messages including Unicode emoji, and many more. These visuals are visible only to you, and all API calls have no added CPU cost.

API Changelog

These features are supported in private server v2.3.0.

Changelog 2016-11-14

  • CARRY parts now don’t have weight penalty when boosted. One CARRY part always generates fatigue as one body part, even if it contains more than 50 energy units.
  • Increased the following boost effects:
    • UO: from +100% to +200% harvest
    • UHO2: from +200% to +400% harvest
    • XUHO2: from +300% to +600% harvest
    • LH: from +30% to +50% repair and build
    • LH2O: from +65% to +80% repair and build
    • GH: from +30% to +50% upgradeController
    • GH2O: from +65% to +80% upgradeController