#multiplayer

1 messages ยท Page 550 of 1

foggy idol
#

send a screenshot of your gamemode BP

#

the part where you set the classes

swift cargo
#

no no

foggy idol
#

because the print should only happen when you posses the character

swift cargo
#

the map, didnt have the gamemode selected

#

so it didnt run SHIT

foggy idol
#

ohhh

#

so does it work Now ?

swift cargo
#

no.

foggy idol
#

send a screenshot of your gamemode BP
@foggy idol send this

swift cargo
foggy idol
#

because the blueprint for the controller and HUD are exactly like mine

swift cargo
#

So the name is " ". so its blank. currently the SERVER sees the nameplate as blank.

#

the client sees "???" which is the default text.

#

So the server is displaying the info but not the saved info.

#

but the client is getting nothing.

#

only defaults for the client

foggy idol
#

in the HUD blueprint Instead of trying to load info try just setting the name to something

#

i want to see if its the game mode or not

#

lemme try using my setup with a text render component

swift cargo
#

like this?

#

It's the same result.

foggy idol
#

damn

#

can i set this up in a separate project and send it to you

#

because mine works fine and i dont get whats going on in yours

#

@swift cargo

empty matrix
#

Hello everyone, how can I make a Solo, Duo and Squad system?

sterile shale
#

hey in c++ i have a function that runs on the client and i have it working in tick but not at all in begin overlap? please help im so lost i really need it to work in begine overlap

verbal gust
#

any pointers to what this means?

#

LogNet: Warning: UIpNetDriver::ProcessRemoteFunction: No owning connection for actor Cube_146. Function GrabObject_Server will not be processed.

pulsar maple
#

Does anyone has a good way of making a networked moving platform? Currently my solution works fine in some situations, but if the player has high ping, things fall apart when the platform moves quickly/changes direction or the player jumps. (using Character and CharacterMovementComponent)

wicked brook
#

@pulsar maple try smooth sync plugin?

nimble basin
#

Would anyone here have any suggestions/recommendations for a guide to follow for setting up a Dedicated Server with Steam?

#

I plan to first set it up from home with my Static IP, and later move it to AWS.

wicked brook
#

why not start with aws? you can use gamelift local

nimble basin
#

I thought it would be added complexity

wicked brook
#

gamelift is pretty simple

#

they have some good plugins that help a lot also. but even without its not bad

nimble basin
#

it works well with Steam?

#

I intend to also later support EOS

wicked brook
#

i have not used it with steam but it shouldnt matter. gamelift basically just helps with getting your clients to the server, matchmaking and stuff like that

nimble basin
#

Is game lift expensive?

wicked brook
#

its owned by amazon so no more than aws in itself

#

you will want to ue linux server for cheapest cost

nimble basin
#

Only reason I want to use steam is that I currently have my listen server setup working through that, but i would ultimately like to end up using AWS and EOS.

#

With dedicated servers.

wicked brook
#

im using dedicated now with gamelift/aws for my vr sniper game

#

you can still use the steam subsystem

nimble basin
#

hmm.. i guess i should try it. thanks for the tip. Any implementation guide / plugin you recommend?

wicked brook
#

looks like they went up on the price. When i bought it it was like 60 bucks

#

they put a lot of work into it though. it works well

#

They also have a ton of documentation and tutorials

#

If you want to look into a microsoft solution, they have a playfab plugin which is kinda like the AWS/Gamelift

nimble basin
#

ok, yeah i had been looking at that before but never pulled the trigger.

wicked brook
#

i havent had any problems with it

nimble basin
#

how long did it take you to get it going?

#

just so i have an idea what to expect

wicked brook
#

i mean if you already set up for multiplayer then it wont take long

#

couple hours

nimble basin
#

wow, ok.

#

I think i will get this one, since i'll need to do some DB stuff in the future.. probably use dynamo db

wicked brook
#

yeah nothing in game changes you just using it to find your server

wicked brook
#

If i have an offline lobby that the player travels to a server level, where a different pawn gets spawned, will playerstate variables from the offline lobby be the same in the server map?

thin stratus
#

no

#

Connection is a HardTravel

winged badger
#

they will if they are copied via CopyProperties override

#

but that woks only for server/host

supple vapor
#

anyone know where and how unique net ID is generated in UE4? ๐Ÿ™‚

#

been digging through engine code with a shovel but still can't find it ๐Ÿ˜…

verbal gust
#

would anyone know what this warning refers to: LogNetPackageMap: Warning: FNetGUIDCache::SupportsObject RuntimeAudioSource "..." NOT supported?

foggy idol
#

How do I use the smooth sync plugin to replicate camera rotation ?

winged badger
#

@verbal gust its probably a named component created on BeginPlay

verbal gust
#

Yeup it's an AudioComponent that i create on BeginPlay but I don't know what this warning means, could you spare a few minutes if you know?

winged badger
#

its warning its not net addressable

verbal gust
#

meaning i shouldn't do replication with AudioComponent?

winged badger
#

if it was replicated, you wouldn't get the warning

#

the pointer to it cannot be resolved over network

verbal gust
#

okay thank you

winged badger
#

there is no use-case i can think of to replicate the audio component

#

also, if it was on CDO, you would not get the warning

verbal gust
#

there is no use-case i can think of to replicate the audio component
@winged badger I should be more clear, it's more the playback controls I am trying to replicate so that the audio file is played "globally" when a client presses the "play button". AND I just happened to find this warning. Anyways thanks

winged badger
#

the actor you would send the RPC through can find its own Audio Component

#

it doesn't have to be replicated for that

#

you just can't send the pointer to the audio component as a RPC parameter, is all

#

(unless its on CDO or replicated)

verbal gust
#

Thanks for the help Zlo, got it

narrow prairie
#

ok, im not rlly sure how to explain. but: when i walk around on the map server side. the enemy ai hits me. it works fine however when i move in the map as clients. hits dont get registered... as i move in as server towards the client beeing hit. the hits start beeing "detected"' anyone knows what this can be?

gusty slate
#

Hello everyone,
1- I can noticed that I only get saturation on my Listen Server when the FPS is above 120. Is there any way to limit the actual FPS of the server replication and processing without affecting the FPS of the "client"?
2- What are the red flags on the Network Profiler that can allow me to see the saturation?

chrome bay
#

@gusty slate

MaxNetTickRate=60
NetServerMaxTickRate=60
LanServerMaxTickRate=60
NetClientTicksPerSecond=60
bClampListenServerTickRates=true```
gusty slate
#

Thank you Jambax ๐Ÿ™‚

#

I am still trying to understand why exactly limiting the FPS is getting rid of my saturation. Because I tried to use timers at 0.05s for example for my function that sends my data for the server for replication

#

I would have thought that timer would "simulate" a reduction in workload per frame

small marsh
#

Is there any way to disable the replication of attachment?

chrome bay
#

Well you can check the Network Profiler to see what RPC's are being sent and how often.

#

If replicated properties are changing quickly too, the Server will be trying to send those out at the actors NetUpdateFrequency.

#

This is why the default frequency of 100 is so stupid.

#

Not that that will have any effect on RPC's.

#

The Character Movement sends RPC's each tick, but it does a lot of work to try and compress them together and send less often.

gusty slate
#

I am trying to implement Physics Movement and I am using those Timers to not have it send movement data at each tick

#

But at 3+ players even though the RPC and Property size was small (imo small MP experience) it was getting saturated

#

I still need to learn how replication works so that I can optimize but the best case scenario principle in my mind is to set it up so it doesn't send movement data if the changes aren't important enough + it only care about the latest data sent or should I say received

#

But thanks for the pointers @chrome bay I'm in that starting phase where even diagnosing the issue is difficult :p

drowsy belfry
#

Hello, I have several questions about sessions, I think this will be long so thanks in advance for reading / helping.

I'm making a multiplayer game on which i want to be able to create and join sessions, for this I created a menu that has two buttons "Host" and "Join" which interact with functions on the GameInstance. Host creates a session and on success opens a map with listen as option, join button searches for sessions and joins the first one it finds.

Host works kind of fine, returns success and opens the level, the only issue it has is that it prints LogOnlineSession: Warning: OSS: No game present to leave for session (GameSession) which I'm not sure what it is and I cant find any significant answer in google.
The big problem comes with join, when i press join it prints LogOnline: Warning: OSS: Failed to send discovery broadcast SE_NO_ERROR and doesn't do anything else, pressing the button more times just prints LogOnlineSession: Warning: OSS: Ignoring game search request while one is pending. The error is sent when searching for sessions as the search sessions pin that gets called afterwards is "OnFailure".

Any ideas on what might that be and how to fix it? I read that it might be something that only happens on the editor but I made a build and it still didn't connect, also I saw videos of people trying this on editor and it worked for them.

Finally, once several players are connected to a session how do I open a level and make all of them travel to that level? Does open level work or do I have to do something different?

Thanks for reading and for the help!

Tl;Dr: Find sessions sends a SE_NO_ERROR when called, what is this?

green delta
#

is there an easy way to have a split screen in the editor when testing for MP?

hoary lark
#

@gusty slate in my experience, a couple of character movement components at a high frame rate (like 200+) practically sent out enough data to cause saturation. I settled on capping the game frame rate to 250 (for 240hz screens) and I increased my game's bandwidth limits. I don't know if there's any other way around it

gusty slate
#

I think seeing that my replication code is simple and has none of the features to optimize like the Character Movement I'm going to experiment with capping the tick rate of the server. The game will have a max of 10 players, at a max

#

I don't think I'm running into bandwidth limits but I don't have a lot of experience with this yet to judge that. I'm currently comparing net profiling between 240 fps and 120 fps to understand how the improvements come from

#

3 Standalone clients, left t.maxfps 240 right is 120

#

I don't understand why the lower FPS one is more stable even though I can see that the RPC count is nearly the same and packet sizes got a tiny bit bigger ๐Ÿค”

swift cargo
#

This stopped working randomly.

#

Its just a button to join off of an ip but it doesnt join, it fails. i have a server browser that works but this doesn't.

#

The ip is saved, its just the joining part that fails

chrome bear
#

Quick question about blueprint networking. How can I check if a session has expired or not? (After FindSession and before JoinSession) because session result won't dynamically update

pulsar maple
#

@wicked brook The SmoothSync plugin would work great for making the moving platform itself move smoothly, but the character is the problem here. Replacing CharacterMovementComponent's replication with smoothSync would cause other problems

steady briar
#

on a listen server, is this how one would run a function only on the client? its just a trace for UI stuff, server doesnt need to know it

#

its on the player controller if that one node didnt make that obvious o_O

crude coral
#

guys is really the linux dedicated game server will be cheap consernant the host cost compared by the windows dedicated game server?

clear copper
#

@steady briar everything that isn't replicated is only run on the client so just make a custom even and dont replicate it

nimble patrol
#

Hey, I have this issue where the client doesn't know how to handle position of another player (Host) on a moving vehicle (Boat). I have the boat on Pre-Physics and then Player Characters as Post Physics currently. On land the positions and rotations all work normally as expected. Any idea where I should begun looking at this issue? The Host sees everything fine, but that's pretty much expected

pulsar maple
#

@nimble patrol I'm working on something similar, it is not an easy problem to solve ๐Ÿ™ƒ

crude coral
#

@nimble patrol : when the boat moving your client character shake like that?

nimble patrol
#

No, the client/host are both fine standing on the boat, but the clients see other players shaking like that when standing on the boat.

crude coral
#

ah ok so something with the replication i think not ok..when on the boat the characters standing just or walking around too?

#

and the boat is replicated?

#

for me i have a car not boat but i don't have your issue when players use it so i will try to help you by looking to my reference

nimble patrol
#

when on the boat the characters standing just or walking around too?
Just standing, though all players are able to walk around the boat without issues, it's only the visual representation of other players that looks wrong. The Boat is replicated yes

crude coral
#

you have command for players standing on top of the boat or just simply jump to it?

nimble patrol
#

Yea just jumping on it or spawning on it currently

crude coral
#

you try turn off the movement of the boat and see if still the players shake like that?

#

the movement of the boat i mean the vibration

#

if that fix the issue so you have problem possible with the physics movement replication

nimble patrol
#

That prevents the shaking of the characters. So its def. tied to the movement of the ship

crude coral
#

replicate movement cheked and you call the event on server?

winged badger
#

@nimble patrol last time i saw that kind of jitter client and server did not have the same movement mode in CMC

nimble patrol
#

Yea I'm going to do a pass on all my replication settings, I think my issue is that my boat isn't being replicated properly at the moment

winged badger
#

that isn't in replication settings tho

#

this looks like one is using navmeshwalking and other physicswalking

#

result being the 30 or so units on Z axis difference in what they see as resting position

#

ergo, the vertical jitter

nimble patrol
#

They are both using the exact same Player Character, Since this isn't AI controlled wouldn't it always be using Physics walking?

fervent yacht
#

There is a thing about moving platforms auto moving characters iirc

#

The character is considered moving if the platform does. Last I knew anyway.

#

Zlo is probably way more experienced here but.

narrow skiff
#

How do I call a Variable from client to dedicated server, I have the variable inside of game instance and then the GameMode calling it to set it, When I do Open Level and it loads everything into my database correctly including the right GameMode. but once the dedicated server is involved it just set it to the default value of the Variable

It works on sending the variable if I click listen server and then open the map directly without the IP travel. But once I do an IP travel it just sends a 0 to my database

steady briar
#

any reason why a client on a listen server isnt able to do an interface message to an actor, but the server's character can?

winged badger
#

it can just fine

#

but your interface does nothing in simulation

#

so you need to send an RPC that calls the interface

steady briar
#

even if its just for UI stuff?

#

just trying to make a widget turn on and off, but it seems to be ineffective on the client

small marsh
winged badger
#

no RPC for UI stuff, you just made a mistake somewhere

twin juniper
swift cargo
#

Hey guys, i have an issue with Joining a server in the editor. it can join off search result but it can't join off Open (IP) command. anyone know what i mean?

#

Games are joinable through search results in the Advanced sessions. But a simple console command like Open 127.0.0.1 Wont work.

#

Also when packaged the game crashes when trying to host a game.

swift cargo
#

Following solutions online just corrupted my project. i spent 4 days in 8-12 hour sessions.

#

Time to kill myself.

steady briar
#

u didnt back anything up?

swift cargo
#

I did.

#

i just feel dead inside.

steady briar
#

most ppl here have been dead inside for years

swift cargo
#

i have a version that has very minimal changes.

#

i just can't connect to anything for shit.

#

everything is fine in the editor, but not in the packaged game.

#

when switching to the advanced nodes it CRASHES the packaged game when starting a hosted game.

steady briar
#

ive only gottan LAN multiplayer to work =/

swift cargo
#

people said to create a C++ object class and name it something random and it would solve it, when doing that it BROKE the fucking project

#

all i want is for online to work for my friends. i dont know what im doing wrong and getting someone to help me is impossible.

#

i spend way to much time for everything to just die.

#

functions randomly stop working, packages versions of the game act differently.

#

its all just so random with no clear path to understanding.

steady briar
#

ive spent a few days trying to figure something out and no luck whatsoever. it happens o_O

#

thats why theres 2 types of games. shittily put together copy/paste template games or games that take absolutely forever to come out, even when u saw seemingly good gameplay for it years ago.

drifting plank
#

Did you try to join without having to package by adding command line to your uproject? It could maybe help to test what is wrong

#

You just have to create batch file

#

This methods concerns dedicated server

#

I didn't work so much with listen/hosted server

swift cargo
#

im not using dedicated

#

only host/client stuff

barren patrol
#

can I use the CMC RequestPathMove / RequestDirectMove on server, instead of the normal client predicted flow?

#

in multiplayer, on a Character that is possessed by a client and has "Autonomous Proxy" net role

#

in some cases, i want to skip prediction and just do some server-controlled movement. specifically, for pathfinding to a target in range (so root motion isn't useful)

#

maybe i should just be using the Pawn instead of Character?

barren patrol
#

i was able to get some movement working by disabling acceleration, but on the client it just looks like repeated server corrections, its not smooth at all. perhaps i am really just abusing the CMC at this point but I would love to have the option to predict movement sometimes, just not all the time.

shrewd tinsel
#

how do i append server options?

#

spacing them with spaces dont work

fleet raven
#

isn't it & to separate args?

shrewd tinsel
#

i dont know is it

#

isnt it "?" actually?

#

also should listen be in front or end

somber glade
#

Is it normal for "on post login" to run before "begin play" on the game mode on the host in a listen server?

chrome bay
#

@shrewd tinsel it's formatted as ?Key=Value

thin stratus
#

@somber glade I would say yes

#

I wouldn't take that order for granted

somber glade
#

I was just surprised. I thought begin play should run first as I thought the level is created before a player controller can be spawned.

chrome bay
#

The match doesn't start until at least one player is present by default

#

BeginPlay() is only called if the GameMode has called "Start Match"

thin stratus
#

Honestly not sure about that. I delayed start in multiple projects and I think I often had BeginPlay calls happening

chrome bay
#

Oh sorry it's Start Play not Start Match

thin stratus
#

Ah

tawny mason
#

Hi guys, do you guys know why a session find attempt with steam could say Server failed to respond ? i have tried on 2 different PC on the same network and on different networks.

shrewd tinsel
#

how do i show widget right after player logs on to server? right now it only works if i put a delay node

swift cargo
#

Hiya everyone, After packaging my project the multiplayer stopped working. i'm using advanced sessions and steam plugins, the package doesn't even use steam but the editor standalone does use steam. any ideas? even just something to look into because im dead in the water at this point.

shrewd tinsel
#

im asking player controller to show widget from gamemode

#

on player log on

#

@swift cargo what exactly doesnt work

swift cargo
#

Joining a hosted sever that is on listen.

#

it works in editor. but not in the packaged gme.

shrewd tinsel
#

standalone?

swift cargo
#

standalone option in the play of the editor.

shrewd tinsel
#

aight

#

no idea

#

i'd try rechecking configs

swift cargo
shrewd tinsel
#

project settings

swift cargo
#

recheck configs?

#

what do you mean?

shrewd tinsel
#

defaultengine.ini

#

you do have steams online subsystem line inside the config?

swift cargo
#

yeas

shrewd tinsel
#

sometimes i had to re-add it somehow

swift cargo
#

``
[/Script/Engine.GameEngine]
+NetDriverDefinitions=(DefName="GameNetDriver",DriverClassName="OnlineSubsystemSteam.SteamNetDriver",DriverClassNameFallback="OnlineSubsystemUtils.IpNetDriver")

[OnlineSubsystem]
DefaultPlatformService=Steam

[OnlineSubsystemSteam]
bEnabled=true
SteamDevAppId=480

[/Script/OnlineSubsystemSteam.SteamNetDriver]
NetConnectionClassName="OnlineSubsystemSteam.SteamNetConnection"
``

shrewd tinsel
#

looks ok

swift cargo
#

this is the line i added.

shrewd tinsel
#

tried deleting saved/intermediate etc, regenerating visual cpp files?

swift cargo
#

joining from an IP console command IN editor stopped working too

#

how do i regenerate visual cpp files?

shrewd tinsel
swift cargo
#

where is this located? are you saying just delete saved/intermediate files and regenerating could help it?

shrewd tinsel
#

yeah

swift cargo
#

i dont have binaries

shrewd tinsel
#

u can delete these folders but backup maybe

swift cargo
#

i backed it up

#

why dont i have the binaries folder in any of my projects?

#

@shrewd tinsel

shrewd tinsel
#

cuz its blueprint only on ur project

swift cargo
#

right

#

thats not an issue for what im trying to accomplish right?

#

client server type multiplayer

shrewd tinsel
#

so generating visual studio files is not for you

swift cargo
#

??

shrewd tinsel
#

cuz its only bp on ur project

#

just delete those folders and try packaging again

swift cargo
#

Ok ill try

#

its insane how i scripted a blueprint like 4 days ago and it always worked until yesterday.

#

i changed NOTHING about it.

#

the most consistent and easiest thing.

shrewd tinsel
#

when u will find the issue you will say 'oh i see now'

swift cargo
#

can YOU join listen servers off of Open 127.0.0.1

#

?

#

@shrewd tinsel

#

cuz I CANT

shrewd tinsel
#

i dont know

#

why not 192.168.1.x

swift cargo
#

i tried both

#

my own ip, local host.

#

the ONLY way for me currently to join games in editor is to use my server browser thing i made.

#

it finds the game and adds a child widget to a vertical box.

#

and joins the sessions from a button on it.

#

@shrewd tinsel Packaging now, deleted saved and intermediate before opening.

#

@shrewd tinsel after packaging its the exact same issue.

#

steam doesn't work in package either.

#

When you press TAB to see player lists during hosting it gets your name, it crashes when you do so.

tawny mason
#

how do i show widget right after player logs on to server? right now it only works if i put a delay node
@shrewd tinsel was this directed to my question or to another?

gusty slate
#

Hello,
Is there any command to check the current server tick rate?

shrewd tinsel
#

it was a question generally, but irrelevant now

#

i have a question

#

how come i cant damage the player running on server?

#

server can deal damage, but clients cant

#

im running ReceiveDamageOnServer on the servers version of the pawn right?

#

is it a ownership issue?

grizzled stirrup
#

When you set up an OnRep function like so void OnRep_CurrentHealth(float PreviousCurrentHealth); when you manually call that OnRep function elsewhere for the Server to call it for example, it still expects an argument

#

How do you get that previous value to pass in? It does it automatically for clients if you aren't calling the OnRep function yourself

#

Might just be easier to store a local value elsewhere rather than needing to store a sever only previous local value to pass in whenever calling the OnRep function on the server

faint pawn
#

any guide on creating a p2p based network game? i want to create a co-op game and one of the players will be the host for the session. i've followed the network series using steam but thats not what i intend to do

twin vault
#

one of the players will be the host
then its not p2p

#

just sayin cuz u wont find the correct documentation if you try searching for that

faint pawn
#

oh, i see. so that would mean that the game has a dedicated server, and that server happens to be 1 of the players, right?

twin vault
#

yeah but when one player is the server its called Listen server

#

p2p is when no one is actually a server

faint pawn
#

this is my first time doing anything multiplayer so everything is kinda new to me

#

i've read a bit and i think i'll try to set up a listen server. do you have anything that might help me in any way? or just a general tip?

#

appreciate the help btw

twin vault
#

check the pinned messages

#

maybe theres something that helps you

sweet bramble
#

Hello everyone, I have a question regarding movement I hope someone can help me with. I am working on movement like climbing. I put the character into Flying mode. As they move along the surface, I am calling MoveUpdatedComponent(...) on the MoveComponent to adjust their position and change their rotation. At the end when they climb up, I play a networked root motion montage, and then set the characters rotation to 0 out Roll and Pitch. What seems to happen is this works, then the next frame the client gets the server network message and puts the rotation back to what it was (because it received it from the server it seems).
Wondering, is there a better way to handle this type of movement? Would implementing this into FSavedMoves make more sense? Any help is appreciated thank you!

hoary lark
#

Didn't I read in here sometime long ago that if you enable one of the sessions subsystems/use steam that you can no longer direct connect to IP or something weird? (Reading Chase's messages lol ThisIsFine )

spring tiger
#

Does anyone have experience with custom Literal Session Properties? Im adding a literal string but we're unable to find it / filter by it when using Find Sessions (via Advanced Sessions)

lucid vault
#

I got my control rotation to replicate to the server. Does anyone know why it does not replicate to other clients?

#

I would think that clients would be aware of each others control rotation

wheat magnet
final thicket
#

@long cradle This is the wrong tab to post that, but either way it just means UE4 can't find an asset you are using possibly because you have moved / deleted it / failed to save it

#

My question :>

We are running into some issues with our virtualized dedicated servers, the problem I am sure is an authentication issue, the server has no access to a steam account, and is not running a steam client, but this means it won't initialize the server API, we are aware of an anonymous sign in method but unsure where and how to implement this with unreal engine 4, any advice would be very helpful!

long cradle
#

Itโ€™s okay I was just following a tutorial, I had to reset the computer soon after I posted that anyway cuz half the files on the computer got Thanos snapped

supple vapor
#

@swift cargo if steam is enabled, then you cant join using raw ip adresses anymore, only through steam id :/

#

@final thicket do you mind pinging me when you are free? I'm debugging a very similar solution and we might be able to pool together what we have tried

swift cargo
#

how do i know if steam is working in a packaged project? i dont get the overlay or anything

#

i can't get it to get an overlay.

supple vapor
#

if it doesnt show up, try launching through steam

swift cargo
#

so i have to MANUALLY launch it through steam?

#

like add it to steam?

supple vapor
#

yeah but honestly its hit or miss ๐Ÿ˜ฉ

#

ive been struggling with it too

swift cargo
#

@supple vapor is a packaged game with NO steam be able to have a client server multiplayer?

#

i dont know if like, its crashing because it can't find a connection and its broke or what

#

the PIE player in the editor is what i've been using for connecting to people, it works with server browser stuff but not with IP joinging

#

and the PIE thing doesn't let steam work

#

im so UNBELEIVABLY LOST

supple vapor
#

same u sound like me last week

#

ive been making some progress but its still horrible

#

best thing u can do is -> search steam in the side bar in this discord channel

#

you'll find lots of ppl with your exact question and some solutions

#

trouble is they make some features work but break other features ๐Ÿ˜ฉ

swift cargo
#

i spent so much time on this project and i have no clue where to start.

#

i just want basic multiplayer with my friends to test the game, to test if i should even keep going.

#

this is a sign

supple vapor
#

at this point, i think ive to start messing around with engine code and force it to do what i want

#

doesnt really seem like there is a complete solution

swift cargo
#

launching it through steam still made it crash.

#

time to hang myself

supple vapor
#

steam purposefully blocked off a lot of features to force devs to ONLY use steam and not allow cross play

#

with other platforms

bronze arch
#

hey guys how i can spawn a character actor only on server and owner client? i dont want to spawn also other clients.

#

Only Revelant to owner is means that?

supple vapor
#

@bronze arch yep

#

best to do in controller

bronze arch
#

no i need to spawn a special character to only owner

#

so

#

thank you

supple vapor
#

@bronze arch oh wow, you're the person who posted the prelogin steam code ๐Ÿ˜…

#

im literally using that to solve my incompatible net uiid prob now

bronze arch
#

glads it helped owowink

supple vapor
#

by controller i meant to use controller as 'owner'

#

for the relevant to owner

#

since controllers are only server and owning client

#

by default

#

so technically anything spawned with controller as owner

#

should only replicate to that client

bronze arch
#

now i removed that only revelant to owner, still doesnt work what the

#

its set on gamemode default pawn class rn

wise depot
#

doing sessions in c++, whats the correct way to add extra settings? as seen in Sessions->Settings

grizzled stirrup
#

Should you mark essentially every property in the PlayerState as transient or does it not really matter?

#

UPROPERTY(Replicated, Transient) TotalKills;

#

I notice in the UT code they don't really do it at all in the PlayerState even though most of these kinds of properties theoretically should be transient

#

So I guess it doesn't matter if you do it or not really

distant talon
#

Just a sanity check question i think i already know the answer to:

If you set a replicated variable in BP but the value is the same, will UE4 replicate those variables out to clients, wasting bandwidth on replicating a var that hasnt changed?

lost juniper
#

hi I'm wondering how do I setup a player counter on a menu that will affect the actual number of players in game??

wise depot
#

@grizzled stirrup only properties that you want to be filled with zero at load time should be marked as transient.

That being said, if the default is zero anywhere then its fine. its mainly just to ensure values set for testing in editor aren't accidentally packaged out as the defaults

#

@distant talon as far as i'm aware, unreal only replicates a value that has changed. thought it may be sent in hte initial replication packet

#

@lost juniper GameState->PlayerArray.Num() will get you the total number of players

or Get Game State->Player Array->Length in blueprint

lost juniper
#

@wise depot Thanks how would I go about setting that value?

wise depot
#

you don't set it, its automatically updated

#

i think i misunderstood what you were asking for

#

when you say "player counter" what do you mean?

grizzled stirrup
#

@wise depot Got it thanks! So as good practice even if the default values are 0, for any value that will only be set at runtime such as CurrentScore / CurrentHealth / CurrentUpgrades / RedTeamScore / CurrentTime etc.

#

It would be a good idea to mark those as Transient ?

wise depot
#

not health, unless you want it to start at zero, but current score sure

grizzled stirrup
#

I have a MaxHealth property

#

That wouldn't be transient

wise depot
#

anything that is transient will become zero when its packaged out and loaded in.

grizzled stirrup
#

But sets CurrentHealth

wise depot
#

ah ok, yeah in that case then that makes sense

grizzled stirrup
#

Cool thanks I'll do it just as good practice then

lost juniper
wise depot
#

oh i see, in that case you want to click on the slider in the widget editor and on the details panel on the right hand side right at the bottom should be a abutton called "Value Changed" or something like that with a green button with a + in it, click that and it'll create an event in the event graph for when the slider changes value, you can use this event to then feed the value into whatever you like

lost juniper
#

So actually i did that step already. I just really don't know what I'm supposed to do now ๐Ÿ˜

wise depot
#

looking at your names, you want to go

Get Game Mode-> Cast to BP_Battle_GameMode then pull off the little blue pin and use Set Player Count

#

or number of players or whatever it was called

lost juniper
wise depot
#

yeah, then that'll set your value in your game mode to use however you are using it

#

if you want to update the text you need to set hte text box to be a variable and then call SetText on it inside that same event and se thte text to the value of the slider

lost juniper
#

Ok

#

Problem is when I try and compile I get an error

wise depot
#

what is the error?

#

oh

lost juniper
#

That I haven't given it a target

wise depot
#

you need to cast your GetGameMode to the right game mode

#

which is BP_Battle_GameMode

#

instead of "Cast to GameMode"

#

i would suggest watching some tutorial videos on getting started with unreal and blueprints, also some on unreals multiplayer

lost juniper
#

Ok thanks any recommendations?

wise depot
somber glade
#

I have a "run on owning client" on my player controller that isn't being run on the owning client. Scenario:

While testing, I need the player controller to set a "player name" string variable on begin play for that player. Later I'll be building a parser system to pass this information on as part of the Join "?options" later on. For testing purposes now though, I just need it to give up a name so I have something to look at on some menus.

The problem is when the game mode builds the player card after the player joins, begin play has not run on the player controller and the string isn't set. My idea was to have the game mode make a call to the player controller and force it to set the name so that's it's available. The Player controller has an RPC that sets the string in the player state, replicated. That part is no problem it works fine, it's just delayed.

However, when the server makes the call to the player controller and has a "run on owning client", it's not really running on the owning client. It's still reporting the controller as the hosts controller, and not the clients controller.

#

however, immediately after this I have an "is server" and that Is server is reporting "true" when it should be returning false as it should be running on the client's controller

#

The call to the controller is being made from the "onpost login" and pulled off the controller variable there. There is no confusion that this is the client's controller. The host is well logged in and setup at that point

#

I've put in a breakpoint and it's attempting to make this call on controller_c_1 which is the client's controller so it is attempting to call this on the correct controller.

#

The only thing that works, which is really hacky, is to add a looping .1 second delay before creating the player card. Check the player's name length and if's not greater than 0, loop 0.1 second and check it again. There is a slight delay until the player controller sets the name in the player state, but once it does, it creates the card with a name. Oddly the server seems to get the card right away, but on the client's side (this is a MP waiting area where connected players can gather and push "ready" before starting) there was a noticeable delay before the card showed up.

narrow skiff
#

Anyone know how to change steam ports or even disable the steam networking?

#

I know you can do
[URL] Port:7777
But it changes it on my server too, I need at least separated ports away from the same port or just disable steam networking.

I disabled the SteamNetDriver but then I will end up just getting a Net Driver error

steady briar
#

for a player controller, if i do "Is Local Player Controller" and branch off true and run a function, should that work the same for clients and the host/server?

somber glade
#

@steady briar Yes, as far as I know that will only run once on the player who owns that controller

steady briar
#

its odd because i get different results on the host/server vs clients. hmm...

somber glade
#

start with print statements and break points see what its' reporting\

steady briar
#

it works the same except it simple does not do interface messages

#

it executes stuff after them, but the interface functions never print so i dont think theyre running at all

somber glade
#

Remember if it's running on your client, it's not making server calls

steady briar
#

does interface have to be run on server? and either way, if it works for the host then its obviously not filtering out the server correctly

somber glade
#

if you're doing a listen server, your host is the server

steady briar
#

yes i know...

somber glade
#

it's hard to know, but likely yes, your interfaces would need to run on the server if they're supposed to be setting values or doing things that need to be replicated or seen by others.

steady briar
#

just making a widget visible or hidden for the person looking at it. shouldnt require the server

#

and either way, if im using Is Local Player Controller, even on the host shouldnt that just be local?

somber glade
#

In that case, no. It should not need to be replicated or run through the server.

#

that's the hosts copy of the player controller yes.

steady briar
#

so im just not sure why it works for the host but not other clients

#

if its filtering out the server anyway, host should be the same as a client

somber glade
#

is this running on begin play or what?

steady briar
#

no

somber glade
#

How are you calling this event?

steady briar
#

ive tried numerous ways. i was doing BeginPlay -> then branch off of Is Local Player Controller and set a timer that looped the function

#

ive also just set it to keyboard buttons with the same result

somber glade
#

if you run on begin play and use "local controller" then the code that follows should run only on the local player controller. Add a print statement immediately after it and see what happens

steady briar
#

ive put prints everywhere but what do u mean immediately after it

#

after i set the timer or immediately after the local controller branch or immediately after the button press function

#

the function returns a value on host and client just fine

#

it just doesnt call the interface on the client

somber glade
#

like this.

#

Make sure you're only seeing a print on the clients

#

and the host isn't also printing for each controller

#

If something isn't working, start at the beginning and make sure everything is behaving as expected at each step

steady briar
#

if i only set it to 1 player it says Hello. if i set it to 2, i get 2 Hello and 1 Bye

somber glade
#

and who does it say is printing each statement?

steady briar
#

server is hello and bye, client is hello

#

but if its just the 1 player, server says hello

somber glade
#

ah yes, if I recall begin play doesn't inherently run on client actors.

#

I do remember having a similar issue on another project, I'll see if I can remember which it was and how I solved it

steady briar
#

well if i use an input it doesnt seem to work either. everything off of beginplay "works", like the timer does start and fires the function every loop and it does get a result... it just isnt running the interface messages inside the function (or outside but i moved them cuz it didnt work anyway)

karmic briar
#

hey guys i wanna ask how do u guys usually do ping system where it shows your ping?

somber glade
#

Where exactly do I find the game session? I'm using the advanced session plugin. It just creates a session, there is no reference to it. It looks like AGameSession has some built in features, like "kick player", but I can't figure out how to get a reference to it to cast to it.

polar bridge
#

when spinning up a dedicated server the only port i should have to forward is 7777 tcp/udp right?

narrow skiff
#

Are you wanting to host multiple servers?

#

@polar bridge

polar bridge
#

nah just one

#

can connect fine locally but friend outside of network has issues, just double checking my firewall rules

narrow skiff
#

Then yea you should be fine opening that port you could even change the port if you wanted inside of the engine file

[URL]
Port=8474

polar bridge
#

perfect, thank you!

narrow skiff
#

If you are wanting to open multiple servers, Aka server instances you would want to range the ports say 7777:8000 it will open all the ports in that range (On your router)

polar bridge
#

oh interesting, good to know

narrow skiff
#

๐Ÿ˜„

queen quiver
#

Is it possible to host a server on my machine then have someone connect remotely via the cmd? I'm assuming all that's required for that is both players/connectee's having a built version of the project (and the IP, port etc)

#

(in the same way you'd connect on a lan network, except using external ips)

fossil spoke
#

@queen quiver Yes thats typically all you need.

#

Your Router may need to port forward 7777

queen quiver
#

Thank you Matt, that is much appreciated ๐Ÿ™‚

acoustic bobcat
#

When client tries to executes "run on server" replication on custom event it doesn't execute

chrome bay
#

They probably don't own the actor you're calling it on.

#

@karmic briar you can get ping from the Player State

#

@somber glade GameSession is stored in the Game Mode

somber glade
#

@chrome bay Thanks, I had to use c++ to get it, it's not retrievable via blueprint in any useful way

final thicket
#

How do you authenticate a steam dedicated server?

#

Without just downloading steam and logging on?

dry turret
#

has anybody else experienced massive vehicle movement jitter when applying steer? forward/backward movement is always fluent, but steering requires cranking up net update freq to very large values

unkempt tiger
#

when I change the owner (owning connection) of an actor on the server to some client, is that client now automatically able to call client->server RPCs?

winged badger
#

it is

#

if the top owner is that client's PC

#

@dry turret search the discord conversations for it, i remember an example being posted

unkempt tiger
#

thanks @winged badger

lucid vault
#

Modifying the character rotation has a different outcome on the client than the server

I call this code from an anim notify. It is supposed to rotate the character. It works on the server, turning the player 90 degrees. But on the client, it only turns the player around 45 degrees
Unchecking replicate movement fixes the problem. However, I need replicate movement enabled

GetCharacterMovement()->FlushServerMoves(); before setting the actor rotation also fixes the issue on the client but causes the rotation to not happen on the server

#

It looks to me like the server rotation is trying to override the clients. Is there a way around this?

chrome bay
#

I would just not rotate the character

#

rotate the mesh instead

#

Rotating the actual character via an anim notify is never going to work well with networking

#

And yes the server rotation does override the clients' rotation, it does that each time you get a network update.

lucid vault
#

Interesting. I'l give rotating the mesh a shot and see what happens

lucid vault
#

@chrome bay I just implemented that. The issue now is that the server straight up doesn't rotate CLIENT characters when replicate movement is on. However, the client rotates perfectly fine and the server's character rotates fine on the client

chrome bay
#

I'm not really sure what you're trying to do tbh, but if you need to rotate the mesh, do it locally only

lucid vault
#

I am making a turn in place system

chrome bay
#

The Server won't rotate the mesh, it only replicates movement for the capsule.

#

So if you want to rotate the mesh relative to the capsule you need to handle it locally

#

It also gets more complicated because the character movement system smooths the mesh itself too.

#

Also, animations won't stay in sync between server and clients anyway, so it'll probably look weird if the Server tries to do it

quasi wyvern
#

i am having trouble connecting to a unreal server via LAN. works fine with an old galaxy s7, but my pixel can't join or host a session. any ideas what could be the problem?

lucid vault
#

@chrome bay Is there any way to replicate control rotation without replicate movement ticked?

#

I always have performance problems using RPCs. Although, I could do it if necessary

gusty slate
#

@lucid vault ControllerRotation? You can simply use a replicated variable, probably best unreliable and use that

lucid vault
#

I ended up just using replicate movement but I created my own replicated CharacteRrotation variable that get's set via RPC unreliable. This keeps the turn in place system in sync @chrome bay

#

And in tick I just set actor rotation to CharacterRotation

meager spade
#

@lucid vault don't use Advanced Locomotions TIP

#

(that is what i think that is, looks familiar)

#

idea behind TIP is to always allow the capsule to rotate, but counter rotate the root bone in the animation BP. basically, capsule rotates normally, but the mesh is counter rotated to stay straight, till X distance passes, then you bring the root bone back into alignment.

gilded vapor
#

I am just starting to test multiplayer with my friend, however I am running on linux and he's running on windows.

When we build we have issues connecting, and I noticed this warning:

LogPlayLevel: Warning: [2020.06.23-15.11.23:592][502]LogOnlineSession: Warning: STEAM: Removed incompatible build: ServerBuildUniqueId = 0x00c89141, GetBuildUniqueId() = 0x00000000

Is this because I am building on linx and he's building his version on windows?

Do we need to build on a single machine and somehow use Unreal's redistribution system?

#

(Or is this just an error somewhere else in the project)

meager spade
#

builds have to match

#

ie they have to be built on the same pc with the same compiler

gilded vapor
#

Okay thanks

#

Is this simple todo building for cross platform?

meager spade
#

should be, i saw guides somewhere for building linux on windows

#

not sure linux to windows tho

gilded vapor
#

Cool, thanks again]

lucid vault
#

@meager spade It is ALS 3. I simply converted it to c++ and removed a lot of the unnecessary net code. I have seen that same style of TIP that you have talked about. I might give that a shot if I run into more issues with my current set up

gilded vapor
#

@lucid vault does ALS3 work on 4.25?

lucid vault
#

Yep

meager spade
#

its TIP system is garbage

#

i use 0 RPCs

#

for turn in place

lucid vault
#

Is your TIP accurately replicated?

meager spade
#

its the same way TIP works on Fortnite

#

and most games

#

ofc it is ๐Ÿ˜„

#

would not have mentioned it otherwise

lucid vault
#

Lol true

meager spade
#

ignore the wobbly leg

#

i did this in 5mins

faint pawn
#

Plan for multiplayer early

If there is a possibility that your project might need multiplayer features at any time, you should build all of your gameplay with multiplayer in mind from the start of the project.

lucid vault
#

Just start development on a dedicated serer with a single player

#

Also @meager spade That looks pretty good

graceful pumice
#

Hey guys, so I've been trying to overwrite GetBaseAimRotation() to include replicating the pawn's yaw value. I basically replicated the steps used for RemoteViewPitch, but the yaw doesn't replicate. So what's the best way to replicate yaw for aim offsets?

hoary sandal
#

Hey guys I'm trying to repicate a 3D widget, I read a forum thread where they advice to use single process, and I had a question about that, what does single process mean and how does affect things in multiplayer ?

solar stirrup
#

Apparently rep notifies can get called before begin play

#

problem is I use begin play to initialize references to other actors

#

what's the best function I can use where other actors will be valid, but is guaranteed to be called before any replication notifications?

gilded vapor
#

@lucid vault hey just wondering what is the pros/cons of switching to ALS3 (from 4)?

Do I just lose mantling (but get networking out of the box)

small marsh
#

@wheat magnet yes, i do set actor rotation again, but but I come across some kind of lag. I set the rotation, but after 0.5 seconds it becomes in the wrong position. I think this is due to attachemnts replication

lucid vault
#

@gilded vapor I'm not too familiar with ALS 4. I decided to with 3 simply because it was already working replicated. I'm sure that ALS 4 is a better system, although I'm not sure about it's current replication state

gilded vapor
#

ALS4 Doesn't have any support for replication, though there are forks of it that added support for it

#

My other issue is that adding overlays/new states seems kinda tedious (you have to add a bunch of things for a single state)

#

Is als3 still just as difficult?

lucid vault
#

I'm pretty sure ALS 4 has a much better system for overlays

queen quiver
#

Are the blueprint nodes 'create session' and 'join session' supposed to work such that I can hand off my (packaged) project to a friend, run the same project and they should be able to connect to a session I'm hosting?

#

(with no additional setup outside of the game)

#

can you expand on discovery? I'm aware of port forwarding but I'm not exactly sure how these nodes are supposed to work in terms of identifying the hosted server

#

Mm, fair. Is there a node, or set of nodes I could use to allow users to enter an IP address to connect to?

#

Yeah, I was hoping those nodes represented that some sort of 'default' subsystem that already existed in the engine but I guess that was just wishful thinking :\

#

Awesome, will do. Thank you very much for that. If all else fails I've gotten connecting via cmd to work quite well so I can use that for testing purposes, but yeah. Dreading learning about what I might have to use for shipping a real game with multiplayer ๐Ÿ˜›

#

Woah! There's an execute console command node! That's actually great. Thanks again Lorash ^.^

short temple
#

Hello, thanks in advance if you read and answer this! I am looking to hide the healthbars and nameplates for enemies that are not in my line of sight

#

but I can't find any information on how to do it, can anyone help?

twin juniper
#

Hey, I need some help with websockets. In constructor my own class inherited by AActor I have:

webSocketModule = &FWebSocketsModule::Get();```
Why in BeginPlay *webSocketModule* is nullptr?
```TSharedRef<IWebSocket> iWebSocket = webSocketModule->CreateWebSocket("ws//localhost:8080");
webSocket = &iWebSocket.Get();
webSocket->Connect();
webSocket->Send("Hello from ue4");```
dark edge
#

@short temple Not really a multiplayer question but you can either maybe use the EQS or have a sphere collider that adds characters to an array on overlap and line trace to all the characters in range on a timer.

dawn summit
#

Greetings, can anyone explain how possess works?
I need a possess event on client. Found a solution where user suggest to override Restart. But i dont understand how it work on client if no possession happens?

supple vapor
#

@dawn summit in your controller you can override 'Acknowledge Possession'

#

this is called client-side when controller successfully possesses pawn

dawn summit
#

thank you

queen quiver
#

What dedicated server solutions should I be looking into for UE4 for potential use in my projects?

#

Currently I'm intending to look into: Steamworks SDK, Amazon (can't remember they name but saw it recommended), OpenWorld Server.

I'm wondering if Epic Games has their own that in some way may be required for publishing on the epic games store, or if there are any others that integrate well with UE4

#

(Also mostly looking for persistent connections that are easy to integrate databases into or have their own in-built database systems, as of right now)

dawn summit
#

@supple vapor hm...

    /** Returns true if input should be frozen (whether UnFreeze timer is active) */
    virtual void AcknowledgePossession(class APawn* P);

but it returns void...Epic

meager spade
#

ofc

#

that coment does not belong to that

unkempt tiger
#

when calling multicast RPCs, will UE4 use AActor::IsNetRelevantFor() when choosing who to network to, or will it forcefully send the multicast RPC out to everyone?

meager spade
#

Unreliable doesn't care for relevancy iirc

#

or the other way round

#

but one of them doesn't

unkempt tiger
#

unreliable RPCs dont but reliable RPCs do or vice versa? why would there be a difference as far as actor relevancy goes? thinkautism

twin juniper
#

on my server its portals works fine

supple vapor
#

@dawn summit you can make a 'BlueprintImplementable' event that gets called inside acknowledge possession

#

then in bp, implement the event

#

i do all my widget work like this ๐Ÿ‘

dawn summit
#

yep, i just found that like 5 minutes ago =)))

lucid vault
#

Does anyone know how to disable replicate movement during runtime on character?
Doing so causes the player to move rapidly fast for some reason

#

I call a server function that disables ReplicateMovement and I also disable it on the client. Then the player shoots off at 5x his speed

twin juniper
#

So I found my problem it's the error check that corrects my position

#

how would i go about correcting this

#

how do i allow the position is be altered

#

I can uncheck error correction but then my client goes out of sync

twin juniper
#

Figured it out just need to make a rpc for the client to set location

#

(server data)

twin juniper
#

does anyone know how to turn off/increase the network timeout period if debugging a client?

cursive mortar
#

Hello all!
Could someone tell me when it's best to use RPC and when to use OnRep?
Which would be the best practices?
Thanks! ๐Ÿ˜„

red sand
#

Can anyone please explain me how to make Party System? I am using amazon aws for matchmaking

twin juniper
#

@cursive mortar RPCs are usually for one-off messages or when order matters, while OnRep() is when values change a lot and the only state that matters is the latest one

glad wharf
#

also OnRep / Variable rep make it so a late joiner will have the correct state. If you "sync" a part of the world state through a RPC, it will be a problem for a late joiner or disconnection/reconnection

cursive mortar
#

@twin juniper Thanks a lot! ๐Ÿ˜„ For movement replication, should I use OnRep()?
Currently I use AddMovementInput(LocationDeltaToMove); When I use Dedicated Server, with Separate Processes, everything is fine in the Editor. When I launch separate server externally, and connect with a client, the movement is jitterish and I also get "CreateSavedMove: Hit limit of 96 saved moves (timing out or very bad ping?)"

#

@glad wharf Thank you a lot! ๐Ÿ˜„

#

For now, all the effects work correctly, attacking and rotation are replicated instantly and smooth, but I can not get the movement component to work.
PS: I am using the standard MCM

versed bear
#

is it a bad idea to have a replicated property that gets updated every frame in Tick? If the property is constantly changing, does this mean that the engine will send a network update every frame?

shrewd tinsel
#

do i need to forward ports for my session to be found?

glad wharf
#

@shrewd tinsel if it's hosted on a computer behind a router yes

chrome bay
#

@versed bear It will try to send an update every network frame for that object yes

#

At the same time though, updating replicated properties every tick makes little sense because tick rate is variable, and clients won't receive them all anyway

solar stirrup
#

Heya! I noticed server world time seconds isn't predicted, so it only updates on replication, which again isn't very precise

#

to predict it, would it be enough to add the latency on its replication and delta time on tick?

chrome bay
#

It's pretty inaccurate anyway tbh, but in theory yeah, you can add your ping * 0.5 to it.

#

But that assumes ping is the same in both directions though too.

#

Which it probs isn't, when you account for processing time etc.

distant talon
#

I didnt think this was the case but it unfortunately turned out to be true that every time you set a variable in BP it is queued for replication even if the variable hasnt changed... Easy test is to set a replicated variable on tick with repnotify and a print. it just goes constantly... kind of annoying waste of bandwidth

glad wharf
#

strange, I thought the RepNotify behavior was to trigger only on change... (and to be honest, basic replication too)

twin juniper
#

@cursive mortar for movement it seems like you are already using the character movement component, it uses RPCs

#

@cursive mortar might be a case of you oversaturating the network with messages, but I'm not sure

#

or firewall issue

chrome bay
#

@distant talon That's not the case

#

The Server will only replicated a variable if it thinks the client has a different value.

#

Blueprint is stupid, because RepNotify in BP isn't really a RepNotify

#

It's more of a "this value was modified" callback.

#

But if you are changing a variable everytick, and the actors' NetUpdateFrequency is 100, then it will try to replicate those changes at 100Hz

#

But changing replicated vars on tick is silly anyway

#

There should be very few cases where you need to do that

distant talon
#

So it only applies to repnotify in bp?

#

That makes more sense. thanks... still weird though

#

I dont have many repnotifies so i can put extra checks on them (in bp)

cursive mortar
#

@twin juniper The thing is that everything else is working correctly except the Movement. I also could connect with external IP, display all effects in real-time, or the rotation of the character. "CreateSavedMove: Hit limit of 96 saved moves (timing out or very bad ping?)" appears only when moving the character through MCM. It never appears when doing anything else. Thanks a lot once again!!! ๐Ÿ˜„

shrewd tinsel
#

if i use steam online subsystem, i dont have to forward ports to make a server right?

twin juniper
#

@cursive mortar not sure why, AddMovementInput() should work just fine, we use it without any problems

cursive mortar
#

@cursive mortar not sure why, AddMovementInput() should work just fine, we use it without any problems
@twin juniper I also can not explain this. I've seen others using it and it is working. It is the only thing I use on the MCM. Maybe a custom MCM would be the anser, to store the steps and clear them, I dunno...

twin juniper
#

MCM = CharacterMovementComponent?

cursive mortar
#

yeah

#

CMC

#

sorry.

twin juniper
#

๐Ÿ™‚

cursive mortar
#

It is really disturbing that it works so well with 3-4 players in the editor, and not when hosting with the *.bat file

#

Thank you again for the help! ๐Ÿ˜„ I will investigate this issue more. ๐Ÿ˜„ At least I have a lead

chrome bay
#

RepNotifies in CPP are triggered, but in CPP they actually behave the way they are supposed to

#

I.e, they are triggered on a client, when it actually receives a server update

#

To this day I have no idea why Epic made the behaviour different on both ends

somber glade
#

Gamemode Pre-login-> If there is an error message, it rejects the login attempt. I assume that that error message gets kicked back to the client somewhere. Does anyone know which function on the client receives that error message?

chrome bay
#

HandleNetworkError I think, it's a bit lower-level

somber glade
#

UGameInstance::HandleNetworkErrorthis one? That's fine. I can work in c++

#

handle netowrk error just seems to have a "Enetworkfailure"

#

pre-login uses a string virtual void PreLogin ( const FString & Options, const FString & Address, const FUniqueNetIdRepl & UniqueId, FString & ErrorMessage )

#

Accept or reject a player attempting to join the server. Fails login if you set the ErrorMessage to a non-empty string. basically I'm working on a ban system for peer to peer multiplayer. The ban works, but the client just gets dumped back to main menu. I'd like to check if it's being dumped for being banned and then display something on the client.

#

if that errormessage isn't sent back to the client somehow then I'll have to work out another way to notify them

somber glade
#

Also is the "FUniqueNetIdRepl" for each player unique every time they restart the game? Using "getnetconnection" you can get the playerID of a connected player, but it looks like that changes, since saving it to a file and loading it on another play through no longer creates a match. But maybe that's only in PIE.

thin stratus
#

If you use a subsystem then it would be unique per user account

unkempt tiger
#

I've seen some people here talking about using FSockets, can anyone explain what kind of usecases do sockets have that you'd need to work with them, where RPCs and replicated properties weren't enough?

thin stratus
#

E.g. for Steam that would be the SteamID of the user

#

There are a lot of usecases for it, generally when you don't want to be in the same level as the other to send data.

#

Maybe you want to send data from an IPad Project to a Windows Project or things like that.

unkempt tiger
#

Oh, different world instances communicating with each other?

thin stratus
#

(2 different projects)

unkempt tiger
#

Ohh

thin stratus
#

Yeah whatever you need. I mean that's just one example

unkempt tiger
#

Gotcha, thanks

unkempt tiger
#

I am conflicted between sending lots of small RPCs to sending one big RPC every X time

#

as far as net bandwidth is concerned, it makes sense that sending one big RPC every X time would be easier right?

#

Since I'd imagine every RPC contains some header information which adds to the packet size

#

(the differences I'm talking about is: say sending 7 floats each in lots (around 75) packets, to sending say, 7*75 = 525 floats every packet)

faint pawn
#

i am reading about multiplayer and often times i see people have booleans for either use lan or use internet
what does lan mean in this case?
i know lan means local area network, so does that mean a lan server will only find clients using the same connection?

serene meadow
#

yes @faint pawn

faint pawn
#

so if i am trying to debug a multiplayer project on only 1 machine, i should only be searching for lan sessions?

#

@serene meadow

serene meadow
#

but sessions that are not in lan can detect connections from the same network

twin juniper
#

what's the simplest way to create small scale multiplayer?

faint pawn
#

so that means i dont need to implement lan sessions at all

serene meadow
#

yes, lan sessions are for example, if you want to limit the connections to ONLY the same connection, but you can use non-lan connections for that anyways

#

so it really depends if you want that sort of thing

rose egret
#

how do I sync the bullet count in a replicated shotgun reload. I am confused

odd patrol
#

Hello, I have some issues with using JoinSession functionality. Flow goes like this:

1). Client player finds and joins a session, triggers fade out and loading screen widgets;
2). Server player gets the message about new player joining and sees new pawn being spawned;
3). At the same time Client's loading screen is interrupted and he starts seeing the world from newly spawned pawn's camera, although he doesn't have control yet
4). ~5 seconds later Client gets following messages: BeginPlay from the map, BeginPlay from his own pawn, fade in widget kicks in and he gains control.

Problem is number 3, is there any way to avoid that and have loading screen widget playing until client's pawn is fully spawned and controlable by the client? Thanks in advance for any help, I'm really in a pickle with this one.

versed bear
#

At the same time though, updating replicated properties every tick makes little sense because tick rate is variable, and clients won't receive them all anyway
@chrome bay hey thanks for the reply. How would you suggest doing it other than in tick? For example I'm trying to make an attack where the longer you hold down a button the bigger the damage multiplier (right now I have the damage multiplier increase inside tick every frame).

chrome bay
#

Well, damage should all be handled Server-Side - so only the Server needs to know what that value really is.

#

Clients can just estimate it

versed bear
#

I see, that sounds fair enough, thanks. I guess now I need to figure out a good way to estimate it on the other clients.

chrome bay
#

Do the other clients need to know about that multiplier?

#

What I would do is just replicate a single bool which determines if they are or aren't "charging". When it updates to true, store the current world time and count up from there.

#

May need to use a small counter to get it working more reliably, similar to a flash/burst counter for weps

#

You probably want to tell the server when the player starts charging, but have the client actually send the damage multiplier through. If it's within a given tolerance, accept clients, if not, take the servers' value.

#

Since it'll feel pretty laggy for the player too otherwise.

#

MP iz hard

versed bear
#

Great suggestions! I'll try implementing it and see if it works for me

young jacinth
#

Guys, I have a spare computer and I want to use it as a server to run pixel streaming instance of my game and stream online. but the problem is my internet (and mostly any internet in Netherlands) won't allow port forwarding so the ports are closed. any one knows some viable solutions to work around it that is reliable ?

#

otherwise I have to pay shit loads to AWS

woeful ferry
#

This event, which is ran from server to client. Still goes on server, even if it's client proxy character that should run it

#

Any clue?

dawn summit
#

@young jacinth "won't allow port forwarding" wait, are you telling that in Netherlands you can't get Public IP?

#

@woeful ferry dedicated server?

woeful ferry
#

@dawn summit Listen server

dawn summit
#

listen server is a client too

woeful ferry
#

I worked it out by doing another run on owning client before running this event

#

yes

#

I know

dawn summit
#

@woeful ferry you know how replication works?
you emit an event, if it's replicated it will be called on other machines as well
but...you call it on this machine

woeful ferry
#

I do know, but I don't think you understand my problem

dawn summit
#

maybe, it's hard to tell what's going on from a single node

gusty slate
#

Olsson the owning client of the character is where that will be executed

dawn summit
#

this node runs on any machine, and only replicated if it runs on server

gusty slate
#

not the proxy on other clients

woeful ferry
#

This event is ran by the server, and I wanted the last event to fire on the owning client character. Even when the remote character got called to, it was still running on server. It was fixed by putting another owning client event before

#

Didn't work to directly fire that event on the character, because it still kept running on server

#

and not the remote character

gusty slate
#

What changed is the target of the call I think

#

the OC call

#

but I'm not sure

woeful ferry
#

yes, that's what I was wondering, if it's something like you can't call OC events like I used to

gusty slate
#

the OC call is getting executed on current class

#

but the other one, you were trying to call it from the PlayerCharacter

woeful ferry
#

Yes, so that is what I'm wondering. It's a OC call on the player character, shouldn't it fire on the remote character then?

#

Why do I need another OC?

gusty slate
#

I wanted to use GameState as the class which holds static data available to all clients. But, proxy clients can't get a reference to it in the first couple seconds after BeginPlay

#

How can I deal with this? I don't want static data functions and variables to be present in each Controller or Pawn, I want it to be centralized somewhere

young jacinth
#

@dawn summit At least as far as I've seen in most of the ISPs. It's mostly carrier-grade-nat

#

which means my public IP is different than the one it says in router's status

dawn summit
#

@young jacinth i see, that is "gray" ip how it's called here...yep, the only way to host the game for you is to use hole punching service, like steam, or eos (afaik it does it), or host server somewhere else

upbeat basin
#

Is it possible that my PlayerController or PlayerState objects are not successfully removed from GameServer? I'm trying to pass my playerController to the server with an RPC and whenever I try to use the variable I get "Attempted to access BP.... via property PlayerStateServer, but BP.... is pending kill" warning when I try to connect my gameserver for the second time. Is it possible to get old player controller or state with GetPlayerController node?

polar lotus
#

How can I get the NetGUID of a certain actor

#

I don't care If I need to get my hands dirty with a little C++

#

@chrome bay do you know how I can do this?

chrome bay
#

UNetDriver::GetGUIDForActor

#

GUID's are unique for every client - just bear that in mind

polar lotus
#

I know

chrome bay
#

They may also change periodically as the actor enters/leaves relevancy etc etc.

polar lotus
#

I am using it in a very short-term way

#

it's just a quick differentiator

vestal thistle
#

Hello Unreal Engine people! Me and my team are using Playfab and Azure to host our dedicated servers and we are running into issues in the steam implementation. Is anyone familiar with this problem? Please DM me! I need some professional consultation!

#

Our questions are. Why would the SDK fail to initialize on a dedicated server? or Why would the UE4 online steam subsystem fail to initialize its steam API?

sage bone
#

With a dedicated server, when the game ends, whats the right way to close the connection to the clients without triggering an ENetworkFailure::ConnectionLost?

fossil spoke
#

@sage bone APlayerController::ClientReturnToMainMenuWithTextReason check that function out.

somber glade
#

@thin stratus I just did some debug printing and it looks like every time you start PIE with more than 1 player, it generates random digits after the name of the machine. So if your machine is called "office" the ID becomes office-12873129837219837129837 but the next time you restart that string of numbers isn't the same. So I can't really test that ban method in PIE. On the shipping build it'll be based on the steam ID of the player.

somber glade
#

Does this errormessage: virtual void PreLogin ( const FString & Options, const FString & Address, const FUniqueNetIdRepl & UniqueId, FString & ErrorMessage ) get passed to virtual void HandleNetworkFailure ( UWorld * World, UNetDriver * NetDriver, ENetworkFailure::Type FailureType, const FString & ErrorString ) if you put an error message in there and reject the connection?

fossil spoke
#

@somber glade Cant remember if its that one specifically.

#

But it does get passed to an Event in the GameInstance.

#

Which is potentially that same delegate.

#

You would have to double check.

#

It maybe HandleTravelFailure

#

As i said, cant remember...

somber glade
#

I know the blueprint one "event network error" doesn't. It just returns an enum and no string of error message. Thanks, i'll look at those and test them and see if one of them prints the error message

fleet raven
#

yes the error message gets sent to the client and returned there

lost juniper
#

What's the option to set split screen?

somber glade
#

Follow up question if anyone happens to know, how about the messages from this: virtual bool KickPlayer ( APlayerController * KickedPlayer, const FText & KickReason ) Any idea where that gets passed to? I have a message set as "You have been kicked" And that does not get passed through Handlenetworkfailure. I've got that bound and printing and I'm getting server join failure messages that I've sent for people who have been banned or if the server is full, but not kick and ban messages when they're actually kicked or banned Just Client 2: Connection Error: Your connection to the host has been lost. Type: Connection Lost

shrewd tinsel
#

why i cant get playerstate on client from bot except the from the first one that was spawned? if i spawn all bots in one for loop, all playerstates are reachable on clients

chrome bay
#

Well, PlayerStates take time to replicate. You won't get them all immediately.

#

How are you trying to get them?

shrewd tinsel
#

i fire projectile, check pawns playerstate and send it to server from attackers playerstate on gamemode

#

theres plenty of time to get all stuff to replicate

chrome bay
#

You can't get the GameMode on a client?

#

The Game Mode is only available to the Server.

shrewd tinsel
#

i know

#

playerstate sends damage info on server through gamemode

chrome bay
#

show the code

shrewd tinsel
#

damage works, only for the bot that was first spawned

#

or if bots were spawned at the same time

chrome bay
#

It's odd design to involve the player state with damage

shrewd tinsel
chrome bay
#

Is bWantsPlayerState true in the AI controller class?

shrewd tinsel
#

yes

chrome bay
#

And they are spawned by the Server, not spawned by the Client?

shrewd tinsel
#

yes

#

by the gamemode

chrome bay
#

And where are you calling that function from?

shrewd tinsel
#

projectile

chrome bay
#

The projectile is also spawned by the Server but owned by the client who fired it?

shrewd tinsel
#

its spawned by the client and only exists on client pc

chrome bay
#

Then you can't call a Server RPC

#

Oh hang on

#

That function is in a player state

shrewd tinsel
#

yeah

chrome bay
#

So where are you getting the 'Victim' from?

shrewd tinsel
#

overlapped actor>get playerstate

chrome bay
#

And is it valid on the client before you send it?

shrewd tinsel
#

pawn yes

#

playerstate only one the first spawned bot

chrome bay
#

hmm, IDK then. Something else is going wrong somewhere.

shrewd tinsel
#

thanks for confirming

#

im at least less lost

#

how would you spawn a bot in multiplayer game?

#

just spawn ai from class right?

chrome bay
#

Just SpawnActor would be enough.

shrewd tinsel
#

and then make it an AI?

chrome bay
#

In theory all you need to do is spawn an AI controller, that has bWantsPlayerState checked

shrewd tinsel
#

maybe its a bug

chrome bay
#

I doubt it, works fine here

#

Are you even sure that the overlapped actor is what you think it is?

#

First get the AI controllers to print out their player state to the screen

#

Then you can at least know for sure that they don't have one.

shrewd tinsel
#

i checked again, now 2 of 4 bots didnt have playerstates

#

its a replication issue i suppose

#

server spawns them with playerstates

chrome bay
#

Do they have player states on the Server?

#

Right so they should be replicating eventually

shrewd tinsel
#

maybe its like not 'reliable' somewhere

chrome bay
#

actor replication is definitely reliable

#

But I still think they just aren't coming through until later.

twin juniper
#

im so confused as to how to properly use the steam SDK

#

every guide i find has something conflicting with the other

shrewd tinsel
#

@chrome bay you're right, it starts replicating after some time

#

maybe im choking network somehow?

chrome bay
#

Could be yeah, actors just take a bit of time to rep

#

You'll only know for sure by using the network profiler

#

or network insights if you're on 4.25

shrewd tinsel
#

i am. noice

chrome bay
#

@twin juniper What you trying to do?

shrewd tinsel
#

thank you

twin juniper
#

i just want to start using the steam SDK from the bottom floor with my game, even trying to figure out how to enable it and such is confusing

shrewd tinsel
#

youre not talking about advanced sessions for steam right?

chrome bay
#

Yeah the Steam SDK is pretty huge so gotta be specific

#

If all you want is just networked games through steam, everything you need is wrapped up in the online subsystem bundled in UE4

#

And the "sessions" stuff.

twin juniper
#

is the online subsystem stuff accessible in blueprints?

chrome bay
#

Yep. There's an example project on the Epic Launcher called 'Multiplayer Shootout'

shrewd tinsel
#

u can get name avatar friends n stuff via bp

chrome bay
#

Should just be a case of setting up some config vars to have it working with steam.

twin juniper
#

yeah i've tried setting up some config vars but i don't get any steam presence

shrewd tinsel
#

did multiplayer shootout use advanced sessions plugin?

twin juniper
#

tis weird

chrome bay
#

Nah, Multiplayer Shootout is an Epic template so they don't use third-party stuff.

shrewd tinsel
#

oh so its not steam

twin juniper
#

where do i even find the multiplayer shootout template?

shrewd tinsel
chrome bay
#

Launcher -> Unreal Engine -> Learn

shrewd tinsel
#

@twin juniper what you trying to do?

chrome bay
#

a more comprehensive multiplayer sample is ShooterGame, but it's C++ only.

twin juniper
#

at the current moment i just want to make sure i can line up with steam

#

weird, can't find multilpayer shootout anywhere

chrome bay
#

It's probably not under games

#

the icon has an orange character in it

twin juniper
#

am i just blind? i see nothing with the name or the icon

chrome bay
#

Huh wtf. They actually removed it

twin juniper
#

NIICE

#

time to be more lost and more confused

shrewd tinsel
#

i think u need advanced steam sessions plugin

#

its really easy

chrome bay
#

I have no idea why but loads of shit is missing from the launcher

#

They've removed loads of stuff wtf.

twin juniper
#

@shrewd tinsel still, i'm stuck on the part of even setting my game up for steam

shrewd tinsel
#

like uploading it to steam?

twin juniper
#

nah just getting my project to have a steam presence

shrewd tinsel
#

access players nickname and stuff?

twin juniper
#

so i drag both of these inside my plugins folder or what @shrewd tinsel ?

#

nvm figured it out!

shrewd tinsel
#

yeah

#

and then u have a bunch of steam nodes

#

also u have to put config into defaultengine.ini

twin juniper
#

like this?

+NetDriverDefinitions=(DefName="GameNetDriver",DriverClassName="OnlineSubsystemSteam.SteamNetDriver",DriverClassNameFallback="OnlineSubsystemUtils.IpNetDriver")

[OnlineSubsystem]
DefaultPlatformService=Steam

[OnlineSubsystemSteam]
bEnabled=true
SteamDevAppId=480

[/Script/OnlineSubsystemSteam.SteamNetDriver]
NetConnectionClassName="OnlineSubsystemSteam.SteamNetConnection"```
#

like, how can i tell if it's working?

chrome bay
#

Run the game in standalone while Steam is running.

#

If you get the overlay, it's hooked up

twin juniper
#

yeah i tried that and nothing came from it

#

hm

#

weird weird weird

#

๐Ÿค”

#

any ideas?

chrome bay
#

No clue, should be all you need

#

Just make sure you're running standalone

#

PIE doesn't work

twin juniper
#

yeah i made sure standalone

#

wack

#

::(

glad wharf
#

did you enabled the related OnlineSubsystems plugins?

twin juniper
#

yeah

#

first thing i did infact

flint rose
#

I'm having an issue with actor replication. I have some "TownActors" placed in my map that within the game state, adds "Units" to them every second. Every town works great except for one. I am setting their owners after the player states PawnPrivate value is set. I can see that the Owner is set for all of the TownActors.

slate veldt
#

Have you popped a Steam App ID .txt in the binaries folder too?

#

@twin juniper

twin juniper
#

oh in the binaries folder?

slate veldt
#

Yup so Binaries/Win64 is where I pop mine

twin juniper
#

?

slate veldt
#

Just a txt file named "steam_appid.txt" with the number 480 in it

#

Yeah that looks right

#

Oh wait

twin juniper
#

hm?

slate veldt
#

not the engine folder, the game folder

twin juniper
#

ooh

slate veldt
#

Did you add all the stuff above to the defaultengine.ini of your project or the engine? Should all be at project level

twin juniper
#

project

slate veldt
#

Yeah that's the right folder

twin juniper
#

alright will try in a bit, thank ya

slate veldt
#

np - hopefully it fixes it

flint rose
#

I wonder if my issue could be because I'm not calling SetOwner from an RPC?

#

But is definitely getting called from server.

flint rose
#

Just tried it in an RPC, no luck. ๐Ÿ˜ฆ

#

Figured it out! bAlwaysRelevant needed to be true

gusty slate
#

Hello everyone,
I wanted to use GameState as the class which holds static data available to all clients. But, proxy clients can't get a reference to it in the first couple seconds after BeginPlay, as I want to have certain things initialized in BeingPlay/Possessed whatever, but proxies still don't get GameState fast enough
How can I deal with this? I don't want static data functions and variables to be present in each Controller or Pawn, I want it to be centralized somewhere, so that even Widgets can access it and other classes

twin juniper
#

ugh still aint working

gusty slate
#

You're trying to add steam Nathan?

twin juniper
#

yeah

gusty slate
#

In packaged or standalone?

twin juniper
#

i mean right now im just trying to get it to work like in the project

#

playing standalone isnt working

#

eeeee

gusty slate
#

You need the steam subsystem enabled, then add those settings above in the Config/DefaultEngine.ini, then execute in Standalone and have Steam open

twin juniper
#

i did all of that

gusty slate
#

You don't get steam executed inside? and no ingame overlay with Shift+Tab?

twin juniper
#

correctt

gusty slate
#

And steam is open?

twin juniper
#

yep

serene meadow
#

what version are you using? if in 4.25 standalone wont work, you have to go to your .uproject file, right click it and press launch game

twin juniper
#

ah

#

it is 4.25

gusty slate
#

1 second

serene meadow
#

then do what i said there and see if it works

twin juniper
#

ruh roh

#

i broke somethin

#

oh what the

#

i thought i fixed the redirects

#

i renamed that level

#

wack

gusty slate
#

Interesting, why doesn't steam work in standalone anymore in 4.25?

twin juniper
#

eureka!

#

thank you very much @serene meadow

serene meadow
#

thank you very much @serene meadow
@twin juniper np

#

Interesting, why doesn't steam work in standalone anymore in 4.25?
@gusty slate i don't know, i had to wait days until it actually became a thing in the forums and someone say how to get it working

gusty slate
#

I used to test in Standalone all the time, current project though i always test in packaged so I didn't notice

twin juniper
#

possible bug?

gusty slate
#

Maybe it has to do with the new Modules system of UE after 4.24

serene meadow
#

possible bug?
@twin juniper nope, they would've fixed it in the hotfix

gusty slate
#

in C++

twin juniper
#

hm weird

#

welp, glad it's working now

gusty slate
#

I feel like doing initialization in BeingPlay or Possess which requires other actors or GameState is not going to work. The game takes time to create all these actors and the character can't access them

chrome bay
#

Yeah it won't be reliable

#

You have no idea what order actors will replicate in

#

I tend to have a static delegate that I broadcast from the GameState BeginPlay() function. Any actor that needs it can check if the game state is currently available, or if not it can bind to that delegate and respond when it is

#

E.g.:

#
{
    AGameState* GameState = GetWorld()->GetGameState();
    if (GameState)
    {
        Init();
    }
    else
    {
        AMyGameState::OnAvailable.AddDynamic(this, &Init);
    }
}```
#

That explains it...

#

how annoying

gusty slate
#

I think that's the most reliable way of doing it Jambax. Even working with DataTables for static data, I like to have functions and variables to process the data and that has to go somewhere

twin juniper
#

so it is a bug?

#

hm

chrome bay
#

I don't think it's a bug, but a side-effect of some other change they made

#

What I mean is - I would definitely consider it a bug, but it looks like it was intentional so I don't know if Epic classes it as one

gusty slate
#

@chrome bay Where do you usually store static data? For example Character Type -> Name/Icon/etc

chrome bay
#

hmm, depends I guess.

#

data table or a data asset maybe?

gusty slate
#

I see, I usually like using enums and TMaps, do you not find DataTables constricting in data fetching?

chrome bay
#

Not at all, depends what you're doing. Enums I personalyl find more restricting because if you want to extend them you have to hop into code

#

Tables being keyed by FName makes life easy

glad wharf
#

@chrome bay about the GameState, it will be null on client before replication? I thought it would just be there, but with default values.

chrome bay
#

@glad wharf nope, will be null

glad wharf
#

oh that's very good to know, thanks! ๐Ÿ™‚

gusty slate
#

Yeah, you can see it in the function description Lnaej

chrome bay
#

same with player states

#

etc.

gusty slate
#

Thanks Jambax, I'll have another look at DataTables

glad wharf
#

did not know that, that's key information. Seems logical indeed if they are spawned by the server. Thanks again ๐Ÿ™‚

gusty slate
#

Enums do offer dropdowns though ๐Ÿ˜› ๐Ÿค”

chrome bay
#

well you get a drop-down list if you use the FDataTableRowHandle

unkempt tiger
#

is there any way to access the actor currently in charge of replication within my struct's NetSerialize override without keeping the actor reference inside the struct?

chrome bay
#

negative

unkempt tiger
#

oof, would have been splendid

#

thanks

chrome bay
#

Yeah, would be nice if you could, reflection might let you reach the properties owner potentially, but it probably won't be that simple

unkempt tiger
#

my interest was sending arbitrary executable structs to abstract network communication

#

especially useful for client->server communication

#

the idea was that each of those structs would have a Run() command, and would be enveloped within a handle struct that - as you directed me to FGameplayEffectContext - would treat the data struct polymorphically during serialization

chrome bay
#

This is a thing I have done

unkempt tiger
chrome bay
#

The only way I was able to do it, was to send the UScriptStruct* as a member

unkempt tiger
#

how many byes is that?

chrome bay
#

Depends as it will serialize to a NetGUID

unkempt tiger
#

so 4?

chrome bay
#

4 or 8... I think the latter

unkempt tiger
#

argh, that is not negligible sad

chrome bay
#

Have a look also at FGameplayAbilityTargetDataHandle::NetSerialize()

unkempt tiger
#

what do they do there?

chrome bay
#

Very similar to what you want to do, but they have a special global class that adds the UScriptStruct* type to a global manager, which then maps it to a byte

#

So there is an upper limit on how many data types you can send, but after initial serialization they are smaller.

unkempt tiger
#

neat, I was thinking of doing that, but somehow I found it would be just, more straight forward to skip polymorphism entirely

#

which as a very unfortunate consequence means code duplication

chrome bay
#

yeah, polymorphism is UE networking's worst nightmare

unkempt tiger
#

do you still think that a lot of small RPC packets is generally better than one large RPC packet, as far as bandwidth is considered?

chrome bay
#

Hmm not sure. I mean UE is geared more towards sending small packets often

#

rather than huge chunks of data

unkempt tiger
#

what makes it geared towards that?

chrome bay
#

well there are hard limitations for example, TArray has a maximum network serialization size, so there's always an upper cap

unkempt tiger
#

hmmm

chrome bay
#

reliable RPC's also block all execution of subsequent reliables' until they are received

#

but on the flipside, unreliable is unreliable.

#

just have to pick your poison

unkempt tiger
#

it really is poison

#

my soul is slowly dying :D

chrome bay
#

Trouble is you can make something super-generic but it's nearly always suffers in performance as a result. Sometimes it's just easier to specialise

unkempt tiger
#

yeah, generifying vs specializing was my last 14 days' last dilemma

chrome bay
#

Not that i listen to my own advice, this is the latest result of the most over-engineered chat system in history:

unkempt tiger
#

noice

chrome bay
#

But yeah probably performant enough for chat, but not something more critical

unkempt tiger
#

i think im defaulting to specializing, and copy pasting code

#

it also feels easier to write, however less to manage

#

but hey, if its REALLY REALLY good code, I may not need to manage it all that much! :D:

chrome bay
#

I did that for my vehicle movement. Just create some base types with the core functionality, then let the specific types override what they need

#

tbh if you're sticking purely to CPP, it's a lot easier

#

It's when you want to try and expose stuff to BP in a friendly way where the real chaos sinks in

unkempt tiger
#

dude

#

i dont even need BP

#

and yet the chaos already started

#

so what am I doing wrong?

chrome bay
#

haha

#

it's just not easy