Vanzin
Vanzin
SMSatisfactory Modding
Created by Vanzin on 10/26/2024 in #help-developing-mods
Help with Actor Representation not updating on Mini Map
So this worked like a charm :alpacool:
282 replies
SMSatisfactory Modding
Created by Vanzin on 10/26/2024 in #help-developing-mods
Help with Actor Representation not updating on Mini Map
Either way I will not be able to use IsWheeledVehiclePathInUse because the TargetList from the Path is not the same used in the VehicleInfo
282 replies
SMSatisfactory Modding
Created by Vanzin on 10/26/2024 in #help-developing-mods
Help with Actor Representation not updating on Mini Map
Ok, got it
282 replies
SMSatisfactory Modding
Created by Vanzin on 10/26/2024 in #help-developing-mods
Help with Actor Representation not updating on Mini Map
I meant the method
282 replies
SMSatisfactory Modding
Created by Vanzin on 10/26/2024 in #help-developing-mods
Help with Actor Representation not updating on Mini Map
ah yeah yeah
282 replies
SMSatisfactory Modding
Created by Vanzin on 10/26/2024 in #help-developing-mods
Help with Actor Representation not updating on Mini Map
It does here
if (vehicleInfo->GetTargetList() == targetList)
return true;
if (vehicleInfo->GetTargetList() == targetList)
return true;
282 replies
SMSatisfactory Modding
Created by Vanzin on 10/26/2024 in #help-developing-mods
Help with Actor Representation not updating on Mini Map
So far I understood: VehicleInfo has a reference to a Vehicle (both of them have TargetLists) but they are different
282 replies
SMSatisfactory Modding
Created by Vanzin on 10/26/2024 in #help-developing-mods
Help with Actor Representation not updating on Mini Map
Then it would be generated somewhere else not even from the Vehicle inside the VehicleInfo
282 replies
SMSatisfactory Modding
Created by Vanzin on 10/26/2024 in #help-developing-mods
Help with Actor Representation not updating on Mini Map
AFGDrivingTargetList* AFGWheeledVehicleInfo::GetTargetList() const{ return nullptr; } The result must be different then from Vehicle->GetTargetList() and AFGWheeledVehicleInfo::GetTargetList() then
282 replies
SMSatisfactory Modding
Created by Vanzin on 10/26/2024 in #help-developing-mods
Help with Actor Representation not updating on Mini Map
Hmmmmmmm, true
282 replies
SMSatisfactory Modding
Created by Vanzin on 10/26/2024 in #help-developing-mods
Help with Actor Representation not updating on Mini Map
Just from this:
if (VehicleSubsystem->IsWheeledVehiclePathInUse(Path->mTargetList, VehicleInfo))
if (VehicleSubsystem->IsWheeledVehiclePathInUse(Path->mTargetList, VehicleInfo))
To this:
if (Vehicle->GetTargetList() == Path->mTargetList)
if (Vehicle->GetTargetList() == Path->mTargetList)
282 replies
SMSatisfactory Modding
Created by Vanzin on 10/26/2024 in #help-developing-mods
Help with Actor Representation not updating on Mini Map
no change in the savegame
282 replies
SMSatisfactory Modding
Created by Vanzin on 10/26/2024 in #help-developing-mods
Help with Actor Representation not updating on Mini Map
yes
282 replies
SMSatisfactory Modding
Created by Vanzin on 10/26/2024 in #help-developing-mods
Help with Actor Representation not updating on Mini Map
returns false, But with the vehicleInfo->GetTargetList() == Path->mTargetList that I added later, it works fine
282 replies
SMSatisfactory Modding
Created by Vanzin on 10/26/2024 in #help-developing-mods
Help with Actor Representation not updating on Mini Map
Yeah and then compares vehicleInfo->GetTargetList() with the TargetList in the parameters (in my case Path->mTargetList)
282 replies
SMSatisfactory Modding
Created by Vanzin on 10/26/2024 in #help-developing-mods
Help with Actor Representation not updating on Mini Map
I mean, not sure, what?
282 replies
SMSatisfactory Modding
Created by Vanzin on 10/26/2024 in #help-developing-mods
Help with Actor Representation not updating on Mini Map
FString TextFilter = "";
TSubclassOf<AFGWheeledVehicle> TypeFilter = VehicleInfo->GetClass();
TArray<AFGSavedWheeledVehiclePath*> Paths;
VehicleSubsystem->FindSavedWheeledVehiclePaths(TextFilter, TypeFilter, VehicleInfo, Paths);

AFGWheeledVehicle* Vehicle = VehicleInfo->GetVehicle();
if (Vehicle)
{
bool isPathFound = false;
for (AFGSavedWheeledVehiclePath* Path : Paths)
{
if (Path && Path->mTargetList)
{
if (VehicleSubsystem->IsWheeledVehiclePathInUse(Path->mTargetList, VehicleInfo))
{
this->mDynamicRepresentationText = FText::FromString(Path->mPathName);
UE_LOG(YouNameIt_Log, Verbose, TEXT("[SetupActorRepresentation][%s] Vehicle is using Path: %s"), *Name, *Path->mPathName);
isPathFound = true;
break;
}

UE_LOG(YouNameIt_Log, Verbose, TEXT("[SetupActorRepresentation][%s] Vehicle is not using Path: %s"), *Name, *Path->mPathName);
}
}

if (!isPathFound)
{
UE_LOG(YouNameIt_Log, Verbose, TEXT("[SetupActorRepresentation][%s] No paths are in use by the vehicle"), *Name);
}
}
else
{
UE_LOG(YouNameIt_Log, Verbose, TEXT("[SetupActorRepresentation][%s] No vehicle object"), *Name);
}
FString TextFilter = "";
TSubclassOf<AFGWheeledVehicle> TypeFilter = VehicleInfo->GetClass();
TArray<AFGSavedWheeledVehiclePath*> Paths;
VehicleSubsystem->FindSavedWheeledVehiclePaths(TextFilter, TypeFilter, VehicleInfo, Paths);

AFGWheeledVehicle* Vehicle = VehicleInfo->GetVehicle();
if (Vehicle)
{
bool isPathFound = false;
for (AFGSavedWheeledVehiclePath* Path : Paths)
{
if (Path && Path->mTargetList)
{
if (VehicleSubsystem->IsWheeledVehiclePathInUse(Path->mTargetList, VehicleInfo))
{
this->mDynamicRepresentationText = FText::FromString(Path->mPathName);
UE_LOG(YouNameIt_Log, Verbose, TEXT("[SetupActorRepresentation][%s] Vehicle is using Path: %s"), *Name, *Path->mPathName);
isPathFound = true;
break;
}

UE_LOG(YouNameIt_Log, Verbose, TEXT("[SetupActorRepresentation][%s] Vehicle is not using Path: %s"), *Name, *Path->mPathName);
}
}

if (!isPathFound)
{
UE_LOG(YouNameIt_Log, Verbose, TEXT("[SetupActorRepresentation][%s] No paths are in use by the vehicle"), *Name);
}
}
else
{
UE_LOG(YouNameIt_Log, Verbose, TEXT("[SetupActorRepresentation][%s] No vehicle object"), *Name);
}
282 replies
SMSatisfactory Modding
Created by Vanzin on 10/26/2024 in #help-developing-mods
Help with Actor Representation not updating on Mini Map
In my case: I was providing the VehicleInfo and the targetlist from the Path
282 replies
SMSatisfactory Modding
Created by Vanzin on 10/26/2024 in #help-developing-mods
Help with Actor Representation not updating on Mini Map
it's comparing the vehicle target list with the target list that you provide in the parameter
282 replies
SMSatisfactory Modding
Created by Vanzin on 10/26/2024 in #help-developing-mods
Help with Actor Representation not updating on Mini Map
exactly what I did .-. Right?
282 replies