APIs?

Past suggestions that have been incorporated into the live game.
Post Reply
User avatar
NearNihil
Posts: 231
Joined: Tue Jul 05, 2022 7:12 pm

APIs?

Post by NearNihil »

Hey there,

After finding this game again after being there for the end of NW I've been theorycrafting like mad. There have been a few... things that caused me to think "it'd be great if there were some sort of API to talk to" though.

First, the character planner has been great, but (apparently) it's not always up-to-date with the game itself or the wiki.
Second, I've been reading through discussion threads on class balance, and it just so happens that a couple of classes I thought were really cool are generally considered to be weak (Void Walker in particular).

As a result, I wanted to have an at-a-glance balance sheet where I can say "okay so this class gets a ton of soak but barely any damage" or "wow this class can slap" or "that's a lot of pets". The goal is to help the game balance by first having an overview of what they all can do before suggesting changes - I'm only a couple days in, after all. Maybe eventually make it an alternative to the Character Planner, but that's of secondary importance.

Now, I fired up my code editor of choice to slap something together, but then I ran into the issue of data entry. Initially, I thought to boot up Excel for it, but building a small website is more my jam for things of this scope. I could do the data entry by hand but I suspect I'll get sick and tired of entering and updating everything in this way well before the project resembles something useful. I saw something on the Character Planner GitHub about obtaining a local database file... but wouldn't an API potentially make things a lot easier? If the game had endpoints for skills and/or classes that the Character Planner could also use, that'd be a great way to have that be up-to-date with most changes - new features notwithstanding.

I dunno, maybe I'm the first nerd to ask for it as I couldn't find anything on the forums with the search function regarding the subject. But I did want to throw it out there, who knows what might happen.
Don't like someone but can't be bothered to do the dirty work yourself? Hire RED!
Want something but can't be bothered making it yourself? Buy from PIMCO!
User avatar
Badziew
Posts: 105
Joined: Wed Nov 24, 2021 3:23 am
Location: Poland

Re: APIs?

Post by Badziew »

I think an API, while possible, is simply low priority compared to improving game mechanics and making general quality-of-life fixes that would help everyone instead of just API users.
My characters (sorted by IDs): Badziew, Tiger Fist, Pilgrim, Sentient Spellbook, a trojan cat.

Check my wiki profile for more information, including contact information.
User avatar
plscks
Posts: 171
Joined: Wed Nov 10, 2021 2:30 am

Re: APIs?

Post by plscks »

NearNihil wrote: Sun Jul 10, 2022 2:46 pm Hey there,

After finding this game again after being there for the end of NW I've been theorycrafting like mad. There have been a few... things that caused me to think "it'd be great if there were some sort of API to talk to" though.

First, the character planner has been great, but (apparently) it's not always up-to-date with the game itself or the wiki.
Second, I've been reading through discussion threads on class balance, and it just so happens that a couple of classes I thought were really cool are generally considered to be weak (Void Walker in particular).

As a result, I wanted to have an at-a-glance balance sheet where I can say "okay so this class gets a ton of soak but barely any damage" or "wow this class can slap" or "that's a lot of pets". The goal is to help the game balance by first having an overview of what they all can do before suggesting changes - I'm only a couple days in, after all. Maybe eventually make it an alternative to the Character Planner, but that's of secondary importance.

Now, I fired up my code editor of choice to slap something together, but then I ran into the issue of data entry. Initially, I thought to boot up Excel for it, but building a small website is more my jam for things of this scope. I could do the data entry by hand but I suspect I'll get sick and tired of entering and updating everything in this way well before the project resembles something useful. I saw something on the Character Planner GitHub about obtaining a local database file... but wouldn't an API potentially make things a lot easier? If the game had endpoints for skills and/or classes that the Character Planner could also use, that'd be a great way to have that be up-to-date with most changes - new features notwithstanding.

I dunno, maybe I'm the first nerd to ask for it as I couldn't find anything on the forums with the search function regarding the subject. But I did want to throw it out there, who knows what might happen.
Hello, as it happens there is something in the works for an API situation to happen. I really liked what I was able to do last breath with the planner/map and integrating it with the B4 Character API, it made for a very useful tool overall.

Anyways in the next update or two there will be a character API again. I haven’t gotten to doing anything up with skills/spells but could do that in the future. That all depends on my IRL free time and what needs emergency fixing/upgrading among our various servers.

The way that the current planner works is because at the time that was my best level of reliable access to get 30 million skills in there. As you pointed out, manually doing that is extremely tedious, that’s how the B4 planner worked and it was fairly awful.

That said, the current planner is open source and it is kind of up to date, I updated all of the skills and spells a month or two ago. Any errors in descriptions are extremely easy to fix and pretty much any dev has the ability to update them, or at least stage them for the next database refresh. There is also an issues tracker for it for corrections of things and maybe making the interface not awful, but it seems mostly that no one at all has used it, not that I’d have much time to fix stuff in a very timely manner, but again, there is a repo in which PRs can be made to correct some wonkiness.

In any case, if you’re looking to spin up a nice character planner of your own in JavaScript or something like that and want an API with some specific info to make development and upkeep of it not be a complete chore, please feel free to DM me on Discord and I’d be more than glad to help out by building what is required, provided the project is open source.
"Hey, don't talk about bacon." - Frank Lapidus
User avatar
plscks
Posts: 171
Joined: Wed Nov 10, 2021 2:30 am

Re: APIs?

Post by plscks »

Implemented viewtopic.php?f=2&t=3701
2022-07-20 changelog wrote:
  • Adds a character API. It is accessible at:

    Code: Select all

    https://www.nexusclash.com/api/char/id/{int character_id}
    https://www.nexusclash.com/api/char/name/{string character_name}
    
  • Adds a skills API, it can be accessed:

    Code: Select all

    https://www.nexusclash.com/api/skills/{string class}
    https://www.nexusclash.com/api/skills/all
    
"Hey, don't talk about bacon." - Frank Lapidus
Post Reply