#multiplayer

1 messages ยท Page 556 of 1

winged badger
#

call super ๐Ÿ˜„

#

there

dawn summit
#

so...in pawns there's an event OnRep_Controller() ?

#

why it's not exposed by default?

#

i mean, it's super useful

#

super

winged badger
#

yes it is

#

one of the many reason i recommend constraining network code to c++ only

#

there is also SetPawn function in controller

#

which is the common point all server and client logic eventually passes through

#

very good place to go and (un)bind delegates and such

dawn summit
#

SetPawn...i'll take a look

#

i'm new to network, and our game is coop...so many new things to learn

#

@winged badger what happens if this pawn possessed by AI controller on server?
cast fails, but the function being called?

winged badger
#

unless you go around the default settings to manually replicate the AIController

#

nothing

#

as they don't replicate

dawn summit
#

ok, was not aware of that

winged badger
#

and you don't have to have APlayerController* in BPImplementable

#

you can go for just plain AController*

#

then cast in BP if required

#

thats your preference there

dawn summit
#

one more question, where i can read about AI then, if ai is not replicated how does it work?

winged badger
#

Pawn is

#

Controller is not

dawn summit
#

ooh

#

so it just replicates the puppet, not strings

winged badger
#

replicating is just tweaking the replication settings tho

#

i chose to replicate my AIControllers

dawn summit
#

reasons?

winged badger
#

got an AIController between the PC and the Pawn

#

PC actually possesses ObserverPawn, not the Hero

#

seemed like a more convenient way to tie everything up without using any delays or such abominations

#

its only replicated for heroes and hero bots, not for monsters

#

that would get pricey when evaluating actors for replication

dawn summit
#

i guess it's your game specific then?

#

is that some king of moba?

#

as you control many characters at once

winged badger
#

you control one, its a tactical co-op real time shooter

dawn summit
#

I have one more question to the pile, how to handle "unpossess" on client? Should i make new implementable event in case if onrep will pass no controller?

winged badger
#

unless its possessed again

#

OnRep will fire with Controller being nullptr

dawn summit
#

oooh

#

okay

winged badger
#

just be warned that if its not possessed immediately

#

you'll get one OnRep with nullptr at start

dawn summit
#

so, this

ClientPossessed(Cast<AController>(GetController()));

will be called with nullptr as controller?

winged badger
#

when actor is spawned on client

#

all of its replicated variables are sent with their current value in the bunch with instructions to spawn the Actor

#

even if they are default values

#

Actor is spawned, replicated variables are set, OnReps are called, and only after that goes BeginPlay

#

note that Actor is not queued for replication the moment its spawned

#

so spawning it, then possessing it results in Actor having being possessed before it replicated

dawn summit
#

jss...

#

so is there some confirmation it was replicated?

winged badger
#

there is an ack, but thats deep in the engine

dawn summit
#

okay, if not, what's the best practice? wait?

winged badger
#

you don't need to do manually what engine does by default

#

ack is there so packet gets resent if it was lost

dawn summit
#

no, i mean, possession

winged badger
#

depending on your network load, number of replicated actors net priority, net update frequencies and relevancy

#

it might take a while for actor to replicate

acoustic scroll
#

Any good guides for noobs in c++?

clear copper
#

Ok there must be something i'm missing with SeamlessTravel. Literally everyone just says click the box in the game mode and it will work. But it never does. My GameMode has seamlesstravel checked. My console command is ServerTravel. When i launch the game, it kicks all of my clients out and only moves the host. If i uncheck seamless travel, it works completely fine to move everyone to the new level. I can't find a single video or tutorial on using Seamless Travel and it's driving me insane.

winged badger
#

it does not work in PIE

#

like, at all

meager spade
#

we use seamless travel, had 0 issues

#

soo you are doing something wrong

clear copper
#

I'm aware i'm doing something wrong but my point is that there aren't any resources on it. Every resource just says tick it in the GameMode which I've done.

#

My gamemode has it ticked

#

when seamless is ticked, it kciks all clients. when it's not ticked, everyone goes there just fine

#

am i missing something?

#

that event is in my GameMode btw

winged badger
#

thgat looks fine

#

you are trying to do this with standalone/cooked version, yes?

clear copper
#

i did a packaged build

#

It has to be some issue with some setting somewhere. I'll try making an empty project just for servertravel from scratch and see if i get the same issues.

winged badger
#

i don't think seamless travel requires a path

#

just the level name

wicked brook
#

i thought seamless could only be done with open level node?

winged badger
#

i never used openlevel for seamless

wicked brook
#

Maybe no transition map set?

meager spade
#
    UKismetSystemLibrary::ExecuteConsoleCommand(PC, URL, PC);```
#

this is all we do

#

MapName is not the full path

#

just the name

#

so our map is /Game/Maps/SomeMap

#

we just pass in SomeMap

#

need to ensure SomeMap is also in your cook list, and you MUST have a transition map

wicked brook
#

Yeah it always works for me too idk

swift kelp
#

@winged badger I remember you were helping me out earlier.
The reason I was getting the wrong IP was due to VMware IP virtual networking.
Now
SessionInterface->GetResolvedConnectString(SessionName, Address)
gives me the correct IP but 0 for the port
I could use a find and replace on 0$ but that would seem sloppy.
Do you know a better way so I could find its port dynamically?

winged badger
#

nope

swift kelp
#

said it works for him but only during one case it doesn't, mine doesn't work even when I do right-click launch ๐Ÿ˜ฆ

#

I ended up just doing
Address = Address.Replace(L":0", L":7777"); and I am able to connect to the host after that
I don't have a controller but I think that is a different issue

swift kelp
#

#define STEAM_SDK_VER TEXT("Steam[Current Version]")

#

how do they want current version

#

v149 or 149 or 1.49 or v1.49
I would guess probably the first (like the folder) or keep it simple like the 2nd
but want to know for sure.
I hate it when people write documentation without examples

fallen pawn
#

Its like it has this weird eye offset that is making no sense to me

thin stratus
#

There is some boolean on skeletalMeshes for updating bone transforms on dedicated servers. Could that be related?

#

I think it was on the skeletalMeshComponent at least

#

@fallen pawn

fallen pawn
#

ill check it out right now

#

Its in the skeletal mesh asset itself..? or in the Skeletal Mesh component in an actor

#

I cant find one like that

#

this is enabled by default @thin stratus

#

i dont think its related

thin stratus
#

Not physics

#

Bone updates or something :<

fallen pawn
#

O

thin stratus
#

Ah

#

Search for "MeshComponentUpdateFlag"

#

What is that set to?

fallen pawn
thin stratus
#

Did they rename that?

fallen pawn
#

maybe, this is unreal 4.24

#

hmm ill look for that manually

thin stratus
#

Should be in the same menu as what you just showed

#

(Enable Physics being the second option in that image)

#

Image is from AnswerHub though

fallen pawn
#

doesnt exist here

thin stratus
#

eeeeeeeeeeeeeeeehm

#

I'll check once my editor booted up

fallen pawn
#

I don't think this bug is skeletal mesh related though, its an issue with Any AI controlled character on dedicated servers onlyt

#

listen works fine

thin stratus
#

There shouldn't be a diff between Listen and DS in terms of AIController

#

So let's at least try this, because I know it caused issues in the past

fallen pawn
#

the second i posses the same pawn as a player the problem is gone, even on dedicated

#

yeah sure

thin stratus
#

Yeah, which brings me to the idea that this setting is set to only update when rendered

#

Which a DS doesn't do

fallen pawn
#

Oh right

#

makes sense

thin stratus
#

Search for

#

VisibilityBasedAnimTickOption

#

Does that show up?

#

(What a terrible name)

fallen pawn
thin stratus
#

Alright. Was worth a shot

fallen pawn
#

damn, its really mind boggling, the only other person i found with the same issue on the answer hub edited his post and said "nvm fixed"

thin stratus
#

Then I'm not sure atm. I would start stepping through the aim code.
Are you using aimOffsets for this (animation)?

fallen pawn
#

๐Ÿ˜†

#

Yeah i am, but even if I fire the bullet from a scene component

#

it fires directly down at its feet

#

which leads me to believe its a quirk with how AI looks around on dedicated

thin stratus
#

I would double check what the Aim Direction, Start and Endpoint are.

fallen pawn
#

Sucks that draw sphere debug doesnt work out of the bag on dedicated

#

you gotta multicast it or something to see it

#

its like shooting from where it WOULD be shooting from if it was aiming directly down

#

but the pawn is following the direction just fine

#

i suspect its something to do with this
like camera rotation is not network synced or something

#

i tried it firing from a literal cube floating above its head, and it still shoots from the actor origin

fallen pawn
#

I think its an engine level bug seriously
I've tried just about everything, and made sure things are hooked up

#

even if I give it a point in the world to shoot from, it still aims in a random direction on dedicated

#

its the forward vector it cannot do

#

it has something to do with the pawn's eyes, or viewpoint

#

its like never attached to the player, its at world position 0,0,0 maybe

fallen pawn
#

so i was wrong, its animation related

#

is there a way to force render bones on dedicated server?

#

i thought i had it selected, but i had the wrong "always"

#

thanks again, life saver!

thin stratus
#

AHA!

#

๐Ÿ˜

gloomy wind
#

Hi everyone, I want to run a VERY basic .js file in a blueprint, what options is there?

chrome bay
#

Probably need to find a third-party JS plugin

gloomy wind
#

ok thanks

cursive mortar
#

@gloomy wind Check VARest. It has some JSON features for UE4. It can be used directly in BPs

gusty slate
#

For those using Steam for MP and having taken a look at the logs, do all MP matche sessions have the type Lobby? I am having some issues with hosting a game, leaving, then trying to search and join other people's sessions. The logs are a little confusing while I'm trying to figure this out

#

This was basically hosting, leaving, then trying to join another player's session

clear copper
#

Unreal documentation for Seamless Travel says I can add other actors to persists through seamless travel. How do I add the GameState to this list?

The GameMode actor (server only)

Any actors further added via AGameModeBase::GetSeamlessTravelActorList
thin stratus
#

Any actors further added via AGameModeBase::GetSeamlessTravelActorList

#

Override that function and add it. But I would suggest not adding the GameState. There is probably alot of stuff in there that should not persist

soft relic
#

Anyone used Playfab here? I have a small issue I need help with but cant find enough documentation on it

chrome bay
#

also bear in mind that seamless travel actors are still destroyed. Player States/Controllers just copy properties accross.

clear copper
#

@thin stratus ty probably smart. Should I just use the GameInstance to carry over the 4 variables i need from my lobby to my game? For example the host selects a game mode and a difficulty so I'm trying to find a way to tell the game mode what difficulty to use when the players move to the new level and it starts.

solar ivy
#

i've packaged dedicated server for linux and when i'm launching it i'm getting some errors related to Steam API. is there a way to disable Steam Subsystem on server only? i still need to have it on client.

clear copper
#

Is the Ready to Start Match constantly checked? If I override it with this, will this wait until everyone has connected?

soft relic
#

How does playfab authorize a client to let him in the server? I get the matchmaking ip and port fine, but when trying to connect to the ip I timeout

gusty slate
#

Should DestroySession be called from the server?

#

for the host

green delta
#

Can someone explain how client side prediction works for the unreal game ability system (GAS) plugin? I mean, I get it for movement, it's built in the movement component and there is lag compensation built in.
However, I keep hearing folks touting how amazing GAS is because of that but how in the world is this relevant?
I can activate an ability and then what? How would client side prediction work at all? Until I commit the ability, the server/client cannot do any prediction and when I tested it, it lagged as much as it should, I did not see any form of compensation. So what does it compensate with??

winged badger
#

it doesn't, it just allows clients to start the effects locally without having to wait for server confirmation, and provides mechanisms to roll the predictive actions back

#

and by clients i mean owning clients

chrome bay
#

Also prediction != lag compensation

thin stratus
#

@clear copper Options are a thing

#

You can always move data over via ?key=value

clear copper
#

ah that's true

thin stratus
#

And then grab them in the gamemode by getting the OptionString and parsing it

#

Just make sure you don't specify ?game=gamemodeshortcode

#

Because that actively triggers ue4 to start the map with that GameMode

#

Unless you want that

clear copper
#

yeah that's probably best given how few i need

#

i just really need ?difficulty=standard?numplayers=4

#

something like that

thin stratus
#

Some of this you actively need to do

#

?NumPlayers=4

#

Is actively used by ue4

#

It will kick the 5th person when connecting etc

#

So it's probably good using the options

clear copper
#

Yeah i was going to use the MaxNumPlayers option like in the networking document

#

but i also saw the traveling players

violet sentinel
#

is it possible to use levels made with world composition in multiplayer without dedicated server (we use listen servers only)
got bunch of new quite large maps to integrate to project and now players load in empty areas

winged badger
#

only difference between listen and dedicated servers there is not being able to guarantee someone won't try to host with a potato

#

as far as that goes

#

also, listen servers can't run all optimizations dedicated servers do

#

like not rendering anything, it has to tick at least some bones and animations...

#

so possible, yes, easy, no

fresh grotto
#

Hey um... I've been kind of working on this brainchild of hooking phones up to my game so you can have several phones hooked up as controllers at once.. I'm currently running with like... each phone has it's own build of the app and it connects via matchmaking on the local network... Is there a better way to do this or am I barking up the correct bunch of trees?

#

Because it's working right now, I'm just wondering if it's efficient

summer tide
limber gyro
#

try figuring out if its a posses/spawn issue or a camera issue by manualy possesing/ moving the camera

#

thats the only thing that comes to mind

summer tide
#

It only doesn't work in a C++ project.

meager spade
#

its a possession issue

#

ie it cant find a proper start position

#

100 percent

summer tide
#

I just migrated the default vehicle template into a blank C++ project in UE4.25

meager spade
#

set your player starts up properly

#

ensure the pawn is set properly in game mode

summer tide
#

It works fine in all other modes

#

Not in dedicated as well

limber gyro
#

maybe the car is not being spawned in the client? we need a bit more info

summer tide
#

What info do you need? So in my blank C++ Project, I switched to the vehicle game mode which uses the vehicle BP.

#

I haven't touched anything in its code

#

I C

#

WOuld it help if I place player start?

#

I think I need to make them spawn in diff locations. In the vehicle template the vehicle spawn in diff locations

#

I'm missing that

#

I guess all I have to do is to place a bunch of player starts

#

Thanks guys it was helpful . I assume there's a better way of spawning instead of placing player starts.

winged badger
#

you can override chooseplayerstart in gamemode

#

to do whatever you like

#

just note that gamemode will by default stash the first startspot assigned to it (doesn't have to be playerstart) in the PC

#

and will use it for all respawns later on

lavish cypress
#

Using Advanced Sessions plugin, I can't call CreateAdvancedSession in C++ because the wrapper class is set to MinimalAPI. Do I need to write my own session handler?

terse prawn
#

in my project I have players able to create more than one character. how would i go about storing this in the server? would I use a game save or is there a better way?
I can only see game saves being used and then I also dont know how I'd really store it.

tacit pecan
#

Hey does anyone have 10 mins anytime for a quick call? Ive developed a prototype for a multiplayer game and i need to understand how servers and online subsystems work ( APIs too if that isnt an included topic in that).. anyway i just need a general guidelines to know what to search for. Id really appreciate it guys, thanks

crude coral
#

deploy the dedicated game server (Linux) for UE4 ...AMI (Amazon container image) with docker approach.. success!

waxen socket
#

Good afternoon. Is it common when replicating on button presses to call a RunOnServer event that then sets a RepNotify variable in order to perform an action on every client?

dawn summit
#

Where should i put logic that sets cvars tar are related to GameMode? (GM only exist on server so i cant plug it to GM)

#

@waxen socket not sure if it's common, but it's the only way that i think is consistent in result

#

Press key -> run RPC
RPC sets some OnRep Notify enabled variable on server

waxen socket
#

Thanks for replying. Yeah, it's the only alternative to MultiCast that I can think of.

dawn summit
#

this is only if you need some state changing event

#

multicast -> event, happens once

#

onrep -> happens even if player will join later, or will enter relevancy range after the event

#

i.e. multicast is good for explosion effect
onrep is good for replicating the destruction that was caused by this effect

#

as destruction stays, but explosion should not happen later in time

waxen socket
#

I'm working on barrel glowing at the moment. So by using RepNotifys, a player joining midgame will see the glowing barrels of those who have fired recently. Does that make sense?

dawn summit
#

yes

#

repnotify will update joined player's variables to match server ones

waxen socket
#

And run the related OnRep_ function, right?

dawn summit
#

OnRep runs automatically on client when server thinks "this player has variable different than me"

#

not sure how server decides this tho

#

https://www.youtube.com/watch?v=16BvKb-OPOg this is good series on topic, still was not super simple to grasp

BRY

๐ŸŽฎ Unreal Engine Replication Series - Part 1: What is Replication?

๐Ÿ‘‹ Welcome to the Replication Series! This beginner tutorial series dives deep into how Unreal Engine handles Replication. Understand more than just the "how" and explore the "why" behind important concepts tha...

โ–ถ Play video
waxen socket
#

I've watched those, yeah. He keeps it entertaining. ๐Ÿ˜„

dawn summit
#

part 4 is about repnotify (OnRep in c++)

waxen socket
#

Thanks. I don't suppose you know what the "Replicated" checkbox in Timelines does?

dawn summit
#

it replicates state of the animation

#

it is better not to...

waxen socket
#

Is it expensive?

dawn summit
#

if you can avoid it

waxen socket
#

Is that because it's not fully supported?

#

It seems kind of like an afterthought.

dawn summit
#

the issue here it replicates "position"

waxen socket
#

And does that take up a lot of bandwidth?

dawn summit
#

well, epic made it for some reason, so it may be optimized, but i wouldn't bet on it
maybe someone more knowledgeable can tell

waxen socket
#

Thanks for your time. I hope you find the answers you're looking for.

dawn summit
#

In between replication updates, the client does extrapolate play position.

#

i guess it's good for some cases when direction may be changed unexpectedly

#

direction of play

delicate zinc
#

Hi, I'm trying to make a simple inventory system but idk how to replicate it. If anyone can help that would be amazing

#

its more of a one weapon and 2 ability system

dawn summit
#

i definitely can't...we implemented simple inventory replication, and it was a pain in the butt...still is

shadow aurora
#

I'm having some really weird issues here and I genuinely am at a loss as to what to do. I am attempting to update the control rotation for a character. If I set it on the client, the server's idea of what the control rotation obviously never changes. However, even if I do set it on the server the value never updates in the eyes of the server. I've monitored the value and it literally will not change after calling SetControlRotation. Does anyone know if there's some sort of restriction for calling SetControlRotation in a server RPC?

waxen socket
#

Hey Method. I just worked through a bunch of issues with replicating rotation. Maybe I can help.

#

Have you set any of the UseControllerRotationPitch/Yaw/Roll properties on your pawn?

shadow aurora
#

No I have not, mostly because of the movement style we're using.

waxen socket
#

I believe only Yaw is true by default.

feral tendon
#

Hello all!

I have more of a conceptual question:
How would you approach throwing objects that have to persist in a multiplayer game - for instance a cube that you later need to jump on?
As I have read, physics syncing is quite complex topic.
I guess it would be easier to handle temporary physics objects such as bullets and grenades.
Any ideas?

swift kelp
#

PlayerController->ClientTravel(Address, ETravelType::TRAVEL_Absolute);
and the logs show the correct ip and port 192.168.86.94:7777

#

this part doesn't look quite right but not sure if it is important Created socket for bind address: 0.0.0.0 on port 0

winged badger
#

open ip:port won't work if there is a router in the way and its ports aren't forwarded

#

(server)

delicate zinc
#

Hi, I need some help figuring out how to set the character reference in my actor component that stores all of my weapon and ability variables. When I do get player character it only gets the server on the listen server.

feral tendon
#

Try GetOwner()

delicate zinc
#

okay, ty

#

that fixed everything, thank you so much. I've haven't used actor components many times

winged badger
#

you'd do well to avoid GetPlayerCharacter/GetPlayerController until you understand what they do exactly

#

also, not using them gets you to understand the relationships between game objects sooner

inland hedge
#

Question, first game I'm making in UE4:

  • Setup with dedicated server

In my BP_Player (which is a Character class) I have the events for the inputactions, such as lookup, lookright, jump etc. They set the values through the "set controller input" functions. The pitch and stuff in the animation blueprints reference the character - there's a cast to BP_Player in the ABP and that fetches the control rotation and velocity and such.

This does not work. Other clients do not see the pitch updated for other characters. Now my question;

Am I correct if I say the following:

  1. The YAW does work, because the checkbox "get yaw from controller" is checked, thus its updating its yaw value from the controller, and that value is replicated through the Character, thus showing correctly on all clients
  2. The ABP on other clients is not working because the "control values" are not replicated (e.g. the controller only exists on owning client and server, but no controllers for other clients) - every client only has 1 controller, its own
  3. I need to move the input logic away from the character, and stuff it in the controller (makes no sense to have all that code for every character instance? )
  4. I need that input logic from the controller to update values in its attached (or posessed is the right term I think) character
  5. Since the character is replicated, and the ABP would then use values from the character, the ABP would work on all clients? (if the right BP_Player values are replicated)
  6. Obviously replace the "get control rotation" with a "get <rotation_variable_in_bp_player>" because there is no controller attached
winged badger
#

@inland hedge pull where your camera is looking at with PlayerController->GetPlayerViewPoint

#

its updated on server under the hood via PC's ServerUpdateCamera RPC

#

then replicate those, skipping owner

#

note: you cannot get a roll value from that, as you'll get a direction vector camera is looking at, and its position

#

but you can get pitch and yaw

#

and they have to be replicated via character, or something owned by it

#

as controller won't work

inland hedge
#

I'm not sure if I'm following ๐Ÿค” what part are you referring to? Do I need to run getplayerviewpoint in the controller and put that value in the character?

#

like I have the feeling that my inputaxis events in the character are not in the right place, but they should be in the controller

winged badger
#

you need its direction vector, basically, as LookDirection

#

if all characters have the same control scheme, sure

inland hedge
#

this should move to the controller, correct?

winged badger
#

i would

dawn summit
#

Yay. Network guru is here!

#

i had/have a question
Where should i put logic that sets cvars that are related to GameMode? (GM only exist on server so i cant plug it to GM)

inland hedge
#

the movement input is under that

#

I'm now moving all the input handling away from the character BP and into my PlayerController BP

gusty slate
#

Hello :)
For Listen servers, without doing anything custom, is there a way to recognize who is the Host? Like, hosting PController

winged badger
#

from where?

gusty slate
#

the goal is to have UI only shown to the Host, so pretty much each client so they can properly check

winged badger
#

IsServer check to see if you show it or not then, on listen servers

gusty slate
#

๐Ÿ‘ Thanks Zlo

#

Btw @winged badger I am having some trouble with clients/host leaving sessions and then after hosting the next game, I can't join another server as it returns Warning: OSS: Session (GameSession) already exists, can't join twice
I had DestroySession before the OpenLevel to the main menu, then I thought I would try it as a server RPC but still no luck. Should there by a delay between the DestroySession call and leaving the level?

#

Sorry for the ping ๐Ÿ™‚ This is the last step for me to fix to have a fully working demo

lost juniper
#

Is it possible to change my controller number in UE4 while previewing?

#

I just want to see if I can control player 2 (and others) from within UE4

wanton tulip
#

I will post this message here again, because I think #blueprint was the wrong Channel

Hello, I have a problem with the Playerstate. When I try to cast to the pawn's Playerstate on a client On BeginPlay, it is invalid, but it is valid on the server. Is there a way that the Playerstate can be replicated faster because I don't want to use a Delay or take the Payerstate from the Playercontroller?

pine flint
#

When testing my game in multiplayer in the editor, I'm getting some hitches when the game loads up. I think that it is the server replicating all the actors to clients, has anyone else noticed this?

#

Just did some testing by making an empty level with just a player and vehicle and the enterVehicle multicast function fires straight away, but on the test scene with 100s of replicated actors it takes around 4-5 second before player can enter after the game starts.

wanton tulip
#

you can't replicate it faster, OnRep_PlayerState is the earliest you can have it
@twin juniper And where I can find this? In the Pawn Override Functions?

jovial gazelle
#

Hello, design question... I've spawned some pawns on the server side....It looks like I need to wait for the pawns to be loaded on the client before posessing...

What's the best way to do this? I'm currently calling a custom function on the level blueprint, which will send a RPC to the server that possess the pawn...

Is this how it should be done?

wanton tulip
#

๐Ÿ‘thanks

gleaming vector
#

man

#

has anyone gotten dedicated servers on steam working in 4.25?

swift kelp
#

@winged badger , you mean I need port 7777 forwarded on my router to host the PuzzelPlatforms game?

gleaming vector
#

everything seems to be pushing to steam correctly

#

but it's seeming to not be listing on the server browser

fossil spoke
#

@lavish cypress Did you get yours working yet?

lavish cypress
#

@gleaming vector check the Lan tab if it's not in the Internet tab

gleaming vector
#

it is on the lan tab

#

it's just not showing up in internet

lavish cypress
#

yeah mine is doing the same

gleaming vector
#

im spinning up a free azure vm to rule out networking issues

lavish cypress
#

Let me know if it works

fossil spoke
#

Have you guys setup your presence settings (or whatever they are called) correctly?

lavish cypress
#

Yep

#
    SessionSettings->NumPublicConnections = 100;
    SessionSettings->NumPrivateConnections = 0;
    SessionSettings->bShouldAdvertise = true;     // Required
    SessionSettings->bAllowJoinInProgress = true;
    SessionSettings->bIsLANMatch = false;    
    SessionSettings->bIsDedicated = true;        // Required
    SessionSettings->bUsesStats = false;
    SessionSettings->bAllowInvites = true;
    SessionSettings->bUsesPresence = false;      // Required
    SessionSettings->bAllowJoinViaPresence = false;
    SessionSettings->bAllowJoinViaPresenceFriendsOnly = false;
    SessionSettings->bAntiCheatProtected = false;
swift kelp
#

have any of you done the PuzzelPlatforms from gamedev.tv?
Do I need to have port-forwarding for it to work?

winged badger
#

it doesn't matter what type of game it is for port forwarding

clear copper
#

I don't want my controlled pawn to be visible to anyone but the controller. None of it is set to replicated, but the clients can still see the server's pawn but the server can't see the clients pawn. What am I missing?

winged badger
#

if you're brute forcing connection with open ip port and your server is behind a NAT

#

router will receive a packet from client requesting connection, say "i don't expect any packets from that IP address" and just ignore them

#

unless they are port forwarded to server's local IP behind the NAT, then it will skip the checks

#

@clear copper set visibility based on ownership, or IsLocallyControlled

clear copper
#

ah gotcha ty

#

@winged badger I actually just saw there's an Only Owner Sees option in Advanced Visibility for Pawns

nocturne iron
#

How do i setup p2p without using steam... Can i host the in-between server myself somehow?

winged badger
#

unreal networking won't work p2p out of the box

#

and what in between server?

nocturne iron
#

Sry, not p2p. Server/client.

#

The server that does magic between the server and clients so that port forwarding is not needed.

#

@winged badger

winged badger
#

services usually handle that for you, like steam

nocturne iron
#

I get that... but if i want to publish to other stores as well, i need some sort of shared service

winged badger
#

but yes, it wouldn't be too difficult to put up a server just to do NAT punchtrough

#

i don't see the point, but it is possible

nocturne iron
#

Don't i need to setup my own service if i want to publish to both steam and some other store, like epic or whatever?..

winged badger
#

epic online services support pretty much everything, or are planning to

nocturne iron
#

But there are no unreal engine integrations yet, right?

lost inlet
#

@gleaming vector linux specifically or is it affecting windows too?

#

we're investigating linux after 4.25, but for us it seems to be an old steamclient.so we were distributing

#

4.25 upgraded the steamworks SDK to 1.49 so if you had any hackarounds for previous engine version's shortcomings, it could be that

gleaming vector
#

4.25 did not pgrade the sdk tro 149

#

it's 147

#

and i upgraded it manually and that helped

lost inlet
#

yeah but there was still an upgrade, our perforce diffs show 1.42 to 1.47

#

we did skip 4.23 -> 4.25 though

terse prawn
#

Are dedicated servers able to use savegames?

heady python
#

I for some reason cant get the steam subsystem on my level. "Online Steam Subsystem", "Steam Advanced Sessions" and "Advanced Sessions" are all enabled and I copy pasted the script from unreals steam documentation to my default engine.ini. Does anyone know what else I could be missing?

bitter oriole
#

Maybe you're trying in editor

nocturne iron
#

Can i use steam multiplayer when i publish on other stores.

bitter oriole
#

Depends on the store but generally no

nocturne iron
#

Epic Store? Or just a custom one, like download from website?

bitter oriole
#

If you're on the EGS you would use the EOS multiplayer services

#

And on Steam you'd use Steam

#

If you want cross-platform multiplayer, EOS offers it, though AFAIK Steam users will need to create an EOS account which will infuriate them

nocturne iron
#

But are there any implementation of EOS in unreal yet?

thin stratus
#

Non official.

nocturne iron
#

It it possible to tell if there will there be one and when?

bitter oriole
#

When Epic has accepted your game on their platform, I guess you can ask them for the integration they likely already have

#

It's not like you can choose to publish on EGS

#

Right now it also comes with exclusivity (no Steam) for new games

nocturne iron
#

So how would i future proof myself? Can i just use the online subsystem and make EOS as a subsystem?

thin stratus
#

Subsystem implementation would help, yeah

#

But you also don't need a subsystem until relatively late in the process

bitter oriole
#

Consider the chance that your game could release on EGS, and the experience that Steam players would have with EOS (additional account / login)

#

Right now you can simply target Steam alone, and if EGS happens for your game, you can target EOS alone for the EGS build

nocturne iron
#

Right... Thx ๐Ÿ‘

heady python
#

@bitter oriole im testing it in standalone with steam open in the background. I just cant seem to get it working

wanton tulip
#

APawn and AController both have it
@twin juniper But this is not available in BPs right?

soft shell
#

I've an interesting issue; a player pawn spawns (on the server) a "tool" that is used by the pawn (like a gun) and it's attached to the pawn - when the player leaves I had thought the player controller and pawn are destroyed.. However when the player rejoins the same server (much later) the tool is there, attached to the pawn.. How is the tool reattached to the joining pawn? I had thought the pawn destroyed (and attachment deleted), etc.. (I can fix the issue, but just wondering how this happens)..

oak hill
#

How can I use steam on dedicated server without launching the steam app? Is possible using the test app id (480) or I've to register the game with steam?

wanton tulip
#

not directly but you can subclass it and expose a blueprint event yourself
@twin juniper Yes I had done this by using the code from eXi, but it only fires on the client and not on the Server which is also a client

gusty slate
#

I think I know when I am getting session issues, it is when the Host closes the session, other clients act as if their session didn't get properly destroyed.
Is that a case I need to manually handle? DestroySession on Logout?

waxen socket
#

Good morning. Is it significantly more expensive to add a parameter to an RPC?

For instance, would it be wise to have have separate "Start" and "Stop" RPCs or to have a "Toggle" that takes in a boolean?

humble socket
#

someone here good in C# i have a doubt related with sockets and begininvoke

crystal crag
#

When is it appropriate to attach a weapon actor to a character in a multiplayer game?

#

so you have a character, they do an action to say "assign this weapon to my character's primary weapon slot" - forgetting all of the details inbetween, when do I attach that weapon I spawned in to the owning character?

#
auto MyTransform = GetTransform();
            auto EquippableItem = UGameplayStatics::BeginDeferredActorSpawnFromClass(this, WeaponItemDef->WeaponClass.Get(), MyTransform, ESpawnActorCollisionHandlingMethod::AdjustIfPossibleButAlwaysSpawn, this);
            //auto EquippableItem = UGameplayStatics::BeginSpawningActorFromClass(this, WeaponItemDef->WeaponClass.Get(), MyTransform, false, this);
            UGameplayStatics::FinishSpawningActor(EquippableItem, MyTransform);
                        // DO I ATTACH THE WEAPON ACTOR HERE? THIS SO FAR HAS NOT WORKED OUT
            PrimaryWeapon = Cast<ARaevinItemWeapon>(EquippableItem);
            if (PrimaryWeapon == nullptr) return;
            PrimaryWeapon->SetMyOwningCharacter(this);
#

@humble socket I am good with C# but I haven't had to really work with the raw socket class

#

I am willing to try to help you though

crystal crag
#

I was trying to help. Without the whole project it is kind of hard knowing what they are up against. Basically the service works and then about a day later the listener stops processing connection attempts

#

Someone else on here might be able to help them better. To me it sounds like something is not being properly disposed of so it is building up until it hangs.

#

either socket exhaustion or something of that nature

nocturne iron
#

Steam is open but the overlay does not open, why could this be happening?

bitter oriole
#

Depends on the test conditions

#

Packaged, editor, devel, shipping, etc

gleaming vector
#

hm

#

anyone ever take a look at what ports the ue4 dedicated server is actually listening on?

#

log says LogNet: Display: SteamNetDriver_2147482557 bound to port 7777

#

but doing netstat doesn't show it listening on 7777

nocturne iron
#

Packaged, editor, devel, shipping, etc
@bitter oriole It's a shipping build.

neon mango
#

Does anyone know where the actual Texture data is inside FRHITexture or FRHITexture2D ?? Because digging into the source I can't find any FColor arrays or FLinearColor arrays to indicate data that would represent the actual "Texture". I found "Format" the texture is in but not the meat of it.

meager spade
#

#cpp not a multiplayer question

rotund sapphire
#

but doing netstat doesn't show it listening on 7777
@gleaming vector physically it'd use 27015 but the port number 7777 is probably virtual only in steam network

gleaming vector
#

hm

frigid solar
#

I have noticed that clients seem to disappear to other clients when playing in multiplayer.
Is there some way I can increase the players relevant view distance for online play?

meager spade
#

the default is 15K units

#

so bump it up (NetCullDistanceSquared)

#

625,000,000 is 25,000 units

lavish cypress
#

27015 is the steam server list discovery port

#

7777 is the game server listen port

shadow aurora
#

Quick question about client-server architecture. Is it possible to run something on the host and have it only affect the target actor on the host's client? Right now, if I SetVisibility to false for an actor on the host in a net multicast function, then the visibility is also set to false on all the other clients.

meager spade
#

SetVisibility is replicated

#

so setting it on host, will affect others

#

no way to fix without engine changes (or possibly is by overriding PreReplication and disable replication of the visibility property)

#

but SetHiddenInGame is not replicated

shadow aurora
#

Darn... I'm trying to hide a widget component above each client's player. I tried using SetOwnerNoSee but that won't work for some reason.

#

Hmmm I'll check that out! Thank you @meager spade!

meager spade
#

and we use that for the same thing you want

shadow aurora
#

That fixed my issue! Thank you so much ๐Ÿ™‚

gleaming vector
#

i believe i have found the source of my issues maybe

#

im using my dedicated server appid in steam appid.txt

#

rather than the client one

#

and steam does not map dedicated server app ids to client appids

fossil spoke
#

So the Client thinks the Servers are a different game?

#

And so filters them out?

green delta
#

functions are not replicated but if they are tied to a replicated event, are they passed on? :x

winged badger
#

replicated event calls a function on an instance of your object on another machine that has the same NetGUID

#

anything connected to a RPC is called locally on machine that receives the RPC

gleaming vector
#

yeah @fossil spoke

#

this was the issue

#

it works now

fossil spoke
#

@lavish cypress Same issue as you possibly?

gleaming vector
#

basically

green delta
#

@winged badger ok, so it would work based on that logic

gleaming vector
#

the steam_appid.txt needs to be the client appid

#

not the server appid

#

the server appid is not relevant anywhere in the process

winged badger
#

so you had to package the servers with client APPID but upload them to server APPID?

gleaming vector
#

yes

#

so

#

what i've done

#

Updated Steamworks to 1.49

#

made a small modification to OnlineSubsystemSteam so the default servername is "Empires Dedicated Server" (optional)

#

made a modification to look up a SteamServerDevAppid in defaultengine.ini in the code where it outputs steam_appid.txt

#

when its running a dedicated server

#

then, in Steam, I set the dedicated server stuff on the client app

#

in defaultengine.ini, set the version to 1.0.0.0

#

and then forward port 27015 (the only port that needs to be exposed)

lavish cypress
#

FYI Once the session is created you can retrieve it by name and update details, like the OwningUserName. A little bit easier than an engine modification.

        FNamedOnlineSession* CurrentSession = Sessions->GetNamedSession(InSessionName);
        CurrentSession->OwningUserName = TEXT("Custom Server Name");
        Sessions->UpdateSession(InSessionName, CurrentSession->SessionSettings);
#

The server that works is running on the cloud, right?

gleaming vector
#

it's running on my own personal server

#

lemme test the cloud vm

lavish cypress
#

I am running the server locally with forwarded ports, but it appears in LAN only. Because it isn't packaged yet, the steam appid.txt isn't created. Also, there's nowhere I have defined the server's appid, it's all using the client's

winged badger
#

i was wondering why port forwarding ๐Ÿ™‚

lavish cypress
#

From what you've written, I don't see a reason why launching my server from the uproject with .uproject" -server -log should not appear in the Internet list

#

Unless I need to actually create a steam_appid.txt in the project folder somewhere, or I just HAVE to package the server

#

I'll try packaging next I guess

#

My ISP is also not blocking my ports, I also run a publicly available webserver from inside my network so I disabled their blocking and reimplemented their block list in my own firewall rules

fossil spoke
#

You should try creating the steamappid first

lavish cypress
#

Root folder, right?

fossil spoke
#

Cant remember.

#

lol

lavish cypress
#

given that the uproject is launching via the engine, I might need it in the engine binaries folder instead

#

hard to say

#

I'll try both

fossil spoke
#

Just write a bat file to put it in every folder ๐Ÿ˜‰

lavish cypress
#

lol

gleaming vector
#

i have a built server

#

i've never gotten online subsystem steam working in editor

#

anyway, everything is working now

#

localhost, my personal server, and the azure vm

lavish cypress
#
[2020.07.20-02.39.58:960][  0]LogOnline: Error: STEAM: Failed to create file: D:/UE4//Engine/Binaries/Win64/steam_appid.txt
[2020.07.20-02.39.58:961][  0]LogOnline: Warning: STEAM: Could not create/update the steam_appid.txt file! Make sure the directory is writable and there isn't another instance using this file
[2020.07.20-02.39.58:961][  0]LogOnline: Warning: STEAM: Could not set up the steam environment! Falling back to another OSS.
[2020.07.20-02.39.58:962][  0]LogOnline: Warning: STEAM: Steam API failed to initialize!
[2020.07.20-02.39.58:962][  0]LogOnline: Display: STEAM: OnlineSubsystemSteam::Shutdown()
#

Project didn't work, engine binaries it complains because it tries to create one itself

#

so fair enough, it handles that itself

#

looking inside the auto created one, it's correct

#

I'll try packaging next

gleaming vector
#

but, yeah, last time i got servers onto steam was like 4.8 and it required very significant engine modifications. they've done quite a bit of work since then to make it easy

#

but apparently not too easy lmao

fossil spoke
#

Steam OSS leaves alot to be desired thats for sure.

terse prawn
#

Bump
If SaveGame s are saved locally will a dedicated server being ran also save to slots using the savegame asset making a file?

somber glade
#

is there any kind of "steam is ready" event? On my game instance if I try to get the player's steam ID on init, steam hasn't finished being integrated into the game and it reports a "bad ID'. if I set a delay of a couple seconds, long enough for the steam overlay to pop up, it'll print the player's steam ID. Just wondering if there is any kind of event/query that can be done that confirms if the game is finished connecting to steam.

soft girder
#

Idk. I might just loop if bad steam id. Complete on a good one and go on with the rest

#

I havent used steam api stuff yet

empty matrix
#

What's up guys, how's it going? How can I make a player resurgence system on blueprints?

rose egret
#

@empty matrix you mean something like teammate revive that most battle royal have ?

empty matrix
#

Yes

rose egret
#

I made this easily

#

I have a replicated enum for state of my the character (Normal, Knockdown, Dead)
when player loses heath he goes to knockdown state.
based on that enum animation blueprint switches to different state machine as well

empty matrix
#

it is not that. I mean, when an ally dies, take a card or banner and take it to some point to revive your teammate

#

@rose egret

rose egret
#

I got it. you mean respawning teammate.
I just spawn a new pawn an then call the posses function

#

its very complicated and depends on your game.

bitter oriole
#

@nocturne iron Shipping packaged builds require to be started from Steam to have Steam features, unless you add an appid file.

empty matrix
#

I got it. you mean respawning teammate.
I just spawn a new pawn an then call the posses function
@rose egret Thanks you very so much!

#

A little doubt ... In the video there are some animations (in the case of the knocked down), where did you find these animations? If you know, could you send me the link?
@rose egret

rose egret
empty matrix
#

Jeez... it's paid .... Could you send me the manifest file?

bitter oriole
#

You know the people who make these assets for a living are here, right ?

chrome bay
#

Also

#

Good way to get yourself banned

empty matrix
#

Oh... Sorry

gusty slate
#

Hello everyone,
I noticed that in some cases, MP clients don't get a pawn created for them when joining the server. It happens occasionaly here and there.
Is there a way to have certainty in pawn spawning?

#

The PlayerStarts don't overlap anything, so it isn't collision based

rose egret
#

see the log

waxen socket
#

Good morning. I've been learning a lot about Multicast vs RepNotify lately so let me know if this sounds right: A pawn death in a space shooter that consists of a sound and a particle effect should be a multicast event. This is because it is an event that does not change state. Players joining after the death which takes two seconds to play out don't need to see and hear the death effect.

Does that sound right?

gusty slate
#

I'll have a look

chrome bay
#

@waxen socket handling "death" of objects in general can be more finicky with the rules, generally speaking what I would suggest is if all you want to do is play a particle and a sound, see if clients can handle that themselves locally.

#

Strictly speaking an object becoming "dead" is a state-change on the object itself

#

But if for example you are already replicating a "health" value, do you need to notify clients of the death at all, or can they process it locally?

waxen socket
#

I see what you mean about it being stateful. I'm a little confused though, because if I want the clients to handle it locally, I still need to set it off somehow, right?

#

So I can do that through a RepNotify property or a Multicast. Are you saying that RepNotifys are just a cheaper way of notifying the client it needs to do something?

#

In my case, I have an integer called Lives that I could replicate. Each ship has two or three lives to begin with and when it loses its last one, it dies.

waxen socket
#

So then is it really better to run my death functions off of OnRep_Lives than using a multicast event?

chrome bay
#

Too many Flynn's on here can't tag you.. but yeah it's kind of up to you. If the clients already have some info they can use to play death FX, I would just piggyback off of that.

#

But it's really situational so there's not really a right answer

#

Lemme find my thread

waxen socket
#

Sorry. ๐Ÿ˜…

waxen socket
#

If the clients already have some info ...

By that, you mean, if there's a RepNotify property involved.

chrome bay
#

It's not specific to the discussion of property vs multicast, but me personally, I tend to replicate a property, tear the actor off, then let the client handle death - but it all depends.

#

Yeah either via RepNotify of if you're already checking elsewhere. Rep Notifies have no networking cost, aside from the cost of the variable itself

waxen socket
#

Thanks for the thread. ๐Ÿ™‚

chrome bay
#

yeah it's a different situation, I think object death can be a reasonable use-case for multicasting over property rep sometimes

#

Tearing off gives you a bit of a buffer though, the client can handle destroying the actor itself, so you never get a case where a death effect starts, then the object is destroyed halfway through or something.

waxen socket
#

I'm sorry, what do you mean by "tearing off"?

chrome bay
#

Tearing off basically means removing the actor from the networked actor list, but not destroying it

#

So it's like saying to clients "game is done with this actor now, do what you want with it"

#

Once torn off, the client becomes the authority, and the client can cleanup in it's own time

waxen socket
#

Oh! You can do that? Like... stop replicating an actor midgame?

chrome bay
#

Yeah, just call "TearOff()" on the Server

#

There's one caveat - once torn off, any changes made after that replication frame won't be sent.

#

And it could be lossy, i.e. you might not receive the final state before tear-off, but that may not be an issue

waxen socket
#

I will need to be able to bring the pawn back to life though if his friends pick up a respawn power.

chrome bay
#

Ah so yeah that changes thing - in that case, I would definitely use property over a multicast.

#

If it's the same pawn, and it can "die" and live again multiple times, it's definitely a state

waxen socket
#

Yeah, just I just cheekily move it offscreen and disable its input rather than going through the process of actually respawning later.

#

You'd definitely use a property eh...

chrome bay
#

For that approach yeah definitely

waxen socket
#

And that's because... Just to save one Event call by piggybacking off of OnRep_Lives instead?

chrome bay
#

It's more about maintaining sync between clients

#

If the multicast is dropped (if unreliable), or if a client joins while one player is "dead", they wouldn't neccesarily have the correct state of the game

#

Or, for a player who is already in the game, but was out of relevancy range when the actor died etc.

waxen socket
#

Okay, I understand. You really don't like multicast, do you? ๐Ÿ˜›

chrome bay
#

No ๐Ÿ˜„

#

For reals, I've only found like one or two legit cases where it made sense over property replication

waxen socket
#

Okay, I have a tangentially related question.

#

If you have any more patience for me.

#

Do you think burst counters are worthwhile for semi-automatic weapons that can fire a maximum rate of 1/0.2s?

#

Cause right now I'm using multicasts for that and it works but I'm aware of burst counters and you seem to be the expert on them.

chrome bay
#

yes

#

always burst

waxen socket
#

It seems like so much work... ๐Ÿ˜ฉ But I trust you.

chrome bay
#

It's not as bad as it seems .. one sec

polar wing
#

out of curiosity, do you need to use burst counters if you're using GAS?

chrome bay
#

I think Kaos would be best person to ask, but I think gameplay cues is the answer is GAS

polar wing
#

epic! Sorry to butt in, just saw the conversation pop up

waxen socket
#

Thanks for the article. I thought it was there that I read that burst counters might not be appropriate for semi-automatic weapons but I guess not.

chrome bay
#

Yeah so that's a problem with the default implementation from shootergame, where you can miss those "single shots" because it resets

#

But the approach we used fixes that issue, and also the issue with things coming back into relevancy etc. too

waxen socket
#

You've been so helpful to me. Thank you. I'm a professional 3D games artist. If there's ever a small
asset that you need for a prototype or something, maybe I could repay your time.

grizzled stirrup
#

Does seamless travel persist all player controller properties without manually copying them after traveling or only the controllers themselves?

winged badger
#

depends on what you did exactly

grizzled stirrup
#

Just an array of structs I need

#

Persisting over

winged badger
#

breakpoint HandleSeamlessTravelPlayer

#

in GameMode

#

check that the PCs aren't reinstantiated

grizzled stirrup
#

They definitely don't get BeginPlay or PostLogin called on them

winged badger
#

if they are, you do have both old and new PC valid at the same time during that function

grizzled stirrup
#

After the first travel

winged badger
#

no, because they BeganPlay on previous level

#

and PostLogin doesn't get called during seamless travel

grizzled stirrup
#

Right so are the properties associated with that controller also brought over?

#

Since begin play has already been called

#

Having a look at the code now

winged badger
#

the system can be quirky, depending on if the PC class is the same on departing/travel/arriving map

grizzled stirrup
#

Yes it is in this case

#

But since this is just caching challenges that have been completed after each travel I may just store them in the GI as it makes more sense there

winged badger
#

basically if the PC doesn't get reinstantiated

#

you don't have to do anything

grizzled stirrup
#

Ok so in theory everything gets brought over?

#

Thanks

winged badger
#

if it does, you'll have to manually copy stuff

grizzled stirrup
#

I'm assuming in this case it doesn't as begin play doesn't get called

#

But I'll double check and debug

winged badger
#

and if BeginPlay wasn't called... yes

grizzled stirrup
#

Thanks for the help!

#

Also explains why any UI pointers that weren't marked as UPROPERTY caused crashes for me months ago

#

Old stale pointers from the previous level

winged badger
#

PreClientTravel override is a very good place to nuke the UI

grizzled stirrup
#

Yep I nuke any possible things that cause seamless travel crashes there

#

Like audio components etc too

chrome bay
#

@waxen socket Thanks :D, and np's!

echo socket
#

is it expected that adding an element to an array in blueprints it won't cause replication? specifically repl-notify notification? If I set the whole array then it fires, but just calling add on it doesn't

meager spade
#

adding/removing elements will cause it to rep

#

changing an element won't

#

so if you remove, then add something, the count doesnt change, and it wont rep (if done before the rep)

echo socket
#

@meager spade strange. I don't know what I'm doing wrong then. Setting it clearly says "set and notify" or whatever. add doesn't say that. but I just went to sending the individual elements back via rpc

tacit jetty
#

anim instances don't exist on the server, right? How do anim montages and animation notifies work in that case? Can you still use them on the server?

meager spade
#

animinstance does run server side

tacit jetty
#

Everywhere i read says that the ABP/anim instance is client only

#

If both the ABP/anim instance run on server and client, does that mean that the animations are running on the server also?

meager spade
#

if the visibility rules are Always refresh and update bones

#

then server will run anims just like clients

#

even montages

#

if its not, then montages will fire notifies but server won't update skeleton

#

there is a lot of other small details but that is it in a gist

tacit jetty
#

so if its set to the default "Always Tick Pose," it will still fire the notify events, but will not move the bones on the dedicated server? Is that correct?

#

I suppose that as an optimization, if needed, I could conditionally enable the always tick and update bones for anyone in combat, then disable afterwards?

meager spade
#

sure

nocturne iron
#

Do i need to open a level for other players to find my session?

waxen socket
#

Good morning. Is it common to loop through the player controllers in the game state in order to set properties on each one of them?

winged badger
#

no

#

if any class should ever loop through player controllers, it should be gamemode

waxen socket
#

Oh really... well then. I've made some mistakes. ๐Ÿ˜…

#

I was looping through to display the game over screens.

winged badger
#

unlike gamestate, its actually easy as well

#

GetNumPlayers -> For (0 to NumPlayers-1) -> GetPlayerController[Index]

#

and that is one of the good uses of GetPlayerController[Index] function

waxen socket
#

Okay, thanks. But then why does the game state keep an array of all the player states?

#

Sometimes when reading about it, it seems like I'm not supposed to put any functionality in the game state.

winged badger
#

PlayerState != PlayerController

waxen socket
#

So then is it common to loop through the player states in the game state in order to set certain properties?

#

So say I have a co-op game where when one player picks up a weapon, all the players are equipped with that weapon. Would I have the pickup class fire a RunOnServer event in the game mode that would loop through all the player controllers and set the related properties?

winged badger
#

PLayerController generally shouldn't concern itself with stuff like what weapon is equipped

waxen socket
#

But could I loop through the player controllers and access their pawns and set the properties there? Is game mode the place to do operations like that?

winged badger
#

generally, making a god class that handles everything is really bad

#

i realize gamemode and gamestate are easy to access, but

#

just cluttering them with all logic you dind't make a dedicated object to handle results in an unmaintainable mess

#

every strong dependency you add makes your code more and more inflexible

#

and more and more likely you'll just end up deleting everything and starting over

waxen socket
#

Thanks for your time. How might you handle my example about setting a weapon on each client in response to a pickup?

rose egret
#

@winged badger you should see my previous character class. whole the game was there thousands of lines ๐Ÿ˜‚

chrome bay
#

each client has a replicated "current weapon" value

#

server just sets the value

winged badger
#

more then that

chrome bay
#

(would be a basic approach)

winged badger
#

gamestate doesn't equip weapons on characters

chrome bay
#

yeah, wouldn't involve the gamestate at all

winged badger
#

say you put an actor component on a gamestate

#

PickupComponent

#

you can access it easy enough (GetGameState->GetComponentByClass)

#

it is replicated, and has a replicated variable to whatever the pickup was, with OnRep

#

it also has an event dispatcher, with input of the same type

rose egret
#

but components add a few bytes to bandwidth afaik

#

๐Ÿ˜ฐ

chrome bay
#

If it's just a pickup you can walkover, I would even just have the collision done server side.

#

(tis what I do atm)

winged badger
#

OnRep_Pickup just calls the dispatcher providing Pickup as argument

#

all Characters at BeginPlay just find GameState PickupComponent and Bind their Event to that dispatcher

#

and then as soon as you set Pickup Variable on the PickupComponent

#

it replicated, calls OnReps on both server and clients, all instances of all Characters on all machines have their HandlePickupChanged or w/e you call it event called

#

and are provided the reference or data about that Pickup in the process

#

and then they can equip themselves

#

or if you want to tone down on simulation, you don't set the Pickup there as replicated, and then it runs server only and replicates through Characters themselves

#

doesn't really matter, the event dispatcher is what you should use

waxen socket
#

I see, okay. I'm just reading this over carefully... ๐Ÿ‘‚

winged badger
#

@rose egret i saw something similar few years ago, a main Character class that had 19 BeginPlay pin Sequence and 22 Tick pin Sequence

#

you do not want to have logic for equipping a character in your gamestate

#

because it doesn't belong there

waxen socket
#

I see. I want to do it right.

chrome bay
#

yeah data/function locality is more important in MP

#

in SP you can get away with... lunacy

winged badger
#

when you have 2000 classes/blueprints around, and network ontop

#

and you can't logically assume where some part of the code lives

#

you will spend a week hunting down a bug that would be obvious if it was structured/encapsulated correctly

#

note that godclass still manages to somehow, be even worse then poor encapsulation

#

thats the fix 1 bug, make 10 new ones in the process scenario

waxen socket
#

So, when you say to add the pickup to the game state as a component, you mean as a literal component?

winged badger
#

btw, its fine if you put your event dispatcher directly in a gamestate

#

for now

#

that is easy to refactor and move to component later if the situation calls for it

#

like less then 5 minutes work

rose egret
#

@winged badger
regarding a big character class I came up with the idea of making several inheritance. currently I have ACharacterBase > ACharacterAlpha > ACharacterFinal > BP_Version
movement and input in base, heath and damage in alpha, marking and ping system in final.
not a good design but least helped me a little

winged badger
#

its not

#

inheritances purpose is not to chop functionality in smaller pieces

#

we have a CharacterBase, from which we derive HeroCharacter, Civilians, Monsters

#

CharacterBase has a common functionality shared between all of them

rose egret
#

thank god at least I didn't name them by numeric suffix.
ACharacter1 > ACharacter2 > ACharacter3

#

๐Ÿ˜‚

winged badger
#

good balance between composition and inheritance

#

is what makes good structure

rose egret
#

btw UE itself doesn't follow these rules just look at Actor class everything is there

#

๐Ÿค”

winged badger
#

it somewhat does

#

but gameframework in general could use a few hundred upgrades

waxen socket
#

So Zlo, does this look right?
**
Pickup Actor**

Inherits from Actor
Set to replicate
Has RepNotify property โ€œname Typeโ€

OnOverlap, accesses Type through game state, and sets it to be respective type causing OnRep_Type to call Pickup dispatcher.

Game State

Has property โ€œname WeaponTypeโ€
Has event dispatcher with input of Name

Character

On BeginPlay, binds to Pickup dispatcher in game state
Has function bound to dispatcher that changes weapon to incoming type

winged badger
#

too many calls

#

first overlap triggers both server and client side

#

so without restrictions, it will broadcast the delegate on both

#

if gamestate doesn't have a replicated variable for pickup, its fine

#

the event dispatcher input should be the same type as replicated property in pickup

#

possible errors if you destroy the pickup on overlap

#

might cause desync

#

as destroying an actor after server's overlap could replicate before client overlap happens

#

and you do not have server auth

#

better to limit the overlap to server

#

access the GS on server

#

broadcast the delegate

#

have Characters handle the event by setting their replicated, repnotify variable for the weapon

#

and then handing equip on clients onrep

#

that way no errors, server auth and you do have consistent states with late joiners or someone entering relevancy

waxen socket
#

That sounds logical. The only thing I'm not understanding is the component part.

winged badger
#

ignore it for now

waxen socket
#

How may I "limit the overlap to server"?

dusty knot
#

I believe Zlo is referring to to the "switch has authority"

waxen socket
#

Okay, Zlo. How does this look?

Pickup Actor

Inherits from Actor
Has property โ€œname WeaponTypeโ€

OnOverlap, accesses game state on server and calls Pickup dispatcher

Game State

Has event dispatcher, โ€œSetWeaponโ€ with input of โ€œname WeaponTypeโ€

Character

Has RepNotify property, โ€œname WeaponTypeโ€
On BeginPlay, binds to SetWeapon dispatcher in game state
Has event bound to dispatcher that sets weapon to incoming type
OnRep_WeaponType sets weapon components on each character on each client

shadow aurora
#

What would be the best way to determine if an actor is owned by another client (or the host)? I'm using SetOwner when I spawn these actors in (server RPC) based on which client initiates the spawn. But I'm having trouble with getting the owner to replicate to the other clients to be able to do something like IsLocalPlayerController().

meager spade
#

@waxen socket still feels a bit jumpy

#

why does the gamestate need to despatch that a weapon has been picked up?

waxen socket
#

I figure because the weapon is equipped to all four players so therefore it's "stateful"?

dusty knot
#

@waxen socket i see what you're getting at, however there are a lot of things in the game that have state. each actor has it's own Transform state for instance. Try thinking of it from the perspective of "who owns this data" or "who is responsible for this action"

#

IRL metaphors often help me figure that out

waxen socket
#

Thanks, Alomax.

#

The weapon will be equipped to all four players for five seconds before being unequipped. So that's why I see it as a state of the game.

dusty knot
#

A generalized effect like that does make a good case for a centralized "owner" rather than each individual player. The caution you're hearing from others is that its really easy to accidently end up with a ton of stuff in an easily accessible global class like GameState and curse your past self

waxen socket
#

I see, I'll try to respect that advice.

#

Additionally, is using a dispatcher always a better way to access every player at once rather than looping through an array of pawns?

dusty knot
#

dispatchers allow for loose coupling, both the sender and receiver don't need to necessarily care what kind of class is on the other end. looping the array of pawns makes the class doing the loop tightly coupled to the pawn type. this is not inherently bad, especially if you need to do something very specific/unique to the pawns

waxen socket
#

Thanks for your time. I think I understand.

heady python
echo socket
#

I'm getting lots of double replication stuff happening and I think it's "listen server" vs "dedicated server" stuff.. can you support both with one code path or do they have to be completely separate?

silent valley
#

@echo socket I'd say the code is largely the same, one thing we often do is having to emulate OnRep calls for ListenServer or Standalone

#

bit hacky but it tends to look like this

if (GetNetMode() == ENetMode::NM_ListenServer || GetNetMode() == ENetMode::NM_Standalone)
{
    fromInv->OnRep_SlotData();
}
rich ridge
#

does UClass* replicates?

echo socket
#

@silent valley thank you

echo socket
#

turns out my problems were related to my sloppy programming of things I actually understood instead of multiplayer things I didn't. Which is sort of good and bad... ๐Ÿ˜•

lost inlet
#

@heady python steam functionality is disabled in the editor

#

it'll work in standalone game mode but not in editor

vital pecan
#

Hey guys, I have an issue with grass not spawning on all my levels for clients on a dedicated server and map using world comp. Grass only works on some levels near coord 0,0. Levels beyond that are bare

#

However it works fine if I run the game locally. Also foliage and LODs seem to be working fine. Am I missing something with grass in a server environment?

heady python
#

@lost inlet I played it in standalone in the video

lavish cypress
#

are steam auth tokens handled internally in Sessions now, or is there still extra work needed

chrome bay
#

@lavish cypress You have to enable Authentication but yeah it works.

#

See ShooterGame for an example implementation

lavish cypress
#

Ok

crude coral
#

client waiting for the dedicated server (AWS amazon)loading the sublevels maps of world composition presistent levelcan wait between 5 minutes to 10 for the maps loading!....hello! i make a dedicated server under Linux and i upload it to AWS (AMI) i test it with client so all working as expected and the client can connect to the dedicated server but when i'm loading the maps (after connection to the server) the maps show empty in visibilty but the ground is clearly there and the client wait long time for the sublevels maps loading...is there solution for this issue? (my server map i make it with world composition) my dedicated server need some GPU for async the loading of sublevels quickly?

crimson fiber
#

is it possible to connect to dedicated server with Steam OSS? Server is located on Google cloud and I connect via IP not session

  1. If I set server -nosteam, I've got incompatible_unique_net_id error
  2. If I keep Steam enabled on server, client couldn't connect at all. Nothing happens on both client and server

I just need SteamUniqueID ๐Ÿ˜„ maybe there is a way to not use steam OSS at all but still get it?

heady python
unique kelp
#

@crimson fiber I believe you need to have steam on the server and on the client, but you can't simply connect to the IP that you know the server is in and join, you'll have to ping the query port using https://partner.steamgames.com/doc/api/ISteamMatchmakingServers#PingServer and that will return a steam ID that you can then use with the command "open steam.SteamIDThatYouReceived::yourGamePort"

#

This is probably not the best way to do it, but I have made it work with this in the past

crimson fiber
#

yeah I found that topic, gotta add whole c++ for this...

#

maybe session will work, trying them rn

proud pier
#

I'm working with OnlineSubsystemNull and trying to connect a MacOS client to an iOS server/host (or vice versa) and I keep getting aninvalid net id error when I try to connect. Connecting iOS <-> iOS builds works, but cross platform does not. Is there something I need to enable / disable? This seems to work out of the box with the Collaborative Viewer example provided by Epic

#

I've tried setting the cvars for net.IgnorePackageMismatch=1 for iOS and MacOS Device profiles, but it doesn't seem to change the behavior

winged badger
#

your versions are not the same

proud pier
#

could it be because I'm trying to connect via PIE?

winged badger
#

you can't connect a same source engine packaged build with one packaged with vanilla launcher either

#

iirc you need to explicitly provide a version ID (defaultengine.ini) for unreal not to generate one automatically

proud pier
#

that sounds like it might be the culprit, let me try that

#

what I'm trying to do is run a packaged build on iOS and also run PIE in UE4 so I can do some debugging

#

I'm using a vanilla launcher UE4 version right now, but I could move over to a source compiled version if that's necessary

#

I guess I'm confused how the Collaborative Viewer example works with a vanilla launcher version of the engine and is cross platform out of the box, but let me try explicitly setting version numbers. I noticed Xcode does increment it everytime I package, and somewhat randomly

marble gazelle
#

Hey :)
Is there a way to call a RPC on a server owned actor that is sent to a specific client or will I need to add a RPC on the player controller for that purpose?

terse prawn
#

with the event logout does the controller reference have a valid reference to the controlled pawn? or does it immidiatly destroy the controlled pawn upon logout?

marble gazelle
#

Since the pawn is referenced by a UPROPERTY, you can be sure your pointer is valid or null

terse prawn
#

okay, because I have the server save info on the variables stored in the character and I want to save the variables when someone disconnects before the character is destroyed

marble gazelle
#

Maybe better save stuff for your player on the controller or the player state? Since then you don't need to worry about your character^^

terse prawn
#

I'd like to refrain from storing stuff on the player state with such things like inventory items, if im not mistaken player states can be seen by other players and i dont want others being able to access other's inventorys by that

#

I have some other functionality that kind of banks on accessing the inventory from the player character so controller might be a slight issue with that.

marble gazelle
#

well then the playercontroller is better

#

since the player character is also replicated

terse prawn
#

wait. couldnt I bind an event on destroyed? and just only run the event on the server?

#

or would the variables be nul because it was destroyed

marble gazelle
#

sure, but what if you want to destroy your char for gameplay?

terse prawn
#

only instance that the player's character would be destroyed would be upon death or some sort of respawn.
but I have some other things handling spawning the new character and updating it's vars with the previous character's vars to then destroy the others.

#

and if the player were to die. it still remains present. the controller possess a newly spawned character. with the old character staying there it offers other players to come over and access the inventory of the dead character

marble gazelle
#

And what happens if your player dies and disconnects?

meager spade
#

@marble gazelle that actors owner will need to be the player

#

if the owner is player, then server/client rpc's can be called

marble gazelle
#

yeah, but in this case this is not really possible ๐Ÿ˜ฆ

meager spade
#

then will have to be done through the PC/PS or player pawn

marble gazelle
#

I have a Chest that can be looted per player and I wanted to send the open event per player ๐Ÿ˜›

#

yeah

meager spade
#

you can do that tho

#

controller sends server rpc, server sends client rpc back via the controller

#

but ye have to be done on the controller

marble gazelle
#

yeah, I'm currently doing it over my interactable system which uses a component on the PC to replicate and my unlocks to set the open state^^

meager spade
#

(i do all my interaction stuff via controller)

#

nah i don't use a component

#

i have a base player controller, which handles generic stuff

#

and then a Game player Controller

#

which handles game specific stuff which doesn't fit in the base

#

so i can kinda keep them clean

#

but no components

marble gazelle
#

Well, I use components^^

meager spade
#

ye, extra calls i like to avoid lol

marble gazelle
#

Well but if I put everything in my code, its not really data driven or customizable

heady python
violet sentinel
#

@heady python did you add DynamicallyLoadedModuleNames.Add("OnlineSubsystemSteam") ? there should be log entry in output indicating subsystem load

wanton tulip
#

A week ago I switch from UE 4.21 to 4.24, but now I have problems with the replication. First of all the Replication is very slow in 4.24. But the biggest problem is, that my Clients teleporting back, if they move. I had never this problem before. How can I fix that? ๐Ÿ˜–

tidal venture
#

@wanton tulip I'm not sure and I hope I don't suggest something bad, but what about doing smaller jump. 4.21 to 4.22 to 4.23 then 4.24

#

should not be a problem usually, but I know that the more big the jump is, the more problem can occurs

wanton tulip
#

IDK, I read often that there is an problem with the CharacterMovement in 4.24. There are many Question about this in the UE4 Forum, but no question is answered.

tidal venture
#

That might be true!

#

I didn't upgrade to 4.24, I'm at 4.23

shy flicker
#

Hi everyone! I'm trying to create a GameInstance that derives from UAdvancedFriendsGameInstance, but when I created it, it's unabled to open AdvancedFriendsGameInstance.h. Do I need to add a Public Dependency Module Name or something like that to be able to include this file? Thanks!

twin juniper
#

do you need github open source to make an online game?

bitter oriole
#

Not at all

#

Though "online game" is vague

upbeat crystal
#

hi if anyone in the multiplayer networking community can help me it is urgent so the issue I'm having with is that on the client side and the server side is fine but when i try and get my character to interact with a vechicle it is all messed up the player can not move the car at all I really need some help it is urgent

#

the player gets in ok

#

everything is replicated

cedar finch
#

I'm setting my character mesh rotation on tick in order to match the rotation of the landscape. How should I replicate this so that everyone will see the rotation? I know I have to do this correctly since it's using event tick or my network bandwidth will be destroyed.

meager spade
#

that stuff should just be done locally

#

all my visual stuff like TIP, ik, etc anything like alignment is all local

cedar finch
#

This is on an AI crocodile so how do I do it where everyone can see it?

#

I do my linetrace inside my AI crocodile animBP and then set the world rotation of the mesh.

meager spade
#

animbp runs on all clients

#

so ?

floral crow
#

How do I prevent the server from running the RepNotify method? I was pretty sure they were not supposed to run on server.

Setup: I have a replicated property (an array) with a RepNotify method, all in blueprints.
Expected: I set the array on the server, RepNotify only runs on clients when the modified property is received.
Problem: RepNotify also runs on the server

cedar finch
#

@meager spade It is because I'm using an RInterp to node to set the rotation of the mesh. If I set the rotation directly it works but makes the mesh look 'snappy' or "pop" into place. How can I smoothly rotate it if the RInterp to doesn't want to work for clients?

meager spade
#

@floral crow in BP RepNotify is called on server

#

in C++ OnRep is NOT called on server

#

so just gate it behind switch auth

#

if its an issue

winged badger
#

also, setting a repnotify variable locally on clients will trigger onrep on that client

proud pier
#

still struggling with getting past the version mismatch when trying to connect to my deployed iOS build from PIE on a Mac. Do I need to build from source to explicitly set the build version number?

terse prawn
#

when a player joins the pawn has a post prosses on. the player respawns in a new character that doesn't have a post process. when another character joins they are in the pawn with the post process. this post process on the pawn the new player is in effects the other players. it shouldn't do that and how could I fix that?

proud pier
#

so the new player spawns and then all the other players get a post process effect at the same time?

terse prawn
#

yes

mystic pilot
#

@proud pier Take a look at FNetworkVersion::GetLocalNetworkVersionOverride

#

There is also IsNetworkCompatibleOverride.

floral crow
#

Thanks @meager spade @winged badger . It was the discrepancy between C++ and BP what caught me off guard!

twin juniper
#

I am curious as to how the flow of players are. My players, would load up as offline. but if they hosted a local server, they would be then become the local server? and if anyone joined any server listen/dedicated they become a client?

foggy hinge
#

If a player hosts a local server, it can either be a listen server or a dedicated server.

#

If a player joins a server, they will then be a client

twin juniper
#

and when the game instance originally starts up, it is just referenced as "play offline" in the play tab?

foggy hinge
#

I usually refer to that as stand alone

twin juniper
#

alright okay that clears it up thanks

swift kelp
#

Any of you had the issue where you only get port 0 for your session port instead of 7777 for UE4?
I checked my work against Sam's from GDTV and it still isn't working.
I think it is a project setting instead of something from C++.
Any ideas would be great

#

SessionInterface->GetResolvedConnectString(SessionName, Address)
SessionName = FString
Address = FString&

#

and Address gets returned as XXX.XXX.XXX.XXX:0 instead of XXX.XXX.XXX.XXX:7777

#

I tested SAM's version and his works and I can't find any logical difference between my code and his
We both get the correct IP, I just get 0 as a port.

#

A solution to this may be to do a diff on all the unreal-editor project settings
Is there a way to do that?

plush wave
#

I'm assuming you can replicate bitflags?

marble gazelle
#

If not, cast them int, replicate int, cast back.
Or write a custom NetSerializer, but I would assume yes ๐Ÿ˜›

winged badger
#

uint8 would be better

#

@plush wave FHitResult has excellent example of custom net serialization, you should take a look

plush wave
#

Awesome thanks!

#

@winged badger this what you are talking about?

winged badger
#

yes

#

for example it serializes bImpactPointEqualsLocation in one bit

#

if its true, it doesn't serialize ImpactPoint Vector when saving

#

and when loading it just does ImpactPoint = Location;

plush wave
#

I see hmm

#

Thank you

#

Is it possible to only tick an actor on the server

crimson fiber
#

it's actually very easy to connect Steam client to Dedicated with just openIP... Just don't use SteamNetDriver
Should I install Steam or smth on Linux machine to be able to launch Steam-compatible server?

warped fjord
#

inherited variables can't be replicated? o,o

#

if I change a replicated inherited variable on the server to true its false on client, if I change a variable thats from the actor itself it gets replicated..

bitter oriole
#

Inherited variables do get replicated AFAIK, at least in C++

warped fjord
#

so its a blueprint bug? oh no

bitter oriole
#

It's very likely not a bug

#

Explain what you did in detail and what does and does not work

warped fjord
#

I checked everything, always related etc

#

its just a bool

bitter oriole
#

Where do you change the bool, how, when, what is replicated, did you add logs to confirm the behavior..

warped fjord
#

okay I have a character baseclass with a bool, of that character baseclass I made a child and now in the child I call a function on the server that sets the bool.. doesnt work

#

baseclass replicates and the child too.. now with always relevant

#

If I do that with another bool it works

bitter oriole
#

Is the bool set to replicated on both parent and child ?

warped fjord
#

I checked everywhere else it isn't set anywhere else

#

wait a minute..

#

okay thats strange ๐Ÿ˜„

#

seems it was set without pressing the key

#

intended was stopping direct control and after something finished it would have been set back to true

#

ah, maybe its the case that server and client don't have the same knowledge

#

and rather not replicate it then?

foggy hinge
#

Variable replication cannot go from client to server.

#

It always goes from server to client.

warped fjord
#

oh I know why

#

server never knew it was false so why replicate?

#

thought the act of setting a variable will replicate it

foggy hinge
#

If you do so on the server, it should replicate to the client depending on the replication flags

rich ridge
#

Can I do multicast RPC which sets value to variable X, and variable X is replicatable.

#

Does it makes sense to do?

warped fjord
#

doesn't make sense if its already replicated

#

but if you want to call a function or play animations in the same multicast I think you can do that in one multicast

rich ridge
#

@warped fjord thanks even I thought the same

#

I think I will set the values on server and listen for onReplicate at client side

warped fjord
#

replication caused me so much pain in the past.. better be sure ๐Ÿ˜„

rich ridge
#

Yeah replication is really confusing

#

And I should only use multicast RPC for requirements like events from server to all clients

kind star
#

How many AI actors can a default dedicated-server handle with default settings before things start to go wrong?

trim kindle
#

@meager spade Hey, Could I ask one short question about the navigation prediction you did? How do you do move requests? Do you still keep your AIController server only and on the client you communicate directly between nav system and path following comp?

#

Od did you also implement client-side AIController

meager spade
#

Client side ai controller

#

We just replicate it to owner just like player controller

trim kindle
#

I see, that makes sense, thank you!

empty matrix
#

Guys, how can I do to change the parent class of a character, without opening it?

#

I'm crying here .... I've been developing this game for two years, and I just lost all the things I did in the character .....

cursive mortar
winged badger
#

@empty matrix also look at source cntrol

rocky totem
#

anyone used socket.io for UE4 the default readme is having an issue where it claims that one of the functions isnt' defined

#
        UE_LOG(LogTemp, Log, TEXT("Received: %s"), *USIOJConvert::ToJsonString(Message));
    });```
#

it claims unresolved external symbol "__declspec(dllimport) public: static class FString __cdecl USIOJConvert::ToJsonString(class TSharedPtr<class FJsonValue,0> const &)"

#

but i can open the header and it's right there

bitter oriole
#

Need to link against whichever module has the cpp file for USIOJConvert::ToJsonString, in build.cs

rocky totem
#

my b

rocky totem
#

ok so it compiles and runs but the server can't seem to get the connection

crude coral
#

for multiplayer android the ue4 create session failure always and i thought that because when enable google play support the [OnlineSubsystem] DefaultPlatformService=Null unloaded and load Google Play Subsystem....anyone have idea how fix this issue and be able to create UE4 session with android platform ? when i test with my PC i can create session and get access to the dedicated server on AWS but with android can't create session so can't access to the dedicated server on AWS!

wanton tulip
#

Hello, I have a problem again. If I try to call SetViewTargetWithBlend directly behind the Unposses nothing happens. This only works if I use a delay between the two. Maybe there is another option because I don't want to use delays. This error only occurs on the server.

twin juniper
#

Hey, I just loaded up the FPS blueprint in ue4, is it automatically in singleplayer or do i need to set it to singleplayer? I wanted to make sure my game isn't multiplayer or anything like that

meager spade
#

it doesnt matter if its single player or multiplayer

#

UE4 doesn't have different "modes"

#

for the project per say (well it does but not that you should be concerened about)

#

so yes it will be single player unless you want to do multiplayer.

twin juniper
#

okay, thank you!! I'm really sorry if that was a stupid question ^^

grizzled stirrup
#

Is if (SteamAPI_IsSteamRunning()) the right check to run before calling any Steam API functions that could crash the game if Steam isn't running?

#

Or is there a better check around?

sterile plaza
#

I'm looking for a sanity check on replicating actors on the game state. I have an int set to use ReplicatedUsing and that event gets fired. But my actor that I'm creating on the server in BeginPlay doesn't hit its OnRep call. What am I missing? I've replicated actors many times and never run into this.

sweet robin
#

Let's say I have an Actor, and this actor has a widget component on it. I have a widget C++ class which handles the logic. Part of the widget is a Dynamic Material Instance so that I can change how it looks at runtime. How can I go about making sure that material looks the same on both the server and the client if UUserWidgets cannot replicate?

meager spade
#

replicate the material in the actor

#

and assign it to the widgetcomps userwidget ?

lost inlet
#

you wouldn't replicated a dynamic material instance

#

you'd network whatever the relevant parameters are for that material

crude coral
#

client cannot create or join session for open the AWS amazon IP of the dedicated server in android if google play is enabled... but i need google play enabled because the game for android..anyone have solution for this issue? when i test it with pc client all working us expected but with android client failed to create a session so can't get access to the dedicated server IP adresse of the AMI AWS ec2 amazon...

lost inlet
#

does the client log say anything? does the server log say anything?

#

i haven't worked with mobile or google play but at least that might give you some clue

#

it's important to note if the server is actually receiving the connection and it's just failing for some other reason like auth

#

it also looks like the OSS plugin is android only with no server support so i would also make sure that the server isn't trying to use it as the default OSS

crude coral
#

@lost inlet the Android client log say 'error to create session' this message from the print string i use it for debug but the pc client can create session and open the IP adresse and teleport the character to the dedicated server map hosted on AWS AMI amazon

floral crow
#

This code is failing to set the owner of ClientSimulationClock correctly, because I'm trying to call an RPC on the object and it's saying No owning connection for actor ClientSimulationClock_0. Why is that?

#

Shouldn't the Player controller itself be THE OWNING connection?

hybrid wren
#

HI guys, Can anyone tell me why my listen server won't spawn as spectator even if I checked "Start Player as spectators" in the game mode ? turnin on/off "Delayed Start" won't work either. Launching in dedicated server mode will work but can't manage to make it work for listen server configuration.

chrome bay
#

@floral crow That should work, as far as I can see. The AClientSimulationClock actor is also replicated right?

#

Though unless you need an actor for a specific reason, this might be a good use case for an actor component instead.

winged badger
#

@floral crow that RPC works better if the client sends its own Timestamp to the server, and server RPCes the client's original TImestamp and its own Timestamp back

wanton tulip
#

Hello, I have a problem again. If I try to call SetViewTargetWithBlend directly behind the Unposses nothing happens. This only works if I use a delay between the two. Maybe there is another option because I don't want to use delays. This error only occurs on the server.
Anyone an idea? ๐Ÿ˜ฃ

wicked brook
#

@wanton tulip Why doing it after unpossess. Im pretty sure thats your issue. If you unpossess then you have no camera technically to set viewtarget with

abstract pike
#

@winged badger While that doesn't actually fix the issue of not being able to send an RPC because of no owner, why is that way better?

winged badger
#

because when you receive the return Client RPC

#

you have the timestamp you sent the request to server

#

so you just substract that from current timestamp for round trip time

abstract pike
#

No point sending that to the server, you can just save it on the client

winged badger
#

calling SetOwner on that Actor Server side with PC as Owner

#

solves the other thing

#

code is more cohesive with timestamp sent and returned via RPC

#

there are no breaking points, there are for caching it

lavish cypress
#

where does the default Steam session ID come from?

wanton tulip
#

@wanton tulip Why doing it after unpossess. Im pretty sure thats your issue. If you unpossess then you have no camera technically to set viewtarget with
@wicked brook Yes, but why its working 1 second after the Unposses?

wicked brook
#

@wanton tulip not sure. Is it a separate pawn or what? whats the setup?

wanton tulip
#

The Pawn get killed -> Unposses -> SetViewTarget to the Killer

lethal depot
#

is there any way to get non-local players on client other than checking all actors and looking for the specific class? ๐Ÿค”

#

*player pawns

meager spade
#

GameState->PlayerArray

#

contains all player states

#

can grab the pawns from there.

wicked brook
#

@wanton tulip you shouldnt need to unposess at all maybe. I think you can possibly do set view target only

meager spade
#

@wanton tulip unpossess clears the cam target, so if you do a blend same frame, you actually have no camera to blend

#

a delay of .1 second will also fix it

#

its just you are doing conflicting stuff in the same frame.

lethal depot
#

@meager spade but how do I get the player pawn from the player state? ๐Ÿค”

#

nvm lol