x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

How To List Dedicated Servers?

Hello I have a server list widget that is supposed to get all the dedicated servers that are being hosted and make a button on the server list for each server found.

This worked when I would launch a server from the game but now that I have a standalone dedicated server built, the game isn't detecting the servers.

Here is the blueprints I have alt text

Event UpdateList is called when this widget is constructed and can be called again with a refresh button I have.

The server itself does work because I'm able to connect to it through open(myip) in console.

Any help would be appreciated thank you.

Product Version: UE 4.21
Tags:
serverlist.png (148.3 kB)
more ▼

asked Aug 11 '19 at 07:27 PM in Blueprint Scripting

avatar image

Jinkuu
112 3 5 8

avatar image Jinkuu Aug 12 '19 at 03:17 AM

I also tried advanced sessions with dedicated server ticked but it seems this is redundant considering I can join without this blueprint being called, I'm still unable to get the dedicated server and add it to the list in the widget though.

avatar image SpynderMK 5 days ago

without cpp or without advanced sessions "Find Sessions" with dedicated server only setting it's impossible, AFAIK.

avatar image Jinkuu 5 days ago

So if I recompile using advanced sessions to list the servers it would detect the standalone server I built?

avatar image SpynderMK 5 days ago

not promise, but it supposed to show correct.

avatar image Jinkuu 5 days ago

It did show on the server menu but I'm unable to click the button to join the session.

thank you though, its a great step in the right direction for me.

avatar image SpynderMK 5 days ago

are you connecting to session with advanced node too?

avatar image Jinkuu 4 days ago

I have an on clicked event for the button that's connected to the join session node.

Here are all the blueprints I have regarding the server

alt text

This is what I have on the level blueprint

alt text

This is what I have for the server list

alt text

And this is what I have for the server button

capture1.png (162.3 kB)
capture2.png (140.0 kB)
capture3.png (123.2 kB)
avatar image SpynderMK 4 days ago

Why you can't connect to server? Is it "Find Session" giving failure or there's 0 length array output or join session gives failure?

avatar image Jinkuu 3 days ago

It seems theirs 0 length array output on the session results which then results in the button failing to connect.

Am I setting up the server wrong?

The thing is when I close the dedicated server and refresh the list the button disappears, and the server log prints that the server started successfully.

I also opened up multiple servers and a button was created for each of them upon refresh.

Edit: when I opened up 3 servers the array counted 2 so I'm assuming its counting from 0 being the first server I opened.

avatar image SpynderMK 3 days ago

So you're saying that you can connect to server only if two servers created? That's really weird. What about creating non-dedicated server? Is it bugging again? And do you talking about length, not last index? When there's more than one server and button generates to every server, can you connect to every server or every but not first one?

avatar image Jinkuu 2 days ago

I'm unable to connect regardless of the amount of servers

I can connect locally and through my IP through console using "open IP" but I cannot connect using the button on the server list

I'm not sure about array length or index so I may have worded that wrong but it does list all 3 servers when I print the string for it, and also creates a button for it, but I am not able to connect to any of them through those buttons.

avatar image Jinkuu 2 days ago

I'm not even sure if I have this server list setup correctly, I know the dedicated server is working because I can join using "open IP" in the console.

I made a separate build removing the "create advanced session" on the game and now no buttons appear when searching for the servers.

This would trigger on eventbeginplay when the game starts in the level blueprint.

It seems that the server it found was created by the game instead of the dedicated server itself which means that the game is not detecting that the dedicated server was created even though is open and working?

avatar image SpynderMK 2 days ago

So "Join Session" gives an error? Actually, on screenshot you gave, there's standard join session node. Try to replace it with "Advanced join session". Also, how you test the join? In editor or with build game? Try to test it in editor with "server" game and "client" game, and create session with "server" version(maybe that will help).

avatar image Jinkuu 18 hours ago

I'm unable to find the "Advanced Join Session" you're talking about. I tested in both editor and standalone and both don't work.

avatar image Jinkuu 5 hours ago

Would I have to implement some sort of master server that lists all the other servers from the game?

avatar image Jinkuu 6 days ago

bump ⠀⠀⠀⠀⠀

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

I believe "Find Sessions" is used for local listen servers, so if in the same network a player is both the server and a client. I don't think a dedicated server on a local network has any point (regarding real life scenarios), so that can be a reason to why it fails to work.

If you want your game to be playable on the internet with dedicated servers, you are going to have to use master servers; the easiest way is to use an Online Subsystem that has it implemented, like Steam, but you can also write and set up your own.

more ▼

answered Aug 19 '19 at 09:33 AM

avatar image

KristofMorva
1.4k 6 5 7

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question