Navigation

    forum

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

    Topics created by Rurik

    • Unsolved All ramparts flicker when a single rampart is destroyed/decays.
      Technical Issues and Bugs • • Rurik

      1
      1
      Posts
      2857
      Views

      No one has replied

    • Solved I broke the game!
      Technical Issues and Bugs • • Rurik

      4
      4
      Posts
      5149
      Views

      Thanks for reporting, fixed in this commit.
    • 1 Flag exists in 2 places.
      Technical Issues and Bugs • • Rurik

      4
      4
      Posts
      7207
      Views

      @Dissi I was creating the flag in an owned room on one tick, and then on the next tick moving it to a room with no vision. This scenario does not always cause the problem but seems to occasionally. @SteveTrov Thank you for this input, it led me to do some more testing with interesting results. I wrote the following code: let flagName = "test"; let desiredPosition = new RoomPosition(25, 25, "W27N13"); // no vision of this room let creationPosition = new RoomPosition(6, 29, "W25N13"); // owned room with vision global.flagTest1 = function() { let flag = Game.flags[flagName]; if (!flag) { creationPosition.createFlag(flagName); } else { flag.setPosition(desiredPosition); } log(`Flag exists: ${flag}`); }; global.flagTest2 = function() { let flag = Game.flags[flagName]; if (!flag) { creationPosition.createFlag(flagName); } else { flag.setPosition(Game.time % 2 === 0 ? creationPosition : desiredPosition); } log(`Flag exists: ${flag}`); }; And performed the following tests: I put flagTest1(); at the top of my main loop while the flag was NOT in existence. Result: A flag by the name "test" was created, and then proceeded to alternate in and out of existence at creationPosition, never making it to desiredPosition every other tick the log statement would say that the flag did not exist. I do not have any other code in my code base that would be removing this flag. Eventually after some number of ticks (perhaps a dozen or two) the flag successfully moved to desiredLocation and stayed there, behaving as you would expect. I replaced flagTest1(); with flagTest2(); at the top of my main loop. The flag was already in existence. Result: The flag "moved" to desiredPosition but also remained at creationPosition. There are now two instances of the flag that are both clickable and selectable in the UI. I have repeated both of these tests multiple times with similar results. Another interesting note: While the flag is "duplicated" and exists in both rooms, calling Game.flags.test.remove() returns OK but neither flag is removed. Both stay in existence after repeated calls to .remove() from the console. After clicking one of the flags in the UI and pressing the UI button to remove the flag, it is removed but the other version of it stays in existence and calling .remove() now functions properly on the remaining flag.
    • Allow replay speed to go negative
      Feature Requests • • Rurik

      4
      4
      Posts
      4891
      Views

      @SteveTrov is that what happens currently when you press the "<" button to go back 1 tick? I figured negative tick speed could just do whatever that button does but at a regular interval. Anyway its not a huge deal.
    • Game.map.protectionLevel(roomName) or .availability(roomName)
      Feature Requests • • Rurik

      5
      5
      Posts
      5843
      Views

      @mrfaul Yes that is how it works, but there is also a roomCallback or routeCallback depending on which function you use so that you can do things like tell the pathfinder to avoid certain rooms or to prefer highway rooms and things like that. I know WHY my creeps are getting stuck, i'm just asking for a way to solve that problem in my code, and not have to manually type out room names for dozens and dozens of rooms when there is a novice/respawn area. Manually adding flags to 60 rooms is not a fun solution either, and will still need to be redone every time you spawn into a new respawn zone. As a side note it would be nice if the max value of the maxRooms option was increased. The longer purple arrow in that picture i shared goes through more than 16 rooms which means no path can be found. I'll have to do some kind of multi stage pathing to get that far for now but it would be cool if the maxRooms option could go higher instead. If using Game.map.findRoute to only allow rooms along the optimal room path it doesn't use an unreasonable amount of CPU to path that far considering the distance.
    • Solved Game.map.isRoomAvailable not working
      Technical Issues and Bugs • • Rurik

      2
      2
      Posts
      3618
      Views

      It is intended. Game.map.isRoomAvailable only tells if a room can be accessed in general (i.e. it's open for settlement and not in disabled world area), it says nothing about whether it can be accessed by you personally.