Navigation

    forum

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

    Posts made by Flyasd1

    • RE: Understanding the result of Room.serializePath()

      You always can look into game engine: https://github.com/screeps/engine/blob/8928228bae60db78c50a7382cc3490c611b03f26/src/utils.js#L981

      Looks like first four characters is first position in path and then list of directions to the next position.

      posted in Help
      Flyasd1
    • RE: Help me!

      @duckymirror No, you can't. You can't spawn on PTR server. Only one way to access to PTR server is to spawning on official server and wait until PTR server is synced with official.

      posted in Help
      Flyasd1
    • RE: [Discussion] Uniformity of the world

      @ciber Interesting idea. What about ramparts and walls can you build this structure on river?

      posted in General Discussion
      Flyasd1
    • RE: где взять кредиты на формирование ордера на продажу?

      Можно добавить терминал и будут появляться ордеры, или можно через CLI добавить себе кредитов. Посмотрите команду Adding NPC Terminals https://wiki.screepspl.us/index.php/Private_Server_Common_Tasks

      posted in Help
      Flyasd1
    • RE: где взять кредиты на формирование ордера на продажу?

      Продай что-то, без формирования ордера. Game.market.deal(...)

      posted in Help
      Flyasd1
    • RE: Consistently using 1-2 cpu above last Game.cpu.getUsed()

      Are you know that you pay for serialization your memory? Try to do JSON.stringify(Memory) and you'll know about how much. So when you try to get used CPU at the end of tick this is not the same CPU that used your AI, because you will not take account of the CPU to serialization memory.

      For example to serialization my memory needs about 18 CPU. You can perform let cpu = Game.cpu.getUsed();JSON.stringify(Memory);console.log(Game.cpu.getUsed()-cpu) in the game console to check it.

      posted in Technical Issues and Bugs
      Flyasd1
    • RE: Cannot cancel orders on a shard you no longer occupy

      @utiuti What instruction you try to following? To cancel orders on shard you MUST to have creeps or active room on this shard. But you can't have creeps on shard because portals is still closed.

      posted in Technical Issues and Bugs
      Flyasd1
    • RE: Pass mouse click locations to the server.

      @estecka This is not mine. This is @Muon.

      posted in Feature Requests
      Flyasd1
    • RE: Pass mouse click locations to the server.

      @smokeman I am try to tell you that you can do what you want by using flags. https://bencbartlett.wordpress.com/2018/02/06/screeps-2-interior-design/

      posted in Feature Requests
      Flyasd1
    • RE: Pass mouse click locations to the server.

      @smokeman I think this game about automation everything. I am do not like idea to past mouse position to the server. If you want you can use flags for this.

      posted in Feature Requests
      Flyasd1
    • RE: Local Server Stops from time to time

      @calfa I am do not understand what you try to do. What steps you are try to reproduce? Try to use this article https://docs.screeps.com/contributed/ps_ubuntu.html

      posted in Help
      Flyasd1
    • RE: Need some help improving my CPU usage

      @calfa said in Need some help improving my CPU usage:

      toJSON

      I think you are save room and creep object to the memory, but I don't understand why so many count of call for this methods. Are you use JSON.stringify some where?

      posted in Help
      Flyasd1
    • RE: Can i include a function call into a filter?

      @calfa You can use lodash function includes so your code should look like :

      //I have an array called myArray with a few IDs
      let myArray = ['1234', '2345', '3456'];
      let myStructure = creep.pos.findClosestByPath(FIND_MY_STRUCTURES, {
          filter: function(s){    
              return ((s.structureType == STRUCTURE_SPAWN || s.structureType == STRUCTURE_EXTENSION) && !_.includes(myArray,s.id));
          }
      });
      
      posted in Help
      Flyasd1
    • RE: Dijkstra flood fill, path to all destinations

      @wtfrank I think because PathFinder is native library and have better performance then JS library.

      posted in Feature Requests
      Flyasd1
    • RE: Documentation for PathFinder.use is confusing

      @systemparadox You are wrong all methods use new path finder for default. You can look into the method Room.findPath and you will see this condition

      if(register._useNewPathFinder) {
            return _findPath2(this.name, fromPos, toPos, opts);
      }
      

      And you can look on the Game.js where register object are created line 114:

       var register = {
           _useNewPathFinder: true,
           _objects: {},
      
      posted in General Discussion
      Flyasd1
    • RE: Dijkstra flood fill, path to all destinations

      @keenathar Try to look attentively, the are swamp in those places.

      posted in Feature Requests
      Flyasd1
    • RE: How to flee from an enemy

      You should look on the PathFinder. This is easy way to create flee behavior. This is shor example how you can use it. The enemys - this is array of enemy creeps, creep is your creep.

      let path = PathFinder.search(creep.pos, enemys.map(c=>{return{pos:c.pos,range:3}},{flee:true}).path
      creep.moveByPath(path)
      

      You can found more options in the documentation: https://docs.screeps.com/api/#PathFinder

      posted in Help
      Flyasd1
    • RE: Is there a way to detect enemies in a room i don't own?

      @kyralee Reservation is not give you vision in room.

      posted in Help
      Flyasd1
    • RE: I need some help finding the nearest room

      I think you can change Game.map.getRoomLinearDistance on Game.map.findRoute(flag.pos.roomName, Game.rooms[i].name). So you will found nearest room by path, not a range. Because some time nearest rooms have very long path to travel between those rooms.

      posted in Help
      Flyasd1
    • RE: Force a global reset

      @tigga Are you using TS or some sort of code optimiser? This is not work for me because TS is remove allocation of memory when compiling because this variable is never use.

      posted in Help
      Flyasd1