How to using RepGraph to a BP project by myself ?
Hi, Locus, I'm sorry to disturb you again. Should I using BasicReplicationGraph.h if my project base classes are not in C++, since I can't set routings unless the bases are in c++ , right? And how much percentage can be optimize if only BasicReplicationGraph is used in BP project ?
It doesn't matter your base class is BP or not. you can set whatever you want in the LocusReplicationGraph inherited blueprint.

But your project should not be BP only because plugin itself is c++
Do I need to care about switching between different levels(or worlds)? If not, I can add all the classes that need to be added in level to ReplicationPolicySettings/ReplicationInfoSettings at once?
No you don't need to care about scenes. It's bound to NetDriver so the setting will be valid across network scenes. Yes, just add your classes there.
Got it! If the ReplicationPolicySettings/ReplicationInfoSettings is not set up, the plugin implements the basic functions, like BasicReplicationGraph, right? If so, will it be significantly optimized?
It depends, But I strongly recommend you to tweak those settings as low as possible, and expend further later on when needed.
When GetChecked my own class, will throw exception, like 'No ClassInfo found for BP_A_Gun_C'.
const bool bClassIsSpatialized = IsSpatialized(ClassRepNodePolicies.GetChecked(ReplicatedClass));

Exceptions will also be thrown after running for a period of time.


I'm not sure what caused it..
Thank you for sharing these errors, can you share me callstacks? so I can look into it. Have you added more than 200ish items in a grid?
You have to list up all networked actors in Replication Info Settings. At least it's root AActor class.
Sure!
This is the callstacks for question which exception at GetChecked .

Is there a limit on the number of items per gird?
This is the level I tested, and there will be AI generated after Playing.

BTW,I'm sorry If I don't understand your means very well. In fact, I'm not good at English. Plz forgive me. ^ ^
You have to list up all networked actors in Replication Info Settings. At least it's root AActor class.
I didn't adjust the plugin setting. I used the default settings. Is that the problem?
You have to add your gun BP to the setting list Only pawn is listed in default settings
Well, I seem to understand. Take the gun for example, I should add the gun to Replication Policy Settings and set it to NotRouted; then when Character picks up the gun, I add the gun to Character through the AddDependent Actor, and synchronize with Character. As for Character, I need to set not only Policy, but also ReplicationInfo. Is that so?
Exactly, because there's already a setting for Pawn which is parent class of Character. You don't have to. Likewise, if there's a parent class that represent all of you item classes(let's say Gun is child class of Item), you can add it into Info settings, leads all of child class(Gun, for example) will follow that that setting.
Got it! So if I don't check 'Include Child Class', even if a class inherits it, the child class won't follow its settings, right? Hypothesis,Gun is a child-class of Character and bullet is a child-class of gun(via bullet AddDependentActor to gun?). Will bullets be follow Character's settings?
I also have a question: Pawn set RepInfo but not set RepPolicy at the same time? So what knows what kind of policy it is?
Default RepPolicy for all networked actors is 'Spatialized Dynamic'. If you want 'Always relevant' or 'Spatialized static' or 'Not routed'(like your Gun), you need add your own policy for that class. You can use LocusRepGraph.PrintRouting console command to check actors' policy.
Thank you very much for your patient and detailed answer! I basically understand this part. ————————————————————————————————————————
About the params of RepGraph & RepClassInfo, I know that adjustments need to be made according to actual projects, but is there have a basic rule can follow ?
In my test scene, this error is always reported, and I tried to adjust some parameters. I reduced the cell size, increased the number of buckets, but no use also? Am I putting too many items in a small range?

And, what 's the role of Buckets?
Exactly, you're putting too many Items in small range. That error is came from pure ReplicationGraph plugin, not from mine. How's put your non-player actor to Spatialized static policy?
If you're doing some kind of stress test, you better scatter your objects into larger area. And reduce cull distance squard(to reduce view range).
Bucket is kind of a list which holds actors that should be relevant to an actor in corresponding grid. The error means that requested bucket size is too large to allocate.
Yes, that's the problem. How should I setting the rep-policy for the actor spawn in the playing? If static existence is known after spawn, set it Spatialize_Static; but if the actor can be destroyed, can it be set to Spatialize_Dormancy? If it's dormancy policy, do I need to manage the actor's dormancy attribute after setting it up?