#multiplayer

1 messages · Page 12 of 1

sinful tree
#

Absolutely. If there is an RPC open like this that a client can execute, someone with know-how would be able to figure out how to call it.

acoustic veldt
#

Fair enough. Thanks for taking the time. I will rethink my approach!

dark edge
#

Why is it not just a big array of structs?

#

How many players in total are in play, like 100?

#

I don't mean in an individual game, but what's the total dataset

dim trail
#

when to replicate vs rpc a variable?

dark edge
#

But it depends

#

If it's state, replicate it.

dim trail
#

replicating variables dont seem to work, i always have to rpc them if its via bp

#

for example, i have an input action set to true when pressed and false when not pressed, if these bools are set to replicate, when the server checks if there are true/false, it will always be set to true. if i rpc them, it works correctly

#

this is what i have to do to check right now and its the only way it works

elfin lintel
# dark edge Why is it not just a big array of structs?

I think I will just use all structs for the most part. My brain was just running into the initial problem of discovering that you can't call UFunctions actually on the structs (so no RPCs directly on the structs). But I think I can just call the RPCs on the structs managing owner AActor, then keep the functionality actually in the struct.

And I have hundreds of teams, with >10 players per team, but I don't think I should have a big problem with this amount of replication, as for the most part the data within isn't changing often.

I appreciate you going back and reading this from this morning, and if there is anything I am saying here that sounds incorrect, I am all ears.

fathom aspen
# dim trail this is what i have to do to check right now and its the only way it works

I don't see any replicated variables in the picture. Inputs are fired locally, which is usually client-side, unless you're on a listen server. That's why you need to fire a server RPC before you change your replicated variable. You can't change it before you server RPC and expect it to replicate. The one who has authority over replicated properties is the server

limber gyro
#

I have a multicast function that i want to call from the server to change all players pawns, what the best way to get the PC in a multicast function? or do i always have to pass the PC to the function with say, a loop for a example?

dark edge
#

just change their pawn on server

limber gyro
wheat magnet
#

how much players can amazon gamelift can handle?

dark edge
limber gyro
#

so i am gonna have to use a loop of some sort to get all PC's and change the character then i assume

wheat magnet
#

does polygon matters in multiplayer?

dark edge
wheat magnet
#

let say i want to make a multiplayer game that can able to handle 500-1000 players

#

which solution is best?

#

for dedicated server

dark edge
#

You don't do that

#

500-1000 is custom server or heavily modified engine territory.

#

If you have to ask, you're not doing that.

wheat magnet
#

I want a solution for that. The game is very simple

limber gyro
wheat magnet
#

which thing should i change in server or code

#

also does by using amazon gamelift server solves this problem?

limber gyro
#

its not that simple

#

its not something any regular person can do

#

and there is not a service as far as i know for that either

#

coding a server that handles that kind of simultaneous players is a very hard task

wheat magnet
#

I have a very basic game. I need solution for that

#

does anyone uses amazon gamelift?

left flicker
#

Looking for others' thoughts on this, like if this happens to you and if so what do you do about it:
When you are trying to get something to work and it isn't the way you think that it should. And then you go reset the changes you made and suddenly it works?

#

Also, @fathom aspen and @sinful tree (sorry if this disturbs whatever you are up to right now, or is random) I managed to get it to work with an Event Dispatcher. I'm not sure if that's the best way necessarily though.
I just wanted to let you both know and wanted to thank you both for your help! unreal

wheat magnet
#

what is best way to host dedicated server over internet?

peak sentinel
#

Do I have to write custom movement modes if I don't apply movement changes via inputs?

limber gyro
peak sentinel
#

I have an asset that has properties of CMC, and I replicate that asset to change the movement modes. I think I can't write a custom mode for each asset

#

Is there any workaround for this?

#

I'm thinking about having a subsystem and indexing all of the movement modes, and just replicating an index in a custom movement mode

#

So I can just bind an int32 to CMC's reconciliaton system

#

but not sure how it would work

limber gyro
#

Is there any ways to know which game mode our map is running on the client?

fathom aspen
modern cipher
#

why these functions are not called when you play as a listen server if you modify/add/remove elements from the array?

 void PreReplicatedRemove(const TArrayView<int32> RemovedIndices, int32 FinalSize);
 void PostReplicatedAdd(const TArrayView<int32> AddedIndices, int32 FinalSize);
 void PostReplicatedChange(const TArrayView<int32> ChangedIndices, int32 FinalSize);
grave lynx
#

Hey, just wondering how this kind of lobby are made. precisly about the camera, is this a pawn? or just a camera on the map?

fathom aspen
modern cipher
fathom aspen
#

Yeah pretty much like an OnRep

buoyant crag
grave lynx
sinful tree
# grave lynx make sense, and what about character order? Like the player always see his chara...

You make it so the actors are spawned locally on clients via multicast or via server->client RPC for those that are joining. You'd have to have a means of determining which pawn being spawned is which player, so you'd probably have to pass along a playerstate. If the playerstate == the local controller's player state, then that one goes into the first slot. Others are populated into the slots as the messages from the server are received.

buoyant crag
#

big up datura

tight crow
#

I am trying to implement an alternate reality, and when one player goes through to the other side, I have a post-processing material on the player camera that changes, however, it does this on BOTH players. I have tried to just add the code to a custom event that is replicated only for client, but it still doesnt work. Any ideas how to make this work properly?

dark edge
sinful tree
buoyant snow
#

So I hoped that I could make multiplayer platformer...everything work in editor, but now I found out that packaged game won't find steam session...
I remember that I got this problem in the past, but unable to resolve it...
Tried every obvious Google result...
I use app id 480 but I think that is not the issue, bcs from editor everything works 😦

quasi kite
#

Can I just do SetReplicateMovement(true) or SetReplicates(true) if I want to replicate rotation of an actor body, or will that differ from doing an OnRep with DOREPLIFETIME_CONDITION_NOTIFY(..., ..., ..., REPNOTIFY_Always/REPNOTIFY_OnChanged) everytime I change my rotation value?

buoyant snow
#

bInitServerOnClient=true is set in DefaultEngine.ini

sterile scarab
#

Here's a question I haven't ran across before. What if I wanted to spawn something on the client, control it completely from the client, but still have it replicated? I know it's counter intuitive, but something I want to explore.

graceful flame
#

You can spawn something client side and not replicate it, but other players won't see it or interact with it.

cosmic trail
#

Is adding an input delay on a listen server to be half the client's ping a good way to achieve a bit more fairness in high ping situations? Are there any drawbacks to be aware of?

sinful tree
tight crow
sinful tree
tight crow
#

Its an Actor BP I created

sinful tree
#

So like, a pawn? An actor?

#

Character? player controller?

tight crow
#

Actor lol sorry

#

Just a normal Actor. When the player touches the box collision within the BP, it fires the code

sinful tree
#

Ok, so that's probably where the problem starts.

  1. You cannot "Run On Owning Client" on an unowned actor and expect the clients to get it. By nature any unowned actor can only replicate events to clients VIA OnRep variable events and Multicasts. This scenario you wouldn't want to set the owner. You're probably also getting a warning message in your log about "No owning connection for..." in reference to that particular actor.
  2. The only reason the event is firing at all, is because the OnComponentBeginOverlap fires on the server and all clients. So when the clients see that trigger happening, they are then proceeding with executing the code, including the "Run On Client" event as they can still do so - once one player overlaps, all clients respond to that event, thus causing all clients to end up executing your post process change.

To fix:

  1. Remove the "Run On Owning Client" event. It's not what you want in this situation, and is not doing what you're expecting it to do.
  2. Decide if you want this to be an actual replicated event or not. Clients could potentially just do this all by themselves without the server caring if they overlapped or not.
    If you don't want it replicated:
  • Put a "HasAuthority" node right after the overlap event, on the remote path continue with your logic.
  • Right after your ParentCharacterBP, you can take the reference and check if it is LocallyControlled, and if true, proceed with everything else that leads up to the post process getting changed

** If you want the server to tell the client to do it:**

  • Put a "HasAuthority" node right after the overlap event, on the authority path continue with your logic.
  • You'll need to route it through a "Run On Owning Client" on a player owned class, such as their character or their player controller, and when running on client, lead up to whatever you wish to get the post process changed.
tight crow
sterile scarab
sterile scarab
sinful tree
graceful flame
#

You can make a replicated actor that only the owner can see.

dim trail
#

form what I understand; simple move to location is NOT replicated through the CMC and custom c++ has to be written. This ue market asset claims they made it work with replication through bp, can anyone vouch for this?
https://www.unrealengine.com/marketplace/en-US/product/multiplayer-ready-topdown-templates

Unreal Engine

Great for RPG's, MOBA's, MMO's: 100% Blueprint - Includes 3 setups for replicating UE4's Topdown Template. Also includes a basic Multiplayer Host/Find/Join session system with Steam support. And includes an Advanced Graphics Settings menu.

sinful tree
cosmic trail
sinful tree
#

The way I read what the issue is, is that when attempting to use Simple Move To, it is not using the CMC, so it isn't replicated, but it's an easy means of moving something from one place to the other. For example, something like the below examples won't work in multiplayer, even though the "Simple Move To" is what they use in the top down example.

faint parcel
#

How do I implement a "Drop weapon" (throw it out of inventory, to the ground) in multiplayer? RPC or Property replication or a combination?

pseudo schooner
#

Hey guys. I'm currently building several multiplayer systems. I'm about fed up with structs so I've started moving calculated data into UObjects since they can have their own internal functions. I have UObjects nested inside of UObjects, with a really great system for each object to perform procedures on itself and return simplified data to whatever system is requesting it. This has made a lot of systems FAR more reliable, and allows me to keep that code all in one place. The problem I currently have is...UObjects do not replicate... The UProperties inside of them replicate, but the UObject itself does not replicate. This means I would have to build an RPC to tell the client to build a matching structure (The same number of UObjects nested inside the parent). This seems like a really ridiculous solution to me, so I was wondering how others handle situations like this?

fathom aspen
#

Always go by this golden rule:
State - property replication
Transient - RPCs

#

You will most probably have a TArray for your inventory, when you want to drop an item you remove it from the array

#

As the array is replicated it's removed client-side too, and you can even get a nice callback to tell that client that it happened

fathom aspen
faint parcel
#

Thanks, WizardCell. It's good to have golden rules!

pseudo schooner
# fathom aspen > UObjects do not replicate... The UProperties inside of them replicate I don't ...

I previously had, say, the inventory system replicated as a struct. Items have a lot of unique data in them since they are all given random colors, stats, and meshes at time of creation That random data is all created server side and handed down. Having them as nested structs replicated very well, but they are an absolutely nightmare to make any changes to (and we have loads of changes while building these out) and updating their values during gameplay is a pain. UObjects essentially makes those paint points disappear, but I cannot replicate a UObject reference, I can only replicate their property references. I really want to keep this data in UObject format, but I'd like to have a way to replicate them without some pretty involved RPC calls. What do most people use for complex data that needs to be replicated?

fathom aspen
pseudo schooner
faint parcel
fathom aspen
#

Right

faint parcel
#

How should I handle the visual dropping to the ground of the actor? In the OnRep_ when an old equipment is not in the newly replicated array? Or in the Equipment when its owner changes?

#

Maybe that's just handled by the state of the equipment

#

"I am in no inventory, hence, drop to ground"

#

(meaning, unhide, add collision, etc.)

#

(put on floor visually)

dark edge
#

Like can it be picked up from the location and which it was dropped or does it just drop and kind of disappear?

faint parcel
#

Equipment can be dropped and picked up again

fathom aspen
#

If you are using cpp, i.e. OnRep, then that's pretty simple. OnRep(OldArray) and then you can compare the old with the new. In bp you have to make an old array for yourself

#

Preferrably use a FastArray and you ger per item callbacks

faint parcel
#

Yeah I saw that there was a sort of "overload" of the OnRep, with the Old value, looks valuable

#

FastArray?

fathom aspen
#

FastArraySerializer

#

It's a sophisticated array

#

I see it more used in cases where your array is too big

#

So it's a pita to compare whole elements

sinful tree
#

Define "Too big"

fathom aspen
#

Probably bigger than 1000 elements

#

Could be more than that

faint parcel
#

No immediately obvious guide for using it pops up when I search for it. Might look into it though, sounds valuable for a big inventory.

#

Writing a "TODO: Optimize, look into FastArraySerializer" comment 🙂

pallid mesa
#

ᵘˢᵉ ᵗʰᵉ ᵖʳᵒᶠᶦˡᵉʳᵎᵎ

faint parcel
#

Who said that!!?

#

😄

barren surge
#

I'm familiar with FFastArraySerializerItem for more optimal network replication of TArrays' of UStructs. Does TArrays' or UObjects do something similar or do we have to wrap the UObject in a UStruct (i.e. FFastArraySerializerItem) for optimal replication?

narrow nacelle
#

i'm trying to build a lobby system, i have an array of connected controllers in the lobby gamemode, how should i relay this to clients so that their UI can show the connected players too?

#

should i just sync the array with every controller and every client UI reads it from their respective player controller?

#

or is there an opinionated way

sinful tree
marble gazelle
# barren surge I'm familiar with FFastArraySerializerItem for more optimal network replication ...

You can serialize an Array with UObject references as part of your struct using the FastArray...
How ever, the UObject it self must be replicated using subobject replication.
BUT If your UObjects them self don't need RPCs you can also write some custom replication (Very usecase dependend so doesn't necessarily fit your usecase)
Technically you can replicate the properties of your UObject on your own and send it with the bunch and then you just need the object type and some factory to recreate the object and fill it.
But as said, this only could make sense in very specific usecases, so I wouldn't recommend it for the general case, but wanted to mention it^^

pseudo heath
#

Hey guys i'm having trouble with replication, is somebody willing to help?

#

the project is super simple but i just started unreal so i am not very good at it

#

very simple idea i have two tanks used by two player you can click it and move it similar to a classic top down template

#

using the arrows you can rotate the turret and the cannon and i have a spline that predicts the shell trajectory

#

the problem is that if I move the turret as a client the listen server (or the other client) cannot see that movement

#

as you can imagine is not only an esthetic problem since the shell will go out based on where the turret is pointing so on the client's screen it goes towards the server tank but on the server screen it goes straight

#

i have tried both a repnotify and with events but i can't get it to work because of my inexperience

short arrow
pseudo heath
#

you are right I'll do it now

#

the models are only for test purpose, i know they are bad but easily fixable that's not the problem 🙂

short arrow
#

the client needs to tell the server where it's rotating the tank, and then the server can multicast that information to everyone else

#

it's working on the server because you are calling "Turret Rotation Multi"

#

because listen server is the server it can call multicast events

#

clients can't do that

#

sorry I was in a valorant game. Lost though because my omen went 4/22 in my ranked game

pseudo heath
#

ok thanks a lot for the help, i will try a way to make it rotate from the server

peak lintel
#

Hey guys. I have a question. Where do you host your multiplayer game? I've read something about gamelift, a dedicated server for games.

silent valley
elfin lintel
#

I'm working on an asynchronous multiplayer game, and I previously was thinking that I might need dedicated servers, but I thought of a different potential solution. I am not quite ready to implement this yet, but I was wondering if I could use a Listen Server setup. In this setup when a player went to login/join a previously joined game, if no one else is online, it could make that player the host. If someone else is already online as the host, they would join as a client. Locally, the player would store save data that would identify which game/save they would need to retrieve when logging in, and the rest of the save file could be stored online (steam cloud or other hosting service that would just host the save files, not the full game). Is something like this feasible and not extremely difficult?

pseudo schooner
#

Hey, I've implemented this replicating UObject class from this website https://jambax.co.uk/replicating-uobjects/ (had to make a few updates as some of those functions are on their way out). I've exposed the class to Blueprints where I've made a child of this class for some testing. I've set the actor that owns these to replicate, I've created the UObject on the server with a valid replicating outer reference, and I've assigned the object reference to a variable that is set to RepNotify. The RepNotify is called on the server, but not the clients. I admit I only understand a portion of what's going on here but I was wondering if I'm doing something horribly wrong here? My goal is to create UObjects with a LOT of unique, randomized data on the server and pass those values down to the client. I was previously using structs for this purpose, but they are an extreme nightmare to develop features with. Just wondering if anyone had some insight onto what I'm doing incorrectly here

sinful tree
elfin lintel
elfin lintel
# pseudo schooner Hey, I've implemented this replicating UObject class from this website https://j...

I've had the same problem recently and decided to move to structs as opposed to UObjects, as I could not get the UObjects to replicate correctly/consistently to clients either. I read through some posts here (by the guy who wrote the replicating subobjects article) that said that UObjects have a narrow use case and should really only be used when you need inheritance (I didn't, maybe you do), otherwise use structs.

sinful tree
# elfin lintel Would an asynchronous game usually use a dedicated server then? Or is there pote...

If you're using a listen servers, the best you can do is rely on that listen server storing the data, which means that you'd always have to connect to that same server (if it's available, since it is a listen server indicating that someone is hosting while also playing). Even if you were attempting to just save for a specific player in the cloud using some means of authentication, that one specific player could still spoof whatever data they may be sending into their save, so then you're opening up a big avenue for cheating.

If you want any sort of data integrity, for players to play any time with that data, and to limit cheating, then you must host the servers yourself.

#

They could be simple spot instances with minimal power, if that is all it requires.

pseudo schooner
# sinful tree Whats the data being used for?

I use these objects for several different things. Inventory, equipment mesh details, calculated stats, stat modifications on the player, calculated damage and tracking, and a few other things. They all contain structures of data that the Uobjects calculate and store

quasi tide
#

Use that information how you please

sinful tree
quasi tide
#

#rekt

sinful tree
#

But, listen servers on that .... yea, same kinda problem.

pseudo schooner
# elfin lintel I've had the same problem recently and decided to move to structs as opposed to ...

Yea I just moved FROM structs to UObjects. I converted a ton of systems before I realized that UObjects just simply do not replicate. Now that I've used UObjects, I cannot possibly go back to just using structs, the amount of flexibility, reliability, readability you get out of the UObjects is just unmatched. Structs are just a nightmare to alter and maintain. I'm currently attempting to force replication on UObjects, but if that fails then I may have to just create the UObject on both the server and the client, then replicate a Struct with build data into that UObject. It's a bit more work but it'll replicate fine

elfin lintel
grave lynx
#

Hey, I've got an issue after teleporting players. everything all right for the server (of course lol), but for clients, all other players, they are stuck in falling anim state. I tried to use Reset anim instance Dynamics (Informs any active anim instances (main instance, linked instances, post instance) that a dynamics reset is required for example if a teleport occurs), but still same result. Do you have any idea?

elfin lintel
#

Side note, I wish I had found this community earlier. It's pretty incredible how much people are willing to help.

elfin lintel
sinful tree
# elfin lintel What is an example of how UObject is so much better for you in your use case?

Inventory: You can store an array of objects. Each of those objects can have their own sets of data, but still be stored in the array if they inherit from say an "Item" base class.
A structure based Inventory can't do this. You pretty much have to define all the data that would be present in the structure, though there are ways around this like using map variables or nested array structures that can be used to house generic data.

pseudo schooner
# elfin lintel What is an example of how UObject is so much better for you in your use case?

I several, honestly. I have DataTables that I keep general build data in, then at runtime I pull the appropriate row and populate a UObject. Items are randomized so I have a randomizer that populates all the mesh data, combines the random color data, gets the randomized stats data, and packages it into one reference object. Then I have modifiers that can be applied to those items, and using a UObject literally just means I can add a modifier UObject into the item and the item keeps that upgrade information. Then when I spawn an ability I calculate all hundred or so stats against the item properties and I create a damage object to store all the instanced calculations so I can pass that to all the various systems that read it. My abilities also have the ability to be altered by other players, and UObjects make that a BREEZE to adjust during run-time. I was doing all this with pure structs, but it was an absolute clusterF. Then those abilities contain effects and conditions that apply to the character and they have variable tick rates, damage amounts, damage types, etc. UObjects contain all that data and I don't have to worry about updating a huge series of structs

fluid summit
#

Hi! i'm trying to apply time dilation effect when i hit a creep (similar to what black desert does on Hit)
Does anyone know what is the best way to achieve this on multiplayer? i can't dilate time for everybody when I hit a creep

sinful tree
fluid summit
#

sounds good, gonna try it

oblique river
pseudo heath
#

probably a very noob question but is there a component that i'm certain that is the server? i need to do a multicast and i know that it only works if it is the server sending it, how can i do it?

sinful tree
pseudo heath
#

if it can help i wrote before today, I even sent a video of my very simple project

crystal crag
#

Even for FFastArraySerializer, don't you have to mark its properties with UPROPERTY(Replicated) ?

#

and also the underlying list entry type's properties that are to be replicated with UPROPERTY(Replicated) as well?

sacred coral
# oblique river

ty for this, i also got an extended answer/solution from epic evangelist, with specifics of how to approach and alter lyra code to achieve possession/unpossession in the most pain free way, i'll try to implement it this weekend and share with community if it works

pseudo heath
sinful tree
pseudo heath
sinful tree
#

The issue you have is that replicated actors will have events that also fire on clients.

#

So you need check the events themselves to know if you're running on the server or not for most actors, and you can do that VIA the boolean IsServer.

pseudo heath
#

ok

sinful tree
#

Has Authority is another one commonly used, but it's not a great one to use if you're using listen servers.

pseudo heath
#

yeah I checked the IsServer and it was vey useful

#

so Has Authority basically set what I put after on the server?

sinful tree
#

Has Authority is a check for if something has authority over the actor, but it's not a good means to know if it's the server or not because if you spawn something locally on a client, they have authority over that actor, not the server.

pseudo heath
#

mm ok

#

so if i make the game mode spawn something can i use it as a way to communicate between the client and the server in order to make the multicast on the server because of something "asked" by the client?

dim trail
#

Has anyone here been able to get replication working for simple move to without just RPCing it or using an AI controller

pseudo heath
#

anyway thanks a lot because i am learning a lot of stuff

pseudo heath
dim trail
#

@sinful tree this is not how simple move to works

#

It uses pathfinding/navmesh

#

Honestly, I don’t think there’s a way to do it at all in BP, you would have to make some changes in the CMC code

#

But I can’t find any examples at all of anyone accomplishing it, all they say is “I did it” without actually explaining how, or they misunderstand how replication works and they just RPCd it or they don’t even use navmesh movement

pseudo heath
#

btw i am not trying to do the SimpleMoveTo ops

#

i have problem with replicating the rotation of a component of a character blueprint

sinful tree
# pseudo heath so if i make the game mode spawn something can i use it as a way to communicate ...

I don't think you're fully understanding.
The class of a blueprint doesn't determine if it's something that runs on server or not, with the exception being Game Mode which most definitely only ever exists on the server.
Just because it is the only class that exists exclusive on the server doesn't mean you need to use it to perform all server related actions.

Example:
I have a character. On Begin Play of that character, for whatever reason, I want the server to set a replicated integer to 5. All I would need to do in this case is put a "IsServer" check on begin play, and if true, set the variable to 5.

Second Example: Lets say after the player has pressed the "Shoot" button, I want a projectile to spawn that everyone sees. If I proceeded to spawn the projectile off of the Input event, the projectile would only exist on the client that pressed the button, not anyone else. In order for everyone to see the projectile, I would need to do a Client -> Server RPC as the "Shoot" input event only triggers on the client. Once we've RPC'd to the server, we know that event now is running on the server, and the server can proceed with spawning the replicated projectile actor, and everyone can see it.

Third Example: Borrowing from the above example, now I want to play a sound effect when the projectile is fired. We don't necessarily want to do this on BeginPlay of projectile (there are reasons why you don't want to, but I'm not going over that right now), but we can do a Multicast immediately after we called to spawn it as we already know we're running on the server, and that multicast event can then play the sound effect.

Fourth Example: We want a sound to play after a barrel is hit by the projectile. We have an overlap event that we can use, but the difficulty is, this event triggers both on clients and on server. We need to use the IsServer check to know we're running on the server. Once we know, we can destroy the barrel, and multicast for the sound effect.

#

So regardless of what actor, you can perform networking, so long as it is a replicated actor. It's a matter of you knowing where you're running on the server or not. You have to make your own checks and put the logic in where you want it to happen.

sinful tree
dim trail
willow garden
#

are there any braindead solutions to prevent a physics object from nondeterministically falling through the floor in a networked game?

#

they don't have nearly enough velocity to be skipping the collision check but nevertheless they sometimes fall through in actual online play (can't repro it in the editor/standalone against myself)

latent heart
#

Have you tried adding fake lag?

#

(to test it)

willow garden
#

oh that's a good idea

formal knot
#

Yo guys struggling a bit, with a flashlight using the control rotation dubbles the pitch movement. And theres not much of an other way to replicate the flashlight pitch 😕

#

Is there a fix for this?

tall dragon
#

I know that the DemoNetDriver can be used to record gameplay and playback saved game recordings, or use in memory to do instant replay. But, is there a natural way to use this system to create 'ghost' actors? This would be something similar to the way that racing games have ghost cars of your prior runs that you can race against.

rancid monolith
#

How do I override an RPC? Do I need to re-declare the _Implementation functions?

#

or is it as simple as doing 'void Client_MyRPC() override;' and I have something else wrong

fathom aspen
#

And in case you're calling Super you call it with _Implementation

sinful tree
pallid canyon
#

Whenever I openlevel(this, IP, true, "") my client attempts to open the server IP with the default map path appended. Why isn't it opening the server IP with the current map path like everything I read says it should?

fathom aspen
#

Doesn't sound like it should behave this way

#

First of all don't travel in PIE

#

Second of all this:

pallid canyon
#

It shouldn't behave this way lol, I worked through this like a year ago and am now finally at the point of deploying for real world use, didn't have problems back then.
Server is deployed in AWS, I'm running a packaged debug build from my headset

fathom aspen
#

Packaged, heck.

pallid canyon
#

Server is running the map I expect, oculus headset does all the internet stuff to get back the server in question, and browses to the serverIP+\defaultmap instead of the serverIP+\currentMap

sinful tree
#

I guess there's no real means of validating the server is actually running the appropriate map? Open Level to an IP should just ya know, join that IP at whatever level it's playing at.

pallid canyon
#

the server build is debug too, so I have it sitting on "took xxx seconds to load 'expected map'"

#

I would assume it's running the right one, theres no change in the logs and it's also the default server map

sinful tree
#

So when the client is joining, it still just sits on "took xxx seconds to load..."?

pallid canyon
#

no, it gets all the way through its normal processing

#

sorry didn't mean to add confusion

sinful tree
#

S'all good, this is decent info for trying to figure this stuff out 🙂

pallid canyon
#

and all my oculus specific processing happens after map load too, so it should definitely be chillin on the server default map and waiting for clients

sinful tree
#

Any indication in the logs that the client left the server? Like perhaps it's failing to actually join, so then it's getting kicked back to a default map?

pallid canyon
#

the only indication of anything occurring is on client side logs, where it says successfully connected to port 7777 on the default map

#

it's like the information it's getting back about the server is wrong? I don't know how to better put that.
Game starts->asks oculus for my server IP->pass that into openlevel(ip) and the first level it tries is the default map

#

and not server map

iron crest
#

Ive got a quick question, I figured out that if I want to play multiplayer with people around the US and world in general I need and online subsystem, currently I implemented steams online subsystem, I followed the documentation online to put it in, when I dont package the game and Launch the project, the steam thing shows up and everything, but when I package it and play it doesnt show the steam overlay etc, does this mean that the online subsystem doesnt work when packaged, really im just trying to getit so I can join anyone through the subsystem

pseudo schooner
iron crest
dim trail
sinful tree
dim trail
#

id doesnt work for me, only when playing as server

sinful tree
#

Did you set the allow client navigation in the project settings?

dim trail
#

yup, i am getting an odd error though, its accessing none on get controlled pawn

thin stratus
#

That's expected when looking at the code example

#

The Controller will not have a valid pawn on BeginPlay I guess. At least not instantly on the client

#

You will have to check if the ControlledPawn is valid

winged juniper
#

@sinful tree or anyone could you help me with this? Why character movement not replicated for itself but on server and over network when I use "Simple Move To Actor"?

fathom aspen
#

Read the compendium fast

#

Found in 📌

sinful tree
#
  1. You can't use GetPlayerController in multiplayer unless you somehow manage to keep track of all the player indices (it's not worth it!)
  2. GameMode only exists on the server, so having an event marked as "Run On Server" in the game mode effectively does nothing and no clients can communicate with it.
  3. OnPostLogin fires for each client that joins the game and gives you a reference to their player controller. I'm not sure why you'd loop through all the spawned pawns and make everyone respossess when someone joins. You can use the OnPostLogin event to actually spawn a pawn for that player and then possess it, otherwise, you'd have to loop through all the pawns, check if they are already player controlled, and if not, then allow that player to possess that one (again using the New Player pin which is their controller)
sinful tree
winged juniper
formal solar
#

Hi people, I'm having trouble with servertravel and getting servertravel to work. Seems to only be executing on server. I have the actual consolecommand running inside a server event but I thought the command was supposed to teleport all connected players?

#

hmm it works in standalone actually, just extremely slow

iron crest
#

Hello, I have a question, I noticed that when running multiplayer (Both players client) the character customization does not work, I tried messing around with the custom events and the cast modes but nothing seems to work in my favor, here is my code, any help is appreciated, thank you.

hybrid crown
#

Little question : I've got this replicated properties

UPROPERTY(BlueprintReadOnly, Replicated, meta=(ExposeOnSpawn=true))
ABL_ItemMaster* Item;

.cpp
DOREPLIFETIME_CONDITION(ABL_ObjectVisualiser, Item, COND_InitialOnly);

Sometime, on some rare case, when a player load the map and join the server, the Item is = nullptr for some frame when the actor is created (and the update happening AFTER the creation on the client)
As i need this property to be valid on the actor spawn, how to ensure this ?

sinful tree
# iron crest Hello, I have a question, I noticed that when running multiplayer (Both players ...

Anything that is stateful should be handled through replicated variables with notify (OnRep). You use the generated OnRep function to perform what you need with the variables being changed.
So if you were allowing a player to tell the server what mesh they want to use, you'd need to do a Client->Server RPC with the client providing the server the mesh number, the server then would set the value into the replicated variable, and then the OnRep would set the skeletal mesh based on the selected number. Saves you from having to create a whole bunch of functions for every choice too.

pallid canyon
#

And the other answer is also that I'm an idiot 🙂

sinful tree
#

Hey glad you were able to figure it out.

pallid canyon
#

Me too lmao

fathom aspen
fathom aspen
hybrid crown
fathom aspen
hybrid crown
#

Yup.

fathom aspen
#

Oh then that's not the case.

#

You can't guarantee it has replicated in time

#

It's not a subobject

hybrid crown
#

yeah so rep notify i guess.

fathom aspen
#

Correct

hybrid crown
#

Understood, thanks !

#

fun fact

#

got the same issue on the Owner of the actor.

#

I guess it's cause the way actor are spawned on the client, are not hierachical.

fathom aspen
#

Yeah you have no guarantee whatsoever for different actors

#

It's wild I know 😅

#

Will that get sorted out in Iris? I doubt

hybrid crown
#

Yeah it's a bit weird

#

i would assume, AT LEAST, the owner would be replicated with the actor spawn itself.

formal solar
#

noticed lag is a hella lot worse in standalone - or not so much frames more like movement snapping, need to fiddle with settings

acoustic thunder
#

How would one create a multiplayer game that works over WAN with blueprints for Android?
I know that the players could use the same VPN but Im hoping that there is something similar to the Steam Subsystem for PC

fathom aspen
#

That isn't even the case

#

Say you spawned your pawn and then your weapon which has the pawn as owner

#

You are not guaranteed Owner will be valid when weapon replicates

#

Usually that is the case cuz you don't spawn the weapon right after the pawn, and so the pawn has already replicated

#

And you always have OnRep_Owner 🙂

hybrid crown
narrow nacelle
#

this player array in game state is replicated right?

#

i'm trying to create a list of players in a lobby, if this is synced on all clients i can put player profiles in the player state and retrieve stuff from other players to display in the lobby user interface

versed thorn
#

I have ACharacters possessed by AIControllers, is it possible for them to have WidgetComponent use different Widget blueprint depending if Client's PC is ally or enemy?

still owl
#

Hello!

Has anybody managed to get beacon host and client to connect while using EOS OSS?

I've searched and followed the very limited amount of tutorials / info on beacons and have not yet been successful.

fathom aspen
fathom aspen
versed thorn
#

it can be ally to one Player and enemy to other

#

I got 2 teams, I want different over head displays for ally/enemy

narrow nacelle
#

get a reference to player's pawn and decide on which widget to show

#

or the reverse would be better probably

fathom aspen
#

Then you should have the notion of teams set up

narrow nacelle
#

the widget switching logic should execute on the owning client i think

versed thorn
#

no client owns them

#

server spawns characters

#

characters assigned team number

#

how do I get Clients to "see" different widgets?

fathom aspen
#

Have a team property replicated, tied to an OnRep. The OnRep is called for each connection on client. You can get the PlayerController(0) there and check if they are on the same team or not and show the right widget accordingly

#

It's showing client-side so it will be different for different clients

versed thorn
#

is PlayerController(0) always current Client?

fathom aspen
#

On client

#

Yes

narrow nacelle
#

no other PC's exist on clients

fathom aspen
#

I tend not to use it, but it's one of the few good uses to it

versed thorn
#

I see, thank you

narrow nacelle
#

i'll print cedric's compendium and worship it

formal solar
#

On multiplayer standalone testing, if I try to move or resize any screen too early, it causes insane lag and sometimes crashes of clients

formal solar
#

but who is he

twilit radish
#

Also I finally have enough storage space to download a source build and build a dedicated server 😂

opal fox
#

any great ideas for this case? :
have a dedicated server running a map,
connect with 1 player that is setting his name and then replicating a nameplate to show others on the server their name.
connect with 2nd player, they cant see the name of the other player until next time the name replicates.

Is firing some sort of update event when people connect a good idea?
Other tips?

twilit radish
#

How are you replicating their name though? Is the issue that there’s a small time frame of probably less than a second where you can’t see their name or is it much longer?

opal fox
#

just using a repnotify and updating it in a widget

#

but i dont have a persistent state yet where i could constantly get a name from, so its fired in 1 event

#

but that event istn fired for other clients if theyre not connected on the server

#

so they wont get any updates about any namechanges

#

I was thinking to make it some sort of event in the gamestate, and on connection to the client fire it

twilit radish
#

But why do you need a separate event if you already have a rep notify? Once the client connects to the server I assume it passes on the name, from that point forward you can just store that in a replicated variable and then clients that join receive it automatically because it’s replicated.

opal fox
#

so its a nameplate that another player is showing to me

#

and if im not on the server once he updates his name

#

when i login i dont have this update

#

cause im not asking for an update on login

#

if om on the server when he connects and sets his name then its all good

twilit radish
#

But that’s exactly what replicated variables are for. If I rejoin the server and you have properly setup the replicated variable the server will pass that onto the joining client 🙂

opal fox
#

a repnotify only happens if the variable is changed

#

so me login in doesnt change that variable

#

unless i set it up that way

twilit radish
#

It does not for newly joining clients. The server passes that name again to make sure everyone is in sync.

opal fox
#

i was printing the repnotify it doesnt update when i login

twilit radish
#

Can you show what your setup is?

opal fox
#

think the issue is that im currently setting the name from a widget on a connected client

#

then i need to multicast the update in the widget for other players to be able to see it in the widget

#

i made this test to try and do this from a client

#

from a widget which has an inputfield

#

the first event is called from a widget, which is client only

#

so i use the owner of the widget to make that first call

#

if other players arent connected when this is fired they dont get any updates

fathom aspen
twilit radish
#

Also I'm booting up Unreal to show what I meant, Belzebub.

#

May take a few minutes lol.

opal fox
#

@twilit radish yes, but do u see the issue here?

#

I know that I could probably do it differently with a login screen or something and do this in playerstate or something before

twilit radish
#

I see the issue yes, but that's why I'm saying use replicated variables 😉

opal fox
#

but im just messing abuot here and trying to do some stuff

#

yeah but this is a replicated variable

twilit radish
#

There's absolutely no need for a multicast in this scenario.

opal fox
#

if i dont multicast there then the other client cant see the name

#

and the first client

#

can see that name on both clients

#

on both players

#

i mean

#

its as if that variable doesnt have its own instance of itself for some reason

twilit radish
#

That's why you use the OnRep to get notified whenever it does update, like I said Unreal replicates the variable again to clients that just join. Otherwise it would be absolutely impossible to persist state without so much pain.

opal fox
#

yes i understand this

#

but like i said

#

client 1 can see that name on both players

#

because its replicating that variable to both

#

so player 1 sets the name, and palyer 2 also gets that name

#

when im using a repnotify only

#

and then updating it in their respective widgets

#

and then client 2 doesnt see anything, cause his widgets arent updating anything

verbal horizon
#

I'm quite new to multiplayer and all, i seem to understand the basics.

Every tick i call a function to RotateClientToCursor then replicate the rotation, client controller and client character to the server with a custom event (i don't actually need the controller anymore but i haven't removed it yet) that custom event uses a multicast to set the player rotation and player character.

Is this the right way to do this?

#

It also seems i'm getting errors even though everything works fine and i can't quite figure out why i'm getting these errors nor what to do about them

(I'm aware these first two are about adding a movement input, which seems to work fine aswell.)
Blueprint Runtime Error: "Accessed None trying to read property CallFunc_GetPlayerCharacter_ReturnValue_1". Node:  Add Movement Input Graph:  PlayerMovementBrain Function:  Execute Ubergraph BP Player Main Controller Blueprint:  BP_Player_Main_Controller

Blueprint Runtime Error: "Accessed None trying to read property CallFunc_GetPlayerCharacter_ReturnValue_1". Node:  Add Movement Input Graph:  PlayerMovementBrain Function:  Execute Ubergraph BP Player Main Controller Blueprint:  BP_Player_Main_Controller

Blueprint Runtime Error: "Accessed None trying to read property CallFunc_GetPlayerCharacter_ReturnValue". Node:  Return Node Graph:  RotateClientToCursor Function:  Rotate Client to Cursor Blueprint:  BP_Player_Main_Controller

Blueprint Runtime Error: "Accessed None trying to read property CallFunc_GetPlayerCharacter_ReturnValue_1". Node:  Return Node Graph:  RotateClientToCursor Function:  Rotate Client to Cursor Blueprint:  BP_Player_Main_Controller

Blueprint Runtime Error: "Accessed None trying to read property K2Node_CustomEvent_ClientCharacter". Node:  Set Actor Rotation Graph:  EventGraph Function:  Execute Ubergraph BP Player Main Controller Blueprint:  BP_Player_Main_Controller

Blueprint Runtime Error: "Accessed None trying to read property K2Node_CustomEvent_ClientCharacter". Node:  Set Actor Rotation Graph:  EventGraph Function:  Execute Ubergraph BP Player Main Controller Blueprint:  BP_Player_Main_Controller

Blueprint Runtime Error: "Accessed None trying to read property CallFunc_GetPlayerCharacter_ReturnValue_1". Node:  Add Movement Input Graph:  PlayerMovementBrain Function:  Execute Ubergraph BP Player Main Controller Blueprint:  BP_Player_Main_Controller

Blueprint Runtime Error: "Accessed None trying to read property CallFunc_GetPlayerCharacter_ReturnValue_1". Node:  Add Movement Input Graph:  PlayerMovementBrain Function:  Execute Ubergraph BP Player Main Controller Blueprint:  BP_Player_Main_Controller

Blueprint Runtime Error: "Accessed None trying to read property CallFunc_GetPlayerCharacter_ReturnValue". Node:  Return Node Graph:  RotateClientToCursor Function:  Rotate Client to Cursor Blueprint:  BP_Player_Main_Controller

Blueprint Runtime Error: "Accessed None trying to read property CallFunc_GetPlayerCharacter_ReturnValue_1". Node:  Return Node Graph:  RotateClientToCursor Function:  Rotate Client to Cursor Blueprint:  BP_Player_Main_Controller

Blueprint Runtime Error: "Accessed None trying to read property K2Node_CustomEvent_ClientCharacter". Node:  Set Actor Rotation Graph:  EventGraph Function:  Execute Ubergraph BP Player Main Controller Blueprint:  BP_Player_Main_Controller

Blueprint Runtime Error: "Accessed None trying to read property K2Node_CustomEvent_ClientCharacter". Node:  Set Actor Rotation Graph:  EventGraph Function:  Execute Ubergraph BP Player Main Controller Blueprint:  BP_Player_Main_Controller
pseudo schooner
#

Hey does anyone know off the top of their head if structs replicate data that has not changed? If I have 10 variables and I update 2, are just the 2 updates sent or are all 10 variables sent?

fathom aspen
#

Just the 2

#

They don't replicate atomically unless you make them so

#

Just don't use the editor

#

Launch standalone from cmd or uproject

sinful tree
sinful tree
#

No multicast required.

runic cairn
#

So if another client knocks you back (i.e. LaunchCharacter), is there anyway to have the local client do so without network corrections? Or is that just impossible since the local client cannot predict it?

sinful tree
# verbal horizon Yup i think so

Rather than using GetPlayerCharacter, use Get Controlled Pawn. As this function requires you to have a possessed character, it's likely happening that your character isn't replicated yet when this function is firing. Use an IsValid check on the controlled pawn before calling the function.

verbal horizon
#

i honestly didn't think about that lol

#

but it makes sense

crystal crag
#

What ini setting do I have to set to stop the game client from almost instantly disconnecting because I hit a breakpoint in the dedicated server?

#

I am in there for like 5 seconds and the game client disconnects

faint parcel
#

I'm having problems debugging my animations in a multiplayer game. I have a Blend Poses node that thakes an enum to switch between different animations. When I switch debug object to either client or server version of the problem character, either seems to have value "3" which is the correct enum value. The animation is wrong though, and if I unplug the variable enum input and just "hard-code" it to the correct value "3", then it looks correct; it works like it is supposed to.
Is there a way to get the actual value out of a server animation blueprint while playing as the client?

sinful tree
# verbal horizon I'm quite new to multiplayer and all, i seem to understand the basics. Every ti...

Oh yeah, I also wouldn't pass the character/controller through to the Run On Server event - the server already knows the controller (as it's the object you're working on) and it can retrieve the controlled character from here. If you allow players to pass in whatever character they want in the RPC, you're allowing the player to tell the server to rotate whoever the client chooses as someone with knowhow can spoof the RPC call.

sinful tree
verbal horizon
#

😢

sinful tree
#

Here's the thing...
Your controller only exists on the client and on the server, so other clients aren't aware of other player controllers.

#

So a multicast in a player controller effectively does nothing other than fire on the server and the owning client.

verbal horizon
#

i mean it seems to work but honestly i don't understand half of the things ngl :/

#

it makes sense but it doesn't if you get me lol

sinful tree
#

Well, if you're setting an actor rotation on the server, that usually replicates down to everyone else already.

verbal horizon
#

uhhh

#

if the player controller is on the server then i suppose so?

sinful tree
#

You're setting the character rotation.

verbal horizon
#

oh

#

right

sinful tree
#

So that would get replicated.

#

But there's no real reason to do a multicast on tick then.

#

Normally input goes:
Player Input -> Client->Server RPC -> Server Does stuff.
So if you want to, on tick in the player controller, do a HasAuthority>Remote path, and do a Server RPC with the desired yaw input (from the part in the below screenshot). Then the server handles the rest on its own. Also make sure you're not using GetPlayerCharacter when running on the server as then you're referring to a specific character, if you're in the controller, you can just use "Get Controlled Pawn"

#

Should look like this:

#

Aaaaand after testing it, even that doesn't work. You'll need a multicast in your character 😛

verbal horizon
#

haha

sinful tree
verbal horizon
#

love this

#

oh i am using a listen server btw

#

lol

verbal horizon
sinful tree
#

This is here just so that the server isn't also running the same tick function on everyone's player controller.

verbal horizon
#

doesn't seem to run at all KEKW

verbal horizon
#

and i learned something :P

woeful jacinth
#

So, just joined project to help with general programming stuff and I have the AWS EC2 dedicated server running and in an attempt to connect, I show now logs or network traffic.

#

there are my client logs from the packaged build I was connecting from. It is odd since it seems to be calling the proper port and public ip of the dedicated server on the ec2.

#

Logs from the server show nothing odd or even a sign of a connection attempt. Been looking at the bug for a couple hours and no luck; AWS connection traces come back positive form gateway to instance.

sinful tree
#

Probably firewall issue / ports not properly forwarded?

woeful jacinth
#

My main AWS/UE4 experience is with GameLift, im very dated on the new setup for the EC2

#

ahh possibly on my end

#

nah, knocking down my security did not work :/

woeful jacinth
sinful tree
#

What about on the EC2 instance?

woeful jacinth
#

firewall disabled, still the same output log of a timeout

sinful tree
#

The server's IP is reporting port 7777 is closed.

sinful tree
#

And is it a windows or a linux instance?

woeful jacinth
sinful tree
# woeful jacinth windows standalone ye, was set up by the previous dev

You probably need to configure the instance itself to allow connections to port 7777. I can't really guide you to it, but it would be in the AWS EC2 instances manager. I know it allows you to add a security group that allows you to set up what ports are opened when launching an instance.

#

Like I can add this port here (though I think its UDP, not TCP you need to use)

fierce grove
#

hello guys,
I'm having fun working on a Node / socket.io server these days. Most of the things are working fine.
One question I have is:
I have a train moving that should be sync between all players
Have a timer server side that keep track of the train progress.
When connecting players get the actual position of the train.

My question is should the train be a sequence / a a spline (with a timer event) ?

the sequence is a good option but framerate is quite varying between pcs I guess

finite willow
#

I have a question regarding fast TArray replication hopefully someone might be able to help me with. I setup my 2 structs and everything works great. When I call MarkItemDirty() after adding an item the PostReplicatedAdd() method is called. All good until then.
The TArray is inside a struct and is normally replicated:

  UPROPERTY(Replicated)
  FLWDInventoryList InventoryList;

This works all great.

Now my question is: Can I have a replicated TArray of structs with the fast TArray replication? Basically just instead of one struct that is replicated do this:

  UPROPERTY(Replicated)
  TArray<FLWDInventoryList> InventoryLists;

My main problem here is that if I now update one struct and call MarkItemDirty() the PostReplicatedAdd() will no be called this time. Even if I force a replication on the TArray of structs by changing any other member variable.

I did search for the problem and I found a lot of questions and answers about fast TArrays but unfortunately nothing did really answer my question yet. At least I am not aware of it.

https://docs.unrealengine.com/4.26/en-US/API/Runtime/Engine/Engine/FNetFastTArrayBaseState/

===================== NetSerialize and NetDeltaSerialize customization.

fathom aspen
#

You can do what's said in NetSerialization.h. FTR is already an array of structs.
Any maneuvers to what is said there will probably end up in things not working as you want. For example if you look at the callback functions signatures they are expecting a struct and you are giving them an array of structs, so I have no idea what you're expecting there.

fathom aspen
finite willow
#

Yeah exactly. I am not quite sure of that kills the purpose of fast arrays in the first place...

#

I am building an inventory similar to World of Warcraft where you have bags. So my first approach was to have a fast array struct for each bag

fathom aspen
#

I can see it as you only want to encapsulate a bunch of FTRs together but I'm not sure what's the purpose of that

finite willow
#

But now that I think about it maybe that's a bad idea all together. If I just use one fast tarray with a flat list of inventory items and the bag and slot index inside the struct I can easily populate the bags as well. Maybe I was over engineering that

fathom aspen
#

Right. Much simpler approach, and much more maintainable. I'm still wondering why you didn't get callbacks shrug

finite willow
#

I get the callbacks if I just replicate one struct. If I access the struct within a replicated TArray I don't get the callbacks. This is what I didn't understand. Basically I call something like InventoryItems[0].AddItem(itemToAdd) and within the AddItem function I call MarkItemDirty at the end but the callback is not firing.

#

Doesn't matter now. The new approach is much cleaner as you said.

#

thank you for making me overthink this

sharp hound
#

Hi everyone, I have a oculus game in development. Can I destroy the session simply when the user exits from the game or do I have to create an exit button? Thanks

twilit radish
#

I mean, ideally both I guess? You probably want to if possible always nicely clean up the connection / state. People can force the game to exit but a nice quit button is also good to have (maybe even necessary? Meta/Oculus have certain requirements for apps, might want to check that out!)

storm bough
#

Question. I noticed it is possible to join session even if it is full (simplest way to reproduce is find session when not yet filled and then wait until it is filled by other players). How to deal with that?

mild urchin
#

Hello everyone I have a question about OnRep_Playerstate in APawn. If I add a variable called TeamNumber to my Playerstate, how come OnRep_Playerstate isn't called when TeamNumber is replicated ? Is it possible to force to call OnRep_Playerstate once TeamNumber is replicated to all clients ? Thanks guys

manic agate
#

Replication question: if an Actor X is replicated and contains several replicated properties inside, and a client joins later (so, a late join scenario), when X is spawned on the client is it guaranteed that ALL of its properties are already replicated and valid?

Suppose X has a "InitialOnly" replicated property: in the BeginPlay() can I safely use that property knowing that a late joiner will have it filled already by then?

fathom aspen
fathom aspen
chrome phoenix
#

hello, i'm getting this warning in logs when trying to open level & the level never loads : [2022.09.04-22.11.04:375][686]LogNet: Client netspeed is 100000
[2022.09.04-22.11.04:409][687]LogNet: Join request: /Game/Maps/ThirdPersonMap?Name=kingkostia123?SplitscreenCount=1
[2022.09.04-22.11.04:411][687]LogNet: Join succeeded: kingkostia123
[2022.09.04-22.11.04:411][687]LogReplicationGraph: Warning: No Replication Lists were returned for connection
[2022.09.04-22.11.04:442][688]LogReplicationGraph: Warning: No Replication Lists were returned for connection
[2022.09.04-22.11.04:474][689]LogReplicationGraph: Warning: No Replication Lists were returned for connection
[2022.09.04-22.11.04:508][690]LogReplicationGraph: Warning: No Replication Lists were returned for connection
[2022.09.04-22.11.04:541][691]LogReplicationGraph: Warning: No Replication Lists were returned for connection
[2022.09.04-22.11.04:574][692]LogReplicationGraph: Warning: No Replication Lists were returned for connection
[2022.09.04-22.11.04:607][693]LogReplicationGraph: Warning: No Replication Lists were returned for connection
[2022.09.04-22.11.04:640][694]LogReplicationGraph: Warning: No Replication Lists were returned for connection
[2022.09.04-22.11.04:672][695]LogReplicationGraph: Warning: No Replication Lists were returned for connection

#

anyone have an idea?

mild urchin
mild urchin
fathom aspen
#

PlayerState

#

Oh it's private then you need to get it

#

You already have the function there

mild urchin
#

Yeah but if I have a few players

#

each instance of Character is gonna call this with their own Playerstate no ?

fathom aspen
#

Correct

mild urchin
#

that's my problem 🥲

fathom aspen
#

I don't see it

mild urchin
#

well when onrep_playerstate is triggered on each client for one playerstate

#

each client is gonna call SetPlayerTeamSkin with their own player state instead of the one who just got replicated ?

#

Or am I misunderstanding how OnRep works

#

maybe i should mention that I want to compare the client's playerstates between each other

fathom aspen
#

OnRep is called for each connection unless you have conditions

#

Maybe you should mention what are you trying to achieve

#

Like from up top

mild urchin
#

okay i'll explain

#

so my game has 2 teams

#

when you enter you're greeted with this screen

#

this will assign you to a team and i'm trying to outline the teammates in the world

#

so to do this I need the team number

#

which is stored in my player state

#

this is my code for the teamNumber in my player state

#

after the ForceNetUpdate it calls the OnRep in my character again

#

so thats good

#

Then in setPlayerTeamskin i wanna compare the controllers playerstate team with the playerstate that just got replicated

#

and that's the part where i'm not too sure

#

hope that makes sense

sinful tree
#

If you're OnRepping the playerstate, that's happening on the character that's had its playerstate replicated. From that OnRep you can do whatever you want in regards to that particular character, and it'll happen on all clients for that character.

mild urchin
#

I see so i'm only doing it for one ...

#

any idea how to compare that playerstate with all the other characters ?

sinful tree
#

You don't need to.

mild urchin
#

oh so what I did is correct ?

sinful tree
#

I join the game, my playerstate gets replicated. All clients receive the OnRep for my playerstate on my character.

mild urchin
#

okay

sinful tree
#

Similarly, I would receive the OnRep for everyone else's playerstate, so then I run the OnRep for all their characters.

mild urchin
#

yes but I don't see how that solves the comparing part

kindred widget
#

The more important question is why do you think you need to compare this playerstate with another one?

mild urchin
#

In order to differentiate the players between the 2 teams so that I don't show an outline on an enemy player

kindred widget
#

How do you track teams?

mild urchin
#

I have an int in my playerstate that I assign once i click on either of the buttons above

#

these ones

kindred widget
#

You don't need this OnRep then. You need an OnRep for that property in your PlayerState.

mild urchin
#

yeah I thought about that however there's a problem

#

it's gonna be too early and the character won't be instanciated by then

kindred widget
#

You're going to find that there's a ton of correlation to the functions you'll call in OnReps and on Beginplay. Basically your PlayerState has this value, you set it. This needs to call an OnRep that gets the PawnPrivate and calls the skin function on it. The PawnPrivate OnRep probably needs to do the same, and the character's Beginplay and it's PlayerState OnRep also probably wants to try to grab the PlayerState's team value and set it. All four of those functions will cover most cases of the data arriving on client in various ways and eventually you'll end up with the correct view.

mild urchin
#

okay gonna try and cover these cases, thanks for your help !

#

I just don't understand why onrep_playerstate isn't called when one of it's variables is updated. Or why there isn't any way to force it to update

#

like a second time I mean

kindred widget
#

The OnRep is per property. The property for OnRep_PlayerState is a pointer to the player state associated to that pawn. So this pointer isn't going to change until the playerstate is destroyed, or it's set to something else on the server and then replicated.

mild urchin
#

okay that makes sense

#

if I add a delay everything works but I feel like it's kind of a cheap solution

fathom aspen
kindred widget
#

Oh. Huh.

fathom aspen
#

There could be cases ofc as @kindred widget said, but I guess the said function covers them all. Considering OnRep is called for each connection, I would do the comparing part like this:
GetPlayerController(0).PlayerState.Team == GetPlayerState().Team

#

That's ofc inside Pawn::OnRep_PlayerState @mild urchin

#

I would stick this logic to the pawn as it can become not relevant

kindred widget
#

Also be careful with GetPlayerController0 if you're running Listenserver with seamless travel.

#

Landmines everywhere.

fathom aspen
#

Haha right right

mild urchin
#

well to be honest @fathom aspen that's already what i'm doing

fathom aspen
mild urchin
kindred widget
#

Thankfully getting the local controller from GameInstance is safe.

mild urchin
#

does it make a difference ?

fathom aspen
#

Nope. But we didn't see what you did there so I supposedly said you didn't ^^

#

You could show us ofc

mild urchin
#

true sorry should've mentioned

kindred widget
#

Personally. I wouldn't even pass the playerstate. The pawn has all of the information it needs to update itself. And I would also advise making this a BIE call. Blueprint tends to make it easier to designery stuff.

mild urchin
#

give me a sec i'll show you

#

for now i'm simply printing the team number and it is incorrect without a delay

kindred widget
#

You don't need a single RPC here.

fathom aspen
#

What this has to do with what I asked for 😄

mild urchin
#

then i misunderstood what you were asking for

fathom aspen
mild urchin
#

alrighty

fathom aspen
#
void APawn::OnRep_PlayerState()
{
  Super::OnRep_PlayerState();

  if(GetPlayerController(0).PlayerState.Team == GetPlayerState().Team)
  {
      // set outline here on the `this` pawn 
  }
}
kindred widget
#

Realistically I don't think you need to call this anywhere other than the playerstate's OnRep_TeamID, and the pawn's beginplay. Pretty sure it'll cover most cases.

fathom aspen
#

Why are you printing?

fathom aspen
mild urchin
#

to make sure it's the correct team ID before i go further

fathom aspen
#

Nice. What it's telling you?

mild urchin
#

well I get 4 calls for 2 players and only one of them seems to randomly work

mild urchin
kindred widget
#

It can, but it doesn't need to be here.

fathom aspen
mild urchin
#

I can check sure but i'm pretty sure it's okay

#

controller calls gamemode

#

gamemode sets teamNumber

#

then playerstate

#

this is probably useless but anyway

fathom aspen
#

You can't expect us to spot the issue from a bunch of screenshots that have been cut. What you asked for has been given to you and from a bunch of different angles. See the debugger and never say I'm sure about something

#

Printing stuff doesn't help much

kindred widget
#

Well, part of the issue is that OnRep_PlayerTeam() needs to not ForceNetUpdate. As this is not on the server, so pointless. But instead do Cast<MyPawnType>(GetPawn())->SetPlayerTeamSkin()

mild urchin
#

I was simply replying because I need help and i'm not ashamed of that

fathom aspen
#

Ofc but learn to use the debugger

kindred widget
#
if (AMyPawnType* MyPawnPtr = Cast<AMyPawnType>(GetPawn()))
{
  MyPawnPtr->SetPlayerTeamSkin(this);
}
#

That needs to go in OnRep_PlayerTeam, replaced with your Pawn class name.

mild urchin
#

okay gonna try that out right now

#

amazing that works 😄

#

I didn't expect my pawn to be ready by then but awesome thanks !

kindred widget
#

Which is why you should put the same function in your pawn's Beginplay.

mild urchin
#

yupp was gonna do that straight away

kindred widget
#

Beginplay will run whenever the pawn is spawned on a client. This includes if the other player runs out of range, which destroys the pawn from relevancy, and then they reenter range. Can happen multiple times over the course of a game even if the pawn is never actually destroyed on server or other clients.

mild urchin
#

okay that's interesting

#

well i learned a lot thanks to this problem

#

thx again

short arrow
kindred widget
#

Yep. 😄

#

That's why you tend to call the same functions on Beginplay as many OnReps.

fathom aspen
#

Unless you make your pawns always relevant Evil_Patrick

young spoke
#

hello, question: I have a "UnitHandler" actor that i spawn on server from GameModeBase that I want replicated on all clients. if there are 4 connected players, each client's Level should have 4 "UnitHandlers". However, I want each client to be able to locate it's "owning" handler. ideally 3 of the UnitHandlers will have LocalRole set to SimulatedProxy, and the owning UnitHandler has role set to AutonomousProxy on each client box. Any ideas on how to do this?

young spoke
#

nvm. figured it out

fluid summit
#

Hi! in your experience, is it worth doing Niagara System collision for abilities? or just go with actor mesh? (On a multiplayer setting)

graceful flame
left heath
#

Ok I've been pulling my hair out all day with this. After building and publishing my game on steam, everything works! players can invite friends, and friends can join. Even on standalone I can load into games with Find sessions advanced. But for some reason after being built on steam you can only join off of friends presence and steam invites, but cannot join from "find sessions advanced". I cannot find a single video or forum post that addresses this specific issue, I have found ALOT for similar issues, but not this one. If any one has any pointers, or even a resource that would help me figure this out I would love you thank you :3

I'm using
blueprints
UE4.27.2
Advanced Sessions
Advanced Steam Sessions
DefaultEngineINI settings have been sextuple checked
My games unique App ID in the INI
Up to date Visual studio 2022
2 different PCs with 2 different steam accounts

vivid siren
#

Anyone have experience with VOIPTalker?
I have it working with Advanced Sessions (Using EOSPlus+Steam) but the VOIPTalker only works if I don't log in to Steam.
Once playing with Steam logged in, it breaks. Any ideas?

dim trail
#

how do MMORPGs and multiplayer games with dozens of players handle projectiles?

pallid mesa
#

The first question you gotta ask is: do you really need projectiles?

#

if the answer is yes, then you might want to ask yourself on-going questions like

#

how many projectile weapons do I have in my game?

#

what is their rate of fire?

#

if you don't have many projectile weapons then you might get away by using actors as projectiles

#

this is the model employed in fortnite, pretty much

#

the same technique can be used in case your weapons have a not so high rate of fire

#

it will be totally okay for you to use actors as projectiles

#

buut

#

what if your game is made out of projectile weapons with high rates of fire?

#

this solution will likely not work for you

#

and you'll need to invest time in another solution that handles projectiles as data

#

in a centric system, in which one single manager would hold the simulation of your projectiles

#

the next step is finding a representation for the data in the wold

#

i've seen people in the past using meshes, niagara particles, and a bunch of other representation methods

#

one technique that might become highly popular in unreal for projectile systems is using #mass

#

mass is Unreal ECS system and enables centric processing over cache aligned data

#

we do have a projectile sample in the MassSample project

#

more to come in Unreal 5.1

dim trail
#

@pallid mesa my game will have a high rate of fire, with many actors firing

#

is there any documentation on best methods for this

pallid mesa
#

not specific

#

but you can likely look at how mass works

dim trail
#

maybe only spawn the actor on the owning client and vfx the server projectile?

#

also, is this issue only if the projectile is replicated?

thin stratus
#

Did anything change about BP OnReps in UE5? I have an OnRep for an FString and in that I call a function that sets the OnRep (On the Server) to the same value, and it infinite loops.
Should the second call stop cause setting it to the same value should not call the OnRep?

#

I can prevent calling the OnRep, that's not the problem, but wondering why that suddenly shows up

fathom aspen
twilit radish
#

Conclusion: C++ 😛

latent heart
#

I would use a setter and check if the values are equal.

#

Just do that generally for every variable...

twilit radish
#

Also does anyone know what happened to the async physics tick system in UE5? Is that still planned for a future release?

#

Or well.. Planned to be developed further as from what I understood it was rather a WIP?

#

Would be really nice to have for multiplayer stuff 🙂

fathom aspen
#

Not that I'm following the news. Can you provide a link to what's that? eyes_hmm

twilit radish
#

They at some point announced to have an option with the physics engine for UE5 to run at a fixed interval, which for MP stuff would be amazing as you don't have to struggle with the madness of delta time. However they took the slight documentation it had down at some point and I've also not heard anything about it any more.

#

But let me see if I can still find a link or video or something.

fathom aspen
twilit radish
#

Of it ever getting finished you mean?

fathom aspen
#

Yes

twilit radish
#

🥲

fathom aspen
#

Considering that the engine was not built from the ground up to support it 🥲

twilit radish
#

They had code for certain stuff in the ue5-main branch, but most of that has never been into a release branch.

fathom aspen
twilit radish
twilit radish
fathom aspen
twilit radish
#

That's what I meant yes xD

fathom aspen
#

Wow that's amazing. We can always pray and hope prayge

twilit radish
#

Also I'm finally starting the insanity of trying to get a dedicated server to run 😂

fathom aspen
#

You can have a trip for two weeks and then check back on it

twilit radish
#

🤣

fathom aspen
#

Epic will make their steps after this voxel100

twilit radish
#

It's been downloading for a good 40-50 minutes now already yeah.

#

I was tempted to do it honestly x)

#

Also did anyone see the blog post from Valorant with how they tried to remove wall hacks from their game? I think it was a pretty interesting take on it, although I have absolutely zero clue how well it works.

fathom aspen
#

The fog of war one?

twilit radish
#

Yes.

fathom aspen
#

Oh yeah

#

Someone said that ShooterGame kinda already have it?

twilit radish
#

I'm not sure.

fathom aspen
#

You can trace it up

#

Seems like they pause replication (instead of making them non relevant) for players that are behind walls

#

That was my takeaway from that conversation but I have to dig deep in it

twilit radish
#

Maybe to prevent having to constantly reconstruct the player I guess.

fathom aspen
#

Yeah seems like that comes in costly

twilit radish
#

I don't think building the engine source is going to finish before I have to work lol.

#

A clean download of the engine binaries is currently 3-4gb, which may take some time to complete. Subsequent checkouts only require incremental downloads and will be much quicker.

fathom aspen
#

Since 1998™️

#

I love how updated their docs are

twilit radish
#

Oh I was on 4.27 docs, they just removed that in the UE5 docs 😂

fathom aspen
#

Good if they removed it at least heh

twilit radish
#

To be fair I don't blame them, I wouldn't want to update nonsense like this each release as well haha.

fathom aspen
#

Though you would be amazed to see such things exist: #cpp message

#

UE5™️

#

Unless it was something they messed up recently, I wonder how this hasn't been fixed all this time.

twilit radish
#

I think I'm missing the entire point of what's wrong there.

#

Oh wait the docs.

#

😂

fathom aspen
#

Lol yeah

twilit radish
#

I really wish they would improve the docs honestly. I know it's a massive pain but it's sooo extremely useful for everyone.

fathom aspen
#

It's like they put the doc of another function when they don't know what the function in question does?

twilit radish
#

Then we always have this as well.

fathom aspen
#

That's something I rarely notice xD

#

I have a file on my todo-list with some of the non-sense typos like that I plan on hitting them with in a PR eventually

twilit radish
#

😛

#

If you're at it, can you make a PR for the async physics? 😄

fathom aspen
#

My past experience proved they accept such PRs 😛

fathom aspen
frank phoenix
#

When i package my project and try to "Load Stream Level" its never found.
Failed to find streaming level object associated with 'CharacterPreview'

I've already tried adding to the DefaultEditor.ini -
[AlwaysCookMaps] +Map=/Game/ProjectName/Maps/CharacterPreview

also adding it to DefaultGame.ini - MapsToCook.
Even when enabling option to cook everything.
Also when setting streaming method to Always Loaded.

I am using dedicated server build with UE5.0.3 stable branch, but that level should be loaded before connecting to the server. Am i missing something? In PIE everything works as expected.

weary cliff
#

Hey what where would y’all suggest to start researching implementing multiplayer?

violet sentinel
#

i wish it was more than one sentence

fathom aspen
weary cliff
vivid siren
#

What are the rules when connecting players who are running different versions of the same game?
If I package two versions of my game: one with a blue cube and one with a red cube, then we can still connect and we will see whatever colour corresponds to our version.
Does this behaviour scale reliably? If I were to package a game with RHI on DX12 to utilize lumen for lighting, but then package another version with DX11 and basic lighting (maybe with light bakes too), would we still be able to connect?

elfin lintel
#

If I spawn an actor from another actor then replicate the spawned actor from within the spawning actor, does that just serve to replicate the reference to that object, or does it do more? I assume I would still be responsible for replicating the spawned actor's properties from within that actor.

fathom aspen
#

That replicates the actor not the reference to it. Replicating the reference is just an easy means to find it client-side

#

Otherwise you have to find it

elfin lintel
#

Replicating the reference is what I want to do, but I'm not sure by your message whether I am doing it correctly right now. Right now in the spawning actor I just replicate the pointer to the spawned actor. Is this correct for replicating the reference, or is there another way?

fathom aspen
#

Yes that's what you want to do

#

And you want to make sure your actor is replicated

elfin lintel
#

Awesome, thank you, I have both the spawning actor and the spawned actor set to replicate.

fathom aspen
#

The spawning actor doesn't have to be replicated though

#

Imagine the GameMode is spawning Pawn

elfin lintel
#

But if I want the reference to the spawned actor to be able to found client side, wouldn't I? Essentially if I want to put the reference to the spawned actor into GetLifetimeReplicatedProps and have that replicate, I would need to replicate the spawning actor, right? By your example, if I wanted the client to be able to access GameMode->Pawn->SomeProperty, I would need to replicate both GameMode and Pawn (just for example since GameMode isn't on clients)

fathom aspen
#

Oh right right. I forgot about the reference

#

Correct

elfin lintel
#

Thanks for your help!

dim trail
#

will i run into server load issues if i spawn actors frequently through multicast RPCs?

#

the actors will not be replicated

pallid mesa
#

but... everyone's load, so yes, but please use the profiler

#

🤣

fathom aspen
#

And you can never know if you don't try it and use the profiler

pallid mesa
#

wizard

#

stop reading my mind

fathom aspen
#

Lol

#

I hacked into your thoughts hackerman

#

Haha nah that's not fair

pallid mesa
#

🤣

boreal willow
#

Hi there, I am still learning multiplayer.

I was wondering if I call a Server_CustomEvent from another Server_CustomEvent does it cost me any network.

Is unreal engine smart to check if it's server to server it just a function call or it follow the function type to RPC call to the Function.

Thank you

boreal willow
#

Noted, Thanks

gentle pagoda
#

Hi guys I want to ask something, can I create custom rooms where I can set the number of players can play on dedicated servers?. Or correct me if my approach is wrong. Please help me it's so urgent please also give me a direction how can I achieve it please.

gentle pagoda
#

Steam has it's own dedicated server or I have to set up a machine for that.? Like aws provides us the servers, Can we do it with steam?

iron crest
sinful tree
# gentle pagoda Hi guys I want to ask something, can I create custom rooms where I can set the n...

A dedicated server runs as a single instance of the game. There is the possibility of having multiple worlds loaded and running at once, but it's not directly supported by default within the engine and I doubt running multiple multiplayer worlds would be something that would easily be done.

Generally speaking when games have things like lobbies, you're usually using an online subsystem, like Steam. These subsystems just provide a means of matchmaking - finding games that are running or are looking for players.
You can allow servers to start their own sessions through Steam, but the server needs to be hosted somewhere, either by hosting the server yourself, through hosting services like AWS, or allowing players to run their own servers.

gentle pagoda
gentle pagoda
sinful tree
#

A World in the engine is effectively like it's own instance and it contains only information pertaining to itself. So you could have two worlds running in a single process, each running their own level, game mode, list of players, actors, AI, etc. and they are separate, completely unaware of one another (unless you make them be aware of course!). Actors spawned in one world wouldn't be available in another. There's a plugin on the marketplace called MultiWorld (it's really expensive!) that could help facilitate something like this, but if you look it up it can probably give a few better examples of what is happening.

As far as having servers host the session, I'm not super well versed on it but I've looked into it a bit, and it seems it can be as basic as on Begin Play of the Game Mode you register the session, and when you want a player to find the game, you either make external API calls or use something within the engine to look up the sessions and display them to the player so they can then select the session they want to join, and then you make their client join it. #online-subsystems would probably have more info.

#

So it ends up acting like the server is saying "Hey I'm here, come play" and a player can select "Ok I'll play!"

gentle pagoda
gentle pagoda
sinful tree
tawny mason
#

Hi guys i'm attempting to move my player character (client) on the server side, authoritatively ignoring the player, using the character movement component, i have been trying different functions and making a custom movement mode but no luck, can someone point me in the right direction ?

frank phoenix
#

Is it normal behavior that an Entry Map loaded on the client at the beginning before connecting to the server will not render? I ask because I can only see my login UI, but no 3D content, once i Open Level, connect to the server everything renders fine. This only happens after packaging, not in PIE.

twilit radish
#

@ wizard, remember me for how I was 🥲

latent heart
#

You really don't even need to build that many things

#

You can cut it down to ~3500 by just not building the things you don't need

twilit radish
#

You expect too much from me. This is the first time I'm doing this 😂

fathom aspen
zenith wyvern
#

I'm struggling a bit with RPCs on an AI. The server triggers something that requires an animation, so I'm trying to run an animation on owning client, but there is no owning client. The only hack I can come up with is to, in my AI, save a ref to a player controller, and call RPCs off that player controller to do everything back on the AI

#

That seems overly hackey, whats the right way?

sinful tree
#

So if you need to communicate with a specific player, then you'll have to either assign that actor ownership (which may not be what you want to do if multiple players can perform the task at once) or Server->Client RPC through the player controller/character of the player that you're trying to interact with.

zenith wyvern
#

As I was typing I realized I dont really need it to be run on owning client. I suppose the animation running on server would just replicate right?

#

or is the anim multicast?

sinful tree
#

You can try it. If it doesn't work, multicast it.

zenith wyvern
#

ty

#

great success! multicasting the anim did it

vast forum
#

Hey folks, does anybody know how stable the 'duel process' PIE mode is?
I'm getting some really nasty errors on subsequent runs, but only after editing/re-saving assets.
LogNetPackageMap: Error: GetObjectFromNetGUID: Failed to find outer.

#

To me, it sorta smells like UE4 isn't properly cleaning up the process, between subsequent runs...?

#

I can "fix" this issue loads of ways:

  1. Don't use 'dual process' PIE
  2. Restart the editor
  3. Play in editor multiple times, but always do it sequentially, without editing assets
#

Yes

#

In this case, I was testing Play as Client, 1 player, and I unchecked Run under single process

#

Here is the description it generates for me (interesting design choice haha...)

#

In the NetMode dropdown I'm selecting PlayAsClient not PlayAsListenServer

#

Alrighty, I gtg though. Thanks so much for your help, I will look into that tmrw.

near basin
#

can anyone tell my how to add multiplayer to my game because im new and want to make a multiplayer game dm me if you can help please

#

i use ue4 version 4.27

quasi tide
#

The network compendium

wraith granite
#

Does anyone know how I can rout sound from VOIP to sound bus?

pale hazel
#

Is there any way to get notified when the playerarray has been copied in the gamestate?

I have a lobbymap that players connect to with a lobbygamemode & -state. The gamestate calls an event whenever a new player logs in or leaves, and the UI for each player gets notified and updates, that works fine.

My problem is that when a client joins an existing lobby, the playerarray in the gamestate on that client is not yet populated when that players' UI is initialized, so all the players that are already in the lobby are not shown. If I use a timer and wait half a second to initialize my UI then it works fine because by then playerarray is populated, but that's obviously a terribly ugly solution.

pulsar river
#

Are reliable RPC's guarantee to arrive in order regardless where they're being called from i.e) A RPC called via player controller and called via an actor ( which from my understanding goes through something called an UActorChannel? )

sinful tree
pulsar river
#

and also how would i ensure certain RPC's are in order if they're on different actors ( if there is a way )

sinful tree
# pulsar river just so i can read up and understand it more, where did you get this info 😮

Just through shared knowledge, posted in various places. Part of the reason why is because of what you've already found: the UActorChannel. This is the object that manages the replication for a single actor, and it handles calling the RPCs for that particular actor. As each actor has their own UActorChannel each are responsible for their own RPCs, thus, you can't guarantee order of reliable calls between two actors, but within a single actor you can.

pulsar river
#

oo cool thanks for the info 😄

#

what channel does player controller rpc's go through then?

sinful tree
#

It would go through an ActorChannel created for the PlayerController.

elfin lintel
sinful tree
#

PlayerArray isn't something that's replicated, it's managed locally.

pale hazel
#

The PlayerArray that unreal uses in the gamestate isn't replicated sadly, PlayerStates simply add themselves to it once a player joins

Funny thing is, there's actually an 'AddPlayerState' and 'RemovePlayerState' method in the gamestate that you can override, and they get called correctly! However, at the point where the playerstates add themselves to that array, they're not properly initialized yet, so they dont have the playername set etc., which means they're useless to me at that point...

pale hazel
#

If anyone has any ideas hit me up, I've been scratching my head at this for a while now

magic helm
wise steppe
#

Hey so anyone know the basics of networking? Im trying to figure out how to set up live link for my phone but my pc has an IPv4 for adapter 4 and 6 one for a private network and one for a public network. Im at home so Im not entirely sure which one my pc identifies with over the ethernet so I can put it into live link

#

Im smooth brain and new to this if that explains the basic question to you guys who I assume are well experienvced

magic helm
# wise steppe Hey so anyone know the basics of networking? Im trying to figure out how to set ...

Sorry to ask, is this for virtual production stuff? It might be better to ask in #virtual-production if that's the case (I know you asked in CPP, they should have known to ask that question first before sending you here to the online multiplayer chat which is a whole different ballgame)...
Also here is some documentation on live link: https://docs.unrealengine.com/5.0/en-US/live-link-in-unreal-engine/

Describes how to enable and use the Live Link Plugin and features within the animation system in Unreal Engine.

wise steppe
magic helm
#

Yeah sorry to ping pong you around channels, I personally don't have much experience with live link but I know it's related to virtual production stuff...

plush wave
#

Can I have one actor be the "network channel" for multiple other actors?

pale hazel
magic helm
plush wave
#

Hmm. So an owning actor can handle all the networking?

plush wave
#

Interesting

#

Thank you

fathom aspen
#

This only works for preplaced actors though

plush wave
#

Hmm

fathom aspen
#

Actors spawned at runtime needs a bit more work

plush wave
#

Yeah mine would be runtime

fathom aspen
#

Unless you make them replicated which defies what the network manager is responsible for

fathom aspen
magic helm
#

For reference, the owning actor is the player controller OR for an example of a non-player controlled object look at the gamestate and game mode actors. The game mode only exists on the server and spawns the gamestate (which is always relevant and exists on all remote clients) and the gamestate can also do RPC'S

magic helm
fathom aspen
#

Yeah it's. Or we should make vori add it to the article 😄

magic helm
#

That and a section on dormancy so I don't have to keep explaining it to other devs everywhere...

fathom aspen
#

I can relate to that too xD

magic helm
#

Funny enough I would have expected it to be in the network compendium but I guess not lol

#

A section on dormancy I mean

fathom aspen
#

Right. The compendium is great but is missing some juicy stuff.

fathom aspen
magic helm
#

YES! Also a low hanging fruit one(if you wanna cover it) is Unreal Insights within the editor for network testing, it's kinda hacky but possible

fathom aspen
#

Yeah nice to have that one too 😎

quasi tide
#

Do I smell some network bible heretics????

fathom aspen
#

I ask mercy from the MP gods praisethesun

undone kindle
#

Just downloaded the compendium. Never saw this before very useful!

fathom aspen
slim mist
#

If client has already loaded map A locally, and client joins server which also is running map A, is there any way to prevent client A from re-loading the map and instead just focus on syncing the state of all the actors?

pulsar river
#

Say I need 100 actors to sync (via RPC), when I late join into my server.

Is it okay to have 1 Actor, send an RPC to the server telling the server send down the 100 Actor's RPC?

Should the 1 Actor that does the initial RPC to the server be an Actor or the Playercontroller or does it not matter.
Would I come across any issue if all 100 actors get called to send down an RPC at once( I assume no because they're on different UActorChannels).

boreal wadi
#

You know in most multiplayer games where they have a lobby where you can party up with friends before matchmaking and you can see your friends character model as well as any updates like skin changes. What state is that? Is there a server already or is that just a P2P session? I can’t for the life of me find anything substantial about taking a party into a multiplayer server that’s not about listen servers.

fathom aspen
fathom aspen
boreal wadi
#

Dang I was hoping a dedicated server wasn’t involved especially for just getting a group of players together in a party to ultimately matchmake for a dedicated server. A colleague of mine was saying that beacons are good for this so I’m reading up on that. But for the actual system I want to create might require a mix between P2P and dedicated servers the only thing I can’t figure out is the partying system.

fathom aspen
#

By the time they are in the lobby map they are already connected to the server (regardless of its type). From that point they seamless travel to the combat map. I guess you can have some sort of a listen server lobby where one hosts the lobby and others join in. And from that point they all hard travel to a new dedicated server

#

Though I'm not sure what's the point of that

pulsar river
fathom aspen
#

Then most probably you are doing something wrong and you should use them instead

pulsar river
#

im sending custom transfer buffers in form of bytes

fathom aspen
#

For stateful stuff you use replicated variables. For transient stuff you use RPCs. That's the golden rule of mp

#

Sending too many RPCs can fill your net buffer quickly which would end up in a loss of RPCs, especially if they are marked as unreliable

fathom aspen
pulsar river
#

when we say too many RPC's can fill net buffer quickly

#

do we mean too many RPC's from 1 actor or 100 actors,

#

i've notice sending too many RPC's from 1 actor in 1 frame causes issues

#

does the latter i.e) 100 actors sending 1 rpc also cause buffer issue?

fathom aspen
#

Either one. Use unreal insights to see the results under the hood

pulsar river
#

a replicated variable also goes through the actorchannel though right?
same for an rpc via that actor?

boreal wadi
# fathom aspen Though I'm not sure what's the point of that

I guess the point would be to reduce costs, since most of the things that can be done in the lobby (e.g shop, customize, matchmake) are either client sided or called via a backend api (playfab) so I see no point in spinning up a server instance just to have players sit in there. But as I continue to read it seems like there may not be a choice.

pulsar river
#

so whats the difference between 100 replicated variables, vs 100 rpc for that variable

#

sorry wish there was more documentation somewhere to read on but the code is so dense its hard to understand

fathom aspen
fathom aspen
pulsar river
boreal wadi
#

Oh okay now that makes sense. Yea listen server sounds best. Only thing I think I will need to figure out is how to take all the members connected to that session into a dedicated server match, making sure they match on the same team. Then once the match is over deform the listen server for the group again. There’s a plug-in on the marketplace for 400$ but it doesn’t support dedicated servers for some odd reason only thing I could guess is they haven’t figured it out yet

fathom aspen
#

I would use those 400 to buy a dedicated server 😄

#

Probably they won't be enough though

#

But I would guess you would use beacons in such case

#

Beacons let you talk to a server you haven't yet connected to

#

I haven't got my hands dirty with them yet but they seem useful in this regard

#

And sadly there is barely info on them out there just yet sadeg

slim mist
fathom aspen
#

Stateful is skin of a player while transient is a visual effect played when you shoot a weapon

slim mist
#

Thank you so much, perfect explanation

sinful tree
fathom aspen
dim trail
#

should i replicate uproperties for AI that doesnt change? for example walk speed, derived from a setup data table

lilac sage
#

has anyone here worked with putting minigames in multiplayer?

#

I'm guessing I have to use UMG widgets and not separate levels?

#

or can i use sublevels?

fossil spoke
dim trail
#

so, if the data does not change, then replication is not necessary?

fossil spoke
#

Well no, because the point of replication is to be able to pass changes to variables down to Clients.

oblique parrot
dark edge
#

I wouldn't do a hard level change

#

Or just have the persistant level hold almost nothing and stream in/out the main sublevel and minigames

oblique parrot
twin juniper
twin juniper
sinful tree
#

Like, literally their copy of the game hosting the server that players would connect to. No AWS would be needed.

twin juniper
#

HOw to implement on unreal engine then.Like how other players will find this listen server ip and join this.

twin juniper
#

But i need to depend on eos or steam so other player across the world can find my session.Right

#

I want to do that without depending on any other provider so i can do it cross platform.

sinful tree
#

EOS can be used for crossplatform.

formal solar
#

How complex is that to set up, I have similar challenge

#

I need to connect everyone to a lobby first, once they are in the lobby I can send them to different levels (already done)

twin juniper
dark edge
#

Listen server is the host.
One of the players is the host.
Everything BESIDES the actual hosting of the game session is handled by your OnlineSubsystem of choice or you can make your own system. That's where AWS would come in, if you were to do that.

twin juniper
lucid wren
#

I'm having problems in set up rotation/possessing with multiplayer

#
  1. why debug prints are only on client 1?
#
  1. why the display name of boat_Character sometimes has C_0 appended?
pale hazel
#

is there any flag or way to check if a playerstate is currently leaving the session? I have a lobby with clients in it, but if i kick a client or a client leaves, their playerstate is still around for ages

lucid wren
#

I'm using a replicated variable to set the actor rotation

#

but it doesn't work

#

where am I failing?

pale hazel
#

both, the playerstate is kept around, I think to allow people to reconnect

eventually the playerstate is marked inactive, but that takes a while, and I'd love to get notified the moment a client disconnects

#

I've solved it by setting a boolean in my playerstate when the gamemode calls PostLogin & Logout, and just replicating that boolean

I was surprised though, this seems like something that would already have a built in solution, so if I'm missing something let me know

#

like some flag called 'disconnected' or something, idk

kindred widget
#

Check out AGameMode::AddInactivePlayer. It'll remove the playerstate from the PlayerArray, stop it from replicating, which will destroy it on clients, and then set a lifespan on it so it will eventually destroy on server too. If you're pulling from the GameState's PlayerArray for playerstates and using GameMode/GameState instead of GameModeBase/GameStateBase, you shouldn't have any problems with detecting if a player is logged out.

#

That particular function gets called the same place you're setting your boolean state in AGameMode::Logout

pale hazel
fathom aspen
pale hazel
#

I'll check it out, thanks

stuck gorge
#

In the UE Documentation is wrote when an authoritative object changes a replicated variable that replication will work on all client objects. But is it working only from servers? I mean, I cannot send replication from a client authoritative object to server and others, right?

fathom aspen
#

Right. It has to be done on the server

stuck gorge
#

Thanks =)

fathom aspen
#

TMaps replicate? what?
He's referring to SetByCaller TMaps in GameplayEffect

#

From GAS compendium

#

At least if I check UE5 source I see this

#

Unless he means they replicate without the Replicated flag which the source code says it doesn't?

chrome bay
#

TMaps don't replicate for sure

#

More likely it's packed into an array for replicating, or written directly

#

If it even replicates at all

#

FGameplayEffectSpec is never networked AFAIK

#

FActiveGameplayEffect is

#

Oh NMV, that contains the spec - which does contain the TMaps - but they aren't UPROPERTY so they won't replicate anyway

fathom aspen
#

Thanks for confirming!

vagrant grail
#

If I want to do a day / night cycle working for multiplayer, in which actor do I have to write the code in ? Level BP ? Game Instance BP ? Game State BP ?

limber gyro
#

in theory i think u can write them in any of those, but the level BP would be more apropriate i think

#

theres also an actor that handles the sky i think, im not sure if its a BP tho

#

if it is, its probably better to put it there

bitter oriole
vagrant grail
vagrant grail
limber gyro
#

so ur best bet would be to make a skyBP and put the logic there

twilit radish
vagrant grail
# bitter oriole Correct

IT looks like I can't get a reference of the "DirectionalLight" I have in the hierarchy from the GameState, so I'm kinda confused 🤔

bitter oriole
#

You'd have to get it in another way

vagrant grail
bitter oriole
#

Writing code that gets it

vagrant grail
vast forum
#

Hey folks, I'm wondering if anyone can illuminate the causes for such an error:

#

Error LogNetPackageMap GetObjectFromNetGUID: Failed to find outer.

#

It seems to be caused by (or is the cause of...?) a Replicated/*InitialOnly*/ property not actually being replicated.

#

It's only reproducible when running as a Client in it's own process ('Run under one process' checked off), and after saving the object.

#

--
So the first run, it's all good. Subsequent runs, the client diverges from the server, the replicated property doesn't come through, and it complains with the error above.

#

Requires me to restart my editor before it will work again

fathom aspen
vast forum
#

I debugged further, and the ObjectLookup simply has Object = nullptr for the Objects with issues.

latent heart
latent heart
vast forum
latent heart
#

Have you set up the uobject replication? It doesn't really do it by default.

vast forum
#

I mean, it works under single process, when running without the editor, and when deployed to our normal platform.

#

It's just a hyper specific bug related to dual-process PIE after editing+resaving the asset.

latent heart
#

That's definitely odd.

#

Maybe track down what object it's looking for as the outer?

zenith wyvern
#

I'm thinking about inventories in multiplayer. I'm worried about multiple people trying to use/loot the same item from a corpse in a laggy situation. The server needs to remove item and return 'you got this item', but how does it know the item doesnt exist when the other players request comes in

#

The only thing I can think of is having unique IDs on every single item, because I can't reference by item type

latent heart
#

Whichever the server processes first gets it?

zenith wyvern
#

What is 'it' though

#

At the moment, i have an array of item data

latent heart
#

Every single item surely already has a unique id? An actor or some reference in the inventory?

zenith wyvern
#

an index, but the index would change if first player gets it

#

so then player 2 would get a different item than expected when it should be none

latent heart
#

So give each item in the inventory a unique id?

broken harness
#

Instead of giving items an ID, just give it to the slots - then if something new gets put into it just give them that instead and players will just accept it as it is

zenith wyvern
#

Yeah that's what I'm leaning towards as the only real option

latent heart
#

FGuid is fantastic for that sort of thing

#

Or, if the "corpse" inventory is a 1-shot that will soon disappear or whatever, just a number from 0 to whatever that is independent of the actual array index.

zenith wyvern
#

I'll have the item data in the request, which includes ID, so I'll request item by ID

latent heart
#

Will it include the type id or the id of the item as a unique entry?

zenith wyvern
#

guid

latent heart
#

That'll work then.

#

I wouldn't use an FGuid for this, though, it's a waste of bytes.

#

And you really don't need to send the whole item data in the request either

quasi tide
#

I have a modular weapon system. The components are built from Data Assets. I set up the meshes on the actual BP class inside of OnConstruction. Everything works fine server wise. I have it successfully replicating to clients as well. However, when it does replicate to client, the client becomes exceptionally jittery. When I don't replicate it, it runs smooth as butter - can anyone think of why this would be the case?

The config stuff is wrapped in a struct FWeaponConfig. The struct is replicated. I've tried setting up the stuff in PostNetInit as well (for the client side).

zenith wyvern
#

I can't find a good unique ID function, maybe guid is the way?

radiant cypress
#

Hey ! I'm using the UE "CreateSession", "FindSessions", and "JoinSession", it works great on editor, and when i'm launching the packaged game 2 times on windows. But when testing with a friend over network, we cant find each other's sessions

latent heart
#

Or just an increasing number for that container.

#

I mean, assuming this is a container that will not last forever and the player can't put things into it.

stuck gorge
# radiant cypress Hey ! I'm using the UE "CreateSession", "FindSessions", and "JoinSession", it wo...

If you dont use Straight IP your game will not find a game of your friend.
It is a complex idea about a connection via internet, because you have your router that is hiding your PC from internet and router of your friend doing same thing. And for a properly connection you need a third side. For Example - Epic Online Services.
You can find info there:
https://www.youtube.com/watch?v=b7-h54najFY

And there:
https://www.youtube.com/watch?v=ItqVHGdavyU

If after that you cant connect you will need to try reset project settings.

Blueprints-only introduction to Epic Online Services with a modified version of the non-commercial Advanced Sessions Plugin

Modified release of the Advanced Sessions Plugin (contains binary builds for Win64 and MacOS, tested with UE 4.27.2):
https://www.maygames.net/uploads/AdvancedSessions-4-27-eos-rev2.zip
Source code:
https://github.com/loto...

▶ Play video
radiant cypress
#

Thanks !

sinful tree
# twin juniper I got it.But how to make other players connect to my session.How can they find m...

At an extremely basic level, an online subsystem is an application that listens for signals from servers indicating they want to host and the server provides the subsystem with all the details like IP address, port, server name, current map, player counts, etc, and stores that data in a database with a lifespan. Your servers would frequently send pings to the online subsystem to update its database entry and keep the entry "alive". If no response is received from a server for some time, it'd be removed from the database. Your game clients can then contact that application and retrieve the list of sessions and all their data from the application and select what session they want to join and then your game client would then connect to the appropriate IP address of the session you want to join.

So in terms of creating your own with AWS, it could be as simple as a few Lambda functions acting as the application, and a DynamoDB database to store the sessions and a few functions within Unreal to make some HTTP calls and handling them.

There's a lot more to it, and I think you're probably better off just using one of the built in subsystems first to see how they operate. And if you're talking cross-platform like having Playstation users play with XBox and PC, its more than likely you'll need to use EOS (Someone correct me if I'm wrong).

dark edge
sinful ruin
#

Hi, I get this after trying to create and start a new session. I assume there is something wrong with the map name, but I don't get why it mentions the current map and not the map I am trying to start the session in

faint eagle
#

Is it possible, that some RepNotify is never called for simulated proxies on some clients due to net distance culling or whatever other net optimizations? I'm creating weapons for my mobs on character's begin play only for authority. Then I immediately replicate these weapons via push model (actor pointers, weapon actors are replicated). However some clients that are far away can't really see mobs weapons when they finally reach the mobs. If net optimization is the case here, how do I deal with it?

twin juniper
fathom aspen