#multiplayer

1 messages · Page 27 of 1

fathom aspen
#

Right

terse prawn
#

confusion. Mine returns remote regardless

fathom aspen
#

Confusion. I have no idea without seeing code and proofs

terse prawn
#

nvm. I'm dumb. Dedicated server means they're all clients when running it. Sorry for wasting your time

fathom aspen
#

No worries, you're welcome™️

uneven kraken
#

I'm fairly new to Unreal and multiplayer in Unreal. Through some experimentation, I've discovered that PlayerStates are replicated after login rather than at/before login like PlayerControllers.

I'm wondering what the reasoning is behind this, and if there's a way to force a client's own PlayerState to be sent to it at login?

#

Or does this have to do with the Net Load on Client option?

uneven kraken
# uneven kraken I'm fairly new to Unreal and multiplayer in Unreal. Through some experimentation...

Found an answer to this one, in the engine code PlayerState.cpp L24 there's this comment:

    // Note: this is very important to set to false. Though all replication infos are spawned at run time, during seamless travel
    // they are held on to and brought over into the new world. In ULevel::InitializeActors, these PlayerStates may be treated as map/startup actors
    // and given static NetGUIDs. This also causes their deletions to be recorded and sent to new clients, which if unlucky due to name conflicts,
    // may end up deleting the new PlayerStates they had just spaned.
warped hawk
#

Hi, I created a custom dedicated server which works fine on desktop. Next, I wanted clients to connect from their android mobiles and iPhones too, is there a way to achieve this?

real ridge
#

Guys does anyone use Eos overlay for invitations to game?

#

i want use it

twin juniper
#

Hello all. I am trying to replicate a mapvariable type, but dont work, y read somewhere that if you put your map inside a struct you can repicate the struct. I did but it seems that the map is still not reeplicated. I aded a control variable inside the struct, and that one is replicated inside the struct, but no the map. Any suggestions? there is a posibility to do it or a workaround to fix the problem?, i am working in 4.27.2, Thanks in advance.

vivid lichen
#

Hey guys I followed unreal documentation for enabling steam in my game, it works fine when packing the project in development config or package config, but when i package in shipping config steam doesnt work. Any ideas?

twin juniper
#

Hey guys. Does anyone have a definitive answer for when properties are guaranteed to be assigned on the client if I replicate them using COND_InitialOnly. Are there any guarantees they are assigned before BeginPlay or is there some other method I can override to run initialisation based on initial props?

#

Oh and also at what point does the server compute the 'Initial' value to send to the client? IS this after begin play?

grand kestrel
fathom aspen
twin juniper
#

@grand kestrelThanks a lot, thats i did

uncut schooner
#

Hi

sterile pasture
#

I managed to create a session and join with another computer via IPv4 address of the host with (open 192.168.147.x) command, however that only works inside a local network (or when using hamachi) I wonder if you can use a more specific IP address to connect to a session that is not inside if a local session !?

twilit radish
#

You can yes, but that requires the other person to port forward (or indeed use something like hamachi). Considering this is something most people won't be able to do and really isn't a standard that's likely not a good option for a game though. Normally you would use some kind of solution that takes care of all this stuff for you in one way or another. Steam provides a relay network / session service to do this. EOS does the same as another example. Photon provides this as well but paid (although I have no idea if this even works properly with Unreal honestly). Look around and see what you like I guess, they unfortunately all have theirs ups and downs.

sterile pasture
#

Is the steam Network usable for free ?

twilit radish
#

If you have a game on their platform it's free to use yeah. (There's also a development app ID you can use for testing purposes if you don't have a store page etc. yet). The downside is however that this only works for Steam users.

sterile pasture
#

Is there a free option ?

twilit radish
#

A free option for what?

sterile pasture
#

For connecting players to a hosts session

#

Outside if a local network

#

Without the additional use of hamachi

paper trellis
#

are you using dedicated servers or is it p2p and small sessions

twilit radish
#

If you're only on Steam and don't care about being limited to just Steam you can use their services for free. If you want cross-play for free the only option is EOS (Epic Online Services). But that does require people to login with an Epic account I believe and is still relatively new.

thin stratus
#

WELL, free is a strong word here

sterile pasture
#

@paper trellis listen server model

twilit radish
#

"free" yes.

#

But technically doesn't cost you directly any money.

thin stratus
#

100€ initial fee and then 30% onwards

#

Yeah but compared with EOS which is actually free

twilit radish
#

EOS is just as much "free" as Steam is lol.

thin stratus
#

EOS does not take a cut

twilit radish
#

Nothing is ever truly free 😛
But EOS it self indeed doesn't take a direct cut.

thin stratus
#

EOS also has no initial fee

#

That only comes up if you release on the EGS

#

Which is a different story

paper trellis
#

or hire from a server provider that will do it for them

twilit radish
#

Would absolutely kill your game though, but you know xD

thin stratus
#

You need a custom AppID

twilit radish
#

But if you don't launch on Steam you also don't need it. But again that would just be weird.

thin stratus
#

Only because you let people download the game from your own website doesn't mean it's not running over steam

#

And if you don't launch on steam then you won't get keys

#

I doubt you can get away from this

#

You need User Accounts with the Key added

sterile pasture
#

I want to make it co op , hamachi appears to be the best option

fathom aspen
twilit radish
#

There are not many games that create their own website these days lets be fair.

thin stratus
twilit radish
#

I wonder if there are any games that still use the 480 app id with their games xD

thin stratus
thin stratus
#

Unlike EOS where you can use EOS with your own Account System

#

Hosting that is obviously not free, but that's besides the point

twilit radish
#

The thing that still worries me about EOS is that Epic loses a lot of money with it with no way of ever getting that back, I would be surprised if they do it like this forever tbh.

#

Especially if it gets more popular it will just take more and more money.

thin stratus
#

Idk, but I don't picture Epic like a company that goes back on their word for the free part

twilit radish
thin stratus
#

No

#

It's a bit confusing for me too, but EGS counts as just another Auth Provider here.
Same as Steam, Sony, Microsoft etc.

#

And for Auth you can also use other things, like plain Email + Password iirc

#

Or even DeviceID if that fits your product

latent heart
#

Surely with steam as an auth provider, it uses your steam account?

sterile pasture
#

🫠

thin stratus
#

The idea of EOS is crossplatform

twilit radish
#

Huh. I just saw a message as well in #epic-online-services from an Epic employee saying the same. My brain can't comprehend that x)

thin stratus
#

Which means you wouldn't use Steam for anything else but auth

#

It's the same idea as using your Google Account to Auth on Random Websites

#

Just that it's not only Google, but multiple different ones ,that are all connected to the same EOS account

#

So you can share progress

latent heart
#

So EOS can use any auth provider (even your own) and is completely separate from EGS?

thin stratus
#

Or even play with PS vs Xbox

#

As they share the same EOS MasterServer for lobbies

#

And the same Unique NetID

twilit radish
#

But in theory you can just go with your own account system, Epic Accounts or whatever, use that as a login provider and boom you have true cross-platform everything. That's weird to say lol.

latent heart
#

Nice to know!

thin stratus
#

It's the same as Gamesparks or Playfab in that regard

#

In case you heard of those

twilit radish
#

Just without the price

thin stratus
#

And still existing

twilit radish
#

Playfab still exists I believe.

thin stratus
#

Yeah but Gamesparks died

#

Think the new thing is AccelByte

twilit radish
#

I'm still shocked that it doesn't require an Epic account 🤣

thin stratus
#

Yeah I think Epic Account is EAS

elder sable
#

What would you choose to display UI stuffs depending on network data ?

  • Wait all data then notify the UI
  • Construct the UI with bindings, and notify on each event ?
    I'm not sure that the 2nd solution is safe if data can be replicated before the UI is constructed
thin stratus
#

UI itself binds to Callbacks

#

Do not set it up to notify the UI by getting a direct reference to it

#

That's the worse setup that really doesn't scale well

elder sable
thin stratus
#
  1. Create UI
  2. OnConstruct
    2.1. Get Object and bind to Update Callback
    2.2. Ask Object for newest Data
elder sable
#

Ok thanks !

modern cipher
elder sable
#

With the gameplay tags ?

modern cipher
#

yes

elder sable
#

Mhh i will check again how it works

#

What's the benefit using gameplaytag version ? Is it just to have a generic interface ?

uneven kraken
#

Are actors guaranteed to be successfully replicated (ie. received by the client) before any of its variables, or components?

I'm guessing Unreal would send network updates of the parent first, however they could be received by the clients out-of-order, so the answer to my question would be no - is that correct? thanks

#

and as a followup, if the client does receive a child variable first, will a ReplicatedUsing/RepNotify fire immediately, even if its parent hasn't yet been received? eg. say I have a PlayerState with a field int32 Level. is it possible for a RepNotify on Level to be fired, before the RepNotity for the PlayerState?

obtuse field
#

Is it poossible to keep player state when travelling between servers?

fathom aspen
#

For order there is no such guarantee even if they were in the same transition unit (in reality there are for POD types but you shouldn't comply to it)

fathom aspen
elder sable
#

Is it possible to get notified when object variables are fully replicated without checking all onRep for each variables ?

#

PostNetInit
Should be this i guess

fathom aspen
#

PostRepNotifies

elder sable
#

Perfect ! Ty :p

young spoke
#

hey all...
how does OnRep work for an array of actors

#

for example, i want each client and server to have an array of the units they have spawned

#

would the system send the entire array over network anytime a new actor is added?

fathom aspen
#

No. Only what changed. TArrays replicate deltas

dapper obsidian
#

[OnlineSubsystemNull] I have a dedicated server which creates a session through a custom Game Session class's RegisterServer() method (as in ShooterGame). However, players join the server using the open command and not through FindSessions(). How can I get them to join the session created by the server so they can share voice chat?

fathom aspen
#

Override HandleOpenCommand and call FindSessions in there?

dapper obsidian
#

Well, I can call FindSessions() at the same time as I execute the open command, but looking at the FindSessions() implementations I'm not sure how I'd identify the specific server.

#

Looking at FOnlineSessionSearch and FOnlineSearchSettings I don't see a way to specify the IP address and port, for instance.

young spoke
fathom aspen
#

Not sure if this is what you're looking for, and whether this is valid for dedicated

dapper obsidian
#

Oh well, guess I'll go the hacky route.

fathom aspen
#

There is no Getter? Sadge

dapper obsidian
#

Just a getter but no setter.

#

So I can't set the IP address I want for my search filter.

fathom aspen
#

Ah you want the latter

#

I mean there is SetIp and GetIp

#

But I can't seem to find how you can retrieve the HostAddr pointer

#

Well they have it all in FOnlineSessionInfoNull::Init
This is what they do: HostAddr = ISocketSubsystem::Get(PLATFORM_SOCKETSUBSYSTEM)->GetLocalHostAddr(*GLog, bCanBindAll);

dapper obsidian
#

Oh wait, I think I see how to do it.

#

I don't think I need to hack this.

#

It's just that I need to call FindSessions() not via the client's online subsystem pointer but through the custom Game Session.

#

Heck, I could just have the Game Session return its session directly, no? 🤔

#

I've never done multiplayer stuff so I'm not sure.

fathom aspen
#

Yes, because you already connected to that server

#

So you do it using the server's GameSession

dapper obsidian
#

Thanks! I'll try that.

fathom aspen
dapper obsidian
#

Just to check, on a dedicated server does AGameMode::BeginPlay() run on the client when they join the map?

fathom aspen
#

No. There is no GameMode instance on the client's instance of the game

dapper obsidian
#

Thank you. 🙂

young spoke
fathom aspen
#

Right. The STL containers can't be serialized, so ofc not.

dapper obsidian
#

Hm, I am quite confused about FindSessions() and JoinSession(). Are they supposed to be executed on the server or the client? In ShooterGame all those calls are routed through GetWorld()->GetAuthGameMode()->GameSession, which in my understanding only exists on the server.

quasi tide
fathom aspen
#

Though in ShooterGame they seem to be called from the server as they seem to connect to the server first and then find/join sessions. So I guess it depends.

dapper obsidian
#

Thank you both!

real ridge
#

Guys it is possible to load my player later ? for example I start game I am in menu but in background my player is already loaded and his variables too

#

I want load it after I will hit for example Lobby map

#

he is created immediately after game start

#

I dont need it

dapper obsidian
#

You can use a specific Game Mode for the main menu map that doesn't use the default pawn.

real ridge
#

ahh

#

and its normal every game is loading player immediately?

#

or they doing it later

#

i have problem with widget there

#

i create player with widget but its propably too early and then when I package it my client crash

#

but in editor its working

#

this widget I have it binded to nick which has static text value TEXT but its falling

still arch
#

Trying to call a server function but litterly nothing is happening. I've been trying to figure out what the problem might be for hours. Am I missing something? I think this is the relevant code.

#

Worth to note, I have set up some boilerplate for GAS, but I would hope that wouldn't effect things.

kindred widget
#

Second, I assume that the ServerRequestBuild is UFUNCTION(Server, Reliable) ?

#

And what is ServerRequestBuild doing to test if it's working or not?

hollow eagle
#

There is a good reason to use that pattern - if you want to predict the action on the client and do a server call.
That's not what's happening here though.

still arch
#

Yes, that's correct UPROPERTY(Server, Reliable)

#

So, I'm actually testing the ToggleBuildMode, but the function look the same. It's just a regular UE_LOG at the moment.

kindred widget
#

I need to stop writing UPROPERTY when I mean UFUNCTION. 😂

still arch
#

Printscreened the wrong function.

kindred widget
#

ToggleBuildMode isn't an RPC though?

#

At least not in what you sent. You don't have an Implementation function.

still arch
#
UFUNCTION(Server, Reliable)
void ServerToggleBuildMode();
void ABuilderCharacter::ServerToggleBuildMode_Implementation()
{
    UE_LOG(LogTemp, Warning, TEXT("Server Toggle BuildMode"))
    if (IsValid(BuildSystemComponent))
    {
        BuildSystemComponent->ToggleBuildMode();
    }
}
#

There you have it

kindred widget
#

Does it work when called on a listenserver?

still arch
#

Yes, everything works on server

kindred widget
#

How are you calling it? Cause that'll definitely work on an owned character. Will not work if client tries calling it on another character.

still arch
#

Hmm, by input

#
void ABuilderCharacter::SetupPlayerInputComponent(UInputComponent* PlayerInputComponent)
{
    Super::SetupPlayerInputComponent(PlayerInputComponent);
    PlayerInputComponent->BindAction("Jump", IE_Pressed, this, &ThisClass::Jump);
    PlayerInputComponent->BindAction("Build", IE_Pressed, this, &ThisClass::RequestBuild);
    PlayerInputComponent->BindAction("BuildMode", IE_Pressed, this, &ThisClass::ToggleBuildMode);
    PlayerInputComponent->BindAction("SelectWall", IE_Pressed, this, &ThisClass::SelectWall);
    PlayerInputComponent->BindAction("SelectCeiling", IE_Pressed, this, &ThisClass::SelectCeiling);
    PlayerInputComponent->BindAction("SelectRoof", IE_Pressed, this, &ThisClass::SelectRoof);
    
    
    PlayerInputComponent->BindAxis("MoveRight", this, &ThisClass::MoveRight);
    PlayerInputComponent->BindAxis("MoveForward", this, &ThisClass::MoveForward);
    PlayerInputComponent->BindAxis("TurnY", this, &ThisClass::TurnY);
    PlayerInputComponent->BindAxis("TurnX", this, &ThisClass::TurnX);
    
    if (AbilitySystemComponent && InputComponent)
    {
        const FGameplayAbilityInputBinds Binds(
            "Confirm", "Cancel", "EGASAbilityInputID", static_cast<int32>(EGASAbilityInputID::Confirm), static_cast<int32>(EGASAbilityInputID::Cancel));
        AbilitySystemComponent->BindAbilityActivationToInputComponent(InputComponent, Binds);
    }
}
kindred widget
#

Would think it would work then. 😦

#

Input function is running fine on client as well?

still arch
#

So, movement works

#

But no other functions seems to fire

kindred widget
#

What's in ToggleBuildMode, just the server call?

still arch
#

So, I have a thought.. The only Bind I've actually set up for GAS but not yet using for a GA is BuildMode. Might it be that GAS is blocking that for client somehow?

#

I'm new to gamedev if that was not obvious already.

#

ToggleBuildMode is just flipping a bool on a BuildSystemComponent

kindred widget
#

What actually calls the server function though if not that?

still arch
#

Don't think I understand your question, but I do not think anything is calling the serverfunction?

#

Might be missunderstanding you.

kindred widget
#

You said you're getting the log on the server, but not on a client. So I assume something somewhere is calling your ServerToggleBuildMode.

still arch
#

Oh, no, I do not get the log on the server.

kindred widget
#

I took that as when client uses it, no log.

still arch
#

I guess since I check for Auth and just call the function on component directly

#

Which I will change since that was not how it was supposed to be done.

kindred widget
#

I'm more confused because if nothing is calling it, then where is the expectation for the log to run?

still arch
#

I guess, since I had en else, and call it if not auth it would be called if you're a client?

#

Oh, I think I've done something wrong here.

void ABuilderCharacter::ToggleBuildMode()
{
    if (IsValid(BuildSystemComponent))
    {
        BuildSystemComponent->ToggleBuildMode();
    }
    else
    {
        ServerToggleBuildMode();
    }
}
#

Just noticed that I do not check for Auth, BuildSystemComponent is always Valid so the server function will never be called.

#

Sorry for taking up your time, appreciate the effort though.

kindred widget
#

You don't need any of that except for ServerToggleBuildMode(); Prediction for doing it quicker on the client can come later if you want client authority on it, but for starts, you should just let the server set it and let it replicate as a state back to the client.

still arch
#

Thank you!

obtuse field
#

How can I ping the IP, so I can see latency between host and remote?

kindred widget
#

There is compressed latency value in the PlayerState for each person.

obtuse field
kindred widget
#

As in another client?

obtuse field
#

e.g. I have client and 2 servers, and I need to know with which one I have faster connection, and then connect it to this one

kindred widget
#

Seems like the session search result carries this in PingInMs

urban mason
#

When I change my AppId in DefaultEngine.ini from 480 to my own AppId, the steam overlay stops working/it no longer uses steam to sign me in and show my profile. Is there something I need to do in Steamworks?

urban mason
#

if that's right, i have them there. but I wasnt sure what to put for GameDir and GameDesc so I just put the product name in both spots

fathom aspen
#

No idea tbh. I vaguely remembered that it was asked few days ago so I linked (it's also in pins). Might be a good question for @pallid mesa

urban mason
#

also i'm using UE5 which I believe the keys are slightly different for (UE_PROJECT_STEAMSHIPPINGID)

#

ah ok. thanks for flagging

fathom aspen
#

Yeah would be a good idea if he could elaborate on that and add/edit if there's any changes to UE5 🦆

uneven kraken
#

How is AActor::HasAuthority() different from AActor::GetNetMode() < NM_Client?

#

Ah wait, is the only difference that for client-spawned/client-only actors, the client has authority over them?

celest fable
#

It happens after connecting 2nd player to session ;c

twin juniper
#

Its seems blatant but i want to see if anyone knows how i can make this replicated. ive been searching stuff for 2 days and i cant seem to find anything online. i really dont understand how you can replicate an overlay change that removes a Actor from a socket

#

please @ me if you have any input on this

woven basin
#

Secondly, if packaging the game in Shipping Build, but the game is not released, you need to include a text file with your App ID in the base folder.

elder sable
#

Hi, is it possible to bypass initial replication ? For example, gamestate variables will be replicated before i can initialize some values, so i have to create invalid values to handle that, that's not really clean

obsidian walrus
#

dang what the hek is iris

fathom aspen
#

A new replication system

fathom aspen
elder sable
#

But onrep functions will still be called (i meant server side initialization so it's require replication)

fathom aspen
elder sable
#

When the gamestate is spawned, the replicated variables will replicate with default values, so onrep functions will be called with invalid values

#

Because they are not initialized server side yet

fathom aspen
#

That makes sense

#

Initialize them then

elder sable
#

How ? The only way i found is to spawn the gamestate manually with deferred spawn

fathom aspen
#

Either that or override AGameModeBase::PreInitializeComponents and set what you want after GameState is spawned

elder sable
#

After is too late, no ?

fathom aspen
#

No, it's same frame

elder sable
#

Mhh, i will try thanks !

dark edge
oblique raft
#

Is it possible yet to feasibly (as a solo dev) make multiplayer flying games in Unreal? I know of the 21km^2 map size limit. I see there is a "Large World Coordinates" beta feature. And I'm not sure if UE5 makes this any easier.

dark edge
barren patrol
#

When I launch separate server as it's own process in the editor, do the logs go to any temp file?

#

The process is crashing and disappears too quickly for me to grab them from the console

barren patrol
#

It's more physics based, is UE physics engine even deterministic?

#

Plus you don't turn on a dime like an FPS/MOBA, so you can get away with <100 ms delay and it wont feel that bad

pallid mesa
#

no, but you can look at NPP movement examples to investigate how to do a floating moving pawn the unreal way

#

the plugin by itself is pretty great, but you'll have to spend some time reading their examples and comments

urban mason
#

also, with 480, do you need to write something like spacewar as the UE_PROJECT_STEAMPRODUCTNAME or can you write the name of your own game?

thin stratus
#

If at all for your own App

#

And I would say if you use 480 you need to provide that IDs product name

#

But at that point I would just suggest getting your own app id

urban mason
#

Yeah sorry the context is getting lost — I’m trying to generate them for my own app but asking a separate question about the test app

#

I do have my own app id I’m just not able to get it to work yet so I’m also exploring the test app id for now as well

#

Do you know where the button to do it for my own app is? I can’t find it and the documentation just says it’s in the portal

dark edge
#

I use it for my vehicle game and it works just fine.

fathom aspen
barren patrol
#

I’m sure it’s a fine approach to use prediction also but you will have to bump the correction tolerance

pseudo merlin
#

hi all, lets say I want to move a character with apply force on tick, for a jetpack maybe. Would I run that on tick force on owner, host, and all clients? Or just client and host? Or some other combo? thanks

woven basin
# urban mason i feel like this is really poor documentation for how to do this. where is that ...

There is another section in SteamWorks, where you invite/add people/developers to your account. It’s different to public keys, I don’t remember the exact name.

But the idea is you add them to your account, which means they also “own” the game, and this Steam lets them connect to your app.

This is part of the Steam piracy process: if you don’t own the game, you can’t use Steam to connect to its network.

serene furnace
#

Hey people !
I'm quite new to all of the replication and multiplayer code, so I'm running into an issue that might seems really basic to most people ahah.

I want to replicate my Pitch on the server, for now, only the left and right are replicated not up and down, so I came up with this code :
So it's grabbing rotators of actor and control, doing some math to set the pitch and yaw.

It's using an anim notify that is firing the onRep_pitch and Onrep_Yaw, that are calling the interface to make the replicated values goes to anim blueprint.

It's then setting "aim rotation" that is applying to a transform on the spine 1 - 2 - 3, to make the char lean forward and backward.

Thing is it's super fluent on the server, and super clunky on the clients ( showing that the server is correcting the rotation on the client, most likely thats probably why it's super clunky)

could any of you explain to me why it's super clucky like this on clients ? (Multy casting dont work at all 😄 )

#

I also tryed an aim offset, that is giving me the same results 😄

sinful tree
# serene furnace Hey people ! I'm quite new to all of the replication and multiplayer code, so I...

As this stands, you wouldn't need to use a server RPC for this.
Event Tick fires on both the client and the server. So your "Set Pitch" event is being called by both client and server which they both then call the S Set Pitch And Yaw.
Therefore, if this is mostly working for you, you only really need to be running the sets that you have there directly on event tick rather than having the client tell the server to do it (and the server doing it itself).

#

Ideally you'd probably use a HasAuthority (Authority) > switch to ensure that the event tick is only running on the server side.

serene furnace
#

so basically my problem is using the "event tick node" ? x) I could call it on "input axis" and fix it all, right ?

sinful tree
#

Again if it looks like it's mostly working fine apart from being a bit clunky, then you could probably just separate tick by using a Has Authority (Authority) > node and from there do your sets. There's no need for the client to RPC to the server on tick just to do that.

serene furnace
#

is that where you wanted the "has authority" ? It's still clunky, I dont really understand this ^^'

Replication is sopposed to send the info to the server that the client is moving his controller, right ? And then display it on all clients screen
I removed the "event tick" and putted the values to "replicated" directly, then grabbed them into the anim BP with a cast directly, but no changes on the client, still clunky

sinful tree
serene furnace
#

I fired it there directly

sinful tree
#

Now your client is RPCing twice per tick <_<

#

When you need to do it 0

serene furnace
#

xD the input axis are replicated directly as well, right ? since we can nativly see the left right turn, right ?

sinful tree
#

No they aren't.

#

What you may be seeing is the "Add Control Inputs" being replicated.

#

But the axis events themselves are not.

serene furnace
#

okay, thanks good to know ^^
I will make it back to first screenshot and use the proper node this time ^^

serene furnace
#

well I removed the event and stuff, just used the "envent tick" with rep notify still clunky

#

Also tested this one, it's super clunky on client this time and not working to make a client lean, but the server shows the client leaning forward... I'm so confused right now

sinful tree
#

What do your rep notifies do?

#

(Show code!)

serene furnace
#

yeah I was thinking it might be my issue gimme a set

#

I'm triggering twice the same code basically xDD

#

So both notifys are triggering this... I'm starting to see the logic and now I think that this is calling twice the values and might cause clunky things on clients, right ?

sinful tree
#

You likely need to gate your OnReps so they only set values if islocallycontrolled == false so it only forces the rotations on clients other than the player who is in control of the character. This should allow your client to properly maneuver themselves freely and then their rotations should be replicated to everyone else.

fathom aspen
#

It already has the pitch and the other dudes replicated

serene furnace
#

well from what I saw, we need both Actor rotation and control rotation to make the delta and get difference between both, I'm kinda blindly following tutorial, trying to acquire the logic and the basics about this, so I can make my own replicated code ^^

fathom aspen
#

Well I'm not well-versed with the movement code stuff myself, but that function should be what you're looking for

serene furnace
#

well I dont know a thing about those, will give it a go, once I figured this out to try to optimise and variate the technics

#

@sinful tree is that what you ment ? This is Right now only moving for the other clients, and the server but the actual client that is controlling the pawn, is not moving on his own screen.

So I'm guessing when you said "you need to gate", I need a proper gate to open only when the locally controlled is "False" and then set the values and close the gate again ?? 🤔

sinful tree
#

That's what I meant, yep

serene furnace
#

well at this point, the client dont control the pitch and the server dont replicate it either ><

still arch
#

Trying to replicate the movement of a spawned actor and is getting some wierd crashes and behaviour. I'm new to game development I should add. Anyone who has any pointers? This is in an ActorComponent.

fathom aspen
#

From launcher, go to your binary version. And click that down arrow somewhere

still arch
#

Searching on google on how to fix debug symbols now.

fathom aspen
#

You don't fix them, you just download them.

#

Quick take from google

still arch
#

Thank you! Downloading.

serene furnace
#

@fathom aspen turns out you were right this node was already replicated and is completely working if I use it directly from the anim blueprint with a cast, it might not be optimised at all tho...

Also @sinful tree I tryed many combinations with the gate and thing, try to use no rep notify and still had the same issue, looks like doing things directly into my anim BP was my only way to get ride of the issue ? 🤔

Thanks to you, i'm still open to any futher opti, explanation and solutions tho 😄

fathom aspen
#

Explain "not optimized" pls

#

Do you mean the code Epic uses at Fornite is not optimized?

#

Because that is a very bold statement that uncle Tim won't like

serene furnace
#

well it's casting to the pawn every single frame into the anim blueprint to get the pawn and its "aim rotation" right ? might be better to pass the data trough an interface ?

fathom aspen
#
  1. That has nothing to do with the function.
  2. Casting is not expensive.
  3. Tick is not bad.
serene furnace
#

I will save the link and give it a proper look, thanks, it will probably help me know what is great to use and what is not ^^

fathom aspen
#

Amazing, and at this point I would suggest typing a comment of the solution you found in that YT tutorial, so other peeps get the knowledge too

#

And a tip to not blindly follow tutorials

serene furnace
#

well the guy just does a "replicate" on his float value into his video, run the game on only one Server and one client, doesnt even try on the client the render, and have no way to test the code between 2 clients, he probably didnt even noticed it's not working xD

And then the second video was into a not replicated project, that I though I could get to work with the anim notify thing I had, none of them actually did what I had, I use them has a "base" and when I dont manage to do it on my own I follow it blindly,

Last tutorial I was watching really helped understanding the logic, what a rep notify does, when to use multicasts etc... so a really decent base

uneven kraken
#

I asked this question in this channel a few weeks ago:

I've got a replicating Actor with two replicated variables on it. If I synchronously change the values of both of these variables on the server, are clients guaranteed to receive the updated values of both of the variables in the same network update?

and was told that I can't rely on clients to receive both replicated variables simultaneously/in the same frame. However, I've since come across this article:
https://forums.unrealengine.com/t/replication-ordering-guarantees/264974

which says:

Another guarantee is that, on a frame when an actor is replicated, all of it’s changed properties will be sent at once, and the client should receive and apply these changes within a single frame (with the exception of unmapped properties). However, there is no guarantee made regarding the order in which properties will be received or the order in which OnReps will be called.

have things changed since Dec 2021?

Also, what are "unmapped properties"?

thin stratus
#

The second OnRep call would then have both values changed

#

But again: order

#

It's usually best to just put them in a struct as already mentioned

woven basin
#

Wasn’t there a post the other day by Zlo that said the order is partially defined by the order it is listed in GetLifetimeRepsProp function (for replicated values)

rose egret
#

how to check if actor is dedicated server in BP ?

#

I dont have access to ENetMode i guess

fathom aspen
rose egret
#

I guesss these kind of functions are not fit for PIE maybe 🤔

fathom aspen
#

They work in PIE just like they work in non PIE environment

urban mason
#

I still don't really get how to generate a CD whether its for myself or for a tester

thin stratus
urban mason
#

I'm simply not able to find the button that this documentation is referencing

#

And yes, I am the admin of the project so I have Generate Steam Keys

thin stratus
#

So you paid the fee, got an application and also created an application from that available slot?

urban mason
#

this proves yes to all, right?

thin stratus
#

I think so. And what if you navigate to the actual landing page of that?

#

The other thing you can try is to go to Packages in the top UI. It's in one of the dropdown menus

urban mason
#

it's possible that my landing page is bugged

#

is this what it's supposed to look like?

#

or is that not the landing page?

#

the buttons that say "See checklist below" don't actually do anything

thin stratus
#

What if you click on View Packages under Apps and Packages

urban mason
#

oh it actually loaded

#

those aren't buttons tho

#

they're literally header elements

thin stratus
#

Yeah it would list the available packages there usually

urban mason
#

oh i see

#

(i removed some of the images because they were technically doxxing my real name, but lmk if you want to see them again)

thin stratus
#

Been a while since I saw a fully setup project page. I haven't setup our project yet, only the company

#

So I can't give you any screenshots of key creation as I don't have any

kindred widget
urban mason
#

bummer. i think my UI is literally bugged, so I'll just submit a tech request to steam i guess

#

thanks for lookin at this with me

#

questions still out there if anybody knows how to generate a CD key, or knows if I even need one to use steam with my own app id (I didnt need one for app id 480 to work)

thin stratus
#

Yeah you do need to add the game to your library

#

480 is invisible in your library

#

All accounts own that iirc

urban mason
#

i see. is there a way to get myself to own it in my library without a CD or without actually fully deploying the game to steam

thin stratus
#

Not that I know

#

I usually granted DEV keys

urban mason
#

that's what i want i think

thin stratus
#

at least for yourself, yes

urban mason
#

i'm just trying to make it work for myself

thin stratus
#

DEV Keys will also grant rights on the steamworks page iirc

urban mason
#

how do i get a dev key

thin stratus
#

On the page that doesn't work for you

urban mason
#

oh you know that it's not supposed to look like what I sent?

thin stratus
#

I have a vague image in memory of how it looks like

#

That video is linked on the steamworks page

#

Not sure if you watched that before

#

They def updated the process a bit

still arch
kindred widget
#

Is this for letting other people see something that someone is placing down?

still arch
#

Yes, that's correct

#

Also the movement of a preview being moved before actually placed.

urban mason
rose egret
#

can we use cheat manager in full BP ?

#

I type my cheat func but it not invoked

thin stratus
kindred widget
#

@still arch For placement the placer would do this locally so it looks nice for them and they would serverRPC it to server the intended place in a non reliable Server RPC. And then server would set a replicated property that is SkipOwner. All other people would get this property replicated to them, and all non owning clients could just do some interpolation to smoothen out the net updates.

This all leads to the placer having a nice, snappy easy to use look for themselves, and a relatively okay, decent look for everyone else.

The final placement would be just a single ServerRPC to tell the server they want to place it. The new actor can replicate itself back to every client even the placer.

urban mason
#

I sent a request to steam so I hope I hear back soon!

still arch
urban mason
#

@still arch I'm not sure if I have all the context, but doing a multicast for moving a physics object would not be ideal because that process would have to re-execute separately on every single machine connected to the game. multicast is good for personal things like footstep sounds and HUD indicators, but bad for things like making physics objects move on everyones screen (unless you dont care if everyone sees the exact same thing)

still arch
#

Yeah, trying the multicast was my last resorts, just wanted to see if I could get this replicated properly in anyway to understand it better. Thank you for the info. Much to learn.

fathom aspen
twilit radish
fathom aspen
#

But they could technically use ExecuteConsoleCommand to do it

#

Or am I tripping?

twilit radish
#

Yes, that's what I'm saying xD

#

But directly calling the method doesn't work from BP.

fathom aspen
#

Fair enough xD

#

That's pretty much how server travel is done in BP xD

#

Poor BP peeps have no travel nodes

#

Though soon enough they will be able to pass seamless/hard travel as options when doing a travel

#

Which is amazing

twilit radish
#

How about Epic actually fixes their kick system instead 😄

fathom aspen
#

We don't talk about that here Thom

twilit radish
#

😔

fathom aspen
twilit radish
#

I want to try and see if I can easily fix it, but I think they will reject it honestly because there's only one proper way to fix it and that might break compatibility in some cases.

fathom aspen
#
#

They fixed the bug that entails listen server not carrying clients with them after a hard travel

#

But this one 😔

twilit radish
#

Does that have an issue on the issue tracker? Would love to upvote it.

fathom aspen
#

Exactly, that was the question I asked myself and the answer seems to be no

#

Which is mind-cracking

twilit radish
#

What xD

#

"Lets make an entire issue about this on the forums with a workaround but not post it to the issue tracker.."

#

😛

fathom aspen
#

I mean it's literally just a few lines of code to ServerNotifyLoadedWorld and to PostSeamlessTravel and hurray

twilit radish
#

Sure, but if you don't know about this issue then you've a dumb bug that might seem impossible to fix..

fathom aspen
#

They had to add an additional RPC because ServerNotifyLoadedWorld isn't virtual xD

twilit radish
#

Epic and their non-virtual methods are going to drive me crazy at some point 🤣

fathom aspen
#

Epic: Just hard travel, duh

twilit radish
#

Sure, but you never know how many do have this issue and don't know how to fix it.

#

It should simply get fixed, there's no reason for it to not get fixed.

fathom aspen
#

To be honest I've never faced it and if I was to bug report it I won't be able to reproduce it, as it seems to be seasonal

#

How would I make the client load faster than the server

twilit radish
#

Thread.Sleep(10000) ❤️

fathom aspen
#

But just stating that should be enough I guess

#

And linking that thread

#

Well let me ask the OP if they reported it so I don't recreate bug reports

twilit radish
#

😄

#

Also my forum profile just doesn't exist lol.

fathom aspen
#

Epic hates you 😔

twilit radish
#

😦

twilit radish
#

https://forums.unrealengine.com/t/tech-note-network-vulnerability-in-netconnectionidhandler/631303
I love how they don't disclose this to anyone in a proper way and instead make a forum post only 218 people read.

still arch
#

If I have two a FRotator and an FVector that I would like to have replicated, but I would want one repnotify for them since I cant update an actors position before they both have been set. Is there a way to do this?

twilit radish
#

Make it a struct and replicate that.

#

As an example I'm doing this in one of my own projects.

USTRUCT()
struct SPACESHIPGAME_API FShipData
{
    GENERATED_BODY()

public:
    FShipData()
        : ShipYaw(0.0f)
        , ShipLocation(FVector::ZeroVector)
        , bShooting(false)
        , HitEnemy(nullptr)
    {
    }

    FShipData(float Yaw, const FVector& Location, bool bShoot, ABasicEnemy* Enemy)
    {
        ShipYaw = Yaw;
        ShipLocation = Location;
        bShooting = bShoot;
        HitEnemy = Enemy;
    }

public:
    UPROPERTY()
    float ShipYaw = 0.0f;

    UPROPERTY()
    FVector ShipLocation = FVector::ZeroVector;

    UPROPERTY()
    bool bShooting = false;

    UPROPERTY()
    ABasicEnemy* HitEnemy = nullptr;
};
```With the following OnRep
```cpp
public:
   UPROPERTY(ReplicatedUsing = OnRep_ShipMovementData)
   FShipData ShipData;
still arch
#

You are a saviour, will try this out. Thank you!

twilit radish
#

Assuming you use C++ that is 😛

fathom aspen
twilit radish
#

Yes, but no.

#

You don't need it.

fathom aspen
#

No u

twilit radish
#

That is not how this works 🤣

#

It serializes it self.

fathom aspen
#

I mean POD types would still replicate the same frame they were changed, but what if they didn't patrick_hehe

#

Also this way they won't get to a state client-side that never existed server side

#

A great example is FRepMovement

twilit radish
#

I have an actor pointer in there, it doesn't care as long as it can be serialized.

fathom aspen
#

Structs by default delta replicate

twilit radish
#

NetSerializers are great if you have a use case for it, but by default you don't need it. A use case for a custom net serializer is if you need to optimise stuff as you can optionally replicate certain fields at the cost of 1 bit instead of the entire value.

fathom aspen
#

Right, but there are other use cases, including atomic replication which is exactly what they asked for

twilit radish
#

Why would that matter in this case?

still arch
#

Another question, wouldn't the repnotify for that struct fire once I set the first value, lets say the FVector, and then fire again once I set the FRotator?

twilit radish
#

I believe it does not detect changes within the struct it self.

#

But maybe I'm wrong. Not 100% sure.

fathom aspen
still arch
#

Ok, so I would have to instantiate a new struct for every new location update?

#

Which I guess is fine, doing it in tick though. Expensive?

fathom aspen
twilit radish
#

You could probably just reassign the same struct if it doesn't update.

still arch
#

So I was planning on passing the struct as reference to a SetNextLocationAndRotation() with the hope that the rep notify woud fire once they both had been set.

fathom aspen
still arch
#

Yes, I will see if I can digest that and look into implementing a NetSerializer.

#

Moving an actor over the network got me thrown in the deep end.

fathom aspen
#

Also ideally you will NetQuantize your location and rotation which is a win win

fathom aspen
still arch
#

For real? Isn't that set when I set the actor itself to replicated?

#

Thought that was part of the package.

fathom aspen
#

No.

#

That is set to true by default for pawns

#

But if that's a generic AActor then no

#

But still you won't get a CMC-like movement

still arch
#

Oh, so I would basically just have to do Server RPC for spawning the actor and then not do anyhing for the movement letting it be called by clients and the movement will be replicated?

#

I have to try this out.

#

It's just a bulding piece. Making a Base building system of sorts.

fathom aspen
#

GetBaseAimRotation ftw

twilit radish
#

The whole point of Delta Encoding ("compression") is not that it doesn't bundle together but that it's compressed. That should have nothing to do with how it gets replicated.

fathom aspen
#

It's either tribal knowledge or was mentioned at a knowledge base (or udn?) post

#

Ah well it is in NetSerialization.h

twilit radish
#

NetSerialization.h doesn't mention anything about it for me. Unless I'm really blind 🤣

#

Nevermind I'm indeed just blind lol.

fathom aspen
#

I mean it's me now that is not able to find it lol

#

Ah ok found it

#

It's not in the UE5 thingy

#

But UE4

#

Literally all the documentation just vanished in UE5. Epic, hello?

#

I'm not sure what you mean tbh.

twilit radish
#

It also just sounds really weird to send half of the properties when it can't fully write.

fathom aspen
fathom aspen
#

Just pack two properties (ideally if they are pointers to actors) in a struct and change them on the same frame, you won't receive them in the same packet

twilit radish
#

But the exact same comment is above non-delta serializers too.

#

Oooh wait I think I see what you mean now.

#

But wtf.

#

Or not? I'm so confused.

#

A struct should be one entire "property", it skips/continues it in the first link whenever it can't fully serialize. So you would say it just skips the entire struct then right?

fathom aspen
#
 *    NetSerialize & NetDeltaSerialize
 * Properties that fit into the flat Recent buffer can be serialized entirely with NetSerialize. NetSerialize just reads or writes to an FArchive.
 * Since the replication can just look at the Recent[] buffer and do a direct comparison, it can tell what properties are dirty. NetSerialize just
 * reads or writes.
 *
 * Dynamic properties can only be serialized with NetDeltaSerialize. NetDeltaSerialize is serialization from a given base state, and produces
 * both a 'delta' state (which gets sent to the client) and a 'full' state (which is saved to be used as the base state in future delta serializes).
 * NetDeltaSerialize essentially does the diffing as well as the serialization. It must do the diffing so it can know what parts of the property it    must send.
#

They have their own use cases.

fathom aspen
#

I haven't tested these stuff quite much tho, and it's hard to test them too

#

With dynamic properties they mean TArrays

#

That's why you see NetDeltaSerialize used heavily in FTRs (Fast TArray Replication)

twilit radish
#

Also NetSerialize.h actually explains something I thought Unreal protected it self against but doesn't with custom serializers.

fathom aspen
#

Which is?

twilit radish
#
  • ===================== Safe TArray Serialization =====================
  • These are helper methods intended to make serializing TArrays safer in custom
  • ::NetSerialize functions. These enforce max limits on array size, so that a malformed
  • packet is not able to allocate an arbitrary amount of memory (E.g., a hacker serilizes
  • a packet where a TArray size is of size MAX_int32, causing gigs of memory to be allocated for
  • the TArray).
#

As an example:

  •    bool NetSerialize(FArchive& Ar, class UPackageMap* Map, bool& bOutSuccess)
    
  •    {
    
  •        // Don't do this:
    
  •        Ar << MyFloats;
    
  •        Ar << MyVectors;
    
  •        // Do this instead:
    
  •        SafeNetSerializeTArray_Default<31>(Ar, MyFloats);
    
  •        SafeNetSerializeTArray_WithNetSerialize<31>(Ar, MyVectors, Map);
    
  •    }
    
#

So never directly serialize TArrays in a custom NetSerializer without those methods.

fathom aspen
#

Ah I haven't read that one yet (it comes at the end of the page right)

twilit radish
#

Yes.

#

I will bet you right now that the Engine or a lot of projects have this mistake btw 😅

fathom aspen
#

Oh alright, so it seems that in UE5 they were moved FastArraySerializer.h

twilit radish
#

Yeah they moved that documentation.

twilit radish
#

Lol

eternal anchor
#

is there way to spawn actor on server, but only replicate it to selected clients ?

#

I mean replicate it's creation not properties (;

twilit radish
eternal anchor
#

oh thanks, wasn't aware of that function

still arch
#

I've been trying to figure out what this error actually means. Anyone who has any pointers?

fathom aspen
#

It's saying that the actor has no NetOwningConnection thus you can't server RPC from it

#

There are at least two ways to cure this issue:

  1. Make a client-owned actor own that actor.
  2. Route the RPC through a client-owned actor.
#

Your preference should be the latter most of the times as the former will end up in a bad design if you have too much instances of that actor

still arch
#

I just thought that the owner would be the character, its just an actorcomponent attached to the character.

fathom aspen
#

For example you don't want to hold hard references for the owner in too many actors

still arch
#

Hmm, okey. Need to rethink the whole architecture.

fathom aspen
#

Where are you calling that function from?

still arch
#

I just have a character that has a buildingsystem which spawns ABuildable, so it's not that much to refactor. Only thing is I really don't know any other way to do it.

fathom aspen
#

Relative to owner character

still arch
#

I call it in tick of the component itself

fathom aspen
#

That explains the behavior then

still arch
fathom aspen
#

Tick of the component fires after Super::BeginPlay of the owner actor fires IIRC

#

Or at least they are registered around that time

#

At that time the character could be not possessed

#

To guarantee the character has been possessed you want to listen to APawn::Restart

#

Also another note, Tick fires on both server and client, pretty much like BeginPlay

#

You are firing that server RPC on both server and client

#

And you want to ask yourself if that should be the case

#

To split the two execution paths you do a HasAuthority in actor, and for components you do it via the owner's actor HasAuthority method

still arch
#

Hmm, lot's to take in, thank you for all the information.

#

There is so much to learn.

fathom aspen
#

I would suggest looking over the starter pack if you haven't done so

#

In this channel pins, look for multiplayer compendium pinned by eXi

still arch
#

Thing is I have looked at alot of stuff, read the multiplayer compendium. It just has not registered fully yet.

fathom aspen
#

Yeah takes time to digest

still arch
#

Indeed it does, well, back to the drawing board, just gotta research this some more. Thank you.

twilit radish
#

Wizard.. Epic lied D:

// For net archives, limit serialization to 16MB, to protect against excessive allocation
constexpr SizeType MaxNetArraySerialize = (16 * 1024 * 1024) / sizeof(ElementType);

#

Also yes this is totally hard coded into their code LOL. But I guess they weren't going to deal with having to protect TArrays in NetSerializers them selves 🤣

fathom aspen
#

Lol

#

At this point I have no idea of whether to laugh or cry

twilit radish
#

It’s a good thing, it was way too easy to mess up honestly.

fathom aspen
#

The thing I'm sure about is that I'm having severe trust issues with the docs at this point

twilit radish
#

Except that it is a hardcoded value

real ridge
#

guys I have problem when I set names for players in multiplayer game and I try it like in editor with play as client and 2 windows everything is alright I see names of all players but when I run my game as standalone and join my EOS session I dont see any names even I set them why ? do you have idea its same princip both are multiplayer

fathom aspen
#

The OSS should have zero effect on seeing other players names

#

So whether it's NULL SS or EOS it should function the same

twilit radish
#

They may handle names differently though. I would suggest asking in #epic-online-services to see if they know more about it there.

fathom aspen
#

Correct. I just vaguely recalled that PlayerState.SomethingName is affected by OSS

twilit radish
#

Otherwise everything would be your default PC/device name, that's not the case 😛

fathom aspen
#

By the way recently I discovered a hack to seamless travel in PIE 👀

#

Pre UE5.1

#

Can you guess it @twilit radish ?

twilit radish
#

Considering I have barely ever looked at how it works probably not.

fathom aspen
#

Turn off "Run Under One Process" 😛

#

I know that sounds dumb, but I swear I thought even that won't let you seamless travel in PIE lol

#

Also the warning says it all, " ... can't seamless travel in one process PIE"

#

Was there all the time without me noticing it 😔

twilit radish
#

Rip

hazy snow
#

How would I pass an option to the game mode on a dedicated server when loading the level via IP address?

twilit radish
#

Assuming you mean from client -> server. You can pass arguments to the URL you use to connect to the server. Those can be retrieved by the server again 🙂
For example 192.168.2.8:7777?argument=test

#

Or you can just send a RPC through the player controller. Also a possibility.

hazy snow
#

Ohhh thats where you pass them, I'll try that

#

Thanks!

twilit radish
#

It's one of these days again 🥲

#

Why do you have to hurt me like this Lyra

latent heart
#

Unlike webservers, you don't use &blah=moo for subsequent arguments, you just use ? again.

pallid mesa
twilit radish
#

Lyring?

pallid mesa
#

Lyra, Lyring

twilit radish
#

😛

#

Compiling a dedicated server unfortunately takes a bit the first time 🥲

#

Anyone has some extra RAM and a thread ripper for me?

fathom aspen
#

Have you downloaded rider?

twilit radish
#

No x)

valid imp
#

Hey there! Is it correct to say that "this->HasAuthority()" is always true for a GameMode (given GM are server-only)?
I'm reviewing code and I'm seeing checks for it which I find weird.

fathom aspen
#

Correct. GameMode doesn't exist on remote clients

kindred widget
#

Is there any way to find when any single property in an actor is being replicated to an instance without overrides?

kindred widget
#

I'm trying to find a way to fix GAS on clients without having to override OnRep_Owner in every class I have an ability system in where clients might need to use the ability.

#

TLDR GAS component needs owner to correctly set up ActorInfo stuff. Which requires that the Owner property be valid on the actor owning the AbilityComponent. Right now I just handled it in OnRep_Owner. And I really don't want to have to do that on everything.

twin juniper
#

i'll try to compare with my stuff as i'm also using GAS

kindred widget
#
{
    Super::OnRep_Owner();

    AbilitySystem->RefreshAbilityActorInfo();
}```
twin juniper
#

yeah so

#

i'm only calling that in OnRep_Controller on the pawn

#

and PossessedBy/UnPossessed for server

#

i think Lyra also do that

fathom aspen
#

GAS compendium goes over that, though APawn::Restart ftw (called on both ends :P)

#

Couldn't you technically have a shared parent where you override and do that in there instead?

kindred widget
#

More. Fucking. Boilerplate. I love this plugin, but I also really hate this plugin. :/

twin juniper
#

i recommend nobody to uses that tbh

#

If you know c++ at least

#

that's stuff you can do yourself

#

are we talking about gas companion ? 😄 (i'm confused)

kindred widget
#

GameplayAbilitySystem.

fathom aspen
twin juniper
twin juniper
#

that's not "dirty" that's just the way you should

twin juniper
fathom aspen
#

You know GAS and you didn't read GAS compendium??? 👀

#

Tranek won't like it

kindred widget
#

Or, since the people who wrote it have easy engine access. They can just like.. Stick a fucking delegate in the OnRep and use it and not make us use boilerplate crap. More than we already are.

fathom aspen
#

Here's where I got

twin juniper
#

ah gas documentation

#

yeah again not the best practices inside but it's nice to learn GAS 😄

fathom aspen
#

Compendium > Documentation

pallid mesa
fathom aspen
#

When is 5.1 dropping by the way? Can I still PR and hope that my PR will be accepted into 5.1?

twin juniper
#

so late november/early december

fathom aspen
#

Season 5 will likely begin on Sunday, December 4, 2022.
Good to know, thanks!

twin juniper
#

But yeah they might release 5.1 earlier than that and just release Verse plugin aka Creative 2.0 with the next season 🤷‍♂️

fathom aspen
#

Oh yeah I forgot about Verse too. Wow too many things coming our way soon. One has to be ready for when the stuff start to kick in 🤓

twin juniper
#

Verse should be only Fortnite relative stuff so except you're playing Fortnite you might not be interested to it

#

The new thing i want to look for personally is Iris new replication system

kindred widget
#

Will be happy if they've fixed Vector2D math nodes in 5.1 😄

twin juniper
#

what's wrong with them

kindred widget
#

Try to multiply a Vector2D with a float.

twin juniper
#

oh yeah

#

it does not work

#

i'm pretty sure it's not the only math node that is broken

#

i got this issue with a few other nodes :/

twin juniper
sinful tree
#

😦

#

Can't copy and paste that node from blueprintue?

simple crow
#

i feel like im starting to understand replication concepts but theres something im stuck on.. I have a pickup, I am feeding it a data asset for it to initialize itself. I initialize it on the server, and set its mesh there. But since that event is a server event not a multicast event, no clients see it. So I think to make the "StaticMesh" property a RepNotify function, to set the mesh there. Thats working great... But now when i play the game standalone, there seems to be no rep_notify event called. So my code works well in multiplayer but not single player anymore lol. Do I manually call OnRep for that variable after I set it? And is that going to introduce redundant calls to update the static mesh in a multiplayer game?

fathom aspen
#

Right OnReps don't get called automatically for you server-side

#

Just call it manually yourself after you set the value

#

Nothing exceptional beyond that

#

Nothing is redundant there. You are just making sure your game works the same on the different net modes

simple crow
#

so, run the function on the server.... the function changes the servers version of Mesh.. Repnotify takes care of clients receiving that value, and then i call repnotify while still on the server so the server remains in sync in terms of state

#

and i guess thats only one call per "client/server"

fathom aspen
fathom aspen
simple crow
#

im just double checking, in the interest of keeping things in sync... if i want to do something like update a base actor variable, in this case i want to "SimulatePhysics" on a component. Do I need to make an additional replicated variable inside the actor like MyCustomActorSimulatePhysics which calls OnRepNotify which sets the components SimulatePhysics to true or false?

#

I guess thats just a long winded way of asking can i replicate already existing actor properties in C++ easily

fathom aspen
#

Yes. You want to replicate the property that drives that other property that you wish to replicate

#

So pretty much what you said

#

It doesn't have to go by the same name, as it goes by the the event that happend

#

Say bDied

simple crow
#

ok cool! thank you. I used to really rely on multicast events when i was trying this in BP.. before i understood their purpose. And i was doing a lot of state synchronization by calling events multicast (like actor set hidden in game) or something. But I know now that i would run into major issues with actors going in and out of relevancy. Was just checking that my thoughts were correct on how to replicate state.

fathom aspen
#

But they run on all connected clients

simple crow
#

oh yea? whats the alternative for things you want to be one offs like playing a sound or a particle event?

fathom aspen
#

Find all pawns in relevance radius and client RPC?

#

I think they meant to use it, but to avoid for state

simple crow
#

haha dont confuse me! 😄 Is that pawns in relevance radius a good method?

fathom aspen
#

But that YT tutorial told me it's fine to mark it reliable and call it on tick

hazy snow
#

I cannot for the life of me get the OptionsString to work in my game... I'm trying to connect to a server via OpenLevel via ip address, and tried passing the options 2 ways

#

then in cpp in my GameMode:

void AArenaGameGameMode::PreLogin(const FString& Options, const FString& Address, const FUniqueNetIdRepl& UniqueId, FString& ErrorMessage) {
    Super::PreLogin(Options, Address, UniqueId, ErrorMessage);
    UE_LOG(LogTemp, Warning, TEXT("ArenaGameGameMode::PreLogin() Options:  %s"), *Options);
    UE_LOG(LogTemp, Warning, TEXT("ArenaGameGameMode::PreLogin() OptionsString:  %s"), *OptionsString);
}
#

OptionsString only has ?Name=Player in it

fathom aspen
#

Yeah I can't think of a situation where I would mark it reliable tbf

fathom aspen
#

But anyways I would start by debugging this whole thing since the start, so you know where they are getting lost if any

#

OpenLevel should call UEngine::Browse and UEngine::LoadMap (so you can breakpoint those)

hazy snow
#

ok, i'll try digging into that

#

ty

quasi tide
twin juniper
quasi tide
#

Again - no.

twin juniper
#

You’re supposed to create mods, maps etc on UE and it’s synced to Fortnite

#

That’s literally what they showed up in their livestream 2 years ago

#

They was modifying map, placing actors inside UE and you was able to see the changes in real time on Fortnite

quasi tide
#

Yes - they obviously showcased it for Fortnite because Fortnite is their metaverse

twin juniper
#

But yeah I guess as everything Fortnite uses it will be coming for everyone later

#

Like a new generic plugin for modding games in general

quasi tide
#

He has said that he wants verse to be the standard programming language for the metaverse as a whole

#

So you could take it and put it in a different engine altogether

twin juniper
#

Do you have a link to the livestream ?

quasi tide
#

He wants to open source it

twin juniper
#

We’re not on Unity Slackers

quasi tide
#

But just waiting for Star Citizen to actually release first I guess 🤣

twin juniper
crystal crag
#

Does the push model not work with modular components?

twin juniper
#

Or mid next FN season

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

    FDoRepLifetimeParams SharedParams;
    SharedParams.bIsPushBased = true;

    DOREPLIFETIME_WITH_PARAMS_FAST(ThisClass, CurrentLevel, SharedParams);
    DOREPLIFETIME_WITH_PARAMS_FAST(ThisClass, MyExperience, SharedParams);
}
#

Not sure what I am doing wrong

#

UPROPERTY(ReplicatedUsing = OnRep_CurrentLevel)
int32 CurrentLevel = 1;

#

The OnRep_ is not firing

#

yeah'

quasi tide
crystal crag
#
void URaevinExperienceComponent::SetCurrentLevel(const int32 NewCurrentLevel)
{
    if (!HasAuthority()) return;

    if (NewCurrentLevel < 1) return;

    MARK_PROPERTY_DIRTY_FROM_NAME(ThisClass, CurrentLevel, this);
    CurrentLevel = NewCurrentLevel;
}
quasi tide
#

It's in some tweets of his that the other tidbits have been picked up on

twin juniper
crystal crag
#

yep

URaevinExperienceComponent::URaevinExperienceComponent(const FObjectInitializer& ObjectInitializer)
    : Super(ObjectInitializer)
{
    SetIsReplicatedByDefault(true);
}
quasi tide
twin juniper
quasi tide
#

That video is the only official information at all about Verse. Other than like 1 or 2 tweets that could've easily been missed.

crystal crag
#

Yep

#

LogRaevinExperience: Display: URaevinExperienceComponent::ProcessCurrentExperience() - Current Level: 1 ExpToLevel: 2.000000 ExpToNextLevel: 4.000000
LogRaevinExperience: Display: URaevinExperienceComponent::ProcessCurrentExperience() - setting current level to 2

#

I see that the method is actually getting called

twin juniper
#

No

#

It’s the same

crystal crag
#

Yeah and I can see Epic using that in their lyra project for the player state

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

    FDoRepLifetimeParams SharedParams;
    SharedParams.bIsPushBased = true;

    DOREPLIFETIME_WITH_PARAMS_FAST(ThisClass, PawnData, SharedParams);
    DOREPLIFETIME_WITH_PARAMS_FAST(ThisClass, MyPlayerConnectionType, SharedParams)
    DOREPLIFETIME_WITH_PARAMS_FAST(ThisClass, MyTeamID, SharedParams);
    DOREPLIFETIME_WITH_PARAMS_FAST(ThisClass, MySquadID, SharedParams);

    DOREPLIFETIME(ThisClass, StatTags);
}
fathom aspen
#

Pretty much like Super ... another fancy typedef

#

Ok at this point it could be something weird going on with Unreal. Not long ago Authaer had a similar issue: #multiplayer message

#

They added a replicated property and OnReps started to fire

#

Pretty sure that crap again

crystal crag
#

That's... really strange. I've never seen that before.

#

I have two replicated properties though

fathom aspen
#

That doesn't legitimate things in unreal terms tho

crystal crag
#

Though I guess let me add a regular non-push replicated property and see if that fixes it

fathom aspen
#

If you saw that issue you should expect everything at this point

crystal crag
#

Well I have added a regular (non-onrep) replicated float prop and recompiled both debug and dev editors... we'll see what happens

dapper obsidian
#

Anyone know why I might be unable to connect to a dedicated server running on my PC from a client also running on my PC, using open with localhost or 127.0.0.1 and with or without the port number?

crystal crag
#

Are you running both client and dedicated server outside of the editor/

#

?

fathom aspen
dapper obsidian
#

I've been uploading my builds to GameLift, the iteration times are killing me.

crystal crag
#

Adding a regular property unfortunately did not make a difference

jagged stag
pine reef
#

found it

grand kestrel
peak sentinel
#

and depends on if it will benefit fortnite ofc

#

but fwiw Mieszko told if you do a PR related with #gameplay-ai or #mass you can ping him in the server and they'll review

kindred widget
barren patrol
#

what is the command line syntax to select a map when starting a dedicated server?

#

i.e. ./TestServer -log -map ?? doesn't work for me

olive kraken
#

Hello! In a multiplayer game, accessing the save game from the player controller as client = accessing my client save game?

tame sapphire
#

Is it wrong to set a Playerstate variable straight from a w widget blueprint? trying to set an ability class and wonderig if it should go through the player controller in anyway?

kindred widget
tame sapphire
#

@kindred widget I should note its turnbased

#

so im setting it in the PS to be read by the server on turn activation (queing it essentially)

#

if that changes anything

finite goblet
#

what's a good way to sync in weapon ammo between client and server when client is firing a high rate of fire weapon?
if the client is firing 1000 rounds per minute , is it wise to choke the network with 1000 RPCs per minute telling the server that you fired a shot?

#

I can probably batch it each tick 😛

#

but then sudden disconnect would cause deyncs

fathom aspen
#

Not that I did it before, but I imagine you would want to predict and correct. So the client server RPCs telling the server I started shooting and then they should predict how much ammo are being spent till they send another server RPC telling the server they are not shooting anymore. Along the way you can correct the client, so things stay in sync.

#

That was an answer from a peaceful guy, that doesn't work with weapons, so take it with a big grain of salt

finite goblet
#

I've tried that approach once , it was disasterous due to ping

#

this is inverse relationship for correction , because client is the one who decides how many shots are actually fired

fathom aspen
#

Right, that's at least how it sounds, but you could make the server the one who decides and has authority, till that second RPC get to the server, telling them it's enough, or if the mag got empty

thin stratus
#

Probably some combination of a StartFire/StopFire RPC with Timestamps

#

Together with a synced clock and some RTT/Ping data, you can figure out if the Client is telling the truth about the Timestamps

finite goblet
#

might be too much work compared to just telling server the amount of ammo consumed at the end of each tick to the server?

#

only while the weapon is firing

mortal tusk
#

every time i tried to join my own server it crashed like this
any idea why?

chrome bay
#

And if those shots are hitting, it's two RPC's for every shot - so GLHF.

finite goblet
#

why not batch it?

chrome bay
#

Now if all 100 clients did this, obviously we'd be screwed.

#

We do now, but we never used to

#

It's very rare that firing and hit occurs on same frame because all shots are projectiles

#

So we don't benefit from batching all that much

finite goblet
#

not the hit , but the shots

chrome bay
#

They're happening over many frames, so can't really batch them

#

Time is crucial

finite goblet
#

if the client fires say 5 shots in a single tick , why not just tell the server 5 shots at the end of the tick instead of telling 1 shot 5 times?

chrome bay
#

They are never going to fire 5 shots in one tick though

#

They might fire 5 in a second, but we can't batch those together

#

Clients are never running at sub-20 FPS

finite goblet
#

Idkm , sending 1 rpc per shot feels like abusing the RPCs

chrome bay
#

You don't really have a choice

finite goblet
chrome bay
#

Server crashes and dies most likely

#

But that's not a problem we ever expect to have

#

The Start/Stop approach with timer sync rarely actually ever works - because the divergence in aiming is too great between client and server

clear island
#

I mean for 100 client all to be shooting at once thats not a very likely scenario in most cases though, is it?

chrome bay
#

So you have to send each shot with the exact aim the client had

chrome bay
#

UT uses a start/stop approach - but it only works because they force the character movement to send a movement RPC for each shot-fired frame, and process weapon state machine updates in lockstep with character movement updates

#

The other option is to give the designers a reality check

clear island
#

in the past I've also done research on this exact subject and it's my understanding that most if not all multiplayer shooters out there do an RPC per shot

#

the other approach has more complications, or so I hear

chrome bay
#

yeah it absolutely does

#

If you're using hitscan weapons, you can at least batch the shot and the hit into one RPC 🙂

chrome bay
#

If you're using projectiles, welcome to my pain

#

You'd be surprised how much you can get away with though 😄

#

Even if it feels horrible

#

MFW we added shotguns

clear island
#

yea I mostly use hitscan myself, not a fan of projectiles unless its for some RPGs and such

#

oh yea my shotguns have a max of 5 pellets per shot, no more than that

chrome bay
#

I know that Insurgency uses hitscan for the first 50 meters or so, as that's the majority of their engagements - but we're projectile from the get go

#

It's a clever trick though

clear island
#

interesting approach

chrome bay
#

But shotguns in a game where most people are 200-500M away are thankfully largely useless

#

We do batch hits together if they are in the same frame though

#

Rare as it is.. we tried

#

If you think though, Fortnite weapons are all individual ability activates for each shot - and those activations have quite a chunky payload

clear island
#

I mean when you have the money to spend on good servers, alot of these problems are just not that much of a big deal I think

#

not only good servers, but many of them, in every region

chrome bay
#

It's still a lot of work, but the game is mostly about shooting so.. it's fair to dedicate most of our budget to that

clear island
#

true

#

maybe iris will improve things 🙂

chrome bay
#

yeah, I think that's more oriented towards better server performance which is the bottleneck for most people I think, at scale anyway

rose egret
#

how do I know actor is in listen server based on their local and remote role ?

#

I have a Muticast RPC and I want it to be called only for simulated proxyies. it works in dedicated server. but not well in the listen server

fathom aspen
#

Actors on listen-server have no RemoteRole, and their LocalRole is always authority

chrome bay
#

IsNetMode(NM_ListenServer) is probably easier way

rose egret
#

yea but im damn in BP only

#

😦

chrome bay
#

RIP

rose egret
#

😁

fathom aspen
#

IsServer && !IsDedicatedServer

rose egret
#

I guess they dont work well in PIE huum ?

fathom aspen
#

They do

rose egret
#

🤔

fathom aspen
#

Answered yesterday, you're welcome

fathom aspen
#

Could also be that you forgot to set up a starter/default map

mortal tusk
#

also how come this server doesn't have any players
did i miss something?

fathom aspen
# mortal tusk explain pls

I don't work with WP myself so I have no idea what's that. You will want to debug why that assertion is failing, pretty much like I would do.

rose egret
#

@fathom aspen instead of that IsServer && !IsDedicated server , this one worked

bool bSimulatefire = actor->GetLocalRole() == ROLE_SimulatedProxy && actor->GetRemoteRole() == ROLE_Authority 
                  || actor->GetLocalRole() == ROLE_Authority && actor->GetRemoteRole() == ROLE_AutonomousProxy;
fathom aspen
#

You said you're doing it full BP, no? (or that is a sketch of your BP?)

rose egret
#

would give true for simulated proxy if game is ded server, and true for simulated proxy in listen server (except the listen server himself)

#

yea but I wrote it here

#

cause I cant upload image lol

fathom aspen
rose egret
#

holly s***
in PIE listen server, character who is owned by listen server has RemoteRole:Simulated but in standalone lunch RemoteRole is Autonomous

#

🤔

blissful dagger
#

Hello, could you please help me?
I'm only starting to learn about the Replication system.
I couldn't discover anything about some player modifying some actor properties to only be seen by this player (for example, UStaticMeshComponent Visibility)
Replication appears to be for all clients to see the same thing that the server "sees", but what if I require different models to appear above npcs for different players based on their quest progress? Is it necessary to spawn new separate actors above each npc for each player?..

fathom aspen
#

Use SetHiddenInGame, you're welcome

rose egret
#

a muticast called from listen server, how do I exclude _Implmentation for listen server ?

fathom aspen
#

!IsLocallyControlled()

valid imp
#

Hey there. I put this in my GameMode, yet when playing in Listen Server mode, ALL player screens print "I AM SERVER". I expected only one (the listen server) to actually print this. How the hell? GameMode should only exist on the server, no?

{
    GEngine->AddOnScreenDebugMessage(-1, 5.0f, FColor::Blue, FString::Printf(TEXT("I AM SERVER")));
}```
eternal lake
fathom aspen
#

You want to either use Kismet's Print

rose egret
#

@fathom aspen no no not that, its was my previus bug

fathom aspen
#

Or turn off "Run Under One process"

rose egret
#

Why the hell there is no Is ListenSerever

bool UKismetSystemLibrary::IsServer(const UObject* WorldContextObject)
{
    UWorld* World = GEngine->GetWorldFromContextObject(WorldContextObject, EGetWorldErrorMode::LogAndReturnNull);
    return World ? (World->GetNetMode() != NM_Client) : false;
}

bool UKismetSystemLibrary::IsDedicatedServer(const UObject* WorldContextObject)
{
    UWorld* World = GEngine->GetWorldFromContextObject(WorldContextObject, EGetWorldErrorMode::LogAndReturnNull);
    if (World)
    {
        return (World->GetNetMode() == NM_DedicatedServer);
    }
    return IsRunningDedicatedServer();
}

bool UKismetSystemLibrary::IsStandalone(const UObject* WorldContextObject)
{
    UWorld* World = GEngine->GetWorldFromContextObject(WorldContextObject, EGetWorldErrorMode::LogAndReturnNull);
    return World ? (World->GetNetMode() == NM_Standalone) : false;
}
fathom aspen
fathom aspen
#

They mean a function that explicitly checks IsListenServer that is exposed to BP

valid imp
fathom aspen
eternal lake
#

Which, given the existence of IsDedicatedServer, implies enough separation to be able to use IsServer synonymously with IsDedicatedServer

fathom aspen
eternal lake
#

You expect me to read???

fathom aspen
#

No, but you replied to me and I replied back

eternal lake
#

/s

rose egret
#

@fathom aspen man thans you so much !IsLocallyControlled() fixed my problem

#

BP makes me confused

valid imp
fathom aspen
#

Yeah that was expected.

#

Then the other option is your last resort

eternal lake
#

UE_LOG is your friend

fathom aspen
#

They won't be able to see it on screen though

#

Not that there is log for each window that opens

eternal lake
#

on screen debug is overrated

valid imp
#

Unfortunately, unticking Run As One process seems to prevent me from running multiple windows.
My root need is to debug by finding where (server, client) stuff is executed. Maybe there is a better way instead?

fathom aspen
#

Iteration times will be slower with that option being off, but at the end of tha day your game isn't going to be played in a PIE environment

#

So there is nothing you can do about it

valid imp
#

I don't care about the time, but if I'm completely unable to run multiple windows with it then I won't be able to debug ANY multiplayer stuff, which is a problem.

finite goblet
#

apprantly if you put a ufunction to be "Unrealiable" it'll starts dropping very quickly even when there's plenty bandwidth left

#

its like it needs 99% of the bandwidth to be free to be replicated

fathom aspen
valid imp
#

PIE allows you to select a number of players and opens multiple additional windows when clicking Play, one for each player.
If I untick Run as One Process, clicking on Play will not open any additional window.

#

Nevermind, I was just too impatient. Thank you for your assistance. Sorry for my dumbness.

finite goblet
#

lmao that was anti climatic

blissful dagger
# fathom aspen Use SetHiddenInGame, you're welcome

thanks of course, but I asked about how the client could change the visibility of an actor he doesn't own only for himself to see and not what function to use to change the visibility. Do you mean that normal methods can do that? Its not working for me, I thought it was because only the server can change replicated actor's components

elfin lintel
#
{
    uint32 index = GetUniqueID();
#if WITH_EDITOR
    ACB_LegacyGameState* gameState = GetWorld()->GetGameState<ACB_LegacyGameState>();
    index = gameState->PlayerArray.Find(this);
#endif

    return index;
}```

For testing save games in a multiplayer game in the editor, would this be an okay way to do it? Since GetUniqueID() returns a new random number for each time I play in editor, I can't use GetUniqueID() to test save games in editor. (And I was using GetUniqueID() as an identifier to save player information). I was hoping to create a solution that would work both in testing and through steam.
twilit radish
#

I mean if it works why not. I think it's just fine, might use it my self honestly as I exactly know your problem 🤣
Although what I don't understand is why GetUniqueID() returns an index if this is inside the PlayerState?

#

That should be a FUniqueNetIdRepl 🤔

elfin lintel
#

I think there is GetUniqueID() and GetUniqueId(), the latter returns FUniqueNetIdRepl

twilit radish
#

Oh the last letter... I see lol.

fathom aspen
slim mist
#

For a game mode with capturable bases between two teams, should the status of the base's affilitation be in the game mode or a replicated property in the game state?

quasi tide
#

I'd say a replicated prop of game state - after all, it is the state of the game

slim mist
#

First thought is to have the array just be an int array of the base's team affilitation, but that leaves open the possibility to have the index of the values be out of sync with the client. I just need to make sure theyre in sync

quasi tide
#

idk - depends on the context. The bases themselves - I'd have a replicated prop, after all, they're server owned anyway. It'd be their team designation. Then in the game state I'd probably just have a count for how many bases a team has or w/e

elfin lintel
# elfin lintel ```uint32 ACB_PlayerState::CB_GetID() { uint32 index = GetUniqueID(); #if WI...

First test of this results in the PlayerArray order not being consistent between new games and loaded games (I'm not saving it and reloading it or anything, just on generation it is different between saved and new games, and I'm not sure why). In new games, the Host is at index 0 and new players as index 1. In loaded games, for some reason, the host is at index 1 and the client is at index 0. For testing purposes it doesn't really matter to me which player is which, so I think I can actually use PlayerArray.Num()-1 instead of PlayerArray.Find(this). Because after I get this "ID", I am checking to see if I have any saved players with that index, and if so, load that player, and if not, initialize the player as new.

slim mist
#

Is IOnlineEvents::TriggerEvent the equivalent of sending a JSON request in web dev land?

#

(obviously its not json)

#

looks like that function is implemented via the online subsystem. I can find the implementation for EOS but not for Steam. Is that available somewhere?

fathom aspen
# elfin lintel First test of this results in the PlayerArray order not being consistent between...

Even when disconnecting the PlayerArray Indices could be flipped, thus what you did is absolutely inconsistent. What I would do instead is either use PlayerState.PlayerId (can't speak of it, but seems promising for basic editor testing stuff), or either embrace what the engine does when UniqueIds are not in the equation, which uses SavedNetworkAddress. See AGameMode::FindInactivePlayer for reference

slim mist
abstract pike
#

Is there a good resource anywhere for what happens to player controllers when seamless travelling?
I currently have a bug happening where I just don't get a player controller after a ServerTravel call 🤔

fathom aspen
#

Luckily there is, it's found in this channel pins (latest pin)

abstract pike
#

Out of curiosity

#

Are there any known major gotchas for why a player controller might not exist?

fathom aspen
#

By default, there should always be one, by either the previous persisting or a new one getting created.

#

Breakpoint those and see what's going on

abstract pike
#

Turns out it's just one client

#

Not getting it

#

A player controller should try and replicate over and over again though right so it should eventually replicate?

fathom aspen
#

Yeah it's always relevant only to owner

abstract pike
#

Wait let me check that I have all the player controllers on the server because maybe that one doesn't exist even though the others do

fathom aspen
#

Out of curiosity, is the travel seamless/hard?

abstract pike
#

GetWorld()->ServerTravel(transitionToMapString);

#

I don't know what this is

#

But it's that

#

So basically I have a game lobby where everyone picks a character, and everyone is able to do so, so clearly everyone has connected and has a player controller at that point

#

And then we call that server travel and after that one of the player controllers doesn't seem to be created on the server

abstract pike
#

So I guess it's supposed to be seamless and I should be looking in HandleSeamlessTravelPlayer

#

Though I don't know the difference between hard and seamless so I should look that up first

fathom aspen
abstract pike
#

Oh, how would I tell what type we use then?

fathom aspen
abstract pike
fathom aspen
abstract pike
#

Ohh I just read your guide info about it

#

Yea we would want a hard travel in this case

fathom aspen
abstract pike
#

Seamless is for like loading level ahead of someone in an RPG right?

abstract pike
#

haha

#

OK I'll go look for bUseSeamlessTravel

#

Turns out it is

#

Oh wait I read more of your description and jumped the gun a bit

fathom aspen
abstract pike
#

Remaining connected to server is better for sure

fathom aspen
valid imp
#

What criteria does the Engine use to match mesh components between clients and server? Is just having a common name enough?

fathom aspen
#

Sometimes a hard travel is inevitable though, but that is a long story that the compendium goes over

abstract pike
#

Well I guess maybe that's a tangent because clearly it works most of the time already

fathom aspen
#

Stably naming them
Creating them via Simple user construction script
Loading them from package
Creating them on server and replicating

fathom aspen
valid imp
#

Thank you.

abstract pike
#

OK so to debug a player controller not being created on the server after a seamless travel

#

I want to breakpoint in login?

fathom aspen
#

Login is for hard travel

abstract pike
fathom aspen
#

Not override

#

Just breakpoint an engine function

abstract pike
#

Hmm

#

I can't repro this in the editor

#

It only happens sporadically in live

#

So I've only been tracking it with logs so far

#

If I had a 100% repro I could attach a debugger but atm it would just be a waste trying to catch it

fathom aspen
#

Well you don't need editor anyways, because you can't seamless travel in PIE

#

Well you can (but it's hacky)

#

You need to attach a debugger to your standalone process

#

And debug that

abstract pike
#

Oh it has a log there already

#

Let me check if that function is being called for them all first

#

Is this >> direction relevant?