[FL-636][BUG]X3FL 1.2: Carrier resupply freezes game

Ask here if you experience technical problems with X³: Terran Conflict, X³: Albion Prelude or X³: Farnham's Legacy.

Moderators: timon37, Moderators for English X Forum

Post Reply
andreihaiducul
Posts: 62
Joined: Wed, 10. Jul 13, 04:23
x3ap

[FL-636][BUG]X3FL 1.2: Carrier resupply freezes game

Post by andreihaiducul » Fri, 18. Jun 21, 18:02

The automated Carrier Resupply command (from Carrier Management) sometimes freezes the game.

save file (expires in 1 week)
I have a Guppy in Xenon Hub whose Supplier is about to dock at my PHQ with the Carrier Resupply command. The game freezes shortly after it docks.
Last edited by X2-Illuminatus on Thu, 24. Jun 21, 20:47, edited 1 time in total.
Reason: added to internal bugtracker

andreihaiducul
Posts: 62
Joined: Wed, 10. Jul 13, 04:23
x3ap

Re: X3FL 1.2: Carrier resupply freezes game

Post by andreihaiducul » Sat, 19. Jun 21, 23:46

I fixed this with a minor edit to `!move.returntocarrier`:

Code: Select all

    while [TRUE]
    $homebase = [THIS] -> get carrier
    skip if $homebase -> exists
        return null
    skip if $homebase -> is docking possible of [THIS]
        return null
        
+   [THIS] -> set destination to $homebase
    $sec = $homebase -> get sector
    $ret = [THIS] -> call script '!move.movetosector' : targetsector=$sec
    if $ret == [FLRET_NOPATH]
        return $ret
    end
    
    $current.carrier = [THIS] -> get carrier
    while $homebase == $current.carrier
        skip if $homebase -> exists
        return null
        
        if [DOCKEDAT] == $homebase
        return null
        end
        
        skip if [THIS] -> is in same sector as $current.carrier
        break
        
        if [THIS] -> is docking allowed at $homebase
        [THIS] -> call script '!move.dockingcomputer' : a.target=$homebase
        else
        [THIS] -> move around 60000 ms
        end
        wait randomly from 100 to 200 ms
        $current.carrier = [THIS] -> get carrier
        end
+   wait 100 ms
    end
+   [THIS] -> set destination to null
    return null 
Perhaps this script can be merged with `!move.returntohomebase`.

I still want to collect achievements and I hope we'll get a proper hotfix (my own fix is not robust).

EDIT: removing this block of code from `!move.movetosector` also fixes the issue

Code: Select all

   if $target -> exists
   	if $target -> is of class [Sector]
   		$target = [THIS] -> get destination
   		skip if $target -> exists
	   		$target = $targetsector
   	end
   end
I'm not sure if it even does anything useful in the first place. In this case it leads to an infinite loop because the destination string is never changed from the target resupply station back to the carrier.

Post Reply

Return to “X³: Terran Conflict / Albion Prelude / Farnham's Legacy - Technical Support”