[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
User avatar
alexalsp
Posts: 1823
Joined: Fri, 18. Jul 14, 05:28
x4

Re: [X3LU] Mayhem 3.18

Post by alexalsp » Mon, 2. May 22, 23:52

alexalsp wrote:
Mon, 2. May 22, 20:56
TestUnknown wrote:
Mon, 2. May 22, 20:40
alexalsp wrote:
Sun, 1. May 22, 21:25


Share these files corrected, if you don't mind :roll:
These are the files (mayhem_data\sector_names_stream*.txt) I am using: https://drive.google.com/file/d/12TUz2U ... sp=sharing. Each file contains 1 copy of the original sectors and 1 copy of all the sectors uncommented. sector_names_stream1.txt have 445 entries, and sector_names_stream2.txt have 91 entries.
Thank you. :thumb_up: :thumb_up: :thumb_up: :thumb_up: :thumb_up:
I have, for now, only uncommented everything but the alphabetic names. Didn't add anything. Generated 10 galaxies, checked, everything is fine. Perhaps this is enough, but maybe someday the error will repeat. But at the moment, the problem is not noticed.

In your case, as I think, but not sure, systems with the same names can be generated. Watch for it.

User avatar
PersonyPerson
Posts: 20
Joined: Sat, 20. Oct 18, 12:50
x4

Re: [X3LU] Mayhem 3.18

Post by PersonyPerson » Fri, 6. May 22, 23:09

Hello.

I'm Playing version 3.18. Really enjoying it.

I'm currently playing a galaxy that started under the "None" galaxy expansion setting. At the start of the game it of course gives me a warning that OCV starts spawning after day 1. I'm 3 1/2 days into my playthrough, but so far all the OCV have done is build up into their home portal sector.

At what point do the OCV start initiating invasions on the rest of the galaxy?

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

Re: [X3LU] Mayhem 3.18

Post by Joubarbe » Sat, 7. May 22, 09:13

Would be nice if you could upload your savegame and your galaxy (instructions).

User avatar
PersonyPerson
Posts: 20
Joined: Sat, 20. Oct 18, 12:50
x4

Re: [X3LU] Mayhem 3.18

Post by PersonyPerson » Sat, 7. May 22, 13:00

Ok, so I assume that's not normal then. Here's the save: https://drive.google.com/file/d/13c7Pmm ... sp=sharing

The OCV spawn is at Reservoir of Tranquillity.

I also use the custom backgrounds pack from Hector0x. I thought it might have been script interference as I also used his rebalance mod in the distant past before I upgraded from 3.14d to 3.18. However I deleted all the files associated with it, reinstalled Mayhem, still the same issue.

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

Re: [X3LU] Mayhem 3.18

Post by alexalsp » Sat, 7. May 22, 15:34

3.14 is not compatible with 3.15 and up. If you have updated the mod from 3.14 to 3.18 you need to generate a new galaxy and start a new game.

Share the link. No access.

Mods for 3.14 are not adapted for 3.18.

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

Re: [X3LU] Mayhem 3.18

Post by Joubarbe » Sat, 7. May 22, 16:42

Yes, as alex said, 3.15 is a major version that breaks savegame compatibility. The game should have said something about that and display a message.
The rebalance mod is not compatible either. It's for 3.14d only.

User avatar
PersonyPerson
Posts: 20
Joined: Sat, 20. Oct 18, 12:50
x4

Re: [X3LU] Mayhem 3.18

Post by PersonyPerson » Sat, 7. May 22, 17:04

alexalsp wrote:
Sat, 7. May 22, 15:34
3.14 is not compatible with 3.15 and up. If you have updated the mod from 3.14 to 3.18 you need to generate a new galaxy and start a new game.

Share the link. No access.

Mods for 3.14 are not adapted for 3.18.
I did...

My game was on a new 3.18 galaxy and I had removed the rebalance mod. I'm not using it now, nor was I at the start of this save. The only thing left over from the mod was a couple of script files, which were not present in the 3.18 patch (Everything else was overwritten by the patch) which I have since removed, but it seems removing them didn't change anything.

Everything seems to work fine with the exception of the OCV just sitting in their core system.

If the link was restricted beforehand. It shouldn't be now.

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

Re: [X3LU] Mayhem 3.18

Post by Joubarbe » Sat, 7. May 22, 17:09

I'll look into it.

jimbo1282019
Posts: 5
Joined: Sat, 26. Jan 19, 11:05
x3ap

Re: [X3LU] Mayhem 3.18

Post by jimbo1282019 » Sat, 7. May 22, 20:35

Hi

i am currently playing x3 mayhem 3.16 and im having crystals just disappearing out of my outpost i thought i was using them up on a build or something so i cheated over 10k in and almost a second later it has 0 left in the station any advice?

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

Re: [X3LU] Mayhem 3.18

Post by Joubarbe » Sat, 7. May 22, 22:12

jimbo1282019 wrote:
Sat, 7. May 22, 20:35
Hi

i am currently playing x3 mayhem 3.16 and im having crystals just disappearing out of my outpost i thought i was using them up on a build or something so i cheated over 10k in and almost a second later it has 0 left in the station any advice?
Please upload your save and galaxy. Cannot fix a bug I cannot reproduce.

jimbo1282019
Posts: 5
Joined: Sat, 26. Jan 19, 11:05
x3ap

Re: [X3LU] Mayhem 3.18

Post by jimbo1282019 » Sat, 7. May 22, 22:31

Joubarbe wrote:
Sat, 7. May 22, 22:12
jimbo1282019 wrote:
Sat, 7. May 22, 20:35
Hi

i am currently playing x3 mayhem 3.16 and im having crystals just disappearing out of my outpost i thought i was using them up on a build or something so i cheated over 10k in and almost a second later it has 0 left in the station any advice?
Please upload your save and galaxy. Cannot fix a bug I cannot reproduce.

hmm it turns out im a retard i accidently created a template with one of my TS with a cargo hold full of crystals oops


User avatar
PersonyPerson
Posts: 20
Joined: Sat, 20. Oct 18, 12:50
x4

Re: [X3LU] Mayhem 3.19

Post by PersonyPerson » Sun, 8. May 22, 17:25

Nice!

Installed the new patch and at the 3 days 12 hour mark, the OCV swarmed into a nearby Paranid sector, destroying everything that moves in the sector. So that's fixed.

But that's the thing. They've destroyed everything that moves, meaning they ignore the stations. They destroy them in sector, but not OOS. They only focus on ships.

Is this the intended behaviour?

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

Re: [X3LU] Mayhem 3.19

Post by Joubarbe » Sun, 8. May 22, 23:12

PersonyPerson wrote:
Sun, 8. May 22, 17:25
Nice!

Installed the new patch and at the 3 days 12 hour mark, the OCV swarmed into a nearby Paranid sector, destroying everything that moves in the sector. So that's fixed.

But that's the thing. They've destroyed everything that moves, meaning they ignore the stations. They destroy them in sector, but not OOS. They only focus on ships.

Is this the intended behaviour?
Could you try to download this file and overwrite the one in X3\addon\scripts?

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

Re: [X3LU] Mayhem 3.19

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

Does the population affects the production speed in the station and how?

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: 1823
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

Post Reply

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