Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add Hawakening support #648

Merged
merged 9 commits into from
Oct 12, 2024
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
* Feat: Update Soldat protocol (#642)
* Feat: TOXIKK (2016) - Added support (#641)
* Feat: Renegade X (2014) - Added support (#643)
* Feat: Hawakening (2024) - Added support (#648)

## 5.1.3
* Fix: `Deus Ex` using the wrong protocol (#621)
Expand Down
17 changes: 17 additions & 0 deletions GAMES_LIST.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@
| gus | Gore: Ultimate Soldier | |
| halo | Halo | |
| halo2 | Halo 2 | |
| hawakening | Hawakening | [Notes](#hawakening) |
| heretic2 | Heretic II | |
| hexen2 | Hexen II | |
| hiddendangerous2 | Hidden & Dangerous 2 | |
Expand Down Expand Up @@ -480,6 +481,22 @@ If you know your use case, it's better to use a single protocol or make your own
Farming Simulator servers need a token (reffered as code in the game). It can be obtained at your server's web interface (http://ip:port/settings.html). It can be passed to GameDig with the additional option: `token`. It does only work for your own server.
The response includes much information about the server. Currently, only the fields about server information (name, map, version, etc.), players and mods are parsed.


### <a name='hawakening'></a>Hawakening
Querying server info for Hawakening requires a _ServerId_ to be passed to GameDig instead of an IP address. You can acquire such a _ServerId_ from the master query protocol _hawakeningmaster_ [type: `protocol-hawakeningmaster`] (see `raw.servers[]raw.listing.Guid`).

Additionally, the master server requires authorization. A **user profile is required** for querying the API. Such a profile can be created on the [_official page_](https://hawakening.com/enlist).

- Provide a Server Id via `serverId`
- Provide a client profile with `username` (email address, not callsign)

And one of the following options for gaining access:
- Provide a client access token via the option `token`
- Provide the user profile password via the option `password`

> **_NOTE:_** The protocol `hawakening` will query additional server info by requesting a matchmaking _token_, which will fail for full servers. Due to this, the IP address and port cannot be queried for such servers.


Protocols with Additional Notes
---

Expand Down
12 changes: 12 additions & 0 deletions lib/games.js
Original file line number Diff line number Diff line change
Expand Up @@ -1457,6 +1457,18 @@ export const games = {
protocol: 'gamespy2'
}
},
hawakening: {
name: 'Hawakening',
release_year: 2024,
options: {
port: 7777,
port_query: 27015,
protocol: 'hawakening'
},
extra: {
doc_notes: 'hawakening'
}
},
heretic2: {
name: 'Heretic II',
release_year: 1998,
Expand Down
13 changes: 13 additions & 0 deletions protocols/hawakening.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import hawakeningmaster from './hawakeningmaster.js'

/**
* Implements the protocol for Hawakening, a fan project of the UnrealEngine3 based game HAWKEN
* using a Meteor backend for the master server
*/
export default class hawakening extends hawakeningmaster {
constructor () {
super()
this.doQuerySingle = true
this.requireToken = true
}
}
Loading
Loading