#pragma once #include #include #include #include #include "PalIndividual.hpp" #include "PalTypes.hpp" namespace PalUIExtension::Api::Pal { class PalIndividualCharacterParameter : public UnrealWrapper { public: static auto ClassPath() -> const TCHAR* { return STR("/Script/Pal.PalIndividualCharacterParameter"); } static auto DebugTag() -> const TCHAR* { return STR("PalIndividualCharacterParameter"); } PalIndividualCharacterParameter() = default; explicit PalIndividualCharacterParameter(UObject* Obj) : UnrealWrapper(Obj, ClassOf(), DebugTag()) {} // ---- identity --------------------------------------------------- auto GetCharacterID() -> std::optional { return CallForReturn(STR("GetCharacterID")); } auto GetUniqueNPCID() -> std::optional { return CallForReturn(STR("GetUniqueNPCID")); } auto GetSkinName() -> std::optional { return CallForReturn(STR("GetSkinName")); } auto GetGenderType() -> std::optional { return CallForReturn(STR("GetGenderType")); } auto GetTribeID() -> std::optional { return CallForReturn(STR("GetTribeID")); } auto IsRarePal() -> std::optional { return CallForReturn(STR("IsRarePal")); } auto IsFavoritePal() -> std::optional { return CallForReturn(STR("IsFavoritePal")); } auto GetFavoriteIndex() -> std::optional { return CallForReturn(STR("GetFavoriteIndex")); } auto IsSkinApplied() -> std::optional { return CallForReturn(STR("IsSkinApplied")); } auto GetSkinAppliedCharacterId() -> std::optional { return CallForReturn(STR("GetSkinAppliedCharacterId")); } auto GetPalId() -> std::optional { struct P { alignas(8) uint8 Frame[48]; } p{}; // FPalInstanceID if (!Call(STR("GetPalId"), p)) return std::nullopt; FPalInstanceID Out{}; std::memcpy(&Out, p.Frame, sizeof(Out)); return Out; } // Nickname getters auto GetNickname() -> std::optional { struct P { FString OutName; } p{}; if (!Call(STR("GetNickname"), p)) return std::nullopt; return p.OutName; } auto GetNickNameWithOnlineID() -> std::optional { struct P { FString OutName; } p{}; if (!Call(STR("GetNickNameWithOnlineID"), p)) return std::nullopt; return p.OutName; } auto GetNickNameByCheckBlockedUser() -> std::optional { struct P { FString OutName; } p{}; if (!Call(STR("GetNickNameByCheckBlockedUser"), p)) return std::nullopt; return p.OutName; } // ---- level / experience ------------------------------------------ auto GetLevel() -> std::optional { return CallForReturn(STR("GetLevel")); } auto IsLevelMax() -> std::optional { return CallForReturn(STR("IsLevelMax")); } auto GetExp() -> std::optional { return CallForReturn(STR("GetExp")); } auto GetRank() -> std::optional { return CallForReturn(STR("GetRank")); } auto GetRankUpExp() -> std::optional { return CallForReturn(STR("GetRankUpExp")); } auto GetPalSoulRank() -> std::optional { return CallForReturn(STR("GetPalSoulRank")); } auto IsOverrideLevel() -> std::optional { return CallForReturn(STR("IsOverrideLevel")); } auto GetOverrideLevel() -> std::optional { return CallForReturn(STR("GetOverrideLevel")); } auto SetOverrideLevel(int32 OverrideLevel) -> bool { struct P { int32 OverrideLevel; } p{ OverrideLevel }; return Call(STR("SetOverrideLevel"), p); } // ---- HP / shield / death ----------------------------------------- auto GetHP() -> std::optional { return CallForReturn(STR("GetHP")); } auto GetMaxHP_withBuff() -> std::optional { return CallForReturn(STR("GetMaxHP_withBuff")); } auto GetMaxHP() -> std::optional { return CallForReturn(STR("GetMaxHP")); } auto GetHPRank() -> std::optional { return CallForReturn(STR("GetHPRank")); } auto GetShieldHP() -> std::optional { return CallForReturn(STR("GetShieldHP")); } auto GetShieldMaxHP() -> std::optional { return CallForReturn(STR("GetShieldMaxHP")); } auto GetCurrentPhaseHPLimit() -> std::optional { struct P { FFixedPoint64_ OutPhaseHPLimit; bool ReturnValue; } p{ {}, false }; auto Result = CallForReturn(STR("GetCurrentPhaseHPLimit"), p, &P::ReturnValue); if (!Result || !*Result) return std::nullopt; return p.OutPhaseHPLimit; } auto IsPhaseHPLimitValid() -> std::optional { return CallForReturn(STR("IsPhaseHPLimitValid")); } auto AddHP(FFixedPoint64_ PlusHP) -> bool { struct P { FFixedPoint64_ PlusHP; } p{ PlusHP }; return Call(STR("AddHP"), p); } auto FullRecoveryHP() -> bool { return CallVoid(STR("FullRecoveryHP")); } auto IsHPFullRecovered() -> std::optional { return CallForReturn(STR("IsHPFullRecovered")); } auto SetShieldHP(FFixedPoint64_ NextShieldHP) -> bool { struct P { FFixedPoint64_ NextSheildHP; } p{ NextShieldHP }; // engine spelling return Call(STR("SetShieldHP"), p); } auto SetShieldMaxHP(FFixedPoint64_ NextShieldMaxHP) -> bool { struct P { FFixedPoint64_ NextSheildMaxHP; } p{ NextShieldMaxHP }; // engine spelling return Call(STR("SetShieldMaxHP"), p); } auto DecreaseShieldHPByDamage(int32 Damage) -> bool { struct P { int32 Damage; } p{ Damage }; return Call(STR("DecreaseShieldHPByDamage"), p); } auto IsDead() -> std::optional { return CallForReturn(STR("IsDead")); } auto GetPhysicalHealth() -> std::optional { return CallForReturn(STR("GetPhysicalHealth")); } auto SetPhysicalHealth(EPalStatusPhysicalHealthType_ PhysicalHealth) -> bool { struct P { EPalStatusPhysicalHealthType_ PhysicalHealth; } p{ PhysicalHealth }; return Call(STR("SetPhysicalHealth"), p); } auto IsRespawnReady() -> std::optional { return CallForReturn(STR("IsRespawnReady")); } auto GetRespawnTime() -> std::optional { return CallForReturn(STR("GetRespawnTime")); } // ---- combat stats ------------------------------------------------- auto GetMeleeAttack() -> std::optional { return CallForReturn(STR("GetMeleeAttack")); } auto GetMeleeAttack_withBuff() -> std::optional { return CallForReturn(STR("GetMeleeAttack_withBuff")); } auto GetShotAttack() -> std::optional { return CallForReturn(STR("GetShotAttack")); } auto GetShotAttack_withBuff() -> std::optional { return CallForReturn(STR("GetShotAttack_withBuff")); } auto GetDefense() -> std::optional { return CallForReturn(STR("GetDefense")); } auto GetDefense_withBuff() -> std::optional { return CallForReturn(STR("GetDefense_withBuff")); } auto GetAttackRank() -> std::optional { return CallForReturn(STR("GetAttackRank")); } auto GetDefenceRank() -> std::optional { return CallForReturn(STR("GetDefenceRank")); } auto HasMasteredWaza(EPalWazaID_ WazaID) -> std::optional { struct P { EPalWazaID_ WazaID; bool ReturnValue; } p{ WazaID, false }; return CallForReturn(STR("HasMasteredWaza"), p, &P::ReturnValue); } auto AddEquipWaza(EPalWazaID_ WazaID) -> bool { struct P { EPalWazaID_ WazaID; } p{ WazaID }; return Call(STR("AddEquipWaza"), p); } auto RemoveEquipWaza(EPalWazaID_ WazaID) -> bool { struct P { EPalWazaID_ WazaID; } p{ WazaID }; return Call(STR("RemoveEquipWaza"), p); } auto ClearEquipWaza() -> bool { return CallVoid(STR("ClearEquipWaza")); } // ---- sanity / hunger / stomach ------------------------------------ auto GetSanityValue() -> std::optional { return CallForReturn(STR("GetSanityValue")); } auto GetMaxSanityValue() -> std::optional { return CallForReturn(STR("GetMaxSanityValue")); } auto GetSanityRate() -> std::optional { return CallForReturn(STR("GetSanityRate")); } auto GetAffectSanityValue() -> std::optional { return CallForReturn(STR("GetAffectSanityValue")); } auto GetHungerType() -> std::optional { return CallForReturn(STR("GetHungerType")); } auto GetFullStomach() -> std::optional { return CallForReturn(STR("GetFullStomach")); } auto GetMaxFullStomach() -> std::optional { return CallForReturn(STR("GetMaxFullStomach")); } auto GetFullStomachRate() -> std::optional { return CallForReturn(STR("GetFullStomachRate")); } auto GetFullStomachDecreasingRate() -> std::optional { return CallForReturn(STR("GetFullStomachDecreasingRate")); } auto IsFullStomachDecreaseStoppedByFood() -> std::optional { return CallForReturn(STR("IsFullStomachDecreaseStoppedByFood")); } auto SetFullStomach(float NextValue) -> bool { struct P { float NextValue; } p{ NextValue }; return Call(STR("SetFullStomach"), p); } auto SetDecreaseFullStomachRates(FName Name, float Rate) -> bool { struct P { FName Name; float Rate; } p{ Name, Rate }; return Call(STR("SetDecreaseFullStomachRates"), p); } auto RemoveDecreaseFullStomachRates(FName Name) -> bool { struct P { FName Name; } p{ Name }; return Call(STR("RemoveDecreaseFullStomachRates"), p); } auto GetEffectFoodName() -> std::optional { return CallForReturn(STR("GetEffectFoodName")); } auto GetEffectFoodName_FullStomachKeep() -> std::optional { return CallForReturn(STR("GetEffectFoodName_FullStomachKeep")); } auto GetEffectFoodTimeRate() -> std::optional { return CallForReturn(STR("GetEffectFoodTimeRate")); } auto GetEffectFoodTimeRate_FullStomachKeep() -> std::optional { return CallForReturn(STR("GetEffectFoodTimeRate_FullStomachKeep")); } auto GetFoodStatusRate(EPalFoodStatusEffectType_ EffectType) -> std::optional { struct P { EPalFoodStatusEffectType_ EffectType; float ReturnValue; } p{ EffectType, 0.f }; return CallForReturn(STR("GetFoodStatusRate"), p, &P::ReturnValue); } // ---- friendship ----------------------------------------------------- auto GetFriendshipRank() -> std::optional { return CallForReturn(STR("GetFriendshipRank")); } auto GetFriendshipPoint() -> std::optional { return CallForReturn(STR("GetFriendshipPoint")); } auto AddFriendShip(int32 Value, bool bApplyPassiveSkill) -> bool { struct P { int32 Value; bool bApplyPassiveSkill; } p{ Value, bApplyPassiveSkill }; return Call(STR("AddFriendShip"), p); } // ---- status points -------------------------------------------------- auto GetUnusedStatusPoint() -> std::optional { return CallForReturn(STR("GetUnusedStatusPoint")); } auto DecrementUnusedStatusPoint() -> bool { return CallVoid(STR("DecrementUnusedStatusPoint")); } auto IsStatusPointAllMax() -> std::optional { return CallForReturn(STR("IsStatusPointAllMax")); } auto GetStatusPoint(FName StatusName) -> std::optional { struct P { FName StatusName; int32 ReturnValue; } p{ StatusName, 0 }; return CallForReturn(STR("GetStatusPoint"), p, &P::ReturnValue); } auto GetTotalStatusPoint(FName StatusName) -> std::optional { struct P { FName StatusName; int32 ReturnValue; } p{ StatusName, 0 }; return CallForReturn(STR("GetTotalStatusPoint"), p, &P::ReturnValue); } auto GetExStatusPoint(FName StatusName) -> std::optional { struct P { FName StatusName; int32 ReturnValue; } p{ StatusName, 0 }; return CallForReturn(STR("GetExStatusPoint"), p, &P::ReturnValue); } auto SetStatusPoint(FName StatusName, int32 Point) -> bool { struct P { FName StatusName; int32 Point; } p{ StatusName, Point }; return Call(STR("SetStatusPoint"), p); } auto SetExStatusPoint(FName StatusName, int32 Point) -> bool { struct P { FName StatusName; int32 Point; } p{ StatusName, Point }; return Call(STR("SetExStatusPoint"), p); } // Two outputs (bool return + int32& out), same non-CallForReturn // shape as CheckValidWorkSuitability in PalDetailWidget.hpp. auto IsStatusPointAddable(FName StatusName) -> std::optional { struct P { FName StatusName; int32 AddablePoint; bool ReturnValue; } p{ StatusName, 0, false }; if (!Call(STR("IsStatusPointAddable"), p) || !p.ReturnValue) return std::nullopt; return p.AddablePoint; } // ---- work suitability ------------------------------------------------- auto GetCurrentWorkSuitability() -> std::optional { return CallForReturn(STR("GetCurrentWorkSuitability")); } auto GetWorkSpeedRank() -> std::optional { return CallForReturn(STR("GetWorkSpeedRank")); } auto GetCraftSpeed() -> std::optional { return CallForReturn(STR("GetCraftSpeed")); } auto GetCraftSpeed_withBuff() -> std::optional { return CallForReturn(STR("GetCraftSpeed_withBuff")); } auto GetCraftSpeedSickRate() -> std::optional { return CallForReturn(STR("GetCraftSpeedSickRate")); } auto GetBaseCampCraftSpeedBuffRate() -> std::optional { return CallForReturn(STR("GetBaseCampCraftSpeedBuffRate")); } auto GetWorkerSick() -> std::optional { return CallForReturn(STR("GetWorkerSick")); } auto GetBaseCampWorkerEventType() -> std::optional { return CallForReturn(STR("GetBaseCampWorkerEventType")); } auto HasWorkSuitability(EPalWorkSuitability_ Suitability) -> std::optional { struct P { EPalWorkSuitability_ InWorkSuitability; bool ReturnValue; } p{ Suitability, false }; return CallForReturn(STR("HasWorkSuitability"), p, &P::ReturnValue); } auto HasWorkSuitabilityRank(EPalWorkSuitability_ Suitability, int32 Rank) -> std::optional { struct P { EPalWorkSuitability_ InWorkSuitability; int32 SuitabilityRank; bool ReturnValue; } p{ Suitability, Rank, false }; return CallForReturn(STR("HasWorkSuitabilityRank"), p, &P::ReturnValue); } auto GetWorkSuitabilityRank(EPalWorkSuitability_ Suitability) -> std::optional { struct P { EPalWorkSuitability_ InWorkSuitability; int32 ReturnValue; } p{ Suitability, 0 }; return CallForReturn(STR("GetWorkSuitabilityRank"), p, &P::ReturnValue); } auto GetWorkSuitabilityRankWithCharacterRank(EPalWorkSuitability_ Suitability) -> std::optional { struct P { EPalWorkSuitability_ WorkSuitability; int32 ReturnValue; } p{ Suitability, 0 }; return CallForReturn(STR("GetWorkSuitabilityRankWithCharacterRank"), p, &P::ReturnValue); } auto GetRankBasedWorkSuitabilityBonus(EPalWorkSuitability_ Suitability) -> std::optional { struct P { EPalWorkSuitability_ WorkSuitability; int32 ReturnValue; } p{ Suitability, 0 }; return CallForReturn(STR("GetRankBasedWorkSuitabilityBonus"), p, &P::ReturnValue); } auto GetCraftSpeedByWorkSuitability(EPalWorkSuitability_ Suitability) -> std::optional { struct P { EPalWorkSuitability_ WorkSuitability; int32 ReturnValue; } p{ Suitability, 0 }; return CallForReturn(STR("GetCraftSpeedByWorkSuitability"), p, &P::ReturnValue); } auto GetCraftSpeedBuffRate(EPalWorkSuitability_ Suitability) -> std::optional { struct P { EPalWorkSuitability_ WorkSuitability; float ReturnValue; } p{ Suitability, 0.f }; return CallForReturn(STR("GetCraftSpeedBuffRate"), p, &P::ReturnValue); } auto GetCraftSpeed_withBuff_WorkSuitability(EPalWorkSuitability_ Suitability) -> std::optional { struct P { EPalWorkSuitability_ Suitability; int32 ReturnValue; } p{ Suitability, 0 }; return CallForReturn(STR("GetCraftSpeed_withBuff_WorkSuitability"), p, &P::ReturnValue); } auto SetWorkSuitabilityAddRank(EPalWorkSuitability_ Suitability, int32 AddRank) -> bool { struct P { EPalWorkSuitability_ WorkSuitability; int32 addRank; } p{ Suitability, AddRank }; return Call(STR("SetWorkSuitabilityAddRank"), p); } // ---- passive skills --------------------------------------------------- // // GetPassiveSkillList (TArray) is NOT wrapped -- see class // comment. Add/Remove take scalar FName params, no such problem. auto AddPassiveSkill(FName AddSkill, FName OverrideSkill) -> bool { struct P { FName AddSkill; FName OverrideSkill; } p{ AddSkill, OverrideSkill }; return Call(STR("AddPassiveSkill"), p); } auto RemovePassiveSkill(FName SkillId) -> bool { struct P { FName SkillId; } p{ SkillId }; return Call(STR("RemovePassiveSkill"), p); } auto GetPassiveRateBySkillEffect(EPalPassiveSkillEffectType_ EffectType) -> std::optional { struct P { EPalPassiveSkillEffectType_ EffectType; float ReturnValue; } p{ EffectType, 0.f }; return CallForReturn(STR("GetPassiveRateBySkillEffect"), p, &P::ReturnValue); } auto GetPassiveRateByEquipment(EPalPassiveSkillEffectType_ EffectType) -> std::optional { struct P { EPalPassiveSkillEffectType_ EffectType; float ReturnValue; } p{ EffectType, 0.f }; return CallForReturn(STR("GetPassiveRateByEquipment"), p, &P::ReturnValue); } // ---- classification / misc flags --------------------------------------- auto GetSizeType() -> std::optional { return CallForReturn(STR("GetSizeType")); } auto GetGroupType() -> std::optional { return CallForReturn(STR("GetGroupType")); } auto GetGroupId() -> std::optional { return CallForReturn(STR("GetGroupId")); } auto GetBaseCampId() -> std::optional { return CallForReturn(STR("GetBaseCampId")); } auto GetArenaRank() -> std::optional { return CallForReturn(STR("GetArenaRank")); } auto GetArenaRankPoint() -> std::optional { return CallForReturn(STR("GetArenaRankPoint")); } auto IsInArena() -> std::optional { return CallForReturn(STR("IsInArena")); } auto IsInRaidArea() -> std::optional { return CallForReturn(STR("IsInRaidArea")); } auto IsUncapturable() -> std::optional { return CallForReturn(STR("IsUncapturable")); } auto IsForceCapturable() -> std::optional { return CallForReturn(STR("IsForceCapturable")); } auto IsAwakening() -> std::optional { return CallForReturn(STR("IsAwakening")); } auto IsPartBroken() -> std::optional { return CallForReturn(STR("IsPartBroken")); } auto IsParts() -> std::optional { return CallForReturn(STR("IsParts")); } auto GetParentParameterObject() -> UObject* { struct P { UObject* ReturnValue; } p{ nullptr }; auto Result = CallForReturn(STR("GetParentParameter"), p, &P::ReturnValue); return (Result && *Result) ? *Result : nullptr; } auto IsAssignedToExpedition() -> std::optional { return CallForReturn(STR("IsAssignedToExpedition")); } auto IsAssignedToExpeditionIn(FGuid_ MapObjectId) -> std::optional { struct P { FGuid_ MapObjectConcreteInstanceId; bool ReturnValue; } p{ MapObjectId, false }; return CallForReturn(STR("IsAssignedToExpeditionIn"), p, &P::ReturnValue); } auto IsExcludedFromTeamMission() -> std::optional { return CallForReturn(STR("IsExcludedFromTeamMission")); } auto CanTargetFromAI() -> std::optional { return CallForReturn(STR("CanTargetFromAI")); } auto HasGenusCategory(EPalGenusCategoryType_ Category) -> std::optional { struct P { EPalGenusCategoryType_ Category; bool ReturnValue; } p{ Category, false }; return CallForReturn(STR("HasGenusCategory"), p, &P::ReturnValue); } auto CanAddTalentByItem(FName ItemName) -> std::optional { struct P { FName ItemName; bool ReturnValue; } p{ ItemName, false }; return CallForReturn(STR("CanAddTalentByItem"), p, &P::ReturnValue); } auto GetNPCWeaponType() -> std::optional { return CallForReturn(STR("GetNPCWeaponType")); } auto GetEquipItemContainerId() -> std::optional { return CallForReturn(STR("GetEquipItemContainerId")); } auto SetUncapturable(bool bInUncapturable) -> bool { struct P { bool bInUncapturable; } p{ bInUncapturable }; return Call(STR("SetUncapturable"), p); } auto SetForceCapturable(bool bInForceCapturable) -> bool { struct P { bool bInForceCapturable; } p{ bInForceCapturable }; return Call(STR("SetForceCapturable"), p); } auto SetInArena(bool InArena) -> bool { struct P { bool InArena; } p{ InArena }; return Call(STR("SetInArena"), p); } auto SetInRaidArea(bool InRaidArea) -> bool { struct P { bool InRaidArea; } p{ InRaidArea }; return Call(STR("SetInRaidArea"), p); } auto SetCanTargetFromAI(bool bInCanTargetFromAI) -> bool { struct P { bool bInCanTargetFromAI; } p{ bInCanTargetFromAI }; return Call(STR("SetCanTargetFromAI"), p); } auto SetSkinName(FName InSkinName) -> bool { struct P { FName InSkinName; } p{ InSkinName }; return Call(STR("SetSkinName"), p); } auto SetSkinAppliedCharacterId(FGuid_ InCharacterId) -> bool { struct P { FGuid_ InCharacterId; } p{ InCharacterId }; return Call(STR("SetSkinAppliedCharacterId"), p); } auto SetSecurityPoliceTargetPlayerId(FGuid_ PlayerId) -> bool { struct P { FGuid_ PlayerId; } p{ PlayerId }; return Call(STR("SetSecurityPoliceTargetPlayerId"), p); } auto SetInvaderData(EPalInvaderType_ InvaderType, FGuid_ InBaseCampId) -> bool { struct P { EPalInvaderType_ InvaderType; FGuid_ InBaseCampId; } p{ InvaderType, InBaseCampId }; return Call(STR("SetInvaderData"), p); } auto SetDisableNaturalUpdate(FName Key, bool Disable) -> bool { struct P { FName Key; bool Disable; } p{ Key, Disable }; return Call(STR("SetDisableNaturalUpdate"), p); } auto SetDisableNaturalHealing(FName Key, bool Disable) -> bool { struct P { FName Key; bool Disable; } p{ Key, Disable }; return Call(STR("SetDisableNaturalHealing"), p); } auto NaturalUpdateSaveParameter(EPalCharacterNaturalUpdateType_ Type) -> bool { struct P { EPalCharacterNaturalUpdateType_ Type; } p{ Type }; return Call(STR("NaturalUpdateSaveParameter"), p); } auto SetForcePartBreak() -> bool { return CallVoid(STR("SetForcePartBreak")); } // ---- medical bed / misc actions ----------------------------------- auto StartRecuperatingInMedicalBed() -> bool { return CallVoid(STR("StartRecuperatingInMedicalBed")); } auto RecuperateInMedicalBed() -> bool { return CallVoid(STR("RecuperateInMedicalBed")); } auto EndRecuperatingInMedicalBed() -> bool { return CallVoid(STR("EndRecuperatingInMedicalBed")); } auto StartRemainderOfLifeTimer() -> bool { return CallVoid(STR("StartRemainderOfLifeTimer")); } }; }