question

Richard Martija avatar image
Richard Martija asked

Title ID in custom game servers

We have a two title IDs for our game, one for development and one for production. I'd like to be able to use the same custom server binary for both environments. The title id does not appear to be passed in as a command line argument so the only solutions I can think of are:

  1. Parse the title ID out of the API endpoint argument (unreliable if the url format ever changes)
  2. Add the title ID to the custom data argument (requires extra configuration)
  3. Build a different binary for Dev and Prod (not preferred)

Is there a good way to get the current title ID from a custom game server that I'm not thinking of? Is it possible Title ID could be added as a command line argument in the future?

apissdksCustom Game Servers
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
brendan avatar image
brendan answered

The safest way would be 2 - just click Settings on the build, and add

-title_id={titleId}

To the command-line arguments (replacing {titleId} with your actual Title ID. You could extract it from the URL, but as you say, the format of that may change some day (unlikely, as we're committed to no breaking changes, but if you want to be 100% certain).

3 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Richard Martija avatar image Richard Martija commented ·

Thanks Brendan,

I didn't realize <titleId> existed, it's not documented here or anywhere else as far as I can tell.

0 Likes 0 ·
Richard Martija avatar image Richard Martija Richard Martija commented ·

Never mind, I misread the first time. So you're saying there is no titleId argument and that I should manually pass it in?

In that case, I'd like to suggest that you add an argument for title ID to the command line

0 Likes 0 ·
brendan avatar image brendan Richard Martija commented ·

That's correct - that is indeed what I'm suggesting. I've added the request to add the Title ID to the backlog, but it's likely to be some time before that bubbles up, so I'd add it to the command line for now.

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.