#multiplayer

1 messages · Page 708 of 1

plucky prawn
#

its marked as reliable too

fathom aspen
#

Ah so you see both roles, right?

#

NM_DedicatedServer and NM_client

#

And is the character possessed at the time you invoke the RPC?

plucky prawn
#

so its working.. but like.. its also not working?

#

what are the requirements for sending an actor over RPC?

#

like does the actor itself have to be marked as replicated and/or have any replicated properties?

plucky prawn
fathom aspen
#

Well I asked if the player is possessed to make sure that it's owned

plucky prawn
#

im trying to send a different actor over rpc from server to client. the RPC is happening within the ACharacter which is owned

#

pretty sure the problem is that the actor im trying to replicate is.. not marked Replicates

fathom aspen
#

This is a player character, right? not a NPC?

plucky prawn
#

oh and its not owned by me lmao

marble rune
plucky prawn
#

well this is awkward

#

but ye it looks like it is

fathom aspen
plucky prawn
#

i am having 0 luck right now. the client is not receiving the actor im sending through RPC. its replicated and i own it so im not sure whats going on

fathom aspen
#

If it's replicated, why you're sending it through an rpc Think

plucky prawn
#

idk man im just trying to get it to work

fathom aspen
#

trying to get it to work
That's a typical gamedev statement that should be banned

plucky prawn
#

i can confirm the actor exists on the client and the server so i have no idea what the deal is

fathom aspen
#

A better question would be what are you trying to do?

plucky prawn
#

make an inventory thing where the server adds something, then tells the client to also add it since its in a map and i cant replicate the map

fathom aspen
#

Well use a FastArray

#

I mean I haven't done an inventory system using a TMap, but there is a workaround for replicating a TMap

#

How bad that is? idk

#

But not the coolest thing ever

plucky prawn
#

i dont need the map replicated honestly. just telling the client to add/remove stuff is fine. its a map because there is equipment slots and no other reason

fathom aspen
#

Well that can be done in a FastArray, and if your inventory gets big, it would be even more performant

plucky prawn
#

very nice, i have never heard of this let me read some stuff on it

fallen heart
#

Hey guys. New to Unreal here. I've been following a tutorial series on making my first game and got some scuffed multiplayer going. I packaged the project and opened it on my laptop and was able to connect successfully into the host (I ran it on my desktop). Everything mostly works. I'm having some issue with some of my moving platforms which use the sequence editor. I initially had the same problem where the platforms weren't syncing up correctly but checking "Replicate playback" seemed to fix it. I did some testing and it seems like the issue is happening after one player hosts and another joins (after the menu). If I just start the playable level with a listen server and a client, it works fine. But when I start it from the menu, the client's platforms aren't synced with the host's platforms. What do you reckon could be the issue?

glass cave
#

sooo i tried some stuff it randmly work, and player actor don't seem replicated idk how to explain it but i really messed up replication

plucky prawn
#

so is the server supposed to execute Client replicated functions?

solar stirrup
plucky prawn
solar stirrup
plucky prawn
solar stirrup
#

What's your net mode?

#

oh

#

hmm

fathom aspen
#

I feel like you are messing things up

plucky prawn
#

nou got em

fathom aspen
#

For extra safe check

plucky prawn
#

give me a sec to isolate the code

plucky prawn
# fathom aspen <:sendcode:827091008427655178>
UFUNCTION()
void InternalAddItem(class AItem* item, FGameplayTag slot)
[
    UE_LOG(LogTemp, Warning, TEXT("AMob::InternalAddItem: IsServer: %s | NetMode: %d | Mob: %s | Item: %s"), *LexToString(GetWorld()->IsServer()), (int32)GetNetMode(), *GetName(), item ? *(item->GetName()) : TEXT("No Item"));
    EquipedItems.Add(slot, item);
]

UFUNCTION(Client, Reliable)
void ClientAddItem_Implementation(class AItem* item, FGameplayTag slot)
{
    InternalAddItem(item, slot);
}

UFUNCTION(BlueprintNativeEvent, BlueprintCallable, BlueprintAuthorityOnly, Category = Mob)
void EquipItem_Implementation(class AItem* item)
{
    item->SetOwner(this);
    item->SetHidden(true);
    item->SetActorEnableCollision(false);

    InternalAddItem(item, slot);

    if (GetController()->IsPlayerController())
    {
        ClientAddItem(item, slot);
    }
}```
#

entry point is EquipItem

fathom aspen
#

Are you sure you are seeing the server role when Client RPC executes? Because you have an InternalAddItem executed on the server before that

#

Also are you getting a non null reference to your actor when you execute it through the RPC?

plucky prawn
plucky prawn
fathom aspen
#

Ok I think I found your issue

plucky prawn
#

i checked the callstack as well and it is coming from ClientAddItem_Implementation but the netmode is still dedicated

fathom aspen
#

You are calling a SetOwner on the server

#

But the Pawn is client owned

#

So you should be doing that in the client instead

plucky prawn
#

i dont think i understand

#

the ownership should be replicated as well

fathom aspen
#

I don't think that's the case

#

You can try doing a GetOwner there and see it for yourself

plucky prawn
#

ah ye

#

so i think i found out something

#

so im calling EquipItem in ACharacter::BeginPlay which apparently is being called before its possessed

fathom aspen
#

Well probably

#

I think there is an event for when you're character is possessed

#

Or an OnRep for controller

#

I'm not on my UE PC so I can't check

plucky prawn
#

its ok, i added a delay and its fixed that immediate issue. im now getting some better results but the item actor itself is still not being sent to me

#

this is the log output LogTemp: Warning: AMob::InternalAddItem: IsServer: true | NetMode: 1 | Mob: BP_CarbonMob_Humanoid_C_1 | Item: BP_TestItem_C_2 | Owner: BP_CarbonMob_Humanoid_C_1 LogTemp: Warning: AMob::InternalAddItem: IsServer: false | NetMode: 3 | Mob: BP_CarbonMob_Humanoid_C_1 | Item: No Item | Owner: Null

#

its like the actor is getting lost

fathom aspen
#

Well it's clearly telling you your owner is null on the client

#

How are you setting owner now?

plucky prawn
#

its null because the item is null

fathom aspen
#

I haven't seen how you print that, so I can't tell

plucky prawn
#

oh sorry

#

it does not include the ownership thing

#

this is all im doing ```cpp
UE_LOG(LogTemp, Warning, TEXT("AMob::InternalAddItem: IsServer: %s | NetMode: %d | Mob: %s | Item: %s | Owner: %s"), *LexToString(GetWorld()->IsServer()), (int32)GetNetMode(), *GetName(), item ? *(item->GetName()) : TEXT("Null"), item ? *(item->GetOwner()->GetName()) : TEXT("Null"));

fathom aspen
#

So you didn't set owner to be the client?

#

SetOwner is still where it was?

plucky prawn
#

correct

#

hm wait

#

were you saying that the owner not being the PC might be the problem? or that im not setting it client side?

fathom aspen
#

You are not setting it client side

plucky prawn
#

but ownership is replicated

fathom aspen
#

I'm a bit confused that for the server it's saying owner isn't null

plucky prawn
#

because its owned by the acharacter

#

it is it literally says its owned by the mob (my ACharacter derived class)

plucky prawn
#

so i fixed it. i was right that ownership is networked, however it wasnt replicated before trying to use it with the RPC. i was also spawning and taking ownership inside my blueprint which was breaking stuff. removed setting the owner in blueprint fixes literally everything

solar stirrup
#

Am I mistaken or does the engine serialize bools as 32 bit integers

echo pasture
#

Is it just me or is the default visual studio intellisense soo much slower in UE5 than in UE4

solar stirrup
#

VS has always been a pain :/

#

I'd move to Rider if you can

solar stirrup
echo pasture
#

yeah I feel like i'm forced to migrate/use an external tool at this point if I want autocompletion

#

and for some reason intellisense is also not recognizing engine symbols for ue5

#

that could be just an install issue tho

solar stirrup
#

Has intellisense ever recognized anything without VAX DogKek

echo pasture
#

true

solar stirrup
#

Aight so yeah, only if I use custom serialization

#

Got it thanks

nova wasp
#

I assumed int32 bPoggersYes : 1 packed?

#

oh well

solar stirrup
#

probably if you use default serialization

#

custom with << throws that into the 4 byte corner

final quest
#

where can i buy/get a dedicated server for my multiplayer game?

bitter oriole
#

You can start with AWS for a safe default choice

final quest
#

okay thanks!

sly parcel
#

Hi I have a question regarding multiplayer: p2p, client host/lister server:
so if you are playing with your friends, you are 4 in all.
If you are client host server and your connection gets lost, your 3 friends will also leave the game right
But in p2p, anyone from the peers can host even if he is not the first host for the game?
Thanks

bitter oriole
sly parcel
bitter oriole
#

Yes

#

if your game engine does P2P, that can work

past seal
#

for some reason when i seamless travel from one level to another, the client screens freezes. anyone know why this is?

#

they do see the new level they travelled to however

twin juniper
#

hello guys how can i play animations in both clients

#

see when ever i pressed some key iam setting a bplayanim true in character bp and only one client can see that animation is changing and other client cant see

past seal
#

you have to make sure your boolean is replicated

twin juniper
#

but when i make bplayanim to true in beginplay its working in both clients and animations are working

twin juniper
past seal
#

oh you want to play anim through a function in your character bp?

twin juniper
#

no iam making bplayanim = true in character and in another actor (Bomb) iam casting character and checking its true or not if true play animation its in tick

#

i added replicated true in actor

past seal
#

so you have play animation in tick?

twin juniper
#

ya before animation start iam checking bplayanim is true or false with branch

past seal
#

Does your character have access to the bomb actor? then i would recommend you use RepNotify on your bPlayAnim boolean then tell your bomb to play animation in the OnRep function instead

twin juniper
#

ya character have bomb actor access

#

ok i will check with repnotify

jaunty stream
#

Does someone know why my dedicated server start with ip 0.0.0.0

jaunty stream
#

But I want tat it is my external ip so friends can join

past seal
#

i cant seem to figure out how to transfer information from one map to another when seamless travelling

vague fractal
#

Why do i have the feeling that you talk about black desert

#

Anyways, what you ask for is for sure against discord TOS if not even illegal by many countries itself

kindred widget
#

Not hard. At least not from a technical point of view. Get access to source files, and legal standing to do so.

sinful tree
#

Rule #5 of this Discord applies methinks. If you don't have the source code yourself, then trying to reverse engineer it, is a form of piracy.

bitter oriole
#

How much difficult is it to make this game open-source?
It is illegal and as such out of scope for this server

kindred widget
#

That's kind of covered under source code. No source code, no legal right, no game.

bitter oriole
#

(Also no game developer is going to help you stealing their colleague's work)

quartz gorge
#

Asking how to illegally redistribute a copyrighted intellectual property as open source in a forum full of people who are actively working to create copyrighted intellectual properties seems like a fantastic and well thought out idea.

bitter oriole
#

No

#

And frankly coming here to talk about "amoral developers" and whatnot - who do you think you're talking to here?

kindred widget
#

I want you to go to work, every single day. 8-16 hours(no joke). Three years at the minimum. And keep this loose definition of piracy after you've released a game.

sinful tree
#

Fact of the matter is, this isn't the place to discuss trying to reverse engineer someone else's code so you, and probably others, can play for free. Morals doesn't come into it. That's the rules of this server.

bitter oriole
#

Alrighty then, let's ask the <@&213101288538374145>

kindred widget
#

If you have to google how to count, you have no lines of code, moron.

latent heart
#

Talking of being able to foresee the consequences of actions... you don't seem to be able to.

north stone
#

yup, heavily against the rules to discuss this.

bitter oriole
#

"You guys are closed-minded and amoral money seekers - oh why u being mean to me?"

nimble parcelBOT
#

:no_entry_sign: Sun#9154 was banned.

quartz gorge
#

So multiplayer game dev...

thin stratus
void badge
#

guys

#

just wanted to ask

kindred widget
void badge
#

I have a problem with my engine

#

it crashes after i open a project for a few secs

maiden ivy
bitter oriole
#

They're saying verify the engine in the launcher

plucky prawn
#

is there a way i can set a material parameter from the server and have it take affect on all clients?

bitter oriole
latent heart
forest kettle
#

Hello everyone,
Happy easter first of all..
Now, do we know of any multiplayer changes in UE5? I have a project that worked perfectly fine in UE4 but in UE5 when a client join a session one of the clients's character disapears! I tried with both PIE and standalone, same result.

maiden ivy
latent heart
#

Missing the joke, I feel.

maiden ivy
#

was trying to deadpan lol

quartz gorge
#

I will admit when you first posted I was like "What?" Then the coffee kicked in and my old brain was like "Clever Mod..."

maiden ivy
#

😛

near bison
#

confused between storijng a Game Deck on gamemode vs gamestate, which is the better option?

solar stirrup
near bison
latent heart
#

Game Mode isn't replicated.

#

At all.

near bison
#

even the variables in game mode?

#

because it does give me an option to replicate the vars

latent heart
#

Just because a variable property has that option does not mean the actor it belongs to is replicated.

near bison
#

hmm...they should just disable replication (the dropdown) on all classes that inhiert gamemode

latent heart
#

You could, in theory, make a replicated game mode.

#

Just because their way of doing things doesn't do it, doesn't mean they should unilaterally disable replication on game modes.

near bison
#

nvm, don't wanna go into that

solar stirrup
near bison
#

i'll move all my stuff into gamestate

near bison
#

my confusion was on whether I wanted to replicate my gamedeck in the first place

#

I kinda do...since I do want my clients to know how many cards are left in the deck etc

solar stirrup
#

Does every player have a deck

near bison
#

every player has their own hand, but there's also a master deck

latent heart
#

You don't have to replicate the deck to tell them that.

#

You could replicate deck-based information withotu the deck.

solar stirrup
#

You can just replicate the number of cards left on the game state then

latent heart
#

To avoid cheating.

near bison
#

no..what if I want to do more tomorrow? eg: show the top card that was picked from the master deck on the clients..in that case I WILL need to know what's on the deck on each client won't I

#

otherwise i'll have to build unnecessary abstractions to access it via gamemode

solar stirrup
#

You can always tell clients as they need

near bison
#

and also do I kinda want the clients to know at all times how many elements are left in the master deck

#

for which replicating the var and OnRep-ping it sounds like the best soln

solar stirrup
#

Your choice in the end, we're only here to give pointers ^^

solar stirrup
#

In that case you'll wanna do it in the game state

latent heart
#

If you don't always awnt them to know, you could set a "hidden" state of -1 or some such.

solar stirrup
#

Tbh for that, I'd just have the deck on the game state, but only replicate the amount of cards left

#

If players need to know X cards, I'll just send as they need

near bison
#

but i don't think it makes that big of a diff right

latent heart
#

Not really, no.

solar stirrup
#

Premature optimization is the root of all evil ^-^

latent heart
#

Especially in a deterministic, non-real time game.

near bison
#

then should be good. think i'm good with keeping this on gamestate and having it replicated

near bison
sinful tree
#

Fact is, if you send the whole deck, then someone could potentially cheat and read what is in the deck to gain an unfair advantage as the values would be stored in the memory of the computer.
If all you need to do is send them a count of cards left in the deck, that's a simple int being replicated. If you need to show them the top card, that'd be tied to an event call already (eg. after dealing, send an RPC to show the clients what the card was).

All depends on how competitive / if there's money involved / leaderboards etc... If you don't care if people can cheat, then yea, just replicate the whole array of cards.

near bison
#

but in my case, I don't care if they know what's left in the decks, it doesn't matter (for our game)

#

it DOES matter that the clients don't know the hands of other clients though...and currently the hand of each player is replicated

jaunty stream
#

I have a problem I have a dedicated server and it ip is 0.0.0.0 and I port forwarded the 7780 port but I can’t connect with my public ip to it

latent heart
#

@near bison where are you replicating the player's hand?

#

To their controller?

faint eagle
#

What is "presence" in terms of online subsystem? From what I read in docs it seems that this parameter is about that feature in steam when you can see what game a friend is playing and in some games you can also see what map and mode the friend is playing. Is it all what the "presence" is about?

deep fable
#

What are the prerequisites for steamsockets to work? I can find my sessions, but i'm getting time-out when joining. On server i am getting "Warning Ignoring P2P signal from 'steamid:76xxxxx', unknown remote connection #xxx". and this is my DefaultEngine for steam;

[/Script/Engine.GameEngine]
!NetDriverDefinitions=ClearArray
+NetDriverDefinitions=(DefName="GameNetDriver",DriverClassName="/Script/SteamSockets.SteamSocketsNetDriver",DriverClassNameFallback="/Script/SteamSockets.SteamNetSocketsNetDriver")
;+NetDriverDefinitions=(DefName="GameNetDriver",DriverClassName="OnlineSubsystemSteam.SteamNetDriver",DriverClassNameFallback="OnlineSubsystemUtils.IpNetDriver")

[OnlineSubsystem]
DefaultPlatformService=Steam

[OnlineSubsystemSteam]
bEnabled=true
SteamDevAppId=n
SteamAppId=n
bInitServerOnClient=true 

[/Script/SteamSockets.SteamSocketsNetDriver]
NetConnectionClassName="/Script/SteamSockets.SteamSocketsNetConnection"

Kinda clueless what's happening 😦

granite wind
#

Hello I want to use the replication networking but it seems that in order to create a server build we need to have a source compiled version of unreal engine. Does anyone have an idea of how much space it would take? I want to use UE 4.27.2. Thanks

winged badger
#

160 GB

granite wind
#

Is there anyway to reduce that size by removing unwanted platforms?

winged badger
#

not really

#

that is by compiling just UE, not the entire solution

#

most of the size is debug symbols

granite wind
#

So the only option is to download the source code and compile it with visual studio and it takes upto 160GB and we have no way to reduce its size am i correct?

winged badger
#

yes

wet tangle
#

I've a question
If I have an event add player in my game mode where a player controller reference is added whenever a player joins, is it possible to from these references cast to the player controllers on the clients or are they separate

winged badger
#

no

wet tangle
#

so i must have references to the characters?

winged badger
#

clients don't have a gamemode, or playercontrollers other then their own

winged badger
#

normally, you'd use playerstates

wet tangle
wet tangle
jovial dawn
#

Hi guys, I made a small demo, only me character on a flat surface, I run it standalone, I set it to 60fps with ‘t.maxfps 60’ in cmd. I compile the server and the client, and it seem to be cap at 30fps, that's make my player movement very slow. on the server console it said on start, "max tick rate 30" , however I tried to set t.maxfps 60 when I run it on the server does't changed anything, I have a RTX 3070ti without any trafic on the game, I'm alone... so I wonder how to fix.

#

sorry for my bad english I hope you understand what I mean

latent heart
#

If you're moving slower due to tick rate, you need to change how you calculate movement!

jovial dawn
#

but FPS 30 is a bit slow for game no ? or we are at the limit minimum

#

you mean the character speed

#

walkspeed

latent heart
#

If you're using the Character class, I guess that's... okay.

#

As fps FPS, no idea.

jovial dawn
#

I changed the walkspeed to higher value and it's faster now. I wondering if this will cause problem on lower/higher pc config, I would like it to be the same for all players

latent heart
#

With the Character, walk speed should be the same at every fps

jovial dawn
#

ok

#

thank you @latent heart

torn geode
#

Prob a dumb question but is there a simple/ easy way to quickly replicate a game?

#

struggling to understand how to rn

latent heart
#

No, there is no easy way.

#

You need to look at some tutorials and build it from the ground up with multiplayer in mind.

#

Do not try to convert a single player game.

torn geode
#

I dont know how to build with it in mind im afraid, i plan for it to be multiplayer at the start but i dont know how to replicate and i cant get my head around the tutorials

latent heart
#

Do you know the difference between game mode, game state and game instance?

#

Between a dedicated server, listen server and client?

torn geode
#

The second yes

#

gamemode is just to set character etc right?

latent heart
#

In how it relates to MP, I mean

torn geode
#

No

latent heart
#

These are things you need to know.

torn geode
#

Ok

#

ig ill watch hundreds of hours of videos

latent heart
#

Have you done any programming before? Or asynchronous programming, like ajax stuff on web?

torn geode
#

Only blueprint coding in ue

latent heart
#

Go watch some tutorial videos. Idk which ones. If you have questions about the videos - simply ask.

torn geode
#

Oki

#

might just stick with single player]

dark edge
#

If you have an idea for big project, take the core of that idea, and make a small single player project around that to learn your way through the engine.

torn geode
#

its not my first project

dark edge
plucky prawn
#

is there an easy way to support on dedicated and listen servers and also make it work in standalone? or do you just litter netmode checks everywhere?

#

standalone isnt really important since i can just run a listen server instead.. noone will know

dark edge
solar stirrup
#

Since I use the push model

#

Make macros for stuff like that, like calling a function depending on the net mode

#

Saves a lot of time

obsidian walrus
#

do blueprint RPCs take into account the actors net priority?

#

e.g. if im replicating a pawns animation montage , will the multicast RPC prioritize actors with higher net priority, and if not, can I add this functionality with BP, or will it need some c++

boreal wadi
#

Running into a weird issue. There’s a function in the movement component that fires on client and server whenever you jump called “DoJump” I’m overriding this function and plugging on my own logic. Super weird that when I play as stand-alone or listen server the function is fired on the server. When playing as a client this function only runs on the client. Not sure why this is happening but it’s causing rubber banding issues. Any idea why this would only be running on the client and not both server and client?

oblique prism
#

I'm trying to do some modding for a game called Conan Exiles. I'm trying to pass health data to the PlayerState from the Character on the server and then replicating it so that all clients and see the health of their group members regardless of if the character itself is relevant at the moment. The variable on the PlayerState and the playerstate itself are set to replicate, although the update frequency is low. Even so, the variable is not replicating. Is there something fundimental that I'm overlooking?

fading birch
#

The server is the one setting that value correct?

fathom aspen
obsidian walrus
fathom aspen
#

Correct

plucky prawn
pallid mesa
#

Push model is optimization stuff

#

what do you mean with client rpc's?

fallen heart
#

Hey everyone, brainstorming a design for my multiplayer character selection screen and would like someone to tell me how it sounds and maybe any recommendations. So I'm making a multiplayer character select screen which would be the level after players host/join the session. Once they select a character, they'd spawn as that character in a small lobby area like the areas before a battle royale starts. My reasoning for this is that they can't immediately load into the next level because as far I understand, there can't be multiple people on different levels. If this is not the case then I guess I don't need the rest. As such, I need a way to move all the players at once; once they're in the lobby area, I can prob do something like a countdown that starts once a game is hosted (like 60 seconds) or a ready check for all players so that it sends them all at once?

plucky prawn
pallid mesa
#

correct what's the problem with that?

#

is there something you dont understand? @plucky prawn

plucky prawn
#

I'm currently having issues where I think for listen servers my client function is not working correctly on the server host because on onrep functions not being called

latent heart
#

OnRep isn't called automatically on listen servers in c++ like it is in BPs

#

One of the replication things isn't anyway

#

You basically need to do value = newvalue; if (isserver) { onrepfunction() }

pallid mesa
#

correct BP onreps work different

plucky prawn
#

Ye I think I remember that about the bp

#

Thanks guys I'll try to add this to some of my code

latent heart
#

GetWorld()->GetNetMode() != NM_DedicatedServer is what I used to do, I think.

#

Like many yersa go

pallid mesa
#

also understand relevancy

#

try to read what relevancy is about

#

the tldr is when you need state, you want replicated variables

#

when you just want to send a non-state inducing event, a rpc will do

#

that's part of it

#

but there's much more to it as to what happens with rpcs or vars once u get out of relevancy and get back in

plucky prawn
#

Sounds like ass honestly. I need this so I also need to learn lmao. Thanks

pallid mesa
#

ping me later so i will give a proper exp walking outside now haha

plucky prawn
pallid mesa
#

hahaha

latent wyvern
#

I'm trying to launch two PIE windows where one is a server and the other is a client. I've set the Net Mode as Play As Client and Number Of Players is set to 2. The same project on UE4 launches one server and one client while in UE5 two clients are launched. How do I make it work in UE5 the same as UE4?

#

Play As Listen Server seems to fix it. Hmm, wonder why it works differently between the different versions...

split sentinel
#

Hey, i've build UE5 from source and it seems to work fine so far, but when i try to package the game (it's just the third person template for testing) i get this message in the output log. At the end it says "The system cannot find the specified path".
It still says the packaging was successful, but i should note that when i start the game i get an error message popup (second picture). Can anybody help me with this one?

spare wharf
#

Hello Slacker Friends,

I am trying to seamless travel my player pawn with new avatar 'but level change does not remember my avatar', any solution offer?

Thanks

M

elfin thistle
spare wharf
elfin thistle
swift pulsar
#

Hello, I have a general issue with player character possessing other pawn, i.e. a flying vehicle in a multiplayer setup (4.27). Specifically, moving the vehicle pawn with unpossessed player character attached to it is causing me a lot of pain - as if the attached player character somehow blocked that movement. Are you aware of any such issues?

#

Currently, I'm simply trying to AddLocalOffset to vehicle pawn (via multicast event).

fathom aspen
#

You probably need to save the character class there and then in one of the functions that I can't remeber it's name now(probably HandleSeamlessPlayer) to spawn that one instead of the regular one using the property from the PlayerState

winged badger
#

HandleStartingNewPlayer or GetDefaultPawnClass

real ridge
#

UE5 Dedicated server Error: Assertion failed: Index != INDEX_NONE

[2022.04.06-16.23.20:644][ 0]LogWindows: Error: Assertion failed: Index != INDEX_NONE [File:D:\UnrealEngine-release\Engine\Source\Runtime\Engine\Public\Animation\AttributeTypes.h] [Line: 117]
[2022.04.06-16.23.20:645][ 0]LogWindows: Error: Missing operator for attribute, type IntegerAnimationAttribute was not registered previously ------ Guys I have this problem can someone help me ? project is in C++

swift pulsar
elfin thistle
pallid mesa
#

this gets called on seamless travel

#

so u can pass in the data from one ps to the new one

neon thistle
#

How can I leave a session? opening a level does for all clients and destroy session doesnt work?

keen shadow
#

what should i use, mirror or photon?

real ridge
#

someone can help me with problem up ?

real ridge
fathom aspen
#

You are not posting the whole call stack. What you see here is engine code. Post the whole call stack so we get a better idea of what's happening

fathom aspen
#

The crash log that you normally get when that happens

jovial dawn
#

hello guys

#

I receive a warning in my server log, repetitive one, LogSubsurfaceProfile: Warning: Dipole model has already been upgraded to Burley. Should not reach here

#

it flood the console with this warning

#

I don't know what it mean dho

#

the first one is for the simple and 4W at the same time

#

simple and 4W separated are two different feature, if you want both chose the first one

#

the third is for 4 weels drive I thing ans second 2 weels

#

In Unreal Editor when I tried to join a game in local network I got this message and make crash unreal, If I compile the client it does't crash.. here the popup

#

any idea it's append in the editor and not in the client executable

tranquil bone
#

i have a question; if i make a game that uses a basic multiplayer system where i connect via IP address but i want to change it to where it uses dedicated servers, how hard is that to do?

real ridge
dark edge
tranquil bone
dark edge
#

That's how I test prototypes, I just have my laptop fire up the project as a server and connect from my desktop or have my buddy connect from across the country.

dark edge
#

Pro tip, you do not have to build a dedicated server every time you want to test it, you can just launch the project as a server from some machine that has a compiled engine

tranquil bone
dark edge
#

Probably but that would be a hell of a lot more work than just slapping steam on it.

tranquil bone
#

mk

#

well thank you for your help, i'm a huge noob when it comes to multiplayer so i've been trying to find the best approach

light iron
#

Adriel are you familiar with EelDev's Steamcore and AWS stuff?

dark edge
quartz iris
#

whats up with my character's arm/hand?

vital zodiac
#

Less of a multiplayer question but building the client/server. Is there any way to build Server & Client back to back so I don't need to do one, then the other?

obsidian gyro
#

when I play as standalone or server, I have a post process volume, but the clients dont.

#

Im not sure whats causing it or how to fix it

dark edge
sick frigate
#

My components replicate their transform fine in the component hierarchy, but components I add in the constructor don't. Something I should have known but did not. Can anyone share a tip on how to fix?

I know I can add them on the server only and they will rep down, but is there any way to link other than that?

obsidian gyro
mental pine
#

I created a blueprint weapon blueprint to equip the weapon when I run on 2 clients only first client equiping the weapon the other client dont how can I fix that?

dense egret
#

What the most effective way to debug why a function is being called twice on the server?

I have a player stat component, which includes things like hunger, thirst etc.
My UpdateSustenance (Hunger) function checks for Authority and if it's not the server, it calls the server function, which then calls the UpdateSustenance function with Authority Role. A pretty common practice as I understand.
However, the function is called twice for some reason and I can't figure out why.

Appreciate the help.


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

    DOREPLIFETIME_CONDITION(UAnomalyCharacterStatComponent, Sustenance, COND_OwnerOnly);
}

void UCharacterStatComponent::UpdateSustenance(float Value)
{
    if (GetOwnerRole() < ROLE_Authority)
    {
        ServerUpdateSustenance(Value);
    }
    else
    {
  
        Sustenance += Value;
        OnUpdateSustenance.Broadcast(Sustenance);
        // Here are the contents of the log. As you can see it's being called twice from ENetRole == 3, which is ROLE_Authority afaik: 
        // 3: Hydration 90.000000
        // 3: Hydration 80.000000
        UE_LOG(LogTemp, Log, TEXT("%i: Sustenance %f"), GetOwnerRole(), Sustenance); 
    }
}


bool UCharacterStatComponent::ServerUpdateSustenance_Validate(float Value)
{
    return true;
}

void UACharacterStatComponent::ServerUpdateSustenance_Implementation(float Value)
{
    if (GetOwnerRole() == ROLE_Authority)
    {
        UpdateSustenance(Value);
    }
}
regal solar
#

hi guys,
I had an issue when I deploying game to aws gamelift, this is error showed.
How can I fix this problem?

Error! Cannot create the fleet. Reason: Current limit of fleets of 0 have been reached..
Use case description: An error occurred (LimitExceededException) when calling the CreateFleet operation (reached max retries: 2): Current limit of fleets of 0 have been reached.

fathom aspen
dense egret
#

Is it because I declared a multi cast?
DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FOnUpdateSustenance, float, Sustenance);

fathom aspen
fathom aspen
fallow shadow
#

Alright so

#

my original question was

#

hm nvm

#

i will be back later

fallow shadow
#

can you like write any code for multiplayer or?

#

and by multiplayer i mean for the dedicated server

fathom aspen
blazing spruce
#

Hi, where should i store a HasLoaded variable to know when a player has loaded the map and is ready to start the game? i need to wait for all players to be loaded in before the game can actually start and spawn the characters

fathom aspen
#

You can do that by overriding HandleStartingNewPlayer

sinful marlin
#

If I have an pawn with role_authority on the dedicated server, and it belongs to one of the clients so it has role_autonomous on that client, then role_simulated on a second client, what would GetRemoteRole return when called on server?

fathom aspen
#

Would return Autonomous for the client's possessed pawn, and Simulated for the other client's pawn

fallow shadow
#

Any alternative to FObjectFinder that can be used outside of a constructor

sinful marlin
fathom aspen
sinful marlin
#

How does it return both? It returns a single ENetRole

fathom aspen
sinful marlin
#

But if I'm running it on the server, it's not running on the clients.

fathom aspen
fathom aspen
stark tree
#

Hi, I'm running a dedicated server on my PC. How can I find its IP so that on my other PC i can type open ip address and connect my client?
(I tried the IP from googling whats my IP but it didnt work)

dense egret
sinful marlin
fathom aspen
#

The server that one client machine talks to, is the same server another client talks to on his machine

dense egret
# stark tree Hi, I'm running a dedicated server on my PC. How can I find its IP so that on my...

You can run ipconfig in cmd.exe on your dedicated machine, then scroll up to the first few rows. Should say Ethernet adapter Ethernet: or something.
In that section, search for IPv4 address. That's the local IP address of your PC.

https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/ipconfig

sinful marlin
stark tree
fathom aspen
dense egret
sinful marlin
#

?? No, where are you getting a second pawn instance from? Server spawns a single pawn, pawn is replicated to Client A (who's controller possesses the pawn) and Client B (not possessing). Pawn on the server as Authority. That Pawn on Client A is AutonomousProxy. That Pawn on Client B is SimulatedProxy. The initial question being what would GetRemoteRole() return when called from the server.

dense egret
# stark tree Thank you. However I am trying to connect over two different wifi networks so I ...
stark tree
stark tree
fathom aspen
#

You still hasn't told me what function calls UpdateSustence, so we will keep guessing

dense egret
sinful marlin
#

And as far as I can tell, calling GetRemoteRole() from server will return SimulatedProxy even if one (and in my test case, the only one) of the remotes is autonomous. Which doesn't sound exactly right to me because I thought it would be reversed. I.e. if client says LocalRole == Autonomous && RemoteRole == Authority, then server should say LocalRole == Authority && RemoteRole == Autonomous

stark tree
#

I have forwarded 7777

dense egret
stark tree
fathom aspen
#

If that's really the case then that explains the behavior

dense egret
#

I see. So is my logging then just misleading me and it's actually called once on the server, and once on the client?
I thought the following code would safeguard it from getting called on the client

void UCharacterStatComponent::UpdateSustenance(float Value)
{
    if (GetOwnerRole() < ROLE_Authority)
    {
        ServerUpdateSustenance(Value);
        UE_LOG(LogTemp, Log, TEXT("Runs on Client"));
    }
    else
    {
        Sustenance += Value;
        OnUpdateSustenance.Broadcast(Sustenance);
        UE_LOG(LogTemp, Log, TEXT("Runs on Server"));
        UE_LOG(LogTemp, Log, TEXT("%i: Sustenance %f"), GetOwnerRole(), Sustenance);
    }
}

#
// Here are the contents of the log. As you can see it's being called twice from ENetRole == 3, which is ROLE_Authority afaik: 
// 3: Hydration 90.000000
// 3: Hydration 80.000000

When I jump the above get's logged.

fathom aspen
sinful marlin
#

The issue now is that GetRemoteRole() is returning SimulatedProxy even though there is an AutonomousProxy

sinful marlin
fathom aspen
#

Well you just said only one, and anyways if you still don't understand what I said, there is a video that probably explains it better:

#

Support the channel through donations. Crypto accepted!
PayPal: https://paypal.me/reidschannel?locale.x=en_US
Patreon: https://www.patreon.com/reidschannel
Bitcoin: 1JFwWHr4X6uAeoZadukzqKjzFBj3Qjy7Sk
Ethereum: 0x2B2Bc108F1Cc0fF899959dEF3226637787d8C3dE
Dogecoin: DNQ33YnhpWoTBokBNVkZP5ub8KTLkpyjpv

Join our community discord!
Discord: https://dis...

▶ Play video
#

14:36

fathom aspen
sinful marlin
fallow shadow
sinful marlin
modern cipher
#

and on client it returns Authority so what is the issue?

sinful marlin
#

That one of the clients is an AutonomousProxy

#

I was hoping for a way to detect server-side if there was an autonomousproxy or not

modern cipher
#

i think only clients supposed to simulate actor updates because the server will always have authority

fathom aspen
finite goblet
#

If I just enable the replication graph plugin without doing anything else then the server and clients are no longer able to connect to each other. Its this normal?

dusky yoke
#

Hey guys, has anyone tried to implement steam API with AdvancedSessions in UE5? Were there any disruptions compared to UE4 implementation? Wondering if migrating to v5 will work out of the box or not, Nanite and Lumen are OP

dense egret
dense egret
real ridge
#

Guys did someone here dedicated server in ue5? I can't do it in ue4 it was easy and no errors now I get error of third person character or server error with libraries I don't understand.... if someone here made server , please DM me

real ridge
#
lost inlet
#

It looks like an incomplete log

real ridge
#

I have same problem

#

😄

lost inlet
#

Those DLLs not loading is fairly typical and does not crash the game if they fail to load

real ridge
#

this is in mp because its dedicated server for multiplayer game

lost inlet
#

Ok then attach a debugger

#

Or open the crash dump

real ridge
lost inlet
#

That is literally not a crash dump

real ridge
#

yes it is from saved->crashes and log

lost inlet
#

It’s a screenshot of the first few lines of a log file and it does not show a fatal error

#

Open the dump file

real ridge
#

but there is no fatal erorr

#

D

#

only this fail

real ridge
lost inlet
#

That’s the least useful red line I’ve ever seen

#

Also that’s a log file, and that doesn’t contain the callstack anyway

#

The dump is below it, the file with the file name ending .dmp

real ridge
#

I feel unnecessary

#

o opened dump and press debug with native only it found some

#

eror

lost inlet
#

Go down the callstack until you find something more useful then

winged badger
ember dagger
#

Im having an issue with my character movement component. On setting bIgnoreClientMovementErrorChecksAndCorrection and bServerAcceptClientAuthoritativePosition both to true it doesnt save when restarting the engine and reverts back to the default. This is very necessary for my project as it has very fast and snappy movement so i need my clients to handle their own movement without corrections but its annoying having to reset the tic boxes to true every single time i open the editor. Im also unsure whether it will package my game with those as true or not. Any help would be great

mystic zinc
#

Hey guys anyone have a pretty good understanding of BP variable communication? Im working on a long term project and am trying to plan out the best route to building an inventory system that scales well. Iv worked on a few prototypes, but not sure what the best approach is. I want to try and minimize client server calls wherever possible as the system will eventually need to handle potentially hundreds of players simultaneously pulling and depositing into a global inventory, as well as world loot etc. If anyone could spare a few minutes to talk that would be awesome.

winged badger
#

blueprints can't handle hundreds of players

mystic zinc
#

Well eventually it will be rewritten, but i need proof of concept first

winged badger
#

you have literally zero tools to optimize the network there

short arrow
# mystic zinc Hey guys anyone have a pretty good understanding of BP variable communication? I...

Not really an easy question to answer, but I would highly recommend maybe purchasing the Survival Game Kit V2 which is cheap (60$) and utilizes a global inventory, it also uses inventory cells and containers... It's about as advanced as an inventory system can get. I would highly recommend that as a starting point if you are serious about learning and wanting an efficient thought out inventory

winged badger
#

as for inventory communication - its not really that complex

#

your server needs to replicate the inventory to players

#

and players can pick up, drop, or use up items - which is an RPC every time

mystic zinc
#

Its more about from an approach perspective, is it better to have variables stored on Object classes that serve as hand offs, is it better to primarily run the functions through the player controller, is it better to have dedicated spawnable actor classes that contain their own function. Im fairly new to the hierarchy of UE so thats where i want to make sure im taking the right aproach

winged badger
#

generally, a UObject for inventory item that is basically just data is an overkill

#

once the players put an item into their quickslot, sure

#

UObject is fine

#

but while its just, say, sitting in some chest, UObject is way too heavy for what you need

mystic zinc
#

Thats what i was thinking too. Because realistically i just need the interactable to hold a variable, then the player call the object and retrieve it, send its own command to remove said amount. Its just kind of strange how the casting system works i feel like its not the most efficient way

winged badger
#

this is where the structs come in - and use of c++

#

since they are generally unmanageable from blueprints

#

furthermore, c++ has a FFastArraySerializer, which is generally more efficient then TArrays for this kind of replication - mainly because it is capable of per item client side callback after add, change, or remove

mystic zinc
#

The issue i had with structs, is they need to be constantly broken out of their container then set, so if they are not at the top of the hierarchy you need some sort of server call to actually get their updated state, and that means now 100+ people constantly calling up to a struct every time they try to transfer data

winged badger
#

you can't send a full UObject from client to server at all

#

and even when you do it server to client - you have an extra few worries - first both the reference to UObject and UObject itself need to replicate before they are in any way usable, and second, to replicate UObjects you need c++

#

if you had, say a chest, which is a generic enough example

mystic zinc
#

Zlo do you mind if i add you and maybe hit you with a few dms? Im not in a rush at all like i said its a long term project i want to make sure i do it right. And yes i will absolutely move towards c++ once alot of things are mapped out

winged badger
#

and in it you had 50 different items

#

then using fastarrays, each item would have its fastarrayitem struct

#

which would basically contain FItemData struct (your generic data for items) and few other things specific to that container

#

like what slot they are in, inside that chest

#

then a client picking up the item 7 from that chest would just need to call

#
UFUNCTION(Server, Reliable) void ServerPickupItem(UInventoryContainer* TargetContainer, int32 ItemSlot);```
#

to make server assign it that particular item

mystic zinc
#

mmm ok so you are saying is rather than just having a key:value its better to just have the item contain a struct. That way once the slot is assigned you dont actually need to iterate over the whole array of each item just the slots.

winged badger
#

by doing ServerPickupItem(ExampleChestPointer, 7);

mystic zinc
#

Thats actually so smart

#

Cause i was doing key lookups and filtering items one by one. But really once the slot contents are set its just a simple lookup and pickupo

winged badger
#

then it can be further simplified

#

if you had FItemData with say 20 different members

#

you could stash those in say, a datatable

#

and instead of having an FItemData in FFastArrayItem structs, you put a FDataTableRowHandle there

#

which is just a pointer to a DataTable + FName

#

then clients can access the datatable on their side and resolve that item locally

mystic zinc
#

How should the hierarchy be approached then just have the items be of class actor?

#

The ones storing the structs

winged badger
#

i would not use Actors for items

#

not on the scope you mentioned above

mystic zinc
#

Forgive me for asking stupid questions but whats the alternative?

winged badger
#

Actors cost

#

and replicated Actors cost more

torpid mantle
#

thx

winged badger
#

you can't afford to choke your server's CPU by having it evaluate 5000 item actors for replication

mystic zinc
#

Yeah thats what i was worried about

winged badger
#

use an example of a health potion here

#

FITemData has following:

#
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly) UStaticMesh* StaticMesh;
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly) FName EquippedSocketNamel
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly) FName QuickbarSocketName;
#

among its data

#

if a character puts it on a quickbar

#

it just spawns a staticmeshcomponent, attaches it to the character skeleton at specified socket and it just stays there

#

when you want to use it, you reattach it to the equippedsocket and let the animation run

mystic zinc
#

Do you have a few mins to hop in a call Zlo? Dont want to take up too much of your time but im learning alot

winged badger
#

ok

plucky prawn
#

GetNetMode is only ENetMode::NM_ListenServer for the host right?

winged badger
#

no

#

it can be Standalone if no net driver is running

#

you'll generally want to do != NM_Client

#

then it doesn't even matter what kind of server it is

plucky prawn
#

sorry i should have clarified, im asking specifically for a listen server setup. like if i want to know if a function if being called on the server host or a client, i only have to check the netmode right? or do i also need to check the authority

winged badger
#

net mode asks the net driver what mode its in

#

authority is different

#

while for most actors authority is server side, its just for most actors

#

any actor spawned on client, if you ask it for net role, it will return authority

#

as client does have authority over its locally spawned actors

#

net mode would still be NM_Client on those

plucky prawn
#

oh i see, thanks for explaining that

glad jasper
#

does anyone have any idea where this could be coming from, or places to at least investigate?

#

[2022.04.18-03.17.01:202][ 0]LogNet: Error: Channel name is defined multiple times: Control
[2022.04.18-03.17.01:203][ 0]LogNet: Error: Channel static index is already in use: Control 0
[2022.04.18-03.17.01:203][ 0]LogNet: Error: Channel name is defined multiple times: Voice
[2022.04.18-03.17.01:203][ 0]LogNet: Error: Channel static index is already in use: Voice 1
[2022.04.18-03.17.01:203][ 0]LogNet: Error: Channel name is defined multiple times: Actor
[2022.04.18-03.17.01:204][ 0]LogNet: Error: Channel name is defined multiple times: Control
[2022.04.18-03.17.01:204][ 0]LogNet: Error: Channel static index is already in use: Control 0
[2022.04.18-03.17.01:204][ 0]LogNet: Error: Channel name is defined multiple times: Voice
[2022.04.18-03.17.01:205][ 0]LogNet: Error: Channel static index is already in use: Voice 1
[2022.04.18-03.17.01:205][ 0]LogNet: Error: Channel name is defined multiple times: Actor

#

this is in the log when running a dedicated server

#

and upon connection the server crashes

#

the game works find in pie with multiple clients

#

i am at a loss

#

the crash looks like this:

#

[2022.04.18-03.17.36:955][856]LogWindows: Error: === Critical error: ===
[2022.04.18-03.17.36:956][856]LogWindows: Error:
[2022.04.18-03.17.36:956][856]LogWindows: Error: Assertion failed: Channels[ChIndex] == nullptr [File:E:\ue5.0\Engine\Source\Runtime\Engine\Private\NetConnection.cpp] [Line: 3750]

[2022.04.18-03.17.36:958][856]LogWindows: Error: [Callstack] 0x00007ff74ad375ef InvokeServer.exe!UNetConnection::CreateChannelByName() [E:\ue5.0\Engine\Source\Runtime\Engine\Private\NetConnection.cpp:3750]
[2022.04.18-03.17.36:958][856]LogWindows: Error: [Callstack] 0x00007ff74ad89554 InvokeServer.exe!UNetDriver::AddClientConnection() [E:\ue5.0\Engine\Source\Runtime\Engine\Private\NetDriver.cpp:5543]
[2022.04.18-03.17.36:959][856]LogWindows: Error: [Callstack] 0x00007ff745cb28e8 InvokeServer.exe!UIpNetDriver::ProcessConnectionlessPacket() [E:\ue5.0\Engine\Plugins\Online\OnlineSubsystemUtils\Source\OnlineSubsystemUtils\Private\IpNetDriver.cpp:1572]
[2022.04.18-03.17.36:959][856]LogWindows: Error: [Callstack] 0x00007ff745cdbdec InvokeServer.exe!UIpNetDriver::TickDispatch() [E:\ue5.0\Engine\Plugins\Online\OnlineSubsystemUtils\Source\OnlineSubsystemUtils\Private\IpNetDriver.cpp:1374]
[2022.04.18-03.17.36:959][856]LogWindows: Error: [Callstack] 0x00007ff74ad9812c InvokeServer.exe!TBaseUObjectMethodDelegateInstance<0,UNetDriver,void __cdecl(float),FDefaultDelegateUserPolicy>::ExecuteIfSafe() [E:\ue5.0\Engine\Source\Runtime\Core\Public\Delegates\DelegateInstancesImpl.h:611]

#

i'm not explictly creating channels on the net driver

#

although it seems like somehow i am implicitly?

#

sorry for the text wall

near bison
#

in an onrep, I can access the playercontroller of each player right on their respective clients right?

twin juniper
#

No

#

PC only exists on server and owning client

#

Not on simulated

#

If you want to loop PCs you do that on server generally

upbeat basin
#

Is it not possible to send UObject variables through RPCs?

granite jolt
#

Hey I have an issue with a Dedicated Server and testing.
I created a basic OpenWorld map and have packaged a dedicated server. All that is fine and it packages ok. Server fires up fine too.
The problem occurs when I try to join the server. My client locks up and crashes.
The error is :
Assertion failed: PIEInstanceID != INDEX_NONE [File:D:\UnrealEngine\5.0\UnrealEngine\Engine\Source\Runtime\Engine\Private\WorldPartition\WorldPartitionLevelStreamingDynamic.cpp] [Line: 395]
Any ideas?

halcyon totem
#

if I pack my server as a deveopment server and try the connect 127.0.0.1 method through my UE4 editor I should be able to connect correct???

granite jolt
#

yes

halcyon totem
#

it was working before but not now hmmmm

granite jolt
#

same. I have a very basic dedicated server setup and although it accepts the connection, the client crashes in UE5

#

whats your issue specifically?

kindred widget
upbeat basin
#

So that means I'm required to create a struct packet if I want to pass some datamodel like information stored as UObject in the client to game server?

#

Since it's not replicated and doesn't entirely exist on game server

#

I was expecting it to be created on the game server as well, like passing a TArray<int32>. But I guess having more/other references inside the UObject would bring some problems

kindred widget
#

Pretty much. As all passing a pointer does is resolve it to a replicated object on the other side. If there's no object it'll always be null, cause all you're passing is a basic integer that points to a memeory location which is resolved into a guid when sent through network and back to a memory location on the other machine, not an actual object.

upbeat basin
#

Got it, thanks

#

Is there any resource (other than source code) to learn more about under the hood network and replication processes? Like how do they work/implemented? Like that GUID resolution information for example

kindred widget
#

Not a clue. Listen to Jambax talk. 😄

granite jolt
#

Has anyone got a dedicated server working with World Partition and testing in PIE?

solar stirrup
#

Hey! Bit of a shot in the dark here, but we're currently optimizing server performance and are using the replication graph. So far, the gains are pretty much visible right off the bat, however, we've hit a bit of a bottleneck under NET_ReplicateActors_ReplicateSingleActor -> Replicate Actor Time.

int64 UActorChannel::ReplicateActor() itself (without taking into account other functions called by it) seems to be taking a lot of time (Self took 7.4ms, 13.8ms total with other functions called). Any idea why that would be?

#

The actor that's bottlenecking is the player's character if it's any help. Other actors don't seem to have that problem at all, since the character takes 87% of the Replicate Actor Time

granite jolt
#

Wouldn't that be because its replicating movement and physics so it should be fairly heavy?

solar stirrup
#

The CMC itself is taking 0.8ms, so it's not that

#
  • it's not part of the 7.4ms, at least the counter doesn't seem to put it in there.
#

dunno if it's the profiler being funky, but it's just an additional cost on its own

stark tree
#

Hi, I'm using a dedicated server to which clients (VR headsets Oculus Quest) connect. But what's happening is Client A can't see Client B, but Client B can see Client A. Both have the same exact client apk. I just added a cube to the VRPlayerPawn and enabled replication.

Any clue why is this happening?

high lotus
#

@stark tree are you spawning them from the server? are they replicated?

sinful marlin
#

Any suggestions for a way to tell (on the server) whether an actor has a autonomous proxy or not? Right now I just have a flag that gets set via rpc from the client if it's an autonomous proxy. I imagine there's a way to tell without relying on a client to rpc back since the server sets up the autonomous proxy.

placid flame
#

How can I set the visibility of a component to true for all my teammates?
Like the nickname to indicate who is part of your team?

I already have the team system and I can get the team with a variable. I tried getting all the actors and comparing that variable to set the visibility just for owner but sometimes is not working

livid sluice
#

Hi guys. I have a requirement for Login/Saving Individual player data/ Inventory management etc. Is there a service that handles these things besides Playfab?

quiet cairn
#

Hi, I'm new to networking in UE4. I'm trying to get the player character from a bp. I know getting controller at index 0 is a no-no. But then how do I get the player character? I'm confused 😦

grave notch
livid sluice
livid sluice
quiet cairn
livid sluice
#

No necessarily, you can get the character directly. If for example you are shooting the gun via line trace. You get the the hit actor from there and cast that into the Player_Character as well. or a better more cleaner approach is to use an Interface.

#

But keep in mind you will need to run the line trace on the sever.

quiet cairn
livid sluice
#

You don't necessarily need to call the player controller every time.

#

But for the future remember if you do need the player controller via the player. Just use Get Controller and cast that to Player Controller.

livid sluice
quiet cairn
dark edge
dusty cedar
#

unreal noob question here 🙂 I'm working in unreal engine 5 on a survival\crafting game and about to start getting the inventory data system setup. To make things easier for storage\saving I plan to store the inventories for containers in a dictionary (index\ struct for the inventory) and then when the players interact with the containers, it uses the index to find the records in the dictionary.

My question is would gamestate be the best location to save this in a mp game or would a (potentially) large dictionary be outside of the scope of what we should be using gamestate for?

#

AKA how much data is to much for storage in the gameState?

#

or should i keep the dictionary on gamemode and then use gamestate for the players to pull the dictionary value from gamemode via a method

dark edge
#

@dusty cedar I'd make it sorta transaction based. Unless you want every client to always know what is inside every inventory

dusty cedar
dark edge
fallen heart
#

Hello. I had a multiplayer related question. I ran into an issue that I will try to simplify down and explain so I can get some insight. The problem I had was with widgets for my blueprinted characters. The widgets were just a simple title for my game with some fade in over time. I constructed them in the bp for my character on event begin play. However when a 2nd client joins after the 1st, the 1st would replay the fade in from the text and would basically be displaying the viewport of the 2nd client. If I added a 3rd client, it would repeat and all clients would see what the 3rd client did.

Logically, shouldn't both widgets be linked to their own character? I fixed the issue (band-aid fix really), by moving the construction of the widget into the playercontroller. Referencing a pic from the network compendium, it seems that the controller exists on both the server and the owning client, which would kind of explain why it seemed to fix my issue. It also means that all pawns/chars broadcast to other pawns? I see a lot of tutorials that link simple stuff like health to pawns. Wouldn't it run into a similar issue where the health of a certain pawn character is duplicated into other pawns? I'm testing all of this from the pie but I also tested it a few times in an earlier packaged build and that was how I noticed the problem once I had more than 1 client connected. Anyone able to explain to me why it didn't work when the construction was on the character but worked when I moved it into the controller?

red salmon
fallen heart
#

@red salmon Yeah I understand that no replication is needed but my widgets on client 2 would overwrite widgets on client 1 if constructed from the pawn. It only worked separately when I had it on the controller. Logically shouldn't both work?

lunar root
#

My Spectator Pawn never calls OnRep_PlayerState, does anyone know why?

fallen heart
#

This is the pic I was talking about. So if you have a widget constructed on the pawn, according to this reference, the client doesn't "own" that widget since it's all clients? Which would explain why it overwrites but I could just be reading this incorrectly.

bitter comet
#

When working with Sessions, there is a function called EndSession in the SessionInterface. Should this be called on both servers and clients, or just servers?

red salmon
fallen heart
#

Hmm I see. I did not have a local run event. Can you show me the bp real quick if possible?

red salmon
#

This is all run under a character

fallen heart
#

Interesting. That's pretty much what I have except it's not in an event and is called on begin play. I have it set up in the controller as of now, but let me see if I can remake it real quick in the pawn again.

red salmon
fallen heart
#

You know...that sounds like it could be the problem lmao.

red salmon
fallen heart
#

What is a good workaround in your opinion? If I don't have any input from the user like yours

red salmon
#

I say the controller option is the best

fallen heart
#

Yeah it makes the most sense to have in the controller and is probably the better practice.
I'm pretty new to unreal, but if i were to do it in pawn and I didn't have any input from the user like yourself to store it in an input event, do you know of a good way to have it called only once per player?

#

I just tested to confirm and yeah, it's definitely the begin play

#

Thanks for the help so far tho. Much appreciated.

fleet crown
#

hello, can someone help me? I am encountering this issue:

Warning: ClientRestart_Implementation failed because NewPawn is null, waiting to finish restarting
#

That's client

dark edge
#

That way only the local players pawn will show the widget on begin play

fallen heart
#

Yeah that was one of the workarounds I ended up figuring out. I didn't know that event begin play triggers for server and all players. I did choose to leave it in the controller for now as it seemed like the best option

quasi tide
#

No reason it wouldn't run. The server and all clients have to create the actor. So Begin Play (and any other applicable things) would run on all machines.

kindred widget
# fallen heart Hello. I had a multiplayer related question. I ran into an issue that I will try...

I know you've fixed this. But I strongly advise never letting Gameplay classes dictate widgets. Allow them to request stuff through the local AHUD class if you really need to. But 90% of UI never needs Gameplay classes to do anything else besides run their own delegates. You should be structuring your UI inside of the local AHUD class. It's a non networked class for the local player that is maintained by the PlayerController. Widgets can bind to framework delegates and handle themselves. If you ever need to change any actor besides AHUD to delete a set of widgets, you're probably structuring things wrong, as UI should just be a simple layer on top of your gameplay stuff. If you keep them separate and keep a clean API for them, you'll have a much easier time iterating on stuff and many less bugs.

sinful marlin
#

I was contemplating just making a subsystem for handling all UI stuff but it sounds like the AHUD class kind of already serves that purpose

chrome bay
#

HUD is the best and easiest place to manage widgets for a player

lost inlet
#

I concur, I'm surprised they don't just have a boilerplate AHUD with most of the widget stuff there

#

since I think everyone ends up implementing something similar

sinful marlin
#

interesting. Glad I stumbled across this before reinventing the wheel

lost inlet
#

you do have to reinvent the wheel in terms of adding the widget spawning/destruct code which everyone else has to do

#

since it doesn't do that itself

sinful marlin
#

well yeah, I was talking about creating a class (specifically subsystem) to act as the central point for handling UI

#

it sounds like I woulda just ended up re-creating the HUD class

kindred widget
#

It's also fantastic because all of your UI is ran through one class. This lets you easily fix memory reference issues if you have a ton of UI that aren't correctly getting collected, as some random gameplay actor isn't referencing it. And you know that anything UI related runs through it so it's not a headache to find what is creating/using UI.

lost inlet
#

would be good plugin fodder at least, though I'd do a free one if anything

chrome bay
#

The nice thing(s) about the HUD class is that it's a) attached to a controller, b) garaunteed to be created a a reasonable time, c) is an actor so it has world references etc and d) is easily accesible

#

Also overrideable by game modes

lost inlet
#

BeginPlay is also called when the gamestate is guaranteed to be valid

chrome bay
#

yeah

#

many niceties

sinful marlin
#

Boy, makes me feel like a fool for avoiding it all this time lol

chrome bay
#

To be fair, it's part of the gameplay framework and in ye olden days before UMG was the only real way to draw UI

#

Back when it was all textures and raw text and whatnot

#

But it's sort of been forgotten about because UMG was quite tedious to work with in CPP originally

sinful marlin
chrome bay
#

It probably could be argued as a legacy thing but it definitely still has a good purpose

kindred widget
#

I particularly find it nice in multiplayer because it really drives the point that UI is local only. Keeps UI stuff out of networking and gameplay classes.

torpid mantle
hollow eagle
#

the built-in http functions are already async

torpid mantle
#

??????

hollow eagle
#

I'm not sure what's confusing about that

torpid mantle
#

well right now i have to make 1 function as the call and another as the resolve of the actual request

#

but if i want another call to come after the first call I need to broadcast an event or do callbacks

hollow eagle
#

IHttpRequest already exposes callbacks for this.

torpid mantle
#

vs.. ```callhttp1(); callhttp2();

#

hmmmm

hollow eagle
#

IHttpRequest::OnProcessRequestComplete + a few other events

torpid mantle
#
void UServerAPIManager::AuthenticateHttpCall()
{
    TSharedRef<IHttpRequest, ESPMode::ThreadSafe> Request = Http->CreateRequest();
    Request->OnProcessRequestComplete().BindUObject(this, &UServerAPIManager::OnAuthenticationResponseReceived);
    //This is the url on which to process the request
    Request->SetURL(ServerURL + "/auth/login");
    Request->SetVerb("POST");
    Request->SetHeader(TEXT("User-Agent"), TEXT("X-UnrealEngine-Agent"));
    Request->SetHeader(TEXT("Content-Type"), TEXT("application/json"));
    
    //Request->SetHeader("Authorization", Authorization.c_str());
    Request->SetHeader(TEXT("Accept"), TEXT("application/json"));
    Request->ProcessRequest();
}

/* Auth Http response */
void UServerAPIManager::OnAuthenticationResponseReceived(FHttpRequestPtr Request, FHttpResponsePtr Response, bool bWasSuccessful)
{
    //Create a pointer to hold the json serialized data
    TSharedPtr<FJsonObject> JsonObject;

    //Create a reader pointer to read the json data
    const TSharedRef<TJsonReader<>> Reader = TJsonReaderFactory<>::Create(Response->GetContentAsString());

    //Deserialize the json data given Reader and the actual object to deserialize
    if (FJsonSerializer::Deserialize(Reader, JsonObject))
    {
        //Get the value of the json object by field name
        Token = JsonObject->GetStringField(TEXT("Token"));

        //Output it to the engine
        UE_LOG(LogTemp, Warning, TEXT("Token: %s"), *Token);

        // Set auth token on game instance
        UMaxGameInstanceSubsystem* MaxGameInstanceSubsystem = Cast<UMaxGameInstanceSubsystem>(UGameplayStatics::GetGameInstance(GetWorld()));
        if(MaxGameInstanceSubsystem)
        {
            MaxGameInstanceSubsystem->bAuthenticated = true;
            OnAuthenticationComplete.Broadcast();
        }
    }
}``` lots of mock code atm so ignore anything super funky
hollow eagle
#

yes, that is the correct way to do things

torpid mantle
#

okay so.. I need to know when thats done so I can say.. go get player data

hollow eagle
#

but you already have something doing that...

torpid mantle
#

is broadcast the best way to do that.. or am i missing something

hollow eagle
#

you already have a function handling when it completes

#

I don't understand the question.

torpid mantle
#

sorry.. I'm used to programming in small functions

#

Authenticate isn't bound to GetPlayerData

#

so I could reuse authenticate where ever

#

or get player data whenever

hollow eagle
#

I don't know what that means. You don't have anything in the above code named "Authenticate" or "GetPlayerData".

#

The above code already runs async, with OnAuthenticationResponseReceived called on the game thread when the request completes.

torpid mantle
#

sure, what im getting at is.. say In my level BP i want to call UServerAPIManagerSubsystem->AuthenticateHttpCall, then call UServerAPIManager->GetPlayerData... right now I think it just calls the second call without waiting on the response for the first correct?

hollow eagle
#

That's correct.

#

Either bind to an event that you call when the request completes, or pass a dynamic delegate into the first function that you call when it completes.

torpid mantle
#

k

#

but either way its.. call, then delegate an event when its done to move on

hollow eagle
#

yes

#

you could write a latent action for this if you want, but that's more effort

torpid mantle
#

yeah not trying to go there

#

I'm deciding if i need like a central hub

#

that knows if i finished auth at the begining of the game, or somewhere in the middle

#

k ill work on this for now

#

tackle my bigger demons later

#

thx

granite jolt
#

I have this error when I try to connect to a Dedicated Server running a based OpenWorld.umap (no modifications).

Assertion failed: PIEInstanceID != INDEX_NONE [File:D:\UnrealEngine\5.0\UnrealEngine\Engine\Source\Runtime\Engine\Private\WorldPartition\WorldPartitionLevelStreamingDynamic.cpp] [Line: 395]

The client crashes but the server doesn’t. On the server I just get this timeout error

[2022.04.18-11.30.29:809][540]LogNet: Warning: UNetConnection::Tick: Connection TIMED OUT. Closing connection.. Elapsed: 60.01, Real: 60.01, Good: 60.01, DriverTime: 84.81, Threshold: 60.00, [UNetConnection] RemoteAddr: 127.0.0.1:62957, Name: IpConnection_2147482508, Driver: GameNetDriver IpNetDriver_2147482537, IsServer: YES, PC: PlayerController_2147482504, Owner: PlayerController_2147482504, UniqueId: INVALID
[2022.04.18-11.30.29:813][540]LogNet: Error: UEngine::BroadcastNetworkFailure: FailureType = ConnectionTimeout, ErrorString = UNetConnection::Tick: Connection TIMED OUT. Closing connection.. Elapsed: 60.01, Real: 60.01, Good: 60.01, DriverTime: 84.81, Threshold: 60.00, [UNetConnection] RemoteAddr: 127.0.0.1:62957, Name: IpConnection_2147482508, Driver: GameNetDriver IpNetDriver_2147482537, IsServer: YES, PC: PlayerController_2147482504, Owner: PlayerController_2147482504, UniqueId: INVALID, Driver = GameNetDriver IpNetDriver_2147482537

Previous to that it accepts the request before the client crashes. This doesn’t happen on a regular map with no World Partition active.

Any help would be greatly appreciated.```
neon thistle
#

I'm, setting some variables in a game instance through a widget, the variable is a structure which conveys many variables in one. I'm conveying two strings, of which only one is replicated, the other when printed comes as empty. both setup the same way but on not replicating, any idea?

sinful tree
neon thistle
#

but you see one of the values is sent over, the other one comes as empty

#

while both variables in that structure are set up the same

sinful tree
#

If you're running as a listen server, then the listen server itself is the server, so they'd be setting the values themselves.

#

Fact remains, nothing replicates from GameInstance.

neon thistle
#

it doesnt matter if it replicates

#

i just want both the values to be set in the gameinstance

neon thistle
sinful tree
#

You want the server to set the value on a client's game instance, yeah?

neon thistle
#

exactly

upbeat basin
#

My UStruct parameter on a Server RPC seem to be just giving me the default value of my struct on the server. Is there additional setup I need to do to pass structs? I'm having this problem on cpp, tried with a simple struct and RPC on blueprints and I can read the custom values on the server.

neon thistle
#

one of them even works

#

the other isn't set

#

it's set through a structure

#

so both should be set

sinful tree
#

Are you running as a listen server or as client?

neon thistle
#

listen server

sinful tree
#

And as I just explained, a listen server is the server, so their value would be set (which is what you're seeing)
You cannot have the server set the value in a client's game instance directly. You'd have to replicate it somewhere else if you want the server to set the value - so you have to use player controller, playerstate, somewhere where you can have the server tell the client to do something... You can do it as an RPC call or as a replicated variable, but once you are running on the client (either VIA an OnRep or an RPC) then you can set the value in the Client's GameInstance.

upbeat basin
#

Sure let me make it a bit more anonymous

#

I'm not using the InstancedStruct btw, kind of chickened out of it

chrome bay
#

Should be just like this:

void MyFunction(const FMyStruct& Struct);
void MyFunction_Implementation(const FMyStruct& Struct)
{
    // Actual code
}```
upbeat basin
#
USTRUCT(BlueprintType)
struct FDataNetPacket
{
  GENERATED_BODY()

  bool MyBool = false;
  FString MyString;
  TSet<FString> MySet;
};

UFUNCTION(Server, Reliable)
virtual void SendPlayerData(const FString& PlayerID, const FDataNetPacket& JoinData);
virtual void SendPlayerData_Implementation(const FString& PlayerID, const FDataNetPacket& JoinData);

I can see on the client side where SendPlayerData is being called my struct have values true, "TestCustomString", TSet<>. But on the debug point inside the SendPlayerData_Implementation struct have the values false, "", TSet<> which I believe are the default values

#

In fact, I had a copy constructor before and it was having the values I was setting in it. I thought I messed up something with that and removed it but I guess it's something else

chrome bay
#

The issue is the properties are not UPROPERTY

#

And TSet/TMap cannot be replicated

upbeat basin
#

Ah, good points

chrome bay
#

Only items marked as UPROPERTY() will be replicated and/or sent via RPC

upbeat basin
#

Got it, thank you

stark tree
#

Using the VRTemplate to create multiplayer using dedicated server. I am able to bring the clients (Quest headsets) together and they can see each other however they cannot move for some reason, and the cubes attached to their hands to check replication are also not being replicated. Any suggestions?

granite jolt
#

Has anyone has issues testing connection to Dedicated Server through PIE? Specifically an error of PIEInstanceID = INDEX_NONE

flat ferry
#

Is it true for multiplayer games to work i would need to make the project in C++ instead of using the blueprint-style?

bitter oriole
flat ferry
#

my plan was to make a game kinda like fallout 4. i installed mods in fallout 4 so i have a m82 sniper rifle to snipe ghouls from distance and i wanna make something like this myself, having a character sniping enemies but being able to have a friend join

past seal
#

How can i wait for all players to load before autostarting the game?

#

I have functionality in Event HandleNewStartingPlayer

#

But i want an event like BeginPlay that triggers when all players have seamlessly travelled

ruby ruin
#

Got a question that might be a bit dumb. But I've been learning multiplayer development for some time, and from what I see, developing a multiplayer game needs you to know everything about replication. Like you can't have someone just working on gameplay systems or AI without being involved in multiplayer code in some way. So if you are developing a multiplayer game, everyone on the developing team needs to know how to develop for multiplayer, right? Or are there exceptions?

past seal
ruby ruin
past seal
#

Yes thats why all the programmers should at least know basic replication and how to replicate the systems they are responsible for 🙂

#

Because if you were to have that one person go through everyones code then that person would have to learn how the other peoples code works first

ruby ruin
#

Good to know, thank you

winged badger
#

some of the team can get by with basic replication knowledge only

#

especially ones making UI, and other local only systems

ruby ruin
winged badger
#

minimap, fog of war for example

#

lots of stuff will just have already replicated objects just register with a manager object, then just run everything locally

#

fog of war as an example

#

actors that can reveal inside fow have an actor component there, it will have a ShouldRevealFOW() function in it

#

that will return true or false based on if the actor is local player, in local player's team or whatnot, depending on the game

#

those components register with fog of war manager that just reveals fow only for the actors with the component that returns true on ShouldReveal

#

for the entire fog of war system that is the only connection to any kind of replication

#

that one function

#

and you can write that function inside of 2 minutes

#

everything else can be done by someone not being familiar with replication at all

ruby ruin
#

@winged badger awesome info, thank you

winged badger
#

also, you can get by with people with limited understanding of replication implementing simpler gameplay logic

#

your entire team doesn't need to know how best to replicate something, just how to replicate something as instructed by a lead

ruby ruin
#

Yeh I think they at least need to know the very basics of replication with the help of someone more experienced

winged badger
#

generally, in team of 20-25 you'll want 2 or more that understand replication really well, plus few more that have at least basic understanding

#

life is much easier when you have a good rubber duck handy

past seal
#

Can i not call "ReadyToStartMatch" in blueprint?

clever needle
#

Does anyone know of this error on the dedicated server? [2022.04.19-12.02.54:101][518]LogNet: Error: UEngine::BroadcastNetworkFailure: FailureType = ConnectionTimeout, ErrorString = UNetConnection::Tick: Connection TIMED OUT. Closing connection.. Elapsed: 59.92, Real: 60.07, Good: 60.07, DriverTime: 64971.96, Threshold: 60.00, [UNetConnection] RemoteAddr: 76561198129275537:57780, Name: SteamNetConnection_2146029285, Driver: GameNetDriver SteamNetDriver_2147472482, IsServer: YES, PC: NULL, Owner: NULL, UniqueId: Steam:[unknown] [0x11000010A12E291], Driver = GameNetDriver SteamNetDriver_2147472482

winged badger
#

you can override it to return true if NumTravellingPlayers == 0

winged badger
past seal
#

yes i overrided it but it says its not marked as BlueprintCallable when i try to drag it into the event graph

winged badger
#

that is because you're not supposed to call it from BP

#

that function doesn't start the match

#

just returns true or false if the match can be started, and is called under the hood, in c++ gamemode

past seal
#

Well it does, doesn't it?

#

but how do i get the boolean if i cant call the function?

ember dagger
#

Can someone help me out here. I have an interact system that spawns an item locally for my first person character. I then need to disable collision for the interactable actor im spawning so i cant keep grabbing it while its in my hand. This all works locally, but over the network my server when spawning an actor spawns it for everyone so i then need to disable collision for everyone. So im calling an on server event to a multicast event with the collision being set to no collision with the target for each of those events being the collider i want to disable. But even though im plugging in what i want to disable into the event when i call it, it is returning an un valid actor and is not setting the collision, even though the actor, locally is valid

clever needle
#

Any solution for this error on the dedicated server?LogNet: Error: UEngine::BroadcastNetworkFailure: FailureType = ConnectionTimeout, ErrorString = UNetConnection::Tick: Connection TIMED OUT. Closing connection

willow prism
#

hello, I have a silly question, I want to replicate a variable in c++ with OnRep for this I declare my variable in the following way

UPROPERTY(ReplicatedUsing = OnRep_IsGameOver, EditAnywhere, BlueprintReadWrite) bool IsGameOver;

Following this I declare my function that should be called when the variable is successfully replicated

UFUNCTION() void OnRep_IsGameOver();

but when compiling it gives me an error

Error LNK2001 external token "public: virtual void __cdecl ACCharacterBase::GetLifetimeReplicatedProps(class TArray<class FLifetimeProperty,class TSizedDefaultAllocator<32> > &)const " (?GetLifetimeReplicatedProps@ACharacterBase@@UEBAXAEAV?$TArray@VFLifetimeProperty@@V?$TSizedDefaultAllocator @$0CA@@@@@@Z) unresolved D:\Game\Intermediate\ProjectFiles\CharacterBase.gen.cpp.obj 1

I do not know what I'm doing wrong

finite goblet
#

Where does server world records what placed object was destroyed ?

#

which it'd use to tell newly joining clients to destroy the object on their end coz it no longer exists on server even though it was placed on the map initially at design time

low helm
#

I don’t think it does

#

Just write it yourself

#

Give an id number to every object, then server can report missing ids on client login

#

This approach is probably not advisable if the object count gets large

#

But it will work for a few hundred without much issue I think

marble rune
#

How do I fix error: Steam SDK not located! Expected to be found in Engine/Source/ThirdParty/Steamworks/{SteamVersion}?

bitter oriole
marble rune
bitter oriole
#

Needed anything the engine doesn't do already?

high lotus
#

@marble rune did you download the steam SDK and put it in your project folder?

#

that'd be from valve's dev site

bitter oriole
#

I don't think there's any need for that

kindred widget
#

Hmm. I'm having a problem with replicating UObjects. The basics are that I have inventory items as UObjects. These are replicated as an array of pointers in the component. This all works fine. But I have a function on them which gets their outer and casts to the inventory component to get their owning inventory component. This seems to work fine at first replication. But after moving an object to another inventory, it still shows the old outer on the client as the previous component.

#

I presume that I'm basically stuck replicating an extra owner pointer, that I'll have to use to set the outer on clients?

kindred widget
signal lance
#

You'll either need to simulate them locally from the last known input so the correction is as minimal as possible or have a small buffers of updates to interpolate between

dark edge
#

What are the implications with world partitioning and runtime or replicated actors?

#

Does partitioning have any input at all in that system or is it just the classic Relevency approach?

prisma prawn
#

Anyone know how to make second player another model? I'm trying to make 1v 1 player with gun vs player who is zombie

dark edge
solar stirrup
#

Haven't checked if it's also a thing in the default replication path

finite goblet
low helm
#

it doesn't

solar stirrup
#

I'd be surprised if it didn't

#

If it doesn't, in theory the client's actor should at least be marked as torn off
void ULevel::CreateReplicatedDestructionInfo(AActor* const Actor)
void UNetDriver::InitDestroyedStartupActors()
EDIT: It's handled ^

meager fable
#

is there a way to ensure that a WorldSubsystem exists only on the server or do I have to HasAuthority everything?

marble gazelle
#

sure, just implement the ShouldCreate or what is named method

upbeat basin
#

Is there any difference between sending an integer or an asset with an RPC?

marble gazelle
#

of course, the size

upbeat basin
#

I mean, of course there would be a difference but, is it an overhead to send assets over RPCs?

upbeat basin
#

Like, I have a datatable of assets. I want to reduce the load on client as much as possible so I want to do the datatable ID check on server and send the asset directly to the client to play (sound cue)

marble gazelle
#

ehm

#

you should reduce the load on the server as much as possible

upbeat basin
#

But if just this minor ooptimization is going to cause an overload on network usage, I gues I can omit that

marble gazelle
#

server capacity is expensive, simple decisions on clientside are less costly

upbeat basin
#

Hmm

#

I agree on that as well

#

But wanted to do this since the client should be mobile phones

#

So should I continue sending the ID only with RPC and letting the client do the lookup on datatable?

marble gazelle
#

but still, a simple map lookup might be less costly. of course you need to ensure you don't load too much into your ram, so depending on the data table size you either need to split it per level or yeah, you might need to send the asset via an RPC hmmm you should run some profiling on this^^

upbeat basin
#

I see, thanks

#

Without thinking about server/client optimization, how does an asset being sent over network? Shouldn't it be some kind of identifier only? How much size would it differ from sending an int or int64?

marble gazelle
#

Hm I'm not sure, I think initially it could be the path, so string, and then later as GUID after being acknowledged?

still condor
#

what am I doing wrong here? I have an actor I want to call server RPCs on, so I set the player controller to the owner on the server (via the constructor params), but when I call the server RPC on the client it's local role is still set to ROLE_SimulatedProxy and the RPC fails due to no owning connection.

marble gazelle
#

"Via the constructor params", please send some code.

still condor
#
// in player state beginplay, behind HasAuthority() check.
FActorSpawnParameters Params;
Params.Owner = GetOwner();
AAchievementTracker= GetWorld() ? GetWorld()->SpawnActor<AAchievementTracker>(Params) : nullptr;
marble gazelle
#

this is not what the "owner" ist

#

I think

still condor
#

the owner of the player state is the player controller, no?

#

oh, you mean not a network owner?

marble gazelle
#

yeah, would be my guess

#

I think you need to register it with the player controller or smth like this? never did it, lets ask the docs^^

#

"The Actor that spawned this Actor. (Can be left as NULL)."

#

So it's basically just for context, but not for network

dark edge
upbeat basin
#

I'm not sure, what's the difference? I wanted to send a sound cue

dark edge
#

You're not sending the cue, you're just sending a ref. It's negligible (32 bits either way I think)

upbeat basin
#

Can you give an example on sending the cue/asset as well for me to make it more tangible?

solar stirrup
#

See void ULevel::CreateReplicatedDestructionInfo(AActor* const Actor), void UNetDriver::InitDestroyedStartupActors()

dark edge
upbeat basin
#

I meant more about non ref ones, I don't get the difference between them

dark edge
#

Show a non ref sound parameter in an event.

marsh shadow
#

how do i set the name when a player joins a server without a session,currently trying to connect to the dedicated server only sets my name based on my pc's name

vagrant grail
#

I just switched my project to UE5 and everything related to Advanced Steam Session Plugin is broken, how do I fix it please ?

#

Please ping me if any answer

nova wasp
#

like NetCore

regal solar
#

I'm creating multiplayer game on gamelift, and max player count on one game session is 200. Is there any trick to increase that number?
or can client only receive data from nearest ~50 player based on player location their location?

bitter oriole
high ibex
#

hi, i was following chunk downloader 2 hour live training video and able to download from IIS manager but with amazon s3 link, i couldn't download or nothing is happening ? please say if anyone knows how to fix this

granite jolt
#

Has anyone been able to connect to a Dedicated Server running a World Partition map from PIE? I'm getting a PIEInstanceID=INDEX_NONE error that is crashing the client. It would be problematic to have to package the game everytime I want to test a change

upbeat basin
#

Can I declare OnRep functions on child classes for replicated member variables reside in parent class without ReplicatedUsing specifier?

marble gazelle
upbeat basin
#

Any luck for engine classes with vanilla engine?

marble gazelle
marble gazelle
upbeat basin
#

Wait I also didn't get what you mean

#

I want to declare a OnRep function for APlayerState::PawnPrivate for example

granite jolt
#

@marble gazelle Im not sure as I never set anything for that. I'll check it out tho thanks

upbeat basin
#

Which doesn't exist as to my knowledge

granite jolt
#

I just disabled the run under one process setting and it still does it

marble gazelle
upbeat basin
#

I see thanks

granite jolt
#

I get this error. It's hard to find any info about it too. I can connect to a normal level, or if I package my game, but can't connect through PIE at all

marble gazelle
#

well you entered the field of rare bugs, what t do now? 😄
Well, attach a debugger, check where the value is set and figure out why it has the wrong value.

tidal lichen
#

hello, any ideas what could be wrong when BeginPlay for Character is not called on Client, when using Replication graph? (Actor is spawned and visible)

chrome bay
#

gamestate not replicating?

granite jolt
#

@marble gazelle looks like for now I will just use a test map without world partition, but it does connect with a packaged game so I will just substitute the map later. Sucks though. My OCD wants to fix it before I move on but it is what it is and I need to move on regardless.

vagrant grail
bitter oriole
vagrant grail
bitter oriole
#

Wherever the plugin is distributed

vagrant grail
kindred widget
#

Still sort of wondering about reparenting UObjects to a new outer on clients. I managed this by replicating a pointer to the server set outer on them and renaming it in the onrep. Is this really the only way to handle this?

chrome bay
#

Yes

#

Would be better to just not change the outer though IMO

#

too many unknowns

kindred widget
#

I mean, I could instantiate new ones for the new outer and transfer data. But that feels kinda bad. I'll keep that in mind though.

#

I'm using the outer as a way to reference the object's owner. Feels messy just keeping a pointer to the owner and not changing the outer.

bitter oriole
#

(by the way there is)

high ibex
#

hi, is there any system that player can send feedback back to developers ? in aws or any others

ashen stone
#

Does anyone know if fortnite uses CMC?

vagrant grail
bitter oriole
ashen stone
#

is CMC as bad as everything say? is it that slow?

vagrant grail
bitter oriole
#

Seriously?

vagrant grail
#

yes

#

because I have only the website

woeful ferry
ashen stone
#

Yes

woeful ferry
#

We use it for our multiplayer survival co-op game. We haven’t found it slow.

#

What it doesn’t do though is good smoothing, so you might get rubberbanding

#

If you don’t write your own smoothing

ashen stone
#

Do you wrote it? what functions do you changed?

prisma snow
#

I don't think it's "slow" but if you want to have lots of characters (hundreds/thousands) running around at once, it won't be performant. It has its uses and context

ashen stone
#

Not thousands but maybe a hundred

#

for PC

prisma snow
# ashen stone Not thousands but maybe a hundred

One hundred in PC is more or less fine in my experience, but test with target hardware. What can be problematic in that case is multiplayer, CMC is not designed for such numbers across the net

ashen stone
#

It is multiplayer

#

Not possible to do a fortnite using CMC?

prisma snow
#

Depends if players are separated (like Fortnite, where you interact with few players at a time) or for example an RTS where all units can be on the screen at once.

ashen stone
#

separated

#

I`m using replication graph and game is topdown

prisma snow
ashen stone
#

Ty

solar stirrup
#

CMC isn't cheap but it's still fine at 100 players

bitter oriole
#

"fine"

ashen stone
#

If the features are needed them doing better is not easy i think

tropic falcon
#

Anyone else noticed the new vehicle template is broken in UE5 playing as client and found a solution maybe? Around 85km/h the engine stalls and you won't go to gear 3. Everything works fine if you play in standalone

blazing spruce
#

Hi, if i create a loading screen widget in the pre lobby level's player controller, how do i tear it down when the map has loaded since all the GM/PC ect have all changed to new ones? i cant seem to remove it

round haven
#

Hey,

I'm doing a seamless travel and copying player's properties using the playerstate and the CopyProperties Event.

Now I'm wondering, what's the best event to use to spawn the pawn AFTER CopyProperties happend, so that it is guaranteed that the properties are the ones that have been copied from the previous level?

#

should the PlayerState call a custom event on the GameMode and therefore notify that it should now spawn the Pawn? Or does the GameMode already have an Event when the PlayerState has been copied?

ripe moth
#

also this applies for both UE5.0 and 5.0.1

lost inlet
ripe moth
#

ok, off to download that now then 😂

bitter oriole
#

More like compile it

ripe moth
#

download then compile it 🙂

bitter oriole
#

The compiling is gonna be a lot longer than the downloading 😛

lost inlet
#

not if you do a source build correctly

#

then it's kinda marginal

bitter oriole
#

Even in the correct way it's easily two hours though

#

Hardware depending ofc

ripe moth
#

understood, I guess i should go read on some source building for UE5 then 😂

#

the clone is certainly taking a long while, but it's not as bad as downloading the entire thing via the epic launcher

sonic rampart
#

Hi, nice to speak to everyone, i'm new to Discord.

#

Can someone tell me how to play on the DE GER servers. Lot of good maps there but everytime I try to play on one, they require a password.

lost inlet
#

if you do it properly, ie. project side-by-side, building the game project only not solution/"UE4"

bitter oriole
lost inlet
#

my old i7 was still around 25 mins

bitter oriole
#

Last UE5 build I did was 2h on an i7

pallid mesa
#

same

#

only dev editor target tho

#

unless somehow further setup is required in VS, got stuck for an hour building

willow prism
#

Hello, I have a question. I have a project that uses a dedicated server, currently all the basics of the project work very well, but I have a pawn that has a camera which the player can own and move, this pawn is not seen by the other players, so I am not replicating it , but I only get it to move when the player is a server, the clients do not move no matter how hard I try to move it. Does anyone know what I can do to make this work.

#

This pawn Cam

#

this player input

low helm
#

I don’t know the solution to this problem but I know what the problem is. The server always wants to handle pawn possession in multiplayer games

#

So the server can’t tolerate the players having their own unreplicated pawn

#

There might be a solution for this in the player camera manager class for the client to automatically manage their location

dark edge
#

Or just have the pawn not have anything replicated

low helm
#

That still doesn’t work because you can’t possess anything on a client

#

Unless I misunderstand

willow prism
#

ok, thanks for the answers, having problems with owning a pawn what if instead of owning I just change the player's camera view with set view target with blend?

low helm
#

This would cause problems with the servers understanding of the players camera location, specifically in regards to net relevance and cull distances

#

I’m pretty sure the solution for this is found in creating your own custom playercameramanager And turning on the client driven position updates

pallid mesa
#

you can always attach the possessed pawn to keep relevancy somewhat close to the cam origin

#

🩹

willow prism
regal mica
#

Hey guys, I'm having replication issues on a topdown click to move type game, if anyone with some experience has some spare time to look at it I made a post over at https://forums.unrealengine.com/t/issues-with-aicontroller-based-topdown-character-and-replication/535061 explaining the problem in detail, any help appreciated 🙂

willow prism
#

I managed to make my pawn move!!, it works if I move it with addactorlocaloffset before I was moving it with addmovementInput

dark edge
dark edge
willow prism
regal mica
dark edge
dark edge
#

Anyway, if you're not possessing the pawn, what should be going from Client -> Server is basically orders ("I want Pawn X to try to move to position Y", or "Tell Pawn X to begin casting Fireball at Pawn Y")

#

That'd be routed through your PlayerController

regal mica
willow prism
# dark edge Whether or not a clientside AddMovementInput will do anything is up to the speci...

Well, what I wanted to do is be able to move a pawn that has a camera, but I don't own it, I just change the player's view to it, and then from the player I send the input to an event that moves the pawn, since this movement only sees the player locally, I don't want to replicate this pawn. locally it works correctly and it also works for the server, but the client cannot move the pawn even though I see that the client executes the event and sends the input to the pawn.

dark edge
#

You aren't the owning client. The server is

#

You can only call Run On Server events on things you own

regal mica
dark edge
#

So either move that RPC to your PlayerController or somehow get ownership of the pawn. I'm not sure if ownership of a pawn can be seperate from possession, that's worth testing.
That is, I don't know if you can own a pawn but not possess it.
@regal mica

willow prism
#

Thanks for comments 😊

regal mica
dark edge
regal mica
dark edge
#

If AI isn't a big deal then just use the regular possession and click to move like in the template project

#

Or you can just put the RPC in your playercontroller like
ServerCastSpell -> get MyDude -> MulticastCastSpell

regal mica
#

Basically the characters are possessed by a server based AIController and go where the client based click to move location is indicated. This eliminates any stutterings if there's lag in the game

dark edge
#

You can use click to move without AI controller btw, look at the template.

#

CharacterMovementComponent is fully capable of navmesh movement

regal mica
#

I know, but I experienced stutters because I need to have low Ground Friction and Brake distance on the characters