I have created a online player list that scans the whole island for playerpawns and ads their name and tribe to the list. Thought i had it cracked but then me and my test buddy ventured away from each other and we vanished off each others lists. Apparently the client only bothers to know about players that are so close likely to save cpu and bandwidth. Is there a way to get a list of all players online that we have access to before i waste another week on this? The admin tools show players on the server but you guys having access to everything and us not so much i need to know if this is even possible for me to accomplish without going TC…
As I told you in the other thread that is totally similar to Unreal Vanilla. The two first posts in the list get you on track: Google
The server has all the informations and you just need to replicate them. I recommend getting the list of players in the gamestate. Not sure how you wasted a week on this.
i wasted a whole week on this because i have tried about 20 different way and every time the variable is limited to the scope of the player calling the list. So if the other player is renderable it shows on the list, if not it doesnt. i also do not see a playerstateclass as shown in that first result and most of the other results are people having issues. remember this is ARK not UE4. It isnt just about what you can get in UE4 its also about what ARK allows you to have in their own version of the UE4 engine. Thanks for the links i will scour them all. but again i still have more failures then success implementing most of the stuff said here already. The only option left is server replication but i dont know what i can hook to that the server uses, it doesnt use UI, i have no idea wif it uses a player controller for itself or not to try to get the list and parse to a string then replicate.
Take into account that i have a family and i work… then do this… Add on the fact that every time i make a tweak to this i have to cook it, upload it, restart steam, upload the mod to my server, start the server, connect, then wait for someone to log on and test with me. Yea im pretty sure its easy to see how a week goes by. Something more useful then server side and gamestate need to be said for me im sorry… I search server side every thread says it cant be done without hacking the shootergame.exe, i search gamestate i get a bunch of UE4 methods that arent working in ark… i need more guidance then that.
That is great. It is like this because of replication optimisation. The client only knows about the other players because the server told him about them. I could show you how to disable this, but no one here should mess with the replication optimisation settings.
Ark basically added on top of UE4. So most of the UE4 stuff is still there, but yeah I mean they also modified some stuff but so far it looks more like an exception. The player state class is nothing you find in the content browser. Might be that you could create your own, but I would not recommend that. You just get out of other references like the player pawn or the player controller. Also always remember that the client only has the information about himself. Well, besides the pawns, but the server has most of the informations of all clients. Yes, there are also exceptions. Didn’t say multiplayer scripting would be easy.
Here is an example of how you could get the player state:
But if I got you correctly, you need more information than the generic playername or ping. You need game specific information. These you can get from the pawns only as far as I know. So just look at the text below. There is an example of how to do it.
Well, its a multiplayer game. So you will not get around replications. Server and client just dont have the same information as mentioned before and if you have informations on the server that you wanna share with the client you have to replicate it. To give you a push in the right direction: You wanna gather the information on server side, store them in a list(array) and send them over to the clients. That is a part of the code you could use:
I would strongly recommend downloading the SOTF files and studing these. Most of the special stuff of ARK I learned from looking in these files. In the SOTF gamestate they for example do exactly this. Gather all the player information and send them to the client so they could show Tribes and Names within the HUD.
As everyone of us. But you can test in the editor in a multiplayer environment: Screenshot - 21f0d61dceecb31b1b1f55111b987292 - Gyazo (on the bottom you can see the dedicated server checkbox and the amount of clients you wanna start). About hacking the exe… well, there might be ideas floating around in that forum that need some c++ assistance, but right now it does not sound like you need it. Blueprint is way to powerful anyway, but in this case it comes in handy. I can always recommend dropping by in the IRC. There are a lot of people who are willing to help. No will do it for you, but pushes like the one I gave you here are always available and the rest lays in your hands.
Sorry I sound rough in some manners, but I read stuff like “we need docs; we need code access” quite often around here and it is just not true. Yes, documenting every line and function would have been great, but you rarely get a ModKit so it is even more unlikely you will get docs anytime soon.
i came from arma 2, i guess spolied since everything is documented with even code examples, it has been around a while though. i have been testing in the multiplayer in the editor but 80% of the time Pie is Lie. It says yup good to go then you test live and not so much. your blue prints i have tried the issue is how do i get something that the server runs? I have a blueprint that works great for pulling the names and tribes and such of players and displaying them in a UI just fine. It just needs to run on the server side to work, so what can i hook into? can i put that graph in a ui blueprint the server apparently wont run it. i could put it in the controller but it likely wont run it. the gamestate isnt exposed to us other then as you listed to get it. So cant hook onto the graph in the gamestate. Ive used get all players, ive used get all players of class shooter character, i have used a sphere overlap . all methods work to the scope of the client but i need to know how to tie into the server.
- i have all the information you gave me already. its just making it run on the server is where im stuck.
if i cast to the gamestate in one blue print then try to cast to that blueprint to get the variables (which all seems to work) i then get a flip flop condition on the compiler. i compile my ui then it uncompiles my playercontroller and vice versa.
- for some reason your player array example wont connect to the foreach
- this comes up blank:
Are you blueprinting in the authorities for the event/blueprint to run server sides vs client sided? Also is replication being used in tandem with the authorities? (so it replicates client side)
this is how i was recently shown to do it with the is server check to make sure it is only running on the server, i just dont know what graph to put it in. The variables are set to replicate.
and when i do this in the ui graph to get the variables it uncompiles the other graph and if i compile it uncompiles the ui graph and flip flops infinitely.
Tbh I don’t know where to start since you are missing some non trivial basics in replication. I would recommend you doing the Epic replication video tutorial series to understand replication (A new, community-hosted Unreal Engine Wiki - Announcements and Releases - Unreal Engine Forums1-_Networking_Basics). Replication is nothing everyone gets right from the start so it’s totally ok that you do the mistakes you do. Besides that I still heavily recommend looking into the SOTF files. You say that you already have all the information I gave you, but it does not look like it.
Something that they don’t mention in the tutorial but that could be useful: GameMode only exists on the server, GameState and Pawn exists on server and client so that would be a good location to put your replication in (I recommend the gamestate), all gamecontroller exist on server but only the owned one exists on clients and the server and client one are not the same. So never do relication within or around the controller.
About your pictures:
Not sure how you managed that issue in the first picture but I would assume it happened because you copied the loop from somewhere else. This node is context sensitive so if you copy it it might still have the class cast from the use case you copied it from. Just place a fresh one or disconnect them and right-click->refresh node on the loop.
Of course it comes up blank since your HUD widget is running on client and the client does not have the information yet.
That looks like a way of doing it. Not the most beautiful one, but if that script exists in the right place it should work. Again, that should be located in the gamestate but I still would recommend the “getAllPlayers” function from the gamestate itself instead of the “getAllActors”. It’s also ways cheeper.
In here I can see that you do the script of picture 3 in the controller. As mentioned before: Server and client do not share the same controllers. Do it in the gamestate or the pawn. (Gamestate is recommended!)
And about the “compile” icon: You can ignore that. It’s an issue of 4.5 and is of visual nature purely. That basically happens because both scripts are references to each other and if you change one you should recompile the other one. As I said: Ignore it since it does not matter if you play in PIE or cook.
Thank you a lot of that info is very helpful. the gamestate i dont have access to when i try to find the gamestate in the assets it doesnt show up. maybe i will put it on the playerpawntest for server side then and try that. as for replication this one seems tricky i went through a bunch of ue4 docs and man it was tough to quite understand since the context they were using it is different then I. As for the information on the client, if the variables would be grabbed across the blueprints it would of had the information. that is the purpose of the cast, but if the server doesnt runt he controller everything might of been empty to begin with. I will play with this a tiny bit more. I dont want to dig into the SOTF files as i feel something like this should be dead simple. Either its too simple and ive lost view of it or its actually hard for a beginner and i jumped in a bit too deep, not sure which.
so to get anything to work at all i had to make a new gamestate then child it to shootergamestate then run my gets and sets in authority inside the gamestate graph. Then cast to the gamestate and get the replicated variables i created and populated. This works perfectly in the editor. It is set for dedicated with 3 clients. It only shows the other 2 it doesnt show you but oh well. It auto updates when one of them joins or leaves a tribe slick as hell. Cook it put it on the live server and the list is empty…
I am posting here also, as I am making a similar list, but instead for dinosaurs. The problem that I keep coming across no matter how I do this is that the mod works fine(it displays every dinosaur spawned and updates every so often) in singleplayer and when I host non dedicated multiplayer sessions, but when I try and run this on an actual server the ui comes up, but does not display data, it does not show any dinosaurs.
Hang in there, gonna figure this out with ya!
It should work as indeed SotF GameState does this (server gamestate blueprint ticks iterates through Actor lists of interest, and replicates info about such Actors to the Clients as Blueprint Struct arrays). Clients indeed never have all the dynamic Actors of the World directly replicated to them, only the ones nearby. But yeah, something sounds wrong if it’s not working on the dedi server, so the forum admins will be in touch to get some source assets from ya that we’ll use to figure out what’s not working correctly for your use case.
P.S. I tend to like putting most logic in GameState since both the Client and Server have it is more convenient for replication, rather than GameMode which only the Server has.
we could be building this like complete noobs, but the code does work in PIE and in single and non Dedi servers… just fails on dedis. Apparently Kenturrac attempted some server side code and it failed as well, i deleted it in anger so i have to remake it and retest but i will get you the gamestate version we tried.
I hope this does get resolved one way or another. I would be happy either way this goes. I mean if we are actually being dumb and completely missing something, then I hope you can explain what we did wrong and what to do to resolve the issue by providing an example. This way we learn and can move forward as to not recreate this issue and actually understand how to do it right.
If it is something that needs to be addressed and fixed on your guys end, I will be super excited as well. Here is to hoping for a resolution of some sort!
this gone into limbo? curious if a resolution has been found.
Several months later, I can’t seem to find any additional information on this. I am curious if a resolution has been reached as well.
I don’t think a resolution was ever needed. ACM maintains a player list for its tracking map and player stat modification, and I started doing it very shortly after Vindo had attempted to. Main things I think we were doing differently is he was targeting the other GameState - not worked with either of the “Custom” paths before - and tried “Get All Actors”, not entirely sure why neither of them worked for him either correctly or at all.