HomeWildfire Games

Delete BaseHeight property from random map JSON files and rmgen library, refs…

Description

Delete BaseHeight property from random map JSON files and rmgen library, refs #6, #4973, r8494, r9096.
The height is only a concern to the random map script, not the rmgen library, nor the gamesetup, nor the simulation.

Reveals the actual initial elevation to the random map script author without looking up the JSON file.
Group and rename all height constants of random maps below the template names.
Rename waterHeight to heightSeaGround to prevent confusion with the actual waterlevel.
Remove useless paintTerrainBasedOnHeight calls on African Plains and Polar Sea.

Details

Auditors
Imarok
Committed
elexisJan 18 2018, 2:57 PM
Parents
rP20903: Fix Wild Lake in rP20882.
Branches
Unknown
Tags
Unknown
Build Status
Buildable 4532
Build 7915: Post-Commit Build

Event Timeline

mimo added a subscriber: mimo.Jan 19 2018, 8:01 PM
mimo added inline comments.
/ps/trunk/binaries/data/mods/public/maps/random/botswanan_haven.js
49

dupplicate definition

elexis added inline comments.Jan 19 2018, 8:04 PM
/ps/trunk/binaries/data/mods/public/maps/random/botswanan_haven.js
49

Good catch, thanks

/ps/trunk/binaries/data/mods/public/maps/random/pyrenean_sierra.js
101

Also I noticed this call means tGrass is the default and can be moved to the top

Imarok raised a concern with this commit.Jan 20 2018, 2:01 PM
Imarok added a subscriber: Imarok.
Imarok added inline comments.
/ps/trunk/binaries/data/mods/public/maps/random/oasis.js
196

should that be heightOasisPath?

This commit now has outstanding concerns.Jan 20 2018, 2:01 PM
elexis added inline comments.Jan 20 2018, 2:12 PM
/ps/trunk/binaries/data/mods/public/maps/random/ardennes_forest.js
229

^ (fixed already)

240

^

/ps/trunk/binaries/data/mods/public/maps/random/botswanan_haven.js
117

Would be nice if we could eventually run a specific test from the command-line that generates every random map script with a mapsize given from command line.

/ps/trunk/binaries/data/mods/public/maps/random/oasis.js
196

Should, thanks.

First I had oasisHeight in all 60 files, then I changed all 60 files to hOasis (materi style coherent with tTexture and oEntity) but then I changed everything to heightOasis everywhere because all textures and entity template names should be changed eventually too.
(A comment would have done too, you likely don't want to audit the entire commit, though that would be appreciated)

Imarok added inline comments.Jan 20 2018, 2:15 PM
/ps/trunk/binaries/data/mods/public/maps/random/botswanan_haven.js
117

I guessed, you already have such thing...

Besides some correctly added words with "h" but without "height", this query found all known variable names wrong in this commit, so I have an indication to assume those were all.

cat file | grep ^+ | grep -v let | grep -v height | grep h  | grep -v ^+++

The other ones were fixed already.

+var clPath = createTileClass();
+var tGrassShrubs = "savanna_shrubs_a";
+var snowlineHeight = 29;
+				new SmoothElevationPainter(ELEVATION_SET, hRavineValley, 2)
+				new SmoothElevationPainter(ELEVATION_SET, hRavineHill, 2),
+			new SmoothElevationPainter(ELEVATION_SET, hMarsh, 3),
+var heighRing = 4;
+	new SmoothElevationPainter(ELEVATION_SET, heighRing, 4));
+	new SmoothElevationPainter(ELEVATION_SET, heighRing, 3));
+const shoreRadius = 6;
+			new PathPlacer(start.x, start.y, end.x, end.y, scaleByMapSize(14, mSize), mWaviness, 0.1, mOffset, mTaper),
+			new PathPlacer(playerPosition.x, playerPosition.y, expansionPosition.x, expansionPosition.y, 12, 0.7, 0.5, 0.1, -1),
+				new PathPlacer(pathPosition.x, pathPosition.y, neighborPosition.x, neighborPosition.y, 19, 0.4, 0.5, 0.1, -0.6),
+			new ClumpPlacer(1200, 0.5, 0.5, 1, harborPosition.x, harborPosition.y),
+			new PathPlacer(start.x, start.y, end.x, end.y, scaleByMapSize(14, spineSize), 0.6, 0.1, 0.4, spineTapering),
+			new SmoothElevationPainter(ELEVATION_SET, hOasisPath, 5),
+			"startHeight": MountainHeight - 25,
elexis added inline comments.Jan 20 2018, 5:39 PM
/ps/trunk/binaries/data/mods/public/maps/random/botswanan_haven.js
117

The rmgen rewrite could have been 3 months instead of 5 months if I hadn't stacked things in github. So the increased rates of typos indicates that my github branches are mostly depleted. I.e. No, don't have it yet. But once the new vector order is complete, I can add many new features. I'm envisioning random map script singleplayer campaigns. So they're the same yet different each time, like Danubius :-)

elexis requested verification of this commit.Jan 20 2018, 7:30 PM
This commit now requires verification by auditors.Jan 20 2018, 7:30 PM
Imarok resigned from this commit.Jan 22 2018, 2:40 PM

fixed

This commit no longer requires audit.Jan 22 2018, 2:40 PM