Currently UE4 BTServices have built in random deviation. This is really convenient for breaking up AI timings so they are not all doing the exact same thing as the other ones in the scene.
void UBTService::ScheduleNextTick(uint8* NodeMemory)
{
const float NextTickTime = FMath::FRandRange(FMath::Max(0.0f, Interval - RandomDeviation), (Interval + RandomDeviation));
SetNextTickTime(NodeMemory, NextTickTime);
}
Notice there are no options for seeding this random deviation without modifying the source.
A deterministic version would allow for setting a global seed for the random deviation.
Benefits:
-
varied timing from service to service
-
rerun the same situations with the same expected outcome
-
nDisplay set up would not have to configure custom timings
-
can debug ai behavior much easier (simply rerun with the same seed included in a bug report).