Main Menu
Search
EnglishUnited Kingdom

MapGEN v0.9.1.1

Started by Plutonic, July 25, 2015, 09:28 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

King-Gizzard

Hey, Sensei asked me to reply here with what I can see.  I may be using an old version of MapGen? It's 0.8.7 Beta

With this version I notice the following:

- Even if the generated map uses few colours, the full palette space is filled which is where I can see lots of other colours (reds etc) - example here : https://i.ibb.co/p2TqsTm/Palette.png.

- MapGen generates and maps a new palette regardless of the total number of source colours.  Even if there is plenty of space in the target palette it will map colours in a way that changes the objects. For example, with a terrain where all objects share the same 96 colours, even when using the 112 colour option in MapGen, assets have a reduction or change in colours and objects appear slightly differently.

- The 96 colour option generates a 96-colour palette instead of 97 (unlike the 112 colour option which correctly generates 113 to account for transparency)

Ideally, it would be great if MapGen defaulted to the 96 colour option (and generated a 97-colour palette to include the transparency).  This would be compatible with all stock Team 17 terrains and almost all custom terrains.  If MapGen could then aggregate and de-dupe the colours for all source objects to calculate the final palette it would display perfectly, assuming they didn't go over 96 colours.  If the source objects go over the 96 colours then a colour reduction/remapping algorithm could be applied. If it's under 96 colours, MapGen should only add the colours used so the game has more room to potentially draw the background mountains in PNG map mode.

Plutonic

Hi there!
Ok, so yes, right now it does fill the palette, and by the looks of it it makes duplicates. But I don't know where the red ones are coming from, running it on the same theme I get this:

It does create a new palette, but from my testing it was always a pretty good match unless you used more than the selected maximum colours, I will have to do some more testing here.

... ok, that may just be a bug, will check. It will reserve one palette entry for the IndiMask flag, though maybe I need an option to not do that as well where getting that last colour in is important.

I will have a bit of a poke around, see if any of these are quick fixes.


Plutonic

Right! MapGen itself is showing what I posted, but once saved I get the red entries. Sounds like an issue during save, will take a look.
The number of colours set for the Mid setting is indeed wrong, will get that fixed.

Plutonic

Ok, I know what it is doing.
So when saving it, it tries to find all the duplicate colours, but rather than remove them from the palette, it is is assigning them colours from the matching sky. I dont know why I did this, I will no doubt find out when I try to change it. I guess it works fine until you pick a different sky/theme within WA, or resave the map so it loses the WA chuck which sets the theme.

King-Gizzard

In the 'settings.txt' file (for each theme) I notice there is a 'skytop' and 'skybottom' parameter - do these have any influence on the palette?  I know that with all stock terrains (and almost all custom terrains) a maximum of 96 colours are used for all foreground assets so that the game can always at least draw a full sky gradient in PNG map mode even if it can't draw the background mountains (due to lack of palette space).  The stock sky gradients are always 16 colours but can obviously change depending on the theme set when loading the map.

Plutonic

Yes, or at least they did. I have sent you a link on discord to try out.

Plutonic

New version released with the following changes:

v0.8.7.3
* Fix for HostingBuddy, where it would always generate RR's with the wrong path size.
* Fix for HostingBuddy, where it would fail to generate when extra arguments were provided.
* Fix 97 colour setting using one less colours than it should have been, and default to using 97 colour maps.
* Only place the IndiMask marker in the palette when IndiMask is enabled, to allow that colour to be used for the map itself.
* Avoid quantising the colours when the number used is less than the setting we have selected. Ensures colours are preserved unless there are too many.
* Improve quantisation quality when it is used.
* Set NumHoles to 0 for all maps, as WA does bad things to PNG maps when this value is anything else, and it defaults to 18.
* Fix to "Save Settings" not opening the Save dialog.

Sensei

#397
Thanks Plutonic! Thanks King Gizzard too for making him busy!  :D

EDIT: tried to install but nothing happens when clicking a link from Worms2d.info.

Also, down left where it says "current version" it's 0873, but link is still 0872.


King-Gizzard

Those links should work now Sensei.

Big thanks to Plutonic for the work on this.  Custom terrains will now display pixel-perfect. I'm working on converting most of my terrains across, or at least my favorite ones, to be included in a future release but I'll also drop them here when they're done.

FoxHound

Not sure if I understood everything well, but if this update will allow the program to use custom terrains and make those terrains with doubled size, I will work right now on my scheme project Intermediate to the Power of 2 (Intermediate²). I would make a huge mappack on TUS and MonkeyIsland would probably suffer from headache when I do this.

By the way, I wonder if IndiMask will be updated for 3.9, because I was thinking to make a new Die Pie map, a scheme by Cueshark that would benefit a lot from this module.

TheWalrus

Quote from: Plutonic on December 11, 2024, 04:28 PMNew version released with the following changes:

v0.8.7.3
* Fix for HostingBuddy, where it would always generate RR's with the wrong path size.
* Fix for HostingBuddy, where it would fail to generate when extra arguments were provided.
* Fix 97 colour setting using one less colours than it should have been, and default to using 97 colour maps.
* Only place the IndiMask marker in the palette when IndiMask is enabled, to allow that colour to be used for the map itself.
* Avoid quantising the colours when the number used is less than the setting we have selected. Ensures colours are preserved unless there are too many.
* Improve quantisation quality when it is used.
* Set NumHoles to 0 for all maps, as WA does bad things to PNG maps when this value is anything else, and it defaults to 18.
* Fix to "Save Settings" not opening the Save dialog.
Yes!  Was hoping for this!  mapgen is my favorite utility for worms ever.  Thanks Pluto, is there support for custom terrains with this release? 

Sensei

#401
Quote from: TheWalrus on December 11, 2024, 11:32 PMYes!  Was hoping for this!  mapgen is my favorite utility for worms ever.  Thanks Pluto, is there support for custom terrains with this release? 

Pretty sure they were supported all along, but no one did transfer them into MapGEN.
Now colours should be fixed and those terrains will not lose quality when generated in the program (from what I understood). We'll try to do some BnG's and check it out.

Btw, who made this terrain and imported it into MapGEN? Didn't see it elsewhere. Hilarious.
Good for BnG as well.



Plutonic

Quote from: FoxHound on December 11, 2024, 07:32 PMBy the way, I wonder if IndiMask will be updated for 3.9, because I was thinking to make a new Die Pie map, a scheme by Cueshark that would benefit a lot from this module.

If it can be, it will be. As long as someone lets me know 3.9 is out :D

King-Gizzard

Quote from: FoxHound on December 11, 2024, 07:32 PMNot sure if I understood everything well, but if this update will allow the program to use custom terrains and make those terrains with doubled size, I will work right now on my scheme project Intermediate to the Power of 2 (Intermediate²). I would make a huge mappack on TUS and MonkeyIsland would probably suffer from headache when I do this.

All terrains still need converting to work with MapGen.  MapGen places objects and grass differently compared to the game so some stuff does need tweaking as part of the process.

MapGen themes live in the '..\data\generic\themes' folder.  All assets are PNG files.  You can use the "SpriteEddy" or "Sprite Editor" utilities to extract images from terrain files (level.dir) if anyone wants to do their own conversions.

FoxHound

#404
Quote from: King-Gizzard on December 12, 2024, 06:04 PM
Quote from: FoxHound on December 11, 2024, 07:32 PMNot sure if I understood everything well, but if this update will allow the program to use custom terrains and make those terrains with doubled size, I will work right now on my scheme project Intermediate to the Power of 2 (Intermediate²). I would make a huge mappack on TUS and MonkeyIsland would probably suffer from headache when I do this.

All terrains still need converting to work with MapGen.  MapGen places objects and grass differently compared to the game so some stuff does need tweaking as part of the process.

MapGen themes live in the '..\data\generic\themes' folder.  All assets are PNG files.  You can use the "SpriteEddy" or "Sprite Editor" utilities to extract images from terrain files (level.dir) if anyone wants to do their own conversions.


I spent some time trying to do this, I collected all objects from Urban Invasion terrain, the grass, the roots, I copied a text file, and the texture as the soil... The first time I tried it worked with the gray soil and only one object was generating, no grass no roots (very gray terrain). Then I don't know what I did that now I can't make it work again.

I had to split the grass from the roots to put into mapgen folder.

Anyway, here is my attempt: