[X3LU] Mayhem 3.21b

The place to discuss scripting and game modifications for X³: Terran Conflict and X³: Albion Prelude.

Moderators: Moderators for English X Forum, Scripting / Modding Moderators

Post Reply
TestUnknown
Posts: 56
Joined: Fri, 6. Apr 12, 01:40

Re: [X3LU] Mayhem 3.19

Post by TestUnknown » Mon, 9. May 22, 05:22

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



Last edited by TestUnknown on Mon, 9. May 22, 05:54, edited 1 time in total.

TestUnknown
Posts: 56
Joined: Fri, 6. Apr 12, 01:40

Re: [X3LU] Mayhem 3.19

Post by TestUnknown » Mon, 9. May 22, 05:28

arkcheung wrote:
Mon, 9. May 22, 05:04
Does the population affects the production speed in the station and how?
Yes, I believe production speed is proportional to population. e.g. 100 people produce twice as fast as 50. You can check the exact detail in Mayhem.Task.Station.Outpost.xml, around line 615

arkcheung
Posts: 22
Joined: Sun, 28. Dec 08, 08:38
x3tc

Re: [X3LU] Mayhem 3.19

Post by arkcheung » Mon, 9. May 22, 05:41

The AI faction starts with a whole fleet with few M1, M2 and bunch of other big ships even at the None Galaxy Expansion start. How could they afford that fleet with only one sector? Unless they are not affected by the maintainance?

User avatar
Joubarbe
Posts: 4796
Joined: Tue, 31. Oct 06, 12:11
xr

Re: [X3LU] Mayhem 3.19b

Post by Joubarbe » Mon, 9. May 22, 09:03

3.19b released: OCV was putting too much priority on ship destruction.

User avatar
alexalsp
Posts: 1820
Joined: Fri, 18. Jul 14, 05:28
x4

Re: [X3LU] Mayhem 3.19b

Post by alexalsp » Mon, 9. May 22, 16:39

I noticed that if you do not read the first incoming message and do not answer the questions, then in the Ascension Goals do not appear anything, they are displayed only after the answers to the questions in the messages.
I do not know if this is a bug or not, but maybe in this case to make the first message required to read and then give the opportunity to continue the game.
I, for example, can spend an hour or day without reading the incoming message, and only then read it. Perhaps this will cause some similar errors in other places.

If it doesn't affect anything other than displaying ascension goals, then you shouldn't bother.

https://youtu.be/zBD_0j1ZRu0

User avatar
alexalsp
Posts: 1820
Joined: Fri, 18. Jul 14, 05:28
x4

Re: [X3LU] Mayhem 3.19b

Post by alexalsp » Tue, 10. May 22, 10:38

Today the error occurred again.

1) steam_1 - uncommented all sectors except letter sectors.
2) steam_2 - Uncommented all sectors
3) Created a medium-sized galaxy.
After starting the game and generating galaxy objects, in the right panel, the voices of one sector does not match, and the other two without a voiceover.

As you can see, the problem remained, and was repeated on the average size of the galaxy.

Maybe, as an option, try to transfer the sectors that were commented out from file 1 to file 2?

On the other hand, this problem can recur from time to time and can only be solved by fixing the generation file itself, the source of which is lost, as you reported earlier.

Could this happen because I uncommented the galaxies in the stream_1 file?
Last edited by Terre on Tue, 17. May 22, 22:00, edited 1 time in total.
Reason: Images posted directly to the forums should not be greater than 640x480 or 100kb, oversize image now linked

User avatar
Joubarbe
Posts: 4796
Joined: Tue, 31. Oct 06, 12:11
xr

Re: [X3LU] Mayhem 3.19b

Post by Joubarbe » Tue, 10. May 22, 13:27

The problem might come from something else. There's enough names at this point.

User avatar
Joubarbe
Posts: 4796
Joined: Tue, 31. Oct 06, 12:11
xr

Re: [X3LU] Mayhem 3.19b

Post by Joubarbe » Tue, 10. May 22, 13:34

Could you upload a bugged galaxy and tell me what sector is buggy? I've actually never experienced this bug before.

User avatar
alexalsp
Posts: 1820
Joined: Fri, 18. Jul 14, 05:28
x4

Re: [X3LU] Mayhem 3.19b

Post by alexalsp » Tue, 10. May 22, 14:43

Joubarbe wrote:
Tue, 10. May 22, 13:34
Could you upload a bugged galaxy and tell me what sector is buggy? I've actually never experienced this bug before.
I generated 15 galaxies and when I was deleting them, I accidentally deleted the bad one. I will try again to generate a bad galaxy.

Just in case, I will do a complete reinstallation of the mod. :( :oops:

User avatar
alexalsp
Posts: 1820
Joined: Fri, 18. Jul 14, 05:28
x4

Re: [X3LU] Mayhem 3.19b

Post by alexalsp » Tue, 10. May 22, 18:54

The problem seems to be solved. The 00044.pck file is still in the addon\mov folder. I accidentally looked into it. :lol:

User avatar
Joubarbe
Posts: 4796
Joined: Tue, 31. Oct 06, 12:11
xr

Re: [X3LU] Mayhem 3.19b

Post by Joubarbe » Tue, 10. May 22, 20:54

So if I'm getting this right, you still had the file named "00044.pck" in your mov folder? I mean it was NOT renamed "_00044.pck" as it should have been by the generator?

FYI, if the file is not prefixed with an underscore, "00044.xml" has no longer the priority and the default voices will apply (resulting in wrong sector names).

User avatar
alexalsp
Posts: 1820
Joined: Fri, 18. Jul 14, 05:28
x4

Re: [X3LU] Mayhem 3.19b

Post by alexalsp » Tue, 10. May 22, 21:45

I can not say why the file is not renamed after starting the galaxy. I did a lot of manipulations with these files. I think some kind of glitch happened, not the generator's fault. I had a lot of programs open and the computer did not shut down for a month. Now I installed the mod from scratch and everything works.

Just I decided to check this point on the Russian version of the game, the file 00007.pck is not renamed, as in English.

Since you lost the source of the generator, this error is no more fix, as I understand it.

https://youtu.be/BqJ-i25g7Nw

arkcheung
Posts: 22
Joined: Sun, 28. Dec 08, 08:38
x3tc

Re: [X3LU] Mayhem 3.19b

Post by arkcheung » Tue, 17. May 22, 07:15

So I accidentally ordered my ship to attack a friendly AI station which turns RED to me. I cancelled the attack order right away but that station still keeps in RED and won't allow me to dock. How do I make the AI understand that was a mistake so they could reset that station's hostile attitude to me?

User avatar
alexalsp
Posts: 1820
Joined: Fri, 18. Jul 14, 05:28
x4

Re: [X3LU] Mayhem 3.19b

Post by alexalsp » Tue, 17. May 22, 10:04

Fly out of the sector and wait for a while.
Check in settings Friend/Enemy
If in the settings the trigger is set to Enemy, set it to Friend. If it does not help, then you will have to restore reputation by completing tasks.

Or load the latest save file.

Huillam
Posts: 430
Joined: Fri, 16. Dec 11, 11:24
x4

Re:

Post by Huillam » Tue, 17. May 22, 12:42

Joubarbe wrote:
Sat, 6. Jan 18, 10:02
Can someone upload a savegame with an ATF Mammoth? All Mayhem ships are tagged, and I'm not sure it comes from Mayhem.
I realize this is a years old issue but do you remember if you were able to find what was causing this?
I have a similar issue in "vanilla" LU and after more than a year I've been unable to even guess why I'd have ATF mammoths in my game.

arkcheung
Posts: 22
Joined: Sun, 28. Dec 08, 08:38
x3tc

Re: [X3LU] Mayhem 3.19b

Post by arkcheung » Thu, 19. May 22, 04:16

I just noticed there is Goner ships can be researched but the faction is not existing in Mayhem, is it meant to be that? Feels weird though.


User avatar
alexalsp
Posts: 1820
Joined: Fri, 18. Jul 14, 05:28
x4

Re: [X3LU] Mayhem 3.20

Post by alexalsp » Sun, 22. May 22, 08:48

Greetings.
Found: NULL
Found Asteroids

1) Select a sector
2) Open galaxy map and рress ESC.

https://youtu.be/K-oGuxY_qdU

User avatar
alexalsp
Posts: 1820
Joined: Fri, 18. Jul 14, 05:28
x4

Re: [X3LU] Mayhem 3.20

Post by alexalsp » Mon, 23. May 22, 20:03

Does anyone else have this error, or is it just me?

User avatar
Joubarbe
Posts: 4796
Joined: Tue, 31. Oct 06, 12:11
xr

Re: [X3LU] Mayhem 3.20

Post by Joubarbe » Mon, 23. May 22, 20:04

I read and note all bug reports. I will look into it for a future update.

Post Reply

Return to “X³: Terran Conflict / Albion Prelude - Scripts and Modding”