#multiplayer

1 messages ยท Page 679 of 1

meager spade
#

i literally have DataAssets for each item

chrome bay
#

Do you have to use live UObjects for the items?

meager spade
#

and a list of defaults, server just creates them

chrome bay
#

Like instead of a struct with an item class + a stack count

meager spade
#

creates the UObject, adds it to Fast Array,a dn done

#

which.. leads me to a question ๐Ÿ˜›

#

i have a fast array for items (for the replication)

#

i create UObject for each item, atm i also replicate the UObject, but i am just wondering if i should not replicate the UObject but create a local copy

#

the UObject holds some convience stuff (BP accessors, etc)

#

and if i need to access the item from the FastArray i can do so via a GUID..

chrome bay
#

WELL.. i recently delved into this

#

Because i hated that I was replicating all my slot objects

meager spade
#

right, yeah

chrome bay
#

So I now have them generated from a data-table at init time and make sure they are stably-named. so far it's worked out pretty well

#

So I can refer to them over network still, but they aren't replicated

meager spade
#

thing is i have ItemDefinitions that describe the item

dark edge
#

Why are you guys not just using structs for abstract items?

meager spade
#

Like RangedWeaponItemDefinition

#

cause structs can not interface with BP easily

#

Basically i am thinking of the system works like this, RangedWeaponItemDefinition -> Inventory Manager -> AddDefinition(Definition) -> Create UObject for definition, add to fast array seralizer -> client callback -> Create UObject

dark edge
#

IDK if it's the nooby approach but we just have item as struct when stored in an inventory and instantiated as an actor when in the world. Works pretty well so far.

chrome bay
#

Mines probably a bit more unique because I have the separate items + slots as uobjects

#

because reasons

meager spade
#

Client <> server communication is done via Guid/Definition

viscid monolith
#

And once again, thank you very much!!!

meager spade
#

so UObject rep seems.. redundant

#

what was the solve @viscid monolith ?

chrome bay
#

But the original system was stupid costly because I couldn't have something in an inventory unless it was also in a slot, and the slot itself was a server-spawned rep'd item, so it was pretty terrible.

#

Weird case though

viscid monolith
chrome bay
#

But I imagine most inventory items are either going to be an actor like a weapon or something, or a static asset like a data asset

viscid monolith
#

But i think i should not use UObject

meager spade
#

@chrome bay i spawn the actor when the definition is given

chrome bay
#

yeah

meager spade
#

(for guns, etc)

chrome bay
#

makes sense

dark edge
meager spade
#

yeah i prefer data assets for the definition

#

has all kindsa stuff tho ๐Ÿ˜›

chrome bay
#

yeah I do the same essentially. My items are just this

    UPROPERTY(BlueprintReadOnly, Category = "Inventory") FST_SlotInventoryID InventoryID;
    UPROPERTY(BlueprintReadOnly, Category = "Inventory") UObject* Object;
    UPROPERTY(BlueprintReadOnly, Category = "Inventory") FName Key;```
dark edge
#

I guess I don't really know what a data asset does that a struct doesn't.

chrome bay
#

Well it's static data

#

So instead of replicating all those fields, you only replicate a single class object

meager spade
#

dont even need to replicate it

#

it exists on client and server by default

#

and i can point to it easily

dark edge
#

What about for procedural items?

chrome bay
#

Ah yeah, I'm thinking in terms of runtime-given stuff

meager spade
#

yeah i just rep the pointer

#

and thats it

#

procedural items?

dark edge
#

Yeah like path of exile or Diablo

meager spade
#

i mean i can have attachments/skins etc

#

these are done via Alteration DA's

dark edge
#

No 2 items of ours are ever identical, they all have property ranges and are rolled.

meager spade
#

and stored in the fast array

#

i dont have random stats tho

#

but if i did, you can just pass them along

dark edge
#

I have a feeling passing them along starts looking like just replicating a struct as definition and I'm back to where I am lol.

meager spade
#

i mean the DA is just static data, describes what the item is, and what it has

#

stats can be pulled from anywhere

#

infact doing that in my system is trivial

#

i pull the base weapon stats

#

but you could easily pass along a seed

#

to generate the same random data for each client

sinful tree
#

If you wanna do diablo style items, they used a set length of bytes to represent the items and you generate the item based on those available bytes by using the random from stream nodes. Those bytes are what you want to replicate instead rather than replicating individual values.

meager spade
#

so like i said

#

seeded random

sinful tree
#

yea

dark edge
#

We have some mechanics for guaranteeing or forcing mods but I had thought about just replicating the seed

meager spade
#

pass in overrides?

sinful tree
#

You can reserve bytes in the stream for forcing specific values.

meager spade
#

and just overrides

#

can do whatever

dark edge
#

Is there an ongoing cost to replicating a decent sized struct if it's never changing?

meager spade
#

how big is decent size

#

you really want as much data locally

dark edge
#

Like 10-20 fields. Not finished.

meager spade
#

and rep as little as possible

dark edge
#

But it only ever changes that generation or modification. It's not like stuff's changing every frame or even every minute

sinful tree
#

Are you also sending over item name in your struct?

dark edge
#

Name is derived but basically the struct looks like
Actor class
Item level
Item rarity
Mod list
Mod levels
And a few more small fields

#

So my actor class is acting a bit like a data asset

#

That'd be like the Base Item in PoE

viscid monolith
#

Actually, how heavy is it to replicate UObjects?

kindred widget
#

I'd personally say that you should not solidly set the data of items on even procedural items. You should have a static data asset of item defaults. What actually gets saved is a percentage or integer count of how offset the stats on the item are from the default. This allows very easy future balancing, and much easier item stats. When you generate the item, you wouldn't actually generate actual stats, but the stat offsets from the default.

dark edge
kindred widget
#

Otherwise you end up with stuff like original diablo where some items were godly, and people were duping them from older patches because they were nerfed for new spawns but older versions were still better.

meager spade
#

yeah this ^

#

you will hit balancing issues

dark edge
#

Yeah we don't save or replicate the final value, just base item, modifications, and the randomly rolled levels

#

Rarity = number of mods

meager spade
#

what if that base value is say 100

#

and you reduced the max it can be to 90

#

people with the 100 version will have a OP item

dark edge
#

Base value is defined in the class ref

meager spade
#

as long as you have ways to balance its all good.

#

and rebalance already given items

dark edge
#

Yeah I can see how data asset vs using a BP class as data could make sense. The main problem is we don't really have that many bases that are functionally identical. They all can very pretty wildly. Although we are moving back toward using gas so it might end up just all being data

#

If all the final numbers live in the ability system component and all the rest of an item definition is data then no reason to have BPs

#

Item def would morph to being a mesh, some data for equip slot, an on equip GE, and abilities

#

Plus mods but they'd be GASified too

peak sentinel
#

How do you guys sync local (and predicted) ammo variable on server-triggered reload event?

#

My guns fire too frequent and client consume a local ammo variable, but I'm not able to sync with the replicated ammo variable with ShooterGame's reload logic

#

I have some ideas I tested and working well but I'm not sure if they are the best way

#

Though I remember I solved this a few months ago but I had a VCS disaster and I forgot how I did it completely ๐Ÿ˜‚

rancid flame
#

I want to expose a replicated variable in PlayerState, but I only want players who own it to be able to change it, how would I go about doing that?
The code that changes it still has to occur on the server right, through UFUNCTION(Reliable, Server) function?

lost inlet
#

yes

#

and only the owning client can call server RPCs

#

the relevant player controller should already own the player state

rancid flame
#

Oh riiight ownership. Sorry I am still learning this stuff.
So by default there shouldn't really be any way for other players to be able to call server RPC functions on other player states?

lost inlet
#

no because they don't own that actor

modern cipher
modern cipher
kindred widget
#

Never said anything about client sending the server anything.

modern cipher
#

what does it mean client have 100 base value and server has 90

kindred widget
#

You're quoting numbers from Kaos, and even he didn't say anything about client or server.

dark edge
#

But it's sorted

lusty sky
#

I think you shouldn't let players join the game if they are missing updates XD
check your assets versions

modern cipher
sinful tree
# modern cipher so Kaos gave an example of changing item stats right? how can that affect a clie...

The idea being if you stored the determined values of rolls (example say you rolled critical chance as 10%) then you have no way of really re-balancing that item's roll. It's set that the item has critical chance as 10%. If you stored the roll as a value, say between 0-100, then you can reassign what that value stands for. Eg. 100 can == 10% or during a rebalance, 100 == 8%, all without having to change the items that exist already.

dark edge
#

So basically you just store the item based data asset and the rolls or even just the seed.

#

So if you make any balance changes, the derived items will adjust

#

I would actually probably want to save the specific modifiers and not the roles or seeds, it would suck to rebalance the modifier rarity and load the game and your items are all completely different

#

This is a rogue like so I don't need to think two super long-term. But we do have item storage between runs. So all items are eventually disposable, but they are not tied to a specific run

viscid monolith
#

How would i spawn an actor on listen-server, so it won't be visible for listen-server itself, but everybody other will see it?

dark edge
#

You could modify its behavior for the server itself but it would definitely have to exist if it is a replicated actor meant to be kept in sync. Unless you do some shenanigans with rpcs but that's a different story

viscid monolith
#

Yeahy, but if i hide actor, it will become hidden for all clients

#

Maybe i could use not replicated actor and just NetMulticast it to be shown for every client? Im making weapon equipment

sinful tree
kindred widget
#

HiddenInGame is not replicated. Visibility is. Just spawn it on the server and set HiddenInGame True right after spawning.

viscid monolith
#

Im writing in c++. Doesn't work

dark edge
#

Does visibility false cull replication or does it still do that behind the scenes

viscid monolith
#

I figured out that SetVisibility for Root Component hides actor ONLY for server, but not for CLIENTS in my case. And SetHiddenInGame hides actor on CLIENT, but if called on SERVER, it hides actor for each CLIENT too.

rocky kestrel
#

How to make this happen to clients also? It is in Gamemode. Currently only add widget to server.

lost inlet
#

by using something that's also on the client

#

you can likely use the game state or player controller to send an RPC to show the widget

rocky kestrel
#

Okay!

lost inlet
#

game modes are server only

pine sage
#

Hello ... Is that supposed to be normal to have 2 clients with exactly the same controller when simulating 2 clients ?

twin juniper
#

Can I check via BP if my client is listening/hosted?

viscid monolith
#

Are there any good tutorials on how to make FPS games? I can't get weapon equipment to work, because i need weapon and character meshes to be different if IsLocalControlled()

verbal tendon
viscid monolith
#

Im very sorry for being so annoying, but what do you think about this idea: What if i would make Player Skeletal Mesh(bOwnerNoSee = true), attach ThirdPerson Static Mesh(bOwnerNoSee = true) to it, and then attach First Person Skeletal Mesh(bOnlyOwnerSee = true) to camera and just change meshes when weapon gets equipped or unequipped

#

Like this

verbal tendon
#

Not annoying at all. It's very reasonable to have a separate local mesh for FPS compared to the world weapons that everyone else sees

#

gotta be careful to not replicate them in case you're making a ListenServer game

#

among other things that you'll stumble upon over time with visibility

#

For the first person things you can use SetOnlyOwnerSee but beware if you ever wanted to change camera ( Example: death/spectator vision ) and you haven't destroyed those FPS actors, they will now become visible when you dont want them to, if you handle the logic in a certain way

#

And rather than setting those settings on your weapon mesh in the editor. I would recommend you make utility C++ functions for handling visibility. There will be more than just your weapon, you'll also have the arms mesh, and potentially other things you will want to spawn for gameplay

#

So it's good to have all that functionality of properly settings the right things from code in one place

#

And you just call that code on BeginPlay for meshes that you have added from the editor, versus calling it at runtime when you spawn new meshes

#

@viscid monolith

viscid monolith
#

Great, thanks very much!!!

sinful tree
twin juniper
verbal tendon
#

if( IsDedicatedServer() ) ... ( DedicatedServer )

else if( IsServer() ) ... ( ListenServer )

else ... ( Client )

#

Apply to blueprint

#

to do whatever you want for the 3 different types

twin juniper
#

no luck, gonna try with packaged

verbal tendon
#

depends on what you have selected as your option for running when clicking Play for PIE

lost inlet
#

IsServer() && IsDedicatedServer() is redundant

dark edge
#

What does standalone return for Is Server?

dark edge
verbal tendon
#

Because on standalone every PIE instance is the Server

lost inlet
#

so NM_Standalone (singleplayer) is true

verbal tendon
lost inlet
#

???

verbal tendon
#

If the concept of dedicated/listen server/standalone aren't grasped, just checking the return value isn't helpful

#

I'd be like memorizing that 2+2=4 without understanding why, shitty example I know, please forgive, it's been a long day

dark edge
#

Basically you are always server unless you are a client.

verbal tendon
#

Understanding why something is, is what fuels learning

lost inlet
#

not sure why you're trying to explain to me

twin juniper
#

Basically I need to know if my client already started listening or not

#

but if it returns true if there is no connection then useless

lost inlet
#

World->GetNetMode() will be NM_ListenServer if you're a player hosting a listen server

#

NM_DedicatedServer for a headless server

verbal tendon
#

( sorry I gotta go for a bit, but do elaborate so someone can get you the info you need )

#

In PIE:
Standalone: your instance is the gameplay client & the authorative server
ListenServer: your instance is the client, the editor runs a dedicated server in the background

The IsServer/IsDedicatedServer functions check for the type of setup you have, not whether or not there are connections

twin juniper
#

u can make your client listening by typing into console: open mymap?listen

#

I need to know if that thing were being typed

#

is GameInstance server only?

sinful tree
# twin juniper is GameInstance server only?

No. Game instance exists on every copy of your game, however, they are only accessible to the local game - ie. the server cannot access the game instance of a client directly.

twin juniper
#

amazing that's what I need then

#

I can set a bool if that would tell me if the local was made to listen

#

thank you

ocean geyser
#

alrighty im having a replication issue. heres my struct

USTRUCT(BlueprintType)
struct FTimedRun
{
    GENERATED_BODY()
    UPROPERTY(BlueprintReadOnly)
    int32 PlayerNameIndex = 0;
    UPROPERTY(BlueprintReadOnly)
    float Time = -1.0f;
};

i have this struct in a TArray on another class

UPROPERTY(ReplicatedUsing = OnRep_StageRunTimes)
TArray<FTimedRun> StageRunTimes;
UFUNCTION()
void OnRep_StageRunTimes();

what im doing for testing is i start a listen server without the client connected and i do 2 runs (in the screenshots they are element 2 and 1) which adds 2 elements to the array. then i connect with the client, and the server does 1 more run (shows as element 0 in the array in the screenshots). i place a breakpoint in the debugger at the start of the OnRep function to see what StageRunTimes looks like after those 3 runs on the server and client. the server is the first picture showing everything correct with all the PlayerNameIndex at 2569 and the correct Times. the client in the second picture shows player name index 0 for elements 0 and 1 (these would be the last 2 runs as i am shifting the array down one with each run so the latest run is always element 0, but it shows the correct time. now the other weird part is if i do a fourth run on the server (third screenshot), it shows the correct PlayerNameIndex for the run with a time of 0.616674423 (element 1 in the first two screenshots and now element 2 in the third screenshot because again i am shifting the elements 1 to the right with each run). its like my struct is replicating just the time and sometimes the PlayerNameIndex instead of both. if i connect the client to the server before doing any runs, and then have the server do a bunch of runs then everything on the client is correct as well. it seems however many runs i do before the client connects is how many runs behind the client is for replication as it does not want to get the PlayerNameIndex for some odd reason

maiden abyss
#

Looking for a resource or a tip on how to differentiate between players. Lets say I have 2 players. player 1 spawns a unit and can select and control it. How do I stop player 2 from being able to select and control it? I basically just need to know the best way to set up item ownership and have that save and be persistent between saves/loads and reconnects.

ocean geyser
chrome bay
#

Assign an owning player state to the unit, don't accept commands from others

#

The Player State is how you identify a player in network games.

winged badger
#

as seamless travel persists all controllers that have a PlayerState

twin juniper
#

Looking for some help on Replication

kindred widget
#

@maiden abyss Unit should probably just have an array or a single property of a pointer to playerstate(s). Pointers are cheap. Can replicate the array/property. Local ui can use that array to detect if they're allowed to control it, local control functions can use that to detect if they're allowed to RPC. Then server can also check that before doing any AI stuff.

twin juniper
#

Specifically getting a client to "Run on Server"

#

Using the "I watched a youtube video on replication" base

#

It either runs a multicast:

#

Or if a client, runs on server which will then multicast

#

If run on server, works perfectly

#

If run on client, doesn't run the "Set Role Server" event

#

The actor is set to replicate and always be relevant

bitter oriole
#

Probably that actor is not client-owned

#

As in it's not a player controller, character, player state, or owned by either

#

This prevents server calls entirely

twin juniper
#

Should this fix it?

#

or is the problem now that Player Index 0 is still the server?

bitter oriole
#

If you run it on the server for the player that will be calling those events, sure

twin juniper
#

Hm, problem is that I want clients to be able to run it

#

But none of them to strictly "own" it

bitter oriole
#

That's a common design problem

#

The only solution is to move those events to a player-owned class

#

usually Pawn (character)

twin juniper
#

So there's no way to get an actor to "Run on Server" without it being owned by a player controller?

chrome bay
#

There is not

#

You can't call Server RPC's on an actor you don't own, that's just a fundamental design feature of the engine

#

So you have to workaround it

twin juniper
#

Hm okay, thank you

twin juniper
#

How does player controller ID work

#

both my client and server seem to have an ID of 0

twin juniper
chrome bay
#

It's just a counter that identifies the controller within that local game instance

verbal tendon
# twin juniper both my client and server seem to have an ID of 0

If by client and server you mean a Client and ListenServer, then each player on that instance will have their playercontroller ID be "0", because that's the local one. However the listenServer will also have an additional 1 for the Client's controller on the server side

#

As each game client has the local controller, but the server also has the controllers of everyone. So a dedicated server would have the controllers of everyone but not one of its own

twin juniper
#

I made the wrong assumption about controller IDs

#

Where I'm at currently is that I set ownership of the actor to whoever calls the "Update Role" event

#

but even then, with the actor being owned by the player calling the event, I can't get it to execute a "Run on Server" event

verbal tendon
#

You can only RunOnServer from a client-owned actor

#

that means if you're trying to call "UpdateRole" on Actor1 owned by Player1, from Player2 because you want to give it to Player2 - that doesn't work

#

Actions need to originate from owned clients, and affect other things, not the other way around. You gotta adapt your thinking on that front when working with UE

twin juniper
#

Just a bit stuck on how to tackle my specific problem

verbal tendon
#

break down the problem into steps.
Step1 make something callable that you get to work with RunOnServer from client

twin juniper
#

I've got 16 "House" actors, each house has a "Role" variable, I want any player to be able to update a houses role

verbal tendon
#

Step2 transform your workign example into something that solves your problem

#

And if you cant, figure out where you went wrong and try again

#

Then on any player ( client-owned actor, like the character ) you can have an "UpdateHouseRole( AHouse* ) [RunOnServer]"

twin juniper
#

Ah

verbal tendon
#

Assuming the houses are replicated

twin juniper
#

I'm dumping all logic into "House" actor

verbal tendon
#

Yes, that won't work

twin juniper
#

I set everything up to run standalone

#

using public functions called by other actors

verbal tendon
#

Yeah that's the first mistake

#

I can advise playing as client ( cough making your game )

#

Later once you have more experience playing with ListenServer and 2 instances

twin juniper
#

Okay I'm going to tinker and apply what you said

#

thank you ๐Ÿ™‚

hallow sand
#

Anyone using Steam Advanced Sessions plugin have "Join Session" from friends list working? Having some trouble where it doesn't actually join the game.

keen surge
#

UE4.27?

#

@hallow sand

twin juniper
#

I've moved all of this over to Player Controller

#

And now when client tries to change role it changes it correctly for all clients and server

#

however if server tries to change role it only updates for the server

#

I'm confused as it should be doing a multicast to all clients to set role?

#

@verbal tendon

verbal tendon
#

general pattern for such things:

#

(1) regardless of whether owning-client or server calls it, have one that is as "RunOnServer"
(2) Have the RunOnServer one call a Multicast event

#

no authority check involved

#

that pattern guarantees the right things happen

twin juniper
#

Actually, if run on client it only updates that client and server

#

no other clients

verbal tendon
#

Follow the pattern I described above

#

so SetHouseRole needs to be [RunOnServer]. Then that needs to call a MultiCast to all clients ( from server ), because it runs in RunOnServer, and then will then run everywhere

#

You currently have 3 events, you need 2 for the pattern to work

#

Keeping in mind that based on the networking needs of your project and this being a game world setting, that's maybe not HOW you want to set it up

#

That's context and information you havent shared. You might want to do a RunOnServer RPC for the action, and then handle the rest behind a replicated variable and OnRep functionality

#

However what I've described above works, and you need to experiment a little to get a grip on the networking side of things anway ๐Ÿ™‚

twin juniper
#

Is this what you meant?

verbal tendon
#

Custom1 need to be multicast, and yes

#

Client Or Server calling the RunOnServer event, guarantees that the logic is executed on the server, assuming you call it from server/owning client actor

#

then the server executes the multicast to run the logic you want executed on all clients

verbal tendon
twin juniper
#

yep makes perfect sense, just on a call then I'll test it ๐Ÿ™‚

#

Still running into the same issue

#

when done on server - only executes on server

#

when done on client - executes on client and server

#

Going to see if it's a problem with how I'm calling it

hallow sand
twin juniper
#

If a Widget cannot be replicated why can I set its variables to replicated? Will that do anything?

#

ofc

rough kestrel
#

for some reason my game mode spawns a camera actor instead of my specified pawn. Any reasons why?

twin juniper
#

In my case it wouldn't matter. I have a name plate above actors, that needs to be replicated obviously.

#

ye thanks

winged badger
#

prefers attaching the PS to its Pawn and have it handle the name display

twin juniper
#

Hmm why widget Get Owning Player always returns the local PlayerController even if it was called from a widget of a replicated actor?

dark edge
#

I don't know why it would return the local player controller instead of nothing but it certainly wouldn't return another player unless you are the server. Whatever you're trying to do with this, it sounds smelly

twin juniper
#

There is a Widget component on each player's actor meaning there are other instances of that widget for each players on every client

kindred widget
rocky kestrel
#

I have problem with Ui and server.

#

This creates Ui inside player pawn

#

This spawns character from controller

#

This calls spawn character event in game mode

#

When start game everything else work but server doesnt have ui

verbal tendon
#

Becaue you've shown us the nodes that create the widget, but not from where they're being executed, and that's the part you're having a problem with

rocky kestrel
#

create widget is executed beginplay in pawn

kindred widget
#

Try with a single frame delay. Some of that stuff has terrible race conditions on listenserver.

verbal tendon
rocky kestrel
#

@verbal tendon in player controller (second image)

#

@kindred widgetOkay I try

verbal tendon
#

I wouldn't advocate adding delays to solve problems, because then you don't understand what#s not going wrong

#

you're just hiding the problem

kindred widget
#

Pawn's beginplay is likely running before possession is setting that it is locally controlled.

rocky kestrel
#

@kindred widgetNow its working!

verbal tendon
verbal tendon
rocky kestrel
#

I added little delay before beginplay in pawn

#

Okay!

verbal tendon
#

knowing where your ordering issues are and explicitly solving them is better, imo

rocky kestrel
#

thank you

verbal tendon
#

Because this is likely not the last time you'll run into an ordering/dependency issue, so as long as you explicitly solve them everytime, you can shuffle them around when needbe

kindred widget
#

Not sure how that function after spawning is going to fix that on clients.

#

Realistically in Blueprints there is no good fix for this. There are no decent hooks post possession for server and client in blueprint.

kindred widget
#

Yeah. And if that was the only condition an init functiona after spawning is fine. But again, client.

#

Restart or Set Pawn virtual functions in C++ are a great place to inform HUD that possession has happened for event driven. The only decent way to handle this issue in blueprints only is a client only tick in HUD for the locally possessed pawn and switching logic calls when it changes.

twin juniper
#

:/

spring vortex
#

I have a struct array what I need to Set Array Element using the server, but if I run it on server it doesn't set the array element. Debugging shows that it goes through the entire step it just doesn't actually set it. It works fine if I don't have the server set it, but I really need the server to set so the client and server have accurate data. Any ideas? Is this a known bug?

spring vortex
#

It is

dark edge
#

Show your setup

spring vortex
dark edge
#

The passing of that array over looks a little sus

spring vortex
#

That could be it, but if I bypass the server event and do a direct call on that function it works for the server, just not for the client obviously

dark edge
#

How many arrays live in the inventory component?

spring vortex
#

3

dark edge
#

Being what?

#

Stored items, ???, ???

spring vortex
#

They're all the same struct, but yes stored item. Specifically Pockets, Backpack, Equipment

dark edge
#

I would either have 3 inventory components OR have some designator of which array to hit, like an enum or name or int.

#

Them have your event just take name/enum/int, index, amount

spring vortex
#

Before the event is called there is a switch on enum the pulls the correct array

dark edge
#

Pass that enum over.

spring vortex
#

Okay I'll give it a shot

rancid flame
#

I'm trying to let players pick up a box in a v simple way, by calling BoxActor->AttachToActor(PlayerCharacter)
From the ListenClient server/host perspective, it's happening fine, but from the client's perspective, the box is still stuck on the ground.
I'm calling the above code in a UFUNCTION(Server,Reliable) function inside a component owned by the client...
Any ideas? :S

#

OK I'm a big doody brain, I hadn't set Replicates to true on the BoxActor

verbal tendon
peak sentinel
#

If it's not intentional, it might not be the best solution for attaching

spring vortex
# dark edge Pass that enum over.

Unfortunately it makes no difference. It is pulling the correct array either way I do it, it just will not set the array element when explicitly called on server.

dark edge
spring vortex
#

Yep, I can set an empty one with something new, but I cannot change one that has data it in it seems. Only when it is explicitly called by the server. Just a normal unreplicated event and it does work.

#

Hold the phone, it did work replicated

rich locust
#

can I use "Get All actors of class" or interface etc. on client-side where player is out of bounds and still get a reference ?
Edit: It seems it doesnt work from what I gathered online, sadly

spring vortex
#

@dark edge I got it, thanks for the help

dark edge
#

Lmao we're you looking at an old copy or something?

spring vortex
#

No, I changed it back to a direct call to the function, then ran the set element part on the server

#

Using your suggestion of setting and removing on a delay triggered on begin play confirmed that there something wrong with how I was calling it

shut gyro
#

Hello, I was wondering if anyone was able to successfully able to debug their shipping configuration mode in Steam through Rider?

tranquil yoke
#

Is there some steps to correctly disconnect from server ?

#

I get this RestartHandshake Issue, can i remove the clients from server correctly

true grotto
#

Hi there! I have a problem with custom spawning of players. I'm using this function however the controllers are not inhabiting the Pawn. (It's GameMode)

void AKT_BaseGameMode::SpawnPlayers()
{
    for (int LPlayerIndex = 0; LPlayerIndex < MaxPlayerCount; LPlayerIndex ++)
    {
        for (auto LPayerStart : PlayerStartArray)
        {
            if(LPayerStart->PlayerStartTag == FName(FString::FromInt(LPlayerIndex)))
            {
                const FTransform LSpawnTransform = LPayerStart->GetActorTransform();
                const FActorSpawnParameters LSpawnInfo;
                
                UGameplayStatics::CreatePlayer(GetWorld(), LPlayerIndex);
                AKT_PlayerCharacter* LPawn = GetWorld()->SpawnActor<AKT_PlayerCharacter>(DefaultCharacterClass, LSpawnTransform.GetLocation(), LSpawnTransform.GetRotation().Rotator(), LSpawnInfo);
                
                if (IsValid(LPawn) && UGameplayStatics::GetPlayerController(GetWorld(), LPlayerIndex))
                {
                    UGameplayStatics::GetPlayerController(GetWorld(), LPlayerIndex)->Possess(LPawn);
                    Players.AddUnique(LPawn);
                }
            }
        }
    }
}

Pawns is spawned and pointers is valid. I have this exception, but I don't understand why it is being raised.

#

Maybe someone knows what my problem is?

lost inlet
#

oh god the rider debugging experience

#

not sure why you would call CreatePlayer like that

#

do you have engine symbols installed?

true grotto
#

Are those that weigh 32 gigabytes?

#

for debugging

lost inlet
#

yes but it'll give you a readable callstack

#

but I do find your code a bit weird

true grotto
#

What is strange?

lost inlet
#

the call to CreatePlayer for one

true grotto
#

I'm doing this first time

hollow eagle
#

using a custom "spawn players" function for another

lost inlet
#

yeah, the engine has a lot of this in the game mode framework already

#

you can override the spawning behaviour

#

to say, spawn a specific player at a specific player start

true grotto
#

what function to use for this?

lost inlet
#

would be good candidates to override

#

BlueprintNativeEvent so a virtual function is declared with the _Implementation suffix

true grotto
#

i.e. should I just use my code to select the spawn location in this function or does the function already have this code?

lost inlet
#

please look at GameModeBase.h and search for "spawning"

#

and look through how the base game mode handles this

#

it'll probably give you some idea on how you want to override the behaviour

true grotto
#

Ok, thanks for the help

verbal tendon
#

Yeah I would strongly advise against doing all those custom calls. Not only can it be buggy, also you lock yourself into something, and if you ever want to upgrade and then engine changes the way it does these things, you're gonna have bugs again. Best is to have as few calls to the underlying engine code as possible to get the custom behavior you need. The optimal amount of engine functions to call for this is one.

If you ever need to call more than one engine function to do a very specific thing, you gotta stop, take a moment and think. You're probably doing something wrong.

#

Mileage may vary, but that's a general good rule of thumb to live by.

grave warren
#

I have a large level divided in tiles... All the tiles are list of actors/BP stored as list in save file that load at runtime..

It is an adroid game so the player might not have all packages of the level at runtime and it downloads them during the game..

The server loads all the packages during initialisation, hence all the tile actors and bp have already been loaded on the server.

We want the client to load a few tiles and connect with server (the tiles actor spawns bp, which need to be replica of server)... As the player moves the tiles on the client can unload or load.. but keep on replication with the server...

Any idea on how to do it??

#

I have tried using replicated actors and replication graph.. but I am not able to delete client objects once the player moves from that tile...

#

I tried to dynamically create level for each tile and add them to level streaming.. but I am facing issues.. and not sure if this is the correct method...

#

I tried just loading the tiles and spawning bp on client side as the player comes to the tile.. but that creates a duplicate on the client and the bp are then not replicated..

#

By replicated I mean if there is a button and that starts a light on server for all players to see, and I spawn the button and light bp.. then it does not show in all players...

twin juniper
#

In which function are you guys giving weapons to your player (i mean default items at first spawn), i'm actually do it at OnPossess but i think it's might be too late to do it ๐Ÿค”

kindred widget
#

Personally I like PostInitializeComponents. Has time to set state before Beginplay is ran.

dark edge
#

Well. The inventory is set on spawn, equipped on begin play

kindred widget
#

My beginplay mostly just calls same calls that state onreps do.

twin juniper
dark edge
#

Ya that's what we do. Equipment is a state for us.

twin juniper
kindred widget
#

I update my hud from character destruct and PawnClientRestart.

twin juniper
#

i was used to spawn it in onrep_playerstate but was not accurate since post init components was called before

#

ClientSetHUD is called by gamemode if i'm remember well so it's pretty good to spawn ur hud there so you can do all stuff like init quickbar hud etc before pawn is possessed (depends on how u're managing all of that)

#

Is there a reason why my widgets are not working on a replicated actor?

#

I don't want to replicate the widgets, just to have them function locally on a replicated actor

twin juniper
#

When clicked, the button depresses as if being clicked

#

However the print function doesn't run

#

Widgets exist Widget Components on a replicated Actor in the world

short arrow
#

Widgets do not replicate?

bitter oriole
#

They shouldn't

short arrow
#

Last I checked widgets do not replicate at all

#

But I've never tried a component

twin juniper
#

Are other player controllers present on the client or just only in the server?

bitter oriole
#

Only on the server and the owning client

twin juniper
#

oh ok

#

So I can rewrite my logic for the third time xd

#

A doc would be good to have how base classes are behave on replication, but too late now

chrome bay
#

Second-Top pin in this channel

twin juniper
#

Good to know, thanks!

twin juniper
#

@verbal tendon FYI restarting the editor fixed my problems yesterday, I've also moved to using replicated variables as all I'm doing is changing variables. Thank you for your help yesterday ๐Ÿ™‚

verbal tendon
polar lotus
#

Hey all, I've been developing a TP multiplayer shooter for some time now, and it hadn't donned on me that I need an actual playerbase and community for the thing to, y'know, survive. I've been too focused on actually programming it and had fun while doing it to realize my reality. It's designed with 2-10 player listen server MP in mind

#

From what I've seen, the best course of action is to probably add some decent singleplayer gameplay, which I can do, but does anyone have any advice or anything I should know while going this route?

#

Because the game was built on the idea of 2+ player multiplayer

verbal tendon
# polar lotus Because the game was built on the idea of 2+ player multiplayer

I think this might be a little beyond what this channel is supposed to help with. You've got to dabble into community development, marketing, etc... if you have nobody else helping you with this. I'd suggest finding a publisher for your game, that can help and manage that aspect, and most importantly has experience with it

dark edge
#

@polar lotus We realized the same thing. Turned our PvP top down shooter into a Coop roguelike

verbal tendon
#

I'm working on a Co-op shooter myself. Not only is it easier to market because you're not competing with the big names directly - organic marketing is easier and you also need much less critical mass to sustain the multiplayer part of the game

polar lotus
eternal canyon
#

Than single player should work just fine

polar lotus
#

Yep

#

Usually issues arise when doing the opposite

eternal canyon
polar lotus
#

Multiplayer netcode works fine in singleplayer, but I've now been tasked with making a game that's multiplayer at heart into a singleplayer game

#

The programming isn't the hard part, it's actually making a fun singleplayer

verbal tendon
#

Don't forget to stress that if the game's design is pivoting, the release schedules and the project planning needs to as well, you're gonna need new time for iteration and testing that was spent for the old core gameloop

polar lotus
#

Mind you this isn't a project with hard deadline, it's just me solo dev'ing a side project that I'm taking semi-seriously

verbal tendon
#

Alright ๐Ÿ™‚

polar lotus
#

Because I've been working on it for a few years now

verbal tendon
#

I mean I have an abundant supply of game development horror stories that reinforce the fact that this pretty logical idea is not a given in many places

#

So I sent warning ๐Ÿ˜›

polar lotus
#

What do you mean?

obsidian cargo
#

"it's agile development"

#

It's actually predatory company practices that lead to crunch and negative health effects for employees

verbal tendon
# polar lotus What do you mean?

Sorry gotta go for a bit, plenty of horror stories around project management. I thought you might be workign in a team, but working alone it's not that much of an issues except for your own expectation management

eternal canyon
#

Oh wait ur talking more game design

#

Never mind

hoary lark
#

cries in "press both buttons on opposite sides of the room at the same time to unlock this door"

dark edge
dark edge
#

I wouldn't want to make a generic shooter in any year. You gotta do something unique.

eternal canyon
#

Sadge

polar lotus
#

I have some ideas on how that could work in singleplayer but I'm still figuring it out

lusty sky
lusty sky
modern cipher
#

well you never know

#

its like a gamble

#

xD

dark edge
#

needs critical mass to succeed

lusty sky
#

what you mean critical mass ?

polar lotus
#

many people

lusty sky
#

well unreal is capable of 100 players tops with some serious optimization in replicating stuff

#

otherwise you have to find another custom solution

polar lotus
#

๐Ÿคฆโ€โ™‚๏ธ

polar lotus
lusty sky
#

i meant players online in a game match

polar lotus
#

That's not what we're talking about tho

lusty sky
#

you can publish on steam and advertise what you mean?

polar lotus
#

That's never enough

#

So many indie multiplayer shooters have failed

lusty sky
#

Valorant might have failed too but riot spent millions in ads everywhere

polar lotus
#

indie

modern cipher
#

bruh what did you expect 10k games every year

#

it will never go down xD

dark edge
#

Launching a multiplayer only title as your first just sounds like a failure in the making.

#

I prototyped a couple multiplayer only titles and yeah I'm not going to touch them because they don't really have legs by themselves.

polar lotus
#

and that's what donned on me today

dark edge
#

For a 10 vs 10 game to pretty much always have a match starting, my napkin math says you'll need to sell several thousand copies.

#

How you gonna do that if nobody is online. It'll just fizzle unless you have some real marketing behind it.

polar lotus
#

Yep

bitter oriole
#

Which isn't realistic

modern cipher
dark edge
#

A million sales has happened but if you're a indie nobody, it's not going to all happen at once. The dream is for your game to do like three sales, and then turn into 10 and then turn into 100 and then turn into 1000 and then turn into a million. If the first 10 have a bad time, you fizzle.

bitter oriole
#

PUBG was a lifetime ago and had a publisher

dark edge
#

And it was by a guy that made a very popular mod, that's why it is called playerunknowns

modern cipher
#

but he was not a game dev

dark edge
#

It had some cachet before launch

bitter oriole
#

The very safe assumption about your game is 3 online players lifetime max

#

Plan for that

dark edge
bitter oriole
#

Minecraft, PUBG, Among Us etc got massive successes by somehow launching what everyone wanted to play but didn't know

#

PUBG is likely the only one where even the devs knew it'd work

lusty sky
#

among us was actually released in 2018 and it became a hit recently like a year ago which is kinda weird

bitter oriole
#

Yeah it's ridiculous

#

It's why planning for success is dumb - plan for 200 sales, 7 Steam reviews and 3 online players

#

It's very realistic for a first game

#

If you get there for your first game it's arguably a success

dark edge
#

And Minecraft has staying power single player. When I bought it, it didn't even have multiplayer. It wasn't even infinite, just an island lmao

modern cipher
#

everyone is dreaming about success for his first game ๐Ÿ˜†

bitter oriole
#

That's fair, but success should be defined as 1000 sales

modern cipher
#

and if you are lucky 100k lmfao

dark edge
#

You should at least give yourself all the chances possible to succeed. If it's multiplayer only, you are gimping yourself unless you have an incredibly compelling design and a ravenous fan base ready for it. Prismatica is going to do great, even if it's only multiplayer, because they are marketing already and have a very compelling product.

lusty sky
#

We should probably move to making mobile games and rely on ads revenue BidenLaugh

bitter oriole
#

An actual indie success in 2021 is something like Industries of Titan with 50k saless

#

That's Steam best seller sales there

meager spade
#

how can you see how many copies a game has sold

#

on steam

dark edge
bitter oriole
dark edge
# meager spade on steam

You used to be able to with steam spy but people have made some correlations with reviews. It's rough but it'll get you within an order of magnitude typically

bitter oriole
#

Fairly accurate stuff all things considered

#

Steam Spy also has a range that in my experience is about one zero close

meager spade
#

we have 2k reviews lol

bitter oriole
#

Sounds like a 100k units title to me give or take 50k

modern cipher
#

how do you know if they didnt refund ? or they cant after leaving review?

bitter oriole
#

You don't, it's just a rough estimate of the magnitude of success

#

A game with 2K reviews is unlikely to have 20k sales or 500k

#

20k would mean 10% of every single buyer ever took the time to leave a review, 500 would mean not even 1% did

#

Both are possible but not realistic

#

The median is something like 1/60 IIRC

polar lotus
#

This isn't my first project, but it is my first big project

#

I've done a handful of gamejams before

bitter oriole
#

Shipping a completed game that 100 people buy is honestly a success

meager spade
#

PvP games is also hard, as you need dedicated servers

polar lotus
#

I'm doing listen servers

meager spade
#

Co-op/single player games can run on listen servers.

polar lotus
#

So p2p

meager spade
#

listenserver != p2p ๐Ÿ˜›

polar lotus
#

Really?

#

That's what EOS calls it

#

And every steamworks dev I've talked to

lime ledge
#

Technically one of your players is the server

hollow eagle
#

They have a P2P socket interface, but the game itself is not using P2P when running as a listen server.

polar lotus
#

I mean yeah

hollow eagle
#

A client/server setup is inherently not P2P, but it can operate over a P2P transport. Different layers can operate in different ways.

polar lotus
#

It's not actually p2p but the idea is that the players talk to each other and there's no central server you're paying for

hollow eagle
#

Right, just don't call it p2p because that's a very specific thing that isn't supported by default in unreal. It's a listen server.

polar lotus
#

Got it

meager spade
#

players don't talk to each other, true p2p players do talk to each other, listen server players talk to 1 player who is the server (correct me if i am wrong)

polar lotus
#

semantics

hollow eagle
#

It matters - they're entirely different networking models.

lusty sky
#

players talking to each other is a cheating party

#

wtf xD

polar lotus
#

No not that, I'm just bad at calling stuff the right names

#

Aaaaanyway, my game does listen server MP

meager spade
#

as long as its not PvP, its good ๐Ÿ™‚

polar lotus
#

Well, it is pvp, but after talking here earlier today it's no longer going to be.

#

Well sort of, I'll still give players the ability to do pvp, but I'll have to pivot over to some good singleplayer gameplay

lime ledge
#

I think it kind of depends on what you want to achieve with the game. Generally yeah, you do not want to do PvP from a listen server, but I think it can be ok to do in certain circumstances. For example if it doesn't matter if people cheat in your game, and you don't mind the server player having an inherent advantage. For example if game sessions are invite only with friends, like a party game or something maybe its ok... If one of your friends is a cheater you would maybe consider not playing with them :P. But, if you were planning on having matchmaking with random people, or anything of a competitive nature, then I would use dedicated.

dark edge
#

Yeah we're using listen for coop and will use dedicated for PvP if it gets that far.

#

It's a permadeath game so the PvP has to be decently secure

#

Probably will just have all gameplay happen on dedicated for PvP ladder but that's a long ways out.

polar lotus
lime ledge
#

Of course, I am saying it is fine if you know what you are getting ๐Ÿ™‚

polar lotus
#

Yeah mine's mostly designed to play with friends, which is kinda where the idea stemmed from

#

I still like the idea of just hopping in a random match from a public listen server browser and going ham, then again I need an actual playerbase for that ๐Ÿ™‚

dark edge
lime ledge
#

Sounds fun ๐Ÿ™‚ But yeah, as others have pointed out, if you are playing with random internet people, and your game becomes popular, people will cheat for sure if they can.

dawn ledge
#

How should I implement a race-start countdown in a multiplayer setting, to release control to all players when the countdown finishes? Would a reliable multicast RPC from the gamestate be good enough?

dark edge
#

That's tricky. Are the cars predicted locally?

dawn ledge
#

I am using the character movement component right now, I believe it does right?

dark edge
#

Like if I hit the gas, does it respond instantly or does it respond after ping milliseconds

#

Yeah the CMC is predicted

#

I would just replicate the time and if they have bad ping, f*** em

polar lotus
#

If it does, then maybe I can justify licensing some anti cheat and possibly dedicated servers, but that's a few orders of magnitude out of the ballpark right now

polar lotus
#

It's a problem I would love to have

verbal tendon
tranquil yoke
#

Is there any documentation on life cycle, from which i can understand which class gets created in which order. need to understand about GameMode, GameState, PlayerState.

eternal canyon
dark edge
# tranquil yoke Is there any documentation on life cycle, from which i can understand which clas...

What happens when you start up your Unreal Engine game? This video is a guided tour of the Engine's initialization process: along the way, we'll glimpse the high-level structure of the Engine (modules, game instances, local players, and viewports) and we'll see how all the different parts of the Game Framework (game modes, game states, player co...

โ–ถ Play video
#

That is good.

tranquil yoke
#

Thanks

hoary lark
verbal tendon
hoary lark
#

ok, well you're wrong, but i guess you're not going to hurt anybody

verbal tendon
#

We can agree to disagree. It's a moot point anyway and only one of terminology, so who cares

hoary lark
#

literally go to google and search for "P2P" and search for any results within the past year about networking and... well, unless the definition you'll find across the entire internet changed while I am writing this message

#

agree to disagree is fine thumb

lost inlet
#

thank call of duty for popularising "p2p" referring to "player hosted listen servers"

#

EOS p2p does use relays though so it is handy for hosting listen servers

hollow eagle
#

How can you say that p2p -> "mesh" networking is outdated when it's actively used... torrents, blockchain (ugh, but still a good example), IPFS, Destiny 2 (hybrid client/server + p2p model), some RTS games, fighting games, etc...
Just because some companies have decided to use the term p2p when talking to the public doesn't erase its actual technical definition which is not even remotely outdated. We're in a technical context, use the right term.

#

Hell, even EOS P2P is still P2P - it's just talking about the transport (which is indeed directly connecting peers... ignoring relays, but they're not actually processing data so eh) instead of the application (the game itself).

#

lol

hoary lark
#

peen2peen

dark edge
#

Yeah I would never consider listen server as peer-to-peer. All the machines are not peers, one is running the show and everybody else talks to it

vestal crane
#

Hey all, I'm currently working with the IOnlineSession interface, and am confused by what the FName SessionName parameter to the various create/join functions is used for. Is that actually sent to the provider (eg Steam) in any way? Should I set it to a constant string? My understanding is that FName implies static, but I want to double check I'm not messing something up.

#

Looking at the source, I think that FName is just used for storing the session in memory locally

silver loom
rocky kestrel
#

Why this happens and how to fix that?

sinful tree
#

If you have, then the damage causer isn't Player Character 0 on the server's side.

#

Get Player Character isn't reliable to use in multiplayer as the index of the players can be different on clients and server.

rocky kestrel
#

@sinful treeIm setting it like that (When spawn player :: player controller)

#

"Get Player Character isn't reliable to use in multiplayer as the index of the players can be different on clients and server."

#

How to do that?

dark edge
sinful tree
# rocky kestrel <@!218956378654507008>Im setting it like that (When spawn player :: player contr...

So every player that spawns is being set to team red?
Don't use Get Player Character. In this scenario you have a reference to the damage causer which is exactly what you want - a reference to the character that did the damage, rather than trying to reference a random character by index. The value being output of it's team variable will be whatever is set on that particular character.
Also, the "Event AnyDamage" only executes on server, not on clients. So you should only ever be able to see the server's value from there and the server is saying red, so it should be correct. If somewhere down the line the clients aren't showing the right team value, then it could be for a lot of different reasons, but your code here doesn't show anything that executes on clients currently.

rocky kestrel
#

Both damage causers prints same "Vanessa" what is name of that character

#

Okay!

#

"So every player that spawns is being set to team red?" no sever:red, client1:blue, client2:red, so on

#

I was just confused because this works. But now I see any damage runs only in server

soft dawn
#

When testing multiple clients with dedicated server in the editor, are all files (textures, material, etc) shared? I have a Material Parameter Collection that uses player location and camera location to modify a material. It seems that only one client can update the Material Parameter Collection. This wouldn't be a problem when shipped but it makes testing difficult.

dark edge
#

MPC is local

#

You can use a replicated variable to drive it if that's what you're after.

#

What's the desired behavior?

soft dawn
#

so i actually don't want it replicated

#

im occluding objects from the viewport between the player and camera

#

and right now it acts funky because it uses the player location of the last player that updates it to determine when to occlude or not

#

i want the clients to use their own MPC basically

#

but i haven't had luck creating and updating MPC at runtime

#

but maybe im thinking about it wrong - are you saying it creates one MPC for each instance of the client?

#

i guess i was under the assumption it was the same thing as having a single render texture, it shows the same on each client

dark edge
#

There's no way your render target is replicated.

dark edge
soft dawn
#

its not normally, but if both clients reference the same texture it shows the same on both

dark edge
#

Oh yeah reference is one thing. But the actual data isn't flying across the internet

soft dawn
#

right, ya i think it would work if they were running completely separately. i was wondering if there is a way to test that way in the editor

dark edge
#

In plain English spell out what exactly you are trying to have happen

#

It looks like you want to fade objects sort of like divinity original sin

soft dawn
#

when hitting play in the editor, for 2 clients and dedicated server, each client would have a separate MPC/textures/etc. I don't want them to share any references to local resources

dark edge
#

Yeah so just have each character, if locally controlled, update the material parameter collection.

#

Material parameters and render targets are not going to be automatically synced just because you're playing in pie, it'll work.

soft dawn
#

ok cool, i must be running into another issue then. thanks!

dark edge
#

Not sure how you're doing your masking but it should just be a point distance from line test, all you should need in your material parameter collection is the character position. A function of that, camera position, and pixel position will be your opacity

fierce oriole
#

How do folks normally handle Changeable Spectator Cameras (ie 1st and 3rd person) ? Would it utilize Regular Cameras attached to the Player Pawn?

polar lotus
#

Do listen servers with OnlineSubsystemSteam and SteamSockets expose the player's IPs?

#

like could a client get the actual IP of a listen server that they're connected to?

hollow eagle
#

steam sockets will not reveal IP addresses

#

players connect through a relay run by valve so the only ip they see is the ip of the relay.

#

well, assuming relays are enabled. I believe that's optional.

polar lotus
#

ok cool looks like it's required on listen servers, but optional for ded

finite goblet
#

what is the client side callback for end of seamless travel in playercontroller?

#

e.g if I want the client player controller to do something each time a new map starts

vocal quail
#

Hello! Having an issue in a Multiplayer LAN lobby in trying to create. On the client side The Host Playername (overhead widget) is not populated. Works fine in host side. Pictures of code to follow

#

Host side works great. ( Random generated names for now), but on the client side. Im not seeing host name

#

Works great in PIE btw. But not at all when run in Standalone

#

PlayerInfo struct is populated in GameMode, OnPostLogin

twin juniper
#

So i guess there is PostClientTravel ?

finite goblet
#

post is only executed on server by game mode

twin juniper
#

If not, you might have to handle this urself with events

vernal hamlet
#

Hey everyone, in collab viewer, when i close my hands, the other player 2 also closes his with my controller, infact any person who joins, if i close my hands all of the players will close theirs, this also works if they closed it, they will see my hands close too, but i wonโ€™t see it, thanks to anyone who knows how to fix this๐Ÿ™๐Ÿป

thin stratus
#

Probably because you didn't setup the Motion Controller stuff properly

#

All of these are listening to your own controllers

vernal hamlet
thin stratus
#

Arent they driven by motion controller components?

#

Iirc you have to make sure the user index is unique or so

#

But it's been a while

soft dawn
vernal hamlet
thin stratus
#

Why would it be

#

It seems very much local

#

Have you checked what I suggested or did you just ignore that? :P

vernal hamlet
thin stratus
#

Yeah in the Component for the MotionController

#

Didn't they come with a component usually?

#

The Hand component I guess

vernal hamlet
#

is there something precise you need me to check?

vernal hamlet
thin stratus
#

Yeah I think this thing comes with something called a PlayerIndex or so

#

but not sure if that's the reason tm

#

This is def a coding issue somewhere

vernal hamlet
#

hmm i see

#

so it's not a replication problem ?

#

well i'll try to see what's causing this, thank you @thin stratus for your time i truly appreciate it

thin stratus
#

Or do you only see it on your local end?

#

if it's only locally then it shouldn't be a replication issue

vernal hamlet
#

i only see it on my end, let's say i close my hands right? then P2 will close his too, but if P2 closes his hands he will close mine too, but i won't see that on my screen

#

hope this is clear

thin stratus
#

Yeah so only locally

#

You aren't actually controlling their hands

#

Then it could be an AnimBlueprint issue

#

where it maybe tries to grab from a fixed pointer, let GetPlayerPawn

#

Instead of GetOwningPlayerPawn

vernal hamlet
#

huh interesting

thin stratus
#

Or the Controllers are somewhat linked up via the MotionController Component

#

And they all react to your input somehow

#

Hard to tell

#

never used that collab thing

vernal hamlet
#

sure is

#

no worries thank you tho, at least you gave me some clues

#

much obliged : )

vernal hamlet
thin stratus
#

Yeah that's shite

#

You are grabbing the first player for all of those

#

use the TryGetPawnOwner, which is already in your graph, should be used

#

Or actually

#

You can't get the pawn owner like this

#

Use GetOwner, cast that to the MotionController BP

#

And then get the owning character from there

#

It might have a PlayerPawn variable

vernal hamlet
#

Get owner and not Get Owning Actor, correct?

thin stratus
#

Yeah but you need more

#

As I already wrote

vernal hamlet
#

and Get Owner won't compile (Error) This blueprint (self) is not a Actor 'target' must have a connection

thin stratus
#

The Owner of this AnimBP is the BP_MotionController, not the VR Pawn

#

Yeah then use GetOwningActor

#

GetOwner seems to be the Actor version, so just delete that

vernal hamlet
thin stratus
#

Yeah correct, you need to have the Pawn that owns those hands

#

There should be a PlayerPawn variable

#

That you can get from the cast

vernal hamlet
#

ok i changed it to what you told m, but now i can't connect the Target ( pressedgrip )

thin stratus
#

And that should theoretically connect to the boolean

#

What does it say

vernal hamlet
#

Bp motion controller object reference is not compatible with bp vrpawn object reference

thin stratus
#

I just wrote

#

Get the PlayerPawn variable from the motioncontroller

vernal hamlet
#

if u mean pull a node from the Cast To BP_MotionController, blue node As BP Motion Controller > pull a node called " Get Player Pawn " , if this is what you mean, then this doesn't work

#

please pardon my ignorance

thin stratus
#

Yeah that's what I mean. The Screenshot of the motion controller BP shows a PlayerPawn variable

vernal hamlet
#

ok ok i think this is what you mean right?

vernal hamlet
#

okay so this works

#

but only problem now is that i don't see him when he closes his

thin stratus
#

Yeah that's now a replication issue

#

Cause the boolean you get from the pawn is not replicated and there may be no code setup to set it properly

vernal hamlet
#

yeah guess i'll check the replication panel and do trail and error kinda thing to figure out

#

thanks

vernal hamlet
#

Tried to check these and packaging them tried them one by one, still can't see the other player closing his hands unfortunately

novel siren
#

Feel silly asking this but SetOwner() should be run on server correct?

bitter oriole
#

Should be called there

novel siren
#

That's what I thought. I was just having a weird brain fart. Thanks

novel siren
#

Got another silly one, might be better in C++ but this is a replicated project. SpawnActor(...) I have a property that I want exposed on spawn (already set the method for that) is there a way to do in C++ like there is in BP or do I need to make a function I call right after spawning? (These events are running on client - it an RTS style game. Client is getting a preview of a building they may want to construct)

novel siren
#

alternatively would a delayed spawn be better?

thin stratus
#

SpawnActorDeferred

kindred widget
#

@novel siren In C++ to do parameters like that, you usually do a SpawnActorDeferred, set your variables you want to set on the return pointer, then call FinishSpawning on the pointer.

thin stratus
#

Is what you want

novel siren
#

That is what I thought, thank you for confirming. I really hate having to work with one API 4 days a week and then the UE4 API 3 days a week. I feel like I forget some basic crap

thin stratus
#

Well, you don't have to remember, you just need to know how to find the knowledge

#

I often google and find my own answers

novel siren
#

same but sadly with spawn actor I was getting the API only for regular spawn actor and same for deferred and a LOT on BP

#

If I ask here, usually means I spent at least an hour googling. Might be that I forget what terms are best to use though

crystal crag
#

As I have been developing my game, I have wondered if it would make more sense to just make a TMap of FUniqueNetIdRepl as the key and a struct containing the player controller/state as the value. Then, instead of storing weak object ptrs to the player state in all of my uobjects on the server that access them, just do the look up. Because if the character gets re-assigned, the controller gets replaced (due to disconnect / re-connect or whatever), I now have to update every single UObject that holds a weak object pointer to them to have the latest valid copy

#

that seems like a lot of work as the number of systems grow

#

has anyone else done something like this? Obviously it wouldn't remove the need to store pointers to the player controller / state entirely, but it might cut down on it quite a bit..

thin stratus
#

I mean

#

Sounds logical

#

If you have a lot of places where you need to reference the PS and PC once and you don't want to update them constantly, then you could just save the Net ID and perform any kind of lookup through that

crystal crag
#

Yeah that's what I was thinking

thin stratus
#

I never had to do that cause either needing those pointers was a case by case situation or the connected systems were small, like one team state that needed updating

bleak raft
#

Hey everyone ! I'm working on a character controller for multiplayer and I was wondering if anyone
used a similar approach before I start going the wrong way.

Basically I'm using an ActorComponent that polls all potential player inputs for the frame, and after that i'm passing this input component to my state machine. The state machine then looks at the inputs for the frame and does it's thing.
For multiplayer, I would replicate the inputs that changed this frame to the server, and the server-side state machine would ( theoretically, with some delay ) execute the same logic as the client, and then replicate the inputs to other clients.

This is for a survival, non-competitive game, with up to 4 players coop, so bandwidth and delay is not too big of a deal.

My question is : Does this seem okay at first glance ? I know I'll have to implement movement correction and maybe some syncing algorithm down the line, but yeah, any thoughts ? Thanks ! ๐Ÿ˜„

gloomy jasper
bleak raft
gloomy jasper
# bleak raft It's kind of using UE system ? The character controller uses a state machine sy...

Ahh, I see. Just looking to simplify the network inputs for character synch. TBH, replicating arbitrary UObjects isn't too much work, just a fair bit of boilerplate. This series breaks it down in one of the earlier lectures, but I'll see if I can't find a source that doesn't cost $25. https://www.patreon.com/reubenward. My instinct is that your lockstep approach is going require much more work. I can elaborate on that claim if you want

bleak raft
#

If it's boilerplate then it should be fine.
My idea to get around this replication problem was to have the properties stored on a ActorComponent as well, that would be able to replicate. The state machine would just execute methods using these properties.

#

I can elaborate on that claim if you want
If it's not a bother, I'd like to know your opinion on it ๐Ÿ˜„

gloomy jasper
dark edge
bleak raft
# dark edge That sounds like reinventing the wheel imo

The main reason for this system is the state machine, I haven't found an "easy" way to create a complex character without it. It works well, but I've never used it with multiplayer. It's based on an implementation I had previously done in unity but for singleplayer. I'm trying to find a way to make it work in multiplayer ^^

gloomy jasper
# bleak raft > I can elaborate on that claim if you want If it's not a bother, I'd like to kn...

If you want to limit the character synchronization data to just player input, you're effectively making it "lock-step-deterministic.". That is, given the same player inputs sent to every client, the character sim should deterministically compute the same output. But this only works if all clients and the server are starting from identical world state (think chess by mail)

Out of the gate you have a few problems. I'm reasonably confident UE4s character movement functions are not deterministic (mostly wrt floating point precision and out of order computation on different machines). So that code would need to be replaced or modified. Also, player-player collisions will be wrong on your local client because your local client will be predicting ahead of remote client movement. Remote clients will have different world state for the same player input. Also, any world state that affects player movement but is outside deterministic code will cause desynchs.

Even if you manage to get all the other dependencies working with determinism, maintaining deterministic code is hard, and requires waaaaay more boilerplate validation code than replicating uobjects. A hybrid approach would also require more boilerplate

I could probably summon several more reasons, but I'm typing on my phone. Let me know if you need more clarification.

#

As an aside, I'm unaware of any games that take a hybrid approach (mixed server-client and lock-step-deterministic) in the same simulation. I wish I could point to one. (Fun fact, older Halo games used lock-step for co-op, but client-server for pvp multiplayer. The oldest Halo games were all lock-step-deterministic)

hollow eagle
#

This doesn't really require lockstep determinism... what's been described would work fine with normal network prediction.

#

In fact what's been described (aside from the state machine, which is irrelevant to the networking) is basically how all predicted games work.

#

Client processes input and sends the same thing to the server, server processes input and sends back result.

#

Client interps to new state if necessary.

#

One thing to note is that "input" should be an abstraction - you're not sending "player pressed spacebar" to the server, you're sending "player wants to jump" to the server.

bleak raft
#

That's what I had in mind yes ๐Ÿ™‚

#

Simulation happens on both sides, but server takes precedence

hollow eagle
#

That's just normal prediction stuff, sounds fine to me.

gloomy jasper
#

Depends what "sends back results" entails. If it's a bunch of state in Uobjects, that needs to be packed in the movement RPC

hollow eagle
#

That's an implementation detail. The general idea is fine.

bleak raft
#

Idealy the UObject do not contain "important" variables, they access them from one or several "Data Storage" Actor components, which are replicated

gloomy jasper
hollow eagle
#

Sure, it just sounds to me like the question is "does this direction make sense", not "how specifically do i implement all this"

bleak raft
#

Ahah ๐Ÿ˜‰

gloomy jasper
bleak raft
#

Yup yup, but any feedback is welcome ๐Ÿ˜„

gloomy jasper
hollow eagle
#

One leads to the other, but I prefer not to dump a load of information on someone who hasn't asked for it.

hollow eagle
#

Fair enough, I didn't read back for the full context.

bleak raft
#

Thank both for your feedback ^^

hexed thunder
#

Does anyone have any good references for server/client best practices for spawning actors, for example if the Server spawns in an actor what's the ideal way you make sure dynamic changes determined by Server reflect for client actors for constructionscript/beginplay

strange breach
#

Hey do someone know a good Template to buy on UE4? i need multiplayer for atleast 50 Players

dark edge
#

To be able to make a game that'll run well for 50 players, you'll have to know your way around the engine well enough that buying a template is worthless

lost inlet
#

yes, a magical template

lost inlet
#

but you can't always depend on it

stable ravine
#

Hey!
I've run into a bit of a problem. I've created a function to be called on the client side and executed on the client side but for some reason it seems to be getting executed on server side(Even with the server rpc function commented out) and I haven't really been able to figure out why. I was hoping one of you could give me some insight

hollow eagle
#

Where are you calling it from?

#

It's going to execute wherever it's called.

stable ravine
#

It's being called from ball.cpp which is just a ball I spawned in on the map. Would that mean I'd have to call it from server to client then

hollow eagle
#

The function isn't an RPC. If whatever is calling it runs on the server, then it'll run on the server.

#

If whatever is calling it runs on the client, then it'll run on the client.

stable ravine
#

This might be a bit of a stupid question but how do I know for sure if it's being called on the client or if it's being called on the server

#

Because I have another function that's pretty much the same except shoots with a greater force which is only being called client side opposed to server side

#

Which is kinda confusing me

molten matrix
#

Is it possible it's being called on both the server and client? What part of ball.cpp is calling it?

stable ravine
#

I've got it set up like this

hollow eagle
#

Which is called from...?

#

Look, if you only want this called on the client then you either need to have the function call (or the function calling your function, or the function calling that function, etc) originate from something only called on the client, or you need to guard against it being called on the server.

#

If you can't figure that out, post the start of where all this code is called from.

#

If this is coming from Tick then it's going to be called on both the server and client. If it's coming from a timer, it depends on where you set the timer. If it's triggered from an input it's already being called on the client only.

stable ravine
#

Ah

#

So if I have a function in tick and within that function I call another function it will be executed on both server and client

#

If I understand correctly

hollow eagle
#

No. Tick is executed everywhere unless you've done something to prevent it from being called on one or the other. What you wrote was technically correct but the wrong way to look at it.

molten matrix
#

The server is playing the game too. So the ball class on the server will also be running tick, and all the same code will be executing (unless you guard parts of it to run only on the client)

hollow eagle
#

This code doesn't really make sense though. If this is just something being triggered by a timer you'd want the server to be doing it... there's no reason for the client to tell the server because the server should already know.

stable ravine
#

Well its being called within the tick function within ball.cpp. so it should it should be called on both the server and the client right?(please forgive me if I still don't understand ๐Ÿ˜… )

hollow eagle
#

Correct.

#

My point was that tick is being called on both, therefore everything inside tick is called on both.

stable ravine
#

So with that logic would it work on both singleplayer and while playing on a dedicated server?

#

Because that's the problem which I'm running into. I have one function only executing client side and another only executing on server side but both being called from the tick function within ball.cpp

vivid seal
#

when using FastArraySerlalizer, will i run into issues if i have some structs in the items array on the server that I don't intend to replicate? Right now I just don't call MarkItemDirty on them when modifying them. Basically I want to store all my stat structs in one place, but only replicate some of them, so I have a bool in each one that signifies whether that stat needs to replicate, and if so I will do MarkDirty after any change, if not I don't do anything. On the client side I don't need access to the non-replicated structs at all.

mild lynx
#

Can Blueprint Componets run an event on the server from a client where it was added to their character?

solar halo
#

I keep getting Could not find valid Replication Graph. no matter what I put in the .ini. Have any ideas?

kindred widget
# mild lynx Can Blueprint Componets run an event on the server from a client where it was ad...

As long as that component belongs to an Actor that belongs to the Client, then yes. So in this case a possessed character is set to be owned by the client at possession. So if the component is set to replicate and was created on the server version of the client's character, and replicated to the client's version of the client's character, then that client could call server RPCs on it.

novel siren
#

Got two weird ones (at least to me) - tried debugging to see the cause for one. The other is more a ownership logic thing and may need help just walking through. RTS style game (as usual)

First issue, the game time is a custom calculation that can be changed (to speed up or slow down or pause the progression of time in the game). Both players and host (listen server) can modify this setting (currently). The modifications occur via UMG (UMG to Player Controller, Player Controller to Game State) and that part works fine. The current speed at which game time progresses is relayed back to the player via a progress bar (Game State to Player Controller, Player Controller to UMG). (In case anyone asks, direct transmission of the data to UMG caused the data to become null). The prog bar basically has 6 steps (0 = empty, 5 = 100% filled). The math to make sure that the prog bar fills correctly is accurate. The default (at the start of the game) should be 3 , which fills half the prog bar. For the host this is correct. For the client it is displaying as if it is at 4. While the prog bar is wrong for the client all other data being passed back and forth is correct. And using break points to check, the values on both host and client are the same. Any ideas what may be causing that sort of issue?

Second issue. yesterday this was working correctly (today I finished translating it over from BP to C++). The logic is the same, the steps are the same. When the host spawns in a building, it use to be visible ONLY to the host. It is now visible to the host and to the clients (except it is a different material that the clients see). Given that I followed the same logic, I am not sure what I fouled up and could use some help just walking through it.

little vessel
#

does anyone use epic online services?

novel siren
#

Update to first issue, in standalone the prog bar is wrong for both

#

Issue 1 resolved. I did the math wrong (and for some reason it wasn't replicating on host, it is fine).

novel siren
#

and issue 2 fixed. Curious why the UMG is getting messed up in PIE but not standalone (I know about some replication issues that occur in PIe versus standalone)

heady python
#

What does the replication condition "initial only" do? from the name and the description I thought it would only replicate the first time the server sets the variable, but that isnt the case.

kindred widget
#

@heady python It replicates once per client. It will give the client whatever the server has set at the time. After that it can be set on server and will never replicate to client again.

#

An example might be that if you start up the server. You have an integer and set it to 13. A client connects. This client gets 13 replicated to it. Later on server sets this value to 21. Client 1 does not get this replication. Now client 2 joins in. They get 21 replicated to them. If the first client then leaves and rejoins, they will have 21 replicated to them.

heady python
kindred widget
#

That I don't know. Possibly. It's not worth fretting over honestly as those checks are very cheap until you scale quite a long ways. If you want conditional replication control on that scale, it's probably worth checking out the PushModel.

heady python
#

sweet, ty

stable ravine
#

Hey guys I'm back again :P

I still haven't been able to fix the issue I've been having.

I have a function in ball.cpp that's being called by Tick in the ball.cpp class. From my understanding the functions within this function should be executed on both server and client.

void ABall::FindShootingCandidates(){
UGameplayStatics::GetAllActorsOfClass(GetWorld(), ClassToFind, FoundActors);
    if (GetWorld()->GetTimeSeconds() >= NextShotTime) {
        for (AActor* ThirdPersonCharacterRef : FoundActors)
        {
            ASoccerCharacter* Player = Cast<ASoccerCharacter>(ThirdPersonCharacterRef);
            if (FVector::Dist(CollisionComponent->GetComponentLocation(), Player->GetActorLocation()) <= MaxPlayerDist) {
                if (Player->WantsDribbleShot) {
                    DribbleShot(Player);
                }
                else if (Player->WantsChargedShot) {
                    ChargedShot(Player);
                }
            }
        }
    }
}

The problem I've been having is that "Dribbleshot" gets called on both server and client but only when playing as a client on the dedicated server setting. But when playing on singleplayer(standalone setting) it doesn't get called at all.

And the other problem is that "ChargedShot" only gets executed on the client no matter what setting.

I hope someone is able to give me some insight on this matter

dark edge
#

or on an anim notify if that's setting your timing

crisp sable
#

hey guys, quick question. Lets say I want to apply velocity to the player when he pressed a button.
For example, I want to do a sliding action. Where is the proper place to adjust the player's velocity?

Should I modify it in the following places

  1. PlayerMovementComponent::PerformMovement
  2. PlayerMovementComponent::ReplicateMoveToServer
hexed thunder
lusty sky
lament cloak
#

I seem to be running into an issue with member variables existing from within GetLifetimeReplicatedProps()

I'm using SpawnActorDeferred, I set a variable called SettingsData, I then print out if Weapon->SettingsData returns an object before calling Weapon->FinishSpawning() and it's not null. But it's somehow null in GetLifetimeReplicatedProps(). I even printed logs to make sure GetLifetimeReplicatedProps() was being called after everything and it appears to be. What gives?

modern cipher
#

Shouldn't you use GetRealtimeSeconds instead to check for NextShotTime @stable ravine ?

chrome bay
#

GetLifetimeReplicatedProps() is called on the class, never the instance

lament cloak
#

ahhh

chrome bay
#

It's all part of creating the FRepLayout for the actor

lament cloak
#

Okay I'll need to rethink what I'm trying to achieve

#

thanks

mild lynx
#

Everytime I try and do a Run on Server event on an actor component, that client crashes back to the main menu.

#

I only have the issue when the Component is added at Runtime. It works fine when the component is added manually in the character BP

chrome bay
#

It's probably not network addressable

#

If you're creating it at runtime, it should be replicated and only the server should create it

mild lynx
#

But then how would a Client interact with it? I've set up replication a bunch before outside actor components, but this just seems difficult

#

This is what I use currently to create the Actor Component. All is fine until a client runs an event in the actor component that is set to Run on Server. That's when they crash.

#

If there is a better way to do this, that would be fantastic to learn. I currently want to put it through a Actor component so I can add it to any Character Blueprint at Runtime.

chrome bay
#

It won't work because your creating the component on multiple connections, and each will create different components. If you want to create a component at runtime and use it over the network. the server has to create it and mark it as replicated. So long as the actor is also replicated, clients will create the replicated component when they receive it from the server.

mild lynx
#

Is my event there not creating it on the server?

chrome bay
#

No

#

begin play runs on every instance

#

So every instance is creating their own copy of that component, and clients will have two of them.

mild lynx
#

Ah, okay. But if there are multiple character actors of the same blueprint, doesn't the component need to be added to theirs?

chrome bay
#

A replicated component created at runtime by the Server will be spawned on clients the same way client actors are spawned.

mild lynx
#

So is this just an event begin play issue? Like if I removed that, would I just call the server event using a different way?

chrome bay
#

The issue is you're creating a replicated component on every instance, including the Server

#

'Add Component' needs to be behind a "Has Authority" check

#

And the pointer to that component also needs to be replicated, so that clients can get to it

mild lynx
#

I guess the question i should be asking is, can a client create a component for themselves that can be replicated, that the other actors don't get?

chrome bay
#

no

mild lynx
#

Okay, that is where I was lost

chrome bay
#

Relevancy is only possible at the actor level

mild lynx
#

I was hoping to add actor components based on a player picking up a powerup

#

So what you're saying is it has to be in the original blueprint, or a new actor blueprint

chrome bay
#

What I'm saying is you can't have a component that only replicates to one client

#

It follows the same relevancy rules as the actor

mild lynx
#

So if one person gets the "ability" (actor component) then everyone does for themselves?

chrome bay
#

Everyone's copy of that actor would also have that component

#

The same as if it was a default component of that actor

mild lynx
#

I'm wanting to dynamically add components to individual players across the network, and that includes replicating that to other players to see, but I don't want those players to have that component for themselves on their own actor. Is that possible? Hopefully that helped. If not, I'm sorry, I couldn't find any documentation about this very specific issue online with actor components.

chrome bay
#

They won't have it for themselves

#

The component will be added to the same actor on every client

#

if you add it to a given players' pawn, it doesn't mean another players' will get it too - it means their copy of the other players' pawn will have it.

mild lynx
#

That's what I'd like it to be. Would what you told me earlier do that?

rocky kestrel
#

I can't figure out this..

#

First pic is from player character

#

second pic from enemy interface function

#

Want to make that blue team player cant deal damage to blue team enemy

sinful tree
mild lynx
rocky kestrel
#

somehow client cant do damage to anyone. Server can do damage to enemy team. But I figured it out! It was how did I call that function

true karma
#

When should you use switch has authority ? Wouldn't I just run the code on the server instead?

eternal canyon
#

Then it comes in handy

true karma
#

ah ok, thanks!

tidal delta
#

which multiplayer libraries are available to make client server based games? BTW: I'm an xbox live developer so on xbox wouldn't I just use the XDK liibraries? Or are the multiplayer libraries built in are the only ones for establishing connections, sending and receiving commands to clients, etc..?

#

and is it automatically serialized the objects and stuff like the actor for player, enemies?

#

btw: I'm Ken, I'm a self taught programmer who has done some amazing stuff such as I'm the one who reverse engineered the 3do file format from total annihilation, and released the djgpp source on cavedogs website chat, then Kinboat and I went in together and we both created 3doBuilder, to which I still have the sourcecode. I can do VB but I'm way more comfortable in C based languages like C#, C++ especially, any scripting languages.. I'm also the StOrM3 who worked with benji york on snesKEY, which we gave the mame project enabling users to make mame arcade machines.

#

I have made 7 complele games from start to gold master, 2 of which won contests

hollow eagle
#

First, you cannot use the XDK (which is outdated anyway) without an agreement with microsoft. Anyway, there are no specific libraries for networking for xbox - unreal handles that for you.

#

Online subsystems are a different story, but you don't get access to that without being a registered developer.

obsidian cargo
tidal delta
#

I am a registered developer, which is why I can access the xdk I just saw it yesterday in devkit mode dropping files from my desktop to my xbox series s

hollow eagle
#

If you're talking about being registered for UWP development then you can't even use unreal with that without a custom build of the engine that hasn't been maintained in a while.

#

If you actually have a signed development agreement with Microsoft then you should have access to the GDK (not the XDK) and can get the xbox-specific code from Epic.

tidal delta
#

I have UE5EA installed, development editor x64 and yes UWP is one option but I can put the binaries targetted for xbox I can drag and drop like models etc.. from my PC to my xbox.. but please explain both options your talking about above

limber mortar
#

Hello, I seem to have messed something up that was working before and not sure what I did. When this tree takes damage, I want it to change the material, and and spawn fire effects on the tree. However, my material isn't applying and I only occasionally see fire climb up the tree.

tidal delta
#

its OK Help him out I will just read a little more in the manual

limber mortar
#

I multicast from the server (dedicated) after damage is applied and see my print string and such

hollow eagle
#

And if you are indeed talking about an NDA'd agreement with id@xbox or a publisher, then you'll have to direct your questions to them as it's NDA'd.

tidal delta
#

not creators program it had an NDA its an agreement with microsoft I'm also an windows insider, and xbox insider, and whatever else they had I've know microsoft for a long time I actually won the firs zune off the line from them at the vista release party at opryland hotel in nashville and landed on the frontpage of their monthly newsletter

hollow eagle
#

Then you should know that you cannot really discuss it here.

limber mortar
#

I have another actor which places a decal on the ground with the material on the ground no problem, and you can see it cover the tree a little, but I want the whole tree to turn orange

hollow eagle
#

Anyway, there are no "multiplayer libraries" to use with xbox outside of the online subsystem you likely received with the xbox extras for the engine.

tidal delta
#

I can't discuss what I'm making or any changes they make, but in general I can talk about multiplayer related to UE5

#

OK thank you, you answered my question.. I'm going to have to use the FLAX engine then because of targetting linux stand alone server tech...

hollow eagle
#

Not really sure what that means, unreal's networking is platform-agnostic.

tidal delta
#

but are the multiplayer libs installed that I can use to target a standalone listen and report server then just use the correct libs for whatever platform I'm targetting for the clients?

hollow eagle
#

There are no "multiplayer libs". Unreal uses whatever network stack the platform has, which on every platform is just going to be a standard socket library. Xbox does not have specialized libraries for developing multiplayer games - you work with sockets just like you do on desktop platforms.

#

Again, unreal's networking is platform agnostic.

#

The only xbox-specific stuff will be related to online subsystems - accounts/party/session/etc - all of which are optional provided you obey the restrictions of the platform holder.

limber mortar
#

How do I set agnostic mode to my burning tree?

#

I kid โค๏ธ

hollow eagle
#

Have you verified that the multicast is actually being called on the server?

#

If AnyDamage is being hit on a client then it won't send that RPC.

tidal delta
#

OK so low level nothing to help ontop of the sockets lib.. See i'm looking at another engine, that uses enet for their networking low level stuff also based on sockets but has the serialized stuff on top of it, so it auto serializes objects for you etc..

hollow eagle
#

Unreal does that as well.

#

But it's part of Unreal itself, not anything xbox-specific.

tidal delta
#

yea really the xbox stuff is all on client side and really related to messaging and chat etc..

limber mortar
#

pretty sure my print string showed, I will verify again

hollow eagle
#

That print string will happen regardless of where the function is called

#

it's not within the RPC

tidal delta
#

thank you, you have been helpful..

limber mortar
#

I understand, I mean placing another one

hollow eagle
#

gotcha

limber mortar
#

I've tested multiple aspects and moved my print around

hollow eagle
#

Check the output log as well.

limber mortar
#

yeah, I've been checkin the log file on the dedicated server

hollow eagle
#

Check the client as well.

#

Depending on the materials you're setting, this might not be an issue with the RPC - for example, if the materials aren't enabled for the kind of mesh you're putting them on. That'll generally appear as a warning in the logs.

limber mortar
#

oh cool, good point, yeah I moved print string to the front of the RPC and its called on the client and server

hollow eagle
#

I'd put it inside the RPC and see what happens.

#

You want to verify if the RPC is happening at all.

#

Right now that's just showing that AnyDamage happens on both client and server (btw - is that something that you want to happen?), but doesn't say anything about the RPC.

limber mortar
#

I moved it and restarted the server

#

I wonder if somehow the damage isn't overlapping/applying to the tree

#

I saw one do it and one not, let me try somethin

#

my print is in the rpc now

#

I'm going to blanket apply damage to all tree actors in a box, and see if they all light up

limber mortar
#

ok silie dillie okie oh, cook underway

limber mortar
#

well @5#@$

#

I need to take a little break and think about this some

forest lichen
#

Does calling a server function (rpc function) from the server itself trigger a network request or does it just call that function with no overhead?

pearl fog
#

it directly calls it

solar halo
#

I get Could not find valid Replication Graph. when running net.repgraph.printall. I've tried putting our repgraph in the ini and even the one from Epic (the basic one). I've also tried binding the delegate on InitGameState (saw someone suggest that here) and I get the same error. Anyone have any ideas?

limber mortar
#

I think my issue is damage not applying properly, not the way I originally had the code

peak sentinel
#

I don't know anything about Replication Graph, but I couldn't find any resource or guide to help you out on the web either

#

So your only chance might be debugging or if it's a bug, submitting bug report

#

Looks like this is how UE tries to find rep graphs:

    UReplicationGraph* FindReplicationGraphHelper()
    {
        UReplicationGraph* Graph = nullptr;
        for (TObjectIterator<UReplicationGraph> It; It; ++It)
        {
            if (It->NetDriver && It->NetDriver->GetNetMode() != NM_Client)
            {
                Graph = *It;
                break;
            }
        }
        return Graph;
    }
pine sage
#

Hi, I have a small question

#

Why when I play in Simulated Multiplayer with 2 clients both character have the same controller (Controler_C_0) ?

#

shouldn't each one of them have one controller each ?

dark edge
#

They each see only their controller. Is this in a listen server setup or 2 separate standalone windows?

pine sage
#

hum, good question

#

I added a node to show the object name with "getController->GetObjectName" and it's always the same C_0ร 

#

they should only see their controller, I agree. So even if C_0 is the same name but not the same controller, It should work

#

but I have a couple of tables and methods in the controller itself and it seems they are colliding when I simulate

#

I have 2 windows: the UE Editor one, and a small separate window

dark edge
#

First make sure you actually have 2 connected instances. If you do, you probably have to gate stuff by HasAuthority or IsLocalController etc