Navigation

    forum

    • Login
    • Search
    • Categories
    • Recent
    • Popular
    • Users
    • Groups
    1. Home
    2. ART999
    3. Posts
    • Flag Profile
    • block_user
    • Profile
    • Following
    • Followers
    • Topics
    • Posts
    • Groups
    • Blog

    Posts made by ART999

    • One of room turn zombie, things freeze, no creeps move and their .ticksToLive are negative.

      It's only one room E18N38 in shard0. That room stop working at 12:36 PM ICT (5:36 AM UTC). No room replay after that time and my creeps tickToLive go negative. My others rooms in shard0 are fine. No major error in my code (just some few market code room typo which I already fixed)

      There should be something wrong and I don't think my code cause it

      posted in Technical Issues and Bugs
      ART999
    • RE: Invaders suicide in unowned rooms with no player creeps

      Oh, it doesn't an intent behavior? I asked this question in slack a few weeks back and someone told me that this invader behavior have change for a long time. If so, I have to re-enable my remote guards again instead of retreat all miners

      posted in Technical Issues and Bugs
      ART999
    • RE: PWR_SHIELD rampart graphic does not go away at expiry

      It's the same as normal ramparts. Normal ramparts also don't disappear when you .destroy() them

      posted in Technical Issues and Bugs
      ART999
    • RE: Cannot reassign CPU

      That is UI bug in reassign CPU page. You have to use slider to reassign CPU. It doesn't work if you enter cpu direcly in the textbox. I hope the dev fix it soon, it very annoy for people that don't know this bug. You can use arrow key when slider is focused to do fine cpu adjustment.

      You can also change your shards cpu via api too

      posted in Technical Issues and Bugs
      ART999
    • Bug report, cannot remove other player contruction site in my own room

      I think I saw issues regard this bug a while ago. I claim https://screeps.com/a/#!/room/E61N78 but I cannot remove Extractor construction site from that room (both in UI and console). So I cannot harvest mineral.

      posted in Technical Issues and Bugs
      ART999
    • RE: [Structure] Portal generator

      I like the idea of portal generator but to allow you to open and link it in highway room is a bit convenient. That structure will be used as mean for invade far distance room other than what you intent.

      I suggest that portal generator should be build in both our base and target ally room. To maintain portal every tick both party should pay 50 energy, same amount as register power to power spawn (or even more energy to limit it usage). To open portal both players must allow connection so these portals can be connected.

      These feature make it more easier to help ally defend their bases and open new way to expand new base in faraway territories.

      posted in Feature Requests
      ART999
    • RE: How do you calculate room distance across regions (E->W, N->S)?

      OH, my mistake. Thanks for point that out

      posted in Technical Issues and Bugs
      ART999
    • How do you calculate room distance across regions (E->W, N->S)?

      I try to calculate room distance across long distance and found that 

      // Return 2
      Game.map.getRoomLinearDistance('E19N31', 'S17N32');

      if you measure these room distance manually, it should be 37. Is this a bug or it's an intend feature for distance across regions.

      This distance also apply for Game.market.calcTransactionCost

      posted in Technical Issues and Bugs
      ART999
    • RE: Flag / Controller

      You can send a scout to observe that room first, or just send out claimer (if you store last know reservation data first). You can store room reservation information in Memory. The idea is whenever that room is visible update reservation tick to Memory object. If you have no vision on that room you should use information in Memory object. Below are my code for this, it may give you some idea

       

      Room.prototype.reserveRoom = function(creepName, roomName, scoutPath, x, y, time, body, roomTickMem) {
      var room = this;
      if (Game.creeps[creepName]) {
      if (Game.creeps[creepName].room.name == roomName && Game.creeps[creepName].room.controller.reservation) {
      Memory.info[tickMem] = Game.creeps[creepName].room.controller.reservation.ticksToEnd;
      } else {
      Memory.info[tickMem] = undefined;
      }
      } else {
      if (!Memory.info[roomTickMem] || Memory.info[roomTickMem]-- < time) {
      // Create new claimer creep to reserve room
      ...
      }
      }
      };

      I use creep name to identify it role in which room, ex my reservation creep is named Claimer-E19N32. And for Memory.info object, I've initialized it somewhere in my code before I use it.

      posted in Help
      ART999
    • RE: n00b

      If you play further into the game, CPU cost optimization will be your first priority. I suggest that you should try to call Room.find() only if you need it. Some objects can be accessed by alias (and from my knowledge it cost no CPU). Such as Game.flags, Game.structures and Game.constructionSites. Use these alias properly at start to take less optimization work later on.

      Another huge CPU usage is moving your creeps. But you will encounter that problem when you reach your CPU limit and look for something to cut down CPU cost.

      posted in Help
      ART999
    • RE: ERR_NO_PATH when changing rooms

      Please make sure that creep.memory.exit.roomName is visible to you. You cannot create new RoomPosition in rooms that you don't have any creeps or structures in it.

       

      posted in Help
      ART999
    • RE: filter on findClosestByPath doesn't work as intended?

      Wall, road and containers are structures that don't have owner. So you cannot find it with FIND_MY_STRUCTURES. You should use FIND_STRUCTURES for these buildings.

      posted in Technical Issues and Bugs
      ART999
    • RE: Server load > CTRL-S save all files

      If you use stream client you can use your favorite editor. Your file should be at C:\Users\<USERNAME>\AppData\Local\Screeps\scripts\screeps.com\default for Windows 10. You can edit several files and only file you save will be uploaded. Stream client sync updated files to server for you.

      Please note that when play in browser, files in that location don't commit to screeps server automatically. It only save to server when Screeps Stream Client open. And stream client will download files from server to replace local updated files that you edit when client is not running.

      posted in Technical Issues and Bugs
      ART999
    • RE: How can I detect that I have respawned ?

      I see, I'm not experience respawn yet so I don't know that all my previous memory data are still there.

      posted in General Discussion
      ART999
    • RE: Is there any way to remove other player construction sites from reserved room?

      Thanks Heilos, as you said just walk over it and it disappear. Is there anything like that that I cannot find in document? I also noticed that creep.upgradeController can be used with withdraw to make continuous upgrading. But I cannot do it with withdraw + transfer even in simultaneous action page list them the same as dependent methods. upgradeController+withdraw combination work but transfer+withdraw doesn't work.

      posted in Help
      ART999
    • Is there any way to remove other player construction sites from reserved room?

      I cannot attack it and after look at dismantle document, I think it doesn't not work either.

      It not a problem for now but if I need to build road in that place, I cannot.

      posted in Help
      ART999
    • RE: How can I detect that I have respawned ?

      There're 2 ways to keep things in memory.

      First a persistence one. You store what ever you want in Memory object as Heilos said. But it also has some useful alias with many game object such as creep and room. For example if you want to keep something only available to each room, you can use

      Game.rooms['E10N10'].memory.something = 'some value';

      When you spawn in new room your room data is new to that room. Same as creeps, you can store information or order for each creep you spawn by store it in Game.creeps['CreepName'].memory.order = 'attack-x,y'.

      These information store in Memory object are available through game loops.

       

      The other way to use memory is a none persistence one. Javascript allow you to add data to objects. For example

      Game.rooms['E10N10'].hostiles = Game.rooms['E10N10'].find(FIND_HOSTILE_CREEPS);

      Then you can use Game.rooms['E10N10'].hostiles in current game loop. This data exists only current game loop but it maybe useful to store some temporary or update-every-tick data. It save your CPU usage without call this function for every creep in that room.

       

      .  

      posted in General Discussion
      ART999
    • RE: Error from using array to findClosestByPath

      From document, I don't think you can pass that array as findClosestByPath argument.

      You should call

      var hostiles = creep.pos.findClosestByPath(FIND_HOSTILE_CREEPS)

      then

      var structures = creep.pos.findClosestByPath(FIND_HOSTILE_STRUCTURES, { filter: (it) => it.structureType!=STRUCTURE_CONTROLLER })

      posted in Help
      ART999
    • RE: Add function pointers to creep, not working. Help

      You cannot add function to Memory. If you want to add logging ability to your creep please extend Creep prototype

       

      Creep.prototype.log = function(msg) {

          console.log(this.name + ' ' + msg);

      };

      // Then you can use this in your code

      Game.creeps['Dylan'].log('something');

      posted in Help
      ART999
    • RE: Example for storing and using a path in memory?

      1. You store serialized moving path in creep.memory (ex. creep.memory.movePath). Move path return from RoomPosition.findPathTo() is an array of path, you should use Room.serializePath to serialize it to string before store in memory.

      2. You need some way to track your current destination (ex. creep.memory.moveDest) and check if your destination is changed or not before move. If it change then find new move path. Otherwise move your creep using Creep.moveByPath(creep.memory.movePath)

      3. in #2

      See example in http://support.screeps.com/hc/en-us/articles/203013212-Creep#moveByPath

      if(!creep.memory.path) {
          creep.memory.path = creep.pos.findPathTo(target);
      }
      creep.moveByPath(creep.memory.path);

      Same as other function document above code only show you a very simple usage for moveByPath. You should apply more complex logic in your code by yourself. Please note that, above example does not serialized path before storing it in memory.

      Moving between rooms and using path is something more complex than moving within room.

      posted in General Discussion
      ART999