- UID
- 51878
- UCC
-
- 声望
-
- 好评
-
- 贡献
-
- 最后登录
- 1970-1-1
|
本帖最后由 RAZORBACK 于 2022-3-26 20:23 编辑
转自https://forum.egosoft.com/viewto ... 45929&start=120,往下数第5楼
第一步,把在5.0+以及贪婪之潮DLC的存档复制一个出来,随便放一个地方,如果是压缩包就解压缩,直至看到一个xml文件,并记住这个路径;
第二步,在这个xml文件所在目录下,按住Shift并右键文件夹空白处,选择“在此处打开Powershell窗口”,如下图所示;
第三部,在打开的powershell界面中,粘贴如下代码,注意,将第四行的括号中替换为你解包后存档的位置及存档名,比如我是$Xml.Load("G:\models\save_007.xml\save_007.xml"),则如下图所示,然后回车运行;
- #This uses a fair amount of memory - if you have limited ram exit X4 first...
- $Xml=New-Object Xml
- #unzip .gz file with 7-zip or gunzip first or use uncompressed saves
- $Xml.Load("存档解包路径\存档文件名")
- $components=Select-Xml -Xml $Xml -XPath "/savegame/universe//component"
- $erl=$components | ?{$_.Node.macro -and $_.Node.macro.Contains("erlking")}
- $vaults = $erl | ?{$_.Node.macro -and $_.Node.macro.Contains("landmarks_erlking_vault")}
- #From hatevampire at https://www.reddit.com/r/X4Foundations/comments/thjbik/how_to_read_save_file/
- #Not sure where the real source of friendlyname is..
- $locationtoname = @{
- cluster_500_sector001_macro="Avarice I"
- cluster_500_sector002_macro="Avarice IV"
- cluster_500_sector003_macro="Avarice V"
- cluster_501_macro="Windfall I"
- cluster_502_macro="Windfall III"
- cluster_503_macro="Windfall IV"
- }
- $macrotocoords=@{
- "Zone004_Cluster_503_Sector001_macro"="139680,0,-3215.59"
- "Zone003_Cluster_500_Sector003_macro"="-115796.9,0,-96109.38"
- "Zone002_Cluster_503_Sector001_macro"="-2269.199,0,165758.4"
- "Zone006_Cluster_500_Sector002_macro"="-184409.83,0,-3343.0"
- "Zone003_Cluster_501_Sector001_macro"="-97898.44,0,-23632.81"
- "Zone003_Cluster_500_Sector001_macro"="-97898.44,0,-23632.81"
- "Zone005_Cluster_501_Sector001_macro"="-23023.44,0,-160132.8"
- "Zone004_Cluster_504_Sector001_macro"="157616.8,0,-84263.63"
- "tzoneCluster_500_Sector002SHCon9_GateZone_macro"="-39827.2,0,200000"
- "tzoneCluster_500_Sector002SHCon5_GateZone_macro"="-50000,0,200000"
- "Zone001_Cluster_500_Sector003_macro"="-117046.9,0,82593.75"
- "Zone001_Cluster_501_Sector001_macro"="-127062.5,0,133718.8"
- "Zone005_Cluster_504_Sector001_macro"="-23023.44,0,-160132.8"
- "Zone004_Cluster_500_Sector001_macro"="103164.1,0,-32492.19"
- "Zone002_Cluster_500_Sector001_macro"="-10960.94,0,112070.3"
- "Zone003_Cluster_500_Sector002_macro"="-7132.69,0,531.25"
- "Zone002_Cluster_500_Sector002_macro"="-118489.4,0,-131687.5"
- "tzoneCluster_500_Sector003SHCon9_GateZone_macro"="50000,0,200000"
- "Zone005_Cluster_500_Sector002_macro"="98694.83,0,-126406.3"
- "tzoneCluster_500_Sector001SHCon2_GateZone_macro"="66960.9,0,-207957"
- "tzoneCluster_500_Sector003SHCon5_GateZone_macro"="40054.7,0,200000"
- "tzoneCluster_500_Sector001SHCon10_GateZone_macro"="-45738.28,0,-200000"
- "Zone005_Cluster_500_Sector003_macro"="34671.88,0,-152515.6"
- "Zone001_Cluster_504_Sector001_macro"="-127062.5,0,133718.8"
- "Zone003_Cluster_502_Sector001_macro"="-97898.44,0,-23632.81"
- "Zone002_Cluster_504_Sector001_macro"="137904.1,0,135199.3"
- "Zone005_Cluster_503_Sector001_macro"="-23023.44,0,-160132.8"
- "Zone001_Cluster_500_Sector001_macro"="-127062.5,0,133718.8"
- "Zone004_Cluster_501_Sector001_macro"="103164.1,0,-32492.19"
- "tzoneCluster_500_Sector001SHCon4_GateZone_macro"="76886.7,0,-207957"
- "Zone006_Cluster_502_Sector001_macro"="47000.0,0,172000.0"
- "Zone002_Cluster_500_Sector003_macro"="44015.63,0,158125"
- "tzoneCluster_500_Sector001SHCon6_GateZone_macro"="-55785.2,0,-200000"
- "Zone002_Cluster_501_Sector001_macro"="-10960.94,0,112070.3"
- "Zone001_Cluster_500_Sector002_macro"="-78593.63,0,157937.5"
- "Zone003_Cluster_503_Sector001_macro"="-199365.3,0,-55454.45"
- "Zone001_Cluster_502_Sector001_macro"="-127062.5,0,133718.8"
- "Zone003_Cluster_504_Sector001_macro"="-226443.3,0,-97194.67"
- "Zone005_Cluster_500_Sector001_macro"="-23023.44,0,-160132.8"
- "Zone004_Cluster_500_Sector003_macro"="110359.4,0,7250"
- "Zone001_Cluster_503_Sector001_macro"="-190039.3,0,180073.9"
- "Zone005_Cluster_502_Sector001_macro"="-23023.44,0,-160132.8"
- "Zone004_Cluster_500_Sector002_macro"="101721.7,0,100656.3"
- "Zone002_Cluster_502_Sector001_macro"="108009.3,0,115933.7"
- "Zone004_Cluster_502_Sector001_macro"="103164.1,0,-32492.19"
- }
- #Get offsets up the tree
- function Recurse-Offsets($node){
- if($node.class -and $node.class -eq "galaxy"){
- return @()
- }
- if($node.offset -ne $null){
- if($node.offset.position){
- $x=$node.offset.position.x
- $y=$node.offset.position.y
- $z=$node.offset.position.z
- } else {
- $x,$y,$z=0,0,0
- }
- if($node.offset.rotation){
- if($node.offset.rotation.yaw){$yaw=$node.offset.rotation.yaw} else {$yaw=0}
- if($node.offset.rotation.pitch){$pitch=$node.offset.rotation.pitch} else {$pitch=0}
- if($node.offset.rotation.roll){$roll=$node.offset.rotation.roll} else {$roll=0}
- } else {
- $pitch,$roll,$yaw=0,0,0
- }
- if($macrotocoords[$node.macro]){
- $x,$y,$z=$macrotocoords[$node.macro].Split(",")
- }
- $obj = [pscustomobject]@{
- x=$x
- y=$y
- z=$z
- pitch=$pitch
- roll=$roll
- yaw=$yaw
- code=$node.code
- macro=$node.macro
- class=$node.class
- }
- return @($obj) + (Recurse-Offsets -node $node.ParentNode)
- } else {
- return Recurse-Offsets -node $node.ParentNode
- }
- }
- . {
- foreach($vault in $vaults){
- $data=Recurse-Offsets $vault.Node
- $sums = $data | Measure-Object -Sum -Property x,y,z
- $location = $data |?{$_.class -eq "sector"} | select -ExpandProperty macro
- if([string]::IsNullOrWhiteSpace($location)){
- $location = $data |?{$_.class -eq "cluster"} | select -ExpandProperty macro
- }
- [pscustomobject]@{
- location=$locationtoname[$location]
- Xkm=($sums |?{$_.property -eq "x"}).sum/1000
- Ykm=($sums |?{$_.property -eq "y"}).sum/1000
- Zkm=($sums |?{$_.property -eq "z"}).sum/1000
- blueprint=$vault.Node.connections.connection.component.blueprints |?{$_ -ne $null}
- vault=$vault.Node.macro
- code=$vault.Node.code
- }
- }
- } | ft -AutoSize
复制代码
第四步,安心等待,注意,可能运行时间稍长,而且比较吃内存;
第五步,运行完毕,在Powershell界面中出现如下信息,即表明这5个数据仓库所在星区和大致位置,然后就可以派一艘高速的飞船结合高级人造卫星来找到,注意,这里面x坐标向右为正,y坐标向屏幕外为正,z坐标向上为正,单位是km,关于星区的原点位置,我推测应该是默认情况下六边形的中央,但坐标数值在游戏中没有显示,那么可以参考高级人造卫星探测半径是75km、飞船自身雷达搜索半径40km,后面具体去找应该就不难了。
|
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有账号?注册
×
|