#multiplayer

1 messages · Page 530 of 1

twin minnow
#

@gritty pelican correct the playerstate will be destroyed and removed from playersarray

gritty pelican
#

okay

thin stratus
#

@gritty pelican They should move inactive first. There is an inactive PlayerArray. Not sure how it works though

thin stratus
#

@twin minnow Not sure. You can probably adjust the time it tries before failing when the server isn't reachable.
Any other timeout is probably up to you to put infront of the OpenLevel

peak star
#

Can I make my game able to use more than one online subsystem?

meager spade
#

sure but you would need seperate configs/setup for each OSS

peak star
#

So a better question is can I make my game able to change between those during runtime?

meager spade
#

you can have a fallback one, but what use case would you switch OSS at runtime?

peak star
#

Well i have a LAN game that uses Online Subsystem = NULL , and it works great on LAN. If I want to ALSO let the players play over Steam, then do I need to have both the Steam and the NULL OSS?

meager spade
#

you have fallback

#

default will be steam, fallback will be null

#

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

peak star
#

Cool thanks. Which file is that?

lunar root
#

Is there a way to replicate property X only to Player A, Player B, and Player C but not Player D, and Player E?, Basically just an array of Players

gray scroll
#

is there any way to get the hit info for any damage event? I need to get where exactly my character was shot

meager spade
#

@lunar root not individual properties, no

lunar root
#

I solved by overriding IsNetRelevantFor

#

I just wanted to not share any information with the opponent team until the game started

meager spade
#

i made a TeamStateActor

#

bit like PlayerState

#

but only replicated to teams

#

IsNetRelevantFor is not for individual properties.

lunar root
#

Yeah I think/hope its fine for my case

#

But how did u do it exactly?

#

Can i replicate an actor to specific players?

#

Becuase by not replicating the player state i cannot get the player name i just realized..

meager spade
#

if you use Repgraph, then sure

lunar root
#

huh

meager spade
#

or just do what you did

#

but with a TeamState actor

lunar root
#

True that could work

#

might just do it that way

#

but since u pointed it out, I haven't heared of ReplicationGraph until now

#

Imma look it up maybe it helps in the future

verbal gust
#

Hi guys, I am going to ask probably something that has been asked many times. Is there any standalone and opensource OnlineSubsystem implementation that has ICE protocol built in for direct P2P sessions via Internet that you might have encountered other than Steam, Oculus etc versions?

chilly mason
#

how do I launch 2 PIE sessions as you would in a multiplayer configuration but WITHOUT any sort of actual multiplayer mode being triggered?

#

just want 2 PIE session that don't care about mp at all

bitter oriole
#

You don't

#

Right-click the uproject and hit launch, twice

chilly mason
#

nah I got it

#

this works

bitter oriole
#

4.25 makes it a nice option

solar ivy
#

can i set actor to replicate to everyone except its owner?

bitter oriole
#

Sure

#

Set the replicated vars to a "skip owner" condition

solar ivy
#

can i set it to not be created at all on owner client?

bitter oriole
#

No, that makes no sense

#

How could you own something that doesn't exist on your machine ?

solar ivy
#

it can exist only on server. unless i miss something

bitter oriole
#

Alright so

#

What's the point of owning it on the client ?

#

The only perk of that is RPC, and you wouldn't be able to do that if the client version didn't exist

solar ivy
#

i want to create a weapon for my character on server and let everyone see it. but i dont need it to exist on my client. instead i will spawn my local instance of weapon and then communicate related events (shooting, reloading) with RPCs.

bitter oriole
#

Alright, so

#

The RPC version would exist on the server and the owning client

#

The other version would exist on the server and every non-owning client

#

So just make these one client-owned actor

#

You're getting one less actor on the server, and incredibly simpler code

solar ivy
#

RPC version doesn't need to exist on the server, its only local. because i dont call rpcs on weapon actor but on character. when i tell server to shoot it will shoot with its version of weapon, technically its gonna be the same. but how to prevent server weapon to be replicated to me? because im gonna end up having two copies of the weapon on client. there's no 'skip owner' option for actors.

bitter oriole
#

You can only RPC client-owned actors that exist both on client and server.

#

Why don't you just use one weapon class that handles all of the weapon stuff ?

#

You're making this very complex for no reason

solar ivy
#

i was thinking to make this stuff with rpcs only without relying on replicated creation/destruction. lets say at some point server needs to assign a newly created weapon to my character and then give command to whether equip it or keep holstered. in this case i would spawn a weapon on server (automatically replicated to client) and then send RPC and say equip it. but if those events come not in right order it will not work. so i was thinking ok ill just send reliable RPC for spawning too and let client create its own instance of weapon. maybe instead i can just set all needed data on the weapon on creation like use replicated ShouldEquip property on weapon so its there on creation and then execute all related stuff locally on weapon's begin play. will it work this way? because in theory i'll never need to force give a weapon to a client unless he asked for it. and if he asked i can just lock my player's actions until i received a weapon copy to not have any desync.

meager spade
#

that seems terrible :/

#

Replicated weapon, Client shoots (for responsiveness) server just verifies the shot/applies damage.

bitter oriole
#

You need to deal with the fact that creating stuff on the server takes time, and work around that

#

There is however no need to create a new weapon actor every time you equip it

#

Create all the weapons when the player character spawns, keep them invisible

solar ivy
#

shooting is not a problem (yet). lets say i buy weapon in a shop. and then there's some logic running which decides in what inventory slot to put it. i'd just do the logic on server and then replicate the weapon with a property Slot set on construction on server, and then do all following logic on weapon's begin play locally. will it work this way?

meager spade
#

your slot should be decided by the server, same as the inventory

#

client should have 0 control over what goes where, what weapons they have, etc

solar ivy
#

i want to let my client do certain actions without waiting for server response, like shoot or switch a weapon. those actions are still checked on the server after.

bitter oriole
#

Okay

#

Every shooter on Earth does that

meager spade
#

here

bitter oriole
#

You still don't need separate weapons

meager spade
#

200ms packet lag

#

can see it better here

lunar root
#

just very quick question how can u simulate high ping

oak hill
#

use Net PktLag from console

lunar root
#

good to know ty

oak hill
#

@solar ivy you can override IsNetRelevantFor to exclude the owner from replication. Don't know if it's the best way but it worked for me

floral umbra
#

So I had a question if I am making teams do I need the max players to be set to only 4 and a different value for the enemy team or do I make the max players 6?

meager spade
#

max is max in game

#

so 4v4 would be 8

floral umbra
#

ok thank you I appricate it 🙂 @meager spade

floral umbra
#

Ran into another issue trying to set up teams but am having a hard time figuring out how to assign a player team like red to only spawn on red spawn points and blue to only spwn on blue ones

ocean geyser
#

@floral umbra assign a variable to your player controller and go based on that. create custom spawn actor that has a public function to return what team that spawn actor is allowed for and store them in an array on the game mode and use a function on the game mode to loop through those actors and spawn/move your player to whichever point you need them to go to

floral umbra
#

@ocean geyser thank you!!!

zinc peak
#

Does anyone know how to set up network multiplayer with the advanced locomotion v4? Dm me cuz I need a lot of help, and I can’t find a tutorial.

violet geode
#

UE4 noob need some help here with replicating animations. Got a weird problem - everything shows fine in PIE, but when running on stand alone client and server just 1 animation refuses to play, and it's hooked up the same exact way all others are via anim bp. Anyone pm me with suggestions(and so I can show exactly what's going on)?

meager spade
#

post here

#

someone will help

violet geode
#

And for some reason this gathering animation is the only animation that will not show. I have tons of others such as flight or dives or random stuff like that and it shows just fine in both modes

#

(not to mention the whole way of moving to the object is a bit uhh....stuttery and complete fail to set control direction? xD)

#

Just feel like I'm missing some settings somewhere

cobalt whale
#

im creating a database with mysql. but i had a simple question, if i create for example and item "sword" where does this item been stored ? should be in the mysql database? or somehow i the dedicated server? more or less i want to make like fortnite skins

bronze arch
twin juniper
#

evening all! I've recently started learning Unreal (blueprints first and foremost). I have some issues understanding the different replication methods on events. I'm doing this on a Character blueprint, but the actor is only hidden server side, not on the clients. Is there anyone here who understands this and wants to explain it to me? Much obliged 🙂

thin cloak
#

Good question. The BP looks a little vague for me whats going on or what you want to achieve

#

What i figured is that you as a client are communicating with the server..and everything what happens to you or other clients should see is handled by the server.

twin juniper
#

I actually solved it Kaji, just trying to wrap my head around why it wouldn't work

thin cloak
#

Above my level of knowledge at the moment.

twin juniper
#

The die event is set to 'multicast' - I figured that would run it on the server and broadcast to all clients to run it as well

thin cloak
#

yep multicast is the golden egg for sending things to all clients :3

twin juniper
#

Iirc, I think I solved it by setting the event to server only and properly replicating the actor that I wanted to update

#

which, makes sense, but still kinda confuses me

thin cloak
#

I experienced some other/similar thing with an input from client to drive an animation. Unlike other replications i had to do something like this to make myself and all other see the action

#

if its correct..i don't know.. but it works

twin juniper
#

oh hm so chaining server only and multicast, interesting

#

I thought that is what happened in my screenshot since 'Event AnyDamage' is server only

thin cloak
#

for some stuff, direct to server and then mc to others worked

#

but not for that vault and climb stuff.. the picture above was actually pure dumb trial and error..and out of nowhere it worked ^^

#

If you don't mind, I need to post a little question as well. Sorry for the upcoming textblock:

#

#############
Hello! I have a little task to solve and wonder where, me as a simple 3D Artist, could get some hints where to start best. I have a little working listen server/client setup and actually would love to reproduce an invite code system similar to Stardew Valley session scenarios which may (or may not.. its a pure guess) look like this: https://i.imgur.com/5Jr6ckL.png

Note: I was not able to get the 4.19 WhatIsMyIP plugin to compile and furthermore looking for solutions to:

  1. Get current public IP as a Host
  2. Create an invite code which probably holds information about the current running session on Host server and the Host's public IP.
  3. Share this Invite code per copy & paste to any other player.
  4. Let clients use this Invite code to join the current session.

I believe it involves some sort of decrypt/encrypt workflow.
Another note: I am working in the media industry for a couple of years (16+) but sticked to art & design. I have a little BP understanding and very basic C++ knowledge but try my best to understand how it all works. I know my question / task might be too ambitious for my level, but I want to try my luck anyways and hope to get some pointers. No luck with YT and Google so far. Thank you!

twin juniper
#

Don't worry @thin cloak 🙂 For your question , (just wild guessing here as I'm new to UE but working as a software engineer in another field) if you are using an online subsystem (steam or epic store?) for multiplayer, you should probably be able to get your host IP from there somehow. Otherwise, WhatIsMyIP is probably a simple HTTP request somewhere

pastel atlas
#

Blueprints are usable for multiplayer right?

thin cloak
#

Oh actually I don't mind if its BP or C++ as long as there would be a way. I already asked on another discord and it seems that it's pretty advanced stuff. So I may want to add some questions, honest questions:

I am little bit in a situation where I need to decide which system may work the best because I know people who either don't use Steam or don't want to expose their Steam profiles to the public. That's ok, but I need a solution to actually respect their decision.
and I just thought "hey.. stardew valley seems to work like a simple listen host/client but with a way to hide the hosts ip and making it easier for both, host and client to see each other.

  1. what is a good solution for me to let people create and run their little worlds and let people connect without the need that host needs to expose his IP to clients or clients need to use steam or any other system which needs registration.

  2. Would be a dedicated server solution the more easy way? So very similar to ARK / Conan Exiles that people can host a server somewhere and then everybody can connect (maybe with direct IP / no-ip and password)

#

Room/World search might be fine, but actually I am not sure if using the Steam services are the right direction because of my dilemma above.

real cedar
#

I have a question as I am not sure why this is happening.

It doesn't matter if I use the basic "Create Session" node or the "Advanced Sessions" version of it, but I get the same result each time.

As you can see in the picture, the "Open Level" node has "listen" in the options tag. When I am just in the editor, this works perfectly fine, but when I try it in the standalone game or a packaged version, it will load the level just fine, but then after 1 second, the screen goes black, and I have to Alt+F4 out of there.

Any ideas on why this may be happening?

summer tide
#

So I'm using set Static mesh to assign a saddle to a horse. When server mounts the saddle the client doesn't see it on the horse or visible.

#

What did I do wrong? I used Run on Server and Multicast.

ocean geyser
#

@summer tide create an onrep boolean on the horse that attaches the saddle to the horse's mesh's socket, create the saddle on the server. another thing you could do is always have the saddle there but hide/unhide it based on the onrep boolean instead of spawning/attaching

summer tide
ocean geyser
#

so the saddle already exists on the horse?

summer tide
#

A blank static mesh component exist

ocean geyser
#

create an onrep boolean on the horse (lets call it HasSaddle), when the onrep boolean is changed to true (meaning the horse now should have a saddle) simply set the static mesh of the saddle to that of your saddle mesh. if its false then do the opposite.

summer tide
#

I have wearing saddle. I guess I can use that

ocean geyser
#

yea use that, just make sure its toggled on the server for other clients to see

summer tide
#

SO If I modify the code

#

I ahve the server calling multicast

#

and event calling the server

#

multicast doing the toggling

ocean geyser
#

dont use a multicast

#

simply change the booleans value on the server and the onrep event will fire

#

(if you have the boolean setup to be an onrep replicated variable)

summer tide
#

RepNotify?

#

Or Replicated

ocean geyser
#

repnotify

summer tide
#

let me try it. never used it before . 😉

ocean geyser
#

for example lets say you have a rep notify boolean that is false by default. when you set the boolean as repnotify it makes an event for you, lets say you print out a string inside of that event. when the server sets that boolean from false to true it will call the event on each connected client where the actor that boolean is on is relevant (such as if your horse is relevant). once the horse becomes relevant for another player that event will automatically be fire on that client as well

molten topaz
#

instead of 4 players, would making a game 8 players be difficult?

ocean geyser
#

what would be the difference?

bitter oriole
#

Depends on the game.

lunar root
#

Hey, when i spawn an actor on the Server and IT has Set bReplicates to true ,the clients will automatically get a local Version of IT? Because Actually im spawning an Actor on the Server and try to Put a Pointer to it Into the PlayerState , works for the Server but clients will have null Pointer, (The Variable Is Replicated and DOREPLIFETIME is also used)

summer tide
#

I did this to get it to work. Now i think every time you interact it will set the mesh regardless if it's alreayd mounted. Maybe I will add a check.

#

@ocean geyser Thanks. so can I use the same process to mount and unmount a horse. Since it's more complex since after mounted the rider and horse both will be moving and how they should be synced.

ocean geyser
#

in the event (the rep notify event) just check and see if WearingSaddle is true or false. if its true then set the saddle's mesh to be the mesh, if its false then remove it. yes you can, thats how i helped someone else do it. when the boolean gets set to true then mount the horse and use that replicated boolean to play the mounting animation and such

summer tide
#

Is it ok to use Get Player Character/Controller @ 0 in network replicated code.

ocean geyser
#

not on the server

#

on the clients its ok to use if you want to get access to your own character/controller, but the server @ 0 will not always be your own where as on the client its always your own

summer tide
#

I thought so. Any alternatives?

ocean geyser
#

what is it that your trying to do

summer tide
#

So I disable input and movement when mounting and dismounting because it was causing me many other issues.

ocean geyser
#

i do interactions from my character class or components on my character class, you can use GetController from your character reference to disable input

summer tide
#

get controller goes to target of disable input but it still requires player controller

ocean geyser
#

cast it to playercontroller, theres a function for that to i think

summer tide
#

nice

#

The way I have my setup. I attach my player to the horse. The player movements controls the horse movements. So I have some variables such as Horse Ref, Rider Ref, Horse Mounted.

#

I use interface to communicate with my horse about its movements, turns, etc.

#

And my horse anims are root motions. I wonder if I have to change them.

meager spade
#

rootmotion outside of montages is not supported for replication

#

@summer tide

#

well rootmotion inside AnimBP is not supported should i say

#

not replication. Only Montages should play RootMotion sources

summer tide
#

Hmm You can't use montages in AnimGraph

#

Good to know

#

So I'd need to use EventGraph to play those montages with RM anims.

#

What about BlendSpaces?

meager spade
#

no root motion should be in any animbp stuff (Blendspaces, etc). Not sure if it matters only for multiplayer.

#
This method is intended for network games which is the reason for its more restricted functionally. Because Root Motion from Everything is designed to be unrestricted, it is recommended that it only be used in games where animation isn't replicated over a network.```
#

not saying it can't be done

#

its just not recommended

summer tide
#

Good to know. How some of the games make the char movements so realistic. Is it only the timing of speed and anim rate?

#

I know that root motion anims are driven by animations so engine can't predict its movement directions.

meager spade
#

by careful blending

#

using curves

#

that kinda stuff

lunar root
#

Hey, when i spawn an actor on the Server and IT has Set bReplicates to true ,the clients will automatically get a local Version of IT? Because Actually im spawning an Actor on the Server and try to Put a Pointer to it Into the PlayerState , works for the Server but clients will have null Pointer, (The Variable Is Replicated and DOREPLIFETIME is also used)
.

summer tide
#

Thanks

meager spade
#

the server creates a local copy, yes, and this copy is marked ROLE_SimulatedProxy

#

if your pointer is nullptr, then its not replicated.

lunar root
#

Idk why it wouldnt be replicated ,its marked with UPROPERTY(BlueprintReadOnly, ReplicatedUsing = OnRep_Team) (OnRep_Team is supposed to give me a debug message which doesnt show up)

#

And also GetLifetimeReplicatedProps is overriden with DOREPLIFETIME(ATFPlayerStateBase, Team);

summer tide
#

@meager spade Does that paragon asset comes with the animations, blending and curves, all the things they are talking about in the video?

meager spade
#

no

#

@lunar root then its not replicating

#

either you missed a super call somewhere

#

or you stopped it replicating

lunar root
#

`void ATFPlayerStateBase::GetLifetimeReplicatedProps(TArray<FLifetimeProperty>& OutLifetimeProps) const
{
Super::GetLifetimeReplicatedProps(OutLifetimeProps);
DOREPLIFETIME(ATFPlayerStateBase, Team);

}

`

#

I mean whats wrong with that

meager spade
#

nothing but it might be something else

lunar root
#

I seriously don't know 😮

#

is there a debug tool or smth ?

meager spade
#

no

#

there is something you have done

#

PlayerState is replicated by default

#

and its always relevant

#

if you changed anything, check the BP

summer tide
#

Another Question? How would you replicate player location and rotation?

#

I think multicast needs to be used in this case

rotund sapphire
#

If you enable replication for actor it should do this for you already. Character has advanced features for implementing movement replication as well. Other actors do that too, but a little sloppy.

summer tide
#

I see.

#

My player runs sloppy and using normal movement.

#

It jogs a little faster and sprints shaky or sloppy

#

jitters

rotund sapphire
#

if your player is a character, then you can allow player authority by disable character movemnet component's setting, so it wont apply corrections

#

tho it's not the good practice

#

instead you should implement custom moves in cmc code directly. some custom modes can be done in blueprint too, but it won't be fully implemented anyways

#

good movement code require you dwell into cmc and cpp

summer tide
#

I will keep that in mind. I'm trying to solve the network issues via blueprint only since my project is 100% BP.

rotund sapphire
#

just type in p.netshowcorrections 1 in console and if you see red/green capsules your movement code has issues already

#

that's an indicator to rethink this concept

summer tide
#

Ok. I see. Let's say I press a key to play an animation. I have a boolean and I use that boolean in my animBP to play the anim. How would you replicate that?

rotund sapphire
#

I wouldnt use a boolean for that but it really is depends on the context of this question.

fading birch
#

if the actor itself is replicated, the animation should automatically play on the client. as long as the action that executes it is ran by the server.

rotund sapphire
#

For example if it is a character feature (eg sprinting anim), and you use a custom movement mode for this, that is going to be replicated anyways, hence you can depend on that byte value instead and choose different states in the animbp.

fading birch
#

so in your case

#

the client presses the key and tells the server to execute that action

#

that automatically is replicated on clients

summer tide
#

What about if I play the animations using play animation node

fading birch
#

as long as that's called by the server it should work.

#

the client knows that animation exists

rotund sapphire
#

What? You mean like animation montages are automatically replicated?

fading birch
#

so all the server does is just tell the client that animation is playing

summer tide
#

So I usually do the following: Event Interact->ServerCustomEvent; ServerCustomEvent->MulticastCustomEvent; MulticastCustomEvent->run some code including animations

fading birch
#

i've not needed to run a multicast

#

i usually run the client only event from the server

#

roughly:

void SomeAction(){
  if(GetLocalRole() != ROLE_Authority)
    {
      SomeAction_Server();
    ]

  .. stuff
}

void SomeAction_Server(){
  SomeAction();
}```
rotund sapphire
#

it's not going to play someaction on simualted proxies

#

in fact not even on autonomous client, it only send some info to server

#

normally cmc allows for playing a montage on autonomous, then send it to server for multicast distribution (but ignore logic on owner) so that way all going to play anims. Just like Korvax has outlined, but he can actually start playing the sequence as soon as the key is pressed.

#

altho, root motion is not playing nice with cmc, but for the most part this could workin an online game too without issues

fading birch
#

Interesting. I've use roughly that exact logic to execute anims replicated with 0 issues.

rotund sapphire
#

Actually i havent looked into latest engine version eg 24-25 so maybe you are right and there are improvements in this matter.

#

But in order to be certain i'd go with fully implementing anim sharing, and play it on all parties in sync.

#

Also, depending on the importance (and features) of said sequence, i'd probably just skip the playback on dedicated server.

summer tide
#

Thanks . Good info.

lunar root
#

@meager spade idk i tried everything its not working

rotund sapphire
#

Your onrep may come too early but client didnt spawn the replicated actor just yet, so it points to nothing at the time. Check the value again a moment later, maybe it will be there.

lunar root
#

thats what i thought first too, but when i set breakpoints in bp in runtime (like 10s later) its still null

#

so i think that cant be it

rotund sapphire
#

Enable replication for your spawned actor too, and set it always relevant (for testing) to make sure they're exists somewhere around.

lunar root
#

Progress, with bAlwaysRelevant set to true the OnRep gets finally called

meager spade
#

PlayerStates should ALWAYS be AlwaysRelevant

lunar root
#

not in the player state

#

the actor the pointer points to in the PlayerState

#

Like as we said yesterday I've made a TeamActor

meager spade
#

yeah and my TeamActor is always relevant

#

cause it should be

lunar root
#

And in the PlayerState i made a pointer to the current team of the player

#

yeah that solved it

meager spade
#

i technically dont use ALways Relevant, RepGraph handles replicating it to the team

#

so its always relevant to the team

lunar root
#

still havent looked into RepGraph

#

Are PlayerControllers replicated?

rotund sapphire
#

Owner only

lunar root
#

kk

#

so when i want to make an array of team members

rotund sapphire
#

Player States

lunar root
#

i should prob use PlayerStates insteadof PlayerControllers i guess

#

kk

#

ty

muted perch
#

How do I implement amazon gamelift without building from source?

fossil spoke
#

You cant... You need a Dedicated Server executable to be able to utilize GameLift.

#

In order to compile a Dedicated Server you need the Engine Source.

muted perch
#

ok

#

thank you

real cedar
#

I have a question as I am not sure why this is happening.

It doesn't matter if I use the basic "Create Session" node or the "Advanced Sessions" version of it, but I get the same result each time.

As you can see in the picture, the "Open Level" node has "listen" in the options tag. When I am just in the editor, this works perfectly fine, but when I try it in the standalone game or a packaged version, it will load the level just fine, but then after 1 second, the screen goes black, and I have to Alt+F4 out of there.

Any ideas on why this may be happening?

https://cdn.discordapp.com/attachments/221799385611239424/693904726491791430/unknown.png

fleet raven
#

have you read the log to find out what it's doing?

real cedar
#

Where does it save the log for when you open it in a standalone?

#

When I open it inside of the editor, there is no issue. It only does this when it's in standalone or a packaged version

gleaming niche
#

i think you'll need to build from source to actually enable logging, IIRC. with a custom build environment

fleet raven
#

I'm not sure if you launch standalone from the editor since I never use that mode, if you package development (not shipping) then it'll write a log file to the Saved folder in the package output folder

gleaming niche
#

but if it's logging it will be in %localappdata%\projectname\saved\logs

fleet raven
#

that's the location for shipping builds

chilly mason
#

understanding that this is a vague question, but what's a typical outgoing traffic rate of a ue4 game?

#

a very simple ue4 game w/ say a single character

gleaming niche
#

@fleet raven he said "packaged" so I assume that's what he means.

fleet raven
#

it being packaged does not imply any specific configuration (development, debug, shipping, etc)

#

why not just launch fortnite and measure how much traffic it sends

chilly mason
#

don't have it

#

I'm more looking for guidelines

gleaming niche
#

every packaged, whether it's shipping or debug; when I have logging enabled, has gone into %localappdata%

#

every non-editor build

real cedar
#

It's all development. I was just trying to make it so me and some friends could hop in and test the multiplayer quality

fleet raven
#

but that isn't true

gleaming niche
#

i just said, every one that I have done

fleet raven
#

a development build will default to non-installed, which means it writes the log file to the folder it's in

#

a shipping build defaults to no logs, if you enable them, it defaults to installed, which means it writes the log file to appdata

real cedar
#

[2020.03.29-19.23.17:660][ 46]LogOnlineSession: Warning: STEAM: Unknown or unsupported data type from Steam key data BinaryData AAAAAQEAAAAC/////wAAAHNhcmEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAARAAATQ/Yj8ADQALAFcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=
[2020.03.29-19.23.17:660][ 46]LogOnlineSession: Warning: STEAM: Failed to parse setting from key BinaryData value AAAAAQEAAAAC/////wAAAHNhcmEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAARAAATQ/Yj8ADQALAFcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=
[2020.03.29-19.23.17:660][ 46]LogOnlineSession: Warning: STEAM: Unknown or unsupported data type from Steam key data BinarySize 134
[2020.03.29-19.23.17:660][ 46]LogOnlineSession: Warning: STEAM: Failed to parse setting from key BinarySize value 134
[2020.03.29-19.23.17:660][ 46]LogOnlineSession: Warning: STEAM: Unknown or unsupported data type from Steam key data CreationDate 20200329152052
[2020.03.29-19.23.17:660][ 46]LogOnlineSession: Warning: STEAM: Failed to parse setting from key CreationDate value 20200329152052
[2020.03.29-19.23.17:660][ 46]LogOnlineSession: Warning: STEAM: Unknown or unsupported data type from Steam key data IsBehindNAT true
[2020.03.29-19.23.17:660][ 46]LogOnlineSession: Warning: STEAM: Failed to parse setting from key IsBehindNAT value true
[2020.03.29-19.23.17:660][ 46]LogOnlineSession: Warning: STEAM: Unknown or unsupported data type from Steam key data MemberList {"76561198836834879": {"Name":"sara","HR":"13"}}
[2020.03.29-19.23.17:661][ 46]LogOnlineSession: Warning: STEAM: Failed to parse setting from key MemberList value {"76561198836834879": {"Name":"sara","HR":"13"}}

#

I found this in the log file

#

This is where it started to go nuts

fleet raven
#

I don't use steam so no clue what might be the issue here

real cedar
#

Well, you have helped me find the logs so this will now be a big help. I tried looking before for them and couldn't find where they were unfortunately. Thank you.

random nymph
#

Is there anyway to make reliable mutlicast functions truly reliable? My multicasts aren't getting called on a client if client is far enough from the actor that is calling them

fleet raven
#

run them on an object that is always relevant

random nymph
#

The actors are marked as always relevant

fleet raven
#

strange

gaunt cliff
#

hey y'all

#

hope you're all safe and sound during these dire times

#

does anyone here have experience with Amazon gamelift ?

modest yoke
#

@gaunt cliff We are currently using GameLift for our game, what's up?

lunar root
#

It it possible that TMaps just cant be replicated?

#

Like idk my map is always empty on the client side

oak hill
#

Yes, they don't replicate

chrome bay
#

Yeah. TArray is the only container that supports replication

solar stirrup
#

A shame really

chrome bay
#

I've rarely if ever found a need for it to be honest, just use a struct and lookup the element by key instead

solar stirrup
#

true

rose egret
#

does PostprocessVolume use AActor::GetActorEyesViewPoint() to detect whether the camera is in the volume or not ?

#

I still have problems with camera in UE

#

🙂

velvet parcel
#

SO I am just working on my project and everything is going well. Then all of a sudden replication just breaks for nearly everything.

#

Variables are not replicating

#

even if super broke down forms I cant make a variable on the server replicate to a client.

twin juniper
#

Guys, any way to log why the RPC is not triggered? I cannot find why my multicast is not working on the playerstates. It triggers on the server only. Or maybe I'm confused and there something else.

velvet parcel
#

Multicast has to be run from the server. And you can use print nodes to see how it is being called

twin juniper
#

C++ and I am breakpointing. It's not triggering for sure. I just want to know why.

bitter oriole
#

Where do you call it from

twin juniper
#

Server, player controller RPC, inside I call the multicast on player state.

chrome bay
#

@rose egret PP volumes use the actual position of the camera

#

There's no guarantee that the camera will use the same position as GetActorEyesViewPoint()

velvet parcel
#

hmm what in the world would possibly cause blueprints to suddenly stop replicating.

#

I swear I have had this project working for weeks

lament spruce
#

Hello, I'm coming from Unity and C# into using UE4 and C++, I'm trying to implement a multiplayer scoreboard that will track a list of entries, possibly SQL because it needs to be multi-writeable, that only needs to give the "name" "score" & "date" for each board entry. Can anyone point me in the direction of the best way to achieve this? would blueprints or c++ be better?

twin juniper
#

@Castle Take the RPC table on your screen and go one by one, maybe you are calling a client's player state and it's dropped or something. It happened to me today.

bitter oriole
#

We answered that five minutes ago @lament spruce

lament spruce
#

@bitter oriole sorry, didnt see the update in #cpp

velvet parcel
#

That should count down every second right?

#

Well its 0 on clients

twin juniper
#

Where does it say it's an RPC?

#

Click on the event and set it as RPC.

#

Begin Play will always call locally

velvet parcel
#

begin play runs on both server and client at the same time

twin juniper
#

Yes

velvet parcel
#

for a replicated object

#

switch ahas authoirty makes it so its server only.

#

This is on a replicated object

twin juniper
#

So you want to replicate the variable, I see

velvet parcel
#

It should be dirt simple and it seems to be broken. I suspect the engine is messing up

twin juniper
#

Does the object exist on the client? Can you confirm that?

velvet parcel
#

I mean if its a replicated object

#

..

twin juniper
#

And do not spawn the object on the client. Spawn it on the.server and allow it to replicate.

velvet parcel
#

its really strange

#

This object is placed in the map by hand and runs its timer just like the picture

#

In single player it works perfectly. :X

twin juniper
#

Did you know you can connect the red box on the node to the event? You don't have to use the "create event" node.

velvet parcel
#

I am wondering if I messed something up really obscure and its breaking all replication

#

I can try that

twin juniper
#

Make sure the actors settings are right. bReplicates has to be on

velvet parcel
#

but its been working for weeks. :X

#

Yep its on

twin juniper
#

You can try to remove intermediates and generate the project again. But it's more of a "restart your computer" advice. xd

velvet parcel
#

hmm ok so delete intermediate folder?

#

what other folders?

#

It feels like something really weird broke because this is as simple as replication gets. Something is going on

twin juniper
#

Just intermediate, then click on the uproject, generate project files

#

Run the uproject

velvet parcel
#

ok ill try that

twin juniper
#

Who know, maybe it will help if you didn't change anything.

#

But you really need to know what you have changed since yesterday, if it worked yesterday

#

Then we could fix the problem. Otherwise it's hard to guess.

velvet parcel
#

Some basic stuff nothing crazy.

#

Its a blueprint only project.

#

alright I confirmed the object exists on both client and server

#

the variable is simply not replicating :X

#

I wonder if maybe I am just replicating too many things at the same time or something?

#

I doubt it but maybe?

honest scarab
#

Has anyone created a zone that counts depending on what team you are. For example, red player stands in the zone, counter counts, vise versa depending on the team.

I have the code set up to recognized the team that is in the zone (zone is an actor) and tried to count on the game state. It only accepts counts on the server and being a multiplayer game it needs to capture both the server and client.

How would you approach this?

velvet parcel
#

Ok what the heck?
It magically starts working on its own if you just play for awhile

#

What does that mean?

#

If replication suddenly begins working perfectly but only if you play the game for a few minutes

#

And it sometimes stops for a bit, and begins working again

#

what causes that?

crisp sentinel
#

Hello,
Anyone know if you can create a session (like a cod deathmatch for example) on amazon gamlift from a php server?

fading birch
#

@velvet parcel that sounds like some issue with the server replicating the variable before the client is ready for it. Then the client doesn't get it for awhile. It shouldn't take minutes though. That's really strange.

#

@crisp sentinel as in the create-game-session command ran from a PHP server? i don't see why not. It's just CLI.

#

or through the API interface

#

@honest scarab we ran into something slightly similar. Rough idea of how to do it:

1. Client Enters Zone
2. The zone calls a function on the server
3. Server checks the team client is on, adds to the teams score
4. Client wants to check score and asks the server
5. The server tells the client what the team's score is.```
velvet parcel
#

@fading birch I figured out what the problem was this whole time.

#

Ok so the object I was using to replicate is basically just a simple blueprint to manage different aspects of the game mode.

fading birch
#

mmkay

velvet parcel
#

What I forgot was there is a net cull distance on that object.

#

And the world I am building is larger than the cullt distance

fading birch
velvet parcel
#

So I was completely BTFO by something super dumb

#

is there a way to simply turn off the cull distance?

#

The way this game is setup, I may need some stuff to simply never cull.

fading birch
#

i'm not sure about that

bitter oriole
#

Distance culling is opt-in

#

Not opt-out

velvet parcel
#

Feels kinda dumb that I need to put in a super huge number

#

For things like multiplayer inventory managers and such

#

So my net cull distance is now 9999999827968.0

#

feels weird man

fading birch
#

just put -1 and break your game

bitter oriole
#

Doesn't always relevant disable this ?

velvet parcel
#

oh maybe hmm

crisp sentinel
#

@fading birch thanks i m a beginner on gamlift and don t find docs i want =(. So i can use my custom php matchmaking service to creat teams and then create a session on a game lift fleet ans connect all in?
Is it possible to keep usong steem oss for player name achievments etc with this architecture?

fading birch
#

yeah you can still utilize steam with gamelift

velvet parcel
#

This is for an open world turn based RPG so I am not exactly having to update things 100 times a second.

fading birch
#

you can also do that all through php if you want, but gamelift itself has matchmaking built in you can utilize

#

no need to reinvent the wheel

crisp sentinel
#

ok but i need to use some custom info from my db

#

what do you mean by doing all with php?

fading birch
#

what are you trying to do with your PHP server?

#

just create/manage gamelift stuff?

crisp sentinel
#

yeah more create matchmaking and manage my "low" rpg stuff & competance by player

fading birch
#

there's plenty of documentation regarding gamelift

#

as for gamelift and php, you're really on your own there

#

this is a UE4 discord

livid holly
#

why does the client need to call EndSession when they leave a multiplayer match? Isn't the Session handled by the server?

velvet parcel
#

I think for things like making sure their player character goes away after they disconnect

#

Or you end up with a dude just chilling with no owner

livid holly
#

won't that mess up with the session though?

#

like if a client leaves I don't want to mess up with the game session itself, the game should still go on

velvet parcel
#

That I am not sure about

lunar root
#

Is there something like a event which gets called (on the server) as soon the player received the playerstate and stuff, because I want to set the view target to something as soon the player joins, it works for like 2 sec then the player auto-posses into the spectator pawn because it received the PlayerState

velvet parcel
#

What is the best way to setup a multiplayer teleport pad? For some reason I cant get mine to work for anything other than the server. It rubberbands

#

I think this is more of a multiplayer question than a blueprint question.

velvet parcel
#

I cannot for the life of me teleport the player on clients in MP. Only can do it in SP... What gives?

#

Am I missing some obvious thing?

finite willow
#

Hey Everyone. Does anybody know if there is a proper way to switch the bOrientRotationToMovement bool from the Character Movement Component at runtime? I tried a few things swiching it from a custom movement component but I still get net corrections after the switch. Any help is highly appreciated. 🙂 Thank you.

half jewel
#

@velvet parcel the server must initiate the teleport, usually thats enough to move default characters around

rotund whale
#

goddamnit lol.. why does replication behave differently with "Run dedicated server" checked vs actually joining a game via MP menu?

fading birch
#

Is there something I can bind to when a player arrives in a map after a dedicated server executes a seamless server travel? I'm not seeing anything major jump out of me in source.

cerulean escarp
#

I'm only running a dedicated server variant of my game but it thinks I have a client open

fading birch
#

that's the steam API trying to activate

#

are you specifically testing with steam?

cerulean escarp
#

well not initially, but for some reason I get serious issues with trying to test on a non-steam server and client

fading birch
#

oO

#

were you putting -nosteam in your launch?

cerulean escarp
#

when I test the game with a dedicated server in the editor, it only gets the "Steam API failed to launch" but everything works as intended

fading birch
#

oh

cerulean escarp
#

I didn't put -nosteam

fading birch
#

steam doesn't work in pie

cerulean escarp
#

so when I run it in pie, it technically runs a non-steam server?

fading birch
#

correct

#

Steam is standalone only.

cerulean escarp
#

hmmmm

fading birch
#

also if you're using steam

#

make sure you have steam open

#

otherwise it won't work at all

cerulean escarp
#

LOL

#

I didn't have steam open xD

#

wow I'm dumb

#

also, if the pie editor runs the game non-steam but everything works, how come when I have a player join my non-steam packaged server from a packaged client some things don't work as intended?

fading birch
#

That is an Interesting question and depends on how you set things up

#

But what are some things that dont work?

cerulean escarp
#

so when I join the server, the player has a weapon selection menu that shows up. you're supposed to choose a weapon then hit the spawn button, but when I hit the spawn button after choosing a weapon the gun doesn't spawn at all, whereas in PIE it does

fading birch
#

Does the server spawn the weapon for the client?

cerulean escarp
#

yes

#

the playercontroller requests to spawn and passes the chosen weapon to the server, where the server spawns the player BP and then calls the playerBP spawnweapon function

fading birch
#

i would check to make sure it's actual valid then

#

make some breakpoints

#

attach a debugger

#

and look at the call stack

cerulean escarp
#

check to see if the weapon is valid or something else?

fading birch
#

yeah

#

basically see what the value of the weapon is at that point in time

#

if it's null, you've found your issue

cerulean escarp
#

oh I see

fading birch
#

it may need to be replicated as well

cerulean escarp
#

I'll give it a try 🙂

fading birch
#

🙂

cerulean escarp
#

I tested them and they did come out as null, so then I made them replicated but it still came out as null

#

I just don't understand why it works in PIE but not packaged

random nymph
#

I'm setting the owner of an actor on SpawnActorDeferred constructor on a function that is called on the server, but the owner is null on the spawned actor. What am I doing wrong?

ocean geyser
#

are you reading the owner on the client or the server?

random nymph
#

trying on both

#
FTransform spawnTransform;
        spawnTransform.SetLocation(SpawnLocation);

        AArchingProjectileBase* spawnedProjectile = GetWorld()->SpawnActorDeferred<AArchingProjectileBase>(ProjectileToSpawn, spawnTransform, OwnerHero);
        spawnedProjectile->StartLocation = SpawnLocation;
        spawnedProjectile->TargetLocation = TargetLocation;
        spawnedProjectile->ArchHeight = ArchHeight;
        spawnedProjectile->FlyTime = FlyTime;
        spawnedProjectile->SetOwner(OwnerHero);

        UGameplayStatics::FinishSpawningActor(spawnedProjectile, spawnTransform);
#

And owner should be able to be any actor?

#

Well now I'm confused. The owner is correct in beginplay of the spawned actor, but not later in a function I call on it

dim wharf
#

@random nymph is it possible the later function call is running on the client, and you're seeing the owner set on the server's BeginPlay?

random nymph
#

No, the owner is correct on begin play on both my clients and on server and later it is null on a function that is called on a server

#

But I cached the owner into variable in beginplay so I got it working like I wanted

dim wharf
#

Is OwnerHero a pawn or a controller? (I'm guessing the former)

random nymph
#

It is a pawn

dim wharf
#

have you tried logging out the spawnedProjectile->GetOwner() value on Tick() to get an idea of when the value is lost?

random nymph
#

No I haven't

dim wharf
#

and if you use a regular SpawnActor do you get the expected results with regard to the owner assignment (other than custom control of the construction process)?

#

because if that works, then you know that (from Actor.cpp) using the ...Deferred function just results in FinishSpawning not being called, so you can dig through that function and see if there's some reason you would get a different result from not executing it

#

Has anyone encountered
LogNetSerialization: Error: FBitWriter overflowed! (WriteLen: -1, Remaining: 8110, Max: 8110)?

I see it after 1-5 hours of play. Usually I'll test by connecting to a (linux) dedicated server, enable 7 bots to play, and leave my player connected. After some time, the server stops writing to the log, my player's connection is closed, and the above is the only line in the client log.

#

I suspect the call site is in DataBunch.cpp:

    // Reserve channel and set bunch info.
    if( Channel->NumOutRec >= RELIABLE_BUFFER-1+bClose )
    {
        SetOverflowed(-1);
        return;
    }
#

but I'm at a loss as to how I'm causing this, and why it happens after some time. I'm letting the game soak right now without bots to see if an inactive client also causes it, and I'm going to watch the network profile to see if any packets look funny.

#

Anything else I can do to track this down? I don't see a lot of people having this same issue which makes me think I'm doing something ... odd. For what it's worth, I do have EnhancedDeterminism enabled (a physx setting).

random nymph
#

Thanks, i'll try those things at some point

glad wharf
#

@random nymph stupid suggestion but maybe your owner gets destroyed for some gameplay reason?

random nymph
#

Not possible, the cached actor would be null then

glad wharf
#

Indeed

random nymph
#

But it works like should with caching so I will get back to it if it becomes a problem

glad wharf
#

ok, very strange though!

rain coral
#

Hey, I have an animation notify that rarely executes on the clients' pawn on the server, but every time on the server's own pawn. Using Character. Any ideas?

#

I suspect they may not tick the animation blueprint every frame? Because clients are choppy on the listen server too

meager spade
#

are they from montages?

#

could be the blend in/out time

#

could be lots of things. try enable branching point

rain coral
#

@meager spade It's from a montage yes.
Tried enabling 'branching point' on the notify now, and it still was missed on the server.

It consistently always happens on the server's own pawn, but only rarely on the autonomous proxies.
I figure this is because the server takes control of the clients' ticking of the mesh, and calls TickCharacterPose() manually in MoveAutonomous(). I don't understand why it does this, because this makes it look veeery choppy on the listen server, and I suspect the notify event happens in between those ticks.

meager spade
#

thats only for root motion

#

i use notifies all the time in montages

#

and never encountered any issues

rain coral
#

Have you not encountered choppy ticking of the autonomous proxies on the listen server?

meager spade
#

nope

rain coral
meager spade
#

are you doing anything unconventional ?

rain coral
#

Not really, I think I can reproduce the choppiness on a fresh project

meager spade
#

🤷 i see no choppiness

#

this is a montage

#

with lag

#

seems smooth to me

#

all my notifies hit 🤷

rain coral
#

Is that an autonomous proxy? As in, controlled by the client, viewed on the server

meager spade
#

yes autonomous proxy

#

we overrode tons of stuff

#

cause our Observer is our main pawn, the player was just a Simulated proxy, but we changed tons of stuff, so the character is now autonomous proxy

#

full client side movement on navmesh with pathfinding

#

see

rain coral
#

I see. Well, either way I seem to be stuck with the mesh being ticked only when it updates the autonomous proxy, probably because of the things in the thread I linked. I could take some time to reproduce it in a blank project but perhaps someone has already been through this hurdle I'm going through now ;D

meager spade
#

well, only thing i can think of is you modified stuff

#

or your saturating your network

#

(too many updates, (high FPS))

#

server should be running at a fixed framerate (say 60fps)

#

if its running at 200 fps, that 200 updates a second for the character

#

causes all kinds of issues

#

so try setting your framerate fixed

rain coral
#

@meager spade I just reproduced it in a blank project, by making a new BP Character class, assigning the third person mannequin and its animation blueprint, then turning on slow motion for clarity and moving on the client -> choppy mesh updates on the server.
I think this is default stuff.

meager spade
#

what is your framerate

#

like i said, try limiting it

#

to 60 fps

rain coral
#

I set it to fixed 60, but happens either way

meager spade
#

hmm

#

i dont know, looks fine for us

#

did you try outside of PIE?

#

cause i never trust PIE

rain coral
#

It's the same thing when playing in the viewport at least

meager spade
#

i mean open it standalone

#

or show me some gifs/vids

#

of this choppiness

#

so i can at least see

rain coral
#

I could, but I'd have to connect with the other clients, right? That's always an emotional rollercoaster. I'm not sure if it requires ports to be opened and stuff at this point.
Yeah sec

bitter oriole
#

When you mean "fixed" 60, how did you do that ?

meager spade
#

you can make a bat script

#

batch*

#

no need to open anything 🤷

rain coral
#

I meant I just set 'Use fixed frame rate' and set it to 60 in the project settings

bitter oriole
#

That's a terrible idea

rain coral
meager spade
#

not sure what im looing at

#

the client seems cut off

rain coral
#

Yeah okay so the second character who is moving is the client, viewed on the server. Only the server's view was relevant, so that's why it's cut off

meager spade
#

oh

#

but i dont see any bad jitter there?

#

i just see 4.24 pie issue 😄

#

well, only thing you can do is override Possess function on char, and disable the automous tick.... Though i found strange behaviour when i was working on moving our player char to autonmous for CMC local movement. where animations on client were running double speed 😄

rain coral
#

The one who's moving at 0:07 seconds or so is ticking at half the rate or so. The video might not do it justice, but it's noticeable when you play, and I think it's leading to missing animation notifies even.

I'm worried that setting bOnlyAllowAutonomousTickPose to false will mess up my climbing root motion montage basically. But I'll give it a go

#

Anyway, thanks for your assistance 😄

hoary lark
#

(I'm HomerJohnston btw)

rain coral
#

Oh cool, hey!

hoary lark
#

@rain coral one of the problems that setting that to false "can cause" IIRC was that the server might tick the animation at a different rate - sort of like by default it tries to tick the animation with the same dT as the client, this way it will just tick it at its own tick rate. So in theory it might be more possible for your root motion animations to get out of sync or move a slightly different distance. I never investigated it thoroughly for this, I always decided that even if it did it'd be worth the cost. it's a really reaking stupid thing to exist on listen server hosts

#

can't remember if I attempted to describe that in that old post or not

#

i feel like the team at Epic decided mOtIoN bLuR cInEmAtIcNeSs would take care of it but it still looks fugly, you'd have to be blind to not see it

rain coral
#

I see, yeah. Disabling that flag definitely made the clients appear smooth, and it's a big relief. I'm afraid the root motion montage isn't getting synced whether I've enabled this or not, as in it was messed up before I disabled the autonomous mesh pose ticking, and still is after. Might be unrelated to this though. It does seem to consistently hit the notify at the very least

hoary lark
#

interesting to know it might affect the notify's too, never would have thought it would have cause a problem there (one would hope the system would be intelligent enough to at least trigger it "late" when it finally did tick the animation and pass the trigger point...)

rain coral
#

Right, yeah I really wonder if it's designed around something like that, or that none at epic uses a listen server either way?
I noticed it especially when attaching items to the character that they kind of pop in and out of position too, and that was especially noticeable

#

Yeah, that worries me that it would drop a notify this easily. Weird

hoary lark
#

Kaos mentions a "PIE issue", I don't know if this issue might go away naturally in a packaged build somehow or if he's talking about something else... lol. I feel like I tested it in standalone outside PIE, but maybe never in a fully packaged build. the variables in particular make me think it wouldn't change though. I don't think Epic expects very many people to use listen servers. Or AI. both big topic things that don't get much love from them cri

rain coral
#

If it was a PIE issue, I'd expect it to persist even when correcting for those lines of code, but there could be something obscure causing it to only happen in editor. I might actually be able to sort-of confirm this with our current steam build

tall pine
#

Hi guys,

What is a good way to check for the condition of: either singleplayer game, or the local controlled player in MP?

cerulean escarp
#

I think there might be a function called “isListen server” or something because there’s one for testing if the game is a dedicated server

#

I’m not at home rn so I can’t be 100% sure

meager spade
#

@tall pine Netmode == Standalone

#

if its not any type of server

tall pine
#

right, then just have to check for Autoproxy if it's a networked game?

meager spade
#

no

#

IsLocallyController

#

IsLocallyControlled

#

standalone player will ALWAYS be ROLE_Authority

#

listen server will always be ROLE_Authority

tall pine
#

autoproxy = player controlled, but not necessarily the local player?

meager spade
#

so netmode Standalone is not networked, NetMode client and Local Role is Automous, then its a network client in control, if RemoteRole is Not autonomous and Local Role is authority then its listen server in control

tall pine
#

right, thank you.

meager spade
#

IsLocallyControlled is all you need to do tho

#

or IsLocalController from a controller

#

they call the same function

#

doesnt matter, will handle all cases

tall pine
#

awesome, thanks again.

forest kettle
#

Hello guys,
I'm doing this to sprint. (I tried many other solutions) and it's the best solution so far. However my client character still jitter, little but it does. Any tips?

rough python
#

Hi
I am banging my head in the wall trying to get voip working. It works from one PC, but on other ones it dies after it speakers talk for 10 seconds (he can still hear the one where it works though). If I switch who is server and client the same PC still is fine, and the other one still dies after 10 seconds. The only hint I have found so far is this Warning in the log file: Replaying a procedural sound 'Synth' without stopping the previous instance. Only one sound instance per procedural sound wave is supported.

Any hints on things to try out or check?

rotund whale
#

can non-replicated actors receive Multicast RPC?

#

also, how can I switch the Outliner to show Server actors, vs Client actors?

median marten
#

Does anyone have a simple FFastArraySerializer example

rotund whale
#

I'm very confused at my game's behavior when "Play In Editor -> 2 Players" vs "Play In Editor -> host game + join game", the client/server relationship seems all screwed up on actual join game scenarios

meager spade
#

@median marten check NetSerialization.h

#

it has an example

rotund whale
#

I want to create a shortcut to launch the build of my game without building, eg running the editor -> directly to game

fleet raven
#

yeah the one in program files

#

to launch directly you make a shortcut UE4Editor.exe "Path/To/Project.uproject" -Game

rotund whale
#

I guess I need to either add UE4Editor.exe to PATH or create the shortcut from Binaries

#

because UE4Editor.exe is not added to PATH automatically, unless something is broken for me

#

cmd->UE4Editor.exe is not recognized etc etc

#

what can cause Client 2 to never possess the correct pawn? I have a host game / join game menu that will load the map, however when Client 2 joins, without dedicated server, the player is never possessing the correct pawn

median marten
#

@meager spade See it, thanks!

river hazel
#

@forest kettle any kind of ability that alters ACharacter movement needs to go through the UCharacterMovementComponent SavedMove structure

bold totem
#

Hello! I am new to working with UE4, I am creating a turn based board game (online multiplayer). I have a variable whose whose turn it is, but I don't know how to get a kind of identifier for each player and give these the game options, could you help me please?

pine flint
#

has anyone come accross the issue of multiplayer vehicles in a gta/battlefield style game?

#

The built in vehicle class seems to require a controller to posess it in order to make it move

floral umbra
#

Still having trouble with making a team system I followed the ue4 MP tutorial and I know they talked about it at somepoint in the tutorial but now I cant find it

#

I thought maybe the player start tags would be a easy fix or making a custom player start for the enemy player team to soly spawn in but cant seem to figure out how to force change the playerstart type thought the BPs

Edit: I "May" have an idea if I make the IDs of players 5 and 6 (the enemy team) and force a spawn and a class for 5 and 6 than players 1-4 should all spawn together while 5 and 6 are on their own team?

brittle slate
#

Hey all, Ive been having this issue with my movement for like 2 weeks now and i have no idea how to fix it. The movement speed randomly changes to a speed thats doesnt match the servers it spazzes out. i have no idea why its doing this. i disconnect everything from my character but the movement and it still does it. so im stumped. Anyone else have this issue?

bold totem
#

@pine flint thank you so much :D! it works perfectly

pine flint
#

you're welcome

river hazel
#

If you change the players speed at all...or move them...it must be done in a way that allows the servermove rpc to produce the same movement in the server

shut gyro
#

Has anyone had any luck using the "advancedsessions" plugin for sending/receiving friend invites?

#

I am getting a problem receiving the invite - even when the sending of the information is succesfull

hazy herald
#

how would i get the ping of the server when im not using game sessions

#

Im hosting my server on gamelift and when i walk i rubberband

#

also what are ways to reduce rubberbanding

verbal gust
#

Hi
I am banging my head in the wall trying to get voip working. It works from one PC, but on other ones it dies after it speakers talk for 10 seconds (he can still hear the one where it works though). If I switch who is server and client the same PC still is fine, and the other one still dies after 10 seconds. The only hint I have found so far is this Warning in the log file: Replaying a procedural sound 'Synth' without stopping the previous instance. Only one sound instance per procedural sound wave is supported.

Any hints on things to try out or check?
@rough python Hi Mortipherius, I also am working on VOIP implementation as well. Are you using OnlineSubsystemNull?

brittle slate
forest kettle
#

@river hazel Thank you for your reply. I understand the concept but I can't find a practical solution to this puzzle.

river hazel
#

I'm not sure if it's possible to do from blueprint

#

Tldr when the client and server disagree, the server sends a correction. The reason why this is important is because the client "replays" all of the moves that havent been confirmed yet when that happens

#

The client needs to remember if it was sprinting during each of those steps of the move so it can replay them with the right movespeed set up

random nymph
#

Is there an easy way to set possessed pawn location using SetActorLocation or TeleportTo. In my current implementation where i set the location from a curve on both server and client at same time period there is stuttering

#

And the problem is that the movement isn't smooth even if I use deltatime as multiplier and lerp

frigid bluff
#

Question about server RPCs. If I call one server RPC from another server RPC, should I directly call the _Implementation part of the function or the normal function name? Leads me to another question. If you call the _Implementation directly, does it skip the RPC call all together and just treats it like a normal function?

pine flint
#

In cases like that I would just use the pattern

void FunctionName()
{
    if(role!=ENetRoleAuthority)
    {
        server_FunctionName();
    }
    else
    {
        //function logic

    }
}
frigid bluff
#

I am aware that if I just call the function normally, it'd work as expected. I'm just curious about performance and optimization. Would Unreal detect that this RPC is being called on the server and just drop it?

Also @pine flint... that.... that is a good point I feel like a idiot now.

#

While that would work and it's what I'm going to do, I'm still curious about how Unreal would handle this situation under the hood.

pine flint
#

I have never tried it tbh, seems reasonable that it might work though

fleet viper
#

@forest kettle you also need to set the walking speed on client side so that server and client are on sync

pine flint
#

@frigid bluff in some cases you can leave out the else and do the action locally then do it on the server so that the input feels more responsive then gets corrected if the client and server don't match up, everything is on a case by case basis for hwat the best approach is though

frigid bluff
#

Given me something to think about, thanks mate.

pine flint
#

Does anyone know what the best way of doing enterable vehicles in multiplayer is?
I am making an fps game and want to avoid APawn::possess() as it would mean a bunch of dodgy logic and potential bugs.
The 2 choices I see right now are:

  1. To edit the built in vehicle and vehicle movement component to work as an actor instead of pawn
  2. Make my own vehicle physics movement and actor
frigid bluff
#

Does the vehicle need to have multiple players be able to ride in it/control it?

#

Also why do you want to avoid the vehicle being a pawn? I see more bugs from trying to make it an actor

pine flint
#

if it is a pawn then you have cant set owner and call rpcs on it, you have to posess it. I have it set up where it can have multiple players riding in it, but the when switching to the driver seat you have to "possess" it currently

#

but it means that a bunch of my game logic and ui gets broken by this, I think I will look into making my own vehicle movement

frigid bluff
#

GameInstance stays around while testing in PIE, anyway to reset it while in PIE so that the variables get reset?

chrome bay
#

There are global events you can bind to for PIE to manually reset

#

Blueprint or C++?

#

In C++ you can override some GI functions to reset

#

Lines 201-209 in GameInstance.h @frigid bluff

frigid bluff
#

thanks

marsh stream
#

Hey guys!
I'm using blueprints on 4.20.3 (source build) and I my friends can't join my server.
I had this working years ago with 4.17...
Basically I have "ENTER" run console command "open MyPublicIp:7777", I have the port 7777 forwarded and I can join the server on my own computer, but it won't run through the internet with my friends...
Has anyone solved this?
Server built with visual studio and with the correct Server.Target.cs in it.
Thank you!
My server file is only running with -log. Exact same I did in 4.17 when it was working.

#

Well I remembered that on 4.17 I had "open level" "ip:7777" but i don't believe it will make the difference

glad wharf
#

do you know if it's possible to send a RPC only to non-owning clients?

#

(kind of a specialized multicast)

#

basically what I do currently is a Multicast, and inside the multicast, do nothing if locallycontrolled(). But it's wasting bandwidth

marsh stream
#

@glad wharf are you talking to me? xD I have no idea what you just said...

glad wharf
#

haha not specially to you, to the channel

marsh stream
#

ah ok ok.. i thought that was some kind of answer to my previous question and got really confused sorry

glad wharf
#

sorry, my message was not well put.

#

for your problem, I would first test if it's not a connection setting issue, UE4 considerations aside.

#

like are you sure the port 7777 on your public IP is reachable from the internet

marsh stream
#

Yes. I opened it like i open any other ports on my router

#

I mean.. it is open on my pc and router, but browser keeps saying it's not open

glad wharf
#

some check up:

  • verify you and your friend run the same build
  • verify that with dedicated server on your machine, without you connected as a client, your friend still cannot connect
  • test with your friend hosting the dedicated server
  • if you can reach your server when you are on the same network/machine, it's not a UE4 problem
#

not sure your browser is a good test, because it will try to talk with a web server, which UE4 is not

marsh stream
#

ah alright. then i'm 100% sure it's my network and not the UE or the build

#

maybe i'm setting wrong ip

#

my ipconfig gives me an ip, but whatismyip gives me a different public ip. which one should i make the game connect to?

glad wharf
#

the second one

marsh stream
#

the one i get on the browser right?

glad wharf
#

ipconfig gives you your local ip, you want your public ip

#

the one you get from whatismyip

marsh stream
#

alright. then i'm doing it right

glad wharf
#

be careful that by default your IP will change from time to time

#

if you want a static IP or static name binding there are services for that

marsh stream
#

i know. not worried about it for now

glad wharf
#

ok

marsh stream
#

but thanks 🙂

glad wharf
#

so it must be your port forwarding

#

or a firewall

marsh stream
#

yep... and i have no idea why..

#

i've been opening ports for years.. always went right

glad wharf
#

ah, was hoping you were not familiar with it, it would have mean that it could be a simple problem to solve xD

#

(sorry for this very bad grammar)

marsh stream
#

i wish it was... :\ i really want to give up xD

glad wharf
#

That being said, network is a tricky beast. I regularly had problems running a UE4 game on LAN (for business purposes so everyday the same LAN on a shipped product) because of W10 screwing network settings sometimes for no reason

#

can you try to have a simple python/whatever server on the same port (without the dedicated server running ofc) so you can use netcat to see if it is reachable?

#

like a basic network ping pong

marsh stream
#

i have no idea how to do that xD

glad wharf
#

just to see if it's really really a network problem (but I can't see what else it could be if you connect locally)

#

ah ok

#

well actually just a "ping yourip -p 7777" could give information

#

maybe your router does not allow the UDP protocol by default on port forwarding?

marsh stream
#

idk.. i have both UDP/TCP active

#

i run that on cmd and says invalid parameter

glad wharf
#

my bad it's not -p

marsh stream
#

ip:7777?

glad wharf
#

Could work

marsh stream
#

nop

glad wharf
marsh stream
#

can't find host

#

should i add the port there?

glad wharf
#

I'm stupid, ping is on a lower network level, there is no port

#

so a first test would be to try to just ping your IP

#

but I'm not 100% sure that the fact that the ping does not work would mean that something is wrong, ping packets are often filtered out

marsh stream
#

i can ping my ip

glad wharf
#

ok

#

so the next step would be to check that 7777 is reachable

marsh stream
#

i'll try nmap

#

and i have time now.... Server built with 11 errors

glad wharf
#

arf

marsh stream
#

.... reinstalling the latest version ffs xD

#

oooh maybe i forgot to add the c++ class on this game version xD

#

nope. i didn't

#

how do i use this nmap?

#

i scanned it, it says 1000 ports but i can't see which

glad wharf
#

I think there are filters. Sorry I did not use it since a long time :/

marsh stream
#

@glad wharf 7777/tcp filtered cbt

#

is this right?

fossil veldt
#

Is this a good method (Simplified) of reporting client damage hits to the Server?

If not which classes should I be using instead

glad wharf
#

I don't know sorry :/

marsh stream
#

ok

hoary lark
glad wharf
#

ah awesome

marsh stream
#

ah thanks mate. i'll try it

pine flint
#

Would anyone be interested in a overview/breakdown video for a networked weapon attachments system?

#

I am thinking of doing breakdowns of some of the features I have implemented that people haven't covered in-depth already

glad wharf
#

yes would be cool 🙂

pine girder
#

how much would it cost to have something developed, a multiplayer game that users connect to a room and have simple avatars and chat with each other via text chat or audio?

brittle slate
#

Nothing if you do it yourself 🤣

chrome bay
#

Minimum 1 month for a full time programmer. Depends on whether you're using an existing VOIP system, and existing OSS etc.

#

Purely random figures

bitter oriole
#

I would also not use UE4

glad wharf
#

why?

bitter oriole
#

Because what's described here is basically most chat apps

#

It's probably way easier to do with a random Web framework

#

Skip the voice part and you're talking one day of Javascript

#

Of course if there is a 3D room to show, it's more interesting to use UE4, but the description is unclear 😛

glad wharf
#

ah yes indeed, I assumed 3D. I don't know how quick it can be to setup a 3D multiplayer scene in JS.

bitter oriole
#

The difficulty from "2D menu" -> "3D background level" -> "multiplayer movement" jumps quite violently at each step so yeah, if it's the last one, UE4 all the way

median marten
#

Hey man, Implementing FFastArraySerializer, I noticed that it only manage to replicate to my local client. So other clients don't receive the replication, any idea how to make it so that it replicates down (Mainly PostReplicatedChange) to all clients? @meager spade

meager spade
#

i think PostReplicatedChange is only for the owning client

#

@winged badger would know

fossil veldt
#

Is there an easy way to UE_LOG a uint8?

#

BytesToString()?

hazy siren
#

pretty sure you can just use the %d format

fossil veldt
#

oh sweet

#

i'l give that a try, ty

hazy siren
#

but sadly the only useful UE_LOG docs were on the wiki so I can't double check

fossil veldt
#

yep >.<

#

well, it's compiling so I assume it works! 🙂

#

Yeap, Worked perfectly, tyvm

glad wharf
#

does any of you have a good tutorial to recommend for basic movement interpolation on client? Like linear interpolation with smooth correction for position/rotation?

hazy siren
#

@glad wharf the source of CharacterMovementComponent, which does all that

#

also thanks for the link

glad wharf
#

ok thanks, that was something I planned to do if no other resources were available 😄 but ok will start with that!

hazy siren
#

CharacterMovementComponent is very full featured right out of the box, to the point where doing stuff outside of it feels like an uphill battle because of how much functionality you give up by not using it

glad wharf
#

yes indeed, it's because it seems you should not have to much of them at the same time, and I have lots of simple projectiles being spawned every few seconds

#

so I thought it would be a better idea to have a custom simple interpolation logic for this kind of simple movement

hazy siren
#

so CMM is optimized for usage in things like paragon and fortnite, so it's actually had a bunch of work done on efficiently packing and so on, but yeah, it's probably not what you want to use for projectiles

#

the source is pretty accessible, the complicated parts are because of all the different circumstances it handles, the basic move / predict / correct cycle is fairly straightforward

glad wharf
#

ok thanks for the very useful introduction to the CMM! very appreciated 🙂 will look into it and learn 😎

chrome bay
#

100% do not use character movement for projectiles

#

Projectile Movement Component can do visual interpolation

glad wharf
#

thanks TheJamsh, I'm actually trying to use it right now, trying to find the good parameters. Basically I activate it on server and client, and as the actor is set as replicate movements server should correct client when needed. I also saw that there is a boolean to stop simulating and just interpolate between updates

#

what is strange is that my projectile does not move at all

pallid stone
#

With the finding search results on the online session settings on steam I seem to only be getting 50 results back even though it is set to 20000. Is there some sort of limit there?

#

Also, looking at logs when trying to find games via steam in the verbose log, should it say this? LogOnline: Verbose: STEAM: Starting search for Internet games...

still condor
#

is there a reason a NetMulticast function called by the server for an actor would only get called on the server and one client?

pallid stone
#

The clients version of that actor is destroyed?

still condor
#

for the other clients? is that possible without tearing off?

pallid stone
#

For other clients to also call that function, they have to have their own instance of that actor

still condor
#

oh, right, relevancy

twin juniper
#

quick question, why is my cast failing on players states for other clients but host?

#

this is in the widget, this func is assigned to text

#

nvm just takes a second It seems

cunning shoal
#

hey guys, I'm sure this has been asked before... but what methods are you using to compensate input lag when shooting a weapon in multiplayer FPS/TPS?

#

Right now if there is lag, the client will click to shoot, but sees nothing for a moment until the server receives and verifies it

#

one way I thought of resolving this is to have the client shoot on their local client only - and send the update to the server, and the server replicates to everyone except that client, does that make sense?

fading birch
#

that's how i've handled it in the past.

#

We ended up moving to GAS though

#

which offers a very nice in built prediction system.

meager spade
#

my clients fire the gun locally

#

produce hit data locally

#

sends it to the server, server does basic checks to ensure the data is ok, but ultimately uses the clients hit result

#

means client gets 0 input lag

#

only delay they see is Hitmarker/Damage numbers (as these are not predicted)

cunning shoal
#

hmmm interesting

meager spade
#

benefit is, no animations need to play on the server, and no need to re-wind positions/store player positions

cunning shoal
#

how would you be sure players aren't cheating with that method though

#

if you do a hit break on the client side and send to the server - does the server do its own hit break to verify? or do you just check if the player was nearby

hazy siren
#

there's a lot of subtle details in your gameplay about how much you trade off between people being mad that they missed shots they clearly made and people being hit by shots when they were clearly behind cover

cunning shoal
#

fair enough. Right now I have my fire input on the client run a "replicate to server" event, which then calls a firing loop with ammo and status checks (e.g. not swimming, reloading, sprinting, etc.) so just trying to sort out how to adapt it

#

since the server does need to know whats happening so other clients can see, I can't just say run on remote authority only

winged badger
#

i have everything weapon related client authoritative

#

otherwise the game doesn't feel responsive enough

cunning shoal
#

and since it's replicate to server and it somehow replicates to all clients I can't just have a multicast and then do a check if its the local player

hazy siren
#

there's a blog somewhere from the overatch team about how they ultimately decided that it felt worse to miss a headshot you could see on your screen than to get shot from behind cover and favored the shooter

cunning shoal
#

yeah makes sense

winged badger
#

you can stop cheating either

#

you can just make it pay off less

cunning shoal
#

so as a high level example... your fire input goes to a "switch has authority" node in which you use "Remote" to do everything? how do the other players see the event that happened

winged badger
#

my game is not an FPS, so i have somewhat easier time

hazy siren
winged badger
#

my server rotates to target and plays the weapon effects, does hits when client RPCs stuff to it

#

my simulated proxies just guess what happened, they don't get replicated hits, they do damage in simulation, server corrects it

austere fjord
#

Has anyone implemented a solution for multiplayer click to move that doesn't involve an AI controller? I have that solution implemented but cannot get it to work with GAS (Gameplay Ability System)

cobalt whale
#

how can i change a text of a widget from a player state?

pallid stone
#

A blueprint widget? Well when you create the widget, make a reference to it. Then do a call to client function on something that owns that widget reference, then order the changes there

cobalt whale
#

i got a reference on the game instance, and i say to the player state. to tell to the game instance to tell to the widget to set the text. but it's blank

hazy siren
#

@austere fjord I just pathfind on both the server and the client simultaneously and let CMM take care of any problems

#

I'm a little worried that pathfinding isn't deterministic enough for this to be safe but it's been working so far

austere fjord
#

@hazy siren I tried that in a fresh project and it seemed to work, but when I added it to my existing game it was all kinds of glitchy, bouncing the camera back and forth between the server and client

hazy siren
#

the other solution I started working on was to pathfind on the server, save the rout, replicate that back to the client, and then rebuild the FNavPath from that

#

but it got hard so I stopped

cobalt whale
#

should be like this no?

toxic schooner
#

whats the best way to spawn enemies nearby players? right now I have a method on my playercharacter to randomly spawn stuff around it

cunning shoal
#

ok thanks guys, well on my way here... getting everything with respect to weapon firing to run local and it's going pretty good - however I'm unsure how to do an RPC multicast but excluding the original client from applying the action (e.g. shoot projectile via multicast, but i dont want this to happen on the client who originally shot it as he already ran it locally)

fading birch
#

use the Skip_Owner in your lifetime props

cunning shoal
#

lifetime props?

fading birch
#

in code yes

cunning shoal
#

hmmm , is there an equivalent in Blueprints?

#

I've seen that option for variable replicate but not on RPCs

fading birch
#

it's only for variables tho afaik

cunning shoal
#

yeah that's what I've seen as well... problem is I have muzzle rotation/location and active camera rot/loc info being passed along with the RPC event, I thought of doing a on rep notify variable rep but it wouldn't pass this information over with it

fading birch
#

you just need to pass if the client is firing right?

#

you could use a replicated bool for that

#

and just notify everyone else "Hey i'm firing"

cunning shoal
#

I can for the firing itself, but the problem is clients don't know where they are shooting to

fading birch
#

ah

cunning shoal
#

this is the current multicast, you can see i tried with get player controller, and "is locally controlled"

#

but neither seem to have the desired effect

fading birch
#

i'd need to dig through some older code of mine

#

I handled it that the server always fires the weapon

#

the client just tells the server it wants to fire

#

iirc you mentioned that was causing some weird delays

cunning shoal
#

yeah, if i turn on latency simulation, and fired before it would work great on the server but the client had a noticeable delay before actually doing anything. So some of you suggested doing the shooting FX/Projectile creation client-side and just letting the other clients know it happened

fading birch
#

I'm not entirely sure how to do that through only BP's

#

I could figure it out in code, but stuff like that I don't generally do in BP at all.

cunning shoal
#

hmmm

vivid seal
#

You can do that in BP, just have an event that’s not replicated called when a client fires, and a separate run on server event that will do the stuff the server should be doing, including replicating variables and multi casting fx that other clients need (you’d need to check on that multicast that you’re not the original client so you don’t get double fx)

cunning shoal
#

that's the tricky part though, checking on multicast that you're not the original client

#

ah ok i think i got it, I had to tell the projectile actor not to replicate... just need to sort out the fact it doesnt move on other clients now

#

thanks guys

tall pine
#

what's the best way to reset a variable that you use to trigger replication with OnRep?

#

Say I have:

UPROPERTY(ReplicatedUsing=OnRep_SpellCasted)
bool SpellCasted;

Once I set SpellCasted to true, the client value will get replicated and I get the call OnRep.
However, if I want to trigger it again next time, I need to reset the SpellCasted on the server to false.
I also don't want to do this in the same frame that it gets set to true, right?

hard mist
#

Hello, I am having some strange problem with replicating.

#

This is with listener server setup which everything works as intended. One client shoots and the server + other client get the replication.

#

However, when I move to dedicated server setup, one client shoot and to other client the line trace just goes straight through physical bodies.
I wonder what is going on here?

meager spade
#

@cunning shoal just check for IsLocallyControlled in the multicast

#

if its true, then ignore. false do the multicast stuff.

cunning shoal
#

yeah that's what ended up working after removing replicate from the projectile actor, just trying to sort out all my projectile code now as it was coded for server-side stuff and breaks with clients running it

#

thanks though, much appreciated!

fleet raven
#

when you use replication graph, the settings on actors like priority and replication rate are ignored, right?

cunning shoal
#

nope

#

in my projectile code i had a "switch on authority" and because all my clients were now technically authorative of the projectiles, they all ran that code which lead to errors so i changed it to a "is server" conditional check which seems to have resolved that

meager spade
#

depends @fleet raven you can define them in the Repgraph

#

on a class by class basis

cunning shoal
#

oh sorry... thought that was a reply to me lol

meager spade
#

my projectile is replicated.

#

it spawns a client side projectile, then server spawns a replicated projectile

#

hidden from the projectile owner

ocean geyser
#

do you use onrep or multicast for your shooting/effects and such

meager spade
#

gameplay cues

#

i use ability system for that stuff

#

but its basically a batched multicast

#

all cues get batched to a single rpc

#

muzzle flash is just ran on the animation for the shoot anim of the gun, i just multicast the anim start, then fire the shot (which produces the tracer lines, for hitscan guns)

#

but yeah its multicast, just batched to a single RPC

#

shootergame uses a replicated property (uint8 iirc)

#

and just increments it for every shot

ocean geyser
#

not a bad idea. my thought was to shoot on the client, gather hit info, send to server, perform checks, apply damage and such, then call a multicast function to spawn effects and figure out everything on their clients (like what effect to spawn on impact of metal or dirt) and such to clients

meager spade
#

thats exactly what i do in a way

#

server just sends a multicast with shot data

#

clients simulate it

#

but cause i use Gameplay cues

#

i have 5 cues, without batching, that would be 5 multicasts

ocean geyser
#

my only concern with onrep is what if you fire the weapon and you want the sound to be heard like .8 miles away or something. i would assume you might no longer be relevant so you might not hear the shot?

meager spade
#

why does it matter

#

if you wasnt relevant

#

when the shot was fired, it shouldnt be heard

ocean geyser
#

id want it to be heard if the player is close enough to hear the shot (think arma 3)

meager spade
#

yeah but then the player would have to be relevant

#

or send it as a reliable multicast

#

think those dont care for relevancy..

#

mine are all unreliable

ocean geyser
#

thats the only reason for a multicast imo. gtg though, ill be rereading what you posted though for ideas

tall pine
#

Say I have:

UPROPERTY(ReplicatedUsing=OnRep_SpellCasted)
bool SpellCasted;

Once I set SpellCasted to true, the client value will get replicated and I get the call OnRep.
However, if I want to trigger it again next time, I need to reset the SpellCasted on the server to false. Is that the best way to go about that?
I also don't want to do this in the same frame that it gets set to true, right?

meager spade
#

dont use replicated bool if you are gonna toggle it rapidly

#

clients may never get the update, ie set it to true one frame, 10 frames later set it to false, server replicated actor, see nothing has changed

#

clients wont ever trigger it.

tall pine
#

so what's the better way to go about this? Using RPC?

#

i only reset it so I can "trigger" the replication again the next time the spell is casted

#

but I don't know how to force a replication except changing the value to false

ocean geyser
#

@tall pine do what he said above with how the shooter game does it. use a uint8 to trigger it. just make sure it doesnt run out of range, so for example do a simple check (range is 0-255 i believe) so if its value + 1 is equal to 255 then we want to reset it to 0 just incase

if (Var + 1 == 255)
  Var = 0;
tall pine
#

oh, instead of a bool, probably can use a int

ocean geyser
#

yep

tall pine
#

oh ha ha, that's what I was just thinking about, awesome, thanks Cody

cunning shoal
#

Very cool! Ok great now with 400ms i dont even notice it as a client.... my muzzleflash, sounds, animation, tracer etc. all happen instantly locally, and on the clients appear 400ms later. Ammo I still only have the server doing, so client sees lag on the numbers but I guess that's acceptable, right? Also I wonder what will happen if a client is moving quickly and you think you hit someone because locally it appears that way but the server disagrees

lucid dragon
#

So I have a local mutiplayer game I have developed. I was wondering if their was a way to implement a plugin (something quick and dirty) to play the game over a network

cunning shoal
#

Ok so just tested it and confirmed the issue now is if another player is moving and you have latency - if you shoot at their body directly as they go by, the server doesnt register you as hitting them (since your view of the player is 400ms behind)

#

can confirm that if the other player has lag, everyone else can still hit him as expected though - so it's only a one-way problem

ocean geyser
#

@cunning shoal for your ammo just decrement it on the client first before the server changes it. that way its instant but the server still controls it. as for the lag why dont you check the distance of your impact point to the client you were shooting at and see if its within X distance to confirm that it was a valid hit. that way it can let some lag not affect the clients hit

cunning shoal
#

hmmm so i just tried making it so the client does the hit detection and then passes the hit to the server and the server calculates damage based on that info

#

good point with the updating the count locally first Cody, ill do that

#

I'll have to verify the distance though on the server like you mentioned so people cant just claim they hit from across the map

#

maybe I can even use the ping of the player to determine the "freedom" the shot is allowed

ocean geyser
#

correct regarding performing it on the server, and good idea if you can make it use the ping to adjust

cunning shoal
#

@ocean geyser that worked for the moment the ammo gets updated right away, however if im shooting a rifle and shoot multiple shots with high latency, it will jump back up and count down

#

e.g. 20 bullets in my mag, i shoot 5 so 15 is displayed on the client - server starts sending delayed updates so it jump back to 19..18.17.16.15

#

it's probably because my ammo inventory is replicated - but i would think i'd still want that

lucid vault
#

Quick question. I rotate player's spine with control rotation locally. If I want this to replicate to other players, do I need to call a server function to set the variable then a multicast? Or is there a better way for the player to tell the other player's about his spine rotation?\

tall pine
#

Question about replication condition COND_Custom: so when the condition is satisfied, the property will be replicated to everyone, right?

ocean geyser
#

@lucid vault make the rotation replicated with the condition of skip owner. set the rotation in your LookUpAtRate function, send that rotation to the server and have the server set the replicated variable to that rotation

glad wharf
#

@ocean geyser is this better than having an unreliable multicast for the server-to-other-clients part? I mean, sending the rotation to the server, then the server multicast to other clients

#

I thought using variable replication for high rate update stuff was not very efficient because variable replication is reliable

ocean geyser
#

@glad wharf yes. you wouldnt want to send multicasts at a super high rate because its being sent to other clients where your character may not even be relevant to which is wasting more bandwidth. using a replicated variable will only replicate the variable to the clients where your the player replicating that variable is relevant

glad wharf
#

good to know, thanks for the explanation!

weary mortar
#

Hi all, this is about architecture/good practises.... where is the best place to place a widget with a countdown timer that will be triggered by Server and replicated in all clients? maybe in the gameinstance of every player?

ocean geyser
#

gameinstance is not replicated, id put it in the game state and replicate it

#

@weary mortar

weary mortar
#

cool, thanks! @ocean geyser !!

dawn plaza
#

When a client joins, I'm losing input on the server with "ControlledPawn isn't valid" - no matter how I spawn the other player (onPostLogin, default Pawn in Game Mode .etc). Any ideas?

#

At the minute I'm having to do this and it feels disgustingly wrong:

frigid bluff
#

Question, if I call a delegate function from a server RPC, would that delegate fire on both the client and the server or just the server? Further, if you call a function from a server RPC that function would get ran on the server; but if it's in the case of something like the player controller would that function also happen on the client?

fleet sluice
oblique bluff
#

@fleet sluice Maybe care about your buyers? e.g. Answer the questions on the Marketplace. I linked you on the forums with an issue user had with my SteamWorkshopAccessor plugin because of UWorks. Didn't take part in that conversation either.

fleet sluice
#

@oblique bluff This has been written on my plugin's page almost since the beginning:

"This product is not intended to be used in conjunction with the OnlineSubsystemSteam module."

Your issue was clearly because of breaking that. Your lack of care in research does not create any responsibilities on my end.

#

And as far as I remember, your plugin didn't have one, but two separate issues described in that thread. Both of them were, afaik, linked to your plugin requiring OnlineSubsystemSteam and your customer was also using UWorks.

#

And you were quick to blame my plugin for both, which is inaccurate.

dawn plaza
#

@fleet sluice Does this $5 means you're no longer supporting it or?

oblique bluff
#

continuing private

fleet sluice
#

@dawn plaza No. I'll be posting a 4.25 update. "5 USD" is a symbolic price and it represents that I now believe that one product has made enough money for its lifetime and I no longer expect it to generate more. But it's still a great tool, objectively speaking, and people can benefit from it on the long term.

dawn plaza
#

@fleet sluice Do you have a transition guide from using the OnlineSubsytem Steam to using UWorks (or would it work out of the box?)

oblique bluff
#

Well, can't send private message:
There is no Issue on my plugin if I stick to unreals logic. Neither is it my "lack of research regarding your plugin" if I try to help a customer of mine. I detected the conflict with your plugin and invited you to join the conversation to find a solution. So if you read trough the issue, why not just answer to the problem?

fleet sluice
#

@oblique bluff I was just going to write that my PMs are disabled and I tried to add you as a friend, but the Discord button didn't do anything.

I didn't answer because I noticed the e-mail like a month later. And then I thought it was too late. Then I think I got a 2nd mention (I don't remember) and I forgot. I appreciate the invitation to join the conversation, but you yourself called it "invitation". Accepting/Answering is not mandatory and forgetting about/ignoring/declining an invitation does not imply any lack of respect on my part.

pallid stone
#

If the gamestate changes your game to InProgress, does that mean steam cannot find your game?

fleet sluice
#

@dawn plaza No, I don't have a guide. I don't support the entire OnlineSubsystem framework because I think it's a very good idea implemented in a very bad way - it lacks any shade of flexibility. UWorks is just a big wrapper on top of Steam functions so it assumes people will read my documentation, which explains how to work with the plugin, then Steam's official documentation because, again, the plugin is mainly a 1-1 port.

#

i.e. I made some async utilities which are thoroughly documented in my own documentation. But if someone wants to learn how to work with, let's say, lobbies or achievements, it's natural that they relied on Steam's docs because I'm not insane enough to duplicate Steam's docs.

dawn plaza
#

For sure, thanks for answering the question!

forest kettle
#

@river hazel and @fleet viper Thank you for your help. I 've found the issue. It turns out that my approach had no problem at all but the cause of that jittering is that my mesh was replicating. No idea why, maybe I ticked that box to test something and forgot to tick it off again. So, now I set speed on the server using RepNotify and it works perfectly fine, so far 🙂

pallid stone
#

What can I get your plugin/?

pearl pollen
#

Hi! Is there a way of figuring out on the server whether the client is already loaded and ready or not? So far I'm doing it via RPC from the client but I was wondering if there was another, better way...

bitter oriole
#

There is not

pearl pollen
#

Okay, thanks. So it's completely fine to trust the client with that

rain coral
#

@hoary lark Alright, I can confirm that the issue of mesh ticking is in builds, not just the editor, just in case you wonder!
A side-topic, but relevant to listen servers, have you done crouching (the Character implementation) in your game? Because the listen server is lerping the mesh position when the client crouches so that it moves into the ground for a bit, just wondered if you had wrestled with that issue as well.

pallid stone
#

When you build out a game with steamonlinesubsystem should it say this in the logs then keep building?

ATHelper: Packaging (Windows (64-bit)): LogOnline: Display: STEAM: Loading Steam SDK 1.39
UATHelper: Packaging (Windows (64-bit)): LogOnline: Warning: STEAM: Steam API disabled!
UATHelper: Packaging (Windows (64-bit)): LogOnline: Display: STEAM: OnlineSubsystemSteam::Shutdown()
PackagingResults: Warning: STEAM: Steam API disabled!
UATHelper: Packaging (Windows (64-bit)): LogStreaming: Display: Took 0.049s to delete old logs.

bitter oriole
#

Yes

pallid stone
glad wharf
#

Hi, I've got a staticmesh component inside an actor replicating with a Timeline (non replicating) on server setting the world location of this component. The component is set to replicates and I see the correct updated location, so so far so good.
However, when performing collision test (SphereTrace) still on client, the actor with this static mesh component is still blocking the hit! When displaying collisions, there is no collisions visible where the sphere is blocked, I don't understand how it's possible; Any idea?

#

I checked in standalone, everything works fine, so it seems to be a replication problem

pallid stone
#

Are you setting the collision settings before the game starts in the blueprint/class, or after the game starts?

glad wharf
#

before

#

the timeline does not replicate, it does a SetWorldLocation on server and then the component transform is replicated back to client

gritty pelican
#

Hello. Can a ragdoll be replicated?

#

For example, after a player dies, he simulates physics. The player can be looted, so the position needs to be synchronized.

glad wharf
#

don't know if a ragdoll can be replicated, but a possible solution would be to have the ragdoll affect your root if it's not already the case, and then have an approximation box around the player body to detect loot intent

bitter oriole
#

Physics in general can't be replicated

glad wharf
#

Physics can't but I suppose you could check your radgoll parts location at each tick and replicate them on client where physics would be disabled, and ragdoll parts location manually overriden?

#

don't know if it's easy to manually drive a ragdoll

bitter oriole
#

Nowhere near as responsive as real physics

glad wharf
#

you're right

#

after multiple tests, I still cannot figure out why my sphere trace hits my replicated actor, when "show collisions" shows nothing where it's tracing

#

is there like a collision cache the sphere trace uses I should update after network update?

gritty pelican
#

But for example, can I use RigidBody?

#

And simulate all bones except Root

#

Then the position will be one on the server and client, tied to the root of the bone?

meager horizon
#

when a player dies and their character is destroyed, what camera is used for that player?

#

i seem to be left with a random facing camera view of somewhere on the level, looking towards 0,0,0, until i respawn

glad wharf
#

Not sure it's automatically handled. Maybe you could register to the end play event of the pawn, and assign a new camera to the player controller when it happens, until it gets a new pawn.

meager horizon
#

yeah i tried that

#

but the attempt is ignored

#

i was thinking of hooking to another players camera, so it auto spectates a random player

odd iron
#

GoodDay Guys .
How Can i Update the Server Browser Directly when the player joining server if the server count was 0/10
i want to get this updated
1/10 once player joined