Navigation

    forum

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

    MrFaul

    @MrFaul

    324
    Posts
    3993
    Profile views
    0
    Followers
    2
    Following
    Joined Last Online

    MrFaul Follow

    Posts made by MrFaul

    • Little helper functions for E-mail notifications (RoomURLescape and GetReplayLink)

      For those who want to build your own room links in email notifications here are two useful functions:

      function GetReplayLink(roomName, tick = Game.time, msg = "Replay"){
          return "<a href='https://screeps.com/a/#!/history/" +
                 Game.shard.name + "/" + RoomURLescape(roomName) +
                 "?t="+ tick +"'>" + msg +"</a>";
      }
      
      function RoomURLescape(roomName){
          let mapping = {N:"%4E", S:"%53", E:"%45",W:"%57"};
          let out = "";
          for (var i = 0; i < roomName.length; i++) {
              let c = roomName[i];
              out += mapping[c] || c;
          }
          return out;
      }
      

      If the room names aren't escaped the supposed server side "regex replace" kills your custom HTML links.
      However please keep in mind that this function only works for URLs and isn't suitable for anything else.

      hf 😉

      posted in Help
      MrFaul
    • RE: memory problem,plz help me!

      I don't exactly understand your intention and what you are trying to achieve but here are some hints:

      You need to differentiate between the memory stored in the DB and your instance.
      What you see in the UI is whats stored in the DB, and only the snapshot when you loaded it into the UI.
      This should be at best viewed as a reference since it gets out of sync easily.
      Manipulating stuff in the UI is a good way to loose data.

      If you type RawMemory.set({}) you essentially wipe the DB memory every tick.

      RawMemory.set(function->string) governs how you safe stuff in the DB,
      it gets called every tick automatically after your main loop is done.

      On the flip side the Memory Object boils down to Memory = JSON.parse(RawMemory.get())
      when you access it for the first time in a tick.

      https://docs.screeps.com/global-objects.html#Memory-object

      So yeah you are wiping the DB which in turn wipes the Memory in your instance, hence chaos.

      But fear not, simply leave RawMemory alone in your code, refresh your code and everything should be recreated.
      Only fields that are set can be mirrored and refreshing your code is a good way to force that.

      posted in Technical Issues and Bugs
      MrFaul
    • RE: Forum allows posts without titles

      @artch @o4kapuk is it really that annoying to fix this?
      It is probably done in a hour or so...

      Even a default like "Missing Title","No Title" or "Insert Title here" as a prefab should suffice if you don't want to implement a proper check.

      posted in Technical Issues and Bugs
      MrFaul
    • RE: creep.push()

      I thought moving thru room boundaries resets fatigue.
      This still requires one move part on the pulled creep but your are down to 2 ticks in that case.

      From the looks of it most of your scenarios could be resolved with that.

      I don't think it is necessary.

      posted in Feature Requests
      MrFaul
    • RE: creep move order

      There isn't.
      Because all you send is basically a "wish" to move there, the server is the instance who decides that based on all inputs given.

      Since there is so much going on on the server side you can call it basically random.

      posted in General Discussion
      MrFaul
    • RE: Forum allows posts without titles

      This is known for years now, I really don't get why nobody bothers to fix it.
      And no "People use Slack" is not even close to any kind of response for that.

      posted in Technical Issues and Bugs
      MrFaul
    • RE: Room.deserializePath(path) not a funtion

      I don't know, but this pattern seems to align with other problems occurring lately, like missing "main" objects double globals etc.
      Something somewhere in the server infrastructure is going haywire, @artch @o4kapuk are on it but this seems to be something really elusive.

      I bet this is something that is so incredible dumb nobody would ever identify it as a problem 😑
      A typical rage debugging thing.
      I remember, I once wrote Sudoku solver which refused to work to the extend that I completely refactored the entire thing...
      Only to find a f-ing exit point early on that I set for testing so it dosn't load the entire thing 🙄

      posted in Technical Issues and Bugs
      MrFaul
    • RE: Suggestion: Use of commodities

      Being commodities is their whole purpose besides the idea of encouraging trade between quadrants,
      it will be interesting to see if any action is needed once the planned acc resources drop.
      One of their main goals is to take out credits or rather give a reserve currency.

      posted in Feature Requests
      MrFaul
    • RE: Request: More Links

      @deft-code could you be more specific? A tesseract is a structure that has:

      • a "charge" for upkeep that needs to be renewed from time to time
      • and gives access to a virtual room wide storage

      or

      • each with a local storage that distributes its contents evenly to the other tesseracts like buckets connected with hoses

      Which one is it?
      Regardless I find the idea intriguing and much more interesting than the links, adds more depth to the gameplay.

      posted in Feature Requests
      MrFaul
    • RE: Server issues

      Daaaang... Orlet deserves a medal for that, the more you know.

      I kinda agree with Tigga, time should stop if there are execution issues that aren't player related.
      If the only option is to stop the entire shard so be it, I think that is only way that is fair and able to preserve such gems.

      posted in Technical Issues and Bugs
      MrFaul