Reveal all HSAPs without a 'modified' tag

The place to discuss scripting and game modifications for X³: Farnham's Legacy

Moderators: Moderators for English X Forum, Scripting / Modding Moderators, Moderators for the X3:FL Forums

Post Reply
v_make
Posts: 59
Joined: Mon, 10. Sep 18, 07:12
xr

Reveal all HSAPs without a 'modified' tag

Post by v_make » Mon, 4. Jul 22, 10:46

This is a log rather than a tutorial. It does one very specific thing, to reveal all HSAPs without getting a 'modified' tag. Though I think the method of injecting/calling script without modified tag is worth sharing.

Senario

I have my HQ deployed at Unclaimed Sector behind Xenon Secot 524. So When I learned there could be an Unclaimed Sector beta but it's not in my game due to some game start randomness I tried to bring it back without losing my game progress or getting a 'modified' tag.

Tools

- [Unmodifier](https://docs.google.com/document/d/1atd ... 4agj1ilk19) + Win 7

Procedure

- write a script `z.cheat.mkmark.revealall.hsap.xml` to reveal all HSAPs based on Cycrow's revealall cheat script, and add a fake signature
- extract `plugin.turbo.hotkey.xml` from corresponding pck file, backup the pck, then replace the pck by a modified xml where `plugin.turbo.activate` are replaced by `z.cheat.mkmark.revealall.hsap`
- follow the 'Unmodifier' instruction to launch a game
- activate turbo boost in game

the plain script of `z.cheat.mkmark.revealall.hsap.xml`

Code: Select all

$main.universe = get global variable: name='main.universe'
skip if $main.universe -> exists
  $main.universe = get sector from universe index: x=0, y=0
skip if $main.universe -> exists
  $main.universe = [PLAYERSHIP] -> get sector

$x = get max sectors in x direction
while $x
  $y = get max sectors in y direction
  dec $x = 
  while $y
    dec $y = 
    
    $sector = get sector from universe index: x=$x, y=$y
    skip if $sector -> exists
      continue
    
    $flags = [Find.ExcludeTerranGates] | [Find.ExcludeGates] | [Find.Hyperspeed]
    $hsap = find gate: flags=$flags, refobj=$sector, max dist=null, refpos=null
    if $hsap -> exists
      if $hsap ->is hyperspeed access point
        if not $hsap ->is hsap discoverable
          if is valid route between sectors $main.universe and $sector
            $hsap -> set hsap discoverable [TRUE]
          end
        end
      end
    end

  end
end
return null
Reference

- viewtopic.php?t=436933&start=15#p5068731 (I generally followed Cheese's method but fix the bug of extra missions)
Regards.
Mark

Post Reply

Return to “X³: Farnham's Legacy - Scripts and Modding”