Mayhem Galaxy Map Editor if anyone is interested:
https://drive.google.com/file/d/1lfT8Y4 ... sp=sharing
Function: swap sectors, change race, remove abnormal signals, check for voice mismatch error, show sector detail and stats, search for sector, show universe snapshots
It only checks for voice mismatch error but doesn't fix it because if the number of entries in mayhem_data\sector_names_stream*.txt is greater than the size of the galaxy being generated then there will be no error. If anyone is in the middle of a game and need to have it fixed, let me know.
This may need some kind of microsoft .net framework to run, don't know.
Instruction (remember to backup your galaxy map before using):
Code: Select all
1) Type in the full path of the mayhem_galaxy.json that you want to edit, and click "Load" button to load the map
2) Left click a sector to select it and right click another sector to swap with it
3) Or middle click to change sector race
4) Or middle click to remove abnormal signals
5) Click on "Save" button to save the change (a backup will be created)
If you want to show universe snapshots, then you need to create a script and put it in X3\addon\scripts folder, here is the code for it, just copy it into X-Studio (are you guys still using X-Studio v1.08? Is there an update?)
Code: Select all
* =============================================================
$PAGEID = 7575
gosub OutputUniverseState:
return null
OutputUniverseState:
* Output JSON file to be read with X3MayhemMapEditor
$msg = ''
$LoopForAllSectors.ExceptPlayerSector = [FALSE]
$LoopForAllSectors.IgnoreKnownToPlayer = [TRUE]
$LoopForAllSectors.IgnoreSatelliteRequirement = [TRUE]
$LoopForAllSectors.Action = 'OutputUniverseStateOne'
gosub LoopForAllSectors:
$msg.length = get length of string $msg
dec $msg.length
if $msg.length > 100
* 0 substring is 0 based
$msg = get substring of $msg offset=1 length=$msg.length
$msg.pre = '{"sector_layout":['
$time = playing time
$sectors.max.x = get max sectors in x direction
$sectors.max.y = get max sectors in y direction
$msg.post = sprintf: fmt='],"size":%s,"width":%s,"name":"%s"}', $sectors.max.y, $sectors.max.x, $time, null, null
$msg = sprintf: fmt='%s%s%s', $msg.pre, $msg, $msg.post, null, null
write to log file $PAGEID append=[FALSE] value=$msg
$msg = 'OutputUniverseState: log0' + $PAGEID + '.txt'
display subtitle text: text=$msg duration=1000 ms
* send incoming message $msg to player: display it=[TRUE]
else
$msg = 'Error: OutputUniverseState: Failed to get current universe state'
display subtitle text: text=$msg duration=1000 ms
end
endsub
OutputUniverseStateOne:
* {"name":"The Wall","race":3,"x":17,"y":14}
$race = $sector-> get owner race
if $race == [Argon]
$sector.race = 1
else if $race == [Boron]
$sector.race = 2
else if $race == [Split]
$sector.race = 3
else if $race == [Paranid]
$sector.race = 4
else if $race == [Teladi]
$sector.race = 5
else if $race == [Xenon]
$sector.race = 6
else if $race == [Yaki]
$sector.race = 7
else if $race == [Unknown]
$sector.race = 14
else if $race == [Player]
$sector.race = 15
else
$sector.race = -1
end
$msg = sprintf: fmt='%s,{"name":"%s","race":%s,"x":%s,"y":%s}', $msg, $sector, $sector.race, $LoopForAllSectors.x, $LoopForAllSectors.y
endsub
LoopForAllSectors:
* Configuration: $LoopForAllSectors.ExceptPlayerSector, $LoopForAllSectors.Action, $LoopForAllSectors.Race
* $LoopForAllSectors.IgnoreSatelliteRequirement, $LoopForAllSectors.IgnoreKnownToPlayer
$sectors.max.x = get max sectors in x direction
do if $sectors.max.x > $MAX_SECTOR_X
$sectors.max.x = $MAX_SECTOR_X
$sectors.max.y = get max sectors in y direction
do if $sectors.max.y > $MAX_SECTOR_Y
$sectors.max.y = $MAX_SECTOR_Y
$forward = [TRUE]
for $LoopForAllSectors.y = 0 to $sectors.max.y step 1
if $forward
for $LoopForAllSectors.x = 0 to $sectors.max.x step 1
gosub LoopForAllSectorsOne:
end
$forward = [FALSE]
else
for $LoopForAllSectors.x = $sectors.max.x to 0 step -1
gosub LoopForAllSectorsOne:
end
$forward = [TRUE]
end
end
endsub
LoopForAllSectorsOne:
$sector = get sector from universe index: x=$LoopForAllSectors.x, y=$LoopForAllSectors.y
skip if $sector
endsub
skip if $sector-> exists
endsub
if not $LoopForAllSectors.IgnoreKnownToPlayer
skip if $sector-> is sector known by the player
endsub
end
if $LoopForAllSectors.ExceptPlayerSector
$LoopForAllSectorsOne.sector = [PLAYERSHIP]-> get sector
do if $sector == $LoopForAllSectorsOne.sector
endsub
end
if $LoopForAllSectors.Race
$LoopForAllSectorsOne.owner = $sector-> get owner race
skip if $LoopForAllSectorsOne.owner == $LoopForAllSectors.Race
endsub
end
if $LoopForAllSectors.Race != [Player]
if not $LoopForAllSectors.IgnoreSatelliteRequirement
* Any player property instead of just satellite
$LoopForAllSectors.satellite = $sector-> find ship: class or type=null race=[Player] flags=0 refobj=null maxnum=1 with homebase=null
* $satellite = $sector-> find ship: class or type={Neutral Race Advanced Satellite} race=[Player] flags=0 refobj=null maxnum=1 with homebase=null
skip if $LoopForAllSectors.satellite
endsub
end
end
gosub LoopForAllSectorsAction:
endsub
LoopForAllSectorsAction:
if $LoopForAllSectors.Action == 'OutputUniverseStateOne'
gosub OutputUniverseStateOne:
end
endsub