#multiplayer
1 messages ยท Page 577 of 1
not sure if this is the right channel btw
or SetPawn override
If I were to replicate variables inside of the player state, would that mean that all players could see the variables? or would that not work?
@twilit oak this is probably an outdated guide, and there's plenty of them when it comes to OSS
also is it the OSS you're after rather than the SDK specifically
ah thats no good for me. becouse it wont compile atm, and i suspect it might be becouse i couldent do that step
idk? i guess both would be good having. i tought the SDK was required for the OSS
do you know a more up to date guide perhaps?
well the steamworks SDK is already distributed with the engine i believe
it should be present in Engine/Source/ThirdParty/Steamworks
the OSS links the steamworks SDK like so
hm, and i allready replaced it with one i got from valve
upgrading the steamworks SDK should be fairly trivial, the engine uses 1.47
so i have to follow epics guide on eveyrthing except messing with the SDK
?
yeah i got a 1.50
i must have touched something i wasnt supposed to touch anymore =/
guess ill compile a new engine and try again
well you'd have to update Steamworks.build.cs to point to the right version
i did tough
error: no member named 'ReceiveMessagesOnListenSocket' in 'ISteamNetworkingSockets' when compiling
which outdated guide were you following
oh
that's not outdated
but since you were upgrading the SDK from 1.47->1.50, there may have been deprecated functions that the OSS is calling so you'll have to update those yourself
if it's in that plugin, which it sounds like it is, then yes
thanks! i just had to fix that one removed function tough i have no idea if my "fix" works at all lol
you only have to care if the fix works if you're planning on using steam sockets rather than normal IP connections
i dont even know the difference
you'll probably use normal IP connections if you plan on having dedicated servers where you connect to it by IP address
yeah "dedicated server" wich will be my 20 year old potato in the basement XD
I am in the middle of creating weapons and I see that the Shooter Example uses a replication graph to manage updating dependent actors. Is this the 'best practice' way of handling equipping other actors?
i am making an IP multiplayer and everything updates normally but actors doesnt update
I keep having trouble with steam done everything in the documentation all plugins are in. One second it worked then the next it was no longer working. I am doing it in blueprints I have also put in steam advanced sessions.
I created a working version in 3rd person template to get it up and running, and that got it to work on my project but now it does not work on my project or the 3rd person template which makes me believe it is something in my engine files
@near carbon try in standalone
i got it back up it was something with the advanced sessions plugin in but now when it goes to join the lobby it gives me a fatal error
show me
Assertion failed: ProcessedTexture [File:D:/Build/++UE4+Licensee/Sync/Engine/Source/Runtime/Engine/Private/Rendering/SkyLightImportanceSampling.cpp] [Line: 395]
Thats the crash in the cpp file line 395 is
check(ProcessedTexture);
So i dont know what i have set up that is having this crash
i am making an IP multiplayer and everything updates normally but actors doesnt update
Check your events and make sure they are firing on the server. That made updates show on my clients
?
What are you trying to send through?
all its movement needs to go through the server to update the clients. Physics are annoying in networking
how can i do that?
i would recommend going into your project settings and restrain your frame rate if it is a physics game to 60fps and go ahead and turn on async and substebbing for replications
Ill go into a voice channel and see if i can help you out
i cant rn
Ok i dont have all that checked and my physics vehicle shows up on my client
are you using events to move the ball
is this right?
are you using events to move the ball
@near carbon no its just a physics object
ok are you replicating the phsyics bodies then
is the ball just pled there
so i have to go to sleep will u be online tommorow 2 hours earlier?
yeah just hit me up
does the savegame blueprint spawn for each player in your game? I want to get each players settings and apply them while there are multiple people in a lobby. Would savegame be able to hold each individual players settings or no? Also a similar question for game instance. Does a game instance spawn for every player or just 1 per level?
how do people typically structure their inventory or weapon systems for replication? right now I have a WeaponComponent that internally uses a Weapon class that inherits from UObject for implementation details about how the weapon works (hitscan/projectile/etc/)
Now that I'm struggling to find docs on how to properly replicate this UObject, I'm curious how people usually do this.
im just wondering at a high level how people organize code for things like items and weapons into the Actor/Component/UObject hierarchy
mainly I don't know the right way to properly handle and replicate items or weapons that contain instance-specific state
@rose dock UObjects by default don't replicate.
That's why, at least in BPs, people use Structs
You can look up subobject replication to learn how to replicate UObjects
@shut loom the issue is that you're just launching whichever player happens to be first in the list of players rather than the player who actually touched the box
What you should do is grab a reference to the player who stepped onto the bounce pad and pass that to your launch event so it always launches the player that stepped on the pad
For a listen server and all clients, the player at index 0 is ALWAYS the locally controlled player
So it would be player 1 for the server, and player 2 for the client
What I would do is not bother with a server function, have a "has authority" switch leading from the overlap event and only launch the overlapping character if has authority is true
No need for the client to tell the server to launch the character; the server already knows because it has its own overlap event
Just cast "Other Actor" to your character class and launch it on the server. Launch is replicated automatically to clients
Just leave it, take "Other Actor", cast to your character class and launch them on the authority
That's it, just hook the base character up to launch
Oh sorry, get rid of the custom event, just plug the cast directly into "Launch Character"
are level blueprints suposed to execute on the server by default?
@shut loom you are probably changing the speed localy but on the server, so the server is trying to correct you or vice versa
im currently working on an ability that has a cast time, when the time is done, an actor should spawn at the casting players mouse location.
How would i do that with an authority server? can i sync all the mouse positions of all players all the time or should i look for another solution?
okay i figured it out ๐
hey, can i get some help? ๐ฆ
i have the full question on reddit:
https://www.reddit.com/r/unrealengine/comments/j948kv/multiplayer_advanced_sessions_session_joined/?utm_source=share&utm_medium=web2x&context=3
if someone can help me it'll be awesome, thanks โฅ
0 votes and 0 comments so far on Reddit
The player array in the game state is giving me 2 player states even though I'm the only one in the level
And everytime I respawn a player the value increases
I have 2 actor blueprints, with one i have no problem spawning it on the server and showing it to the players, the other one does not show up at the players. I did a simple option somewhere but where ?
okay im stupid
got it fixed too ^^
and the last question for today: I have a variable in my Controller, an aim point, it does not get replicated because the controller on the client and server arent the same object, right ?
i now have a call from my client to the server every frame which updates the aim point, does UE4 bundle them together and updates it periodically, or do i flood my server with nonsense ?
Question about the general way actors's properties are replicated:
Are all properties updated together in the same "net tick", or is each property updated at its own time? Assume of course that there was a change in their value so they do require networking
all properties changed between 2 updates are in the same packet
and all replicated properties, changed or not, are in the packet that spawns the actor on clients
Anyone here know how to do testing in multiplayer?
I recently read the sea of thieves game gdc presentation and they basically said they used the Unreal automation system to do tests
Currently i have some tests setup, but im not sure how to get them to work in a multiplayer environment
has anyone any experience with this?
Can u tell me how to solve delay between server and client
You mean lag?
Iโm not sure how you can defy the speed of light and ISP networking hardware
@twin juniper if you ever work out, enjoy your noble prize ๐
haha
you can not get rid of the delay
but you can hide it from the client as much as possible
I am moving object so I have to face problem for bith
both
so it is moving for server and client
ie, when firing a gun, you can allow the client to activate and start firing, then tell the server, this way the client feels the responsiveness
did not understand
Soooo
@twin juniper so rather than the client sending a message to the server and waiting for the server to respond, the client can send a message and then just assume the server will get the message and do whatever
it kinda impliments on it own already
are you using standard ue networking and replication?
In most cases with the built in replication you dont need to do a lot of prediction on the client side, if you use the built in work flow and stuff most of its already "built in" for you
for intance if an npc throws a fire ball and it hits a player, do not worry about sending a message to just the server and the player that takes the damage, use the built in events for applying damage and it will handle what needs to be done on the server and what needs to be replicated to the clients, you can almost "pretend" you are making a single player game.
assuming you arent trying to support more then about 32 players in any given AOI
would GetWorld()->GetPlayerControllerIterator() be the same as get all actors of class (PlayerController) in BP?
can someone help me here:
https://www.reddit.com/r/unrealengine/comments/j948kv/multiplayer_advanced_sessions_session_joined/
thanks!!!!
0 votes and 3 comments so far on Reddit
the reaon i that the joined session doesnt own the new pawn so it cant give it updates
the server owns the pawn and has auth of it
you either need to change your respawn to make the client spawn their own pawn
or you need to change your keys to make it sends requests to the server
the client owns what the client spawns
and isn't it enough to set the new player as owner on onpostlogin?
hmm not sure about the second part
is anyone here familar with asp.net? i have a master server build in it with a mysql database. im making a heartbeat so i know if a player hosted lobby is down or not (if it is remove it from the database) so i setup a tcp socket in UE4 for the master server to connect to only when the lobby is open, i tested this and its working via a separate c# app. the issue im having is moving this functionality to my asp.net master server, im not sure how i can create a single task that runs forever to perform this heartbeat on the master server
how i make the on post login send the client a message to spawn
like where i need to create the custom event of spawning the pawn
@ancient summit do it when the client joins the server/map
the client "knows" when he is connected to a game map already
kinda noob on the multiplayer, so i don't know in what blueprint is the client when he joins the servere
like, so far i called the owned pawn, and than did some function with it
the session*
@ancient summit in your Pawn/Character class there is an event called OnPossess
from a quick skim it looks like your able to join and possess the pawn just without the ability to move, so OnPossess should fire for you
So what i need to insert on the Possessed event?
Sorry for being noobish, trying too learn multiplayer after 3 years of development
depends on what you need. im not 100% sure what your issue is, but generally in the game modes PostLogin event you would spawn your pawn and possess it using the passed in controller
that's exactly what i did
and they are all getting spawned correctly on the player start choosed for them
and when i just start the lobby level (with the pawns), without a lobby
i can control them
the problem starts when i join a session
the host of a session can control the pawn
but the joined members can't
Is there a way to manually replicate a float variable so it replicates only when I want it to instead of the engine automatically replicating it every time it changes?
@timid moss set a custom condition
would this be COND_Custom?
yes
The comment next to it says // This property has no particular condition, but wants the ability to toggle on/off via SetCustomIsActiveOverrideIt seems like with COND_Custom it is treated as a toggle. But I was hoping to find a way to just tell it to replicate at a certain point in code instead of toggling on/off. Is that possible
I really need help, pls... i can't find any solution to this problem
@timid moss Afaik there isn't any other way, but just call a method on the target server/client with the argument and turn off replication for the variable.
@timid moss In principle, you could achieve this by simply tying the COND_Custom to a boolean value which you then flick on/off. However, I read somewhere that you shouldn't really use it for values that change frequently as it can hurt performance
Though I'm not sure what "frequently" means, or how much it hurts performance
Are there any examples on overriding SetCustomIsActiveOverride?
i guess id have to inherit from IRepChangedPropertyTracker
I've never used it, unfortunately
hi, for some reason i'm getting a default character spawning even when i set Pawn to none in the game mode. only happens when i play as client.
Are you spawning your own Character on Client and Server?
Can anyone help me with that:
https://www.reddit.com/r/unrealengine/comments/j948kv/multiplayer_advanced_sessions_session_joined/
thanks ๐
1 vote and 4 comments so far on Reddit
Does anyone know why actor isnt displaying on screen?
I just want each client to see its own actor spawn i dont want other clients to see it or even care about it
does the savegame blueprint spawn for each player in your game? I want to get each players settings and apply them while there are multiple people in a lobby. Would savegame be able to hold each individual players settings or no? Also a similar question for game instance. Does a game instance spawn for every player or just 1 per level?
Game instance is part of the server so yea every one as access to it
ummmm
no
Game Instance is not replicated in any way
and each machine has their own (so each player as well, unless its splitscreen)
thats true that is why RPC arent called in Game instances and good for things like widgets
So i see why one does spawn and the other doesnt cause one is in editor play and the other is in standalone
What's the best way to pass information to the server during absolute server travel? I want to send the selected character to the server so it knows which data to spawn the actor with, I don't want to do this via a controller RPC as I'll have to wait till PostLogin to do that, and the data I want to send to the server is a character UID that it uses to pull data from a database via an async function. I want to make this https call during Login, so that it can be running while the client is still connecting to the server. As it stands right now, if I do it via a RPC then there is a 10-15 second delay after the pawn spawns before the game is actually playable due to having to wait for the https response. Sure I could hide this behind a loading screen, but I was wondering if there was any way I could get this data to the server faster. Maybe by passing it in via the Options string on the Login function? Not sure how that works or how to set that options string. I did some code digging and I could find where that string gets set
Please ping me.
What do you suggest I use that is COMPATIBLE with unreal engine 4+ for an MMO servers consisting with at least 2000 players per server. Maybe 10000. Something kinda like World of Warcraft but not exactly
@hollow stirrup you can't send any info to the server during absolute travel because you're disconnected
If you need a connection that isn't tied to the game traffic, you could look at setting up a beacon. Seamless travel is generally preferred anyway.
Is there any way to persist game mode variables across levels while seamless traveling?
Think of it this way: my game has day and night cycles, the day level is different, night level is different, but I need to keep track of the elapsed no. of days in some central state
I don't think gameInstance makes sense to do this, as I'll have to have a local copy of this on every client
Put it in the game state would be my suggestion
Also don't forget, game states/modes are actors and can have components of their own. Helps if you want to compartmentalise behaviour
Does anyone have experience of getting aws flexmatch info to client from some other route than describe matchmaking?
hey can someone help me with that problem:
https://www.reddit.com/r/unrealengine/comments/j948kv/multiplayer_advanced_sessions_session_joined/
???
1 vote and 4 comments so far on Reddit
@random nymph You can use SNS and/or Lambda
Yeah but I'm bit of stuck figuring out where to go from SNS
Should I use some sort of socket system where the aws end knows when to send data about match to certain clients, or should I poll a lambda function with client with some parameters and then the lambda would return correct matchmaking info if it has something stored for the client?
That last option is the recommended approach by AWS.
Essentially you push the Flexmatch Ticket states to a DynamoDB via SNS.
Client then polls the DB via Lambda
For their Ticket State
Okay that sounds reasonable. Is there any kind of tutorial of how to do this or how do you know it is recommended approach by AWS?
We have contacts at the GameLift team.
Flexmatch -> SNS Topic -> Lambda -> DynamoDB
Thats the basic flow.
Client -> Lambda ->DynamoDB -> Lambda -> Client
If that makes any sense in that format ๐
This also means that you wont ever hit the maximum GameLift function call limit.
Yeah that makes sense
There is a limit to how many requests to a GameLift function can be made.
You dont want thousands of concurrent users making calls to DescribeSessions for example.
Yeah
Do you have any pointers or code to share of your system as I'm not yet familiar with sns, lambda or DynamoDB ๐
I cant share our code, but i do remember someone doing a pretty indepth tutorial on this. Ill see if i can find it.
Covers pretty much the setup im describing.
That would be amazing
@random nymph https://www.youtube.com/watch?v=tOy0xYaP3wA
This video is the first part of an extensive and informative tutorial on how to integrate Amazon GameLift with Unreal Engine, going over concepts such as GameLift architecture, how to build Unreal Engine Source on Windows 10 using Visual Studio 2019, and making a new C++ proje...
Pretty sure its this one.
Okay I'll take a look. Thanks!
Good luck. Any questions just ask.
๐
Each video is 2 hours lenght and it explains every little details ๐ฎ really thanks
@fossil spoke thanks man, you answered my question too..
๐
When A player joins session i can't move the pawn, it is possessed but can't move - why is that? what's preventing it? when i host a game - i can move the player, so the input on the character is fine i guess
Is it possessed on the server
Local & Remote roles are the same for listen server hosts right?
I'm working on reconnection case and using PlayerState.EventOverrideWith on BP (thanks Cedric) to get old scores. Cast to my player state class is successfull but I get default values instead of the old ones that set before quitting level. Is there something that I need to do or take care before expecting my values to be saved?
@solar stirrup For host-player-owned actors, yes
awesome thanks
Erm, no
The remote role is often going to be simulatedProxy
The local one will be authority obviously
Hello Guys I have a problem with server travel
I noticed that after the server travel has been done, the game mode still maintains that Of the previous map
It causes My game to break. Any help will be appreciated
@chrome bay aren't variables reset on seamless travel?
?game=/Game/pathtoGameMode I saw something on adding this option to the Url but it still does not work. Still uses the game mode of the previous map
How i pass a nickname from Main Menu (which contains the settings menu) to a lobby level when joined session?
I want to show the name above the character, i have a text render above the character
I need to pass the nickname between the levels (Menu and Lobby)
What i need to do when i change the Nickname field on the Main Menu Level Settings Widget?
Is there some way to send from a client or share from the server to all clients a custom texture2d ala created by a scene capture ?
https://answers.unrealengine.com/questions/741565/multiplayer-send-texture2d-through-network.html found this but solves nothing at all ๐ค
@ancient summit you have to decide where to store the nickname. You can store it in GameInstance, and then use that in your lobby to set the name
But if i store it on the GameInstance, it's will override it for the other clients, no?
Each executable running will have its own GameInstance, no matter which machine it is on (server or client).
lol @ancient summit I'm implementing the same thing rn and I'm actually kinda stuck too. It's not replicating correctly (the TextRender)
I'm not sure if it's befcause I'm pulling the name from game instance or something else. It's setting the same name for every client
Can't you request each client their name and each client read a savedgame to get the name request ?
why saved game?
does save game persist across levels?
well yeah is a external saved file
sounds overkill for something so simple
well when a user enters into a game have to send different stats, the name is one
rank etc are stored there, where is the overkill ?
what ?
Well you have to request the info to the connecting user
Where otherwise you want to get it ?
from a database somewhere?
well then you're looking for a complex system
old games used to do that up 2012 or so, now you're looking for a managed system with servers and infrastructure I imagine
I mean yeah, I'm gonna store this name in a DB somewhere that I'm gonna fetch everytime the user starts the game
it's not that complicated
it's like... world of warcraft storing your character's name somewhere. and no, don't tell me it's using an engine's save system, it's obviously gonna make an API call to some db
yeah that case is different, you need a master server and sub servers to store that
or use steam api or the store you're using etc
Good time of day. Need to create game launcher where the player can download the updater for game and read the news. Any ideas?
yeah a master server for you too where store the news etc on a json or a datatable
but these systems aren't "multiplayer as is"
are network systems
I'm not sure if it's befcause I'm pulling the name from game instance or something else. It's setting the same name for every client
@near bison in my case the host get his name, the other names cast to character fail...
Are FNames net serialized efficiently by default with some ID?
Or for example, a character's hit bones - should I write some net serialization logic that associates each bone FName (e.g head, leg_r, spine_1) to, say, a unit8?
@unkempt tiger they are serialized just like FString, for bone names and things like that use UEum its even better that uint8
Is GameInstance local?
@unkempt tiger they are serialized just like FString, for bone names and things like that use UEum its even better that uint8
@rose egret Thanks for replying! Enum makes a lot of sense, only HitResults (from the engine) return bone names as FNames, and needing to convert them to enums is as much work as mapping them to uint8s inside net serializers afaik
@balmy gazelle convert your textures into bytes and do RPC.
You better compress that texture
Hello! Actors are not being read when far from pawn. Already set "always relevant"(and replicates ofc) and problem persist. Any idea?
Any ref to reduce lag for rotation in multiplayer client ?
help me to roll the ball down the slope
Roll a ball has helped many game developers, like me, to learn about Unity and thought it would be a great beginner's game to make in Unreal Engine 4 too! It helped me get started learning about the engine.
This is an introduction (part 1) to making Roll a ball in unreal ser...
@thick sparrow One thing I found helped was turning off "Orient Rotation to Movement" in the character's movement component
I'm having an issue changing character meshes. The server sees everything correctly, the client sees the mesh they chose, but the client sees the default mesh for everyone else. I can change the way I spawn characters to make this work, but that would mean spawning a new character and replacing the old one when a player changes their mesh in game.
I'm having a fairly basic replication issue. In my GameState I create a 'LockedObject', which in turn creates a child actor Door. How should I set up the replication for the blueprint message that opens the door?
hi guys. can you give me pointers on how to implement player specific vision? e.g.: player A's mesh is visible to player B, but not to player C.
Could someone help me with this newbie question please?
Does anyone have the correct way of setting up bullet spawning (could be any other gameplay-relevant class too)? I'm trying to do a simple left click on client -> spawn fake bullet locally & spawn real bullet on server & spawn fake bullets on other clients
My current setup is as follows but I don't know if it's the right way of doing things
I am trying to create a lobby menu that has the server info and a chat. It works fine to create it as the host, and a client can find it..but the widgets dissappear from client for some reason
shoudl the lobby menu be set from the player controller or game instance
lobby menu should be a player controller thing because you only want the client to see it
er wait
I think what I did in my game was have the client ask the game state to create the widget, and if valid the game state would create it for that specific client
that way when you're in game it doesn't do anything weird
@round star i set that system up in my main menu using widget switcher along with beacons to replicate the info in the lobby along with the chat. when the lobby is created successfully it moves the host to it via the widget switcher, when a player joins successfully it moves them to it via the widget switcher
Can someon help me with that:
https://www.reddit.com/r/unrealengine/comments/j948kv/multiplayer_advanced_sessions_session_joined/
I'm trying to fix it for few days, and it's getting on my way with making the levels, etc. I DON'T KNOW ANY OTHER PLACE TO ASK FOR HELP, PLEASE HELP ME!
1 vote and 5 comments so far on Reddit
@ancient summit by any chance did you play with the gamemode functions?
@echo snow What do you mean?
Welp. I've spent the last 3 days trying to get this to work and now I am so lost in all the functions and blueprints
scraps the menu and restarts
Seeking Opinions:
What's a game idea where people NEED face to face communication to succeed?
Hi, I have this function that is getting called on my eventPostLogin
but I'm getting an error "Only local player controllers can be assigned to widgets. LobbyPlayerController_C_1" is not a local player controller"
Setting up multiplayer is cancer
It can be the first few times
Network replication out of the box is the main reason I chose ue4 tho
@meager fable
You figure it out yet?
nope
I cant see really well on my phone but it looks like your calling your widget script from inside game mode blueprint?
If so the game mode blueprint only runs on server side if irc
yup it's in the game mode
The way we did it we put our widget creation script inside the player controller blueprint and had a multicast event infront. We called that multicast event from the cast node right after post logon
That way the server only makes a call to clients and the clients themselves do the widget creation on their own
I'm at work or i would send some pictures.
setting SetupLobbyMenu to multicast didn't change anything, not sure if that is what you meant
Still same error?
Ok go to where that function is in the lobby controller bp and screenshot
Watching with interest - I swear I'm going to open source a simple, working UE4 MP intro system ๐
Ok idk if this will work but we will try. Prob a way better way to do what I'm bout to tell you but doing this will tell us what the problem is.
Click and highlight the red set up lobby node. Add an input
The input type needs to be lobby player controller and it needs to be blue
On the other end in the game mode blueprint you will feed the value from player controller in.
Once you get the value of lobby player controller being passed through the function call your going back to the red node. Drage the blue out and check if its locally controlled.
On true fire the rest of the widget creation.
On false do nothing
I dont think there is a way to perform the check in the game mode or I would have you do it the other way
You could also pass the integer and just make sure it equals 0
yeah the thing is that it's not the locally controlled PC so it still does not create a widget for my clients
only for the server
Oh I see
Is that widget like for a list of players?
You want a widget for each player on every client?
Or just one for each client
yeah, list of all players, character selection ready button etc
Ok my bad
I thought it might be for individuals
Ok we need to do this differently then
Is this a listen server?
yup
IRC player controllers only exist on client. Server only one who keeps copies of them. Everyone has player controller 0. But server starts count 1 and up beyond.
In this case the way you had it setup would be okay I think
The server is the one who needs to check
Wait
Wait wait
Show me a screenshot of your player. Controller function
What it looks like now
Okay that's where the error is coming from. It's the copy the server has
We want to only fire when local.
So would that need a check for IsLocalController?
Ya but I think he tried that
yeah but that is never ran for the local controller
only for the server
not sure if I'm thinking correctly
Drag out the blue and type is locally controlled. Hook it to the branch and screenshot real wuick
I just wanna make sure what it looks like when you try it that way
Okay good. Out if false print a string and plug the blue value into the string
when i run the game i get server: Lobby player controller 1 printed out
Do you still get the error?
i dont get the error bc the code doesn
doesn't run
but i dont get the widget creation
Hmmm
Theres something I'm forgetting
I had this exact problem a few months ago and I cant remember what I did
We are on the right track hunting it down tho
Is any of the players getting a widget?
only the server
yup
Instead of locally controlled try a has authority node
that still doesn't make the function get called on the clients PC
For some reason that function isnt even getting called from game mode for the clients playercontroller
yup
Show me the pic when it gets called
Build powerful visual scripts without code.
Take away the local and authority check
See if you can replicate from server to owning client instead of multicast
There should be an option in there
that's how it was originally set up
but
oh god
I didn't make it reliable
that was the issue
Shit
My bad
I should have mentioned that
My boss is mad cuz I wont get off my phone
suppose that was hard to see from a phone hahah
I should have also seen that
np man thanks for your help
Np your very welcome
tell your boss I'm sorry for stealing his worker ๐
There are a bunch of weird caveats when working with listen server setup
I have a flash function in the hud that o can only make work on server or all other clients
I think I know how to fix it now tho
yeah I just started working with multiplayer and it's a lot to handle for a beginner
So can I ask a really dumb question? Whats the difference between local and remote?
but knowledge always comes with a bit of struggle
Ya
It gets easier
I promise
Eventually you start dreaming about blueprint nodes lol
good sleeps solves problems better than staring at your monitor till 3 AM
@ruby rock a remote would be like client pc when in terms of server. Local means the machine the code is running on.
No doubt. On the sleep. Its alot easier to solve something when rested. I went nuts on a sound loop that would reset when muted last night. Found out that inside the sound cue there is a setting called virtualize and I had to set it to play when silent
@soft girder - so would that then mean you would have a local/remote (truly remote client - connect over internet) and a local/server (listen server)
Yes but I think from the client perspective it would just be local. IRC the server only views the client as remote
That's a really good question I'm gonna have to do some digging on that to get a clear definition for remote
I think I am overthinking it - but it seems to be the root cause of what looks like 90% of ue4 networking issues ๐
I kind of think a wiki page that shows a matrix of varying options would save a lot of heartache ๐
So my next question would be if you wanted to store variables in the GameState and have those replicated out to clients, can you use RepNotify?
you can
Hey guys
it is necessary to close UDP socket on game exit on mac os OS ?
For now, when I try to close it - it just throws ERR_BAD_ACC
I have never had that error before
But I have only packaged games for windows
Does closing the socket stop the error? @clear sand
I searched for that error on google and nothing came up
nope, it actually works fine if I do not stop socket upon game shutdown
hey everyone. we are having an issue where we are trying to get a first person spectator camera in our multiplayer game. but when we set the view target to another player we are getting this stuttery lag. its not a smooth replication of what the other player is looking at on his client. any ideas?
@winged badger - how? I mean if you set a variable like "Score" to be repNotify in GameState, the notify function appears in the GameState. What if you wanted that to be created in say the PlayerController? Is there a trick there?
Does anyone know why SetViewTargetWithBlend doesnt work on clients ?
@winter stump is the listen server the one lagging?
@soft girder its a dedicated server. and the client is lagging
the issue we are having is the same issue this individual has shown in this youtube video https://www.youtube.com/watch?v=TqkE7iPwa_o&feature=youtu.be
unfortunately he never mentioned if he found the fix ๐ฆ
I had an issue with a lock on mechanic. I did something to where is was smooth on clients but was trash on server
Have you tried linear interpolating the camera to the position?
And I would also look into the network update frequencies for the actor in question.
makes sense that it could be a network update frequency issue @soft girder im looking into it now one moment
Hey
I think it's the rotator var
The rotation value that gets replicated has less precision in the decimal places.
do you know where the rotator var is?
I would still check into all that other crap I said but look for the precision of rotation
I'll be home in an hour or two
I remember seeing something about rotation precision
Its either in controller or the character bp
There is a setting that can double the number of decimal places or cut it in half. Keep in mind it would be sending bigger numbers of network
You could just manually replicate with is reliable
And then set to the number replicated
Sometimes we gotta do stuff dirty to make it work
Bam
Dp3KusMXcAA9W-O.jpg (555ร142)
This thingy
i changed it to double precision
Did it help?
still pretty laggy
Damn
I seen that vid and hiw it was snapping to locations that were just close by. Might could increase the network tick of the bp
Update rate
Is this spectator thing a built in bp?
just increased to 80 for both controller and pawn
didnt work
yeah just using SetViewTarget to view them
Oh ok
its definitely looking like its the precision. the mouse is just snapping in little increments
instead of smooth
I was gonna say could build your own spectator character class
but i guess it could be network related....
And then just set location to target location on tick
Wait should the update rate decrease or increase?
A smaller number means a smaller interval
Bigger number might make it lag more
thanks for the help man definitely pointing us in the right direction
will keep trying stuff
Hey can any one help me to change duplicate an actor if it's position is changed anyhow
@winter stump Out of curiosity, when you were testing this with the little snapping. What was the server's framerate? If you're relying on replicated variables, the server having a lower framerate will slow your replication time since you can set the replication frequency as high as you want, but it'll still only replicate once per frame and look a little snappy.
so im thinking of how things will save and load in my game. 1: save items to dynamo db on obtaining item in game and save item in save game object per unique user. 2: If user has not logged into server for more than 7 days, during server maintenance dynamodb is updated for user using users save game object and save game object for user is deleted from /Game/Saved/SavedGames. 3: If user is active within past 7 days, keep and use save game object for unique user and do not use dynamodb. 4: Dynamodb is only invoked when A: new item is obtained or B:User is returning from being absent for 7 days to recreate save game object. Does this sound good?
I dont know a whole lot about dynamodb but that sounds good to me
Sounds effective really
I am just trying to think of a way to keep requests as low as possible
Cleaning everything out every week
Could you write to the dynamo and then delete on confirmation?
but I don't want a bunch of inactive user data on the server
Right
Reading this is kind of gave me ideas on ways I could be handling arrays better
During maintaince my script would look to see who has not been logged in for 7 days. it would then set the user data to dynamodb and delete save object for user.
Yea me either but I picked it up quick using the multiplayer plugin on the maket place. 200 bux
Everything is complicated and they have a good tutorial but it is missing something things. This biggest learning curve would be learning to write your lambda functions. These are the functions you invoke from Ue4. You can write these functions to make changes to dynamobd. So yea writing your functions and making sure all you key pairs are set right in your ue4 blueprint matching the tables on your dynamodb. That way when your lambda function makes the call to dynamodb you can get set query what you need.
I have a problem in which my session joined player, can't send input to the pawn. The possession succeed but the input is like... disabled. Hm... i tried to enabled input on posses, didn't help.. any suggestions of what can cause it? why the host is getting the input normally, but clients are can't move or do any input action.
@gritty lodge If a variable is not replicated - only the client will see action triggered by this variable.
@gritty lodge there is a boolean check called is locally controlled and then there is another check called hasAuthority. the locally controlled is what it says. has authority varies to what class your working in.
@ancient summit can you screenshot the input script
make sure replicates and replicates movement is ticked
@soft girder And the Set Move Direction is connected to the "Get Set Movement" Event
are you doing sometype of custom movement?
ok
The bug occurs only when I Join A Session through a mainmenu map to a lobby map
when i open the lobby map without join a session, and just set the num of players on the multiplayer options to 2
im guessing your panel looks like this
ok
just making sure
thats odd for it to only happen through a join session
gamemode set up right or is it a gamemode base?
Set up to a custom game mode
The spawning and possesing happens on the GameMode, is it okay?
yeah
you prob have all that stuff right in the project settings defaults as well
you could switch them and switch them back. ive had bugs happen once when i moved the location of the gamestate and game mode to another folder
ya
So reset the settings and try hook it up again?
you shouldnt have to unless you moved stuff around in the content browser
like between folders
in that case you will have to right click on folders and fix up redirectors as well
you could give it a try tho
Is it okay to connect the BeginPlay and the OnPostLogin to the same function of spawning?
but when i connect it only to the begin play - only the host is spawnd
and the onpost login spawns only the clients
make sure this stuff is right
hang on ill show you what i did for that
wait thats really odd
my host spawns from event post login some how
hang on i bet it really dont fire for host
no mine fires for host and clients like this
Lol now i managed the input problem but i have different problem
cool
it's on the post login
That delay is an instant red flag to me
When i did it like u did, only the host is spawning lol
i cant remember why i had it set like that
I'm working on reconnection case and using PlayerState.EventOverrideWith on BP to get old scores. Cast to my player state class is successfull but I get default values instead of the old ones that set before quitting level. Is there something that I need to do or take care before expecting my values to be saved?
removing the delay seems to have no effect
If the camera is not set to the camera on the Character, does that mean the possession didn't work?
besides no delay
ya dont do it it exactly like i did it
thats something i wired up just to get ppl shooting each other
i did not set things up properly like playerstate and such in this project
Now the thing that happens is that the new player that joined the session
controls the host
thats what you get for using GetPlayerController/Character[Index] without fully understanding it
Yeah, I know i don't fully understand it
lol
i'd wager you have a GetPlayerController/Character[0]
evaluated from a Server RPC Event
but the thing is, its not evaluated on the client that sent the RPC
its evaluated on Server in that case
and on Server it doesn't evaluate to same Controller/Character
The thing is i don't get it
is BeginPlay is a thing that only the host does for the GameMode?
and the Event Post Login is for the clients?
can i show a screenshot of my current gamemode spawn func?
plz
you can paste it here, but i am just paying attention while im compiling
sorry Jamblax said the delay was red flag so i wondered why i had there in the first place
i packaged and we are testing
so far looks like there was no reason for it
i think i put it there when i fd my redirectors up
thinking initial setup needed more time or something
ended up being gamemode moved into a different folder and not being reset in project defaults
so even better. apparently I can use Amazon S3 to save player save games to. Then there is the new S3 Plugin that just got added to the marketplace. By doing it this way, I will avoid having to use Lambda and Dynamodb.
Any way to make the Spawn func work fine?
you will have switch on authority. put a print there you will see it run through server and client
why the delay?
you need to make a custom event
run on server
everything works without that delay so im leaving it out
Hello,
I have trouble when the player disconnects my whole game breaks cause i route everything ingame through the controller. So is there any chance not to destroy the controller on disconnect or i have to rewrite the code ?
dude is right. delay should be a red flag that something is seriously off somewhere
Lol man u took it really serious, u deleted it, it's all fine
ya but its good to be like that. later on the delay may have caused a head ache and it is bad
no some times you need the delay so other things have time to get set up but you not the best way to tackle bad code
i havent opened that gamemode in ages. i was wondering why you had to use begin play to spawn your host
i went to make sure before i told you that event postlog on should work for host
delay has its moments ๐
@stark fractal dont use controller like that
it took me a while to wrap my head around player controller
but its going bye bye when they leave so even if you called it from an array stored on server im pretty sure it wont be valid
@soft girder so i have to rewrite all the code ? :////
well there is a copy paste
fk
AHHAHAHAHA
let me see whats going thru tho
oh damn
which players go through
server teleport simp ๐
im glad im not the only one who does that
ya
things like that would need to be moved
i guess everything will stay in game state
i have 70% of the things going through in game state, i have to transfer them there
anything that deals with that player controller could stay but anything you gotta fire after its gone
well ye i understood it the hard way
when i decided to check hey whats gonna happen if i dc :/
this is my first serious multiplayer project
soo i learned a lot by now
all others were fail
i think this one will go through
cause i managed to get it work 100%
ive rebuilt my entire project prob 3 times from scratch lol
ill prob do it again after i finish blending animations
yee i've done that with my last 2 projects
i got tilted
and after i finished them i made them more optimized
from scratch*
i had one break on me but ill show you something really funny
back over a year ago when i first started i did this
HAHAHAHAHAHAHAHAAHHAAHAHAHAHAHAHAH
lol
now i have something like that
and still - the player can't ove
move*
the joined player
that looks good
i have a feeling its something to do with the movement
also i thought a switch has authority in gamemode will always be true tho?
anyways
yeah i guess... but the movment is working for the host but not the client
no, now it's not working on editor
Like when i open 2 windows
the host have input
and the client don't
okay
sounds like your getting closer
get rid of that node after tick
as long as replicates and replicates movement is set to true add movement input and set actor rotation should work automagically
hang on ill boot a test project and just plug that pic you gave up
ohh it is lol
wait does it work
on the editor it's working fine
good
you were setting that call every tick
there was no input running through that replicated call so not sure what happened on the other end
prob default values
you can add inputs to events and replicate the values through them
i dont know why i didnt say to stop that ticking call off the rip
i thought maybe you had something else going on
character movement has built in replication
vehicle movement needs to be done in c++ i think or you could wing it with a bunch of replicated functions and node mayhem
but it's not about replication
the thing is that the joined session player can't get input
not even a normal input
like a have an ability input
where is the input coming from
i think the problem is on the PostLogin/BeginPlay
because on the editor the input works fine for all of the actors
ability light moves the character?
no...
i unhooked these to just show that something like this works with the settings i posted above in replication. as long as your guys are spawning post logon they should be able to move
how many blueprints have you made in your project?
ok
i'm trying to get the host/join session to work
and than i'll keep creating the gamelevel
is it a server travel?
Sorry for being noob - How do i confirm that?
like a new map is loaded after the initial connection is made
Hmm what i want to achieve is a Main menu with server list, which leads to a lobby map which leads to a choosed map
I don't care if the lobby will be simple with ready and unready
i just can't find a tutorial which is not confusing
okay keep in mind that online subsystems dont happen in pie. for later on down the road. this is things like xbox steam ect
i want to start with lan to learn the multiplayer sub
In this video we take a look at the finished project and step through each of the features that will be covered in this series. We show our functional Main Menu and its options, a lobby where players can chat with one another and select their characters for the game, some serv...
Do i need to go back to Normal Session Instead?
this is what i went by when we set up our lobbies
I mean - Advanced Session meant for normal lan to play with my friends at home?
it's just for learning the concept
thats what we use. we have our advanced session set up for lan and online. we have a couple in the house that help test and a couple north a few states that login from ip address
i feel like since the moment i switched to advanced sessions the input went wrong
could be the case but something else i feel is amiss
something small fundamental in nature. its so odd that would cause this issue
i checked and we are not using advanced
i think advanced requires it to be used outside of the editor because no subsystem
here is how players join in our blueprint
Well, after debugging my only thought is that the problem is on the BeginPlay\OnPostLogin
yeah the problem is not there
ok
session is created and joined well
the host should be the only one creating a session
the problem is when the pawn is created and possessed
that would mean there is a problem with gamemode
did you change the class defaults of gamemode?
this
go into class settings and see what your parent class is in your gamemode?
it should say gamemode. i issue with clients not moving when it was set to gamemode base
nope
damn
if you plug in both begin play and post logon does it work?
or have you already tried that
make sure all this stuff is good as well
this is mind boggling my man
when clients join are they typing in the IP address?
how is that handled
Hello guys,
so I got this problem where the host client is not able to move after performing a seamless server travel when there is at least one other client
i dont think this is your problem but you never know where a solution may come from
i hope you figure it out man
please let me know if you do
searched client not possessing pawn in bing and google gave a few results that seem super similar to his issue
Anyone know why this print only works for the host, but the cast fails for other clients?
~~Inside NetSerializers, for example when serializing a TArray of floats, what do I have to type out to replace this: Ar << FloatsArray with ```
Ar << NumberOfFloats
if (Ar.IsLoading) FloatsArray.Empty(NumberOfFloats)
for (int i = 0; i < NumberOfFloats; i++)
{
Ar << FloatsArray[i]
}
(the intent here^ is obvious, I just want to serialize every float separately so I can also do some logic in that loop, but it's not working - its getting the sending client disconnected)
~~
Edit: got it
I'm stuck on a really silly issue. For some reason the server will also read a vector as 0,0,0 no matter how I try to set the variable. It's on a Run on Server event in PlayerController
sorry for truncating your reply @unkempt tiger
I've tried replicating the vector, setting it in GameState and replicating it, nothing seems to work, it always reads as 0 on the server
@soft girder lol I have the same issue as @ancient summit
my clients are able to receive inputs now though, when I set my parent class to Game Mode Base
without reading anything but your last @near bison , id say that you had a combination of GameMode and GameStateBase
those aren't meant to work together
and as a result your clients never called BeginPlay (called from OnRep_MatchState in GameState under the hood)
it should work if you go with GameMode and GameState (no Base part in either of them)
@ancient summit guessing i should tag you with this as well
Yup, works!
quick question: is beginplay called once for each client (when possessing a pawn?)
and by "never called BeginPlay" i meant no Actor in client's World called BeginPlay
BeginPlay is last part of Actor construction really
it has nothing to do with Possessing or Pawns specifically
server instantiates an Actor, at the end of its construction process, it calls BeginPlay
client receives a message it should spawn a replicated actor, it spawns it in, replicated variables are set, OnReps are called, BeginPlay is called
Anyone know why this print only works for the host, but the cast fails for other clients?
@near bison is there a reasonable explanation to this then?
relative to Possessing
on server, Pawn will call BeginPlay immediately before its Possessed
on clients, no Possess is called, but the Controller variable has replicated, so there is a valid controller on BeginPlay
welcome to Unreal โค๏ธ
There should be a node something like "On Possess"
i also didnt read anything but last btw
and by there is a valid controlelr on BeginPlay, i am assuming we're talking your local Pawn and your local Controller, otherwise there won't be a Controller at all, at any point
So I have to get playerstate from the controller first?
Or maybe call my player state in the controller itself?
for what?
ok I'll try to explain what i'm doing:
I enter a name in my main menu (in an input field), when "Create session" is clicked, I set that name in my game instance
since player state doesn't persist across level changes, I set it in game instance.
Now within my new level, I grab the name from game instance and set a variable called "playerName" in my playerstate
is this unnecessary? Should I just use gameInstance directly? But then variables in game instance are not replicated, I need the PlayerName variable to be replicated for future use, hence I"m shoving it into playerstate
your playerstate, after joining a session needs to RPC the PlayerName to its server instance
where you keep it, it doesn't really matter, i pull mine from steam client
Here's what I'm doing in my controller, is this wrong?
there are more ways then GI to persist data across level transitions
yes, PlayerState is perfectly capable of setting its own damn name ๐
there are more ways then GI to persist data across level transitions
@winged badger I can't use Seamless Travel in this case. Because I am using Open Level when I create a session. so I guess I can't leverage CopyProperties
you can, but that would work only for listen server host
I can't serverTravel here
why is PlayerState not doing that in its own BeginPlay?
Hmm, could try that.
and also don't just set the Name
Server RPC it so all can see it (if client)
and set it from the RPC
PlayerState is Owned by its PlayerController
so it can send and receive RPCs just fine by default
also, on server, you will have a PlayerState at BeginPlay
on clients, there is no guarantee of that whatsoever
I've narrowed my problem down. I need to make a decision based on a variable stored in GameInstance, which the server doesn't see. What's the best way to pass a variable from GameInstance to the server?
and set it from the RPC
@winged badger set it where?? the player state?
Gonna give it a shot ๐
work got in the way, PlayerState not being the same Actor means that a reference to the PlayerState and a PlayerState Actor itself both have to replicate in order for client to have a valid PlayerState on its side
and that usually doesn't happen by the time controller calls BeginPlay
Can anyone help me with the game instance? I know it's not replicated but the server is completely unable to read variables from it, even when passed from other classes (I've tried game controller, game state and player state)
you have to send variable from game instance to server via rpc from like player controller or player state
Also have you ever played LA noire?
@echo snow I have not, why do you ask? Also the dating game is a good idea!
@lapis dew in LA Noire you're a detective and one of the features of the game was the face expressions etc. gave away crimes and stuff.
@wicked brook I'm doing that but it doesn't work
post screen shot of event you are using to send it
are you using switch has authority? to make sure its executed from the client
yeah I've tried that too
have you tried setting it manually not from the passed paramater to see if it gets called and sets it?
yeah
so its not getting called?
if its not getting called then your cast must be failing. put a print string and check if its failing or not
also do you have the game instance class set up in the player settings?
yeah defo
yep
and its still failing?
or the cast passes and the event just not getting to server?
this is with RepNotify; the client who has True prints True, but the server prints False
You seem to be mixing so much stuff
yeah i dont think you should use rep notify here
Setting a RepNotify variable on Remote only is also wrong
That only sets it on that specific client
well that explains that
RepNotify is just a replicated Variable
It has to be set on the Server
You can use a ServerRPC to bring values over to the Server of course.
good to know thanks
As long as that ServerRPC is part of a ClientOwner Actor
Like PlayerController, PlayerState or a Possessed (Not BeginPlay!) Character
it doesn't work if it's only replicated either, though
This still fails on server
This should work just fine
It will set the Boolean to whatever the GameInstance value of that Player is
Obviously only on that PlayerController
I don't see where and how he is checking the variable
Using stuff like GetPlayerController0 could also be the problem
Or not realizing that there are more than 1 PlayerController on the Server
etc.
But yeah, the cast could fail
It is also important that the function in the image i Posted is guarded
By "IsLocalPlayerController"
Otherwise the Server will also call it and set the variable too
by guarded do you mean running only 'on remote'?
No
Running only on LocalController
Server's own PlayerController is a local PlayerController
But it would fail the Remote check
how do I guard it then? it's currently running form BeginPlay of player controller
Branch + "IsLocalPlayerController"
That makes sure that the function only passes locally. The PlayerController of a CLient exists on Server and themselves. So this makes sure only themselves call it.
Server PC only exists on the Server. They pass the Branch too for their own PC.
ah ok, i'll try that now then
Branch + "IsLocalPlayerController"
is this something different than "isLocallyControlled"?
No, but IsLocallyControlled is the Pawn function
It checks if the character is possessed
Or rather
If there is a valid Controller
That fails for all Simulating clients
And then checks on the Controller -> IsLocalPlayerController
that just reads as false for everyone, but only once each
You can't print directly afterwards
That's not how replication works
You are performing an RPC
That takes time
Then the Boolean has to replicate
That also takes time
That's what OnRep is for
The function calls when the values replicates
ah so that's not a good test then
A boolean is a bit shitty though
Because if it's false and you set it to false, it will not call the OnRep
Better use an Enum for that
Give it 3 values
Invalid, ConsoleOperator, XYZ
XYZ is whatever the opposite of a ConsoleOperator is in your game
Then if you set it to ConsoleOperator or XYZ, it will both cause OnRep to call, because you change from Invalid to one of them
i think that's worked now, just testing
yeah that did it, thank you! ๐ I've been stuck on that for 4 hours -_-
Can someone tell me why when i host a session, all of the players on the PIE are running as well?
Hey guys so we tried a bunch of things last night with no success in our issue. In spectate mode mouse movements are truncated and happening in stutter steps . Itโs not being smoothly replicated . Any one have any experience with this ?
Here is a video of another individual that had this issue in the past. Same exact thing as us. We have not found the fix
anyone got any idea why my character is not spawning on a client? (multiplayer)
Game mode is inheriting from Game Mode and Game State is inheriting from GameState
@winter stump I don't think Camera Rotation is smoothed
That's literally just the numbers as they come in
I want to update a widget when a player joins the game. Should I just get player controller, call a function PlayerJoined() on that Controller, and update widget from there?
I was hoping there would be a simple way to hook into player state changes directly from the widget
@near bison Not enough info to be honest. Can be a lot.
@lucid vault GetPlayerController is always local. If you want the PlayerController of the joining Player you can use "PostLogin" or "HandleStartingNewPlayer" in the GameMode and perform an RPC on it.
or you can just add a bit of code and make gamestate broadcast changes in the playerstates
or hell, have the playerstates on beginplay find the local controllers hud and say hello
(there is practically no difference between those 2 approaches)
@Cedric โeXiโ Neukirchen#4538 so is it an update rate issue ?
It's not an issue
It's the normal behaviour of replicated data
Your client has to account for an update rate that will be very different, and much lower, than its framerate
so how would we get a smooth spectator for first person . Like many of the competitive FPS games out there like Valorant
Like every multiplayer game does, through interpolation
Same way other people's characters appear smooth on your screen, while you're probably running a framerate twice the update rate
i've added the config parameters as the tutorial showed but Steam not enabled on Standalone launch?
@winged badger BeginPlay and Destroy inside of PlayerState do seem like a reliable way of notifying classes that people have joined/left.
Instead of calling a function in HUD when a player has joined/left, wouldn't it make sense to create an interface, such as IPlayerGameInfo with functions PlayerJoined() and PlayerLeft(). You could then loop through every actor that implements those interfaces to execute the appropriate function.
That way, any blueprint has the ability to listen for player's joining/leaving. Any downsides to an approach like that?
EndPlay, not Destroy
its more performant to override AddPlayer and RemovePlayer in GS to broadcast a MC delegate
and subscribe there
then making an entire interface and looping over all actors ont he level
Ah, that does make more sense
so what you think? Save and load player inventory using Amazon S3 and save game slots? Server will be the only one that can change these files on the S3. When a user gets an item for the first time it will create a .sav file for that item. It will store all information about that item. What slots item is in the inventory, how many of the item are in each stack in the inventory, its name description ect.. When a player uses an item the server will change the .sav file for that item for that user. This will prevent loading and saving big .sav files when only one change is needed.
I could even time stamp and assign unique ids to each item as they are created so that i can check for duped items and remove them every maintenance
I been all over the place with this and I am just trying to get a sound system in place.
there is no point saving name, description, etc...
its static data
can be packaged for clients inside a datatable or a dataasset
and it takes far more space then the ID, Slot, StackSize
well id will be the name from the data table that is used when creating or casting to that items save file for that item. If user gets item and cast fails create game slot based on user name and id of item. Update location in inventory item was added to or removed from. This all so that I can manage loading player inventory when they log in
this way they would have things like usernamefriendslist.sav I could handle match making to
say i am building a team during match making. I want to check if user has this this item. Match make with another player that has this item. All I would need to do is cast the itemid player name to their save slot. if cast fails they don't have that item keep looking for a player that does. I could use other tags for sav files like equipped. That way I could match players based on equipped items. The possibilities I see with this are endless.
none i'd implement would require a Cast tho
i have to see if the sav file has been created it if fails i have to create one
where does the cast come in?
Load game from slot
see the way i see it if players are inactive for 7 days their .sav files will be cleaned from server. If they log back in after their .sav file are deleted. The server will pull their .sav files from S3
any change made will be updated .sav file on server and changed on the S3
but that sounds right correct? Any change made in player inventory adding item, using item, moving item ect .... 1: change this on server and save to the .sav file on server. 2:Then save that .sav file to S3. Player loads into instance. Instance retrieves all .sav files for player if these files are not on the server or are not updated. Update could mean I needed to push a change to an item for all players or remove event items from players inventory.
would be cool to make a plugin that does all this and has a way to create admins and a cool ui in game to edit and change items for players. I see all this should be possible with the direction I want to go with it.
I am trying to replicate a radar for multiplayer but keep getting errors, I noticed if I added some code that some errors go away but not all. If I add "get controller---> cast to replicated controller" My cast fails and print screens HELLO but I have less errors. I am trying to figure out how to get rid of the errors
when I connect this code I still get a cast failed print screen but some errors go away