ZMap - Mayhem 3 (and Zero Hour) Map Generator and Editor

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

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

Re: ZMap - Mayhem 3 Map Generator and Editor

Post by alexalsp » Thu, 10. Nov 22, 11:46

ZMap 1.6

Who can be an Owner Dejure race? All or just Argon, Boron, Paranid, Teladi?

When I select Owner Dejure: Xenon, Terran or Unknown I get an error. Video to help...

https://youtu.be/9pKzUUwVsvg

Please fix this. The text does not change during translation.

Code: Select all

"lblTerranSpread": "Terran",
Spoiler
Show
Image
Last edited by alexalsp on Sat, 12. Nov 22, 13:06, edited 1 time in total.

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

Re: ZMap - Mayhem 3 Map Generator and Editor

Post by alexalsp » Fri, 11. Nov 22, 23:44

Bag ...

https://youtu.be/KhsKRPTlLjA

In version 1.5 everything is fine.

User avatar
Hairless-Ape
Posts: 321
Joined: Wed, 6. Nov 02, 20:31
xr

Re: ZMap - Mayhem 3 Map Generator and Editor

Post by Hairless-Ape » Sat, 12. Nov 22, 14:44

Good catch on the "Terrans as Dejure owner" issue.
That bug has been fixed and 1.6.1 has been published.

Regarding your last post however, understand that you can not do what you are attempting to do; by design.

ZMap 1.6 or above will NOT successfully load the "Race Relations" part of maps created by earlier versions (1.5 or below).
Technically, all maps stored the 5x5 race relations grid in a linear/serial sequence of ID's (5-29) inside the 9970-L044.xml file.
The new design has a 6x6 race relations grid, and so it uses ID's 5-40. This was a design choice of the original mayhem 3 creator, and not
something added by myself. Bottom line is, that when you try to load an old map with the new Generator, it attempts to load 36 ID's
and only has 25 present. Now technically, this is still a usable map.. All you have to do is click on your race relations in the U.I. to fix it
the way you want it, and then re-save your map. I'll leave that to you to do if it's that important to you. Otherwise, just create a new
map and you should be fine, assuming no more actual bugs are in there.
Out of my mind. Back in 5 minutes.

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

Re: ZMap - Mayhem 3 Map Generator and Editor

Post by alexalsp » Sat, 12. Nov 22, 17:05

The map on the video was made in version 1.6.
The tests were carried out on the same map.

1.6.1
https://youtu.be/9huqSDJPqPU
Hairless-Ape wrote:
Sat, 12. Nov 22, 14:44
Good catch on the "Terrans as Dejure owner" issue.
Same with Unknown and Xenon. Errors remain. Or they cannot be as Dejure owner?

But Terran was fixed.

I'm guessing it should be.

Code: Select all

                case 6:
                    return @"\033C" + GetLocalizedText("{Xenon}");
                case 14:
                    return @"\033C" + GetLocalizedText("{Unknown}");
                case 18:
                    return @"\033C" + GetLocalizedText("{Terran}");
And they didn’t fix it here. :(
alexalsp wrote:
Thu, 10. Nov 22, 11:46
Please fix this. The text does not change during translation.

Code: Select all

"lblTerranSpread": "Terran",
Spoiler
Show
Image

User avatar
Hairless-Ape
Posts: 321
Joined: Wed, 6. Nov 02, 20:31
xr

Re: ZMap - Mayhem 3 Map Generator and Editor

Post by Hairless-Ape » Sat, 12. Nov 22, 19:58

Thanks Alexalsp, You do great testing :).

Sorry I didn't get it right the first timer.. I got covid a week ago and just sort of out of it.. I have brain fog.

Anyway, I believe I have both issues fixed. I tried a few tests and it seems to be going ok.
There was an unrelated problem remaining with save/load for the race relations, and I also added that terran label for localization.

Also, you are correct. You can NOT set Unknown or Xenons as Dejure owner of a system.

I've updated the 1.6.1 source and release files on github. Let me know if you experience any other issues, and thanks again for the help.

-cheers.
Out of my mind. Back in 5 minutes.

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

Re: ZMap - Mayhem 3 Map Generator and Editor

Post by alexalsp » Sat, 12. Nov 22, 21:15

Thanks, I'll check. Get well. Covid is evil...
I wrote to Discord, but probably because of the covid and the discord was silent... :skull:

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

Re: ZMap - Mayhem 3 Map Generator and Editor

Post by alexalsp » Sat, 12. Nov 22, 23:44

Another bug I think...

1) Set the map settings
2) Do not press the button to generate a map.
3) Open the Load/Save dialog and close it
All settings are reset, except races. I will assume that this should not happen and all settings should remain in place.

https://youtu.be/vmxvgtjmkTc
Also, you are correct. You can NOT set Unknown or Xenons as Dejure owner of a system.
In this case, maybe there is a possibility to exclude these two races from the Dejure owner list, so that an error would not be displayed?

User avatar
Hairless-Ape
Posts: 321
Joined: Wed, 6. Nov 02, 20:31
xr

Re: ZMap - Mayhem 3 Map Generator and Editor

Post by Hairless-Ape » Sun, 13. Nov 22, 00:53

More good catches.
Both fixed.
However, neither is critical so I'll wait to put them in a future release.
Thanks
Out of my mind. Back in 5 minutes.

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

Re: ZMap - Mayhem 3 (and Zero Hour) Map Generator and Editor

Post by alexalsp » Mon, 21. Nov 22, 23:25

Another bug
Not restored when loading the map.

Image

ReanimatuS
Posts: 4
Joined: Fri, 26. Apr 19, 16:17

Re: ZMap - Mayhem 3 (and Zero Hour) Map Generator and Editor

Post by ReanimatuS » Sat, 26. Nov 22, 14:18

Hi, Sector VA is wrong after activating Zmap universe, looks like game still think its vanila map, after load same map through MayhemGen problem fixed

User avatar
Hairless-Ape
Posts: 321
Joined: Wed, 6. Nov 02, 20:31
xr

Re: ZMap - Mayhem 3 (and Zero Hour) Map Generator and Editor

Post by Hairless-Ape » Sat, 26. Nov 22, 16:16

ReanimatuS wrote:
Sat, 26. Nov 22, 14:18
Hi, Sector VA is wrong after activating Zmap universe, looks like game still think its vanila map, after load same map through MayhemGen problem fixed
Sounds like you have a problem with your install.
Out of my mind. Back in 5 minutes.

Mstrnicegui
Posts: 4
Joined: Fri, 4. Jun 10, 09:41
x3fl

Re: ZMap - Mayhem 3 (and Zero Hour) Map Generator and Editor

Post by Mstrnicegui » Fri, 23. Dec 22, 00:54

I have everything I need to try zero hour but the generator won't work. I can't scroll past setting split friend foe settings
Any help?

User avatar
Hairless-Ape
Posts: 321
Joined: Wed, 6. Nov 02, 20:31
xr

Re: ZMap - Mayhem 3 (and Zero Hour) Map Generator and Editor

Post by Hairless-Ape » Sun, 1. Jan 23, 17:06

Mstrnicegui wrote:
Fri, 23. Dec 22, 00:54
I have everything I need to try zero hour but the generator won't work. I can't scroll past setting split friend foe settings
Any help?
I don't quite understand what you mean. There is no scrolling in ZMap, other than perhaps in one of the textboxes and that's just text information, not anything functional.
All U.I. controls are presented without any necessary scrolling to get to them. Maybe show a screen shot of what you are trying to do?
Out of my mind. Back in 5 minutes.

Joelnh
Posts: 429
Joined: Wed, 3. Mar 10, 00:12
x3tc

Re: ZMap - Mayhem 3 (and Zero Hour) Map Generator and Editor

Post by Joelnh » Wed, 18. Jan 23, 01:49

Using this on my first Zerohour playthrough. it definately adds more flavor to the game.
How is number of planets and their bonuses decided per sector ?

User avatar
Hairless-Ape
Posts: 321
Joined: Wed, 6. Nov 02, 20:31
xr

Re: ZMap - Mayhem 3 (and Zero Hour) Map Generator and Editor

Post by Hairless-Ape » Fri, 20. Jan 23, 23:12

Joelnh wrote:
Wed, 18. Jan 23, 01:49
Using this on my first Zerohour playthrough. it definately adds more flavor to the game.
How is number of planets and their bonuses decided per sector ?
First, thank you for the kind comment. I think it adds a lot of flavor too :P

Actual Number of Planets in a given sector is driven entirely by this text file:
\Mayhem 3\mayhem_data\sunsandplanets.txt
This file came from the original Mayhem 3 release and represents a list of Sun/Planet combinations separated by a blank line. Basically a template.
When generating the Map/Universe, each system's suns and planets is populated from this list.

Sector Bonus's are random values between an appropriate range. For example, system research level is a random value between 40 and 100.
You can look at the exact generation of these in the method GenerateSystemStats() located in Generator.cs in the source code (which is freely downloadable).
Out of my mind. Back in 5 minutes.

Joelnh
Posts: 429
Joined: Wed, 3. Mar 10, 00:12
x3tc

Re: ZMap - Mayhem 3 (and Zero Hour) Map Generator and Editor

Post by Joelnh » Thu, 2. Feb 23, 13:25

Hairless-Ape wrote:
Fri, 20. Jan 23, 23:12
Joelnh wrote:
Wed, 18. Jan 23, 01:49
Using this on my first Zerohour playthrough. it definately adds more flavor to the game.
How is number of planets and their bonuses decided per sector ?
First, thank you for the kind comment. I think it adds a lot of flavor too :P

Actual Number of Planets in a given sector is driven entirely by this text file:
\Mayhem 3\mayhem_data\sunsandplanets.txt
This file came from the original Mayhem 3 release and represents a list of Sun/Planet combinations separated by a blank line. Basically a template.
When generating the Map/Universe, each system's suns and planets is populated from this list.

Sector Bonus's are random values between an appropriate range. For example, system research level is a random value between 40 and 100.
You can look at the exact generation of these in the method GenerateSystemStats() located in Generator.cs in the source code (which is freely downloadable).
Thank you, I looked and it just confuses me right now. So not going to mess with it.
I was going to try and make all systems have 2-5 planets, and tweak Terraforming to have Pirate ,Khaak, Xenon or OCV invade for more flavor.

Is there an easy way to fix when Sector Names are wrong when said by Computer ?
I just had a great map generated, the right side has a long channel down to the corner with a pocket area of 11 systems that I am planning to claim.

User avatar
Hairless-Ape
Posts: 321
Joined: Wed, 6. Nov 02, 20:31
xr

Re: ZMap - Mayhem 3 (and Zero Hour) Map Generator and Editor

Post by Hairless-Ape » Mon, 13. Feb 23, 14:23

Yes, you could make all systems have 2-5 planets by messing with that template file.
ZMap has nothing to do with terraforming and invasions etc.. as you know, so you would need to alter the mayhem 3 code for that.

I've not been able to duplicate the Sector Names issue so far.
I have only been able to get 1 player to send me his saved map folder for this problem (\mayhem 3\mayhem_galaxies\somemapfolder), and when I loaded it, it worked perfectly fine; system names were all correctly spoken.
My gut feel is that there is something different about their installation such as perhaps some other mod interfering, or perhaps they didn't follow the same installation steps that Joubarbe outlined.

ONE guy said that he took a ZMap and set it active and then loaded it up with the original Joubarbe map editor, and then saved it there, and then it worked for him. No one else has confirmed that this actually works as a solution. Believe me, if I could seem this problem happen, I could easily fix it, but I've generated hundreds and hundreds of maps and so far never seen this problem so i'm at a loss as to what to do. Perhaps if someone sent me their entire mayhem 3 install folder zipped up, I could run that and see if I could duplicate the problem. sigh.
Out of my mind. Back in 5 minutes.

Joelnh
Posts: 429
Joined: Wed, 3. Mar 10, 00:12
x3tc

Re: ZMap - Mayhem 3 (and Zero Hour) Map Generator and Editor

Post by Joelnh » Mon, 13. Feb 23, 21:31

Hairless-Ape wrote:
Mon, 13. Feb 23, 14:23
Yes, you could make all systems have 2-5 planets by messing with that template file.
ZMap has nothing to do with terraforming and invasions etc.. as you know, so you would need to alter the mayhem 3 code for that.

I've not been able to duplicate the Sector Names issue so far.
I have only been able to get 1 player to send me his saved map folder for this problem (\mayhem 3\mayhem_galaxies\somemapfolder), and when I loaded it, it worked perfectly fine; system names were all correctly spoken.
My gut feel is that there is something different about their installation such as perhaps some other mod interfering, or perhaps they didn't follow the same installation steps that Joubarbe outlined.

ONE guy said that he took a ZMap and set it active and then loaded it up with the original Joubarbe map editor, and then saved it there, and then it worked for him. No one else has confirmed that this actually works as a solution. Believe me, if I could seem this problem happen, I could easily fix it, but I've generated hundreds and hundreds of maps and so far never seen this problem so i'm at a loss as to what to do. Perhaps if someone sent me their entire mayhem 3 install folder zipped up, I could run that and see if I could duplicate the problem. sigh.
Really, that is very interesting... I get the wrong names for every sector / map used.
Maybe in future I will redo the installation and see if it has same issue at various stages.
Base X3AP, LU only, Mayhem, ZH, then ZMap Map.

User avatar
Hairless-Ape
Posts: 321
Joined: Wed, 6. Nov 02, 20:31
xr

Re: ZMap - Mayhem 3 (and Zero Hour) Map Generator and Editor

Post by Hairless-Ape » Tue, 14. Feb 23, 17:19

One possibility for the problem is having read-only files in your install directory. I have no idea how they could get this way, but it fits the problem. This would cause a mismatch of voices, and also would be something I would never see if I were to run YOUR map.

ZMap creates the map in \mayhem 3\mayhem_galaxies\somemapfolder
But when you activate it, it copies that entire folder (and sub folders) over to \mayhem 3\, basically overwriting those specific game files and subfolder files.
If any one of them is read-only, the copy operation may not work for that file, and you'd probably never know it, because I just added error messaging for that possibility and haven't released that yet..

Easy way to find out, would be to open up a command prompt and copy the files manually with xcopy..

Or you could just remove the read-only attribute on your mayhem 3 files and then re-activate the map in Zmap:
1. navigate to your mayhem 3 folder.
2. open command prompt and run this: attrib -r -s *.*
3. run Zmap, load the map and re-activate it.
Out of my mind. Back in 5 minutes.

Joelnh
Posts: 429
Joined: Wed, 3. Mar 10, 00:12
x3tc

Re: ZMap - Mayhem 3 (and Zero Hour) Map Generator and Editor

Post by Joelnh » Thu, 16. Feb 23, 16:51

Hairless-Ape wrote:
Tue, 14. Feb 23, 17:19
One possibility for the problem is having read-only files in your install directory. I have no idea how they could get this way, but it fits the problem. This would cause a mismatch of voices, and also would be something I would never see if I were to run YOUR map.

ZMap creates the map in \mayhem 3\mayhem_galaxies\somemapfolder
But when you activate it, it copies that entire folder (and sub folders) over to \mayhem 3\, basically overwriting those specific game files and subfolder files.
If any one of them is read-only, the copy operation may not work for that file, and you'd probably never know it, because I just added error messaging for that possibility and haven't released that yet..

Easy way to find out, would be to open up a command prompt and copy the files manually with xcopy..

Or you could just remove the read-only attribute on your mayhem 3 files and then re-activate the map in Zmap:
1. navigate to your mayhem 3 folder.
2. open command prompt and run this: attrib -r -s *.*
3. run Zmap, load the map and re-activate it.
I just did the attrib command to all files / folders and recopied but still have the problem.

Post Reply

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