Provide alliance member data to scripts



  • The League of Automated Nations provides a file called alliances.js that includes all members of all alliances. It would be great if the Screeps server could provide this data as part of the in-game API. This way, we could code our "don't attack players in my alliance" logic without resorting to ...

    • a stale copy of alliance data baked into our scripts at compilation time
    • manual updates of "who is in my alliance" data via console or memory UI
    • ugly hacks to get things to automatically update

  • Culture

    The League website is completely independent of the game itself- including different developers. While I'd be happy to let the game devs use the data from the website I have a feeling this isn't going to happen.

    Personally I have a script that pulls down the alliances.js file and "trims" it of nonuseful information (my in game scripts don't need to know the slack channels, for instance). 



  • If this were implemented, I think it would be best to implement it in a non-service-specific way. Having an option for codebases to include a JavaScript file fetched from a URL (with a small timeout and fetched infrequently) would be great though.



  • OCS has an ok reputation system (if I do say so myself, har har). Maybe you can use that (open source / BSD license).

    https://github.com/ScreepsOCS/screeps.behaviour-action-pattern/blob/dev/task.reputation.js