0 of 0

File information

Last updated

Original upload

Created by

xTeh

Uploaded by

xTeh

Virus scan

Safe to use

Tags for this mod

125 comments

  1. KommandantViy
    KommandantViy
    • member
    • 0 kudos
    Please tell me this mod still works in 2025, I'm going insane with the amount of pals that get stuck on perfectly open, flat ground and starving 10 feet from the freaking feed bowl
  2. ladydreadhorn
    ladydreadhorn
    • member
    • 1 kudos
    1/3 EDIT: I've been tweaking it a bit here and there, and this after letting things run all day and all night my base seems to be working much better. I lifted the z axis spawn a tiny bit more, and put a 5 second delay on them performing a task after they spawn. I noticed when they were spawning, they were still stuck in task, and then they would teleport over and over. However, in my husband's base on the other side of the map they still seem to be having some issues. Trying to observe some more to see what can be done ._.;;;;

    1/1 Edit: After running all night I woke up with 3 pals stuck in the morning. Still a huge improvement over the original. After working all day, I had no stuck pals. It probably needs the Z axis tweaked just a tinnnnnny bit more I am thinking, and I'll work on that as soon as I get a chance!

    12/31 EDIT:
    Seems there is still a pal getting stuck here and there, but not nearly as frequently before. I am experimenting a bit more. I pasted in a new script from what I first posted to include checking for collision, and to not to spawn at the same place twice, to infinitely attempt to spawn, and to add in attempting to spawn in a wider radius, and give it spawn height away from the mesh.

    ~~~~


    Hi there! I downloaded your mod to use, and it DID spawn pals back to the palbox, however they were getting stuck in the spawnpoint! I see a lot of people having the same issue, or saying that it's not working. I have come up with a solution! This script is a modification, telling the pals to spawn somewhere in the radius around the palbox spawnpoint, and will continue to try at different points if the first spawn fails! It seems to have fixed the issue!

    I edited my main.lua to reflect as follows:

    -- Function to check if a pal is stuck or needs unsticking
    local function tryUnstuckPal(pal)
        if not pal:IsValid() then
            print("[THPR] Skipped teleporting pal as HPR could not get a valid reference")
            return
        end
        
        local params = pal.CharacterParameterComponent
        local is_fight = pal.bIsBattleMode
        local is_sleep = params.IsSleepAction

        -- Skip if the pal is asleep or in battle
        if (not params:IsValid() or is_sleep or is_fight) then
            print("[THPR] Skipped teleporting pal as it is asleep, in combat, or HPR could not get its reference\n")
            return
        end

        -- Get the current spawn location (Palbox spawn)
        local spawn_location = pal.SpawnLocation_ForServer
        
        -- Ensure the PalUtility is valid
        if PalUtility then
            print("[THPR] Attempting to teleport pal to a random location around the Palbox...\n")
            
            local nearby_location = nil
            local offsetX, offsetY, offsetZ
            local maxRetries = 10  -- Set a maximum number of retries to avoid infinite loops
            local retries = 0
            
            -- Infinite retry loop to ensure the pal spawns in a clear, unobstructed location
            while retries < maxRetries do
                -- Randomize X and Y offsets (within a larger distance, 10 units in both directions)
                offsetX = math.random(-10, 10)  -- 10 units in both directions from the spawn point
                offsetY = math.random(-10, 10)  
                offsetZ = math.random(10, 15)  -- Raise the pal a bit (10 to 15 units above ground)
                
                -- Create the nearby location
                nearby_location = {
                    X = spawn_location.X + offsetX,
                    Y = spawn_location.Y + offsetY,
                    Z = spawn_location.Z + offsetZ
                }

                -- Perform a collision check (line trace or raycast) to ensure the area is clear
                local hitResult = PerformCollisionCheck(nearby_location)
                
                -- If the location is clear and valid, teleport the pal
                if hitResult.isClear then
                    PalUtility:TeleportAroundLoccation(pal, nearby_location, {W = 0.0, X = 0.0, Y = 0.0, Z = 0.0})
                    print("[THPR] Pal teleported to new location: X=" .. nearby_location.X .. " Y=" .. nearby_location.Y .. " Z=" .. nearby_location.Z)

                    -- Add a delay of 5 seconds before the Pal resumes any task
                    print("[THPR] Waiting 5 seconds before resuming task...")
                    wait(5)  -- Wait for 5 seconds (assuming `wait()` is available in the environment)

                    -- Resume the Pal's task after the wait
                    print("[THPR] Pal resuming task...")
                    -- Add logic here to have the Pal resume whatever task it was doing before being stuck
                    break
                else
                    -- If the location is obstructed, retry with a new random location
                    retries = retries + 1
                    print("[THPR] Location obstructed (e.g., inside ground mesh), retrying... Attempt " .. retries .. "/" .. maxRetries)
                end
            end
            
            -- If all retries are exhausted
            if retries >= maxRetries then
                print("[THPR] Failed to find a clear location after " .. maxRetries .. " attempts.")
            end
        else
            print("[THPR] No pal utility found")
        end
    end

    -- Simulated collision check function
    function PerformCollisionCheck(location)
        -- This function checks if the location is clear of obstacles (e.g., ground mesh, walls)
        -- The specific implementation of this function depends on the game engine

        -- Simulate the result of a collision check: for example, raycast or overlap test
        -- For demonstration purposes, we'll assume the function returns an "isClear" flag
        -- If the location is clear (no collision), isClear will be true, otherwise false
        -- In a real engine, this would be replaced by a function that performs an actual check
        local hitResult = {
            isClear = true  -- This is just a placeholder; real logic would check for collisions here
        }
        
        -- Here you would replace the above logic with the actual collision check (raycast, line trace, etc.)
        
        return hitResult
    end
    1. desuzakido
      desuzakido
      • supporter
      • 9 kudos
      thank you
    2. ladydreadhorn
      ladydreadhorn
      • member
      • 1 kudos
      no problem, i just updated that after running all night, i DID have a few stuck in the morning, so it could still use a bit of tweaking, but is still running MUCH better than before, and I'll mess with it a bit more asap to see if I can get it to run more flawlessly!
    3. ladydreadhorn
      ladydreadhorn
      • member
      • 1 kudos
      Updated again to iron out things a bit more!
    4. Tenshiamon
      Tenshiamon
      • member
      • 0 kudos
      I would love to see your final edits to this code as I've seen some issues having added this mod loving it in the past and not seeing myself not using it. Granted the creator did a phenomenal job with the idea of the mod, but also hasn't been updated in almost a year. With the new updates things change with coding and sometimes are made easier/harder. So when you complete the editing for the INI if the creator does not upload a update myself and I would bet others would love to know what has all been edited to improve the functionality.

      Please inform if this is your exact Main.lua for a copy/replace of old text. Looking at the original I do see missing/replaced lines, but unsure if you removed them all together and added new or showing locations you may have changed around.
  3. JOGO99
    JOGO99
    • member
    • 0 kudos
    Hi guys,

    I have crashes everytime I launch a world.

    LoginId:fcd0ae1d48dd62bfa08a52885f2264b2
    EpicAccountId:00b8accb6bba4973b70d1c21d458a369
    Unhandled Exception: EXCEPTION_ACCESS_VIOLATION reading address 0x0000020b40e4d058
    UE4SS
    UE4SS
    UE4SS
    UE4SS
    Palworld_Win64_Shipping
    Palworld_Win64_Shipping
    Palworld_Win64_Shipping
    Palworld_Win64_Shipping
    UE4SS
    Palworld_Win64_Shipping
    Palworld_Win64_Shipping
    Palworld_Win64_Shipping
    Palworld_Win64_Shipping
    Palworld_Win64_Shipping
    Palworld_Win64_Shipping
    Palworld_Win64_Shipping
    Palworld_Win64_Shipping
    Palworld_Win64_Shipping
    Palworld_Win64_Shipping
    Palworld_Win64_Shipping
    Palworld_Win64_Shipping
    Palworld_Win64_Shipping
    Palworld_Win64_Shipping
    kernel32
    ntdll

    any idea ?
  4. mcdoogle86
    mcdoogle86
    • member
    • 0 kudos
    Would be great to get an update for this mod, can't find any alternatives atm. 

    Update: One step missing from installation instructions for me was to enable the mod in the mods.txt file in Pal\Binaries\Win64\Mods. 

    I just added the line "TehHungryPalRescueMod = 1" but sill not working. Also added true in config.lua for dedicated server, still no joy.
  5. KAZIO5423
    KAZIO5423
    • member
    • 0 kudos
    It's not working after today's update.
  6. Dalppi
    Dalppi
    • member
    • 0 kudos
    It doesn't work
  7. arthuria8pendragon
    arthuria8pendragon
    • supporter
    • 4 kudos
    Started a New Game with the latest versions of Hungry Pal Rescuer, Pal Force Feeder (Compatibility), Teh Chunk Loader, UE4SS v3.0.1, DX11. Foxparks would sometimes will not be assigned to a task, I have two of them - at random they will stop and completely remain at idle even though there are torches they can light up. Even after restarting my game they still remain not assign-able.


    I mentioned two Foxparks because sometimes while at status of idle (both) one will become assign-able and the other not able. Also its only Foxparks specifically. Other pals are work just fine.
    1. IMRastafari
      IMRastafari
      • supporter
      • 0 kudos
      Chunk loader is early alpha stuff, dont expect it to work smooth.
  8. IMRastafari
    IMRastafari
    • supporter
    • 0 kudos
    Started to getting this, is it normal?
    [08:38:32] [DelayedAction] [Lua::call_function] lua_pcall returned Tried to register a hook with Lua function 'RegisterHook' but no UFunction with the specified name was found.
    stack traceback:
    [C]: in function 'RegisterHook'
    ...naries\Win64\Mods\TehHungryPalRescueMod\scripts\main.lua:67: in function <...naries\Win64\Mods\TehHungryPalRescueMod\scripts\main.lua:67>
    1. IMRastafari
      IMRastafari
      • supporter
      • 0 kudos
      @xTeh ??
  9. Trust04zh
    Trust04zh
    • member
    • 0 kudos
    Hi, someone mentioned this mod on my mod posts, I read your code and like your wonderful hooking ideas! however I suggest you not to use spawnpointforserver to teleport to, it works most cases, but I have a whitetiger which has a spawn point underground and quite lower than the actual palbox terminal, and i didn't find an api to set spawn point for pal (If you know I'd appreciate your sharing), so spawnpointforserver is not the optimal api. My solution is to hook all pallocationpointbasecamp (or iterate all locationpoint, as my mod is in blueprint and cannot do hooking) to get the location for palbox terminal. hope this helps you!
  10. Benie76
    Benie76
    • member
    • 0 kudos
    The latest mod update seems to not fix Pals that aren't on the 'same plane' as the Palbox. Aka the same Z (or whatever axis is Up/Down in this game) axis of the Palbox.
    I got two pals stuck in a pit, and one stuck on a shipping crate. I have been waiting for 10+ minutes, they are both starving to death and the mod has not moved any of them to the Palbox.

    I have the mod installed (only) on our dedicated server, and it uses UE4SS v3.0.0.
    1. Elysium7
      Elysium7
      • member
      • 6 kudos
      I have a base where pals seem to frequently clip under the terrain collider and end up inside the terrain below the base.  This mod does not seem to rescue pals in this state.
    2. Benie76
      Benie76
      • member
      • 0 kudos
      Aye, had this too. There's a pond in the middle of my base (part of a waterfall), and I would find a few pals stuck under the water (mainly the two 'human pals' I have, a Pal Merchant and a Wondering Merchant).
      They follow me around (while walking on the pond's floor), knowing I have food. But the mod does not teleport them to the Palbox. I still have to babysit my stupid pals that love to roam around and get stuck and cry out for food (which is infuriating at times as it messes up my production).

      So why not a mod that would 'add a leash' to our Pals, to check if a base pal has no active jobs (a roamer), and check if the pal is at a certain range (that can be specified by the user)? If the pal goes past this range, it immediately gets 'pulled' (teleported) back to the Palbox, then spanked and told "now you think about what you've done".
      I see pals as brainless drones that seem to love to annoy me (and the ones on our dedicated server). And I feel this will solve a LOT of issues with stuck pals, like ones that use parameter defensive walls as a reason to glitch through and get stuck.
      Though there's also the big issue with dedicated servers, that there's already an experimental mod to fix that (but due to the fear of server instability/lag (hearing my friends annoyed at me for losing a lot of progress(which I can definitely understand)) I'm not going to risk adding it).

      The 'joys' of Early Access gaming. [Depresso emoji here]
      Here's to hoping this upcoming update at the end of this month is going to fix a lot of these major issues with the AI's pathfinding.