API Request - Battle and Nuke endpoints


  • Dev Team

    We consider adding something like a "Battle Radar" feature on the world map in the future. It will look like a news feed with links to room replays.

    These endpoints might be a nice feature too. However, it feels a bit odd to add some APIs to the game server which are not used in the official game UI, especially when we have no real documented API yet.


  • Culture

    It might feel odd, but it would be so awesome. It would allow us to build something similar to the battle radar now while you focus on other things, and then you can add the battle radar in down the line. We understand that the API is unofficial so if it breaks or changes we won't complain, but it really feels like this is a missing feature of the game and we really could do so much to fill in that gap.


  • Dev Team

    OK then, these endpoints are online:

    • https://screeps.com/api/experimental/nukes
    • https://screeps.com/api/experimental/pvp?interval=100 where interval is number of ticks from the last pvp action

  • Culture

     Oh this is awesome! so quick as well! Thank you so much for this quick solution!


  • Culture

    Could it be that the update broke the notification settings for invaders? I'm getting a lot of 

    Your X #ID in room YYYY is under attack



  • Dev Team

    Yes, some notifications were wrongly sent, it's fixed already.


  • Culture

    Amazing work on the endpoint! I'm thrilled it was deployed so quickly.

    I got a small request which might reduce server load:

     

    The endpoint

    https://screeps.com/api/experimental/pvp?interval=100

    could we get enter currentTick value?

     

    https://screeps.com/api/experimental/pvp?sinceTick=1337

    This way we can hammer the server with less requests by making accurate interval values.

    If the request also returned the currentTick it can even be tailored to only request new data.

     

    Amazing work on the api!



  • Great suggestion and what quick implementation!

    Keep up the good work 😉


  • Dev Team

    https://screeps.com/api/experimental/pvp?interval=100
    https://screeps.com/api/experimental/pvp?start=14470247

    It returns {ok: 1, time: 14470307, rooms: [...]}



  • Impressive, most impressive. Thank you Tedivm and ScreepsGameMasters. 🙂


  • Culture

    Oh this is absolutely fantastic! When I made the feature request i wasn't expecting to wake up with it implemented- I'm looking forward to making a few bots this weekend 😄



  • Great work @Artem!


  • Dev Team

    Since ticks are recorded, I believe you may come up with the same idea of a replay news feed, so that one can watch the battle even it's been a day or two ago. 


  • Culture

    There is now a bot that lives in #thewarpath which alerts on battles and nukes.


  • Culture

    Minor bug with the APIs- right now when a player dismantles neutral structures in their rooms (ie, Zergling dismantling his walls in W13S28) it results in a PVP notification.


  • Dev Team

    Minor bug with the APIs- right now when a player dismantles neutral structures in their rooms (ie, Zergling dismantling his walls in W13S28) it results in a PVP notification.

    Fixed.



  • I know this is experimental but I just observed the following - a couple of rooms showed as objects instead of a room name.

    {"ok":1,"nukes":{"shard0":[],"shard1":[{"_id":"5b896eee17e5a8214d76ed8b","type":"nuke","room":"[object Object]","x":25,"y":25,"landTime":11360037,"launchRoomName":"W21N18"},{"_id":"5b8971ef76ab81419cd80bc2","type":"nuke","room":"[object Object]","x":25,"y":25,"landTime":11360242,"launchRoomName":"W21N11"},{"_id":"5b897a8d029da7212ee6008b","type":"nuke","room":"[object Object]","x":25,"y":25,"landTime":11360874,"launchRoomName":"W22N12"},{"_id":"5c4d0b23b9b908332ce6a3fe","type":"nuke","room":"W12S28","x":18,"y":10,"landTime":15021486,"launchRoomName":"W19S32"},{"_id":"5c4d0de005e5f30d8bd4a862","type":"nuke","room":"W12S28","x":18,"y":10,"landTime":15021685,"launchRoomName":"W17S34"},{"_id":"5c4e876cbe6eb97f6d800738","type":"nuke","room":"W53N43","x":34,"y":10,"landTime":15049514,"launchRoomName":"W43N46"},{"_id":"5c4e8846b22bb87a1b08f3e2","type":"nuke","room":"W51N51","x":42,"y":10,"landTime":15049537,"launchRoomName":"W41N51"},{"_id":"5c4ede848f9bdb12957d021c","type":"nuke","room":"W52N49","x":38,"y":9,"landTime":15056023,"launchRoomName":"W42N44"}],"shard2":[],"shard3":[]}}



  • I think that was me. When I was exploring the ability to nuke arbitrarily far away I launched a few nukes against Objects before I got the hack correct.

    I was also on the MMO server when I thought I was on PTR. I asked o4kapuk to clean up the errant nuke on MMO, but these might have been missed since they're through a different API.


  • Dev Team

    Ah now I can find em! Thanks for the ids, now they gone.