#multiplayer

1 messages · Page 173 of 1

bright summit
#

how to change it? ;d

short arrow
#

Oh

#

Are you using LAN?

bright summit
#

Same network but in session host config/search it is not lan

thin stratus
thin stratus
#

I only did that once for a customer cause they wanted the 9999 ping stuff to be solved

#

The PCs being in the same LAN should in theory not matter

#

I'm pretty sure I've tested with a laptop in the same network before

bright summit
#

I know, if configured for LAN hosting/search it still is not finding

short arrow
#

I really think the problem might have something to do with your code somewhere. I'm also using steam sessions for my project. Just a fee days ago in fact. It worked fine

#

But I can't really see how you have everything setup

thin stratus
#

That's an empty widget event graph

bright summit
#

scroll down a little

thin stratus
#

Ah

bright summit
#

I know that blueprint is ugly but I want it only to get work XD

thin stratus
#

fwiw LanMatches also need to be ListenServers

#

But that's besides the problem

#

I would try this same setup with the default, native nodes first

#

To check if that plugin is at fault

bright summit
#

I told ealier - with native subsystem it worked

#

I only replaced nodes for advanced sessions steam plugin

thin stratus
#

Ah, sorry, must have missed that

bright summit
thin stratus
#

I assume the hosting works, logs show that properly?

thin stratus
#

For a Client to connect, it must be a ListenServer

#

LAN vs Internet only differs in how the Session Information is found

#

LAN asks the whole network

#

Internet asks the MasterServer of the given Subsystem (e.g. Steam)

bright summit
#

are you talking about this?

thin stratus
#

Yes

#

It's not gonna fix the "Not finding of sessions", but wanted to note it anyway

bright summit
#

ok thx

#

I will fix that later when I get rid of this problem

thin stratus
#

I never used AdvancedSessions, so not sure if any of the values are maybe wrong

bright summit
#

changed network driver for steamsockets, gonna test

thin stratus
#

How many Public Connections did you enter?

short arrow
#

Also are you able to find your match when trying to search for games in the editor? That should work

Lsi

bright summit
#

its 4 already

thin stratus
#

I wonder if that actually means 4 of the Public Connections are Private.

#

And then your "Min Slots Available = 1" fails

#

Just a random idea though

bright summit
#

ok I'll try this one also

thin stratus
#

Worth a sanity check yeah

short arrow
#

The only time I've ever heard someone being unable to find sessions on steam using 480 was due to download servers being different, or steam was doing an update. Steams doing some update. Best of luck to you though, im out of ideaa

thin stratus
#

Yeah it's always pretty shitty when this happens

#

Most people have the best time when just using their own ID

#

But I totally get that this isn't always a thing someone is willing to commit to yet

bright summit
#

after changing to steamsockes, public connections to 16, make sure it is same region - everything is ok and it do not work : |

#
[2024.04.14-18.31.11:007][195]LogSteamSocketsAPI: Verbose: SteamSockets API: Log Ping location: waw=8+0,vie=28+2/19+0,fra=20+2,ams=25+2/26+2,sto=44+4/28+0,sto2=45+4/28+0,par=28+2,lhr=32+3/30+2,mad=56+5/48+2,iad=116+11/105+2,gru=221+22,sgp=252+25/253+25
[2024.04.14-18.31.11:007][195]LogSteamSocketsAPI: Verbose: SteamSockets API: Log SDR RelayNetworkStatus:  avail=OK  config=OK  anyrelay=OK   (OK.  Relays: 24 valid, 2 great, 10 good+, 15 ok+, 8 ignored)
[2024.04.14-18.31.13:696][429]LogBlueprintUserMessages: [WB_MainMenu_C_2147482470] Join Game
[2024.04.14-18.31.13:718][431]LogRHI: Display: Encountered a new graphics PSO: 1953013355
[2024.04.14-18.31.16:298][664]LogOnlineSession: Warning: STEAM: Unable to set search parameter LOBBYSEARCH: Value=true : Equals : -1
[2024.04.14-18.31.16:608][692]LogOnlineSession: STEAM: Found 0 lobbies, finalizing the search
[2024.04.14-18.31.17:505][774]LogOnlineSession: Warning: STEAM: Server response IP:15.228.203.218
[2024.04.14-18.31.17:505][774]LogOnlineSession: Warning: STEAM: Removed incompatible build: ServerBuildUniqueId = 0x00000000, GetBuildUniqueId() = 0x01a22caa
[2024.04.14-18.31.17:513][774]LogBlueprintUserMessages: [WB_JoinGame_C_2147482464] Finished searching for servers
[2024.04.14-18.31.19:329][937]LogOnlineSession: Warning: STEAM: Unable to set search parameter LOBBYSEARCH: Value=true : Equals : -1
[2024.04.14-18.31.19:660][967]LogOnlineSession: STEAM: Found 0 lobbies, finalizing the search
[2024.04.14-18.31.20:578][ 50]LogOnlineSession: Warning: STEAM: Server response IP:15.228.203.218
[2024.04.14-18.31.20:578][ 50]LogOnlineSession: Warning: STEAM: Removed incompatible build: ServerBuildUniqueId = 0x00000000, GetBuildUniqueId() = 0x01a22caa
[2024.04.14-18.31.20:587][ 51]LogBlueprintUserMessages: [WB_JoinGame_C_2147482464] Finished searching for servers```
#
LogOnline=VeryVerbose
LogOnlineSession=VeryVerbose
LogOnlineServices=VeryVerbose```

that's the way how to add it to .ini file, fyi
quartz star
#

Hello there, Im encountering this very weird issue that I'm unable to create a session -or at least somehow.
Im using the Native online subsystem thats in the editor by default and whenever i create a session it reopens the current level.
Here is my log:

LogGameMode: ProcessServerTravel: 
LogEngine: Server switch level: /Game/Maps/DefaultMap/DefaultMap?PktEmulationProfile=Bad
LogNet: Browse: /Game/Maps/DefaultMap/DefaultMap?PktEmulationProfile=Bad
LogLoad: LoadMap: /Game/Maps/DefaultMap/DefaultMap?PktEmulationProfile=Bad
LogWorld: BeginTearingDown for /Game/Maps/DefaultMap/UEDPIE_0_DefaultMap
LogWorld: UWorld::CleanupWorld for DefaultMap, bSessionEnded=true, bCleanupResources=true
LogSlate: InvalidateAllWidgets triggered.  All widgets were invalidated
LogAudio: Display: Audio Device unregistered from world 'None'.
LogUObjectHash: Compacting FUObjectHashTables data took   0.70ms
LogUIActionRouter: Cleaned out [0] inactive UI action bindings
LogPlayLevel: Creating play world package: /Game/Maps/DefaultMap/UEDPIE_0_DefaultMap
LogPlayLevel: PIE: StaticDuplicateObject took: (0.001148s)
LogPlayLevel: PIE: Created PIE world by copying editor world from /Game/Maps/DefaultMap/DefaultMap.DefaultMap to /Game/Maps/DefaultMap/UEDPIE_0_DefaultMap.DefaultMap (0.001179s)
LogAudio: Display: Audio Device (ID: 6) registered with world 'DefaultMap'.
LogWorldSubsystemInput: UEnhancedInputDeveloperSettings::bEnableWorldSubsystem is false, the world subsystem will not be created!

I really have no idea whats the issue

#

thats all my code in blueprints

#

It does create a session, other players can find my session.
But for me it doesnt, its so weird

#

It doesnt open the AITestMap instead it reopens the DefaultMap

bright summit
#

in open level node

quartz star
bright summit
#

do you have seamless travel enabled?

quartz star
#

I tried with enabled and disabled, also no difference

bright summit
#

but you should have "listen" in options no matter what because if you fix your primary problem your level won't start anyway

quartz star
#

yeah well I dont know what to do anymore tbh.
The issue seems to be project specific

#

In other projects everything works fine

vagrant grail
#

Use "Standalone Game" and tell me if it does work

quartz star
vagrant grail
#

Check "Launch Separate Server" and uncheck "Run Under One Process"

quartz star
#

with these settings it works

#

but only if i play as client

#

no wait

#

it only works on client

#

no matter which booleans are checked

vagrant grail
quartz star
#

works too

vagrant grail
#

then it should be good

quartz star
#

hm, but why doesnt it work in standalone?

vagrant grail
#

because listen server is what you need to create session

bright summit
quartz star
#

yeah thats what i thought

#

same with my other projects, it works in standalone

vagrant grail
vagrant grail
quartz star
#

I did that

#

still doesnt work in standalone

vagrant grail
#

did you try it now after having that option + setting the settings shown above ?

vagrant grail
#

And also try Play Standalone + Standalone Game Mode

quartz star
vagrant grail
quartz star
#

well it doesnt work

vagrant grail
#

And instead of OpenLevel rather use Execute Console Command like this by putting the argument servertravel + the name of your level

quartz star
#

well in standalone it doesnt even reach the point where it opens the level

#

somehow the "create session" node reopens the current level

vagrant grail
#

with Execute Console Command

quartz star
#

like this?

vagrant grail
#

if it still doesn't work, you can add this ?listen after the name of your map

quartz star
#

it works ._.

vagrant grail
quartz star
#

but i dont get it, in all my other projects and also youtube tutorials it always works with "Open Level" and "?listen"

#

why not for me then

#

also around 1 week ago it worked with "Open Level"

vagrant grail
#

I have no clue you will need to see with people more experienced than me because even myself I don't understand why it does that and it's really painfull 🤷‍♂️

bright summit
#

I can't believe there is no solution for my problem, nothing in google search ;x

hoary spear
#

what problem

#

ah

#

out of my area, sorry ^^

bright summit
#

xD

#

that's me right now

hoary spear
#

🤣 can relate

#

"I cant possibly be the first person doing this basic thing"

#

Often turns out my google-fu is just wrong😅

#

Especially with math problems where i lack the proper terms /descriptors

bright summit
#

yeah, I wonder now if am I stupid or maybe using wrong terms, questions or soemthing other

twilit stump
#

Anyone here familiar with the new UMoverComponent? I'm trying to do ragdoll but I need some way to disable the mover component somehow so I can update the capsule location

#

I get some ensure throwing for the movers network prediction

formal solar
#

Do spectators not count towards Numplayers in the game mode?

sinful tree
# formal solar Do spectators not count towards Numplayers in the game mode?

It does not. There is a NumSpectators integer that counts the spectators seperetely from NumPlayers in PostLogin of the GameMode.

void AGameMode::PostLogin( APlayerController* NewPlayer )
{
    UWorld* World = GetWorld();

    // update player count
    if (MustSpectate(NewPlayer))
    {
        NumSpectators++;
    }
    else if (World->IsInSeamlessTravel() || NewPlayer->HasClientLoadedCurrentWorld())
    {
        NumPlayers++;
    }
    else
    {
        NumTravellingPlayers++;
    }
//.... truncated
formal solar
#

ah i see why a lot of my logic is breaking then

#

Im using non seamless travel

fossil spoke
formal solar
#

cant actually remember

#

my game mode, game state, player state are all different in the maps i travel to

fossil spoke
#

That hasnt got anything to do with Seamless Travel

#

Do you know what its purpose is?

formal solar
#

so that clients dont have to reconnect when host loads a new map

#

and host has to reconnect to i think

fossil spoke
fossil spoke
#

A Host cant reconnect to itself.

formal solar
#

Out of curiosity is game instance destroyed across non seamless travel?

fossil spoke
#

No...

#

The GameInstance is basically the UE process itself.

#

Its lifetime is tied to the application

#

Has nothing to do with travelling

#

Going back to Seamless Travel.

#

There are very very few cases where you dont want Seamless Travel.

formal solar
#

my setup is that i have a lobby where players find or host sessions, if you host a session you open a map select screen where other players can join your session

#

from the map select screen will i be able to seamless travel to any map in my game?

fossil spoke
#

There are 2 types of travelling.

#

Seamless Travel

#

And

#

Hard Travel.

#

Hard Travels are any travel that occurs between Servers (if you disconnect from a Server and move back to a local level, that is a hard travel).

#

A Seamless Travel can only occur within the same Server and if it is enabled.

#

You cannot Seamless Travel between Servers.

#

If you want Clients to remain connected to your Server when that Server changes level, you want to leave Seamless Travel enabled (which it is by default).

formal solar
#

just enable it in the 2 corresponding gamemodes (of each level)?

#

Yeah I cant remember why I disabled it
I did 2 tests one with it one without and it worked without up till recently

fossil spoke
#

In 99% of cases you want to leave it enabled.

#

Thats why its enabled by default

#

There are very few use cases for it to be disabled.

formal solar
#

ok got u

white quartz
#

How do I figure out which player I am (listen server multiplayer). Like am I the first player to join or the second?

fossil spoke
#

The Listen Server Host will always be first.

white quartz
cursive steeple
fossil spoke
#

My bad.

#

Really silly that it isnt.

cursive steeple
fossil spoke
#

That information doesnt really change anything about what I said.

white quartz
# fossil spoke You need to provide more context around what you are looking to solve.

Basically I have two player starts. I want the first person to join to spawn at the first player spawn and the second to spawn at the second player spawn. I also plan on moving over the 1st player spawn to spawn a 3rd player if a 3rd player joins but I am working on step one. I have looked up every forum post and tutorial under the sun and none work.

#

I tried overriding choose player start but no matter what I do the player start tag always gets reset the next time choose player start gets run

ripe lotus
#

if i do a server travel to a new map with not GM override, does the gm gets re-created as well as the pawn and controllers?

pearl walrus
#

Can anyone help me with replication? Basically what I need is whenever someone clicks disconnect the game checks if they are the host or not through a boolean i set up and if they are determined to be the host its SUPPOSED to display Host Has Disconnected and then transition everyone to main menu from lobby and then destroy session, the Host checker works as whenever I leave as the host it says Host Has Disconnected, but everyone else doesnt get put to main lobby and im not sure if session is destroyed or not.

Another thing is the names, I tried to have it setup to where whenever someone joined their name would be put in the respective slot, this is working clientside as if host creates the session/presses play it puts their name to slot 1, if player 2 accepts the steam invite it puts their name to slot 2 but the names dont show up on eachothers screens.

Im not sure if my transition to main menu from lobby custom event needs to be a replicated mujlti cast call too? Everything involving the host is replicated multi cast so far and whenever player 2 joins its also replicated multi cast

#

Whoever is willing to help much appreciated, can ask any clarifying questions you need or any more screenshots

pearl walrus
#

for which part?

ripe lotus
ripe lotus
#

thanks :)

#

i just found it :)

sinful tree
narrow fog
#

Is there a need for RPCs inside a gameplay ability? My gut instinct is yes because it's the GameplayEffects, Tags and Cues that get replicated right?

I have a gameplay ability that lets a player move a piece to a tile on (effectively) a chess board and the final location of the piece is not getting replicated, it's just completely decoupled on server and client. The AI controller and character movement components of the piece replicate fine. Other gameplay abilities have had their montages/cues/tags replicated without issue

sinful tree
# narrow fog Is there a need for RPCs inside a gameplay ability? My gut instinct is yes becau...

You don't need to have the ability marked to replicate. If you have the ability marked as client predicted, that means it will execute the activation logic on both the client and the server. Effects, tags and cues can be replicated seperately from the ability itself.

If you happen to have the ability marked as "Client Only" or "Server Only" then it will only execute its logic on the client or server.

When you mark an ability to replicate you are effectively enabling it to send RPCs and set replicated variables, but this is largely unnecessary as most of these things are handled through other systems such as effects, cues and tasks.

narrow fog
sinful tree
sinful tree
#

So this part here, the cast would fail on the server as the server doesn't know what is under the client's cursor.

narrow fog
#

Ahhh brilliant, that also explains why it had the same behavior when I moved it out of a gameplay ability and straight into the Player Controller

Thank you so much, I'll try to fix this and report back barb7

chilly haven
#

Hi,
For movement replication, is it better to use SetReplicateMovement(true); or Mesh->SetIsReplicated(true); ? Both work.
For scale only the latter works.

#

Or is it advisable not to set replication on the mesh, and do scale replication yourself?

thin stratus
#

NPP has smoothing for SimulatedProys on FixedTick, but not for the AutonomousProxy.

#

You'd need to add that yourself.

stable grotto
#

how to exclude a plugin from the client build? since only the dedicated server uses it

thin stratus
#

Buh, I don't think I ever excluded a Plugin from a build specifically. Maybe via the Target.cs files?

bright summit
#

I fixed my issuse with not finding sessions, I posted solution in the correct channel #online-subsystems message

My next question is if is it possible to test mp "standalone" option in the editor? I assume no. So if not there is a quick way to dissable steam sessions to use native on to test it in editor properly?

thin stratus
bright summit
#

I mean this option

thin stratus
#

You bigger issue with pie is that you can't properly test Seamless Travel

#

Ah you want to do standalone but without steam?

bright summit
#

yes, because every small change will force me now to package the game and test on secnod pc (which is lottery for now because it fails sometimes don't know why)

thin stratus
#

Why do you need to test Standalone so often though?

#

Most of the actual Gameplay can be tested in the Editor by just being on the map that you wish to test and starting as PlayAsListenServer

#

You'd only really need Standalone if you do in fact want to test something for Steam

#

Or if you want to test SeamlessTravel fwiw

#

I think what you could do, if you still want a quick nosteam standalone version, is to make a quick .bat file and adding -nosteam at the end of the path

quasi tide
#

All my seamless travel problems went away once I had the map that I'm traveling to not have the same PC as the one I was coming from.

bright summit
#

yooo it works, perfect!

formal solar
#

am i right that anim notifies fire on both client (player controller who owns the pawn using the mesh with the anim BP) and server?

#

but not on other non-host clients

#

and on host they just fire once

#

since client = server

lost relic
#

Anyone Know why when I use transfroms of the components I get Hand lag but using the components directly I dont. Need the transfroms as Im trying to replicate there positions to clients.

nocturne fiber
#

hello, someone can suggest an approach to solve my issue?
this is a line trace component send at a 0.1 sec delay( not tick) in a multiplayer game with client server, i notice that with this disposition i can get the cast of server side working, but not the client one that returns null.
the client one is the bottom flow.

#

even if the get owner don't work with client, someone can suggest a different approach?

#

this is a component for character, so there are no rpc ( i think it's not needed cause all player own it's own character)

#

thanks

crisp relic
#

Hello guys! I'm struggling with Seamless Travel... Currently, I connected my clients to my server (session looks good and replication in gameplay too). In my lobby map I have a start button to start the game, this button lead to a console command "servertravel L_Gameplay". I've set a TransitionMap in my project settings and checked the box for seamless travel in gamemode. I'm playing in Standalone but when I travel it's doing a Hard Travel. Can anyone help me with this?

woeful ferry
#

Hi,

We have a gizmo in-game that's client authoritive. Even if we turn off ReplicateMovement when the gizmo is active, we get updates to our component from the server, even though OnRep_ReplicatedMovement does ignore the server's updates

#

Anyone knows what else can affect the transform from the server?

visual mountain
#

game mode cant replicate but can it receive replicated information?

lost inlet
#

?

visual mountain
#

can i move replicated information from game state to game mode

#

can game mode understand replicated information

lost inlet
#

what does this even mean? if you're dealing with the server, which you would be in game mode, then you know about every actor's state

#

including the game state

visual mountain
#

so yes?

lost inlet
#

well yes, but I'm confused as to why it was ever a question

#

I'm not sure why you're explaining that to me

cursive steeple
#

Sry wrong msg to reply to

cursive steeple
lost inlet
#

It might be an incredibly naive misunderstanding of replication I suppose

sinful tree
# nocturne fiber hello, someone can suggest an approach to solve my issue? this is a line trace c...

You shouldn't care about the display name for the logic. The display name can vary between client and server and isn't a great way to check for anything.
You may be getting to the cast failed message as player controllers don't replicate to all clients, but this trace function could be executing for all characters on all clients.

Instead, try maybe an "IsLocallyControlled" off of the Instigator, and don't try to use the player controllers. This way you should be able to tell if you're running on the server or not and whether or not the pawn you're checking is the one that is controlled by the local machine.

elder sable
#

Hi, i would like to replicate subobject using bReplicateUsingRegisteredSubObjectList, but is there a way to enable it from subobjects directly ? Since it's protected ?

#

Oh, maybe GDefaultUseSubObjectReplicationList

lost relic
#

Is this switch on net a viable solution to have my anim BP use a different transfrom depending if its local to a player of on the server , need to use the replicated value for other clients to see across the network and use the direct ref for each players own hand locations,

#

Or Should I be doing it like this ?

#

After testing seems second was the solution

pearl walrus
#

Is it possible that when accepting the invite and joi nsession is ran that it is creating its own lobby?

#

like maybe somehow join session fails to join the invite but makes its own session instead?

#

only thinking this because when i accept invite on the alt account/VM somehow the invitee has HostAuthority since its putting the steam name into slot 1

runic pelican
#

Hello, I'm encountering an issue with my HUD. It's functioning perfectly fine on both the server and the client. However, there's a bug with my stamina variable. It decreases correctly on my HUD when I use it and increases when I stop using it. But here's the problem: the stamina variable on the client side reflects accurately on the HUD, but its actual value doesn't update accordingly. So, my client indicates that the stamina variable is at 0, while it's not actually at 0 on the client's HUD. Does anyone have any ideas on how to fix this? Thank you.

sinful tree
# pearl walrus Is it possible that when accepting the invite and joi nsession is ran that it is...

No. If how your lobby system is working is based around your much earlier screenshots, it more likely has to do with how you're using RPCs (mainly multicasts) to drive the state of what things are supposed to look like. Multicasts are fire and forget. If clients aren't connected at the time the multicast is fired, then they would never receive the update. You also appear to be crossing wires across RPCs too which doesn't transfer the value from one call to the next, it'll be whatever value the current system has which could be the client's own value, not what the server wants to tell the client it has.

Stateful things are supposed to be handled through Replicated Variables and use of RepNotifies, or just using appropriate events for when things actually happen rather than relying on the server throwing multicasts.

For example, when a player joins a game, whether on the server or client, it can be known about by using the PlayerState's Begin Play event, so you can use that Begin Play to start driving some logic about a player joining the game, like say, adding a widget for that particular playerstate, and utilizing the playerstate reference itself to retrieve data to present in that widget. On that begin play, you can verify you're running on the authority and if so, that means you know you're running on the server, and you can then check if the playercontroller is valid and if it is "locally controlled" and if so, that means it is the server's playerstate, and then set a replicated variable on that playerstate to indicate that playerstate is the host's playerstate. If you do what I've pasted below, you could then use the playerstate to create a widget that you pass in a reference to the playerstate it is meant to represent, and then have a binding that reads the "Is Host" variable of the associated PlayerState of that widget to know if that widget should show who the host is.

#

Additionally, you can't use RPCs within widgets, so you shouldn't even have multicasts and the like within them, they just won't work.

#

Want a player to be able to update their name? Store it as a replicated variable on the PlayerState. You can again then access the name VIA a PlayerState reference that could be within your UI or even from your Pawn.

elfin thicket
#

Hi, I am running into a very annoying issue that I can't seem to wrap my head around. When I am running in the Editor I see 0 issues for the client and server to communicate. But when I build the client and server and run the binaries I am seeing a "Mismatch Read" for one of my RPC functions. I am new to Unreal and this is far above my knowledge level. The client and server build are for sure built from the same code base and the argument the RPC takes is a String that is serialized on the Server before sending. Anyone here recognizes the issue and could point me in the right direction? 🙏

Issue only occurring outside of editor:
Error: ReceivedRPC: ReceivePropertiesForRPC - Mismatch read. Function: CLIENT Set Quest States, Object: BP_QuestComponent_C /Game/Maps/Largee.Largee:PersistentLevel.BP_PlayerCharacter_C_2147481919.QuestComponent

That is the only information in the output, and I am certain the string is not malformed or anything when sent from the Server, I am logging it.

pearl walrus
# sinful tree Want a player to be able to update their name? Store it as a replicated variable...

Ah i see, yeah i scrapped the is host variable and decided to just use has authority instead, i do have the playername stored here but this is in the controller so its probably wrong. Should I use has authority with an is host variable like you showed? i thought it would automatically determine if player has authority or not based on if they created session or if they just accepted the invite

pearl walrus
urban crystal
#

I know it's a kinda complex topic but I am trying to do predicted projectiles thrown from a first person view. in the research I've done it seems like the best way to do it for me is to have a fully fake projectile on the client and a real one on the server that the fake one syncs up with. My question is what's the best way to translate that into unreal terms? primarily, how do I make it sync up with the server projectile?

pearl walrus
#

I also changed alot of the multi casts to run on server but i feel like maybe not all need to be rpc

sinful tree
#

They are not replicated, they send no data to the server, they receive no data from the server.

#

They can read from other actors that are replicated however.

urban crystal
#

i'm talking like grenade throw speed

#

its a fast moving projectile with no gravity that explodes on hit but not nearly bullet fast

#

competitive unfortunately for my workload

pearl walrus
quasi tide
#

Oh lordy - does anyone remember that trick to debug server in PIE?

urban crystal
#

I was thinking about doing something like that but not killing the fake and just keeping it the whole time it's flying

urban crystal
#

so would you do that by having client and server projectiles different blueprint classes

quasi tide
# hollow eagle what do you mean

Running as client (so dedicated server) and breakpoint isn't tripping in Rider. I remember someone mentioning that you could add something so the breakpoint is on the server and not the client.

hollow eagle
#

err, single-process pie can't skip breakpoints

#

if it's not hitting then the server isn't running that code or you're not using single-process pie.

urban crystal
#

also idk how much this changes the technique of doing it but I'm using GAS

quasi tide
#

I'd be very surprised if the server isn't running the code but the BP debugger hits on the function and allows me to advance past it and all.

urban crystal
#

so when the server one is spawned does it send an rpc to the client for them to start updating the fake

misty birch
#

I have some variables on an actor/character, and they replicate to connected clients, but if a client joins late, the variable is null

#

I tried using the player state to store the variables instead but same thing

urban crystal
#

also how does this work with the visual not coming from the player's face but we would want the projectile to I think so does the client also have a visual one and a collision one that it's predicting.

urban crystal
#

but the projectile will visually come out offset from center screen but hit detection wise it should be in the center. is that handled with client version has no collision and is visual off to the side, interpolating to the center as it flies and server version is invisible with collision coming out of the face?

sinful tree
sinful tree
# pearl walrus hmm so its more likely my player is joining and my replication is wrong rather t...

I threw together what I was preaching since my last message, about 30 minutes of work...
WBP_Lobby utilizes a "List View" to dislpay the joined players which you pass a PlayerState object into and uses "WBP_LobbyPlayerIndicator" widget. It also has a start button that will only show for the host, and gives a field for players to set their name.
WBP_LobbyPlayerIndicator is a very simple widget with a text field and an image to portray who the host is and their desired display name, using binds that read from the passed in playerstate.
The BP_LobbyGameState only has a couple of event dispatchers set up in it to allow an easy way for the lobby widget to know when a player joins or leaves the game.
The BP_LobbyPlayerState calls the event dispatchers in the gamestate, and sets the values for the player's name and if the server is running the begin play, sets its own playerstate as indicated as the host.

misty birch
#

it's just the boolean i care about

#

I simplified it, this prints false even after being set to true. There is only one of this component entirely and it's valid.

pearl walrus
#

oh wow, ok im going to try and implement everything youve shown and explained

quasi tide
#

Datura going above and beyond, as usual.

mystic hazel
#

Anyone know why when I have two standalone games in separate windows the one which has mouse focus has a significantly higher framerate? I'm not sure how to fix this.

#

I'm not bottlenecking on my GPU or CPU so not sure why this is happening.

dark edge
#

What is the nature of your projectiles, are they bouncy and chaotic or more like actual bullets (pretty damn predictable)?

urban crystal
#

they're pretty predictable. they essentially function like a rocket, go forward until hit a wall and explode

fossil spoke
#

The UT Source Code does this.

#

While its very very old code, its still a relevant resource in showing how you can predict projectiles.

ancient adder
#

Is object replication order not guaranteed?

Fatal error: [File:D:\build\++UE5\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\UObjectGlobals.cpp] [Line: 3240] Object B None created in BP_ThirdPersonCharacter_C instead of A```
Object **A** is created in **BP_ThirdPersonCharacter_C** and Object **B** is created in Object **A** on server side
I had no issue until I did some changes, Not sure which change caused the issue so far
Will have to redesign if the order is not guaranteed but wanted to ask before making a decision, Thanks!
neon summit
#

its not exactly called that but something like that forget the exact name

fossil spoke
mystic hazel
neon summit
mystic hazel
neon summit
#

yeah

mystic hazel
#

I saw a suggestion to override the viewport class and change some of the settings.

neon summit
#

do you have two monitors?

mystic hazel
#

Ya

neon summit
#

I think that has something to do with it but not sure.

#

unchecking that was the only thing I really found for that issue

#

online

mystic hazel
neon summit
#

possibly. what are you on?

#

I think it did it on 5.2 for me

#

maybe 5.1 don't remember

lost relic
#

Not sure whay I can't rotate the mesh on the server but I can rotate the whole character, would be fine but rotating the whole character is causing my character to spin when playing as standalone or listen server .

thin stratus
#

Probably cause the Character Movement Component modifies it

lost relic
thin stratus
#

Idk what you mean with the "Messing up standalone"

#

You'd need to properly explain the issue

lost relic
#

Basically the set actor rotation is causing my listen server character to constantly spin like its caught in a loop. because the mean vector of the of my motioncontrollers and camera are creating a rotation vector for the torso arrow which is how im setting the mesh rotation, I Have 2 possible solutions either prevent the server actor rotation from affecting listen\stanalone characters or find a way to just also rotate the mesh on the server which would be preferd but that does not seem to be working

floral fox
#

to get an item from an array on the server do i pass the index to the server?

maiden flame
crude kelp
#

Steam sessions for linux not working I dont find any session grrrrrr
4.27 steam sessions plugin not working in editor for both windows and linux
We will have to switch to dedicated server

lost relic
violet sentinel
maiden flame
#

I'm just asking to clarify if it only affects either the host or a client/connected player, and not both the same way.

lost relic
#

yes

#

This Is being run Locally , , and second pic is what Im running on the server

maiden flame
lost relic
#

It not being done on input But updated from tick

maiden flame
#

Sorry, I mean input as in the variables like mesh and rotation going into the Set World Rotation node (on the server, like you tried earlier before using Set Actor Rotation).

lost relic
#

Yes tried all that . nothing seems to make the mesh rotate , only the actor, And I would be fine with that But as soon as im on either standalone or listen server that causes the character to endlessly spin

maiden flame
#

Does it spin if you only rotate the actor locally and not on the server?

#

If not, you could set the actor rotation on the server with a RepNotify with Replication Condition Skip Owner/Simulated Only.

frail barn
#

when i test-run my multiplayer game in editor, main-window client is working fine, but second one is have an errors
when i chose a character and a team in a main test window first, and then do the same for a second client - all is working fine
but, if i chose a character and a team for a second client before i chose it for a first client - the second one (client 2), in a small window, has an errors
how its can be?
they run same logic, net mode is "play as client", so they should be the same
what i need to do additionally for a second client?

thin stratus
#

Without code, not easy to answer

lost relic
#

So Im sending the world rotation of my mesh to the server . which is what Sets the actors world rotation, works fine!.. But I dont know why it wont work on just the mesh.

half umbra
#

Is ok?

#

0,005801125 mb, i don't know

half umbra
#

(NetProfile)

#

someone can help?

oak prawn
#

Is it a problem if I enter the "net update frequency" value of my car pawns as more than "100"?

#

For example, what kind of problems would I encounter if I set the value to 1000?

silent valley
#

Defaults for those are 30 and 120 respectively

lost relic
#

Did this and it helps a bit, Now Playing as client1, client 2 see's my character rotating , and if I play as the listen server Im not spinning anymore , But client 1 can't see my character rotating.

sinful tree
# frail barn i hope its fine? https://blueprintue.com/blueprint/y2ptb7iu/ https://blueprintu...

You're using "Get Player Controller 0" which could be part of the problem. Unfortunately BlueprintUE doesn't show you the type of RPCs you're using so it's hard to discern whether or not this would actually be a problem. As you're working off of the character, you can get its controller (screenshot below) rather than using "Get Player Controller X". It's best to avoid the "Get Player X by Index" type of getters in multiplayer as you can't always guarantee that it's the player you actually want to get.

Would you be able to post the errors you're receiving?

oak prawn
#

Vehicle mechanics do the same for server and client, I don't experience any vibration or motion synchronization issues.

silent valley
#

Ok I think you should find out why it's flickering as that's definitely not right!

oak prawn
frail barn
chrome bay
elfin thicket
#

Hi all, I'm encountering a very annoying issue where my server is crashing when using a cooked server & client with alot of Blueprint RPCs, but never in the Editor. I don't have any warnings or errors when running in the editor (play as client) which makes me worried that this is extremely hard to debug. The error is shown in the snippet below. Does anyone have experience of this, or knows how I could extract more information about the crash than I am receiving now ?

The only error output:


Script Stack (0 frames) :

[2024.04.16-20.55.22:152][347]LogWindows: Error: appError called: Assertion failed: this->PropertyClass [File:D:\UEVersions\UnrealEngine-5.3.2-release\Engine\Source\Runtime\CoreUObject\Public\UObject\UnrealType.h] [Line: 2821] 

I am new to Unreal and in my desperation I am now rebuilding the engine by adding some logging to that method, no clue if it will work though..

    virtual FString GetCPPType(FString* ExtendedTypeText, uint32 CPPExportFlags) const override
    {
                // adding som logging
        if (!this->PropertyClass)
        {
            if constexpr (std::is_base_of<UObject, InTCppType>::value)
            {
                const UObject* Obj = static_cast<const UObject*>(this); 
                UE_LOG(LogTemp, Error, TEXT("PropertyClass is nullptr. UObject Name: %s"), *Obj->GetName());
            }
            else
            {
                UE_LOG(LogTemp, Error, TEXT("PropertyClass is nullptr and 'this' is not a UObject."));
            }
        }
                // end of logging
        check(this->PropertyClass); -- THIS IS WHERE IT FAILS --
        return this->GetCPPTypeCustom(ExtendedTypeText, CPPExportFlags, 
            FString::Printf(TEXT("%s%s"), this->PropertyClass->GetPrefixCPP(), *this->PropertyClass->GetName()));
    }

Any help appreciated!

chrome bay
#

Calling a function on a nullptr would be my bet

#

Attempting to debug this is a non-debug build is borderline useless. Cook the game then run it from VS in DebugGame mode or something

#

Should also get a callstack too which will show what leads up to it

elfin thicket
#

That sounds like what I needed to know, I'll just run the Server in debug from VS and then run some clients using the client binary I guess?

chrome bay
#

Should work yeah

#

You just need it to have been cooked first

elfin thicket
#

Alright, I'll try it. Thanks alot!

torpid lantern
#

Is there a way to override an on rep notify for a child's variable?

Or do I need to move the whole var to the child?

#

Or maybe the on rep calls a function, which only the child has. Is there a better way?

chrome bay
#

You can make the OnRep virtual

#

Assuming that's what you're asking anyway

#

sounds slightly cursed either way

real ridge
#

is this FPS independet movement ? when delta world seconds multiply is at the end right before setting location or nah? because I have feeling like when I play it with lower fps I am slower

elfin thicket
# chrome bay Attempting to debug this is a non-debug build is borderline useless. Cook the ga...

Yep that was not very helpful 😆

[2024.04.16-22.24.22:592][553]LogTemp: Error: PropertyClass is nullptr and 'this' is not a UObject. // lol

[2024.04.16-22.24.22:592][553]LogOutputDevice: Warning: 

Script Stack (0 frames) :

[2024.04.16-22.24.22:602][553]LogWindows: Error: appError called: Assertion failed: this->PropertyClass [File:D:\UEVersions\UnrealEngine-5.3.2-release\Engine\Source\Runtime\CoreUObject\Public\UObject\UnrealType.h] [Line: 2834] 

DebugServer here we go

dark edge
#

assuming that is being called delta seconds apart, it should be framerate independent

real ridge
# dark edge is this being called on tick?

it is on tick, but i am now thinking if i should not move all functions which are on tick to timers because there is really a lot on tick, yea it should be independent but I tried game on low end laptop and i had feeling like on 30 fps it was slow idk how measure it

dark edge
real ridge
dark edge
#

how is speed being changed?

real ridge
dark edge
#

show the code

#

for how speed is being changed

real ridge
#

its complex, there is air density, thrust, net force, pitch adjustment,+ gravity, and at the end I am putting it like this and its on tick

#

was thinking use event timer for it instead tick

#

then timer should be same for every computer even with low fps

dark edge
#

Tick -> calculate acceleration -> calculate new velocity -> calculate new location

#

do it in that order, using delta seconds when integrating from accel to velocity and velocity to location

#

and use vectors the whole way to make things easy

#

Still haven't seen where Speed is set

real ridge
dark edge
#

when is this variable changed?

#

does it change?

#

with thrust and drag and whatever?

real ridge
dark edge
#

ok that looks correct

#

I'd still reformulate to use vectors though, it'll be a lot simpler

#

Acceleration = All your math and stuff
Velocity += Acceleration * dT
Position += Velocity * dT

warped berry
#

I am using OnRep_PlayerState to set player names, but it seems that simulated characters do not have a valid widget component at that time(during OnRep_PlayerState), when do components become valid on simulated proxies?

devout sonnet
#

Does anyone feel like helping me? I really don't understand RPC's. I've watched several videos and read epic's documentation but this is proving a bigger sticking point than I would have thought.

urban crystal
#

looking into the actual code of making this, plan was to make a child of the projectile movement component with the ability to blend into the location of the real replicated projectile. but looking at the code theres a bunch of projectile movement interpolation stuff, is that at all what I want?

thin stratus
# devout sonnet Does anyone feel like helping me? I really don't understand RPC's. I've watched ...

You'd tell the Server about Array first after connecting to it. You can do that for example via your PlayerController. In its BeginPlay you could check for IsLocalPlayerController and then send a Server RPC that passes the Array from the GameInstance along. You'd then need to set it somewhere where it can replicate. For example in the PlayerState of that Player. The variable in the PlayerState would need to be set to Replicate to make it to the Client.

devout sonnet
thin stratus
hearty dune
#

reading through ue replication docs

(for example an fps game), server would only need to be sent projectile data when shooting a gun, and a client would take that data and do the rest (like spawn sounds, bullet hole decals, etc), right?

#

and of course hit events would need to be run on server then sent to clients?

#

ping me please

north jacinth
#

how good is the GAS replication? Is it rollback? Is there a relatively easy way to do server validation for state machines? or should I look into other avenues for netcode? I only have a bit of experience with game networking and that wasn't particularly low level, although I have coded animation variable serialization/deserialization myself in the past (not in UE5, and it was just encoding/decoding to and from a buffer that went into a packet, not the actual networking stuff).

#

I don't really want to have to do netcode myself unless I absolutely have to because it seems like a pain and might involve making plugins to interface with external libraries.

thin stratus
#

@hearty dune Not as simple to answer tbh. It's probably useful to draw three (horizontal) timelines for Server, OwningClient and SimProxyClient version.

In most cases Owning and SimProxy might be the same for a Projectile.

There are several events during the lifetime of an actor that are calling on all 3. BeginPlay for example, or Tick. As well as CollisionEvents. Those happen naturally due to the Projectile colliding on everyone.

There are parts you may want to only do on the Server, such as applying Damage. There may be parts you may want to also do on the Clients, such as spawning Effects.

Without some more involved prediction system, if you simulate the hits on the clients for effects, you could always run into the situation where they show a hit but the server missed. But you get instant feedback. If you want the feedback to be true all the time , you could multicast the hit to clients, but that adds a delay of course.

You gotta think about this for a lot of things, but this is the first few thoughts

thin stratus
# north jacinth how good is the GAS replication? Is it rollback? Is there a relatively easy way ...

GAS uses UEs built in replication. You usually don't replace that but rather tell UE how you wish to serialize data if you want to improve bandwidth.

GAS itself also has some prediction built in with some rollback for side effects (such as gameplay effects that were predictively added), but it's not as strong as it could be. There are a few things you can't predict and if GAS has to sort of work with another simulation, such as the CMC that has its own prediction system, you will get a bit of a headache. But that is true of a custom system you'd write too.

north jacinth
thin stratus
#

If you want to go custom, I would suggest looking into the NetworkPredictionPlugin and making a custom GAS system as a Simulation there, and use Mover for movement instead of the cmc. However, this is in its early stages and needs some additional work to go smoothly

thin stratus
#

Problem most people will face is using an Attribute for speed, or Stamina

#

CMC wants to run all of this through its ServerMove setup, with saved moves to replay on corrections etc.

#

GAS attributes aren't part of that, and altering them via GEs is only partially predictable

north jacinth
chrome bay
#

It's a pretty common thing, but last time I asked, even Epic didn't have a solution for it.

latent heart
#

Not strictly multiplayer, but does anyone have any experience with Mover and demo playback? It just instantly crashed for me because it's trying to send a loading archive, rather than receive it.

floral fox
#

how do i get delegates to work in multiplayer, the delagates are only happening on client and it doesn't get bound in multiplayer but works fine in single player

mystic nebula
#

What is the currently recommended approach to storing players' sensitive data such as the amount of gold, equipment in multiplayer games?
Is updating this type of data through HTTP API calls by VaRest a sensible approach? And update dynamic data like health, stamina already on the game engine side?

latent heart
#

Why would an http api call be better than a game engine channel?

#

You don't have to send all data to all players.

mystic nebula
latent heart
#

Put the data on the player state and mark it to replicate to the owning player only.

chrome bay
floral fox
lost inlet
#

what do you need to do

mystic nebula
floral fox
#

binding to a function refresh when a replicated variable changes, specially in client ui

lost inlet
#

so broadcast from OnRep?

#

also from server code you would have to manually call the OnRep after setting the variable

#

in C++, BP handles that for you

latent heart
#

How you handle it on the server is up to you.

floral fox
lost inlet
#

so where are you binding

floral fox
#

in client on a ui element

lost inlet
#

yes details please

#

what creates the UI? where in the UI element?

#

is the thing that contains the delegate valid?

#

did you debug this?

latent heart
#

And just to be sure, you aren't expecting a ui element to bind to a function on the server from a client or vice versa?

lost inlet
#

did you verify the broadcast is even triggered? you can broadcast a multicast with an empty invocations list

floral fox
#

so many questions, but first it works fine in single player so it binds fine and broadcasts fine

#

im only trying to do it on client side nothing on server

lost inlet
#

well UI is only on the client, so yeah

#

you need to show this setup, as well as the broadcast end

floral fox
#

the tick is running only on client here

nocturne quail
#

I have an actor which is SetIsReplicated = true; and have some components like StaticMeshComponent and Box Collision in this AActor, so spawning this actor doesn't replicate the static mesh but it replicates the Collision box

what can be the issue?

#
    UPROPERTY(VisibleAnywhere)
    UStaticMeshComponent* PickupMesh;
    UPROPERTY(VisibleAnywhere)
    UBoxComponent* OverlapDetectionBox;
APickupBase::APickupBase()
{
    PrimaryActorTick.bCanEverTick = false;
    PickupMesh = CreateDefaultSubobject<UStaticMeshComponent>("PickupMesh");
    PickupMesh->SetCollisionProfileName(TEXT("NoCollision"));
    PickupMesh->SetupAttachment(Scene);

    OverlapDetectionBox = CreateDefaultSubobject<UBoxComponent>(TEXT("BoxComponent"));
    OverlapDetectionBox->SetBoxExtent(FVector(40.0f, 40.0f, 10.0f));
    OverlapDetectionBox->SetHiddenInGame(false);
    OverlapDetectionBox->SetCollisionResponseToChannel(ECollisionChannel::ECC_Pawn, ECollisionResponse::ECR_Overlap);
    OverlapDetectionBox->SetupAttachment(Scene);

    SetReplicates(true);
}
lost inlet
floral fox
lost inlet
#

doing the replicated part after the fact always ends in tears

#

does the if condition ever hit if you add a breakpoint and run as a listen server?

floral fox
#

havent debug the code, just print stringed it and else only shows

lost inlet
#

print debugging is also another way to deliberately handicap yourself

#

rather than using the actual debugger

#

and on the BP side, the screenshot is a little too overcropped

#

and did you breakpoint the binding to see if the inventory component is valid?

floral fox
#

yeah its is validated

nocturne quail
#

if i set set is replicated for PickupMesh then it replicates, else the static mesh don't show on clients

#

but OverlapDetectionBox don't need set is replicated, it replicates without it

#

confusing

frail barn
kindred widget
# floral fox functions arent getting bound when running on listen server so cant broadcast

Most likely, the delegate isn't your issue. The OnRep is. OnRep normally only runs on a client and is avoided on the server machine. This is unfortunately annoying on a listenserver. So you have to do some extra code to handle it.

{
    SomeVariable = NewValue
    if (GetNetMode() != NM_Client)
    {
        MyDelegate.Broadcast();
    }
}```
```void MyOnRepThing()
{
    MyDelegate.Broadcast();
}```
lost inlet
#

I mentioned this already

#

but generally, I call the OnRep directly from the setter

lusty sky
# nocturne quail

why you replicating mesh components and collision boxes?
the client should spawn the same actor if you have a static mesh set on the actor

nocturne quail
lusty sky
#

keep in mind that the game mode does not replicate to other clients

lost inlet
#

usually you would replicate something like a pickup type on the individual actor and then the client can deduce what it's supposed to look like

limber gyro
#

a wild guess here, is the meshComp set to replicate? not sure if that would make a diference if the parent is set too replicate

nocturne quail
modern cipher
#

usually you should grab the mesh and materials etc... from a data asset or something like that and provide an asset reference or index to grab that from the client side

nocturne quail
nocturne quail
#

but it is not replicating

lost inlet
#

you generally don't replicate this

limber gyro
#

are doing anythig to it in code? does ur actor have logic to hide it or something similar? have you tried this on other actors?

lost inlet
#

replication is getting the message to the client by saying as little as possible

#

so in this case, sending the pickup type, whatever it is, if it's in a DA or whatever, send that, and then the client can figure it out on their end

nocturne quail
lost inlet
#

and why would either need to replicate, ever

limber gyro
#

make a new bp with the same components that you have on the faulty one and spawn that BP see if you can see the mesh, if you can see it than its probably a "my code is doing bad things" issue

nocturne quail
#

I tried to replicate the ID and Type of the item, still not replicating to all clients the pickup mesh

lost inlet
#

so yeah you have the right idea there

modern cipher
#

Apart from an actor component, other stuff attached to an actor probably should not replicate.
meshes, materials, etc are accessible to both sides

lost inlet
#

so when the client knows the type of item (through an OnRep or whatever), then you can set the mesh clientside

#

since it knows what type of item it is

limber gyro
#

there shouldnt be the need to set anything, if you spawn an actor on the server and it replicates it should appear on the clients

nocturne quail
#
void APickupBase::InitPickup(EItemType NewItemType, FText NewName, FText NewPrefix, UStaticMesh* NewStaticMesh)
{
    if (GetLocalRole() == ROLE_Authority)
    {
        Init(NewItemType, NewName);

        UI_prefix = NewPrefix;
        ThisItemType = NewItemType;
        ThisItemName = NewName;
        ThisItemStaticMesh = NewStaticMesh;

        PickupMesh->SetStaticMesh(NewStaticMesh);

        OnRep_InitPickup();
    }
}

void APickupBase::OnRep_InitPickup()
{
    // Call the parent class Init function to ensure proper initialization
    Super::Init(ThisItemType, ThisItemName);

    // Set the static mesh on the client side
    PickupMesh->SetStaticMesh(ThisItemStaticMesh);
}

this is how i am initializing the pickup when it is spawned by server

lost inlet
#

what is that Super:: doing there

#

but sure, you can replicate a UStaticMesh*

nocturne quail
limber gyro
#

give that pickup meshComp a default value, comment that "setStaticMesh" and see if the problem is there

nocturne quail
limber gyro
#

ok so ur issue is on the OnRep

#

is it being called at all?

nocturne quail
#

yes i logged it

limber gyro
#

have you check if "thisItemStaticMesh" is null?

nocturne quail
#

no checked but on server it is shown

limber gyro
#

it might be null on the client

#

also check the transforms

#

you might have a weird transform going and the mesh might be there just very small and you cant see it

#

just guessing here

nocturne quail
#

i ejected in the game checked the spawned actor, it has an empty static mesh

limber gyro
#

ok so now u dont have an invisible mesh problem

#

u have a no mesh problem lol

nocturne quail
#

😄

lost inlet
#

logged it? just use the debugger

nocturne quail
#

yes i setted a bp on on-rep and it crashed

#

its mean it was called

limber gyro
#

your probably not setting that var on the client that would be my guess

nocturne quail
#
    UPROPERTY(VisibleAnywhere, ReplicatedUsing = OnRep_InitPickup)
    UStaticMeshComponent* PickupMesh;
lost inlet
#

why does that have replication?

nocturne quail
#

setting it on on-rep

#
void APickupBase::GetLifetimeReplicatedProps(TArray<FLifetimeProperty>& OutLifetimeProps) const
{
    Super::GetLifetimeReplicatedProps(OutLifetimeProps);

    DOREPLIFETIME_CONDITION(APickupBase, PickupMesh, COND_InitialOnly);
}
lost inlet
#

well you should consider ThisItemStaticMesh or something instead

limber gyro
#

im not sure if i am correct on what im gonna say but, that thing is not replicated, so its never gonna call that on_rep?

#

even if it were, on rep is only called on variable changes, i dont think a mesh is ever going to change

#

so the on rep on client shouldnt even be called

#

i might wrong tho

lost inlet
#

the component isn't going to change

nocturne quail
lost inlet
#

this is the server's perspective

limber gyro
#

but i think if it was being called on the client it should hit that breakpoint twice no?

limber gyro
lost inlet
#

yes, though that's why you add {,,UnrealEditor-Core}::GPlayInEditorID and UnrealEditor-Engine!GPlayInEditorContextString to your watches

lost inlet
limber gyro
#

@nocturne quail ur probably going about your solution the wrong way

nocturne quail
lost inlet
#

like I haven't given you a very explicit suggestion

nocturne quail
#
        UI_prefix = NewPrefix;
        ThisItemType = NewItemType;
        ThisItemName = NewName;
        ThisItemStaticMesh = NewStaticMesh;

any of these i can use instead?

lost inlet
#

though I wouldn't replicate the static mesh asset itself (over the network, it's the path to the asset), I would replicate what kind of weapon is, and then figure it out on the client

#

but you can

limber gyro
nocturne quail
#

replicating type doesn't works and i tried ThisItemStaticMesh and now the mesh replicates

    UPROPERTY(ReplicatedUsing = OnRep_InitPickup)
    UStaticMesh* ThisItemStaticMesh;
visual mountain
#

Thank you to everyone who has been helping me with my questions on the engine. I have finally completed a working prototype of my multiplayer game and am quite happy about it. While I begin creating the models and animations for the game I still have something to inquire upon. Do I need a server list, and if so the reasons why.

sacred depot
#

Hello everyone, does anybody know a way to force the server to trust the client when it comes to collisions? I'm making a plugin for procedural world generation where the mesh of procedural world only exists on the client to save bandwidth, but because of that clients just fall right through it since the server doesn't allow a mesh only existing on the client to manage collisions

limber gyro
#

GetCharacterMovement()->bIgnoreClientMovementErrorChecksAndCorrection = true;
GetCharacterMovement()->bServerAcceptClientAuthoritativePosition = true;

#

see if these work

limber gyro
sacred depot
#

Ok, thanks a lot! I think I'm going to try the second approach first because it looks more safe when it comes to cheating (although anti-cheat is not high priority for my project)

narrow fog
#

Can I get a sanity check on how I'm planning on organizing? Project is a TFT-like game, basically 30 seconds to buy units from a shop/place them on a board, 30 seconds where you're matched against another player and the units fight. I feel like the Game State can/should be doing more?

I'm also not sure where I should handle the actor pool...the Buy Unit function will be called from the UI, so that'll be a server RPC that will decrement the cost from the PlayerState, then the Game State will handle pulling the actor from the pool and placing it on the board? Or the Game Mode? I'm not really sure

round bobcat
#

The teams in my multiplayer game are not working. It works fine in the editor, but once I package it and try it on multiple devices, the teams no longer work. The teams are split into two, blue and red, but when I package and send my to other devices, the blue team is normal, but the other players do not have a team, causing their material to be the no team material. Here is my code.

Character cpp: https://dpaste.org/cNMXZ
Character h: https://dpaste.org/S5ZJL
Gamemode cpp: https://dpaste.org/Y3SOS
Gamemode h: https://dpaste.org/jHq5F

pure brook
#

Just... what??
The host can see their own weapon when they pick it up but the other clients can't see the host holding it, but if one of the connected clients pickup their weapon, they can't see it themselves but the host can see them holding it.

#

I am so confused as to what the issue could be, I have set the component to replicate and the code that sets the static mesh component to visible runs on the server.

rocky bobcat
#

Hey, thought about this today, probably a really easy answer. Should you delete server code in the client for dedicated server builds? or is "is dedicated server" "switch has authority" good enough to prevent cheating?

lost inlet
chrome bramble
#

hello, i know this is an old post but i ran into a tangential issue similar to this. I saw you mentioned pre written data assets and data assets that you have somehow managed to create at runtime. while i do not need them to be replicated, i am stuck on how i can create data assets at runtime. could you maybe point me in the right direction? thanks in advance, and sorry if im bothering you 😅

#

if you have any other solutions to this problem of storing data related to assets created at runtime, i would love to hear that as well!

stoic lake
#

Is it possible to servertravel using this node?

#

I'm async loading the level and only want to travel when all players have preloaded the level

magic helm
magic helm
#

Just be aware that this is considered a regular runtime object instead of a data asset at that point

chrome bramble
magic helm
#

Yeah don't try to do that

#

treat it like its an actor you spawned at runtime basically. Nothing is definite, try to make it as deterministic as possible and being smart about using a minimal amount of data(only stuff you need) when serializing it

chrome bramble
#

hmm, all i really need in the data asset is a bunch of soft references to some static meshes, a bitmask flag, a few assorted primitive variables and a single custom structure. i guess i could nest all of that inside another struct. Problem im thinking of right now is that i am also using the data registry module and iirc that depends on data assets directly, not just data tables

magic helm
#

Yeah I dont recommend storing anything but primitive types(not soft pointers or anything referencing other assets) in data tables because it wrecks projects regarding asset loading...

magic helm
sinful tree
nocturne quail
#

is there any difference between starting the dedicated server with 2 clients using the editor or launching from the command line and joining it using command line?

lost relic
#

I need help, I have created a problem for myself, I have a system in play that rotates my characters skeletal mesh, and Im taking that rotation value and running it on the server to rotate that actor instance. Works great for clients and the server instance is seen rotating, but if I play as standalone or listen server , Because Im playing as the server and its ran on the server It spins my character in an endless loop.. First node is the logic that sets the initial values , second is me sending those to the server where the rotate actor is running

honest rain
#

hello ! 🙂 I just did an implementation of dash in multiplayer, and while it works, I want to make sure that my way of doing it is correct and while possibly not optimal, could be somewhat be considered functional ! any comments appreciated 😄

honest rain
sinful tree
#

Input > RPC To Server > Server Calculates Dash Speed > Launches character

honest rain
sinful tree
#

Not sure what you think better means here or why you would need a client RPC.

karmic panther
#

quick question how do you specify players? and how do you target all players in the server

honest rain
honest rain
lost relic
sinful tree
karmic panther
sinful tree
karmic panther
#

so Open Level would be more appropriate?

sinful tree
#

And "owning client" literally means the client that owns the actor the RPC is on. If you wanted other clients to execute it, then you'd have to use a multicast.

sinful tree
karmic panther
#

oh ok ok, it worked thx for the insight

karmic panther
sinful tree
#

The server will automatically have all connected clients move to the map the server is moving to, and keep them connected.

karmic panther
#

ohh i see

#

This node right?

#

it works 👍

quartz star
#

Hello there, Im trying to make STEAM working with my project.
I copy-pasted the DefaultEngine.ini from the Unreal website but i get these errors in my log.

[2024.04.17-21.33.51:118][409]LogSockets: Warning: Unable to load SocketSubsystem module STEAM
[2024.04.17-21.33.51:118][409]LogNet: ReplicationDriverClass is null! Not using ReplicationDriver.
[2024.04.17-21.33.51:118][409]LogNetCore: DDoS detection status: detection enabled: 0 analytics enabled: 0
[2024.04.17-21.33.51:118][409]LogSockets: Warning: SteamSockets: Cannot get information on an invalid socket handle, returning null
[2024.04.17-21.33.51:119][409]LogNet: Warning: Could not create socket for bind address 76561199131222577, got error SteamSockets: setsockopt SO_BROADCAST failed (0)
[2024.04.17-21.33.51:120][409]LogSockets: Warning: SteamSockets: Cannot get information on an invalid socket handle, returning null
[2024.04.17-21.33.51:120][409]LogNet: Warning: Could not create socket for bind address ::, got error SteamSockets: setsockopt SO_BROADCAST failed (0)
[2024.04.17-21.33.51:121][410]LogNet: Warning: Encountered an error while creating sockets for the bind addresses.
[2024.04.17-21.33.51:122][410]LogNet: Error: InitBindSockets failed:
[2024.04.17-21.33.51:122][410]LogNet: Warning: Failed to init net driver ListenURL: /Game/Maps/SessionMap?Name=Player?listen:
[2024.04.17-21.33.51:122][410]LogNet: Error: UEngine::BroadcastNetworkFailure: FailureType = NetDriverListenFailure, ErrorString = , Driver = GameNetDriver IpNetDriver_0
[2024.04.17-21.33.51:122][410]LogNet: Warning: Network Failure: GameNetDriver[NetDriverListenFailure]:
[2024.04.17-21.33.51:123][410]LogNet: NetworkFailure: NetDriverListenFailure, Error: ''
[2024.04.17-21.33.51:123][410]LogWorld: Failed to listen:
#

it does connect with steam, i see the overlay

#

but i cant create any sessions

half umbra
#

Hi, I always struggle with this, how best to invoke an RPC. I know that for Begin Play it is best not to call RPC at all and it is better to use e.g. In the case of character On Possess or in game mode OnPostLogin. I would like to know the order, where and when to call what without using dirty solutions such as using the "Delay" node, can anyone help?

pure brook
devout edge
#

I've seen some cases (e.g: Lyra dash ability) where gameplay abilities use animation montages with "Force root lock" enabled and the "Apply Root Motion Constant Force" ability task, rather than using root motion animation montages.

Is there a specific reason for this method? I thought root motion animations were pretty reliable in multiplayer?

Maybe it's just so dash ability can use adjustable movement distances rather than using the movement baked into the animation?

novel zinc
stoic lake
#

Hi, how can I make it so seamless travel does not show the transition map at all? I really want seamless travel to be seamless

#

I just want the players to pop into the new map as soon as the level is loaded without showing a black screen in between

sinful tree
# half umbra Hi, I always struggle with this, how best to invoke an RPC. I know that for Begi...

You invoke an RPC precisely when you need to. When you need to communicate something to the server (ie. having a client tell the server it is wanting to do something or feed the server data), when you need to communicate something to the owning client (ie. having the server tell the client to do something or feed the client some data that isn't replicated already through properties), or multicasting when you need all clients to do something. One key aspect of multicasting is realizing that it's not something that happens on a client if they do not have that actor relevant at the time of the multicast - so if you multicast something setting some values on clients and a player joins later, that player who joined later wouldn't have that value.

Depending on what you are hoping to accomplish, no RPC may be required at all. You can utilize "RepNotify" variables that then give you functions that will execute when clients receive a new value, allowing you to drive additional logic when variable changes are received. There is no cut-and-dry answer to when you should do certain things, as it's all very dependent on what you're trying to do and what kind of state things are in and what data you need to perform the right action.

sinful tree
wet nymph
#

Hi, how can I setup a multiplayer game in a way that you can connect to other player using directly their IP?

sinful tree
wet nymph
#

Ok, I'll try it, thank you

civic turtle
#

anyone possibly knows why this always returns 1? im using the steam subsystem

Info.CurrentPlayers = Result.Session.SessionSettings.NumPublicConnections - Result.Session.NumOpenPublicConnections;

#

i cant seem to get a number of the current players in the session

restive sage
#

Hi, I'm pretty much a total n00b, and am trying to learn, and am reading some documentation, and i have a basic question. Can someone sum up what replication is in 1 sentence? What is the difference between a non-replicated component and a replicated component? Is something "replicated" on the server? And non-replicated components are only created on the client?

dark parcel
devout sonnet
#

Is there a reason why the pins are different on mobile? I can't see the compendium pin on here.

dark parcel
#

I'm on mobile and can see them just fine

#

Click on the search button on the top right corner, then select the pin category

devout sonnet
#

Do you see the compendium there?

#

It's the first pin on PC but not on Mobile.

dark parcel
#

Gotta scroll down but it's there

#

The order maybe different I guess

sinful tree
# restive sage Hi, I'm pretty much a total n00b, and am trying to learn, and am reading some do...

Replication is the process of sending data from the server to clients.
A replicated component is a component that can have replicated properties and can then also be used to send remote procedure calls (RPCs), however, this replicated component must be attached to a replicated actor for this to work.
Replication only occurs on the server, meaning you can have replicated properties and change their values on clients, but unless the value is changed on the server, other clients will not receive the value.
Non-replicated components mean that they will not send their data over the network to clients, however, not all data contained within a replicated component will be sent to clients - you must mark properties within the component as replicated as well.

restive sage
#

ah okay, cool, thank you,

dark parcel
#

The general recommendation is to read the compendium 6 times, then another 6 if you still don't get it. The concept takes a while to soak in

devout sonnet
thin stratus
#

Mobile pin order is by alphabet or something.

#

Actually I think it's by message date

#

While desktop is by pin date

chrome bramble
# magic helm This makes me want to ask why are you creating a runtime data asset? My reasonin...

well, i dont really have to use data assets, its just what most of my systems are written around. what i am doing is basically taking static mesh assets letting the user group them up in various ways to create "prefabs" out of them. Im then letting the user inject that prefab into the list of buildables. the data asset only contains information related to the primitive static meshes, so to inject the new prefab, i figured id have to make a new data asset right when the user made said prefab and then save the proper values into it programatically. I guess a structure is better suited for this, i was hoping to avoid rewriting large parts of the system but oh well

chrome bramble
pure brook
stoic vine
#

Hi everyone, currently I am working in Lyra starter game and I want to make a zombie based on Lyra Character but the problem is:

  • I cannot see where the character play their animation
  • secondly I cannot see the logic AI Perception Damage Sense, I intended to make zombie react and move toward to player whenever they being damaged
  • lastly if anyone know about how to spawn zombie but player cannot see they spawn immediately I would very grateful
dark parcel
#

Server rpc = running the code in the server machine

pure brook
dark parcel
#

Nope, that would be the wrong move too

#

Anything that needs to be sync should be stateful

#

In this case you can create a bool variable that is set as repnotify

#

When u need to set the value, do a server rpc.

In the repnotify function you can hide or unhide the mesh

pure brook
#

Ah I think I get it now, cheers!

dark parcel
#

Multicast is a trap for multiplayer Explorer. You mostly want to use it for a fire and forget scenario like playing a foot step sound, or special effects.

Anything that needs to be in sync, you don't use multicast because it is not reliable and can be dropped and in some cases just don't run on some machine (players that is outside relevancy or have yet join the game)

pure brook
stoic lake
#

How does level streaming work in regards to replication? Do I only need to load a streaming level on the server or should I do it on each client?

And if only 1 client needs to load a streaming level, does it also become visible on the server?

nocturne quail
nocturne quail
#

thanks

magic helm
# chrome bramble well, i dont really *have* to use data assets, its just what most of my systems ...

Yeah this sounds more like a data organization issue rather than a "make a data asset at runtime" issue, which won't solve the core problem. Like what I see is that you need to have the user have it's own runtime values that append onto the static(data asset) data's values and that gets resolved at runtime on what to favor. Makes it much easier to deal with and deterministic for online multiplayer too

chrome bramble
#

its a pain to fill in all the details again but oh well

maiden flame
#

I suppose you could use Network Profiler.

#

You can look at specific RPCs and replicated properties.

visual mountain
#

I have a very simple multiplayer listen server but was wondering if I should look into a server list/ browser list anyway.

surreal plaza
#

Is there an easy way to see all of the spacewar servers online easily on steam?

devout sonnet
#

Is anyone patient enough to walk me through my project? I've been watching a lot of videos and reading about replication but I can't seem to apply it to my simple project.

lost inlet
devout sonnet
#

I understand the concepts of replication, but I can seem to put it into practice in any way.

lost inlet
#

setting up? there's isn't usually too much to that other than UPROPERTY/UFUNCTION/GetLifetimeReplicatedProps (and the BP equivs)

devout sonnet
#

All I have for this project is 2 players select an array, that array is loaded into their game instance, both join a session, and then a button widget will print the array you select and a different button widget will print the array they selected.
And I cant figure out how to print the array the other player selected.

#

Both players can print the array they selected but that's as far as I can figure out.

quartz star
#

Im using EOS and i want to host a session but i always get this error:
LogScript: Warning: Script Msg: CreateSession - Cannot map local player to unique net ID

#

Im unable to host the session

#

Does anybody know why?

lost inlet
devout sonnet
#

I understand the pieces of it, but I can't seem to grasp the whole.

lost inlet
#

on an actor the client owns (player controller, pawn) you can have a call on server event

devout sonnet
#

So in the player controller, create a custom event that has its replicate setting to run on server?

hoary spear
#

Correct

devout sonnet
#

And then I call that event from the button that would print their array?

storm grove
#

can someone explain or link game mode option strings? I cant seem to find much information on them. I know its thing=value and ? As token seperators but i dont know what the tokens are or what’s available

sinful tree
storm grove
#

yeah but there are ones that already exist like listen and loby and others

#

im interested in the existing ones

shrewd tinsel
#

gi guys. why isnt my bool replicated, when the client rejoins the server?

dark edge
#

how are you setting it?

shrewd tinsel
#

usual method, i set it on server

#

i would assume it should get replicated eventually but it stays false when it should be true

#

maybe i should set it on tick (on server) ?

dark edge
#

setting it once when the race starts should be enough

shrewd tinsel
#

yea

#

i dont get it

#

i have this gamestate as a child of another blueprint gamestate, should i transfer the bool to parent class? (i assume thats unnacesarry)

visual mountain
#

Was wondering if server/browser lists were important to any online game, and if so the reasons why.

sinful tree
#

Server lists are good for a few reasons:

  1. You can let players find populated or under-populated servers.
  2. You can let players choose servers that have better ping to them.
  3. You can let players choose what level they want to play on, or look for custom settings that your game may have that they want to play with.
  4. If you're allowing players to host their own dedicated servers then you're allowing communities to form around specific servers as they can rejoin the same server again in the future.
visual mountain
#

Wow thank you very much, that helps a lot.

gray blade
#

How do i replicate camera pitch?

devout sonnet
#

For a card game, I can easily get the cards in the owners hand. but i cant figure out how both clints could display the opponents hand. There is a piece of replication knowledge that i'm missing.

#

"Cards in hand" exists on the player controller.

#

and I know how to create a custom event, and set its replicate to run on server and stuff.

sinful tree
# devout sonnet

Player controllers only exist on the server and the owning clients, so it's not necessarily a great place to store the hands that players have as other players will never be able to see it.
For now forget about "cheating" aspects but the PlayerState would likely be a better place to store their current hand as this is replicated to everyone and is a direct association to the specific player.
So this means you'd want your arrays stored on the PlayerState, and marked as replicated. If a player wants to know about a specific player's hand, they would just need their PlayerState and read the replicated value.

devout sonnet
devout sonnet
sinful tree
#

To know whether a playerstate is yours in an online multiplayer environment, you can get the player controller of the PlayerState, and if it is valid, you can check if its locally controlled, and if so, then that would be your playerstate.

devout sonnet
# sinful tree

This helped a lot! Hopefully this gets me out of my sticking point. I can't thank you enough.

harsh ice
#

Voice chat is not working after server travel...

#

I am using the Eos plugin

#

How can voice chat work after server travel too

split siren
lost inlet
#

There's very little documentation on it from what I've seen, but it'll be mostly compatible with how things currently are anyway

shrewd tinsel
karmic briar
split siren
neon summit
dark parcel
#

even late joiners should get server's value

#

and ofc multicast has no place in this context

neon summit
#

I didn't really see the context

tardy fossil
#

repnotify functions dont get called before beginplay ever right?

lost inlet
#

repnotify functions absolutely get called before beginplay

#

you can check HasBegunPlay though

tardy fossil
#

oh dang for some reason i assumed they wouldnt fire before beginplay.. time to fortify some logic

hexed pewter
#

What would be an alternative to using OnlineSubsystemSteam, integrating steamworks sdk?

woven basin
# tardy fossil oh dang for some reason i assumed they wouldnt fire before beginplay.. time to f...

One of the things I've learnt hanging out in this channel from the experts - never assume anything about timing of replication for anything. always assume something can fire before/after something else regards of how you code it - i.e. due to packet loss and weird engine things.

I can it the Schrodinger replication theory; something can replicate before or after what you expect; and you wont know until a crash report comes in.

shrewd tinsel
shrewd tinsel
dark parcel
dry gust
#

Is Iris replication enabled by default in Lyra? I've put a bunch of breakpoints around some initial functions but none of them are triggered.
UReplicationSystem::Init doesn't get called either

I also tried disabling "ForceStandaloneNetMode" in World Settings bud had no difference

I would be glad for any information on how to launch and debug Iris

I downloaded the project from Epic Marketplace and am using binary build 5.3

cloud zodiac
#

Does someone has a fucking idea of what error that is : Not enough login credentials to launch all PIE instances, change editor settings

shrewd tinsel
#

on server = true
on client = false

upbeat basin
#

Is the recommended place for notifying a character is possessed and do setup related to that OnRep_PlayerState? Regardless of dedicated server, listen server and client?

quasi tide
#

No - in the possession callbacks

#

For controller or pawn

upbeat basin
#

Isn't that (ACharacter::PossessedBy) server only?

quasi tide
#

AcknowledgedPossession on the controller, then call a custom function

#

(For Client)

lost inlet
#

there's even a nice little delegate for you that's called on both

quasi tide
#

ControllerChanged on the pawn if I recall

lost inlet
#

though here's the kicker, the client won't know about anything other than their own possession changing since controllers aren't replicated

#

the player controller has a delegate for when the controlled pawn changes

young spoke
#

necroing this... but came across this today and forgot about it

#

if ur using deferred spawn you gotta manually invoke FinishSpawningActor

#

otherwise BeginPlay() will not be invoked on server for that actor

crude kelp
#

Hey people, any one did host a unreal server in AWS with linux please please tell me ?

surreal plaza
#

Does anyone know if sandboxie needs any special setup for running UE games connecting to steam? I am running a packaged build and have added my steam_appid text file in the right place. It looks like it connects briefly, but then crashes with a Fatal Error! message.

lost inlet
crude kelp
#

Well swires

#

Easy thing I need to get an Unreal server dedicated or listen

#

problem is I am not sure what hosting platform to take

#

1 -Home basement

#

2 -Amazon

#

3 - Some other platform .....

#

What do you recommend

#

?

lost inlet
#

Well it depends on a lot of factors, and you mentioned listen which doesn't need any dedicated server infrastructure at all and costs $0

crude kelp
#

ahhhhhhhh

#

Yeah just a listen server

#

Easier right ?

lost inlet
#

But you only could get away with listen for something that isn't competitive

#

Host advantage and all that

crude kelp
#

what do you mean ? competitive for what ?

#

what host advantage?

lost inlet
#

Like a PvP game

crude kelp
#

ahhhhhhh

#

what are the pros and cons?

lost inlet
#

The host of the listen server would have an advantage because they're not dealing with latency

crude kelp
#

Dedicated better lag?

lost inlet
#

A big con is that game quality is very much tied to the quality of the connection of the hosting player

#

So I wouldn't use it for hosting more than a handful of players

#

At least with cloud and GSPs there's somewhat predictable server performance

crude kelp
#

what do you think about this? is it worth it ?

maiden flame
#

@crude kelp

I only have experience with hosting at home, and using an Azure VM with a Windows dedicated server.
Linux or Windows, there isn't a huge difference. If your packaged server works on your home network, it will work on a VM.
For dedicated you'll have to port forward, which is easy to do on your own router, or the virtual net in your cloud provider.

As for pricing, I think AWS, Azure, and Google Cloud are fairly similar, all quite expensive for someone like me. You'll have to look into the specific cloud service to know exactly what the price comes to, which you can do with trail versions or price calculators.

Another advantage of cloud providers is that you can deploy servers in specific regions without having to rely on your community to host servers, but you need a budget.

lost inlet
#

Gamelift is ridiculously expensive from what I recall

#

There are game server orchestration platforms that use bare metal servers which give much more value for money, but that requires shopping around

crude kelp
#

I think I'll start a home server...

#

It is a good start

lost inlet
#

Well it's fine for internal testing

crude kelp
#

becasue AWS is some how what I did not expet

#

expect

#

there are plugins involved

#

I don't like that tbh

lost inlet
#

I don't think you have to use that if you have your own backend

#

Since iirc it just wraps REST API calls

maiden flame
#

Indeed. Like I said, if it works at home, it will work on a VM.

#

By that I mean works over a wi-fi.

lost inlet
#

Though a LAN environment won't give you true reflection of how latency resilient your game is

crude kelp
kindred widget
#

Thing is, no one can really recommend anything. Hasn't given any details about the project and the things they expect. May as well pick something at random and say go with it.

crude kelp
#

I want to create server hosting unreal game should not be complicated

#

You connect the IP and

#

yeah....

lost inlet
#

Really you need to get your server performing as efficiently as possible so you can push for higher server density (ie. Game server processes per physical server)

lost inlet
maiden flame
#

Just to get started, I think it's fine to just make it work at home first, and you can start to profile and scale for more specific requirements as you have a better sense of what your game and servers need.

#

If you don't have the experience, it's best to just start somewhere IMO, unless you're going to outsource that work.

prisma snow
crude kelp
#

And i don't have exprience with dedicated so I better start already later on I will port the one from home

reef nymph
#

hello everyone,

I have a basic session connection over steam question

I added basic create and find sessions using unreal's online subsystem, and then add steamwork sdk intended for internal testing.

it works well in the IDE settings. but it does not work for packaged version (development)

when clicking on the create session button the packaged game does nothing.

does it has anything to do with the firewall or engine default settings?

late stratus
#

I have API keys that only the dedicated server needs. Is there a way to prevent a string table that contains the keys from being included in the client build? Or am I thinking about this the wrong way altogether

sinful tree
#

Also makes it easy to update keys externally without having to repackage.

formal solar
#

Is gameinstance guaranteed to exist before game state? My intuition says yes but maybe wrong

kindred widget
#

It shouldn't matter, but yes.

#

It already is replicated via GetBaseAimRotation

modest crater
#

Hey, just doing to dedicated server and packaging workflow testing and I just want to confirm some stuff,

Whenever I make code changes, I obviously need to recompile both server and client configs if I want to test again and launch the .exe files from the binary folder, and then after rebuilding I need to cook content again (but what about if I made changes only on code?)

When it comes to packaging do I just do it from the editor but instead of cook, I run the package option and it will give me seperate entire packaged builds with their own folders and everything, correct?

lethal blade
twin vessel
#

Did you by any chance find out anything? I feel like anything i have in mind is either over complicated or over simplified

surreal plaza
#

I have a shipping build with steam integration (adding in a steam_appid.txt file to make it work) and am trying to run it through sandboxie. It is crashing with a fatal error, where it did not when I was running it without the steam_appid file. Are there any tricks I should be doing to make sure my virtual env is effectively the same between that an native?

modest crater
#

If I am making a game that has both dedicated matching but also the option for co-op listen server (as In I want people to be able to play together just by having the "host" be a player aka listen server), am I suppose to just be packaging for server and game since client strips server only code or would I still do client and server packaging only and the only things I would guard with #if WITH_SERVER would be backend server stuff?

Can a client be a listen server and what do they miss out on compared to just a game target package build is what I am asking I guess.

kindred widget
#

Does Iris even work atm? I thought it was still in prototyping?

dry gust
#

It’s marked as experimental but it should work, but doesn’t for me

kindred widget
# modest crater If I am making a game that has both dedicated matching but also the option for c...

Probably more than 95% of things will not change when writing your game for Listenserver or Dedicated Server. Most of the code needs to function the same regardless. Most things are already gated like spawning of particles or playing sounds, etc. If you're making a game where the player can join a dedicated server, or can host a coop game, then you package two separate things. Normal game package, and dedicate server. The dedicated server cook is the only special one as it cooks to be ran without a renderer and whatnot.

modest crater
ancient adder
#

I still can't figure this out 😦

Fatal error: [File:D:\build\++UE5\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\UObjectGlobals.cpp] [Line: 3240] Object B None created in BP_ThirdPersonCharacter_C instead of A```
Both objects A and B are replicated UObjects,  **B** is created with **A** as an outer
#

Is there something I can set to tell replication system don't create B instead of A or am I not supposed to replicate UObjects within other replicated UObjects?

kindred widget
# modest crater Yeah that's what I was thinking, I just wasn't sure where client fits into that,...

To be clear, Client and Listenserver are the same build. There is no difference. You don't make a special build that has no server code for example. Even if there is no concept of a listenserver, your client still needs most of your networking code there to work correctly. The one exception to that might be cooking out secretive code you would never release to public for whatever reason to avoid it being decompiled and examined. But that level of handling is fairly rare and usually unnecessary.

kindred widget
#
if ( (InFlags & (RF_ClassDefaultObject|RF_ArchetypeObject)) == 0 )
{
    if ( InOuter != NULL && !InOuter->IsA(InClass->ClassWithin) )
    {
        UE_LOG(LogUObjectGlobals, Fatal, TEXT("%s"), *FString::Printf( TEXT("Object %s %s created in %s instead of %s"), *InClass->GetName(), *InName.ToString(), *InOuter->GetClass()->GetName(), *InClass->ClassWithin->GetName()) );
        return true;
    }
}```
#

If the Outer you're trying to create the thing with is not the same class as the ClassWithin property on the class you're trying to create, it will throw this error.

ancient adder
# kindred widget This isn't anything related to replication. You've outered a class to something ...

The debugging shows the following
InClass is B and its ClassWithin is A, but InOuter is BP_ThirdPersonCharacter which is incorrect
B is supposed to be within A and is created accordingly on server, it works as expected, the issue happens on client

I'm not sure how I'm outering a class to something it isn't allowed to be outered to, It only happens on client side which I have no control over atm since replication system is responsible for that part afaik, Please correct me if I got it wrong!

kindred widget
runic crane
#

Is this the right channel to ask about whether it's possible/how to NetSerialize TMaps?

kindred widget
#

TMaps aren't meant to replicate or be sent with an RPC. If you need one for the lookup speed, generally favor a helper struct that sends the data through an array or FastArray, and reconstruct the map on the other side.

runic crane
#

So like, I'd be converting it into a TArray of TPairs, or perhaps just two different TArrays?

#

I felt it made more sense to ask it here, but the issue originates from GAS where its Set By Callers on Active Gameplay Effects don't seem to be replicated, so I can't access them for UI purposes on clients.

kindred widget
#

You can make a single array of a single struct type that just has a value of the map's data type and the map's key type.

runic crane
#

I see yeah. I'm not quite sure from the GAS perspective if it's the right call, but I don't see another way around it.

ancient adder
kindred widget
#

EG A needs to call AddReplicatedSubobject for B instead of the actor component and have itself set up to replicate subobjects that way etc.

wet nymph
#

I'm trying to use Simple Move to Location, but it only works on the server player, I saw somewhere that it only works on server, so I created a custom event to run on server, but it still doesn't work on clients

#

It seems to be running on the correct player controller too

kindred widget
#

SimpleMoveToLocation will work if called on a client as long as the client possesses the pawn, if I recall correctly.

#

It's not AI based, so it doesn't have to be server authoritive. It's similar to a player pressing keys to get to the same spot.

wet nymph
#

Yeah, I have created a new top down project just to test it

#

But it actually seems a little broken on the client

wet nymph
# wet nymph

Ok, it seems like the Simple Move to Location really doesn't work on client, because this behavior was due to the other way to move which is by holding the left mouse button

#

I removed it and left only the Simple Move to Location, and it only works on server

ancient adder
kindred widget
# ancient adder That's what I'm doing honestly, If I understand correctly of course A creates B,...

Not quite 😄 You said this was your hierarchy.
BP_ThirdPersonCharacter -> MyActorComponent-> A -> B

Character houses ActorComponent and replicates it.
ActorComponent houses A and replicates it.
A houses B but right now you're replicating it through the ActorComponent that also owns A.

What you need is
Character houses ActorComponent and replicates it.
ActorComponent houses A and replicates it.
A houses B and replicates it.

B needs to get A and call AddReplicatedSubobjects, not the actor component.

ancient adder
#

Wait, UObject also has AddReplicatedSubobjects? 😮

kindred widget
#

Hmm. Maybe it doesn't.

sinful tree
wet nymph
#

Just out of curiosity, do you know why it's disabled by default?

sinful tree
wet nymph
#

Got it, so could I do the Simple move to Location through the server? Or in this case it would be better to just enable this option?

kindred widget
#

Hmm. I'm not seeing an easy way around that. :/ Have never had to consider doing multiple uobjects like that. Initially seems like it would take quite a bit to work around that unless you can just remove that use within flag. Without that it might work as you're wanting and not throw the error.

ancient adder
#

Never thought of removing within flag, Will definitely take that into consideration, Thank you!

sinful tree
oak prawn
#

"server travel" works smoothly in the game engine, but when I render the game and try it on real computers, "server travel" does not work.

#

What is the reason

wet nymph
kindred widget
#

I would just be careful with any GetOuter calls you use if that works. 😄 Client might be getting the actor component instead of A, I assume.

fallen sparrow
#

Got a question for you guys, is there anyway to stop a server from updating physics to simulated proxies? specifically in blueprint? I'm trying to have client simulated physics on a replicated character, but it seems as if its ticking velocity and position from the server leading to slide show physics with errors.

#

The call

devout sonnet
# sinful tree

I couldn't get it to work. I'll have to try to learn more about why.

devout sonnet
#

For a 2 player card game. Where would be the best place to store the arrays that hold Deck, CardHand, FieldZone, and DiscardPile.

Some people have said playerController, others game state, but I originally thought Game State.

dark parcel
#

depends, does the player need to know each other card?

#

but all info and truth should be read from server

devout sonnet
#

Idk how to store anything on the server yet.
I think for now, it'd be easier if the player could see each other's cards.

dark parcel
#

I think there is a bit of confusion then

#

server is always there

#

listen server*

#

one of the player has to host the game

#

so that player will be the server so to speak

devout sonnet
#

That makes sense

#

Is that still true for a dedicated server too?

dark parcel
#

dedicated server is just a headless server, it doesn't render

#

Unreal networking out of the box uses server to client model

#

If you are a client, w/e data you have for a card game shouldn't matter

#

it's just there as a visual aspect

#

all calculation and actual cards that are played/discarded etc are handled on server machine (The Computer of the host)

devout sonnet
#

Host*

dark parcel
#

card game or turn based game are pretty easy imo

sinful tree
dark parcel
#

if client needs to do anything -> Request to server -> Server validate and apply the move

devout sonnet
dark parcel
#

then another 6 if still stuck

#

but Imo it helps to think of breaking down what should be run on server, what should be run on client. Where data should be hold, etc

#

Doing turn based game, you are already eliminating one of the harder aspect of multiplayer because u don't need to account for lag

devout sonnet
dark parcel
#

replication is the easiest part

dark parcel
#

it's not really a tutorial zone

#

but if u are already comfortable with OOP and have been using Unreal for a while. With sheer determination you will get it eventually imo

#

took me like 3 weeks

devout sonnet
dark parcel
#

My tip would be, don't use Multicast RPC for anything that needs to be in-sync. So for your card game 99% of the time you wouldn't need multicast

devout sonnet
devout sonnet
dark parcel
#

multiplayer is a whole new world

#

imo

devout sonnet
dark parcel
devout sonnet
#

i've even down sized my expectations for this card game project.

devout sonnet
woven basin
#

The easiest place is just have a deck stack attached to each playercontroller

#

if you want each player to see each others cards (reading an old comment where you mentioned that) - then you would just have playerDeck1 and playerDeck2 on the game state, since game state is replicated.

devout sonnet
woven basin
#

They need to be replicated as well, because you can have non-replicated variables inside of game state.

So "game state" is replicated, which means things inside of it is replicated, but you can pick what is actually sent or not.

sinful tree
woven basin
#

We're also having two conversations now, so your getting conflicting answers because it depends which path you go down.

If players only see their own deck -> Playerstate or PlayerController (to replicate only someone's cards to that specific person)
If players see all cards -> Game state (to replicate everyone's cards to everyone)

(There are other places you could put them, other answers that work as sell - it is just a starting point)

devout sonnet
#

I think I want both players to be able to see each other's hands. Idk how id display how many cards the other player had.

sinful tree
#

PlayerState replicates to all.

mild urchin
#

Hey guys, I'm really interested in learning about physics replication in unreal engine. I came across this post detailing the enable physics resimulation option . (https://vorixo.github.io/devtricks/phys-prediction-show/) . I was wondering if anyone had toyed around with this option to get good results ? Right now it is quite jittery. Also I heard this is still in development, maybe it's gonna be fully finished in 5.4 ?

#

also if anyone has some good ressources to learn about this stuff i would be super happy

regal geyser
#

I have a question regarding server authoritative shooting.

Long story short I'm saving all bones inside physics asset of the character each frame inside HumanMovementComponent. Then, when player determines a hit, he'll sent the timestamp of the hit to the server, so that the server can rewind the target to the position of the hit based on the saved moves he has from the HumanMovementComponent. Just for the debug purposes, I also get the closest saved move from the whole array to the position in which the player saw the target at the point of the hit.

Issue is, that sometimes, this closest saved move is still decently far away from the position, where the player saw the target. How can this be? Does the autonomous proxy extrapolate all simulated proxies based on the last input? I thought that UE's movement replication is very decently deterministic, meaning the simulated proxy will only be at the position which was already accepted by the server, when the simulated proxy sent his movement data to the server and the server accepted them.

sour dragon
#

I have a question, currently its not possible to replicate Movement such as Sprinting, Jumping, Flying, Swimming, Vaulting etc. with blueprints PROPERLY from my understanding. So as soon as there is desync or latency from the client to the server everything breaks for the client and even with no latency it leads to stutter and jitter when the client is just sprinting. I looked into plugins such as SmoothSync, GMC V2, GAS Companion. Im looking for a Blueprint only solution and found Reddy-dev's BP CMC Networking Plugin which apparently hooks on C++ code and exposes it in Blueprint. But i also read that Mover 2.0 is coming with 5.4.

#

So my question is, does Mover 2.0 work the same as CMC with blueprints, and how hard will it be to convert from CMC to Mover 2.0? So do the nodes such as Set/Get Max Walk speed etc. stay the same, and how much work will it be to properly set prediction, and syncing it up? So to simplify my question on a low level. Should i use the CMC Networking BP Plugin NOW or wait until Mover 2.0 gets released and do everything with Unreals Plugin?

#

Or should i use any other plugins i named which don't need C++ for me to use.

quasi tide
#

Mover 2.0 is going to be experimental. Don't rely on it. Just use something like GMC plugin if you're trying to only stay in BP land.

thin stratus
#

fwiw, Setting MaxSpeed form outside will always be a correction

#

No matter what system you use

#

CMC and Mover (NPP) only predict Client actions. So if you alter MaxSpeed, you'd need to run that through the Client and that allows cheating. You can only ever communicate that the SprintKey is pressed.

#

Mover (NPP) will probably not be usable in 5.4 for BP people. There is some stuff exposed to BPs but I doubt that is enough. We are 98% using it in C++ again atm.

#

If it does get more attention, we can probably start using it more commonly than CMC in 5.6+ or so. idk

sour dragon
#

Thank you Cedric for the advice, i guess im going to stick to SMN2 then and keep the component

#

Also with Mover 2.0 if the component changes it means the nodes also change, so the library i can use from the context menu will be completely different and nothing will work

#

Also the states will be different for sure

maiden flame
#

Goes for other actions too, like root motion or launching the character.

#

CMC can stutter when there is packet loss, but I believe this happens with C++ too, unless using a customised version or a plugin, but feel free to correct me if I'm wrong.

mental star
#

So fellas, real quick question for ya. I'm working on a multiplayer Tennis game just something real simple. I have a question about ball physics.
If I'm doing a server based 2 player game. Is it smart or feasible to have the ball have physics like a projectile motion formula for instance? Or would that ruin the game on desync?

dark edge
mental star
dark edge
#

no, predicting the movement of your tennis player before the server says what they did

#

Do you need things to happen instantly, or to happen the same on all clients and the server, choose one

#

Are you intending this to be networked or just local multiplayer?

mental star
#

Networked yeah

dark edge
#

Yeah that's gonna be hard as hell, especially predicted

mental star
#

Always love me a good challenge 😛

dark edge
#

Basically, when you press the button to hit the ball, do you:
A - Want the pawn to swing instantly, and the ball to change direction instantly if hit
or
B - Are ok with the swing command having to make it to the server, which relays info back to the client, resulting in a ping lag between pressing hte button and seeing the swing
?

mental star
#

What would make a more stable experience?

dark edge
#

B is more stable, but you got the lag

#

If you don't know what I'm talking about then you have to do some reading on it

#

this is the core problem of multiplayer

#

and anything physics-like with quick interactions between different clients makes it much harder

mental star
#

Nah I get it

crude kelp
#

Hey I could get the home server with 7777 " port " going

#

Now I will try to get a remote listen one goin

topaz storm
#

Anyone else using unrealengine 5.3 realized that RepNotify (blueprints) variables behave pretty strange / broken? They seem not to fire on clients when the server updates a variable nor do they fire on the server if clients update a variable.

#

I'm updating a string which does not fire the corresponding function on clients when the server (listen server / client) updates it and also on the other side, if the clients update it, the server does not fire it's corresponding rep notify function

sinful tree
mild urchin
topaz storm
sinful tree
#

Seems to work just fine on 5.3.2

topaz storm
# sinful tree Seems to work just fine on 5.3.2

what I'm breaking it down to right now, Is that it seems to work when the variable updates when everybody is already connected - but the variable seems not to be there when clients join when it did fire ones before a client joined. so I would have expected, that the notify is happening "retroactive" so to say and clients get the updates when they connect?

sinful tree
# topaz storm what I'm breaking it down to right now, Is that it seems to work when the variab...

That is the purpose of RepNotifies. My guess would be that you may be setting a value into the string on clients that doesn't exist on clients, so it ends up filling it with nothing. The server would always populate it first as its begin play would fire first, but if you don't gate the begin play so that only the server does it, then clients could end up removing the value as they don't have anything in the variable you're using to populate it.

topaz storm
#

actually it does exist if i print it before updating the variable. thats the strange part.

sinful tree
#

So if the value already exists on clients,why would you be replicating it in a separate variable to begin with?

topaz storm
#

Maybe a missunderstanding - Server is already in the game - client joins late - clients wants informations the server already set up during the game - client does not receive rep notify of server after joining - clients sets informations after begin play - server does not receive rep notify event.

sinful tree
#

Again, replication is only one way. The value must be set on the server for other clients to receive the value.
If a client has that value, you must RPC that value to the server first, then the server can set it in the OnRep variable, then other clients would receive it, including any late joiners.

#

Setting a variable on the client will only ever change it on that one client even if that variable is marked to replicate.

topaz storm
#

and now the fun part: that does not work either

kindred widget
#

Which part? The RPC or the Replication?

topaz storm
#

just so I'm sure I'm testing everything right: if the player who is the server sets a variable of it self that others should receive when joining late, a repnotify should be enough? right?
Server is in the game, sets it's user name with rep notify, clients join late, rep notify should fire?
other way:
Clients executes a Run On Server RPC with the value - server executes rep notify with the value -> server and other clients should receive the rep notify event and fire the function?

karmic panther
#

💀

sinful tree
#

Sorry... there is a bit of an error in there... Server appears to be firing the Receive Controller changed too... Fixing...

#

The server one is much earlier in the log, then the client joins and the next names print.

topaz storm
#

thank you very much - I will rewire some stuff clean and check exactly what I'm missing.

#

appreciate your help!

lethal blade
#

How can I make loading screen in listen server ? Did anyone implemented before

ruby lodge
#

Is playfab generally more expensive than game lift?

#

I couldn't find a specific price calculator like game lift has it but the examples on playfab were more expensive than they would have been on gamelift

#

Playfab just has other features besides dedicated servers

kindred widget
hoary spear
#

I just sync load it all, who needs loading screens

#

Pcie 5.0 x4 solves that 😄

#

/jokes

sour dragon
#

If i use a Client Authorative approach to sync movement with the Server which kind of movement should i check with the Server? I honestly don't want to change the Movement Component or replace it because i just can't wrap my Hands around C++ and it would be way too much work. My Plan is to use SmoothSync but somehow jank important mechanics into C++ to make it Server Authoriative. So my plan is a First Person Game which is basically just COOP but no PVP, all i want to prevent is the Clients from Speedhacking and even more important to have smooth movement and animations even with higher latency. Would you advise to just lock basic movement such as walking/sprinting behind a C++ Replicated system or is there more to it? I really don't want to rewrite all the code because my game won't have any special abilitys.

kindred widget
sour dragon
sinful tree
# sour dragon Or is GAS Companion better suited for this?

GAS Companion doesn't really have anything to do with movement. GAS Companion exposes parts of GAS that usually require C++ set up to blueprints, however, not everything from GAS can be exposed to blueprints and you will likely discover something is far more easier to do if you were able to do some C++ in the first place, so you will likely still need some C++ if you want to do anything more advanced, especially for multiplayer.

If you're attempting to make a multiplayer game, you are almost guaranteed to need to do something in C++ at some point as well as the engine also doesn't expose everything you could potentially want to do in multiplayer systems to blueprints - one example is handling net relevancy of actors, which isn't something you can change at all in blueprints or the editor save for maybe the net relevancy range. In some cases you may not necessarily want a specific actor replicated to everyone all the time even if they are within range, so this is one example where it could help with network performance or help prevent some forms of cheating.

This all said, the Character Movement Component already has client prediction of movement built into it along with server correction. The only thing is prior to the new "Mover" system (in 5.4?), you had to modify the CMC and add different types of moves in C++, but they've exposed some of that to make it easier to make things within the editor rather than in C++. I'm not really familiar with it myself, but from the little glances I've seen of it, and with my own experience in editing the CMC, it looks like it simplifies things greatly.

sour dragon
#

I actually watched some hour long videos about Mover 2.0 and it seems even in the latest version the absolute most important stuff is still hidden behind C++, reference : https://youtu.be/AzO80wLeAPY?t=634 , i mean that has absolutely nothing to do with the CMC we are used to. The three biggest gripes i want to circumvent are : Players being able to Speedhack, Animations or Player Position being out of sync with the server (example the player walks into a wall and suddenly he has a different position for the server and everyone else). And jaggedness/rubberbanding because the server tries to constantly fix the position of the player. Im sensible to too much delay for movement, i want really smooth movement even if it would cost the possibility to cheat, im not making a game to make money, but rather trying to get my idea in my head into reality.

hollow eagle
#

Why are you even considering mover 2.0

#

It is experimental, unfinished, and if what you need is humanoid character movement CMC still works fine.

#

If you aren't working in C++ it shouldn't even remotely be a consideration as you aren't going to be able to debug anything that goes wrong with it (or even use most of its functionality, seeing as the benefits of even using mover are locked behind C++ right now).
And even if you are, if you don't understand why you'd want mover or have the experience to dive into it without documentation it shouldn't even be on the list of things to use.

#

The basis of this question doesn't make much sense anyway - CMC is already "smooth".

sour dragon
#

Yes thats why i talked about mover 2.0, because like i said i guess its still to C++ heavy and not usable with BP in the near future

hollow eagle
#

Right, they haven't even said why CMC isn't under consideration here.

sour dragon
#

Heres a list that lowkey shows what im trying to accomplish :

hollow eagle
#

CMC already does 90% of that out of the box.

#

And the last 10% would only require the use of root motion

lost inlet
#

animation concerns are separate anyway, the only custom stuff there is sprint and vault