#multiplayer

1 messages ยท Page 287 of 1

frosty harbor
#

The only issue with doing it this way is that the uncrouching is ALWAYS waiting for server validation on crouching before it's allowed to uncrouch

#

Which means it's not super responsive ๐Ÿ™

nocturne quail
#

You are over complicating stuff

frosty harbor
#

maybe but I just dont see another way to solve it

ashen plume
#

Couple of other things, CMC already sets the camera height, so using what looks like animation to smoothly adjust the camera will conflict

frosty harbor
#

Well the camera is bound to the head bone since its a true first person game can't really change that without breaking everything else camera related

#

So if animation plays for crouching it'll follow the head bone

ashen plume
#

If the animation isn't blending well then you'll get the snapping

#

Hacky solutions would be check for and waiting for the animation to finish similar to your validation

#

Or create a timer manually to call the uncrouch if your desired time elapsed in update

quartz star
#

Hello, I made a custom movement mode for spline-based movement in the CMC.
It works fine for the autonomous proxy and the server, however the simulated proxies seem to have an issue with it.
Almost as if they get gravity applied, move down by a few cm (even if they shouldnt) and therefore get snapped back into place.

Does anybody know why this could be?

#

(cyan capsule is the server location)

#

the cube (the actual pawn) is bobbing up and down

ashen plume
#

Gravity still applied?

quartz star
#

it looks like it, however in my custom Phys function there is nothing related to gravity.
Not sure whether its something specific to simulated clients, as it works fine for non simulated ones

ashen plume
#

Complicated answer would be to see if the position smoothing applied to the mesh doesn't like it

quartz star
#

I already checked that, its not the mesh but the entire character.

frosty harbor
#

its entirely based on latency

#

Because if I test with 10ms then 100ms and with 1000ms, the amount of time I have to hold the crouch to prevent this from happening is completely different

ashen plume
frosty harbor
#

The issue is that locally the uncrouch begins before the server crouch begins

#

so it messes up the camera by correcting it

ashen plume
#

I know CMC uncrouch doesn't reset the intent of crouch so itll just constantly ask to uncrouch

frosty harbor
#

if I check the variable won't it say that it is crouching because locally it already is crouching?

quartz star
ashen plume
#

Probably look into the cpp of CMC, otherwise don't animate the character yet until you got the baseline crouch working

frosty harbor
ashen plume
#

It is, but it gets reconciled when biscrouching gets repd too

frosty harbor
#

yea but you mentioned to check crouch state before calling uncrouch, but the crouch state (or the variable bIsCrouching) will always return true because it gets updated locally

ashen plume
quartz star
ashen plume
quartz star
#

That shouldnt be an issue since my spline doesnt go upwards/downwards.
Idk I cant seem to find why it moves my character down

ashen plume
#

Ah, looked like it was climbing, only thing left is to step through to see why y position is different

quartz star
#

okay nvm I was lying.
It indeed is the mesh itself bobbing up&down.

#

hmm, will try and see what i can do

#

Thanks for your time !

wise depot
#

hey
i can't post in #ue5-general for some reason
Has anybody else had issues with UE5.7 and remote clients animations running at half speed?

The third person example is doing it for me, as in just a blank 3rd person template with 2 players as listen server and the main PIE window shows the second players animations running at half speed.

Is this just an editor bug? I haven't set up lobby/joining/ui flow yet to test in standalone

dark parcel
wise depot
#

scratch that* just tested with a fresh blank 3rd person bp-only project and its not doing it on there. so i'm not sure if i've changed something to cause this

wise depot
dark parcel
wise depot
#

oh its the network emulation that causes it

#

if i disable that then my animations run at normal speed

dark parcel
#

No it's not.

#

your game should work in any fps.

wise depot
#

let me grab a video and i'll show you what i mean, i can see it starting/stopping by enabling network emulation

dark parcel
wise depot
#

kind of. you can see it here, if i start with network emulation enabled my running animation is basically running at 50% playback speed, but if i run without it then it runs fine

#

I can even see the playback duration running slower with showdebug ANIMATION (look at last line of text on left)

this only happens with network emulation enabled in PIE

#

is this the same issue?

dark parcel
#

No, my issue is only apparent in shipping

wise depot
#

oh, then yeah maybe its an editor bug.

#

i'll just ignore it for now i guess

nova wasp
#

is p.NetEnableListenServerSmoothing on or off here?

wise depot
#

erm, whatever the default value is i guess, i don't recall changing that

#

but i'll try

dark parcel
#

Thats not the default tps template though?

#

I dont know what drives your animation.

#

Normally its just velocity

wise depot
#

i tested it with the default

#

exactly the same

#

Can see it here with tps template on bp only project. only change is enabling/disabling network emulation.

p.NetEnableListenServerSmoothing makes no difference

#

tried with p.NetEnableListenServerSmoothing true/false and p.NetEnableListenServerSmoothing 1/0

#

had to tab to discord to remember the command name and cut recording accidentally

#

If I test it with 3 players, both the other 2 players windows look absolutely fine, so I'm just going to assume it's a PIE bug probably

nova wasp
#

looks like this has to do with how the listen server decides when to tick the pose

dark parcel
#

You can run it as client and play with 3 players.

nova wasp
#

with your setup it is ticking during receiving a new saved move it seems UCharacterMovementComponent::TickCharacterPose runs from the rpcs only

dark parcel
#

The visual issue will only be apparent for the listen server.

nova wasp
#

I suppose you could override ACharacter::PossessedBy or just have another skeletal mesh component on there

dark parcel
#

@wise depot

if (auto* mesh = GetMesh())
    {
        if (mesh
        && IsReplicatingMovement()
        && (GetRemoteRole() == ROLE_AutonomousProxy && GetNetConnection() != nullptr))
        {
            if (HasAnyRootMotion())
                mesh->bOnlyAllowAutonomousTickPose = true;
            else
                mesh->bOnlyAllowAutonomousTickPose = false;
        }
    }

You can try this on your CharacterTick

nova wasp
#

that should only need to be set to false after ACharacter::PossessedBy sets it to true

#

If this is a BP only project it would be possible to hack this in by somehow making IsReplicatingMovement false right before the possession occurs

#

the amount of control for non c++ multiplayer stuff is very low though... I'm kind of surprised this isn't a cvar at least

wise depot
#

My project is c++ yeah, I just tested it with tps template to see if I'd done something to cause it

#

Will give that snippet a try in the morning thanks ๐Ÿ˜„

#

Sad that the tps template has this issue

nova wasp
#

which packet emulation settings were you using?

wise depot
#

Ingoing and outgoing, 30 min 150 max

nova wasp
#

I guess just in case it's worth mentioning the packet emulation presets are pretty darn extreme compared to real life conditions

wise depot
#

Just latency emulation

#

You can see them in that clip at 13 seconds

#

Still, this feels like a bug. Out of the box shouldn't make animations run slower on host if the client has 'any' ping, but idk what happens in packaged build.

nova wasp
#

your artificual situation of only the client having 30-150 ms does not help

#

I would suggest trying something where both sides have ping mutually to see if the timing fits better that way

wise depot
#

Well, it just so happens in that clip I had only client selected. But yeah it's a very wide range for sure.

But doing client and server has the same results

#

I didn't try just server though

#

I wonder if this is why little nightmares 3 character animations looked sketchy when i played online with a friend a while back ๐Ÿ˜‚

dark parcel
#

@wise depot If you only play as clients, do you see any animation issue?

nova wasp
#

I guess my point being having it be one side might make some things that rely on back and forth timing might be fooled by it being instant one way and not the other. I'm definitely confused that this just doesn't work nicely at all out of the box...

wise depot
dark parcel
nova wasp
#

you could also override USkeletalMeshComponent::ShouldTickPose I guess

dark parcel
#

in which you can do ```cpp
if (auto* mesh = GetMesh())
{
if (mesh
&& IsReplicatingMovement()
&& (GetRemoteRole() == ROLE_AutonomousProxy && GetNetConnection() != nullptr))
{
if (HasAnyRootMotion())
mesh->bOnlyAllowAutonomousTickPose = true;
else
mesh->bOnlyAllowAutonomousTickPose = false;
}
}


to try and fix it.
wise depot
#

Yeah ill try that in the morning too, thanks

dark parcel
#

well "fix" is a strong word. There may be issue with toggling the bool from what I heard.

nova wasp
#

It seems like it might force it to tick twice as much in some cases

#

as you would receive the rpc -> sim the saved move -> tick the pose and then the regular component tick would tick the pose again

wise depot
#

Wouldn't that make the animation play at 2x speed rather than super slow?

nova wasp
#

depending on the sequence player yes

wise depot
#

I'll try just throw the null OSS on it and try with a packaged build too, if its an editor only issue then I don't care

nova wasp
#

a wacker option could be to have the listen server have an entirely separate skeletal mesh but this would be not so nice

#

if you rely on root motion to affect behaviour the less of the old setup you mess with the better imo... not sure

wise depot
#

Some anims will apply root motion yeah

#

I'll see what packaged build does and that tick snippet. Will let you know in 10-12 hours or so ๐Ÿ˜„

nova wasp
#

I'm kind of surprised it doesn't just feed in a longer deltatime and interpolate if it has to work like this

wise depot
#

Oh I didn't actually upload the right video earlier but if I enable showdebug ANIMATION I can see my playback time ticking up slower than normal

#

Like 0.5x speed or so on the animations

nova wasp
#

I would suggest using insights to track when it actually evaluates the anim graph

dark parcel
#

oh well , if I can dedicated server to work, I will chuck this code away.

hoary spear
tardy fossil
#

yeah even if i have "use less CPU when minimized" PIE will lag on multiplayer if it isn't the top screen

nocturne quail
#

any idea why I am getting this error?

if (t != EItemType::E_Weapon || t != EItemType::E_Gear)` incorrect usage of `||` , you mean `&&` instead?
void APickup::OnTakePickup(class ACustomActor* Taker)
{
    if (!ValidateInteraction(Taker))
        return;

    APlayerControllerBase* PC = Cast<APlayerControllerBase>(Taker->GetController());
    if (!PC) return;

    const FItemAddResult AddResult = Taker->GetInventoryManager()->TryAddItem(Item);
    if (AddResult.ActualAmountGiven < Item->GetQuantity())
    {
        Item->SetQuantity(Item->GetQuantity() - AddResult.ActualAmountGiven);
    }
    else if (AddResult.ActualAmountGiven >= Item->GetQuantity())
    {
        const EItemType t = Item->ItemType;

        if (t != EItemType::E_Weapon || t != EItemType::E_Gear)
        {
            PC->ClientPlaySound(Item->InteractionSound);
        }

        Destroy();
    }

    if (!AddResult.ErrorText.IsEmpty())
    {
        PC->ClientShowNotification(AddResult.ErrorText);
    }
}
#

I know && makes more sense in here but || should not be an issue I think

tardy fossil
#

need to wrap the 2 conditions you are trying to OR in brackets

#

if ((t != EItemType::E_Weapon) || (t != EItemType::E_Gear))

nocturne quail
dark parcel
#

@nocturne quail You don't get any error when calling destroy Missty?

I crashed when testing with clients.

#

currently applying band-aid with SetLifeTime ๐Ÿค” .

#

wonder what I do wrong.

nocturne quail
#

TryAddItem will create a new object from the item is passed, so this actor is completely not related any more

#

and that destroy branch is called when the whole item is fully added

#

non stackable or all amount of item

tardy fossil
nocturne quail
nova wasp
#

even without compilation issues that code is kind of hard to understand at a glance

#

I would assume there were no issues before due to bool operator differences but I am not sure and that example you posted is incomplete (what type are a b and c?)

#

we can only see the code you show us

nova wasp
#

that's a warning?

#

ah

nocturne quail
nova wasp
#

even with the parenthesis?

nocturne quail
#

Correct

dark parcel
#

build output?

nova wasp
#

probably not the right channel for general c++ problems

#

and yeah show build output please

nocturne quail
#
1>------ Building 4 action(s) started ------
1>** For ArmaEditor-Win64-DebugGame **
1>[1/4] Compile [x64] Module.Arma.8.cpp
12>C:\Arma\Source\Arma\World\Pickups\Pickup.cpp(278): error C6289: Incorrect Operator. Did you intend to use && instead?
1>D:\Arma\Source\Arma\World\Pickups\Pickup.cpp(278): error C2677: binary '||': no global operator found which takes type 'const EItemType' (or there is no acceptable conversion)
1>Total time in Parallel executor: 4.04 seconds
1>Total execution time: 6.21 seconds
1>C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.MakeFile.Targets(44,5): error MSB3073: The command "D:\Engine\Engine\Build\BatchFiles\Build.bat -Target="ArmaEditor Win64 DebugGame -Project=\"D:\Arma\Arma.uproject\"" -Target="ShaderCompileWorker Win64 Development -Quiet" -WaitMutex -FromMsBuild -architecture=x64" exited with code 6.
1>Done building project "Arma.vcxproj" -- FAILED.
========== Build: 0 succeeded, 1 failed, 11 up-to-date, 0 skipped ==========
========== Build completed at 16:57 and took 23.666 seconds ==========
#

12>C: is not vs confused?

latent heart
#

That is weird.

nocturne quail
#

12 actually means already 11 changes are compiled but in Build: 0 succeeded, 1 failed,

nova wasp
#

what does bool bIsWeapon = t == EItemType::E_Weapon do?

#

I'm suspicious of operator overloading here and I am curious to see the enum definitionm

latent heart
nocturne quail
#
UENUM(BlueprintType)
enum class EItemType
{
    E_Weapon UMETA(DisplayName = "Weapon"),
    E_Ammo UMETA(DisplayName = "Ammo"),
    E_Gear UMETA(DisplayName = "Fashion")
};
latent heart
#

if (A != 1 || A != 2) will always be true.

dark parcel
#

lol

nova wasp
#

oh yeah lol, that explains it

#

unless they are trying to use it like bitflag style

#

I don't even know what a default enum class does for the size? is it a byte?

#

I can't find any example that doesn't include at least : uint8

latent heart
#

Default is probably int32? (It's int)

nocturne quail
#

well changed it the way vs want it ๐Ÿ˜„

        if (t != EItemType::E_Weapon && t != EItemType::E_Gear)
        {
            PC->ClientPlaySound(Item->AddedRemovedSound);
        }
dark parcel
#

Compile now?

nocturne quail
#

Yes already compiling shaders phase

dark parcel
wise depot
dark parcel
wise depot
#

i did notice that the entire chunk for smoothing on listen servers is commented out in the engine

dark parcel
#

show your code as well.

wise depot
#

so the cvars for smoothing do literally nothing

#

my code is literally your snippet copied and pasted.

I also found this thread:
https://forums.unrealengine.com/t/player-animations-slow-down-on-listen-server/1262819

#

oh and also yeah, its a listen server issue, doesn't happen on play as clients

wise depot
wise depot
#

hopefully this tick change fixes it for now

nova wasp
#

look at the file you are reading

#

that is the async character movement component

#

it was a past attempt at making the cmc parallel that... was basically them copying the entire thing and pasting it and trying to stuff it into a struct with unique pointers

#

it's not a thing... mostly annoying as it shows up when searching for names

wise depot
#

oh yeah you're right, my bad

nova wasp
#

I fall for reading that file all the time when looking up cmc code too lol

quartz star
dark parcel
wise depot
#

in tick, like you said

nova wasp
#

which tick

wise depot
#

my player character class tick

nova wasp
#

the movement component? the pawn actor?

wise depot
#

but also, it does actually make it better, its the network smoothing that makes it janky

#

Player Character actor, i'm using default cmc

#

the network smoothing is janky because the difference between min/max latency is 30-150 which is pretty unrealistic

#

if i have a stable ping it seems to be mostly fine, its once there is a particularly sizeable gap the issue starts

#

also if I set NetEnableListenServerSmoothing and EnableQueuedAnimEventsOnServer to zero without the tick changes makes it a lot better too

nova wasp
#

the thing with having varied latency is that it's often a bit worse than having consistent but not great latency depending on the work involved

#

if you want smooth motion and the things arrive at random times it's a lot nicer than having them be slightly sooner at random

#

arguably it sends a timestamp but the issue here is the server is kind of also validating and returning the result

#

so it's like you are kind of serving as the arbiter of what their sent move even did but also trying to make it look nice for the local player

#

either way I'm kind of surprised this works so poorly out of the box and works with a hidden bitfalg on the skm

wise depot
#

looking at that thread its been an issue in UE5 forever

nova wasp
#

did you try overriding the Skm to decide to tick with different conditions?

#

(USkeletalMeshComponent::ShouldTickPose)

#

the possibility of having multiple incoming saved moves in a frame is where it gets weird though imo

#

if that happens and the pose is meaningful it would tick twice

#

I would say it might be easier to have a second mesh for the visuals on the listen server for players

#

the expense is sad but it might be worth it for lower playercounts

#

you also might not even need server auth movement for some games

wise depot
#

That's actually what I used to do in ue4, we would have an invisible root then a detached visual mesh for smoothing. Worked pretty well

dark parcel
#

btw I don't have the same issue on my end.

#
[/Script/SteamSockets.SteamSocketsNetDriver]
NetConnectionClassName=/Script/SteamSockets.SteamSocketsNetConnection
ConnectionTimeout=80.0
bNeverApplyNetworkEmulationSettings=true
InitialConnectTimeout=120.0
NetServerMaxTickRate=60
bClampListenServerTickRate=true
MaxNetTickRate=30
KeepAliveTime=0.2
MaxClientRate=120000
MaxInternetClientRate=120000
RelevantTimeout=5.0
SpawnPrioritySeconds=2.0
ServerTravelPause=4.0

[/Script/OnlineSubsystemPS5.PS5NetDriver]
ConnectionTimeout=25.0
bNeverApplyNetworkEmulationSettings=true
InitialConnectTimeout=40.0
NetServerMaxTickRate=30
bClampListenServerTickRate=true
MaxNetTickRate=30
KeepAliveTime=0.2
MaxClientRate=80000
MaxInternetClientRate=32000
RelevantTimeout=5.0
SpawnPrioritySeconds=2.0
ServerTravelPause=4.0
#

@wise depot someone gave this to me before, you can try it if you like.

#

forgot which .ini file this should go to.

#

altough it seems like it doesn't have anything to do with editor ๐Ÿค”

wise depot
#

what network simulation settings are you using?

dark parcel
#

more like shipping issue.

wise depot
#

the issue i have is when there is a large discrepency between min/max latency

dark parcel
#

never touched the one in project setting, I just go net.pktlag X

dark parcel
#

that sounds like a given.

#

If someone have very unstable net, they are not going to have pleasant experience.

#

though, I have no issue playing with 100 ms or 300 ms in terms of movement and animation.

wise depot
#

if i have a stable ping, whether its 30 or 500, its fine. the issue is when the discrepancy between min/max latency is huge, like 30-150 for the one client, which would be a catastrophically bad connection for sure

#

but there is still no reason the host should have animations running in slow motion because of that imo

#

like, idk why the animation wouldn't just tick.

But, again, your change actually makes it significantly better, the jankyness remaining is the network smoothing which is a given

#

just saying I do think its an internal bug ๐Ÿ˜„

quartz star
# ashen plume Ah, looked like it was climbing, only thing left is to step through to see why y...

Alright I fixed it.

My issue was that I was overriding UCharacterMovementComponent::IsMovingOnGround() to return true if I am in my spline movement mode. (I thought that would be reasonable as the spline should be some sort of floor to slide along).

In SimulateMovement() it checks whether IsMovingOnGround() is true, and would then proceed to check if the Current Floor result is valid.
If it isn't, it will set the movement mode to falling.

Which explains the bobbing for simulated proxies only, since in spline movement there is no Current Floor result...

hoary spear
#

Right right

#

Thats why id initially think youd want to set the mode to flying

#

So youd have full freedom

quartz star
#

Well I am not using built-in modes as of now.
If you interact with the spline it goes directly into the custom spline movement mode

hoary spear
#

Makes sense

meager spade
nocturne quail
#

I have 3k pickup spawn points in the level, the pickup item is spawned on BeginPlay

UCLASS(ClassGroup = (Items), Blueprintable, Abstract)
class ARMA_API AItemSpawn : public ATargetPoint
void AItemSpawn::BeginPlay()
{
    Super::BeginPlay();
    if (HasAuthority())
    {
        SpawnItem();
    }
}
#

this means 3k pickup actors are spawned when level starts

#

I can do

GetWorldTimerManager().SetTimer(UnUsedTimer, this, &AItemSpawn::SpawnItem, FMath::RandRange(10, 100), false);
#

than there will be 3k timers ๐Ÿค”

#

any good idea is welcomed to solved this issue

nova wasp
#

what is the actual problem

#

I assume you are having a frame hitch?

nocturne quail
nova wasp
#

do they need to spawn when a player isn't near them?

#

I guess I would say the nice thing would be for all of them to register to a global manager to time-slice the spawning. A random timer might be okay too but ideally you control them spawning N per frame (you could decide to force them to be immediate with some rule, or make distant ones less prioritized etc)

bitter veldt
#

hey there, I have an odd issue. I'm testing my sprinting with a server + 1 client and noticed when the server runs, the running animation plays fine at the right speed etc. but when you're a client, and im looking at the client as the server, i noticed the running animation looks a bit odd / is slow, even though the client is definitely running

any idea what could be going on there? I've got a custom CMC kind of similar to what's in tranek's repo

debugging for now but incase anyone has immediate ideas. in my ABP, I am logging the velocity on both the server and client, and see that the speed when the client runs is 500 (which is the max/running speed)

nocturne quail
nova wasp
bitter veldt
#

if the listen server runs, the animations look completely fine (if im a client looking at the server)
if the client runs, the animation looks weirdly slow (if im the server looking at the client)

nova wasp
#

on the listen server by default the character pose is only updated when you receive a new savedmove from the client, which is not being received every frame

#

this is... of course very annoying lol

#

unfortunately there doesn't seem to be a simple way to get around this without some C++ changes

#

some people seem to be turning off p.NetEnableMoveCombining which makes saved moves just send for every update which I assume just kind of makes them update... more
kind of a backwards solution imo but this is might help in the short term

#

I guess if it helps there's an important distinction here: Root motion or no?

#

and also if you rely on server authoritative movement with said root motion

#

the reason the cmc directly takes over ticking the pose on the server is to make sure it can consider root motion as part of the move in case it needs to follow along with what the sending client did

#

If you don't need root motion I don't think it will matter at all what the server does to tick the pose locally

bitter veldt
nova wasp
#

do you understand what the cmc is doing on both sides in simple terms?

#

just to be clear here the cmc is locally predicted and server authoratative

#

the client says "I was here and moved a bit this way pressing these buttons" as an rpc and the server goes "okay, I will try that" and if it's close enough everyone keeps going. The server and client constantly negotiate to say where the character is with the server having the final say in most cases (by default)

meager spade
#

server seeing odd animations is cause the cmc is ticking the animation

#

we had to fight this issue tons of times

nova wasp
#

the rpcs coming in will be what triggers the "resimulation" on the server but the listen server can still smooth the transforms with p.NetEnableListenServerSmoothing Frustratingly the listen server only ticks the animations when a new rpc comes in

#

so either you have two meshes where the basic cmc one is invisible and there is a new one attached on top that ticks normally, or you basically override some things to make this tick normally

meager spade
#

UCharacterMovementComponent::TickCharacterPose

#

if your seeing ListenServer doing weird animations (like super fast or slow)

#

its always down to framerate also

nova wasp
#

also see ACharacter::PossessedBy for the code that actually ENABLES this way of ticking the component only when it says to

#

if the outcome of the animation graph matters for the character prediction then this is needed, if not I don't see any issue with removing it

meager spade
#
    // If we are controlled remotely, set animation timing to be driven by client's network updates. So timing and events remain in sync.
    if (Mesh && IsReplicatingMovement() && (GetRemoteRole() == ROLE_AutonomousProxy && GetNetConnection() != nullptr))
    {
        Mesh->bOnlyAllowAutonomousTickPose = true;
    }```
#

the issue is if clients updates are slow or fast to server

#

it will adjust the animation speed

bitter veldt
nova wasp
#

so my hot take would be to override ACharacter::PossessedBy and call the APawn super directly, skipping the character code super

#

but I'm not sure if that covers every case

meager spade
#

or you fix your characters sending updates too quickly

#

by limiting them

nova wasp
#

do you disable saved moves or just limit them a bit?

meager spade
#

limit them

nova wasp
#

I think there's no way to perfectly account for both sides framerates but tweaking the values would help

meager spade
#
[/Script/Engine.GameNetworkManager]
TotalNetBandwidth=2000000      ; ~2 MB/s
MaxDynamicBandwidth=500000     ; ~0.5 MB/s
MinDynamicBandwidth=200000     ; ~0.2 MB/s
ClientAuthorativePosition=false
ClientErrorUpdateRateLimit=0.015f
MAXCLIENTUPDATEINTERVAL=0.35f
MaxClientForcedUpdateDuration=0.60f
ServerForcedUpdateHitchThreshold=0.150f
ServerForcedUpdateHitchCooldown=0.100f
MaxMoveDeltaTime=0.125f
ClientNetSendMoveDeltaTime=0.05
ClientNetSendMoveDeltaTimeThrottled=0.066
ClientNetSendMoveDeltaTimeStationary=0.0833
ClientNetSendMoveThrottleAtNetSpeed=10000
ClientNetSendMoveThrottleOverPlayerCount=24```
nova wasp
#

if the client is running the game at 15 fps they will send rpcs slower no matter what cvars the server tries to set

meager spade
#

yep ^

#

you cant really solve that

#

but you can solve them being super fast

bitter veldt
meager spade
#

but them going slow, is harder to solve

#

this happens if the client is alt tabbed out btw

#

it reduces the amount of resources

#

you might want to disable that in editor

bitter veldt
#

like would the client be seeing this too?

meager spade
#

no

nova wasp
#

I guess in my opinion I would rather just make the listen server tick the pose normally instead of trying to leave it IF you don't have root motion. Once root motion happens you need to leave this alone imo

meager spade
#

just server

bitter veldt
#

oh i see what u mean

#

yeah makes sense

nova wasp
#

client lower fps = less packets sent over time

#

unreal sends the default packets at the end of each game frame

#

and reads them at the beginning

#

this works the other way around as well, the server running slower will mean the client receives less feedback (but it would not be as broken as the listen server animations are generally)

meager spade
#

i untick this

#

cause this can cause this weirdness in editor

#

clients always tick there pose locally

#

so clients shouldnt see the diff

#

its literally server is not receiving updates quick enough so it ticks the remote clients animations slower

#

and they jump and look weird

nova wasp
#

yep

#

also fun fact the cmc is always jittering everywhere

#

it's just very highly smoothed on all sides

#

the mesh location is mostly faked

meager spade
#

we disable it

nova wasp
#

you can tweak the interpolation settings a lot but it will probably be okay for 90% of unreal games

meager spade
#
void XXX::PossessedBy(AController* NewController)
{
    // Authaer:: Removed SetOwner call from here.
    
    AController* const OldController = Controller;

    Controller = NewController;
    ForceNetUpdate();

#if UE_WITH_IRIS
    // The owning connection depends on the Controller having the new value.
    UpdateOwningNetConnection();
#endif

    if (Controller->PlayerState != nullptr)
    {
        SetPlayerState(Controller->PlayerState);
    }
    
    if (APlayerController* PlayerController = Cast<APlayerController>(Controller))
    {
        if (GetNetMode() != NM_Standalone)
        {
            SetReplicates(true);
            SetAutonomousProxy(true);
        }
    }
    else
    {
        CopyRemoteRoleFrom(GetDefault<APawn>());
    }

    // dispatch Blueprint event if necessary
    if (OldController != NewController)
    {
        ReceivePossessed(Controller);
    
        NotifyControllerChanged();
    }
}```
#

we just call all the stuff but dont call the autonomous thing

#

we dont really care

meager spade
#

but it might break some things

#

ah but we also dont call Setowner

nova wasp
#

ah okay, this is required then

meager spade
#

cause we have an ownership system

nova wasp
#

oh yeah, I forget you have like players that control each pawn separately

meager spade
#

yeah

nova wasp
#

might be possible to just cheese setting it back to nothing after but this makes more sense now

meager spade
#

yeah that autonomous ticking is really bad

nova wasp
#

my one fear with copying engine code out is that an update changes it and I miss it... I might start adding static assertions all over

meager spade
#

and cause Epic use dedi servers for all the games

#

they never fixed it

#

or addressed it

nova wasp
#

yeah it's frankly absurd this is not a cvar to tweak. For example if root motion is active this makes perfect sense
but without root motion this is silly

#

and even then it should at least interpolate

meager spade
#

even if there was a path to make it tick if no updates received in x time

#

so it doesnt do that

#

like we got no updates for a couple of frames, we should tick it manually

#

would solve the issue

bitter veldt
#

well for now i've set bOnlyAllowAutonomousTickPose to false which has "fixed" it as expected

meager spade
#

yup

bitter veldt
#

thank you, this is very helpful, saving this conversation as im sure ill come back to it, especially if i enable rootmotion ๐Ÿ˜„

nova wasp
#

and even with root motion I am skeptical about if it uses the correct deltatime for them... I would have to test

dark parcel
#

If it's playing root motion then toggle bOnlyAllowAutonomousTickPose

dark parcel
#

How often unreliable not get called btw? Thinking if I should make an Item Pickup SFX a reliable / unreliable RPC.

#

haven't got the chance to have a real environment to test.

nova wasp
#

there's sort of two things that can happen I guess, either the actual udp packet doesn't make it or one side rejects sending or receiving it

#

for example net.MaxRPCPerNetUpdate puts a cap on multicasts rpcs

#

the default is .... 2!

#

I think lyra cranks it to 10 from what I can see

dark parcel
#

thx!

echo pasture
#
Epic Developer Community Forums

Hello, I have several animation sequences with custom C++ AnimNotify classes hooked up. The classes only override Notify and the constructor (and call super anyway). When these animations are played through a Montage, the server will often not trigger the anim notify. The clients all trigger it fine. If the server is a listen server and the ho...

#

but I think regardless I really shouldn't be doing gameplay logic inside anim notifies for multiplayer games. but my question is, how do you then make things looks visually smooth, like for example if you're doing an item change animation and you want the item to come out when you open it in a theoretical backpack, how do you make sure that it's timed with that animation

#

are people just using delays or something?

dark parcel
#

Item change animation?

#

feel like you have to elaborate more.

echo pasture
#

like a character has an item and swaps it out for another via an animation

#

idk it's just a theoretical example

nova wasp
#

I think if it helps the simple thing is to just have a fallback timer that is reset whenever a new action occurs or the intended one triggers

#

you can fake anim notify timing down to the exact frame if you are extremely careful to consider the ticking phase

#

and it doesn't change playrate

echo pasture
#

interesting

echo pasture
nova wasp
#

yes, this would serve as a backup in case the regular one fails to make sure it happens even if the anim instance is being forced to not tick for ANY reason

echo pasture
#

I see

nova wasp
#

also montage notifies are incredibly fickle

#

by default they do not get cleared out unless the anim instance does so

#

so it is possible to start an anim -> stop ticking -> show up an entire hour later and trigger the hour old montage event

#

mostly an issue with not ticking when out of view, which not everyone does I guess

echo pasture
#

woah

#

yeah I mean I kinda knew that it was unreliable in the first place for relevancy and optimization pose ticking issues but I did not know that stuff

nova wasp
#

this applies mostly to the montage instance notifies I guess for that last bit

hoary spear
#

Am I correct in reasoning that if you initiate something from a client and predict bSuccess to be true, that when the OnRep_Success comes in, if the bSuccess matches, we predicted correctly ?

#

guess it depends on if the OldValue is based on the local value or servers value

woeful ferry
#

If I have a component which has variables that replicates to all clients, can I somehow restrict it to only replicate to the owning client on some instances?

copper raft
#

from Completed in this image it saves my car HP and then Save Game to Slot

hoary spear
#

Custom or Dynamic might fit

quasi tide
tough nimbus
#

For some reason my client is very laggy on the server. Even in builds its lagging and even if i disable network emulation. I tried a lot of things but nothing helped. Even using a brand new movementcomponent with all settings at default still lag. This is just a paperzd character and use default character movement component and all settings at default. Only input binding for movement using the normal move and jump functions you get from cmc. I also use the same class for ai and if controlled by ai there is no lag. only if controlled by client
server (left), client (right)

#

i tried using the mover component to see if that helps and when i use the move component i dont have this issue, just stronger input delay. But i cant use mover unfortunately because it doesnt work well with some systems i already have

muted mantle
#

Guys, what is the Correct way to execute something, that the Client Triggers in a Blueprint that gets spawned per actor?

I do it like this rn:
BP_Playercontroller on keypress -> calls "Start event" in BP_perActor via Event Dispatcher.
BP_perActor "Start event" Calls "Custom Event Client" (Not Replicated) and "Custom Event Server" (Run on Server, Reliable)

latent heart
#

You can't call a server event on an actor you don't own.

#

So you'd need your controller, state or pawn to run the server event.

muted mantle
#

I do spawn BP_perActor per Player and set the owner for it, sry

latent heart
#

Alright, that should be fine.

muted mantle
#

I just wanted to verify if thats a way to go as i just started with unreal engine

latent heart
#

Yeah, it should be fine.

muted mantle
#

Nice thank you!
Is there a better way to do?

latent heart
#

Not really?

#

I guess you could maybe use enhanced input instead of key press.

muted mantle
#

Oh it is an EnhancedInputAction

#

Just fighting with the complexity of so many RPC calls for differen things and loosing track

latent heart
#

Networking can be hard.

#

The whole asynchronosity of it all.

muted mantle
#

It just feels somehow "annoying"

latent heart
#

Haha. Yes.

muted mantle
#

And I do find it hard to Debug or probably don't understand the Debugging tools enough

latent heart
#

It is.

#

Logs can be helpful. Like print strings. Or breakpoints.

slate phoenix
#

Hi everyone, I have a question, you probably know better than me, but which is better: the Varest plugin or Unreal's HTTPS?

I need an API but I don't know which one to use, or do you know of a better API for UE5?

lost inlet
#

VaRest is just a BP-specific wrapper for the native HTTP/JSON libraries in UE

slate phoenix
heady python
#

ive been going crazy for the past few days. i have matchmaking in my game that works perfectly fine until i add steam. i followed everything in the OnlineSubsystemSteam docs but im unable to find any session after adding this. i remove it and it works fine, but doesnt have steam. Im using unreal 5.7 non-source.
Ive tried using Advanced sessions and the normal UE nodes. both have the same results. Im using steamworks 1.63(latest version) and the default name for the steam files in unreal is steamv161 so maybe i should downgrade?
Any advice or suggestions are helpful. thank you

fossil spoke
heady python
fossil spoke
#

No

#
[OnlineSubsystemSteam]
bEnabled=True
bUseSteamNetworking=False
#

bUseSteamNetworking=False

#

In DefaultEngine.ini

fossil spoke
#

What are you using for matchmaking?

#

EOS?

heady python
fossil spoke
#

Oh

#

It sounded like you had an existing matchmaking system setup, then you wanted to add Steam ontop for Friends and distribution.

heady python
#

well. i was jsut using the regular BP nodes and it worked fine in standalone, until i tried adding steam.

heady python
oak pond
#

is there a proper way to prevent all automatic replication so that I can just selectively replicate what I need? I sort of did this in a previous project with client authoritive movement and stuff but in my current project with a custom controller Im having other issues, I just need both clients to play as if its singleplayer to start with

#

when I play as just one client it all works fine but if I open 2 clients at once, only one gets possessed and has a few movement bugs. probably entirely specific to my project itself in this case but I cant figure out whats doing this, Ive even used "is locally controlled" to run tick events

fossil spoke
#

@oak pond You can use a DOREPLIFETIME_ACTIVE_OVERRIDE This lets you specify a condition for whether or not an individual property will be replicated.

#

Take a look at how some of the engine classes use it to get an idea of how it works.

oak pond
#

oh I should mention Im on bp only though

#

oooohh wait Im stupid, it was a collision problem, which hadnt been an issue since it ignored self, nvm lol, simpler than I thought

nova wasp
#

this is probably the third time in a day or so someone has asked this question

#

there's not much you can do from a bp only setup besides maybe have a second skeletal mesh follow the "real" one to make this much nicer or just turn off move combining to make cmc rpcs very spammy but arrive faster. You can search "listen server animation" or something in here and find us talking about this like... a day ago

#

I am assuming of course that the paper2d setup here relies on anim pose ticking

tough nimbus
#

i dont know if i dont understand you or you missunderstood my problem. i dont have issues with the animations and i dont use a skeletal mesh, only a flipbookcomponent. The issue i have is the movement itself is choppy. i made a character and used a staticmesh as the visible mesh and still had the same issues, so i dont know how root motion is related to this possibly.

nova wasp
#

ah, I might be off the mark

#

what do you attach the paper2d rendering thingy to?

#

Only the relative position of the mesh component is smoothed on clients or the listen server

tough nimbus
#

its basically a capsule collider like a normal character but instead of a skeletal mesh it just has a paperflipbook component. additionally it has a animationcomponent (from PaperZD plugin which is just a way to have animation graph for flipbook animations). the rest is the same as the usual. A cmc and some other components like asc

nova wasp
#

you said "default character movement component"

#

it will have a mesh component on an acharacter

#

attach your visual representation thing to the mesh, not the capsule

#

and make sure p.NetEnableListenServerSmoothing is 1

tough nimbus
#

no, i mean the character movement component. it doesnt add any mesh. its the one that is on the paper2d character as well

nova wasp
#

just show the actor's list of components please

tough nimbus
#

i will open the project and try the few things you already suggested. since you already said some things i havnt tried yet, like the console command

nova wasp
#

it should be on by default so it would only be off if your config or an exec change the cvar

tough nimbus
nova wasp
#

bring the Mesh component back

#

Even if it's invisible you are still going to want it here imo

tough nimbus
#

what do you mean? there was never a mesh component. this is an inherited class from paperzd (which inherits from paper character)

fossil spoke
#

Maybe the Paper2D character removes the Mesh Component?

nova wasp
#

unfortunately UCharacterMovementComponent::SmoothClientPosition_UpdateVisuals assumes you have a mesh

tough nimbus
#

thats a base class from unreal itself. it comes from the paper2d engine plugin

#

it never had a mesh component

nova wasp
#

you could technically just do the math yourself on the client but it would be a bit of a doozy

tough nimbus
nova wasp
#

yeah I'm going to have to check this plugin for a second

fossil spoke
#

Seems like Epic has probably completely ignored the fact that Smoothing needs the mesh to exist

tough nimbus
#

i tried using the mover plugin just to see if the issues stay. when i replaced the CMC with mover i had no choppy movement, just big input delay. thats why i think the cmc causes the issue but i didnt change anything on it.

#

in the future i might use mover but unfortunately for now i cant due time constraints

fossil spoke
#

Yeah, Id just say this is a massive oversight with Paper 2D

#

It never really did get a proper treatment

#

It was sort of slapped together

nova wasp
#

yeah I'm afraid paper2d is going to be like... super unsupported in general

tough nimbus
#

i mean i downloaded the 3rd person template yesterday in my project just to see and there i had no issues too, so my project settings should be fine i hope

nova wasp
#

"there i had no issues too"

#

do you mean both have no issues? I'm confused

tough nimbus
nova wasp
#

well

#

you don't really need to care about this papercharacter thing

#

this is a really simple class that just puts a new component on a character

#

you don't need this, you can just put a paper2d component on a character that actually works

tough nimbus
#

no, i mean if i use the character class with skeletal mesh or the 2d character but with mover instead of cmc it doesnt have that choppy frames

nova wasp
#

then just make a character with an invisible mesh that has a UPaperFlipbookComponent attached to the mesh

#

this is honestly broken and I'm surprised this is an official plugin

#

this does

        Sprite->SetupAttachment(GetCapsuleComponent());

#

which will only work for singleplayer games

fossil spoke
tough nimbus
#

you think just attach a mesh on my 2d char would be fine or should i inherit from the official base character class?

nova wasp
#

the good news is the important part is just the flipbook, you can add a new flipbook in your own character that does what you want

tough nimbus
nova wasp
#

APaperCharacter here is literally doing 2 things

  • adds a UPaperFlipbookComponent (and attaches it to the Capsule which is completely incorrect here for multiplayer, it should be the mesh)
  • calls Sprite->PrimaryComponentTick.AddPrerequisite(GetCharacterMovement(), GetCharacterMovement()->PrimaryComponentTick); which I think can be done from BP. This is to make sure it updates AFTER the movement component
fossil spoke
#

Yeah its a pretty useless class

nova wasp
#

tbh it's the cmc's fault for being so scuffed and assuming you have an skm but eh

fossil spoke
#

Surprised they decided to do it that way

tough nimbus
#

i use it since the paperZD inherits from it. but its just some functions i have to copy paste over if i wanna make the same using the base character class so its fine

fossil spoke
#

I really thought they would have made it more modular sometime during mid UE4 development.

nova wasp
#

use source control. make SURE you can back this up if the reparenting breaks

nova wasp
#

Mover is a bit more freeform thankfully but it is very experimental and not nearly as battle tested (I don't know if I can safely tell people to use it without having even used it on a serious project)

tough nimbus
#

yea i'll do. Just as a recap so i get it right. The possible reason why its choppy is because the cmc needs a mesh for smoothing, right?

fossil spoke
#

Just another classic victim of "we dont need to change it, so its staying as is".

nova wasp
#

which is not really something is NEEDS but it just... happens to be coded that way and would be annoying to change

#

the cmc is possible to change in a variety of ways (beyond just tweakin numbers etc) but it's fairly complicated and will involve a fair bit of c++

tough nimbus
#

yea, i was looking into it for a while, its just a big mess so i dont touch it often. Anyway thank you for the help, i was digging into the code a bit myself and did a lot of research but couldnt find any more clues on what could be the issue. hope this will fix it

nova wasp
#

the cmc is a bit nightmarish in terms of the assumptions it makes but I will also say it will be hard to beat

#

the key thing here being how it handles prediction and corrections + just general moving around on terrain

#

if your game is not competitive it might be worth considering just turning off client corrections altogether as you will save a lot of work that way (actually using the cmc correctly if you intend to predict client movement, which means you make your prediction actually part of the cmc's simulation)

#

but the problem here is more sim proxy interpolation than prediction, just something I like to mention because cmc extension is massively complicated compared to the needs of some projects

tough nimbus
#

i think in the future i will look more into mover. It works with NPP which i like

nova wasp
#

I'm not sure about the future of the NPP setup at this point

#

I think the chaos replication setup is what they actually use

#

but I hope I am wrong there

tardy fossil
#

interesting.. first packet sent through a UChannel MUST be reliable or the channel just... stops working.. that was a fun one to figure out lol

copper raft
#

heyy guys, how can i get player id ? because i can't understand anything anymore, after Find node it goes to False, first screenshot is inside game mode event on post login, second is inside checkpoint blueprint

#

i tried with get player id i tried with get player name, nothing changes

#

run standalone game not fixes this too

silent valley
copper raft
#

i use advanced steam sessions plugin

silent valley
#

if you launch with -game and subsystem is set to Steam, it should return a consistent UID

#

remember in Editor steam is always disabled

copper raft
#

but when i open the game in standalone i see in menu my nickname and image from my steam

#

i can't understand, sometimes my save is loading, sometimes after find node goes to false, this is a random thing๐Ÿคท

#

maybe to use arrays for my player data insead of structure?

silent valley
#

You should print out the Player ID each time you Save and Load with it, make sure it's the same

#

I also found a commandline argument -StableNullID that looks like it might give consistent PlayerID on the null subsystem for editor testing

copper raft
#

but i need to use player id integer called from player state? or get player name?

silent valley
#

You should use the Player ID from the player state

copper raft
silent valley
#

users can change their name, and also not guaranteed to be unique

copper raft
#

here nodes are correct?

copper raft
#

this foreach loop will call same player id as other nodes from screenshot upper?

silent valley
copper raft
silent valley
#

default should be fine

copper raft
#

yes when run the game it loads the saved game so it shows for example 352 player id, when run inside checkpoint to save game, it shows same player id

#

but every time i close the game and run again this player id is different

silent valley
#

oh hang on, I think there's a different UID...

copper raft
#

๐Ÿค”

silent valley
#

PlayerState has a GetUniqueId function which is what you need to use

#

not PlayerID

copper raft
#

he has palyer unique net id only

#

which cannot be connected to a string

silent valley
#

yes

copper raft
#

cannot connect it inside string

silent valley
#

you should be able to convert it to a string...

copper raft
#

google said to check to string or hex, but still cannot find anyhting

silent valley
#

I've only used it in C++

copper raft
#

i don't use c++

silent valley
#

Can you use the unique net id as the key for your map?

copper raft
#

you mean to switch from string to unique net id?

silent valley
#

idk if that will work...

copper raft
#

i connected it but idk, now will test

#

runned to true from find node for 2 times, third time again to false๐Ÿ˜‚

#

@silent valley to string i can use only this get id๐Ÿค”

silent valley
#

Can you pass PlayerState->GetUniqueId into that same node?

copper raft
#

this is BPUnique Net ID

#

i think this is a modified node from advanced steam sessions plugin

silent valley
#

right

copper raft
# silent valley right

from Find branch to False when is a new game, do i need to create another save game object or just call save game node?

silent valley
copper raft
#

omg why is so hard?๐Ÿ˜…

silent valley
#

no don't use the local id from Steam, change back to using the Unique Net Id from the PlayerState as the Map key

#

I think you just have your logic wrong

copper raft
silent valley
copper raft
#

i already made this foreach loop over all players and save their data to map

silent valley
#

that looks OK

#

You're calling this on the server?

copper raft
#

and this is the load from game mode

dark parcel
#

what is up with the delay

silent valley
#

also looks ok

copper raft
copper raft
#

google gemini said to add it๐Ÿ˜…

silent valley
#

You shouldn't need it - player state should be setup fine at that point

dark parcel
silent valley
#

idk man, everything looks OK, you might need to debug it

#

maybe there's some problem using Unique Net Id as a map key, idk. to get around that you'll need to add a little bit of C++ to provide a string converter.

dark parcel
#

Havw you view the value? It should stay the same with steam.

copper raft
silent valley
dark parcel
#

Just view if you have anything in the map at all.

silent valley
#

Without debugging you have no idea what might be the problem

dark parcel
#

100%

#

Step one, look into the data.

#

R u running editor ? Doee steam even work in standalone? Im under the impression that they need to be either development or shipping.

silent valley
#

Steam does work in standalone

#

You can also run with -StableNullID argument and test in editor. That flag should force Null subsystem to not generate a random UID each time.

#

(I never tested this, just found it in the code earlier)

copper raft
dark parcel
#

Anywayyy just print your map values.

#

U wouldnt have to guess

copper raft
dark parcel
copper raft
dark parcel
#

Did you call save game to slot?

copper raft
copper raft
copper raft
#

and load game from slot inside on post login event

dark parcel
#

Looks allrite to me

#

Well i cant test on my end, gtg sleep. Gl.

copper raft
#

ok

copper raft
#

@silent valley i made this type of debug, when saving from new game, it save the game once on checkpoint, after restarting game and saving it again, it saves every time another slot

#

on first game run when i press once this button to debug, i see all my data once, after saving and restart my game when i press this button again i see my data twice

#

this is when i start new game and saving it to checkpoint, server 80 hp 1 1 1 are things in my inventory

#

i close the game, then when i respawn on my last saved checkpoint, the game is saving my data in another slot i think

#

because i see my data twice

silent valley
#

Probably because the Player UID is randomly generated in Editor each time, so it will add a new map entry each time

#

try adding this to your DefaultEngine.ini (if you can't use the command line arg)

[OnlineSubsystemNull]
bForceStableNullId=true
#

or you can run this in the console OSSNull.ForceStableNullId 1

copper raft
wintry forge
#

I have an inventory system where I have an inventory component containing an FFastArraySerializer list of FItemInstances, where each of these instances has a UObject pointer (UItemInstanceData) for stats that can be delta-replicated.
My question is what's the difference between going through the effort of AddReplicadSubObject/ReplicateSubObjects, and just storing these inner UObject pointers on a replicated TArray on my inventory component directly?

copper raft
#

okay this inside console stopped to generate double saved data, now every time i run the game i see only 1 string of my data

#

@silent valleyi did not changed anything here but not it won't make cast to third person character๐Ÿคฆ ๐Ÿ˜…

silent valley
copper raft
silent valley
#

There's a few places you could hook this up.

copper raft
# silent valley So it looks up the data OK now?

i connected that last print string to Find Branch True and yes now it shows my last saved data, i tried to save the game with lower HP, and when i restart the game in print string i see my lower HP than usually, so yes now data is saving and loading

silent valley
#

I can't remember where the Pawn gets spawned, but you could add it to BeginPlay of your character for example.

copper raft
hoary spear
#

Just gonna throw this in here but its prob redundant / irrelevant: tmaps dont replicate

silent valley
#

but hopefully when you test with Steam it will also work now

hoary spear
#

Seem to be just a tmap in a save object server side to store player info ? With netid as key?

hoary spear
#

Isnt that one of the things you cant test in editor / single pc setup

#

Feel like I did roughly the same thing when i tested the advanced steam session plugin

#

I vaguely recall it working ๐Ÿ˜…

silent valley
#

It can be tested with Null subsystem in editor but you must enable a couple of debug flags, i.e. OSSNull.ForceStableNullId and OSSNull.AddUserNumToNullId otherwise it is randomly generated each time

copper raft
silent valley
#

I just told you, enable both those debug options

copper raft
#

i enabled second command but nothing changed

silent valley
#

it must be both together

copper raft
#

do i need to disable them when i want to test in standalone with steam?

silent valley
#

no, they won't have any effect when running with Steam

copper raft
#

ok

hoary spear
#

well dang

#

ignore the uglyness and lack of early exit

silent valley
#

hmm you have a Unique Net Id to String node... did you add that in C++ yourself?

hoary spear
#

both from advanced session lib

silent valley
#

๐Ÿ‘

#

ahh you're getting the net ID from controller not the player state, that's the difference

hoary spear
#

there is one for the ps aswell

silent valley
#

gotcha

copper raft
# hoary spear

so i need to use get unique net id from player controller?

silent valley
#

What you have should work fine, but if you use the advanced session nodes like in that picture, you can convert them to string which might be useful for debug purposes

copper raft
#

if i add that get unique net id from player controller i have this error

#

oh wait, i connected the input to New Player from onpost login event and now i see my desktop id

#

okay, i switched back to string key and using now these get unique net id, working as before, but only for 1 client

#

i can't understand why when i create a session i see Server for first Client, then when i join the created session with second client it shows fine, as Client2, why Client1 is showing as Server instead of Client1?

silent valley
#

because you're running Listen Server config?

copper raft
#

i started 3 clients, and i see sever and client 2 and 3 but not client 1 2 and 3

#

Net Mode is Play as Client

#

so i have to see 3 clients, not server and 2 clients no?๐Ÿค”

#

when i run Play as Listen Server i need to see this server and 2 clients

latent heart
#

Do you have the "separate server" option ticked?

latent heart
#

Go to the advanced options for pie and search for separate.

latent heart
#

That's the one.

#

It may be getting confused with thr server and client 1 in the same process.

#

Also untick run in the same process

#

Or one process. Whichever it is.

copper raft
#

nothing changed

halcyon ore
#

the issue seems obvious. lol
You put a delay in the event.
So, not all can get through.
So, client 1 and 2 probably load in super fast, then client 3 is a bit slow.

So, client 2 eats clients 1 function call.

silent valley
#

I don't think that's a thing...

latent heart
#

How deos that even happen if they're run in separate processes?

halcyon ore
#

This is post login.
The server is running that

#

Then, it gets RPC'd through a different func

copper raft
latent heart
#

Ah ha.

copper raft
halcyon ore
#

Post login.
Is the controlled pawn ready?
Try to clear that, and just call a generic print?

copper raft
latent heart
silent valley
halcyon ore
#

Yeah, I would say simplify this.
Just call a hello printstring.
Remove the controlled pawn cast, and etc.
Cuz, I don't recall if the controlled pawn is ready all the time?

copper raft
#

and another inside checkpoint blueprint after all is saving it shows me everything inside map

silent valley
#

Which actor is it in? What event? the text is cut off

copper raft
#

and when i touch the checkpoint i see Server: 80HP bla bla bla, when i touch the checkpoint with anothe client i see Client2: 80HP bla bla bla

silent valley
#

Why are the clients saving game? shouldn't it just be the server?

copper raft
#

do i have to change this into a custom event run on server?

silent valley
#

just add HasAuthority node

copper raft
#

if i add this has authority, other players cannot see if that checkpoint was activated or not, when i run into that checkpoint with second player, nothing happening

silent valley
#

the Overlap should fire on server as well as client?

copper raft
#

yeee finally i fixed everything

#

i think๐Ÿ˜‚

#

now when second player join and with different HP touches the checkpoint and then restart the game and load all again, everyone have their saved HP

#

but the function of the checkpoint i keeped it unchanged, and works ๐Ÿซก

copper raft
#

wtf? when running in standalone game the camera is bugged and cant move cand do anything๐Ÿ˜‚

hoary spear
#

10/10 id play that game

mellow escarp
#

Assuming a setup like below.

It seems brittle as fuck to have to Add/Remove recursively in the SubObjectList manually each time an item is created or duplicated.
Is there something I am missing or replicated recursive UObject is just cursed?

// Does it work recursively?
auto DuplicatedObj =  DuplicateObject(OldItem, RepOwnerComp);
 RepOwnerComp->AddReplicatedSubObject(DuplicatedObj);
 RepOwnerComp->RemoveReplicatedSubObject(OldItem);


// Using bReplicateUsingRegisteredSubObjectList = true on Actor/ActorComp.
// Using virtual bool IsSupportedForNetworking() const override { return true; } for UObjects.
class URepOwnerComp : public UActorComponent
{
    //...
        UPROPERTY(Replicated)
    TArray<TObjectPtr<URepObjectA>> MyObjects;
    //...
}

class URepObjA : public UObject
{
    UPROPERTY(Replicated)
    TObjectPtr<URepObjB> PropObjB = nullptr;
}


class URepObjB : public UObject
{
    UPROPERTY(Replicated)
    TArray<TObjectPtr<URepObjA>> PropObjsA = nullptr;
}


void URepObjA::ReplicationHierarchy(AActor* RepOwner)
{
    RepOwner->RegisterReplicationHierarchy(this);
    
    for (URepObjA ChildA: this->PropObjB->PropObjsA)
    {

            ChildA->RegisterReplicationHierarchy(RepOwner);

    }
}
mellow escarp
fallen fossil
crisp shard
#

is there a way to set a "max" of allowed relevant actors of a certain type?

abstract pike
#

Can anyone explain why replicated properties which have been set before the actor has finished spawning are null on the client in begin play in 5.6?

My understanding was that if you had the property set by the time the initial spawn actor bunch was sent then it was guaranteed on the client however that seems to not be holding true anymore... ๐Ÿค”

fossil spoke
#

@abstract pike Depends on what it is, if its a pointer to another Actor, which has not yet been spawned on the Client as well, then it wont be valid.

#

You should never assume property replication at any point. Use OnRep_XXX to know exactly when they come through.

abstract pike
#

Hmm thats a good point about the pointer thing. Maybe it's a problem further upstream. Perhaps that actor it points to is not being spawned on the client for whatever reason.

abstract pike
#

Thanks for the quick response!

halcyon ore
#

I do believe that ifs its set before begin play/ finish spawn, the var will always be received as the initial bunch. (thus always be replicated)

But, yeah, if you point to another actor, said other actor may not exist on begin play yet.

nova wasp
#

there is a way to manually encode serialized stuff into the first bunch of about ~1000 bytes max

halcyon ore
#

Maybe its special if its multiple vars.
But, I filled an actor with like 1000 array entries or something of MAX 64int vars. That would just mess up the entire actor, and fail replication.
At like 900, it worked, even if I spawned like 20 of those actors.
All 20 would succeed surprisingly.

nova wasp
#

OnSerializeNewActor for example will let you go "this is literally in the same packet that creates the object"

#

but it is limited in size

nova wasp
#

I am on Iris with rather high bandwidth settings so actochannels might not be the same

#

for posterity other replication objects could be arriving separately still

#

I am referring to internal serialization of non external net reference types (numbers/strings POD stuff)

blazing spruce
#

Hi, I'm trying to set up a system where one of my characters has an ability that when active, will start spawning footprint decals for every other player (up to 8) at the location of each foot for every step they take while the ability lasts (30-45 secs), but the footprints should only be visible to the one player who is using the ability, every other player should have no idea that its happening..

I already have the set up for activating/deactivating the ability, cooldown ect.. but I am unsure on how to get the footprints spawning, only visible to the player using the ability, when the other players take steps and ideally without coupling the different character classes if possible, any idea's how I should go about doing this?

hoary spear
#

Iiiii would always spawn the footprints when a client has the ability

#

And just manipulate their visibility

blazing spruce
#

And how would I handle that with correct authority? The ability being activated and deactivated is all server only, but spawning footprints via anim notifies would be client-side wouldn't it? Would that matter?

hoary spear
#

It depends as always , but spawning them for everyone with the correct trait sounds reasonable

#

Is it competetive ?

blazing spruce
hoary spear
#

You could spawn footprints with some rpc but Id prob start out with client anim notifys tbh

#

Personally i wouldnt overthink it in regards to cheaters

blazing spruce
# hoary spear Personally i wouldnt overthink it in regards to cheaters

In this case it prolly doesn't matter as much since the ability and cooldown is server auth anyways, but as far as getting them showing correctly is where I am having the issue..

Alright so right now when the ability is activated the On Rep function calls an interface that the other characters implement and sets its ABP's 'IsSenseHeighteningActive' variable and then I have the anim notifies on the ABP that spawns the decals, is that how I should be doing it so far or am I overcomplicating things again lmao? This gets them spawning but they obviously still shows for every player atm

hoary spear
#

You need to set its visibility per client based on if they have the ability active

#

This makes it dpawn everywhere and not only on the trait owning client tho

stiff pine
#

Couldn't decide if this is more of a multiplayer question or a umg question, so we're gonna try here first. I'm sure the tools exist to help diagnose what's happening but I need help learning what they are. Those buttons on the right monitor being purple indicate that they got focus from a player controller in a loop. How, I do not know, because I was under the impression I only have 3 controllers connected. Regardless of how it's getting the fourth, none of them are working because their actual focus seems to be stuck on the LEFT monitor as indicated by the blue outline that I hope is visible. I can move that around over there but nothing seems to get it onto the right monitor and into the dang game. That's why I have to use this awful picture of a screen instead of a screenshot.

#

This is LOCAL multiplayer that does NOT use split-screen.

#

Like I said, what I really need are the tools to diagnose this myself so I can leave y'all alone, so I would greatly appreciate some guidance in that regard.

#

Oh, and they only turn purple if I run it with breakpoints inside the loop that handles this. If I run it without breakpoints, they all turn red, which means they got focus and then lost it?

#

Actually, it's probably beneficial to be specific. It means they were added to the focus path and then removed from it.

#

Oh and if I run it like this from a blueprint other than the level, all the controllers get attached to the rightmost widget and all of them work simultaneously. The other behavior happens if you run it from the actual level blueprint. I . . . do not understand.

thin stratus
#

@stiff pine Not enough info tbh. Focus in umg is pretty annoying. You have to make sure you create the widgets in a way that the given controller is the owner and then make sure that you only set user focus and not keyboard focus.

#

Other than that, without seeing any of your code, no one here will really have an idea on how to help you

stiff pine
#

After quite a bit of experimenting, I have made nearly all of the functionality work. The only remaining issue is that it behaves significantly differently depending on the play in editor mode.

#

This is the result of Selected Viewport, which indicates that those widgets got focus like they were supposed to but then immidiately lost it.

#

(Sorry for all the images btw but I don't know a better way to describe what's happening) Here is the result of New Editor Window. This works perfectly and is what I want.

#

And this is the result of Standalone Game. This indicates that it never found the other 2 controllers at all. Or, for that matter, their associated Platform Users.

stiff pine
stiff pine
abstract pike
copper raft
#

heyy guys, someone is using Add VOIP Talker node? how to modify microphone and voice chat volume? and how to make it work in main menu too if i want to test it in settings menu?

#

i added a progress bar but can't understand how to get the microphone sensor to make this bar work when talking

#

or maybe is better to use Audio Capture plugin? will this plugin work with advanced steam session plugin?

silent valley
copper raft
round glacier
#

If a reliable multicast RPC fails (a client doesn't ACK), does that RPC retrigger for both server and the client? I'm trying to debug a really vexing intermittent bug where an event is happening twice...

Put another way -- is there any engine-side de-duping for RPC calls that get waylaid, or is it expected that you may get double triggers on reliable RPCs?

copper raft
#

@silent valleyso to change microphone volume i have to use console command "voice.MicInputGain "?

lament flax
#

Usualy core reliable RPCs should rarely fail

#

And since you said its a net multicast i think it can be changed to a repnotify property

gilded vapor
eternal briar
#

Hey folks, I am testing my own custom movement component for a top-down 2 player co-op game. Here is the screenshot of my "stat net" while both the listen-server and client are moving. Would these "In Rate" and "Out Rate" values be ok for a game? Or are they too high and would clog up the bandwidth?

verbal ice
#

They're fine

eternal briar
thin stratus
eternal briar
thin stratus
stiff pine
#

Anyone have knowledge on why playing in Standalone mode prevents Unreal from finding multiple players?

thin stratus
#

Multiple players?

true pelican
#

we are running into an issue with joining eachother through the steam plugin. it says level found and joins then it just kicks you back to the levle you started on. any ideas?

#

5.7

short arrow
gilded vapor
neon snow
#

Hi guys, my game uses async tick physics and I noticed that there is alot of rubber banding when this is used in multiplayer. The game doesnt use dedicated servers so is there a way to fix this rubber banding without turning off async tick physics

lyric heart
#

i have not tried it yet damn

eternal briar
#

For my 3 player co-op game with client-authoritative movement, I have a repnotify struct ClientMoveState that holds the movement data. I move the locally controlled pawn locally and then send the struct to server without any corrections checks back. Then I use OnRep_ClientMoveState() to move the pawn on other clients. Does this setup make sense for a simple game without the need for any cheating checks? Also, one bandwitdh optimization I have done is adding replication condition COND_SimulatedOnly for ClientMoveState, saving a few bytes. Are there any other optimizations I can do?

nova wasp
#

assuming you are using that

#

it's a game network setting you can set from the ini, google should find some results

dark edge
eternal briar
eternal briar
nova wasp
#

I can't imagine needing to go too far with just 3 players sending vectors down

eternal briar
nova wasp
#

I would say at least take a look at how the cmc interpolates

nova wasp
eternal briar
nova wasp
#

Nice

eternal briar
#

And I think I can lower the rates even further if I remove velocity and timestamps from the movement struct. Since I am not doing any prediction, I think I can get away with it

slate phoenix
#

Client_LoadBlock RPC โ†’ 126 KB
Unreal max RPC bunch โ†’ 64 KB

nova wasp
#

you could also raise net.MaxConstructedPartialBunchSizeBytes but I would say it's not that hard to make a sequence of reliables to send

slate phoenix
#

do 1500 now try

nova wasp
slate phoenix
nova wasp
#

I would say try to be careful with spamming too many reliables are you could risk hitting certain internal limits. It's probably better to have an ack step back and forth to reduce the risk of things missing

slate phoenix
#

I set the chunk to 1500 and the timer to 0.1, and I'm waiting for it to copy to the server.

I don't want to do small scaling like 100 or 200 because there are 50k blocks, and I don't think players would want to wait.

nova wasp
slate phoenix
#

It's not giving an error right now, I'll need to reduce the number.

nova wasp
#

you can raise a lot of network limits but some are very set in stone

slate phoenix
#

how many do ?

nova wasp
#

I'm more familiar with Iris than the built in setup (actor channel replication)

slate phoenix
#

i use hฤฑsm

#

not actor

#

if use actor 15k actor do so ping

nova wasp
#

Iris vs actor channel replication is about the lower-level netcode that actually sends rpcs and replicates properties. This is not about using an actor or not. (Iris is experimental but will be the default eventially)

#

You are still sending this rpc from an actor, you are just being smart about sending batches of data

slate phoenix
#

okey i will change now try

#

1000 blok ร— 25 byte = 25KB
16,000 รท 1000 = 16 RPC
16 ร— 0.1s = 1.6

its good ?

nova wasp
#

using a delay is not good

#

you are just assuming it arrived

slate phoenix
#

i use already timer

nova wasp
#

instead, the client should send back a report saying that it is ready for more sections

#

using a delay is better than nothing but it is not going to help avoid actual issues and is just praying it will not be overloaded

#

you don't have a lot of access to connection details from here (and honestly C++ doesn't expose a lot of context for this either!) but you CAN at least have your own back-and-forth series of RPCs to keep things consistent

slate phoenix
#

hmm

#

i will check

slate phoenix
#

thank you very much!

nova wasp
# slate phoenix thank you very much!

you might find it useful to raise the default bandwidth limits too. These are just example numbers and might not work in all connection setups. Consider the defaults and what your actual target hardware does for bandwidth I guess
โจโจโจ```ini
game ini:
[/Script/Engine.GameNetworkManager]
; Increase from the base bandwidth, numbers need to match ConfiguredInternetSpeed in DefaultEngine
TotalNetBandwidth=200000000
MaxDynamicBandwidth=200000000
MinDynamicBandwidth=200000

engine ini:
[/Script/Engine.Player]
; These numbers should match TotalNetBandwidth
ConfiguredInternetSpeed=200000000
ConfiguredLanSpeed=200000000

slate phoenix
#

I understood what you meant, and in short, I implemented it this way.
Thank you, itโ€™s working properly now.

formal path
fallen fossil
#

how you set movment replication in constructor? ๐Ÿค”

latent heart
#

Use the setter function.

fallen fossil
latent heart
#

Probably fine to ignore it.

nova wasp
#

this is confusing but you can just see what the functions do by clicking on them

#

for a ctor call you want something that sets the field with minimal side effects

#

generally speaking

fallen fossil
fallen fossil
#

ok i see only differnte higher function is virtual

#

yea

nova wasp
#

some classes override this

#

you do not want code to run outside of this

#

โจACharacter::SetReplicateMovementโฉ for example will update a timestamp

fallen fossil
#

well its only actor for me

nova wasp
#

please consider what I am actually saying here, you do NOT want to update dynamic runtime info inside of a ctor

#

I personally prefer to just call the actual intended function here. Yes effectively there is no difference provided nobody overrides it here

fallen fossil
#

okok

nova wasp
#

so it won't matter, but you can see in the engine SetReplicatingMovement is used for setting defaults from ctors and early on

#

an insanely confusing pair of function names lol

#

one of them should probably be named something else

fallen fossil
#

Whole engine is confusing and naming

#

there should be hard refactor imo ๐Ÿ˜„

nova wasp
#

yeah I wish

#

there are deprecation messages from 4.16 in there still

echo pasture
#

lol

nocturne quail
#

[CoreRedirects] inside defaultengine.ini doesn't work for plugins because they are independent modules?

nocturne quail
#

seems like I need PackageRenames but it still not updating blueprints parent module ArmaVehicleSystem.uplugin

    "Plugins": [],
    "CoreRedirects": {
        "PackageRenames": {
            "/Script/FGearPhysics": "/Script/ArmaVehicleSystem"
        }
    }
lost inlet
#

since when could you add coreredirects to the uplugin?

nocturne quail
#

cause adding it to the defaultengine ini not working

lost inlet
#

DefaultEngine.ini as the one located under <project>/Config

#

the examples I've seen of plugin ones go in <plugin root>/Config/DefaultNameOfPlugin.ini

latent heart
#

Incoming literal DefaultNameOfPlugin.ini

nocturne quail
lost inlet
#

what is the file you made called, where did you locate it, what does it contain?

#

though I'm not sure why a coreredirects thing is in here

nocturne quail
#

DefaultNameOfPlugin.ini

[CoreRedirects]
+PackageRenames=(OldName="/Script/FGearPhysics", NewName="/Script/ArmaVehicleSystem")

lost inlet
#

so you literally did name it DefaultNameOfPlugin.ini. @latent heart you win that imaginary bet

#

in this case it should be DefaultArmaVehicleSystem.ini

nocturne quail
lost inlet
#

yes, examples I can find use that

#

Base may work as well

nocturne quail
#

do I need explicitly redirect the class name also for a new module name?

nocturne quail
#

we all go through the same path ๐Ÿ˜„

nocturne quail
# nocturne quail no luck, its still not working

finally foundd a working solution for redirecting module names after renaming

DefaultArmaVehicleSystem.ini

[CoreRedirects]
+PackageRedirects=(OldName="/FGearPhysics", NewName="/ArmaVehicleSystem",MatchSubstring=true)
verbal ice
#

(great for renaming modules)

daring narwhal
#

Hey all , have this sort of issue , actor placed by hand on the world partition (5.7.2) makes function from player controller not authorized on Dedicated server - anyone have an idea why is that?

#

Server is placed, client join and when actor is in world partition - it destroys functionality to send RPC it thinks that instance of Server is not a Dedicated server (crash with IsRunningDedicatedServer().

#

while there is no actor everything fine... (AActor class)

nocturne quail
daring narwhal
nocturne quail
lost inlet
#

I'm not clear on the question actually. an actor placed in the world won't be owned by any particular player controller so client->server RPCs would expect to fail

halcyon ore
#

Also, crashing?
Whats the crash stack.
I agree with sswires either way.
More info, but otherwise the result of not working sounds expected.

daring narwhal
#

here its the video as You see just placing actor just block called RPC to the GameMode in World partition.

halcyon ore
#

Oh, its a check failure, not a legit crash like I thought.

Gonna need more context, or code.
Cuz a random ass actor would 100% not cause issues.
have you checked the logs, maybe they say something?

Otherwise, can't go off much, especially with the visual confusion of a "create profile" function making a textbox appear, as if it were a game chat.

nocturne quail
nocturne quail
#

post the whole function, I think if the world for an object is not valid you can't use isserver or isdedicated server

nocturne quail
#

before check

daring narwhal
#

so the thing is i create a profile on the server and when i place actor to the world partition client lost authority and create it locally

#

cause it thinks its not dedicated server after joining - join to the server wont fail just actor mess up something that loss the knowledge is on the server

nocturne quail
#

also don't use check for authority stuff

#

just to if (!IsRunningDedicated()){ your stuff}

daring narwhal
#

no matter code i place there - aactor just disband dedicated server communication

nocturne quail
#

in non wp level it works?

halcyon ore
daring narwhal
daring narwhal
daring narwhal
#

okay so it also produced locally on the standard level but check isnt triggered wont crash as in WP crying

daring narwhal
#

i have no a clue how placed actor can switch authority in that case iam to stupid maybe You can Guys help here

halcyon ore
#

None of this code you posted actually calls the function causing the issue.

daring narwhal
halcyon ore
#

Thats the implementaion.
But, not the call

daring narwhal
#

that is going to the game mode which creates profile on dedicated server

lament sapphire
#
void AGoblinCharacter::OnRep_Seat(TWeakObjectPtr<USeatComponent> Previous)
{
    UE_LOGFMT(LogGoblinCharacter, Log, "OnRep_Seat: Change from {0} -> {1}.",
        Previous.GetWeakPtrTypeHash(), SeatComponent.GetWeakPtrTypeHash());

    if (SeatComponent == Previous)
        return;

    if (Previous.IsValid())
    {
        DetachPlayerFromSeat(Previous.Get());
        // This never gets called.
    }

Hiya! Anyone know if the "with previous value" implementation of OnRep for some reason doesn't work correctly with weak pointers (or maybe pointers in general)?

#

The component referenced here should certainly still be alive.

halcyon ore
# daring narwhal

That get player controller is already sus, cuz its a weird/ wrong function to use.
Try it with the expected get owning player, thats designed for widgets.

halcyon ore
lost inlet
#

that looks like a user widget, so a little more permissable but the owner is already there

lament sapphire
halcyon ore
#

Oh, its a function input.
I've never delt with on rep like that, so IDK then.
I always just known on rep as a on value change sorta thing, not a give other context function. ๐Ÿ˜›

halcyon ore
#

Or, run with debugger, and see if the stack trace, or general var info says anything.

daring narwhal
#

i think game mode takes actor to the account for authorization

daring narwhal
#

it wont me produce profile since iam like a second user that would like to join its wierd but thats is most logic explanation of kicking my player controller from the server

halcyon ore
#

That just looks like the entire thing is invalid, cuz no owner, or PC.
So, that suggests something extra is fucked, and not that the actor is somehow magically talking context.

daring narwhal
nocturne quail
verbal ice
#

You need to re-save every asset that uses those classes first

#

and fixup redirectors

nocturne quail
#

even added new variables to the bp classes

#

compiled, saved already

dark parcel
#

@daring narwhal whats this pre placed actor has anything to do with the cropped code you shpw earlier?

daring narwhal
dark parcel
daring narwhal
# dark parcel blooks other Guids? What is the goal here? The code doesn't says much but too se...

goal here its build testing enviroment - Profiles and saving on Dedicated Server since i cannot get working steam api. Cannot connect locally with advanced sessions. Need some feature that simulates for me network solution - correct server placement. In Standalone saves going to the local folder so i cant see logic for that works as excepted so when profiles are build on te server and stored there i know that everything ok ๐Ÿ˜‰

dark parcel
#

#multiplayer message
So what's creating profile or setting variable on server's game mode has anything to do with GUID or the pre-placed actor in the scene?

daring narwhal
#

so why i have this problem of failed authorization and profile creates on the local computer

#

that is needed to load profile when user going back for take this number as verified user from this PC (Steam ID)

dark parcel
#

Why is steam unique ID alone not enough to indentify a player?

As for the Actor GUID you seeing on the scene, that is not the machine ID, that's just editor only GUID.

#

feel like we are not on the same page though, what is the actual goal here?

Client join, send profile data to server, then server saves to it's disk?

daring narwhal
#

as i said steam api doesnt work for dedicated server cant test it locally for 5.7.2 with advanced seession and other stuff

daring narwhal
dark parcel
#

so you want to store / send the MachineID Guid, have you done this? because clicking on some actor in the scene and checking it's Editor only actor guid is not relevant.

daring narwhal
dark parcel
#

Not trying to be difficult here or condesending, just genuily lost why the pre-placed actor is a thing.

Can't you just

Client -> Server_RPC(MachineID, PlayerName)

Server(MachineID, PlayerName)-> Create Profile -> Save Profile.

daring narwhal
#

its doing that exactly but code take this random palced actor to the account not the machine id. That is the magic here it just thinks that placed actor is active user... no idea why ๐Ÿ˜„

dark parcel
#

show code

daring narwhal
#

also for the save

dark parcel
#

Why is loaoding a save profile takes in UObject? where is this UObject created?

daring narwhal
#

and for authorization serve looks for this files to recognize specific user

#

somewhere code reads that placed actor guid is right machine id that exist and wont allow me to join

#

so i cant execute creation of profile

dark parcel
#
void ASPlayerController::Client_RequestMachineId_Implementation()
{
    LocalMachineId = FPlatformMisc::GetMachineId();
    //LocalMachineId = FGuid::NewGuid();
    if (!LocalMachineId.IsValid())
    {
        Client_AuthFailed();
        return;
    }
    Server_SendMachineId(LocalMachineId);
}
#

So server tell client to oget it's machine ID, then client send the MachineID back to server?

#

looks ok soo far

#

I never use _validate though hopefully that dont mess anything

daring narwhal
#

thats iam confused -> client expose his machine id but first login code take actors placed in the world with guids that is the issue and
"oh hey i have id atm - user kicked" ๐Ÿ˜„

dark parcel
#
void ASGameMode::HandleMachineAuth(ASPlayerController* PC, const FGuid& MachineId)
{
    check(HasAuthority());

    if (!PC || !MachineId.IsValid())
    {
        PC->Client_AuthFailed();
        return;
    }

    if (ActivePlayers.Contains(MachineId))
    {
        PC->Client_AuthFailed();
        return;
    }

    ActivePlayers.Add(MachineId, PC);
    PC->OnMachineAuthenticated(MachineId);
    

    FString ExistingPlayer;
    UEMSMultiCustSav* Profile = nullptr;

    if (FindProfileForMachine(MachineId, ExistingPlayer, Profile))
    {
        PC->OnProfileAuthenticated(ExistingPlayer);
        PC->SetProfileSave(Profile);   // <<< KLUCZOWE
    }
    else
    {
        PC->Client_NoProfile();
    }
}
#

just checking code here, kinda hard since I don't have your proj

#

btw HasAuthority check is useless here since game mode only exist on server.

#

So like, are you able to test if you always get the same MachineID all the time?

#

I suppose you test this with multiple devices too?

daring narwhal
dark parcel
#
if (ActivePlayers.Contains(MachineId))
    {
        PC->Client_AuthFailed();
        return;
    }

If you've been testing with a single PC, it should fail here as everyone would be using the same MachineID.

daring narwhal
lost inlet
#

if you're planning on using Steam then I would suggest to fix the OSS running on the dedicated server since that will still be the most reliable way of uniquely identifying a player

#

also the "GenericPlatform" stuff is the base implementation for most platform things, usually there are platform specific implementations where possible

daring narwhal
daring narwhal
# lost inlet also the "GenericPlatform" stuff is the base implementation for most platform th...

thanks but i wasnt able to run with all the knowledge i could gather to test local for my dev puprose. Will left to that later just need some enviroment to see if saves works on the server and nothing breaks. For listen seems there are no issues . for dedicated just session wont apply client if server is running on same machine - treid sandboxie with 2 steam accounts and wont allow me also

lost inlet
#

that's always been a limitation, I would just suggest using a spare machine or renting a VPS for testing that

woeful ferry
#

Hi,

Currently running into an issue where the client sees all the NPC movement as laggy in build, but in editor with BufferBloat / Bad connection, I can't replicate it.

I ran unrealinsights network profiler on the nightly and there were no high peaks there either in bandwidth

nova wasp
#

low fps = longer spaces between rpcs/replication

woeful ferry
#

Both capped to 60

nova wasp
#

any priorization/filtering?

#

is "movement" here actually their actor transform onreps? You can add something real quick to just track how fast it is onrepping

#

or just visualize it

blazing spruce
#

Hi, I'm so confused on this.. I have an overlap that despite the player not being inside of, is still registering as if they are? I specifically leave the overlap, I can see the EndOverlap event fire successfully confirming I've left the overlap and yet when TriggerBells is called the if check circled in red can go true despite the player being way outside the overlap.. the weird thing is I can literally change nothing, run the game again and then do exactly the same and it'll fire false, how do I even begin to debug that?? Doesn't make any sense crying

daring narwhal
dark parcel
#

I never deploy a dedicated server but afaik you need to open the level with ?listen to allow replication / networking. Not sure if thats neccessary for dedicatded but i wouldnt be suprised.

lost inlet
#

that has never been necessary for dedicated

toxic steeple
#

Hello, I was wondering if someone could guide me in the correct direction.

I am creating a game that uses a listener server, etc. I want the players to be able to move between a few various levels (lobby, main1, dungeon1, dungeon2, etc), while keeping the same game state properties. Lets say total score together. Its a co-op game.

I've read that Game State get's garbage collected between level transitions.

I was told to put this data into GameInstance or GameMode (obviously have the authoritative instance handle it.) Not really sure what I should do. Any ideas?