Random Map Generation

Interesting mapping tools and mapping help.

Moderator: Morax

Re: Random Map Generation

Postby Omnipotent » 26 Aug 2014, 10:29

partytime wrote:Omnipotent, you seem to know a bit about it - besides the sky cube, do you know what other changes there were in v60 maps?


Yep, well the v60 maps are exactly the same as Demigod maps. They use the exact same version of .scmap . The only difference is that DG has a working Beta Version of a map editor whereas Supcom has "sweet FA". Literally.
Now looking into the subject the scmap is divided into different sections. What differs from the first gen (v56 + v56) is that they do not code for:

1) Better lighting generation, better skycubes, envcubes and water. Moving clouds, weather generation, everything you would want in your perfect map.
2) Better decal generation, no flickering decals. They are able to store more data thus more detailed decals can be used. Resizing etc does not affect the quality to the extent it does in v53 for example.
3) Better terrain generation, no flickering heightmaps. Glitches that occur when the edge of an elevation is not smooth. Also campaign maps have greater scripting capabilities as a result. This could be due to defining more playable areas.
4) Terrain efffects. The v60 scmap can utilize all terrain types and blend them unlike the other versions. You could have red sand blend nicely into white sand as it behaves like a strata brush of varying intensity. Not this "round1k_hard_interp" crap, that's either left or right.

.scmaps are read by the .lua files. Scripts, saves and scenarios contain extra information which make the map playable by the game. Which is why wreckage or placed map editor units can only be restored to a broken map if you manage to restore the save. The .scmap will not code for any information like that.
It's possible to edit map markers of a v60 by simply replacing the _save.lua without having to open it. You just need to know the coordinates or relative positions.
The scenario then paths all the files in the folders and dictates the name and description as well as the map size.

Attemtping to edit the heightmap by copying and pasting v56 heightmap information into the v60 will cause the map to crash on start. I've tried. I have not tried the other way around though. Not sure if Vanilla reads the information correctly. I think it does.

Apart from that I truly know nothing more about the .scmap, alot of the code is complete gobbledygook.

Kind regards.
1 Sulphur Mounds, Sulphur Lake, and Open Combat
2 Coastal Bridge v2
3 Burner, Burner II
4 Fortress Ascent
5 Gap Of Genesis
6 Genesis VI, Genesis IV
7 Coastal Aisles
8 Hypothermia
9 The Requisite
10 New Wonder
11 New Zeta Wonder
User avatar
Omnipotent
Crusader
 
Posts: 48
Joined: 22 Nov 2013, 12:56
Location: All your maps are belong to us.
Has liked: 3 times
Been liked: 9 times
FAF User Name: Omnipotent

Re: Random Map Generation

Postby nine2 » 26 Aug 2014, 13:43

omg. how do you know all of this?

alot of the code is complete gobbledygook.

which code are you looking at?

I have spent ages investigating map formats, as well as some other people, so I'd really like to know what you know.
nine2
Councillor - Promotion
 
Posts: 2416
Joined: 16 Apr 2013, 10:10
Has liked: 285 times
Been liked: 515 times
FAF User Name: Anihilnine

Re: Random Map Generation

Postby nine2 » 26 Aug 2014, 13:45

are there technical demigod resources available that I might adapt to FA ?
nine2
Councillor - Promotion
 
Posts: 2416
Joined: 16 Apr 2013, 10:10
Has liked: 285 times
Been liked: 515 times
FAF User Name: Anihilnine

Re: Random Map Generation

Postby Omnipotent » 26 Aug 2014, 21:45

partytime wrote:are there technical demigod resources available that I might adapt to FA ?


I have friends on Xfire that played Demigod a lot. Afaik there's a Beta tool for map makers of Demigod, whether you'd be able to use it is a different matter.
.scmaps created are v60 and have the same EnvCubes as Forged Alliance. I doubt they'd be compatible but it's worth a shot!

partytime wrote:omg. how do you know all of this?

alot of the code is complete gobbledygook.

which code are you looking at?

I have spent ages investigating map formats, as well as some other people, so I'd really like to know what you know.


A lot is explained as .scd, .dds, and .bp files. Other people have also posted what they know in cached copies of GPG Forum threads. In my case, v60 scmaps knowledge was personal conducted research... I had tested a lot of things and tried to understand the hex of it.

Also, I know this because there is literally lines of "ººººººººººººº" and "ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ"s which I can't even tell what it is. As duck said, you'd need an ANSI (or other) reference and going over the thousands of lines generated by the editor, in the .scmap (in some cases). Which I cba doing...

I'm not a coder, I don't claim to be, and this was just a stab in the dark out of curiosity. Disappointing, but whatever.
1 Sulphur Mounds, Sulphur Lake, and Open Combat
2 Coastal Bridge v2
3 Burner, Burner II
4 Fortress Ascent
5 Gap Of Genesis
6 Genesis VI, Genesis IV
7 Coastal Aisles
8 Hypothermia
9 The Requisite
10 New Wonder
11 New Zeta Wonder
User avatar
Omnipotent
Crusader
 
Posts: 48
Joined: 22 Nov 2013, 12:56
Location: All your maps are belong to us.
Has liked: 3 times
Been liked: 9 times
FAF User Name: Omnipotent

Re: Random Map Generation

Postby Lionhardt » 26 Aug 2014, 22:41

Wait. There is a map editor that is superior to the one we use, that can create a map format, that is superior to the one we use, that is red by FA?
Help me make better maps for all of us, visit my Mapping Thread.

Maps needing gameplay feedback:
Spoiler: show
[list updated last: 31.1.2018]

(maps available in the vault)

- Hexagonian Drylands
- Fervent Soil and Torrid Suns

YouTube Channel
User avatar
Lionhardt
Contributor
 
Posts: 1070
Joined: 29 Jan 2013, 23:44
Has liked: 188 times
Been liked: 144 times
FAF User Name: Lionhardt

Re: Random Map Generation

Postby Omnipotent » 27 Aug 2014, 12:47

It could be possible, but DG maps and supcom maps are treated differently. The Beta tool for DG is indeed a better map editor and the .scmaps are always v60. So your envcubes are pathed correctly. I doubt it will load a supreme commander .scmap though. It might be possible to create a heightmap in v60, path weather gen from the DG editor and then place a _save.lua in the folder and do it the long way.

I did come across a revelation today. I got an actual reaction from the map today. So if you open up an ordinary map (eg. x1mp_007: Strip Mine, which has the envcube I want to use for my map - don't party crash :P)
If you take a look at the path: it will say for example:

TTerrainXP./textures/environment/blackbackground.dds./textures/environment/defaultskycube.dds.....<aeon>./textures/environment/envcube_aeon_desert.dds.<default>./textures/environment/defaultenvcube.dds.<seraphim>./textures/environment/envcube_seraphim_desert.dds.33³?#..¿èÕ.?ˆ?%?............\.Â?×£°?¸.…?.×£>™™™>¸..?š™™>....˜.!......×£=ìQ8?š™.?×£ð>......%D...ŒA..pA.. @....333?..À?o.ƒ=F¶ó=..À>š™.>..À?...?..À?..HB.. AëßË=ûnv¿có€>ç.P?7½ò>•b.>.. @ÍÌÌ=/textures/engine/waterCubemap.dds./textures/engine/waterramp.dds.
(Taken directly from the hex editor.)

You can see the direct path in green. By default it is a blackbackground. Default SkyCube (as they are no longer used in v60 but there as support for v53 maps) and everything else is an "EnvCube" <----- This is important information. As you can see, default SkyCube is mentioned twice. Now if you actually uncompressed the folder, you will see that only One default SkyCube exists in the folder, and is approx. 700kb big. Others are in the range of 100-300kb. So <aeon> and <seraphim> are coming from the same file. This is true because the file must contain information regarding the two states denoted by the information put in the brackets "< >"

So default SkyCube in two different states is used twice (most likely as the sky colour) and 2 EnvCubes dictating the Cumulus, Weather and lighting properties.

The line I've highlight in red, is what I believe to be the generator code. It is different structure to v.53 maps and is unique to every map.
In general v60 maps are a lot more compressed. And do not contain half as much information on water ramps + waves and water decals than the v53s, v56s etc.

So... Speed of clouds, direction, extra effects... Without having to using a script to make the game generate it. It will be generated by the map itself. Handy I would say.

Curiously I read a post by you Lion, saying that you couldn't use 8 stratas. Well a map called "Mezmerizing Paradise" successfully utilizes all 8 stratas with no problem. You might want to look into that. As I said before though, v60 maps can utilize all 8 BY DEFAULT anyway. TTerrain and TerrainXP are both used with different strata properties.

I think it's possible to copy the relevant files that you wish to use in your map folder root and instead of pathing them from the default location (which I believe is impossible) path them from your map folder instead.

Like this:
Code: Select all
blackbackground.dds
DefaultSkyCube.dds
EnvCube_aeon_desert.dds
EnvCube_seraphim_desert.dds
ROM.scmap
rom_scenario.lua
rom_save.lua
rom_script.lua


An example path would be:
TTerrain./maps/rom/blackbackground.dds./maps/rom/defaultskycube.dds.....


But it's all useless without the generation code. Copying and pasting directly from another map will cause the map to not start. However the sky was deep blue which was strange.
I think I might be getting close to an answer but I lack the tools and the knowledge and noone wants to help me lol.
I wouldn't mind donating to Hazardx if it gave him an incentive to get back into the supcom scene... (JUST PUTTING THAT OUT THERE)
I urge anyone that's interested to grab a copy of HxD, make backups of your maps to a test folder and start experimenting. I can send you pictures and relevant information of what you're supposed to be looking for. Also, find a terrain simulator with weather generation that can path the .dds files and export them as .scmaps .

The fact that I got an actual reaction from the game is a good sign.
1 Sulphur Mounds, Sulphur Lake, and Open Combat
2 Coastal Bridge v2
3 Burner, Burner II
4 Fortress Ascent
5 Gap Of Genesis
6 Genesis VI, Genesis IV
7 Coastal Aisles
8 Hypothermia
9 The Requisite
10 New Wonder
11 New Zeta Wonder
User avatar
Omnipotent
Crusader
 
Posts: 48
Joined: 22 Nov 2013, 12:56
Location: All your maps are belong to us.
Has liked: 3 times
Been liked: 9 times
FAF User Name: Omnipotent

Re: Random Map Generation

Postby nine2 » 27 Aug 2014, 13:57

Omnipotent wrote:The line I've highlight in red, is what I believe to be the generator code. It is different structure to v.53 maps and is unique to every map.


so you work out what the values are in your beta map editor, or maybe even by running some lua in the console.
once you know the values you find out what they are in hex, then look in your red bit to see if that is what they are.

we need to get our hands on this demigod editor. even if we are just opening up demigod maps, we could at the least see what the fields are
nine2
Councillor - Promotion
 
Posts: 2416
Joined: 16 Apr 2013, 10:10
Has liked: 285 times
Been liked: 515 times
FAF User Name: Anihilnine

Re: Random Map Generation

Postby Omnipotent » 27 Aug 2014, 16:29

partytime wrote:
Omnipotent wrote:The line I've highlight in red, is what I believe to be the generator code. It is different structure to v.53 maps and is unique to every map.


so you work out what the values are in your beta map editor, or maybe even by running some lua in the console.
once you know the values you find out what they are in hex, then look in your red bit to see if that is what they are.

we need to get our hands on this demigod editor. even if we are just opening up demigod maps, we could at the least see what the fields are


I've given up for the moment. This is taking too much time away from me. You can open the .scmap directly using the hex editor. I would encourage you look at the console commands here however:

http://supcom.wikia.com/wiki/Console_commands

Might be worth your while.
1 Sulphur Mounds, Sulphur Lake, and Open Combat
2 Coastal Bridge v2
3 Burner, Burner II
4 Fortress Ascent
5 Gap Of Genesis
6 Genesis VI, Genesis IV
7 Coastal Aisles
8 Hypothermia
9 The Requisite
10 New Wonder
11 New Zeta Wonder
User avatar
Omnipotent
Crusader
 
Posts: 48
Joined: 22 Nov 2013, 12:56
Location: All your maps are belong to us.
Has liked: 3 times
Been liked: 9 times
FAF User Name: Omnipotent

Re: Random Map Generation

Postby nine2 » 27 Aug 2014, 16:31

do you know where i can find demigod editor? its... hiding
nine2
Councillor - Promotion
 
Posts: 2416
Joined: 16 Apr 2013, 10:10
Has liked: 285 times
Been liked: 515 times
FAF User Name: Anihilnine

Re: Random Map Generation

Postby Omnipotent » 27 Aug 2014, 16:40

partytime wrote:do you know where i can find demigod editor? its... hiding


Would be the case, I think it was implemented in the Beta version of the game :\
1 Sulphur Mounds, Sulphur Lake, and Open Combat
2 Coastal Bridge v2
3 Burner, Burner II
4 Fortress Ascent
5 Gap Of Genesis
6 Genesis VI, Genesis IV
7 Coastal Aisles
8 Hypothermia
9 The Requisite
10 New Wonder
11 New Zeta Wonder
User avatar
Omnipotent
Crusader
 
Posts: 48
Joined: 22 Nov 2013, 12:56
Location: All your maps are belong to us.
Has liked: 3 times
Been liked: 9 times
FAF User Name: Omnipotent

PreviousNext

Return to Mapping

Who is online

Users browsing this forum: No registered users and 1 guest