FreakinaBox
FreakinaBox
SMSatisfactory Modding
Created by Eli on 10/27/2024 in #help-using-mods
Modular Load Balancers lots of lag on server
great!, you want me to open an mr in a few weeks or dm you?
37 replies
SMSatisfactory Modding
Created by Eli on 10/27/2024 in #help-using-mods
Modular Load Balancers lots of lag on server
is the mod available somewhere?
37 replies
SMSatisfactory Modding
Created by Eli on 10/27/2024 in #help-using-mods
Modular Load Balancers lots of lag on server
didnt dm cause I know some people dont like random people dming them
37 replies
SMSatisfactory Modding
Created by Eli on 10/27/2024 in #help-using-mods
Modular Load Balancers lots of lag on server
@SirDigby I just converted linked machines to multithreaded C++ and was wondering if you would let me take a crack at doing the same with my favorite mod? assuming your not using C already for moving the items around. I have an idea for a balancer algorithm that should be pretty performant. After I am done I would hand it all back to you. I also think that I can handle the upcoming problem that snapon is going to have when they change how splitters tick.
37 replies
SMSatisfactory Modding
Created by FreakinaBox on 11/10/2024 in #modding-resources
How to make your own Factory Tick ish group
updated with my final code, I do simpler math and accept that there will be a few nullPtrs that need skipped
12 replies
SMSatisfactory Modding
Created by FreakinaBox on 11/10/2024 in #modding-resources
How to make your own Factory Tick ish group
Ok, So since there is a max queue size we split our for loop into 8 groups and each group runs in a separate thread. makes sense. is it worth detecting how many cores the pc has and base our thread count on that?
12 replies
SMSatisfactory Modding
Created by FreakinaBox on 11/10/2024 in #modding-resources
How to make your own Factory Tick ish group
My Tickable Interface
C++
UINTERFACE(MinimalAPI)
class UAIO_Tickable : public UInterface {
GENERATED_BODY()
};

class ALIENIO_API IAIO_Tickable {
GENERATED_BODY()

public:
virtual void AioTick(float DeltaTime) = 0;
};
C++
UINTERFACE(MinimalAPI)
class UAIO_Tickable : public UInterface {
GENERATED_BODY()
};

class ALIENIO_API IAIO_Tickable {
GENERATED_BODY()

public:
virtual void AioTick(float DeltaTime) = 0;
};
12 replies
SMSatisfactory Modding
Created by FreakinaBox on 11/10/2024 in #modding-resources
How to make your own Factory Tick ish group
My Tickable Actor
C++
class ALIENIO_API UAIO_ComponentBase : public UActorComponent, public IAIO_Tickable {
GENERATED_BODY()
public:
UAIO_ComponentBase() {
// made my own that doesnt turn off when i am not close!
PrimaryComponentTick.bCanEverTick = false;
}

UFUNCTION()
virtual void AioTick() override {
//Do your thing in your own thread
}

protected:
UPROPERTY()
TObjectPtr<AAIO_SubsystemBase> Subsystem;
// use me when you need to make sure that 2 threads dont access the same thing at the same time
FCriticalSection InventoryLock;

virtual void BeginPlay() override {
Super::BeginPlay();

// register with subsystem
const auto World = GetWorld();
if (!IsValid(World)) return;
const auto SubsystemActorManager = World->GetSubsystem<USubsystemActorManager>();
if (!IsValid(SubsystemActorManager)) return;
Subsystem = SubsystemActorManager->GetSubsystemActor<AAIO_SubsystemBase>();
if (!IsValid(Subsystem)) return;
Subsystem->RegisterManager(this);
};

virtual void EndPlay(const EEndPlayReason::Type EndPlayReason) override {
Super::EndPlay(EndPlayReason);
Subsystem->UnregisterManager(this);
}
};
C++
class ALIENIO_API UAIO_ComponentBase : public UActorComponent, public IAIO_Tickable {
GENERATED_BODY()
public:
UAIO_ComponentBase() {
// made my own that doesnt turn off when i am not close!
PrimaryComponentTick.bCanEverTick = false;
}

UFUNCTION()
virtual void AioTick() override {
//Do your thing in your own thread
}

protected:
UPROPERTY()
TObjectPtr<AAIO_SubsystemBase> Subsystem;
// use me when you need to make sure that 2 threads dont access the same thing at the same time
FCriticalSection InventoryLock;

virtual void BeginPlay() override {
Super::BeginPlay();

// register with subsystem
const auto World = GetWorld();
if (!IsValid(World)) return;
const auto SubsystemActorManager = World->GetSubsystem<USubsystemActorManager>();
if (!IsValid(SubsystemActorManager)) return;
Subsystem = SubsystemActorManager->GetSubsystemActor<AAIO_SubsystemBase>();
if (!IsValid(Subsystem)) return;
Subsystem->RegisterManager(this);
};

virtual void EndPlay(const EEndPlayReason::Type EndPlayReason) override {
Super::EndPlay(EndPlayReason);
Subsystem->UnregisterManager(this);
}
};
12 replies
SMSatisfactory Modding
Created by Meepow on 10/24/2024 in #help-using-mods
Lots of Linked Machines cause drop performance
No description
30 replies
SMSatisfactory Modding
Created by Meepow on 10/24/2024 in #help-using-mods
Lots of Linked Machines cause drop performance
tried it out again and fps is good but it cant keep up with my feeder belts. Is there a github I can look at and brainstorm on the balancer algorithm?
30 replies
SMSatisfactory Modding
Created by Eli on 10/27/2024 in #help-using-mods
Modular Load Balancers lots of lag on server
I was using mostly filters since all my factory was on 1 mlb group
37 replies
SMSatisfactory Modding
Created by Eli on 10/27/2024 in #help-using-mods
Modular Load Balancers lots of lag on server
Nope I'm on single player
37 replies
SMSatisfactory Modding
Created by Eli on 10/27/2024 in #help-using-mods
Modular Load Balancers lots of lag on server
I can verify this, removing MLB took me from 20 fps to over 100 having 100ish MLB in 1 group feeding every machine in my factory
37 replies
SMSatisfactory Modding
Created by Meepow on 10/24/2024 in #help-using-mods
Lots of Linked Machines cause drop performance
I wonder if this is a problem with how many machies are in 1 group. ived noticed items from the other side of my factory getting placed into inventories after the last bug fix
30 replies
SMSatisfactory Modding
Created by Meepow on 10/24/2024 in #help-using-mods
Lots of Linked Machines cause drop performance
ya so this or MLB brings be down from 100fps to 20 and both together bring me to 8
30 replies
SMSatisfactory Modding
Created by Meepow on 10/24/2024 in #help-using-mods
Lots of Linked Machines cause drop performance
No description
30 replies
SMSatisfactory Modding
Created by Meepow on 10/24/2024 in #help-using-mods
Lots of Linked Machines cause drop performance
No description
30 replies
SMSatisfactory Modding
Created by Meepow on 10/24/2024 in #help-using-mods
Lots of Linked Machines cause drop performance
I just had to drop linked machines cause of the lag it was causing 😦 I am on version 1.0.5 wondering if it is possible to link all the machines to the same inventory instance instead of balancing multiple inventories? if not maybe an on on insert hook that round robbins the different inventories? not sure what is possible but I might have to get into modding
30 replies
SMSatisfactory Modding
Created by FreakinaBox on 10/15/2024 in #help-using-mods
Linked Machines not using all machines in line
looking good
13 replies
SMSatisfactory Modding
Created by FreakinaBox on 10/15/2024 in #help-using-mods
Linked Machines not using all machines in line
Thanks Ill test asap
13 replies