On the editor, this script works fine, even in dedicated server mode.
On the game, played in single player mode or non-dedicated server, it works perfectly.
I install it on my dedicated server, it sets max item quantity fine, but fails to set base item weight.
I took the max quantity out in case that was casuing the problem. it still fails to set base item weight.
I replace the equation with a physical number, “1”.
It still fails, but only on a standalone dedicated server. Everywhere else, it succeeds. Why?
I see where you are going and i did give it a go but sadly it did not fix the problem. what i don’t get is it sets max item quantity, no problem at all, but it has the problem with base item weight and only on the dedicated server. the server is up to date. It makes no sense. I wonder if it’s a bug on the server.
If that was the problem, it would not update either value, surely. also the problem would be on any server. It’s wierd. I did try the hasauthority call on it but that made no difference
Not true. Neither of those variables are replicated. Weight may only exist on the server and quantity on client. or vice versa. I honestly don’t know the specifics but in the time it took you to post that, you could have created a run on server event and tested it before just assuming it won’t work.
You probably know the saying for Assume so I won’t go into that but I will say that nowhere else in life is it as true as it is with this devkit. Never assume anything with ADK.
the properties are of the same object and the hasauthority which i did try enured it only ran on the server. besides, my editor takes ages to load. I’m unfamiliar with custom events anyway.If i was i’d give it a go.
Takes forever for everybody. Is it worth fixing your mod?
Right click -> Custom Event -> Name it something nice -> Left click the big red box that is your custom event -> On the bottom left corner you’ll see some default variables for this event -> Set Replication to Run on Server -> Check off “Reliable” -> Paste your logic into this event -> Call your event from Begin Play
Ta. well i tried it. stuck it in a custom even as instructed set it to run on the server, changed stack size size but didn’t alter weight. swiched event from server to multicast, it changed stack size but not weight. i’t got me beat. i know someone managed it using switchnetauthority. I was wondering if the problems is tha it needs to be set on teh client rather than the server but multicasting shattered that is it apparently runs the event on both.
There are a few methods you could try. You have two variables: weight, and quantity. I’ll tell you that I had a situation where the file being used wasn’t properly replicating the event to the client, so I had to use a custom event. This gives you four routes:
Begin play only
Server only
Client only
Multicast
Trying is learning. See what you can make of this.
Agreed. i did try server and multicast. the probem does seem to be writing weight. I think even it i took the changing stack size out altogether it would still fail. I’ll give the other two a go. nothing ventured.
I put some debug information on the server run where it read back the wight it had just written and it come up with this
2016.10.24-08.26.25:839] 2]2016.10.24_08.26.25: new weight is0.011111
which is correct. therefore it looks like a replication problem. I’m going to try running it as a clinet process and see what happens.
How are you testing it? If you’re testing stone, are you logging in and looking at your inventory, or dropping the stone you have and picking up a new one? Setting the event to reliable replicates it, but I guess you’ve got nothing to lose but trying a ForceReplicateNow/ForceUpdateNow whatever it is on the client
cheat commands. the resource is raw prime. I’m magicing it, putting it in a crate, taking it out. moving it around… etc I was told to turn reliable off.
forecereplicatnow/ forceupdatenow. I’ll look into them. I’m trying to get the client to read the value after it writes it but the print doesn’t seem to work. Is beginplay the right place for it?
Ok. I’ll give it a go, but the une tuorial said casting to parent classes is great as long as the properties are there as they are passed dow, but you never know with ark dev kit.
Inciedently you don’t how to get it to display the existing value on the client screent do you? Print string only seems to work in the dev kit or on none-stand alone servers.