#multiplayer

1 messages Β· Page 635 of 1

eternal canyon
#

you dont have to modify them

#

just use them

lost inlet
#

you don't replicate widgets, you replicate the data within them

quasi tide
#

When looking for a dedicated server host - should I prioritize RAM or CPU for the server? Or are both equally important?

winged badger
#

typical dedi has 2 cores and don't load most assets

lost inlet
quasi tide
lost inlet
#

how much do you want to spend running your game? under performing on capable hardware? use the profiling tools

peak sentinel
#

Should we trust anim notifies when it comes to multiplayer? I heard they are not reliable at all

winged badger
#

there is an optimization

#

which will not exec anim notifies server side unless its a listen server and the animation is on host's player screen

#

montages don't have the same restriction @peak sentinel

peak sentinel
#

Thanks for the explanation Zlo

winged badger
#

makes anim notifies fine for stuff like footstep sounds and such

#

but very bad for gameplay logic

#

and that was super fun to debug, monster stops doing damage to me, because damage is triggered from an anim notify, so i call a teammate that was hosting (listen server) to come over and examine the monster with a debugger

#

but then optimization turns off, because he came close, and monster starts doing damage normally

peak sentinel
#

Are you using timers now? Or do you have any other alternative?

winged badger
#

montages

#

montage notifies fire reliably

peak sentinel
#

πŸ‘Œ awesome, thanks

winged badger
#

for dedicated servers you still need to enable the animations to run, think by default ticking skeletons is off

quasi tide
#

because damage is triggered from an anim notify
Are you calling ApplyDamage in the notify? Curious. Or do you cast to the actor and call a function that handles it?

winged badger
#

notify is triggered at the appropriate time during the attack animation

#

that causes damage to be dealt, but its not dealt directly by the notify

foggy idol
#

Im using FSavedMove to make the character wallrun

#

Everything works fine

#

but when I try to change the Z velocity it starts stuttering if the change is positive but there's no stutter if its negative

#

const FVector Adjusted = Velocity * deltaTime; FHitResult Hit(1.f); SafeMoveUpdatedComponent(Adjusted, UpdatedComponent->GetComponentQuat(), true, Hit);

open jacinth
#

hi, i have a replicate movement problem, when my character is moving and i attach it to an object(i use RPC to server), the client-character position is different than the server, i already tick replicate movement in character, can someone have a solution about this?

winged badger
#

if its attached, its using the position of whatever its attached to

open jacinth
#

@winged badger but that position in server and client are different, if my character is NOT moving and i attacah to an object, the client-character position is correct

crystal crag
#

Regarding using the CMC network flags... has anyone here needed to modify the number of custom movement flags in the engine to get more than just the three you are allowed to use by default?

#

having three seems really limited

#

only way I can think of to add more would be to modify the engine source to use more

#

I'm talking about these:

if (SavedRequestToStartSprinting)
    {
        Result |= FLAG_Custom_0;
    }

    if (SavedRequestToStartWalking)
    {
        Result |= FLAG_Custom_1;
    }

    if (bSavedWantsDodge)
    {
        Result |= FLAG_Custom_2;
    }
#

Has anyone here needed to use say, FLAG_Custom_5 for example?

eternal canyon
#

one sec

#

look at my plugin

#

Smooth Networkjed Movement

#

as it shows off how to do that

#

its free btw

bitter oriole
#

Don't multi post please

foggy idol
#

can I use network flags to make sure an integer is updated on the the client and server ?

#

basically instead of sending a bool/uint8 I want to send an integer

gritty pelican
#

how i can play RootMotion animationMontage in multiplayer?

crystal crag
#

@eternal canyon Ok thanks! I will definitely check that out

dark edge
eternal canyon
#

either way woudl prb work

gritty pelican
#

@dark edge idk, i think i skip some settings

quartz smelt
#

I have a simple physics ball that's set to replicate. But when someone pushes it, the movement/ball aren't replicated. Is there a reason?

dark edge
quartz smelt
#

@dark edge "Replicate Physics to Autonomous Proxy" is on, but nothing else

dark edge
#

You should also have replicate movement on right

quartz smelt
#

Yep yep, thats on too. I also have "replicate component" on as well

scarlet cypress
#

My game lags like it's hosted in hell by satan himself, is that normal with 4 people on lan and a pretty good internet provider?

#

Are there any beginner mistakes that cause lag or any tips how to fix it?

#

For example sometimes RPCs just got to nirvana and no one hears from them ever again.. Is there any way to set an RPC to "must be received by any means"?

bitter oriole
#

Yeah, that's "Reliable"

#

It's also a good way to cause lag

#

As to game lagging, it's impossible to answer why - depends on what happens, who's hosting, what's the ping like

#

Usually the answer is "terrible multiplayer code"

scarlet cypress
lament sinew
scarlet cypress
scarlet cypress
bitter oriole
scarlet cypress
dark edge
#

You might be fighting the CMC

bitter oriole
#

Games don't "lag" because they

  • assume they'll get no network update for up to one second, and keep working smoothly in that very common case
  • assume that server & client will disagree
  • avoid sending or receiving unneeded data (minimize your data)
  • accept that data will be lost (most RPC traffic should be unreliable)
  • have a fast server
#

So check that stuff

lusty sky
scarlet cypress
bitter oriole
#

Here's my advice : log everything on clients and server, dump data, make graphs, investigate thoroughly

#

It's okay for multiplayer features to take 5x the time they take in singleplayer

#

Multiplayer is hard, so take it slow and careful

scarlet cypress
#

Also might it be because it's on LAN? Will it run better via steam?

meager spade
#

if it does not work on LAN it won't be better on steam

#

with steam you also have larger ping times

bitter oriole
#

Also additional advice ; set your lag to 100ms with 50 variance in engine.ini, and never take it off

#

You want to develop with large ping

meager spade
#

^

#

people never test with ping

#

and wonder why they end up with replication race issues

#

or weird shit happening

bitter oriole
#

"Is it normal that I get one second worth of client RPCs at once after no data for two seconds ?"

#

Yes

#

Networks suck

meager spade
#

One thing you can never fix, Ping Time and lost packets. All you can do is minimize and handle things gracefully.

#

if you send 20 reliable RPC's to a player in a short time, but they are having slight networking difficulties, you will boot them from the game. (which is why reliable RPC's on tick is not allowed). You will fill that reliable buffer.

#

i have seen many people abuse reliable RPC's

scarlet cypress
muted perch
#

My pawn is getting stuck in the air when it gets spawned in.

#

Im trying to spawn it through the game mode btw

scarlet cypress
#

So to find the things i need to fix i tried to create an artificial lag generator... but everything still works like that's nothing 😭 😭

meager spade
#

why are you doing multicast

#

from a local client input..

#

and every .01 seconds!

#

that is not a lag generator that is just wrong πŸ˜„

#

why not use the engines built in stuff ? πŸ˜„

#

Lag != sending tons of RPCs

scarlet cypress
#

is that a console command?

meager spade
#

net pktlag=100

scarlet cypress
meager spade
#

or do it in defaultengine.ini as stranger said

craggy void
#

You can also configure it in the project settings under Level Editor > Play > Multiplayer Options > Network Emulation

meager spade
#

i normally rock this for testing

craggy void
#

Hmm, with packet loss, can a replicated variable just not get updated until it changes again?

meager spade
#

no

#

it will eventually get that state through

#

properties are reliable

craggy void
#

Ah ok, so worst case you might miss an in-between value

#

I.e., if you update a value from 1 to 2, then from 2 to 3, a client might get 1 to 3

meager spade
#

yes

craggy void
#

Good to know, thanks

scarlet cypress
#

Screenshoted that

#

So packet loss is only a real problem for rpcs?

craggy void
#

Unreliable RPCs. But reliable ones are much more costly

scarlet cypress
#

How did hl1 multiplayer even work whit those older internet connections if i can’t even make a game lagfree in 2021..

peak sentinel
#

I remember Stranger mentioned some Python tricks once, I dont know any other way than UE's profiler tools

#

Wondering how he does

craggy void
#

@meager spade Oh wow, just checked out Ironward Studios from your signature - why have I never heard of Red Solstice before now?! My friends loved the hell out of games like Alien Swarm. Heck I'm making a 3rd person coop alien shooter as a hobby project inspired by it.

#

Do you do anything special to handle hordes of AI or is it simply an AI controller with a Pawn for each?

craggy void
#

No, more like world war z, but militaristic scifi

dark edge
#

We're working on a roguelike coop top down shooter

craggy void
#

But it's a hobby project, might not ever finish/publish

scarlet cypress
#

Anyone ever made a bo zombies type game?

craggy void
dark edge
scarlet cypress
#

Is there something like an β€ževent player joined/left sessionβ€œ? Can’t find anything..

#

To inform other players if someone joined or left

scarlet cypress
#

Ah thanks

craggy void
foggy idol
dark edge
meager spade
#

Similar to our game adriel

celest sleet
#

I have a bit of an odd question that is about multiplayer, but goes against one of the main best practices of Multiplayer. Is there a reasonable way to distribute a processing task between the clients? I am using a Boid system for the enemies in the game, a large task, especially with many of them, so sharing the load could be good. And as this is a Co-op game with the main way to play is to invite your friends to your game so I feel hacking of how the enemies move is less of a problem. For example If you invite your friend to your game, and they altered the distributed functions and ruin your fun, I think that is between you and the friend you invited.

winged badger
#

you'd need to send all that stuff you can't process over the network

#

and results back

#

so, not even remotely

#

not even on LAN i think

celest sleet
#

My general thought was the host would deem that particular enemies need an updated list of those around them, divides up the list of references and sends them to the clients. the client finds those nearby and sends them back.

#

All the calculations are on the enemies Position, Orientation, and movement direction. Things that are sent to the Clients anyway. So I would think the server just sending a request to the client to perform a computation and send back the result should be possible

#

It may not be as precise as if only the server did it, as the positions of the Boids are constantly changing and the clients will never be 100% acurate to the server, But the entire system is imprecise and chaotic

#

I feel I can make this work, I have several optimizations I have not mentioned, I am just struggling with finding a way sending separate data to each client.

craggy void
#

Did you already try multithreading the boids calculations? CPU power is a lot cheaper than bandwidth I'd reckon

native vector
#

... i need help im stuck on destroy actor for past 2h
item on server is gone but on all clients is still in place
yes is set replicate
spawn/destroy

craggy void
#

If an actor is replicated, spawning and destroying it on the server should already replicate to the clients

native vector
#

but if i do RPC on server then is only on server, idk what is going on

halcyon totem
#

if the game mode is server only and the clients never see it, should I be checking to see if a player is in VR or PC mode in there to respawn them?

craggy void
#

Also, having an RPC that allows any client to spawn anything sounds like a good way for exploits, if you're even the slightest bit worried about cheating

craggy void
native vector
#

multiplayer is for co op πŸ˜„
i don't care about exploits

middle is server

#

spawn server only

halcyon totem
#

does switch has autority work in the game mode file?

meager spade
#

why would you need that?

craggy void
#

Not really, because the game mode only exists on the server it'll always be true

meager spade
#

its SERVER only

#

you even stated that?

native vector
#

@halcyon totem check if is sever and if is running VR

meager spade
#

in the GameMode?

#

GameMode is server only...

#

client needs to tell the server if it has a headset

#

via a RPC from the PlayerController.

halcyon totem
#

ah ok this might be the reason everyone spawns as what ever the server is.

#

so if the server is a VR everyone respawns as VR after words

native vector
#

lol o forgotten how multiplayer works πŸ˜„
and my item data was empty was not displaying items (try delete empty invisible clone and and not right visible clone)

craggy void
native vector
#

after refactoring 85% of inventory and item System I don't think a bit
@craggy void thanks for trying to help

craggy void
dark edge
#

Are you already doing it in C++ in a cache-friendly manner?

craggy void
#

You could eliminate the server to client RPC by just having the client send it on their controller's beginplay or something.

#

The name Replicated_PlayerController sounds like something might be off though; don't replicate player controllers

halcyon totem
#

but in the game mode, where I use the boolean it to check to see if the headmount display is on, it still only spawns what ever the server is, is this what you meant by doing it in the player controller?

craggy void
#

Are you checking that client's/controller's bool?

halcyon totem
#

yeah

#

im gonna add this code hopefully it works

halcyon totem
#

damn it , it didnt work

#

guess Ill try again tomorrow

vivid prawn
#

Hi guys,
I want to create the HUD after character possessed, someone suggested me to create the HUD in AcknowledgePossession but i can't find it in PlayerControler Blueprint, any idea?

blazing cloak
#

Hello. I need some clarification about Net Dormancy and RPCs. Does dormancy influence RPCs? If I put actor to Dormant All will RPCs be called with in actor?

chrome bay
#

Presumably it will wake the actor from dormancy and attempt to send it.

#

And in the case of a reliable, keep the channel open until the RPC is validated.

kindred widget
#

@vivid prawn As far as I'm aware, there are no good Blueprint ways to handle this in a clean event driven approach. You'll either need to create some BIEs for this, or just do something simple in blueprint like set up a function that checks the local player controller's controlled pawn on tick. Since it starts null, it'll fire the first time it ticks that the controller has a controlled pawn. So you GetPlayerPawn0, cache that into a local pointer in the actor like AHUD, then on tick check if cached pointer != GetPlayerPawn0. If true, set the cached pointer, and call the binding. Then whatever you need can bind to that to update if the locally controlled pawn changes.

alpine root
#

I have a weird issue. I'm using Standalone Game to launch 4 clients. However, my gamepad seems to feed inputs to all Standalone Game windows. Is there any way to only control the Standalone Game window I currently have focused?

vivid prawn
#

@kindred widget i see.. okay, currently i was setting delay for 0.5 second before creating a HUD, which event happen on client side

#

I'm trying to reduce the delay and make things proper way

#

but putting it in tick is pretty much doing the same thing no?

#

I found a comment that user suggested me to use AcknowledgePossession since only happen when client is confirmed possessed, though UE documentation didn't say that

#

but i'm rarely write c++, so i'm giving it a shoot

kindred widget
#

Not really. Your delay will run 0.5 seconds after the execution line is ran. If you're doing this at beginplay, it runs 0.5 seconds after beginplay and the end. This will be a problem if you end up with a lag spike of some kind, long load maybe. Anything that causes the data you need to still be invalid efter 0.5 seconds.

#

If you're going blueprint only, I'd recommend the tick check and cached point that calls an event dispatcher binding. If you put it in the AHUD class, it'll only run on player clients or the listenserver, and will work for every player equally. Then you can just let anything you want do GetPlayerController0->GetHud->CastToYourHudClass->BindEventToOnLocalPawnChanged

#

Then that event simply gets ran whenever the local player's pawn possession changes.

#

Since that pointer should be replicated by default in the controller and GetPlayerPawn would update that.

#

It's probably the most solid blueprint only solution. Barring that, if you do C++. If your AcknowledgePossession function fires correctly. All you need to do is make a C++ subclass of whereever that is, override it, and then make a UFUNCTION(BlueprintImplementableEvent) void BPAcknowledgePossession();, then call BPAcknowledgePossession in the AcknowledgePossession override.

#

Yeah. Here. If you subclass the PlayerController. In your own, all you should need to do is do

.h
virtual void APlayerController::AcknowledgePossession(APawn* P) override;
UFUNCTION(BlueprintImplementableEvent) void BPAcknowledgePossession();

.cpp
void APlayerController::AcknowledgePossession(APawn* P)
{
  Super::AcknowledgePossession(P);
  BPAcknowledgePossession();
}
vivid prawn
#

oh okay, that make sense, interesting

#

let me try that

kindred widget
#

Could probably add the pawn as a parameter in the BIE. But assuming that event is called on clients when their newly possessed pawn is ready, should work fine.

vivid prawn
#

the compile was successful but BPAcknowledgePossession doesn't seems to appear in blueprint when i search for it

kindred widget
#

You have a BP subclass for the C++ subclass of your player controller?

vivid prawn
#

yup

kindred widget
#

You should see it in the functions override list at least.

vivid prawn
#

i change the parent

kindred widget
#

Check here.

vivid prawn
#

oh, i need to compile and reopen the unreal

#

since it was a child of that class

kindred widget
#

Oh. Right. Don't HotCompile. πŸ˜„

vivid prawn
#

now is working

#

cool, thanks a lot πŸ™πŸ½

kindred widget
#

Turn on livecoding to be safe.

#

And if you change stuff in .h files, or the class constructors, always just close the editor and recompile, then open unreal.

vivid prawn
#

yeah, that's the thing ☝🏽 that always i stay away from c++ πŸ˜„

#

after 2-3 times compiling, UE crashes and always i have to reopen the project

bitter oriole
#

Never compile with editor open

kindred widget
#

You should generally just close the editor to compile pretty much most all times. It's the cleanest way. But under any circumstances, do not compile with the editor open if you're not using Livecoding.

bitter oriole
#

(Unless you know what you're doing)

kindred widget
#

At best, your stuff won't work. At worse. You'll be fixing weeks worth of broken blueprints in places you didn't know you had blueprints.

vivid prawn
#

i see... okay, thanks for the advice/tips

jagged aurora
#

is there a way to drastically increase the bandwith use for unreal engine ?

bitter oriole
#

If you're at the limits, you can increase them, though "bandwidth" is a bit general

kindred widget
#

There are some editor failsafes that are pretty low by default. Specially if you're not on 4.26

jagged aurora
#

I'm on 4.25, so where could I change these limits ?

kindred widget
#

Sec.

#

Drop these lines into your project's Config/DefaultEngine.ini file

[/Script/Engine.Player]
ConfiguredInternetSpeed=1000000
ConfiguredLanSpeed=1000000

[/Script/OnlineSubsystemUtils.IpNetDriver]
MaxClientRate=1000000
MaxInternetClientRate=1000000
#

You can lower them later. Should be one megabit per second. Which is drastic overkill.

jagged aurora
#

Well, it is LAN only, so should be fine.

kindred widget
#

The default in <4.26 is like 10000. πŸ˜„

jagged aurora
#

haaha

#

will this affect the editor as well though ?

#

or only packaged builds

kindred widget
#

Editor too. Should be project wide.

jagged aurora
#

ok, thx a lot, I'll try it now

kindred widget
#

All this setting is, is an artificial block. The engine just won't send more data past that until it's limit is reached. For instance if you have that at 10,000 bits per second, and you send 100,000. The 100,000 will all be sent, but you won't be able to send anything else for 10 seconds.

jagged aurora
#

oh, ok, good to know

silent valley
#

is there any way for the server to send NetMulticast RPC to everyone, except the client who owns the Actor?

jagged aurora
#

you could do a multicast and check whether you are the owning client ?

silent valley
#

that's what I do, but seems a shame to waste the bandwidth when I know the client will only ignore it

jagged aurora
#

maybe skipOwner ? But I think this is only for replicated values.

silent valley
#

yeah that's just replication not rpc

waxen socket
#

Good morning. I have a general question about Steam multiplayer.

What are the downsides of using App Id 480? At what point in development is it time to get one's own App Id?

Any advice on this would be appreciated.

Cheers.

winged badger
#

if you can afford a 100$ hit, right away

waxen socket
#

Yeah, the money is not a big obstacle.

winged badger
#

comes with plenty of conveniences,

#

like being able to upload a build to steam

waxen socket
#

That's a different process then the whole "Add non-Steam game to library..." bit?

#

I'd like to test with a friend on the other side of the continent soon, and I was thinking maybe it would be nice to have my own Id. That's why I'm asking.

kindred widget
#

Session searching can be a royal pain in the ass with 480.

winged badger
#

i would personally get it

waxen socket
#

Now, what if I don't have a company yet? Can I register as an individual and then switch to being a company closer to release? Or would that mean having to pay the fee twice?

bitter oriole
#

I don't believe you can easily change to a company identity

waxen socket
#

That was my fear...

#

I wonder if I have to incorporate in Canada or if it would be enough to just have a business number.

winged badger
#

well, that seems like a question for steam support

waxen socket
#

That's fair, yeah.

#

Does "uploading a build to Steam" as you mentioned make it easier to share builds with friends and play online with them?

bitter oriole
#

Well yeah of course, since they'd get it from Steam

waxen socket
#

But it sounds like with my own app id, I could test entirely within Steam which does sound nice since that's the target platform.

bitter oriole
#

Yes

kindred widget
#

It doesn't explicitly state that you have to pay again, but there are insinuations that you need to reapply, probably with the same ID, so they can redo the paperwork under the conditions that the entity who holds the tax responsibility for the ID changes.

waxen socket
#

I guess the only reason I haven't done it is because of the legal hoops.

kindred widget
#

May still want to harass a Steam employee about it.

waxen socket
#

Wow, thanks, Authaer. Where did you find that information?

bitter oriole
#

To be fair you can run the tax form again and IIRC you can change information, I'm just not sure about the "identity" part

kindred widget
#

"Q. I changed my legal name (and banking and tax information). How do I make this change on Steamworks?"

#

I assume the same would be true if you went from being a personal ownership to a company.

waxen socket
#

Ah, the FAQ. A likely source. πŸ˜…

#

Well, maybe I should just register as an individual, and then I can switch over later. That way I can put off incorporating, getting a company bank account, and all that other boring stuff.

bitter oriole
#

For what it's worth I skipped on Steam until the very end

#

Distributing through Itch and using 480 is perfectly fine, you can still use Steam, you just need it open and have an appid.txt file so that Steam detects the game

#

Friends, sessions still work

waxen socket
#

Do you have any regrets about that?

bitter oriole
#

Not at all

#

As long as you have an efficient process to distribute, all is good

waxen socket
#

Hm... So @winged badger thinks it's a great convenience and you think it's not necessary... πŸ€”

bitter oriole
#

I mean yeah it's convenient of course

#

But at the same time if you're not a real company then the incorporation costs can be real

#

So try to see if you can change your Steam identity later on and failing that, register later

#

The main reason to do Steam early is to have the store page up for wishlisting a year before release

waxen socket
#

But I can choose to keep my project hidden on Steam for as long as I like, right?

bitter oriole
#

Sure

#

Just saying you want it up for a long time before release

waxen socket
#

Cool... okay, that's all good advice.

#

Uh, can anyone here tell me what's the best way to contact Steam with these sorts of questions?

zinc owl
#

any one used Nakama Backend?

modern swift
#

I cant find an option for that

kindred widget
#

@modern swift Err, isn't that just default replication?

modern swift
#

not sure can try

kindred widget
#

By default, replication with no conditions will be sent to all clients. So either Autonomous or Simulated.

modern swift
kindred widget
#

Not in C++. In C++, you have to set the variable, and then call the OnRep manually. In Blueprint, OnReps automatically fire on the server. Best to make yourself a simple SetMyVar(Type InVar); function that sets it and calls your onrep for you if you use that variable often.

#

To clarify. In C++, it will call on clients, not on server.

modern swift
#

ok that's what I want I only want it call in all clients, so c++ is fine for me thx

trail hill
#

Imagine I want to spawn a projectile in a multiplayer game. Do i spawn it on the server only and wait for it to replicate. Or should I always spawn it on both the client that shot the projectile and then have the server also spawn it for everyone?

#

Given that I spawn it on both the client and the server, will the one client that spawned it locally end up with 2 copies of the projectile? The one he spawned locally and the one he received from the server?

eternal canyon
#

what ur debating is client prediction

#

tho client prediction on projectiles is really hard to get perfect

#

so usually most games (valorant, csgo etc) just use the server and wait for it to replicate, but this comes with the issue of players over 55ms of ping as their inputs may feel latent

#

so what games like Unreal Tournament do is that they spawn a projectile first on the client (they predict it)

#

and then once the server gets notified that they want to spawn

#

the server will spawn at the location adjusted forward depending on the owning clients ping / 2 (only need ping one way)

#

tho this has its own issues as u can never really have perfect client prediction

trail hill
#

Okay thanks, I know about client side prediction. I am just confused as to where and how I should spawn something. Considering something like playing sound I am just not sure whether or not to play it locally and then just ignore if I receive the event from the server and already played it locally or if there is a better way?

eternal canyon
#

Depends on the game

#

or if ur projectile is fast enougbh

#

u can just use a trace

#

and spawn a particle

kindred widget
#

That's semi old practice too. A lot of times projectiles aren't even spawned. A strong use case these days is doing traces from the weapon, even for projectile predictive paths. And then replicating a simple state variable like a counting integer to display firing effects. And the client does most of the hit detection itself with the server just being a verifier. It feels best on the client themselves, and it's semi accurate looking on other clients with the correct conditions replicated.

#

Major issue with projectiles is like mmmm pointed out. Speed. In some cases, if one client fires a shot, the server can spawn it, and destroy it so fast it never replicates to clients, and effects never get played.

twin juniper
#

so i made a 3 players multiplayer game and idk why but in game i get 20 fps
but when i stop the game i get 100 fps

twin juniper
#

what?

#

wdym

dark edge
#

Use a profiler to figure out why it's slow

twin juniper
#

how

#

i never head about profiler

dark edge
twin juniper
#

yeah in game i have 20 fps

#

and when i stop the game i get 100 fps

#

but only when i play on multiplayer

#

if i play single player i get 100 fps

winged badger
#

you're not testing in PIE multiplayer by any chance?

twin juniper
#

umm

winged badger
#

or on a single machine in general?

twin juniper
#

uhh

#

wait

jolly siren
#

Is there any bandwidth difference between passing a struct by value vs by reference on an rpc?

twin juniper
halcyon totem
#

can someone please help? I have nodes that check to see if someone is in VR mode or not. this is in the game mode, I run a debug in VR and PC and check to see, yes my branch is working how ever in a packed game, if the server is PC everyone who respawns will be PC based on the game mode branch I think my issue is the game mode is server side, so it reads the code the server is going to be either PC or VR , and it will make everyone PC or VR how can I tell the game mode to check if its a client thats vr or PC?

winged badger
#

@jolly siren no

jolly siren
#

ty, I assumed not πŸ™‚

winged badger
#

you just don't copy it before its net serialized

#

if you send by const&

jolly siren
#

Right, that makes sense

halcyon totem
#

if I am using a branch checking to see if the HDM is connected and I do this in the game mode do branch checks in the game mode only go for the server or is it checking in there for each client also??

#

these nodes in the game mode they are checking if VR is active but i am having issues where its ignoring the branch checks in a packed game

dark edge
kindred widget
#

@halcyon totem You need some way for your clients to communicate that to the server. Either make the server reliably RPC to the client and another reliable back when the server is ready, and put the client in a standby state until the server handles it's conditions and replicates. Or better yet, don't create two different pawns. Make one pawn work with both control types.

#

Then you don't need special conditions, or extra networking. It'll just work.

rich cradle
#

how does one check if the steamAPI is actually running for a dedicated server? From what I see I am starting to think steam isn't even used for dedicated servers built as -development

twin juniper
#

I'm interpolating the location of the skeletal mesh component of a character on clients by replicating a bool, when client A enters network relevancy range of the client's B character that is interpolating the mesh, it would start doing the interpolation from the beginning, but what if the character interpolating is already at some more advanced point of the interpolation? how would I make client A see the interpolation at the right offset/location

halcyon totem
#

@kindred widget would something like this work ? I added this check in the player controller, and then in the game mode, I added it to the post login and I see it does print a string based on if its a VR or non VR

#

@kindred widget does this get carried over to the game mode?

#

if I call that variable should that be enough to let the game mode to check to see if its should spawn a VR or PC?

kindred widget
#

Hmm. Better case would be to ditch the "Has been set" and just let the execution flow. ServerAsksClientWTFItWants. ClientTellsServerWhatItWants, ServerSpawnsPawnAndPossessesItForClient.

#

Also, server telling client to display particular UI is going to end badly. Client should handle it's own user interface based on what has been replicated to it.

#

I also still advocate for potentially setting up one pawn for both control types.

twin juniper
#

I'm changing the location of the skeletal mesh of a character on clients, but if I move or rotate the character during or after changing the location of the mesh, it returns to its original place, except on the client that owns that character

fossil veldt
#

Yo bois, anybody have any luck joining games via OnlineSubsystemSteam? Trying open steam.steam64id:7777 but no luck. Is it sposed to work out of the box like that if you just open map?listen?

bitter oriole
#

Port name is suspicious at best

fossil veldt
#

even without port doesn't seem to work, not sure why

#

but yeah shouldn't really need a port, from what I understand this is sposed to punchthrough NAT

rich cradle
#

@fossil veldt you using BP?

#

otherwise perhaps you can use SessionInterface->GetResolvedConnectString() and pass whatever that spits out into the PlayerController client travel?

frail isle
#

Has anyone successfully used the replay system in a multiplayer environment without losing the connection to the game server? I tried enabling Experimental_ShouldPreDuplicateMap in order to create a dynamic duplicated level and used the option LevelPrefixOverride=1 to play the replay in the duplicated level collection but either the game crashes or the map is not loaded completely and the PlayerController is stuck.

balmy nexus
#

has anyone played around with doing profiling on a dedicated server? I'm having a bit of trouble finding away to do that outside of 3rd party tooling like perf_events. I'm wanting to do this on a Ubuntu server.

halcyon totem
#

can I leave the other boolean returns empty or do i need to fill them in with the bool cable? I dont want problems down the road

fossil veldt
#

@rich cradle I don't think that's what i'm after

light smelt
#

any idea how to approach clients requesting data from the server/listener kinda like a http/ftp request? i have voxel chunks and i need to retrieve data from the server on request. so it'd need to be kinda like: client requests chunk -> server checks if client is in view distance -> server sends client binary data -> client receives data. and all of this 100% reliable.

pastel marlin
light smelt
#

can rpc's transfer "huge" data?

#

not exactly a http request

#

but kinda the same flow

#

and then it returns just data

#

aren't rpc's there to trigger events?

#

not to transfer data stuff

pastel marlin
#

not that recent but it look like the same problem as you

light smelt
#

i dont want to use something for transfering the data that isnt meant for that use case

pastel marlin
#

at the end they mention two settings in project settings which allow you to define the max dynamic array size

#

and memory

light smelt
#

actually its not even really replication

#

its just sending data that was requested

pastel marlin
#

you are replicating data from the server to the client

light smelt
#

replication would mean syncing data

pastel marlin
#

you have two type of replication property and rpc

#

rpc is to keep state in sync

light smelt
#

i have an sqlite database for my world data, so it could request data from the database on the server, kinda like websites

pastel marlin
#

you could

light smelt
#

i thought maybe together with oodle i could have nice data transfer

#

server loads data, compresses it, sends it to client, client decompresses it, and loads it into the game logic

#

isn't an rpc more meant to be like "trigger chest opening event on all clients" or "trigger explosion on all clients"

#

and stuff like that

pastel marlin
#

you can probably also do a http request from ue

#

rpc is for event in general

#

requesting something from the server is an event

#

do you run a ue4 instance in server mode on your server ?

light smelt
#

what do you mean?

#

i use unreal for everything yeah

pastel marlin
#

are you able to load sql data from your ue4 instance ?

light smelt
#

yeah listener/dedicated server will work with sqlite

#

and the client will just request if a chunk is touched and if its touched the server should send the data from the sqlite table

#

or the data it stored (cause the server has to load the data anyways)

pastel marlin
#

then i think you can try first with rpc by adjusting the project settings and improve on that if required

#

rpc is UDP behind the scene so there is no reason it won't work and if required you can compress from ue4 before sending the data

#

just be sure to check reliable on your rpc

#

also if you send large amount of data you might have to see the effect on the bandwith optimisation system used by ue4 there are multiple settings and function to manage that

light smelt
#

i'll check it out

native vector
#

hmm some have idea how to send sync to client when join in mid game to sync items on AI inventory
like one time rpc only on join and if is not controlled by player and is not server [not multicast]

Start Host
-Game start:
Server: Sync Paced for : Player_C_0.Inventory MainHand
-Spawn AI
Server: Sync Paced for : AI_C_0.Inventory MainHand

-Client join
Server: Sync Paced for : Player_C_1.Inventory MainHand
Client 1: Sync Paced for : Player_C_0.Inventory MainHand
Client 1: Sync Paced for : Player_C_1.Inventory MainHand

problem
AI_C_0.Inventory RepNotify was skipped

crystal crag
#

Ok, so this is weird

#

I started trying to debug my camera lock feature again tonight. I've never seen this before.

#

So the client is finding the closest target to the camera, and it is sending via RPC to the server the actor component that it wants to lock on to

#

The server receives a completely different actor's component.

#

That's why I keep fighting the camera system. The client is doing what it is supposed to do, in the sense that it is picking the right actor component to lock on to, but something is going really wrong along the way

#

Client Log:
LogRaevinCamera: Warning: URaevinLockArmComponent::GetBestLockTarget() - found best target component! The owner for said TargetComponent is 'BP_Enemy_DarkKnight_C_1'
LogRaevinCamera: Warning: Sending server target component with owner BP_Enemy_DarkKnight_C_1

#

Server Log:
[2021.04.30-02.28.30:496][180]LogRaevinCamera: Warning: URaevinLockArmComponent::ServerSetLockedTarget_Implementation() - Received new target component TargetComponent which is owned by BP_Enemy_DarkKnight_C_0
[2021.04.30-02.28.30:497][180]LogRaevinCamera: Warning: URaevinLockArmComponent::LockToTarget()
[2021.04.30-02.28.30:498][180]LogRaevinCamera: Warning: Set new targetable to a valid target component. Owner of target component is BP_Enemy_DarkKnight_C_0
[2021.04.30-02.28.30:498][180]LogRaevinCamera: Warning: URaevinLockArmComponent::ServerSetLockedTarget_Implementation() - successfully locked onto the target component!
[2021.04.30-02.28.30:507][180]LogTemp: Warning: Was NOT locked during previous frame, and we now are locked onto a target. Setting CMC's orient rotation to movement to false.

#

Wth?

#

I'm sending in a component that belongs to actor BP_Enemy_DarkKnight_C_1, but somehow in the RPC call, the server gets BP_Enemy_DarkKnight_C_0 instead?

#

How is this possible?

#

trying to debug the engine code and I just get disconnected from timeout. Not sure where it is mixing up the reference

#

I really wish the server would never disconnect me while in debug mode so I can take my time with the debugger

#

It's very frustrating

#

@meager spade how are you always online? Do you ever sleep?>

#

I don't think I've logged on once and you have been offline lol

meager spade
#

that sounds right tho

#

print some other identifier (like PlayerState->PlayerName

crystal crag
#

wait what?

#

oh

meager spade
#

Server DarkNight 0 might be your DarkNight 1

crystal crag
#

you mean it is normal

#

yeah ok

#

that makes sense

#

damn, thought I finally had solved it

#

it's AI, so no player state

meager spade
#

print something else unique

crystal crag
#

but I get the gist, there are otther stats

#

right

meager spade
#

and see if it matches

crystal crag
#

After many many tests, I can't get it to fail in single process / no server / running standalone

#

every time I select based off of camera input, it locks onto the right target

#

as soon as I switch it to standalone / not a single process / running standalone, it never works

meager spade
#

btw there is a cvar

#

or some ini line

#

to extend client disconnect

#

in debug builds

crystal crag
#

oh good

#

because man, that is annoying. I'm trying to step into the net driver code for the first time, I can't just zip right through it. It goes on and on - it's like the damn energizer bunny in there.

meager spade
#
ConnectionTimeout=60.0
InitialConnectTimeout=60.0```
#

can make them bigger i think

crystal crag
#

thanks!

marsh ember
#

Do i need portforwarding to play multiplayer?

bitter oriole
#

Basically, if you use Steam, you do not

#

If you use dedicated servers, you do not

#

If you roll your own NAT punch for another situation, you do not

#

In other cases you do

marsh ember
#

i wanted to have a host/client and some client. And i want to play on mobile. Can i use relays?

#

Ok thank you

twin juniper
#

Hi, in a multiplayer game, how do i check on client that the controller belongs to the game host

#

or that client belongs to the game host

bitter oriole
#

Check that the player controller local role is authority

twin juniper
#

it will have authority even on client part of the host?

bitter oriole
#

There is no such thing as client part of host

#

It's either authority, or it isn't

#

Replicated actors only have authority on the server

twin juniper
#

so when you run "executes on server" what does it actually do if host machine?

#

that implies there is a client part and server part of the host

dark edge
twin juniper
#

yes but you can have concepts of client and server on one machine, they don't have to be dislocated

#

anyways, what you said doesn't work

#

client will have authority if it spawned actor

#

regardless if it is a host or remote

marsh ember
#

Is there a good tutorial for joining a multiplayer? And setting up an relay server?

twin juniper
#

so i need a better way of determining

marsh ember
#

Yea but does steam fork for mobile too?

bitter oriole
#

Obviously a locally spawned actor always has authority

#

But I mean, that's up to you to know that in your code

twin juniper
chrome bay
#

Client never has authority over their controller unless you screwed it up somewhere

#

And Clients shouldn't be spawning controllers

jolly siren
#

What do you guys consider as reasonable packet loss? At what point would you display a symbol to the user indicating internet issues?

meager spade
#

iirc i heard they do packet loss over a sort of threshold

#

if you have X amount of loss for X amount of time, show the icon

#

same as ping, if ping is at X amount for X time (which is wildly different from your rolling average), show the icon right?

jolly siren
#

Yeah that makes sense, I would expect that as well

#

I was thinking 10% as the threshold

meager spade
#

sounds reasonable

marsh ember
#

i didnt found a solution with a relay server, can somebody help me?

chrome bay
winged badger
#

our QA likes to do stuff like that too

jolly siren
#

Same boat here haha that's why I'm wondering on others opinions on the threshold for things to be reasonably unplayable

winged badger
#

yeah, 10% is pretty nasty, but still manageable

meager spade
#

no game is "playable" at 300 ping with even 10 percent packet loss

#

with exceptions πŸ˜„

eternal canyon
#

lmao

marsh ember
#
  1. Can i host a dedicated server on a raspberry pi? 2. if i want that every player can start a game(starts a dedicated server and joins them), how can i do this?
#

Thank you very much

night tartan
#

anybody have experience with late-join/join-in-progress replication for clients? I have a spline-mesh actor that is generated/modified at runtime and the spline info is not replicated to the freshly joined client

#

the actor is spawned at run time and given a Spline Component, which is set to replicate, and for Server and Clients who are connected, everything replicates fine as it generates meshes, expands, etc., but a client who connects later will only see the replicated actor's location, with no spline curve data (and I saw SplineCurves is not replicated in the SplineComponent), or extra spline points, etc.

pearl flint
#

So i am looking to build a login system for my multiplayer game. From what i gather I need 2 servers 1 that handles auth and the the other being UE4 handling the actual multiplayer replication.
but how do i make them work in harmony

night tartan
#

I guess an additional question I'd have: is it possible to set a variable of a parent class in the engine code to replicate without modifying the engine source? such as in the child?

gilded vapor
night tartan
#

I'll give it a shot, wasn't sure if you could add inherited parent variables in there

#

well it didn't crash yet...

#

nah, connecting client crashed everything

#

the parents' UPROPERTY isn't marked as replicated, so you can't just toss it in there...

#

actually I think I talked myself through something...if someone can check my logic on this:

An Actor made on the server, before the client joins, which adds components and does dynamic things should only do that BeginPlay() setup stuff once on the server, and not all over again when the client joins...the client should receive the replicated Actor itself, right?

#

otherwise you're adding components and redoing all the stuff on a replicated actor, right?

scarlet cypress
#

Sometimes a replicated actor the server spawns doesn't exist on the client due to package loss.. is there anything like the "reliable" for RPCs for actors?

chrome bay
#

Actor spawning is already reliable

scarlet cypress
# meager spade

This helped me so much in finding out what needs to be reliable, what are actual bugs and what is just package loss.. thanks again! πŸ₯°

meager spade
#

Reliable should be things that MUST happen

scarlet cypress
chrome bay
#

Yeah that's probably it, if there isn't enough bandwidth it'll keep dropping the spawn packet, if the actor has a short enough lifespan it may never spawn client-side at all.

meager spade
#

Playing a particle? Does it matter? Telling the server you interacted with something? Really does matter.

#

Replication is always reliable

#

but yeah ^^

scarlet cypress
#

Also i learned (this was my first multiplayer) how important it is to do stuff in the controller and not the character

#

If the character dies the name of the one who was killed for example would be gone, and the sound not replicated because the actor who sent it is gone

dark edge
#

like Dota corpses sinking into the ground

winged badger
#

@scarlet cypress if you're spawning a low priority actor and have plenty of high priority ones, it might take several seconds until your new actor panics enough to have the priority to replicate

#

and by that time, its gone

#

we had fun like that when a designer changed net priority of a trash mob to 100

#

mid game, when there is plenty of them, actors like projectiles, with lifespan of 2-3 seconds would rarely manage to replicate

scarlet cypress
winged badger
#

you shouldn't really have anything above net priority of 4 or 5

scarlet cypress
#

my character is 3

#

and the projectiles 1

winged badger
#

thats default

#

thats fine

#

all pawns and controllers are 3

#

actors 1

scarlet cypress
#

so you think i should put the projectiles to 4 to make sure the shots hit?

winged badger
#

you're more looking for a crazy high outlier

scarlet cypress
#

or is that too much?

winged badger
#

ours are at 2,3

night tartan
#

so, are splines just not a replicate-able thing? Because FSplineCurves is not setup for replication...so as a client I can't retrieve the spline information, can I?

#

I can't pass the SplineCurves struct variable through a NetMulticast for example and have clients match up, is what I'm basically asking?

#

so if someone late-joins a game in progress, and a spline actor has been modified, there's no way for them to get a proper updated spline actor

meager spade
#

you can't replicate splines

night tartan
#

gotta do some thinking

meager spade
#

FSplineCurves should be replicatable

#

via an RPC

#

but the curve component not

night tartan
#

none of the properties in the struct are marked as replicating

meager spade
#

splinecomponent*

#

does not need them

night tartan
#

from my understanding you can't pass a struct if the properties aren't marked?

meager spade
#

all UPROPERTY in a struct will replicate

night tartan
#

whaaaat

#

man, online forums are totally wrong sometimes...

meager spade
#

in struct you mark UPROPERTY(NotReplicated)

#

to not replicate them

night tartan
#

.<

#

wow

#

okay

#

this changes a lot, thanks so much

#

love your nickname, btw

gritty pelican
#

can i connect to non steam server if client use steam?

pearl flint
#

isnt that the way apex works on steam @gritty pelican

hollow eagle
#

there's no such thing as a "steam server". Steam doesn't host servers or impose any restrictions on what you can connect to.

#

If your game on steam can only play with other steam players, that's something you've imposed on it yourself.

pearl flint
#

i thought that was how that worked. But i wasnt going to say that with out knowing for sure

twin juniper
#

CharacterMovement->MaxWalkSpeed needs to be set on the server and on all clients?

eternal canyon
#

well kinda

#

but not in the way your thinking

#

prob

twin juniper
#

Is there something not clear with my question?

eternal canyon
#

Many of you have requested a way to leave me a tip so I've created a PayPal and a Patreon.
PayPal: https://paypal.me/reidschannel?locale.x=en_US Patreon: https://www.patreon.com/reidschannel
Discord: https://discord.gg/PdvudWx
You asked for it so here it is! This is my Networked Character Movement Tutorial complete with a full download to the pr...

β–Ά Play video
#

just watch this

ancient badge
#

Hey, i have a question. In Games like Hearthstone and Magic The Gathering you see your own cards on the bottom of your screen but your enemy sees them at the top of his screen. How is this done? Can you change the location of a replication?
I don't really need to see the cards in his "hand" but when an enemy puts a card on the field i would need to replicate this card anyway.

winged badger
#

locations aren't replicated

#

PlayCard does different things depending on if the player is local to the machine

#

and by different things i mean, sets location differently

#

which you can basically do with a single mutator function

#

if the cards insigator is locallycontrolled/controller you play the card at provided location, else you play it in the mirrored position

#

to clarify, you can have a card location replicated here, but as a vector, not as an actor that replicates movement

#

OnRep, if its your card you play it at that CardLocation, if not you play it at CardLocation.GetMirroredPosition()

#

and simplest way to do mirrored position is to just rotate the card around the center of the "desk" by 180 degrees

ancient badge
#

i understand the logic behind this... but damn im lost how this multiplayer stuff works xD

winged badger
#

only stuff you want to replicate gets replicated, along with of bit of engine stuff under the hood

#

just because a card sits on 10,10 on your screen doesn't meant it has to be in same position on anyone else's

#

alternatively, you can preplace an actor for each player

#

actually, im kinda half asleep

#

you can also just rotate the camera 180

#

and leave everything as is

#

or preplace automanaged cameras for players, defining their perspective

#

simplest solutions are best

#

if your PC has AutomaangeCamera ticked true, and you have 2 cameras, each with AutomanageForPlayer 0 and 1 respectively, placed on opposite sides of the desk

#

you don't really need to do anything else

#

engine will do it for you

ancient badge
#

Has this "AutomanageCamera" something to do with your "Pawn"? never heard of this πŸ˜„

winged badger
#

its unreals way of aggressively setting the view target to automanaged camera until the pawn is possessed

#

in this case you don't really need pawns either

#

its a pre-placed camera actor on the level that has index of the controller that will use it as a viewtarget set on its details

ancient badge
#

i think i will restart my whole project. πŸ˜„

boreal wadi
#

Hello all. So im looking through the ShooterGame project as I am studying it to learn more about multiplayer. I see the way its hosting sessions, When I launch the game Im able to host a game, select the map and game mode. This is using my PC as a Listen Server correct?

If that is the case say I wanted to host a dedicated server on my other PC. Wouldnt that make the Host option invalid? How would the Game Mode & Map be selected then? Unreal Docs doesn't really explain things like matchmaking or server set up..

The most simple question I need answered is how do I set my dedicated server up to where a player can select a game mode, then be taken to a server that has an open slot for him to join and play. Without the need for AWS

More indepth question is how could one use the "Host" function for not creating a Listen Server but instead a party system where one player is the party leader and is the one who will search for that game mode and take his party into a server open for them..

ancient badge
#

@boreal wadi "Unreal Docs doesn't really explain things like matchmaking or server set up.. "
I have the strange feeling that Unreal has a general problem explaining multiplayer stuff πŸ˜„

I, for example, still don't know how to use "player controller" in multiplayer, and i have read explanations and ways how to do this but nothing seems to work for me.

winged badger
#

try the compendium, link is in top pinned message on the channel here

boreal wadi
winged badger
#

that was more for @ancient badge

#

i don't know how much session stuff cedric put into that thing

narrow leaf
#

Hi! I have a little bit of problem. I have a building block (static mesh actor) with replication (component replication, "Replicates" flag, and the smooth sync plugin btw same effect with replicate movement). I made a "grab" system, and when I grab a block, the collision is need to be disabled. IF the Client grab the block, the server see the block without collision. But if the server grab the block, the client see the block with collision. I tried a lot of things to fix it, but I cant. Any idea?

winged badger
#

collisions are local @narrow leaf

#

so client should turn off the collision on the block on its own end when the information that it was grabbed replicates

#

@boreal wadi in general you would need to either

#

send a login string argument to the dedi when first connecting for it to open an instance with the desired gamemode

#

or join to a lobby on the dedi and select the gamemode via the RPC

#

options #1 is simpler here

#

as for taking an entire party, one could fake that with steam lobbies

#

you can think of them as a steam hosted chat that can hold data, much like sessions

narrow leaf
#

Here is my rep. EDIT: the upper event is run on server

winged badger
#

so the lobby owner could select a gamemode on dedi and send an url via the steam lobby to the other party members

#

@narrow leaf send the pointer to the block you're grabbing through the RPC as an event input

#

makes it much simpler to handle stuff on the other side

narrow leaf
#

Sorry, but what does the pointer mean? MY english is not too good

winged badger
#

reference to block Actor

narrow leaf
#

oh thanks

boreal wadi
#

@winged badger Okay.. I was told that once before. To send args through the dedi with the desired game mode/map.. Just thought there was a more streamlined way to fake match making..

My idea is to spin up about 4 servers on my pc, have them running different maps/game modes once a player or party leader searches for said game mode they would get sent to that server address when its open.. Shitty thing that is bugging me is that I would (in the future) have to set up a crap ton of servers for each different match.. Which sucks because I only want to hold 10 ppl in a match.. I know a server could hold more but I dont know how to use that too my benefit. Sucks cuz only 10 ppl can play on a server at a time unless I'm wrong about this

winged badger
#

server can spin an instance with a specific gamemode on request

#

so you don't have to have them pre-spawned

#

(i don't know how to do it, i know that it can be done)

boreal wadi
winged badger
#

once you are connected to it already, you can do it with ?game=<GameMode> argument to ServerTravel

#

it shouldn't be spectacularly difficult to do it while connecting either

boreal wadi
#

so If im understanding right.. Player connects to one of the servers I have - they search for a TDM mode, If one already exists with space and the match hasnt started the join that instance, else the server will spin up another instance.. I need to find an example of this so I can see it in action.. Its probably not that simple or there would be loads of tuts on it lol

meager spade
#

it is not an RPC argument

boreal wadi
#

I was just looking at playfabs api I might have to use their matchmaking api to accomplish what I want. I was just looking for a simple way to fake matchmaking while testing with a few people..

eternal canyon
#

wdym?

#

u oculd have a looping timer that looks for sessions nad joins the first one but that would be pretty hacky

bronze arch
#

-Brain storming-
Anyone have integrated the multi CC system in the multiplayer game?
Not like: stun and delay then remove stun.
there may silent, stun or fear that run away from enemy at same time. if you do delay and remove the stun. then you'll able to move while rooted.
Do anyone have any ideas?
im thinking to add unablemovestacks that if you got stun and root at same time you will get 2 stack. after end stun while root it removes 1 stack and you still not able to move until 0 stack.

winged badger
#

gameplaytags

eternal canyon
#

^^

bronze arch
winged badger
#

no

bronze arch
#

oh

#

well lets say without using gameplaytags. what would you do?

winged badger
#

either have all rooted tags start with Rooted. or Status.Rooted or whatever then just match for the root Rooted tag

#

or have a FGameplayTag container that contains the tags that apply root that don't have to share the same root tag

#

and if you have any of tags matching Rooted. in first case or any tags that are in that container in second case

#

you can't move

bronze arch
#

i wasnt familiar for gameplaytags since never used, at the tick(in sample) are gameplaytags nodes costlier than variables for performance?

#

you need to check all CC's for matching it is disabled movement or disabled attack on gameplaytag i guess.

spice gorge
#

Got an oddity. I've got Jump setup (based on 3rd Person template) and the jump animation only plays for the server. Clients just show the character motioning up and down without an anim.
In the Animation Blueprint event graph the clients do not get IsFalling set as true, hence why the jump animation doesn't play.
I have the same character blueprint setup in another project and it works fine.
Any idea on what might be causing this? Maybe I'd changed something somewhere else that's creating this effect.

#

I should add that the clients show the jump animation playing on themselves, just not on any other player.

bronze arch
foggy idol
foggy idol
lost dune
#

Can help me to resolve the following packaging w64 error?

#

Missing precompiled manifest for 'OnlineSubsystemEOS'

#

ERROR: Missing precompiled manifest for 'OnlineSubsystemEOS'. This module was most likely not flagged for being included in a precompiled build - set 'PrecompileForTargets = PrecompileTargetsType.Any;' in OnlineSubsystemEOS.build.cs to override.

#

Please i 'm stuck on this

viscid escarp
#

Hello! Does sockets rotate in dedicated server? While a listen server, the capsule is perfectly in the character's head, but while in a dedicated server seems like character is not rotating(like in the image). The red capsule is being spawned in the location that dedicated server is seeing it.

scarlet cypress
#

Will nativized blueprint cause less lag than normal?

#

Probably not right, onyl affects fps?

kindred widget
#

@scarlet cypress Programming itself, generally will not cause less or more lag. At least not in general sense. If you have a ton of shitty code that is lagging your server's FPS, you'll have some slower replication, but generally speaking if the server is still over 15fps, it should still be fine for clients in "Most" cases.But actual latency only comes from the networks that the server is hosted on and the client is playing from.

scarlet cypress
#

ok thanks

gritty pelican
#

How disable tick for Server, but enable if Player is server

switch (XVisionNetMode)
    {
        case EXVisionNetMode::Both: 
            SetComponentTickEnabled(true);
            break;
        case EXVisionNetMode::Client: //Here
            if (GetOwner()->HasAuthority()) SetComponentTickEnabled(false);
            break;
        case EXVisionNetMode::Server:
            if (!GetOwner()->HasAuthority()) SetComponentTickEnabled(false);
            break;
    }
kindred widget
#

@gritty pelican Disable if (World->GetNetMode() == NM_DedicatedServer)

#

Can probably get world from this since it's a component. GetWorld() should work on it.

#

Alternatively, UKismetSystemLibrary::IsDedicatedServer(this) then disable, else enable

gritty pelican
#
case EXVisionNetMode::Client:
            if (GetOwner()->GetNetMode() != NM_Client && GetOwner()->GetNetMode() != NM_ListenServer) SetComponentTickEnabled(false);
            break;
#

can i check like this?

#

or

if (GetOwner()->GetNetMode() == NM_DedicatedServer) SetComponentTickEnabled(false);
#

thanks, i think i understand

#

right?

switch (XVisionNetMode)
    {
        case EXVisionNetMode::Client:
            if (GetNetMode() == NM_DedicatedServer) SetComponentTickEnabled(false);
            break;
        case EXVisionNetMode::Server:
            if (GetNetMode() == NM_Client) SetComponentTickEnabled(false);
            break;
    }
scarlet cypress
#

To be able to connect not over lan only you need to integrate steam or an other service for the matchmaking right? With the ue4 only you can’t do distant multiplayer..?

#

Or is there a way?

kindred widget
#

@gritty pelican I don't know what the XVisionNetMode is. But GetNetMode's return has four main values. Standalone, DedicatedServer, ListenServer or Client. You want this enabled if it's running on a player's screen. Therefor you want it enabled if it's either Standalone, Listenserver, or Client.

#

Disabled if GetNetMode == NM_DedicatedServer. Cause that's the only net mode that will not be a player playing.

gritty pelican
#

XVisionNetMode it is my NetMode

#

for plugin

crystal crag
#

@meager spade You were right, it was just that the server had a different name than the client. The client is sending the right pointer to the server.

#

I thought the names synced; learned something new.

twin juniper
#

i got a new level that i made my multiplayer game run in, i just changed the level, and it has one player start in it, it works in editor with 2 clients, when i build it, the clients has no controll over their character, taking no input from mouse, keybaord, if i change back to old level. it all works, what can be wrong or missed with that new level ?

dark edge
crystal crag
#

Do you need to call the parent BeginPlay inside of BPs if your character class implements the C++ begin play?

#

or is that automatically handled for you?

twin juniper
dark edge
#

If that game mode is used for all levels, you should just set it in the project settings then you don't have to do a level override

gleaming vector
#

I ended up just sending the emission point to the server

flint jacinth
#

hey guys, im trying to implement a simple multiplayer movement system, however only the server is able to move even though im running the code for both server/client on the server via events.

  • Server moves, client can see server move.
  • Client moves, server receives client movement request, but the client doesn't move.
    Any thoughts why that is happening?
hollow eagle
#

replicated variables only replicate from server -> client. You're writing code as if it's depending on "Forward Thrust Amount" replicating from client -> server

#

the way to pass data to the server is to add arguments to your server rpc

#

not by using replicated variables

flint jacinth
#

ah! ok that makes sense, let me give that a try πŸ™‚

#

thanks @hollow eagle works now πŸ™‚

crystal crag
#

I am at a loss. I just don't understand what is going wrong here. I've been at this each and every weekend for many weekends. I just can't get it right.

#

Client sends actor reference to server. Server sets replicated variable (using onrep_) to the actor reference sent from client. The OnRep_ method shows a different actor reference set

#

I can see in the output that the server gets the right actor reference from the client. I can see the server sets the replicated variable. Then the OnRep method fires on the client with a different actor

#

set in the replicated variable

#

So my problem this whole time has not been the camera selection logic at all

#

Server

[2021.05.01-21.07.09:082][ 70]LogRaevinCamera: Warning: URaevinLockArmComponent::ServerSetLockedTarget_Implementation() - Received new target component, which is owned by BP_Enemy_DarkKnight_C_0 which has minion ID '42388C8F42103E938C37A78EDA25AD85'.
[2021.05.01-21.07.09:083][ 70]LogRaevinCamera: Warning: URaevinLockArmComponent::LockToTarget()
[2021.05.01-21.07.09:083][ 70]LogRaevinCamera: Warning: Set new targetable to a valid target component. Minion ID is '42388C8F42103E938C37A78EDA25AD85' and owner of target component is BP_Enemy_DarkKnight_C_0
[2021.05.01-21.07.09:084][ 70]LogRaevinCamera: Warning: URaevinLockArmComponent::ServerSetLockedTarget_Implementation() - successfully locked onto the target component!
#

Client

ogRaevinCamera: Warning: Sending server target component with owner minion ID of '42388C8F42103E938C37A78EDA25AD85'.
LogRaevinCamera: Warning: URaevinLockArmComponent::OnRep_CameraTargetChanged()
LogRaevinCamera: Warning: CameraTarget is VALID. Owner is BP_Enemy_DarkKnight_C_0
LogRaevinCamera: Warning: Camera target has minion ID of 0013BF5C4A2D358A604350860FA72EF6
#

and then the client locks on to the invalid target, which was never even considered for lock on in the first place

#

its way on the other side of the map

#

Does anyone have any idea what could cause this? I've never seen anything like this before

#

The replicated variable is being simply set to what the client passes to the server

#

If I run to the other end of the map, the GUID the server replicates back to the client, is the right GUID for that enemy, but it's not the one that was sent to the server or the one the server set to the replicated variable

scarlet cypress
#

So i did it and made a fully working multiplayer game..

#

But none of my friends want to play it..

#

So what do i even get out of this

crystal crag
#

That's a risk everyone takes when they make a game as an indie

#

I guess be happy that you managed to accomplish such a hard task? I am stuck here trying to figure out a problem that just won't ever get solved

#

I just want to be able to have a client send the server which target to strafe around, and that has been the most frustrating task in my programming career. I had more fun learning how to program my own operating system.

#

It should be simple, yet something is messed up and the server sends a different actor

dark edge
scarlet cypress
zinc holly
north heath
#

Hello im having a problem replicating a variable that is set from the input axis, it seems it always get set back to zero by the server. Im unsure on what Im doing wrong or if its possible.

hollow eagle
#

variables can only be replicated from server -> client. Use an RPC to send data to the server

north heath
hollow eagle
#

Use an RPC to send data to the server

#

input data is not automatically sent to the server

#

you have to do that yourself if you need it

north heath
hollow eagle
#

You're never sending the inputs to the server though

#

you call Server Set Parry Vector which doesn't use any data from the client

north heath
#

Gah I see now...

#

Thanks a lot

dark edge
#

OK, multiplayer roguelike with drop-in, drop-out coop.
How should I store the player's character, and whether or not they even HAVE a character (after death, first startup)?

#

Should that touch GameInstance at all or just be handled in the PlayerController with SaveGames?

dark edge
#

Why does Event Handle Startin New Player seem to bypass all the Gamemode functions around spawning pawns etc?
Is it meant to be a catch-all instead of overriding all those functions?

#

If that event exists in my graph, always start as spectator

summer tide
#

Has anyone replicated Boat riding? Let's say you have a char BP and boat BP. You either possess or attach your char to the boat, whatever is easier to replicate.

round star
#

Whats the authority if for c++..role_authority and hasauthority() aren't doing anything...tf

#

and isServer() also no work ..dafook

lyric mural
#

I just read that replication is different when its for more than 4 players? What is different?? (I know you cant build an mmo thats not my goal im aiming for servers with like 40-50 people)

craggy void
#

and if (GetLocalRole() < ROLE_Authority) to check if it hasn't

winged badger
#

@lyric mural it isn't different, but i would not attempt to do more then 4 players without the use of c++ unless the game is turn based

#

blueprints have around 10% networking functionality exposed to them

kindred widget
#

Yeah. Blueprint is missing a few serious key features for larger game multiplayer. No replication graph, no fast arrays, no repconditions just to start.

rose egret
#

guys. whats the maximum world size for dedicated server ? -HALF_WORLD_MAX to HALF_WORLD_MAX ?
my concern is physx and floating point.

#

so it means -10km to 10km ? thats not enough for me 😦

#

πŸ€”

kindred widget
#

You could always just shrink your characters? O.o Then the world is larger!

rose egret
#

has anyone tried that size ? I guess CMC get into trouble at the corner of the world

#

I am designing a FPS game, need a big desert containing several oasis.

potent cradle
#

@rose egret I would live with the limitations for now and make something larger when UE5 + 64bit floating point precision rolls around

kindred widget
#

@potent cradle Are they actually moving systems like CMC and such over to doubles? I know the world timers have started to see some changes from floats to doubles.

potent cradle
#

Good question πŸ€”

#

I would imagine so, otherwise the practical benefit is greatly deminished

#

I'd be surprised

kindred widget
#

The ServerTimer or whatever variable it is, is now a double. But the systems around it are still doing math in floats. So I suppose by 2030 we can expect to have servers that can stay up longer than 3-4 days consistently.

potent cradle
#

So I suppose by 2030 we can expect to have servers that can stay up longer than 3-4 days consistently.
I think I remember a discussion a while ago about this topic

#

That a clock or timekeeping used on the server started getting unreliable after a few days

#

(Haven't actually had my server up for that long yet, so haven't run into it)

#

Blew my mind πŸ˜„

chrome quest
#

Since the EOS channel is pretty much inactive. I have a question here. Does EOS provide servers to run the game? Or is it just to store certain data.
How exactly does it work with the dedicated server?
Thanks

scarlet cypress
#

I'd like to use my game with steam multiplayer but i can't find sessions..

  • Did the Engine Config change
  • Enabled Subsystem Steam Plugin
  • Steam is running (with two different accounts)
#

What did i do wrong?

south rampart
#

Hello, I have a working beacon system in editor and I hardcoded "127.0.0.1" as address. The problem is I need to get this information on the server dynamically (it won't be the local address outside of the editor).

This code works but only on the client.

#

This code should work but I get an unresolved external error when I try to compile.

Does anyone know the simplest way to get to know the address of the server (beacon) so I can pass it to the clients?

winged badger
#

unreasolved external symbol = you didn't add a module you're using in your build.cs as a dependency @south rampart

thin stratus
#

Not sure if that changed, but iirc you can't get that IP without basically asking "someone" for it.

south rampart
winged badger
#

its not an include problem

#

you'd get a compiler error before you got to the link errors if it was

south rampart
thin stratus
#

You mean if you are already connected to it?

south rampart
# thin stratus You mean if you are already connected to it?

This is what I do on the server. After I can connect to this beacon through 127.0.0.1:7787 (defined in DefaultEngine.ini) on a client.

I need to write a system that will connect to this beacon even if the address is something different. Getting to know this different address is where I am stuck πŸ˜…

#

PingBeaconHost.cpp.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: static class ISocketSubsystem * __cdecl ISocketSubsystem::Get(class FName const &)" (_imp?Get@ISocketSubsystem@@SAPEAV1@AEBVFName@@@Z) referenced in function "public: static class FString const __cdecl APingBeaconHost::GetNetworkURL(class UObject *)" (?GetNetworkURL@APingBeaconHost@@SA?BVFString@@PEAVUObject@@@Z)

#

This is my exact error

winged badger
#

so add "Sockets" in your public dependencies in your buld.cs

south rampart
winged badger
#

i did say public

south rampart
#

Sorry I am new to this part of UE4 πŸ˜…. Rebuilding

south rampart
# winged badger i did say public

It worked! Thank you!
Though GetLocalHostAddr() did not return the address I wanted.
I will try GetMultihomeAddress() and GetLocalBindAddr() in the hope they return what I need. I don't really know what I'm doing (my education on networks is very vague), so I'm just firing wildly :p

bitter oriole
#

I love how PawnLeavingGame is actually the player controller being destroyed

#

Makes a lot sense

narrow leaf
wheat magnet
#

@scarlet cypress you first need to create session, and then find session and then join session ( you might be doing in wrong order )

timid moss
#

I have a question about Net Serialization with UStructs. I have this implementation and it is very simple since all I am doing is just replicating 1 HitResult and the HitResult already has a NetSerialize function I can use. ```cpp
bool FGameplayAbilityTargetData_BulletTraceTargetHit::NetSerialize(FArchive& Ar, class UPackageMap* Map, bool& bOutSuccess)
{
HitResult.NetSerialize(Ar, Map, bOutSuccess);

return true;

}```
However recently I changed what I am trying to replicate. Now instead of 1 hit result I am trying to replicate a TArray of HitResults TArray<FHitResult> HitResults. So how can this be done? The TArray class doesn't provide a NetSerialize to use so I'm kinda stuck. Would I need to loop through the array and call each of the hit results' NetSerialize? That doesn't seem right to me since the array isn't being serialized

lyric mural
kindred widget
#

@lyric mural Blueprints aren't meant to be a main programming tool. They're a middleware meant to help programmers handle simpler tasks easier, and to allow designers to do simple things without exploding a program. Even if you could add some of those things to Blueprint, it'd be a waste of time because those things are there for hardcore optimization. Putting them in Blueprint allows people who aren't ready for them access to those tools, and also kind of ruins some of the optimization having to deal with the blueprint virtual machine.

lyric mural
#

@kindred widget thanks, Im going to start learning cpp

twin juniper
#

Whenever i use "Net PktLag=900" it changes the ping for all clients and not just the client that i selected. is there a way that i can assign different pings to different clients in the editor?

timid moss
#

net.pktlag=900 should be doing what you want

#

think that's the same command your using though

crystal crag
#

@kindred widget I appreciate your help last weekend. It turns out my issue is not with the camera logic

#

The code you gave me is working as it is supposed to.

#

Something weird is going on where when I pass the target to the server via RPC. I pass the target to the server, the server gets the right target (I verify by spitting out logs regarding the target received). Then the server sets the target to a replicated variable that fires an OnRep on the client. When the OnRep fires, it is returning a different actor component than what was set...

#

Not sure how that is even possible

kindred widget
#

It shouldn't be. Depends on how the OnRep is set up.

twin juniper
crystal crag
#

Then in the GetLifetimeReplicatedProps...

#
DOREPLIFETIME_CONDITION_NOTIFY(URaevinLockArmComponent, CameraTarget, COND_None, REPNOTIFY_Always);
kindred widget
#

Out of curiosity, why a softobject pointer?

crystal crag
#

I was trying to avoid a hard reference to the target and I don't think TWeakObjectPtr replicates.

kindred widget
#

It isn't an asset though. And it isn't like your targeting component's class CDO isn't going to be loaded anyhow. So it won't matter if Unreal loads it into the background via hard pointer.

#

Dunno if that's the problem I haven't used softobject pointers outside of asset referencing. StaticMeshes, Texture2D, etc.

crystal crag
#

Ok

#

Well, I can convert it to a hard pointer. I'm willing to try anything at this point. I'm about ready to re-write everything related to this feature. But I'd like to not give up on it.

#

I gave the enemy character's a unique guid that replicates so I can easily track which actor is which between client and server

#

That's how I know from the logs that the actor is the same actor that is being passed from client to server, and then that it is incorrect when the server passes it back to the client via the replicated CameraTarget property.

kindred widget
#

To be fair. I don't think a hard pointer will change anything. AFAIK, the only real difference between a normal hard pointer and a softobjectptr is that the softobject includes a path location on disk. Not certain of that's replicated as well, but it makes softobject pointers quite a bit larger than normal pointers.

crystal crag
#

yeah I think you are right there

#

I've never seen this before. It really suggests that I am doing something wrong... but really, it is as simple as taking the RPC param and setting it in the replicated variable. I am wondering if the issue is because the target I am replicating is a UWidgetComponent

#

UTargetComponent really is a UWidgetComponent

kindred widget
#

You're doing all of the logic on tick aren't you?

crystal crag
#

Well, I added the log writing on tick for debugging purposes. But the code only tries to get the best target and call the server RPC when I hit TAB

#

I got so desperate, I even added the guid as text above the enemies lol

kindred widget
#

But I mean the rotation stuff, it functions on tick?

crystal crag
#

and I added particle effects for "this target is near enough to me" and a separate one for "this is the best target right now"

#

no it doesn't

#

When I hit TAB, the lock arm just grabs the best target, closest to the camera

#

*closest to the center of the camera, and limited within a small sphere range (800.f)

#

then the client sends that best target to the server via rpc

#

and that part is working

kindred widget
#

What is in your OnRep function?

crystal crag
#

Makes sure that the server and client agree with the target being set. I send the RPC, but I don't change the characters movement (e.g. rotate towards target on tick/etc.) until that OnRep method fires off

#

I also use it to stop locking onto a target if that onrep fires and the camera target is no longer valid

#

Well, I tried to send the method, but a bot came up and said I couldn't send the message o.O

#

That's the method

#

So at the very beginning of it, if the camera target is valid, I write out that GUID

#

Here is the log output (I just tested it again)

#

Server:
[2021.05.02-17.30.04:740][729]LogRaevinCamera: Warning: URaevinLockArmComponent::ServerSetLockedTarget_Implementation() - Received new target component, which is owned by BP_Enemy_DarkKnight_C_2 which has minion ID 'D2500BAC4D097C8FF126CB9FD777C457'.
[2021.05.02-17.30.04:742][729]LogRaevinCamera: Warning: URaevinLockArmComponent::LockToTarget()
[2021.05.02-17.30.04:742][729]LogRaevinCamera: Warning: Set new targetable to a valid target component. Minion ID is 'D2500BAC4D097C8FF126CB9FD777C457' and owner of target component is BP_Enemy_DarkKnight_C_2
[2021.05.02-17.30.04:742][729]LogRaevinCamera: Warning: URaevinLockArmComponent::ServerSetLockedTarget_Implementation() - successfully locked onto the target component!

#

Client:
LogRaevinCamera: Warning: Sending server target component with owner minion ID of 'D2500BAC4D097C8FF126CB9FD777C457'.
LogTemp: Warning: APlayerRaevinCharacter::OnSwitchFocusedReleased()
LogRaevinCamera: Warning: URaevinLockArmComponent::OnRep_CameraTargetChanged()
LogRaevinCamera: Warning: CameraTarget is VALID. Owner is BP_Enemy_DarkKnight_C_2
LogRaevinCamera: Warning: Camera target has minion ID of C23EE23445CC8AE0D2CEAEA8C0400D8C

#

So everything agrees until the client gets the variable replicated on the OnRep

#

and that guid belongs to the enemy, not right next to me, which the client sent to the server, but the enemy all the way across the map

#

so like, just now, I tested again:
Server:
[2021.05.02-17.34.43:156][127]LogRaevinCamera: Warning: Set new targetable to a valid target component. Minion ID is 'C23EE23445CC8AE0D2CEAEA8C0400D8C' and owner of target component is BP_Enemy_DarkKnight_C_1

#

That's where it sets the variable

#

Client:
LogRaevinCamera: Warning: CameraTarget is VALID. Owner is BP_Enemy_DarkKnight_C_1
LogRaevinCamera: Warning: Camera target has minion ID of DFC4E4FD4C729C7610CFF2971CF9D8A6

#

and if you look, that guid is owned by a different enemy

#

I know you don't have the answer, I'm sharing it more for you to scratch your head and ask "wth?" like I am doing lol

#

I think I am just going to redesign this using an interface and only replicating the actors instead of their target components

#

@kindred widget well... I converted it to a hard pointer, and it seems to be working now...

#

This will be the fourth attempt at getting it to fail

#

and it has been working

alpine root
#

Does anyone know if there is a way to join/host sessions without opening a new level? I want to create a seamless lobby in the main-menu

kindred widget
#

@crystal crag Haha. I dunno. Like I said, I never use Softpointers for Actors or Actor Components like that, I've only ever used them for asset loading in places like inventories for icon textures or like storing the mesh that a piece of armor might use. Cause you can have all that data saved and a new one can be loaded up if needed and it doesn't matter if it's a different one than the original because they're all the same. πŸ€·β€β™‚οΈ

ancient lily
#

does anyone know if the hit object instance index is reliably the same on server and client? im seeming to have some problems with that πŸ€”

kindred widget
#

@ancient lily You 'might' get some similarities in testing but it isn't promised I don't believe.

ancient lily
#

i think im approaching it wrong anyway, replication keeps breaking my head

kindred widget
#

I've written a few different managers with fast arrays for removing and adding HISM component meshes at runtime and the only solid way I have found to identify them is via specific location/rotation.

#

Cause those will pretty much be the same on client/server.

ancient lily
#

yeah i mean, ive started replication from scratch and read a lot of stuff about it, and yet i still know nothing and need to re-test stuff again time over time

#

such as in, if i multicast spawn a replicated actor, will it spawn twice on a client because it would also spawn on the server and be replicated anyway

kindred widget
#

Haha, yeah. The RPC vs replication gets a lot of new people.

ancient lily
#

ive written bytecode but this is more complicated, and thats not even a pitfall

scarlet cypress
#

My steam multiplayer with the default ID just sometimes doen't get a search resul and sometimes it does

#

What is going on there..?

kindred widget
#

@scarlet cypress With 480?

scarlet cypress
#

yeah

kindred widget
#

You're fighting against the horde of other people using it.

scarlet cypress
#

So it cant determine if its a different game when its using 480?

#

And will just be unable to join?

kindred widget
#

TLDR, there are a ton of people using it and sometimes the results of that flood your finder, but none of them are for your application so they don't get displayed.

scarlet cypress
#

so just make a high number of search results?

#

and hope it's in there

#

is locally controlled

#

if thats what you mean

crystal crag
#

@scarlet cypress another reason I like to use the EOS subsystem.

scarlet cypress
#

I found a way to fix it, just set max search results to 1000 😭 😭

ancient lily
#

so when i spawn an actor with a specific transform, on clients replicated via multicast it only seems to affect the first component under its root and not all of them ... weird

#

is that how thats supposed to work πŸ€”

#

yeah .. seems like it really is the transform spawned on the server and replicated (all components replicate) which actually isnt getting replicated for all actor components other than the first .. whew

#

yet another change of plans

ancient badge
#

Hello, i have an Cube that is replicated by the server to all clients, it has "Text Render Components" on them. In my blueprints, i checked with a "Print String" if the variables are passed until the "set text", everything seems to work, but in the game i don't see any change. Every "Text Render Component" shows its standard value.

Any ideas why?
In Singleplayer this works.
The Variables i'm getting from a "Data Table"

#

Did i miss a point of replication?

kindred widget
#

How are you doing the replication?

ancient badge
#

Well, i checked the "Replicates" Box in the Actor. Made a Costum Event with "Run on Server". For my Variables i tried "None, Replicated and RepNotify"

crystal crag
#

Wouldn't you want it to be a multicast event?

#

Run on server = client calls method to run on the server (if owning client)

#

I might be misinterpreting what you want to do, but I don't think run on server would be right

kindred widget
#

For something like setting the text in a textrender. You'd simply want the text render component on an actor, the component does NOT need to replicate. The Actor does. Then the actor needs a replicated string/text/name set as RepNotify. Inside of the repnotify, you get your string/text/name and set the textrender's text there. And then you set the string/text/name on the server.

ancient badge
#

When i use multicast i get one with my variables and a second one without them.

kindred widget
#

Don't multicast state. Let it be a repnotify.

ancient badge
#

You mean the Function that is automatically created when i use repnotify?

crystal crag
#
UPROPERTY(ReplicatedUsing = OnRep_CameraTargetChanged)
    class AActor* CameraTarget = nullptr;
#
void URaevinLockArmComponent::OnRep_CameraTargetChanged()
{
    UE_LOG(LogRaevinCamera, Warning, TEXT("%s()"), TEXT(__FUNCTION__));

    if (CameraTarget != nullptr && !CameraTarget->IsPendingKill())
    {
...
#

In a similar fashion. You'd handle the text changing inside of your rep notify method

ancient badge
#

Oh, sorry forgot to mention that i'm using only blueprint

crystal crag
#

I don't think repnotify is possible in BPs

ancient badge
#

Damn, i just had a Deja Vu πŸ˜„

If you look at a Variable inside a blueprint you can set it to repnotify

crystal crag
#

oh cool, glad I was wrong then

kindred widget
#

Repnotify is available, conditional replication is not.

#

You can set replication types, and notify, but you cannot disable replication via bool at runtime in blueprint.

ancient badge
#

@kindred widget Thank you, repnotify worked

summer tide
#

Anybody knows how to replicate boat riding? Let's say I have a char BP and a boat BP. The char either posses or get attached to the boat, whatever is easier to replicate.

crystal crag
#

I think you would do both? I would think that you would attach the char to the boat, then have the player controller posses said boat

haughty kernel
#

Can any one suggest me reliable voice chat system for UE which will work Cross platform ?

finite goblet
#

If I change a member in a struct is the whole struct replicated or just the changed member?

bitter oriole
#

By default only the changed member

finite goblet
#

what is the non-default and when does that happen

bitter oriole
#

Non default is marking the struct Atomic

#

Not sure if that ensures all modified values are replicated at once, or the entire struct, though

finite goblet
#

I think it should be the former since replication is sending fundamental types over network and reconstructing the higher level object from it

bitter oriole
#

It should, but I don't know for sure

rose egret
#

@finite goblet by having custom NetSerialize u write your own serialization and send the struct as whole.

winged badger
#

@finite goblet unreals documentation for net serialization is in NetSerialization.h (half of it is comments)

bitter oriole
#

By the way I'd love to know for sure what Atomic does exactly

narrow leaf
kindred widget
#

@narrow leaf Looks like basic replication? Instead of setting the cube's location like that, why not simply attach it to a spring arm or something on the character? Then all clients can move it based on the character's rotation.

queen pine
#

So i have a very basic function I'm trying to replicate.
When the character clicks on an actor it toggles the material from default to green.
This test is me trying to troubleshoot a consistent problem I've been having where custom events running on server don't get called. Replication works coming from the server, but not from the client.

#

the server can call the event but not the client

#

I've heard a little about how sometimes you need to make sure the client is the owner. But I've been working off of many sources on how to do basic replication and this hasn't been of any focus.

#

both the actor and component are set to replicate.

pastel marlin
queen pine
#

The server can call multicast but the client cant call run on server let alone multicast, so it doesnt run on the client at all

pastel marlin
#

when you put a breakpoint on "On Clicked" does it trigger ?

queen pine
#

yeah, i have it in a different window and i can see it running up to the ServerChangeColor

pastel marlin
#

have you tried putting both your rpc as reliable for now ?

queen pine
#

I did in a different blueprint, but client is right next to server. I'll try though

#

this is coming from the server with reliable set on both events. The execution stops at server change color without running it.

pastel marlin
#

is you actor present on the map at the start of the game or you spawn it later ?

#

your*

queen pine
#

there's no characters placed on map at start. They spawn in using players starts

pastel marlin
#

the actor with on clicked is a character ?

queen pine
#

oh, i misread that, yeah the actor is already placed

pastel marlin
#

had print at each step and breakpoint

#

i think its probable that the rpc work but your material change doesn't

#

you may already know but when you put break point on server and start as listen client the breakpoint on server won't trigger and the inverse is also true

queen pine
#

it doesnt run here though, so it wouldnt be the material function

pastel marlin
#

how do you know it doesn't run ?

queen pine
#

i watch it

pastel marlin
#

did you put a breakpoint or a print ?

queen pine
#

one sec

#

yep doesn't run when coming from client

#

skipping ahead steps out of execution

pastel marlin
#

your screen doesn't prove anything

#

add a print to serverchangecolor

#

with a long duration to be sure to not miss it

queen pine
#

this doesnt change anything

pastel marlin
#

skip the rpc and connect directly to your material change

#

from on clicked

#

does it work on the client ?

queen pine
#

no, but That was the first thing i tested to make sure i wasnt missing the unrelated stuff.
The client doesnt turn the sphere green when clicking it but the server does and the client can see when the server changes the color.
My only problem is the run on server event doesnt get called, I've already troubleshooted everything else.
I have larger systems that i get the same issue when trying to replicate.

pastel marlin
#

could you take me a screenshot with the modification i asked please

queen pine
#

This one?

#

to skip the event altogether?

pastel marlin
#

yep and this doesn't work

queen pine
#

course that works, but then its not replicated

pastel marlin
#

okay i need you to stream your screen to help you further if you don't mind

queen pine
#

yeah sure Thanks for the help btw

pastel marlin
#

np

#

go to lounge ?

queen pine
#

yeah

#

i cant stream in this channel

kindred widget
#

@queen pine Your issue is likely ownership, if you haven't gotten that far yet.

thin stratus
#

Yes it is Ownership

#

Clients can't execute a ServerRPC on non-owned Actors.

pastel marlin
#

confirm its ownership

queen pine
#

Yeah look like it

thin stratus
#

You will have to go through your PlayerController/Character to get this working

#

Clean solution would be some ActorComponent on the PlayerController, something like a ClickManager.
Then you can get the Controller of the Player that clicked, get the Manager, perform an RPC inside of that (given it's marked as replicated), passing the Actor along.
Then the on the ServerSide you can do your material stuff

pastel marlin
#

InteractComponent would be a clean way to do it indeed

thin stratus
#

Another way, with the same manager, would be handling clicks as LineTraces inside that Manager and not using any of the Click stuff of Actors

queen pine
#

This is my main project.

#

Its an interaction system with the logic in the door itself, but It makes since to me now that it needs to be done this way instead

pastel marlin
#

to increment on cedric idea, I would make an interface for interactable object to implement

#

that way you can keep the logic of the action hidden inside the actor

#

when you linetrace you cast to your interface on hit

#

and if it cast successfully you send the reference of the actor via rpc to the server to call your interface function

queen pine
#

okay I'll give it a try

hazy silo
#

hello there,
can you guys recommend a good course/tutorial series on replication with blueprints?

#

on the unreal youtube channel I only found one old and crappy livestream

#

I already know the basics, I mainly need examples and use cases

queen pine
#

@pastel marlin and everyone else thanks for the help. Got it working!!

#

I will take this newfound knowledge to big and high places.

potent cradle
#

Is it by design that apex destructable meshes don't seem to show up when playing as client on dedicated server?

woeful ferry
#

Is it possible to only replicate some variables in a struct?

#

For example, I have an array of pointers I don't want to replicate, but I want to replicate the float value in the struct.