FeXoR's random map proposal from https://wildfiregames.com/forum/index.php?/topic/17642-random-map-realistic-terrain-demo/&page=5#comment-330931
(FeXoR please commandeer this and edit the title / patch)
Details
Besides checking for passability, resource collisions, not having endless lists of defaults in function headers,
start the map on the tiny size too.
Diff Detail
- Repository
- rP 0 A.D. Public Repository
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
Build is green
Updating workspaces. Build (release)... Build (debug)... Running release tests... Running cxxtest tests (306 tests)..................................................................................................................................................................................................................................................................................................................OK! Running debug tests... Running cxxtest tests (306 tests)..................................................................................................................................................................................................................................................................................................................OK!
http://jw:8080/job/phabricator/1339/ for more details.
Executing section Default... Executing section Source... Executing section JS... binaries/data/mods/public/maps/random/wild_lake.js | 504| let·initialHeightmap·=·[ | | [MAJOR] ESLintBear: | | Parsing error: Identifier 'initialHeightmap' has already been declared binaries/data/mods/public/maps/random/wild_lake.js | 116| » » let·indexToAddTo·=·undefined; | | [NORMAL] JSHintBear: | | It's not necessary to initialize 'indexToAddTo' to 'undefined'. binaries/data/mods/public/maps/random/wild_lake.js | 281| » » if·(placements.every(p·=>·getDistance(p.x,·p.y,·point.x,·point.y)·>·max(minDistance,·p.dist))) | | [NORMAL] JSHintBear: | | Don't make functions within a loop. binaries/data/mods/public/maps/random/wild_lake.js | 286| » » if·(tries·!=·0·&&·tries·%·100·==·0)·//·Time·Check | | [NORMAL] JSHintBear: | | Use '!==' to compare with '0'. binaries/data/mods/public/maps/random/wild_lake.js | 286| » » if·(tries·!=·0·&&·tries·%·100·==·0)·//·Time·Check | | [NORMAL] JSHintBear: | | Use '===' to compare with '0'. binaries/data/mods/public/maps/random/wild_lake.js | 376| » » if·(i·%·3·==·0) | | [NORMAL] JSHintBear: | | Use '===' to compare with '0'. binaries/data/mods/public/maps/random/wild_lake.js | 424| » » return·averageDistToCC·+·randFloat(-·dAverageDistToCC,·dAverageDistToCC) | | [NORMAL] JSHintBear: | | Missing semicolon. binaries/data/mods/public/maps/random/wild_lake.js | 443| » » if·(i·%·2·==·0) | | [NORMAL] JSHintBear: | | Use '===' to compare with '0'. binaries/data/mods/public/maps/random/wild_lake.js | 475| randomizeBiome() | | [NORMAL] JSHintBear: | | Missing semicolon. binaries/data/mods/public/maps/random/wild_lake.js | 504| let·initialHeightmap·=·[ | | [MAJOR] JSHintBear: | | 'initialHeightmap' has already been declared. binaries/data/mods/public/maps/random/wild_lake.js | 513| let·initialHeightmap·=·[ | | [MAJOR] JSHintBear: | | 'initialHeightmap' has already been declared. binaries/data/mods/public/maps/random/wild_lake.js | 522| let·initialHeightmap·=·[ | | [MAJOR] JSHintBear: | | 'initialHeightmap' has already been declared. binaries/data/mods/public/maps/random/wild_lake.js | 764| » » let·actor·=·undefined; | | [NORMAL] JSHintBear: | | It's not necessary to initialize 'actor' to 'undefined'. binaries/data/mods/public/maps/random/wild_lake.js | 812| » if·(choice·==·0) | | [NORMAL] JSHintBear: | | Use '===' to compare with '0'. Executing section Python... Executing section Perl...
http://jw:8080/job/phabricator_lint/31/ for more details.
Build is green
Updating workspaces. Build (release)... Build (debug)... Running release tests... Running cxxtest tests (306 tests)..................................................................................................................................................................................................................................................................................................................OK! Running debug tests... Running cxxtest tests (306 tests)..................................................................................................................................................................................................................................................................................................................OK!
http://jw:8080/job/phabricator/1340/ for more details.
Executing section Default... Executing section Source... Executing section JS... binaries/data/mods/public/maps/random/wild_lake.js | 504| let·initialHeightmap·=·[ | | [MAJOR] ESLintBear: | | Parsing error: Identifier 'initialHeightmap' has already been declared binaries/data/mods/public/maps/random/wild_lake.js | 116| » » let·indexToAddTo·=·undefined; | | [NORMAL] JSHintBear: | | It's not necessary to initialize 'indexToAddTo' to 'undefined'. binaries/data/mods/public/maps/random/wild_lake.js | 281| » » if·(placements.every(p·=>·getDistance(p.x,·p.y,·point.x,·point.y)·>·max(minDistance,·p.dist))) | | [NORMAL] JSHintBear: | | Don't make functions within a loop. binaries/data/mods/public/maps/random/wild_lake.js | 286| » » if·(tries·!=·0·&&·tries·%·100·==·0)·//·Time·Check | | [NORMAL] JSHintBear: | | Use '!==' to compare with '0'. binaries/data/mods/public/maps/random/wild_lake.js | 286| » » if·(tries·!=·0·&&·tries·%·100·==·0)·//·Time·Check | | [NORMAL] JSHintBear: | | Use '===' to compare with '0'. binaries/data/mods/public/maps/random/wild_lake.js | 376| » » if·(i·%·3·==·0) | | [NORMAL] JSHintBear: | | Use '===' to compare with '0'. binaries/data/mods/public/maps/random/wild_lake.js | 424| » » return·averageDistToCC·+·randFloat(-·dAverageDistToCC,·dAverageDistToCC) | | [NORMAL] JSHintBear: | | Missing semicolon. binaries/data/mods/public/maps/random/wild_lake.js | 443| » » if·(i·%·2·==·0) | | [NORMAL] JSHintBear: | | Use '===' to compare with '0'. binaries/data/mods/public/maps/random/wild_lake.js | 475| randomizeBiome() | | [NORMAL] JSHintBear: | | Missing semicolon. binaries/data/mods/public/maps/random/wild_lake.js | 504| let·initialHeightmap·=·[ | | [MAJOR] JSHintBear: | | 'initialHeightmap' has already been declared. binaries/data/mods/public/maps/random/wild_lake.js | 513| let·initialHeightmap·=·[ | | [MAJOR] JSHintBear: | | 'initialHeightmap' has already been declared. binaries/data/mods/public/maps/random/wild_lake.js | 522| let·initialHeightmap·=·[ | | [MAJOR] JSHintBear: | | 'initialHeightmap' has already been declared. binaries/data/mods/public/maps/random/wild_lake.js | 764| » » let·actor·=·undefined; | | [NORMAL] JSHintBear: | | It's not necessary to initialize 'actor' to 'undefined'. binaries/data/mods/public/maps/random/wild_lake.js | 812| » if·(choice·==·0) | | [NORMAL] JSHintBear: | | Use '===' to compare with '0'. Executing section Python... Executing section Perl...
http://jw:8080/job/phabricator_lint/32/ for more details.
Build is green
Updating workspaces. Build (release)... Build (debug)... Running release tests... Running cxxtest tests (306 tests)..................................................................................................................................................................................................................................................................................................................OK! Running debug tests... Running cxxtest tests (306 tests)..................................................................................................................................................................................................................................................................................................................OK!
http://jw:8080/job/phabricator/1341/ for more details.
Executing section Default... Executing section Source... Executing section JS... binaries/data/mods/public/maps/random/wild_lake.js | 504| let·initialHeightmap·=·[ | | [MAJOR] ESLintBear: | | Parsing error: Identifier 'initialHeightmap' has already been declared binaries/data/mods/public/maps/random/wild_lake.js | 116| » » let·indexToAddTo·=·undefined; | | [NORMAL] JSHintBear: | | It's not necessary to initialize 'indexToAddTo' to 'undefined'. binaries/data/mods/public/maps/random/wild_lake.js | 281| » » if·(placements.every(p·=>·getDistance(p.x,·p.y,·point.x,·point.y)·>·max(minDistance,·p.dist))) | | [NORMAL] JSHintBear: | | Don't make functions within a loop. binaries/data/mods/public/maps/random/wild_lake.js | 286| » » if·(tries·!=·0·&&·tries·%·100·==·0)·//·Time·Check | | [NORMAL] JSHintBear: | | Use '!==' to compare with '0'. binaries/data/mods/public/maps/random/wild_lake.js | 286| » » if·(tries·!=·0·&&·tries·%·100·==·0)·//·Time·Check | | [NORMAL] JSHintBear: | | Use '===' to compare with '0'. binaries/data/mods/public/maps/random/wild_lake.js | 376| » » if·(i·%·3·==·0) | | [NORMAL] JSHintBear: | | Use '===' to compare with '0'. binaries/data/mods/public/maps/random/wild_lake.js | 424| » » return·averageDistToCC·+·randFloat(-·dAverageDistToCC,·dAverageDistToCC) | | [NORMAL] JSHintBear: | | Missing semicolon. binaries/data/mods/public/maps/random/wild_lake.js | 443| » » if·(i·%·2·==·0) | | [NORMAL] JSHintBear: | | Use '===' to compare with '0'. binaries/data/mods/public/maps/random/wild_lake.js | 475| randomizeBiome() | | [NORMAL] JSHintBear: | | Missing semicolon. binaries/data/mods/public/maps/random/wild_lake.js | 504| let·initialHeightmap·=·[ | | [MAJOR] JSHintBear: | | 'initialHeightmap' has already been declared. binaries/data/mods/public/maps/random/wild_lake.js | 513| let·initialHeightmap·=·[ | | [MAJOR] JSHintBear: | | 'initialHeightmap' has already been declared. binaries/data/mods/public/maps/random/wild_lake.js | 522| let·initialHeightmap·=·[ | | [MAJOR] JSHintBear: | | 'initialHeightmap' has already been declared. binaries/data/mods/public/maps/random/wild_lake.js | 764| » » let·actor·=·undefined; | | [NORMAL] JSHintBear: | | It's not necessary to initialize 'actor' to 'undefined'. binaries/data/mods/public/maps/random/wild_lake.js | 812| » if·(choice·==·0) | | [NORMAL] JSHintBear: | | Use '===' to compare with '0'. Executing section Python... Executing section Perl...
http://jw:8080/job/phabricator_lint/33/ for more details.
binaries/data/mods/public/maps/random/wild_lake.js | ||
---|---|---|
9 ↗ | (On Diff #2169) | Just use Date.now() in these instances since we don't use the new Date object |
Fixes elexis remarks (but map specificarguments).
Changed the order so woods don't grow into bases.
Added settlements, not fully designed yet.
Added terrain flattening for settlements (flat) and raider camps (pits).
ToDo:
- Biome specific settlements
- Biome specific domestic animals and farm buildings
- Biome specific raiders
- Move some functions to libs
Also needs a screenshot, but I guess better when it's finished ... which it is not ^^
Executing section Default... Executing section Source... Executing section JS... binaries/data/mods/public/maps/random/wild_lake.js | 504| let·initialHeightmap·=·[ | | [MAJOR] ESLintBear: | | Parsing error: Identifier 'initialHeightmap' has already been declared binaries/data/mods/public/maps/random/wild_lake.js | 116| » » let·indexToAddTo·=·undefined; | | [NORMAL] JSHintBear: | | It's not necessary to initialize 'indexToAddTo' to 'undefined'. binaries/data/mods/public/maps/random/wild_lake.js | 281| » » if·(placements.every(p·=>·getDistance(p.x,·p.y,·point.x,·point.y)·>·max(minDistance,·p.dist))) | | [NORMAL] JSHintBear: | | Don't make functions within a loop. binaries/data/mods/public/maps/random/wild_lake.js | 286| » » if·(tries·!=·0·&&·tries·%·100·==·0)·//·Time·Check | | [NORMAL] JSHintBear: | | Use '!==' to compare with '0'. binaries/data/mods/public/maps/random/wild_lake.js | 286| » » if·(tries·!=·0·&&·tries·%·100·==·0)·//·Time·Check | | [NORMAL] JSHintBear: | | Use '===' to compare with '0'. binaries/data/mods/public/maps/random/wild_lake.js | 351| » » if·(i·%·3·==·0) | | [NORMAL] JSHintBear: | | Use '===' to compare with '0'. binaries/data/mods/public/maps/random/wild_lake.js | 424| » » return·averageDistToCC·+·randFloat(-·dAverageDistToCC,·dAverageDistToCC) | | [NORMAL] JSHintBear: | | Missing semicolon. binaries/data/mods/public/maps/random/wild_lake.js | 443| » » if·(i·%·2·==·0) | | [NORMAL] JSHintBear: | | Use '===' to compare with '0'. binaries/data/mods/public/maps/random/wild_lake.js | 475| randomizeBiome() | | [NORMAL] JSHintBear: | | Missing semicolon. binaries/data/mods/public/maps/random/wild_lake.js | 504| let·initialHeightmap·=·[ | | [MAJOR] JSHintBear: | | 'initialHeightmap' has already been declared. binaries/data/mods/public/maps/random/wild_lake.js | 513| let·initialHeightmap·=·[ | | [MAJOR] JSHintBear: | | 'initialHeightmap' has already been declared. binaries/data/mods/public/maps/random/wild_lake.js | 522| let·initialHeightmap·=·[ | | [MAJOR] JSHintBear: | | 'initialHeightmap' has already been declared. binaries/data/mods/public/maps/random/wild_lake.js | 912| » » let·actor·=·undefined; | | [NORMAL] JSHintBear: | | It's not necessary to initialize 'actor' to 'undefined'. binaries/data/mods/public/maps/random/wild_lake.js | 963| » if·(choice·==·0) | | [NORMAL] JSHintBear: | | Use '===' to compare with '0'. Executing section XML GUI... Executing section Python... Executing section Perl...
http://jw:8080/job/phabricator_lint/75/ for more details.
For tiny (and small) map sizes I have to use a different initial terrain and/or water level ;/
Build is green
Updating workspaces. Build (release)... Build (debug)... Running release tests... Running cxxtest tests (306 tests)..................................................................................................................................................................................................................................................................................................................OK! Running debug tests... Running cxxtest tests (306 tests)..................................................................................................................................................................................................................................................................................................................OK! Checking XML files...
http://jw:8080/job/phabricator/1399/ for more details.
Executing section Default... Executing section Source... Executing section JS... binaries/data/mods/public/maps/random/wild_lake.js | 504| let·initialHeightmap·=·[ | | [MAJOR] ESLintBear: | | Parsing error: Identifier 'initialHeightmap' has already been declared binaries/data/mods/public/maps/random/wild_lake.js | 116| » » let·indexToAddTo·=·undefined; | | [NORMAL] JSHintBear: | | It's not necessary to initialize 'indexToAddTo' to 'undefined'. binaries/data/mods/public/maps/random/wild_lake.js | 281| » » if·(placements.every(p·=>·getDistance(p.x,·p.y,·point.x,·point.y)·>·max(minDistance,·p.dist))) | | [NORMAL] JSHintBear: | | Don't make functions within a loop. binaries/data/mods/public/maps/random/wild_lake.js | 286| » » if·(tries·!=·0·&&·tries·%·100·==·0)·//·Time·Check | | [NORMAL] JSHintBear: | | Use '!==' to compare with '0'. binaries/data/mods/public/maps/random/wild_lake.js | 286| » » if·(tries·!=·0·&&·tries·%·100·==·0)·//·Time·Check | | [NORMAL] JSHintBear: | | Use '===' to compare with '0'. binaries/data/mods/public/maps/random/wild_lake.js | 351| » » if·(i·%·3·==·0) | | [NORMAL] JSHintBear: | | Use '===' to compare with '0'. binaries/data/mods/public/maps/random/wild_lake.js | 424| » » return·averageDistToCC·+·randFloat(-·dAverageDistToCC,·dAverageDistToCC) | | [NORMAL] JSHintBear: | | Missing semicolon. binaries/data/mods/public/maps/random/wild_lake.js | 443| » » if·(i·%·2·==·0) | | [NORMAL] JSHintBear: | | Use '===' to compare with '0'. binaries/data/mods/public/maps/random/wild_lake.js | 475| randomizeBiome() | | [NORMAL] JSHintBear: | | Missing semicolon. binaries/data/mods/public/maps/random/wild_lake.js | 504| let·initialHeightmap·=·[ | | [MAJOR] JSHintBear: | | 'initialHeightmap' has already been declared. binaries/data/mods/public/maps/random/wild_lake.js | 513| let·initialHeightmap·=·[ | | [MAJOR] JSHintBear: | | 'initialHeightmap' has already been declared. binaries/data/mods/public/maps/random/wild_lake.js | 522| let·initialHeightmap·=·[ | | [MAJOR] JSHintBear: | | 'initialHeightmap' has already been declared. binaries/data/mods/public/maps/random/wild_lake.js | 912| » » let·actor·=·undefined; | | [NORMAL] JSHintBear: | | It's not necessary to initialize 'actor' to 'undefined'. binaries/data/mods/public/maps/random/wild_lake.js | 963| » if·(choice·==·0) | | [NORMAL] JSHintBear: | | Use '===' to compare with '0'. Executing section XML GUI... Executing section Python... Executing section Perl...
http://jw:8080/job/phabricator_lint/76/ for more details.
Build is green
Updating workspaces. Build (release)... Build (debug)... Running release tests... Running cxxtest tests (306 tests)..................................................................................................................................................................................................................................................................................................................OK! Running debug tests... Running cxxtest tests (306 tests)..................................................................................................................................................................................................................................................................................................................OK! Checking XML files...
http://jw:8080/job/phabricator/1400/ for more details.
Executing section Default... Executing section Source... Executing section JS... binaries/data/mods/public/maps/random/wild_lake.js | 716| let·initialHeightmap·=·[ | | [MAJOR] ESLintBear: | | Parsing error: Identifier 'initialHeightmap' has already been declared binaries/data/mods/public/maps/random/wild_lake.js | 116| » » let·indexToAddTo·=·undefined; | | [NORMAL] JSHintBear: | | It's not necessary to initialize 'indexToAddTo' to 'undefined'. binaries/data/mods/public/maps/random/wild_lake.js | 281| » » if·(placements.every(p·=>·getDistance(p.x,·p.y,·point.x,·point.y)·>·max(minDistance,·p.dist))) | | [NORMAL] JSHintBear: | | Don't make functions within a loop. binaries/data/mods/public/maps/random/wild_lake.js | 286| » » if·(tries·!=·0·&&·tries·%·100·==·0)·//·Time·Check | | [NORMAL] JSHintBear: | | Use '!==' to compare with '0'. binaries/data/mods/public/maps/random/wild_lake.js | 286| » » if·(tries·!=·0·&&·tries·%·100·==·0)·//·Time·Check | | [NORMAL] JSHintBear: | | Use '===' to compare with '0'. binaries/data/mods/public/maps/random/wild_lake.js | 309| randomizeBiome() | | [NORMAL] JSHintBear: | | Missing semicolon. binaries/data/mods/public/maps/random/wild_lake.js | 550| » » if·(i·%·3·==·0) | | [NORMAL] JSHintBear: | | Use '===' to compare with '0'. binaries/data/mods/public/maps/random/wild_lake.js | 641| » » return·averageDistToCC·+·randFloat(-·dAverageDistToCC,·dAverageDistToCC) | | [NORMAL] JSHintBear: | | Missing semicolon. binaries/data/mods/public/maps/random/wild_lake.js | 660| » » if·(i·%·2·==·0) | | [NORMAL] JSHintBear: | | Use '===' to compare with '0'. binaries/data/mods/public/maps/random/wild_lake.js | 716| let·initialHeightmap·=·[ | | [MAJOR] JSHintBear: | | 'initialHeightmap' has already been declared. binaries/data/mods/public/maps/random/wild_lake.js | 725| let·initialHeightmap·=·[ | | [MAJOR] JSHintBear: | | 'initialHeightmap' has already been declared. binaries/data/mods/public/maps/random/wild_lake.js | 734| let·initialHeightmap·=·[ | | [MAJOR] JSHintBear: | | 'initialHeightmap' has already been declared. binaries/data/mods/public/maps/random/wild_lake.js | 933| » » let·actor·=·undefined; | | [NORMAL] JSHintBear: | | It's not necessary to initialize 'actor' to 'undefined'. binaries/data/mods/public/maps/random/wild_lake.js | 984| » if·(choice·==·0) | | [NORMAL] JSHintBear: | | Use '===' to compare with '0'. Executing section XML GUI... Executing section Python... Executing section Perl...
http://jw:8080/job/phabricator_lint/77/ for more details.
Build is green
Updating workspaces. Build (release)... Build (debug)... Running release tests... Running cxxtest tests (306 tests)..................................................................................................................................................................................................................................................................................................................OK! Running debug tests... Running cxxtest tests (306 tests)..................................................................................................................................................................................................................................................................................................................OK! Checking XML files...
http://jw:8080/job/phabricator/1402/ for more details.
I tested this map, and I think it is nice from a gameplay perspective (didn't look at the code).
Some things I noticed (some already discussed):
- The settlements could be placed with more gaia units.
- The number of fish in the lake could possibly be decreased a bit.
- Got these once:
ERROR: CCacheLoader failed to find archived or source file for: "simulation/templates/structures/mercenary_camp_egyptian.xml" ERROR: Failed to load entity template 'structures/mercenary_camp_egyptian' ERROR: Failed to load entity template 'structures/mercenary_camp_egyptian'
(I don't think that's the template name.)
- Maybe too many generic animals placed (the actual animal type is different for every biome, of course), although it does come down to matter of preference at some point, of course:
- Fences can get placed on very uneven terrain and get "split" (unavoidable perhaps):
But all in all, a very nice map! I'm looking forward to seeing this one come along.
Fixed:
- Player placement fails on Tiny and small maps: Smaller lake and slightly reduced player base smothing and no Iberian walls on those map sizes
- Changed the one occurrence of mercenary_camp_egyptian to merc_camp_egyptian. Good catch! ;)
- Halfed the number of animals at the lake
- Smothened the terrain below farms
- Slightly reduced the amount of fish
The mappreview is missing.
Would be nice if someone with full graphics enabled could provide some ;)
On the large mapsize, got iber walls ending up inside the civic center of another player (seed 6738, default civs).
Mostly because the lake is way too big on the large size sometimes. (feels like 75% maparea + 10% forests).
CC's ending up inside each other is very frequent on tiny mapsizes. The same function as on caledonian maedows is used and that has the same issue. So that will have to be fixed in a separate patch anyway.
The lakesize should still be capped.
As proposed on the forums a while ago, placing empty military camps that can be captured by players will be really imablancing, give a huge advantage to the closest player (low effort, high reward).
It should be garrisoned by those starting units. I'll hand in a patch.
binaries/data/mods/public/maps/random/wild_lake.js | ||
---|---|---|
6 ↗ | (On Diff #2343) | Nuke the pointless comment |
54 ↗ | (On Diff #2343) | space after { and before } |
81 ↗ | (On Diff #2343) | wat is? |
97 ↗ | (On Diff #2343) | let pointsToAdd = points.reverse() and removing the pointsToAdd.shift? |
116 ↗ | (On Diff #2343) | just let indexToAddTo; without the = undefined |
144 ↗ | (On Diff #2343) | Remove or use this unused function |
169 ↗ | (On Diff #2343) | Math.cos and Math.sin. |
189 ↗ | (On Diff #2343) | space after { and before } More readable with \n: vectorField[x].push({ "x": scalarField[(x + 1) % max_x][y] - scalarField[x][y], "y": scalarField[x][(y + 1) % max_y] - scalarField[x][y] }); |
242 ↗ | (On Diff #2343) | {array} -> {object} |
243 ↗ | (On Diff #2343) | whitespace in objects. (Default args are formatted correctly: http://usejsdoc.org/tags-param.html#optional-parameters-and-default-values ) |
245 ↗ | (On Diff #2343) | 20 (the joys of mentioning the defaults in the comments) |
270 ↗ | (On Diff #2343) | The last 4 lines before the continue: -1 tab +4 spaces |
273 ↗ | (On Diff #2343) | Same for this one |
274 ↗ | (On Diff #2343) | 1 space missing |
540 ↗ | (On Diff #2343) | Those huge lists of defaults hurt. Might be defined in a global. tree5 on an own line groveTileClass on a separate line too |
603 ↗ | (On Diff #2343) | (Could do something with concat and map. Probably won't look better.) |
610 ↗ | (On Diff #2343) | hurt |
635 ↗ | (On Diff #2343) | 10 is ok. According to rP18816, 9 is the min distance for CCs. The trees are really close, but that works. |
641 ↗ | (On Diff #2343) | -dAverage... |
670 ↗ | (On Diff #2343) | These angles look like they prevent resource collisions. |
687 ↗ | (On Diff #2343) | // Time Check comment pointless |
827 ↗ | (On Diff #2343) | // Time Check comment unneeded |
858 ↗ | (On Diff #2343) | Remove or fix |
883 ↗ | (On Diff #2343) | Remove the else keyword |
943 ↗ | (On Diff #2343) | same |
954 ↗ | (On Diff #2343) | ^ |
966 ↗ | (On Diff #2343) | let getMapSize = getMapSize() at the top of the file and replace the getter calls. Remove the boolean and "iberWall": mapSize > 192 |
975 ↗ | (On Diff #2343) | (If it appeals to you, could become an if-elseif chain) |
1004 ↗ | (On Diff #2343) | pointless comment |
1009 ↗ | (On Diff #2343) | pointless comment |
binaries/data/mods/public/maps/random/wild_lake.json | ||
6 ↗ | (On Diff #2343) | That description doesn' vacillate and comes to the point. That has it's own charm. |
binaries/data/mods/public/maps/random/wild_lake.js | ||
---|---|---|
439 ↗ | (On Diff #2343) | Template -> "Template" |
(
Just for the afterworld:
After defining mercenaryCampGuards we could set them to defensive with
// Set units as defensive mercenaryCampGuards = mercenaryCampGuards.map(biomeSet => biomeSet.map(group => ({ "Template": "defensive|" + group.Template, "Count": group.Count })));
and adding to binaries/data/mods/public/simulation/templates/special_filter/defensive.xml:
<?xml version="1.0" encoding="utf-8"?> <Entity merge=""> <UnitAI merge=""> <DefaultStance>defensive</DefaultStance> </UnitAI> </Entity>
But that breaks for the AI for the same reason as in D230. So, would have been nice
)
Executing section Default... Executing section Source... Executing section JS... | | [NORMAL] ESLintBear (no-undef-init): | | It's not necessary to initialize 'indexToAddTo' to undefined. |----| | /mnt/data/jenkins-phabricator/workspace/phabricator_lint/binaries/data/mods/public/maps/random/wild_lake.js | |++++| /mnt/data/jenkins-phabricator/workspace/phabricator_lint/binaries/data/mods/public/maps/random/wild_lake.js | 113| 113| let numPointsToAdd = pointsToAdd.length; | 114| 114| for (let i = 0; i < numPointsToAdd; ++i) | 115| 115| { | 116| |- let indexToAddTo = undefined; | | 116|+ let indexToAddTo; | 117| 117| let minEnlengthen = Infinity; | 118| 118| let minDist1 = 0; | 119| 119| let minDist2 = 0; | | [NORMAL] ESLintBear (no-undef-init): | | It's not necessary to initialize 'actor' to undefined. |----| | /mnt/data/jenkins-phabricator/workspace/phabricator_lint/binaries/data/mods/public/maps/random/wild_lake.js | |++++| /mnt/data/jenkins-phabricator/workspace/phabricator_lint/binaries/data/mods/public/maps/random/wild_lake.js | 918| 918| { | 919| 919| let x = areas[h][t].x; | 920| 920| let y = areas[h][t].y; | 921| |- let actor = undefined; | | 921|+ let actor; | 922| 922| let texture = pickRandom(wildLakeBiome[h].texture); | 923| 923| | 924| 924| if (slopeMap[x][y] < 0.5 * (minSlope[h] + maxSlope[h])) binaries/data/mods/public/maps/random/wild_lake.js | 150| » while·(true) | | [NORMAL] ESLintBear (no-constant-condition): | | Unexpected constant condition. binaries/data/mods/public/maps/random/wild_lake.js | 538| » groveActors·=·[g_Decoratives.grass,·g_Decoratives.rockMedium,·g_Decoratives.bushMedium],·groveTileClass·=·undefined, | | [NORMAL] ESLintBear (no-shadow): | | 'groveActors' is already declared in the upper scope. binaries/data/mods/public/maps/random/wild_lake.js | 116| » » let·indexToAddTo·=·undefined; | | [NORMAL] JSHintBear: | | It's not necessary to initialize 'indexToAddTo' to 'undefined'. binaries/data/mods/public/maps/random/wild_lake.js | 281| » » if·(placements.every(p·=>·getDistance(p.x,·p.y,·point.x,·point.y)·>·max(minDistance,·p.dist))) | | [NORMAL] JSHintBear: | | Don't make functions within a loop. binaries/data/mods/public/maps/random/wild_lake.js | 286| » » if·(tries·!=·0·&&·tries·%·100·==·0)·//·Time·Check | | [NORMAL] JSHintBear: | | Use '!==' to compare with '0'. binaries/data/mods/public/maps/random/wild_lake.js | 286| » » if·(tries·!=·0·&&·tries·%·100·==·0)·//·Time·Check | | [NORMAL] JSHintBear: | | Use '===' to compare with '0'. binaries/data/mods/public/maps/random/wild_lake.js | 309| randomizeBiome() | | [NORMAL] JSHintBear: | | Missing semicolon. binaries/data/mods/public/maps/random/wild_lake.js | 550| » » if·(i·%·3·==·0) | | [NORMAL] JSHintBear: | | Use '===' to compare with '0'. binaries/data/mods/public/maps/random/wild_lake.js | 641| » » return·averageDistToCC·+·randFloat(-·dAverageDistToCC,·dAverageDistToCC) | | [NORMAL] JSHintBear: | | Missing semicolon. binaries/data/mods/public/maps/random/wild_lake.js | 660| » » if·(i·%·2·==·0) | | [NORMAL] JSHintBear: | | Use '===' to compare with '0'. binaries/data/mods/public/maps/random/wild_lake.js | 921| » » let·actor·=·undefined; | | [NORMAL] JSHintBear: | | It's not necessary to initialize 'actor' to 'undefined'. binaries/data/mods/public/maps/random/wild_lake.js | 975| » if·(choice·==·0) | | [NORMAL] JSHintBear: | | Use '===' to compare with '0'. Executing section XML GUI... Executing section Python... Executing section Perl...
http://jw:8080/job/phabricator_lint/91/ for more details.
binaries/data/mods/public/maps/random/wild_lake.js | ||
---|---|---|
81 ↗ | (On Diff #2343) | Traveling salesman problem solved for the case of a closed path. |
Fixed most of elexis comments
Increases defenders of the mercenary camps
Larger map sizes also have smaller lakes (maybe that initial heightmap would work well for all map sizes)
Build is green
Updating workspaces. Build (release)... Build (debug)... Running release tests... Running cxxtest tests (306 tests)..................................................................................................................................................................................................................................................................................................................OK! Running debug tests... Running cxxtest tests (306 tests)..................................................................................................................................................................................................................................................................................................................OK! Checking XML files...
http://jw:8080/job/phabricator/1425/ for more details.
Executing section Default... Executing section Source... Executing section JS... | | [NORMAL] ESLintBear (no-undef-init): | | It's not necessary to initialize 'actor' to undefined. |----| | /mnt/data/jenkins-phabricator/workspace/phabricator_lint/binaries/data/mods/public/maps/random/wild_lake.js | |++++| /mnt/data/jenkins-phabricator/workspace/phabricator_lint/binaries/data/mods/public/maps/random/wild_lake.js | 890| 890| { | 891| 891| let x = areas[h][t].x; | 892| 892| let y = areas[h][t].y; | 893| |- let actor = undefined; | | 893|+ let actor; | 894| 894| let texture = pickRandom(wildLakeBiome[h].texture); | 895| 895| | 896| 896| if (slopeMap[x][y] < 0.5 * (minSlope[h] + maxSlope[h])) binaries/data/mods/public/maps/random/wild_lake.js | 507| » groveActors·=·[g_Decoratives.grass,·g_Decoratives.rockMedium,·g_Decoratives.bushMedium],·groveTileClass·=·undefined, | | [NORMAL] ESLintBear (no-shadow): | | 'groveActors' is already declared in the upper scope. binaries/data/mods/public/maps/random/wild_lake.js | 250| » » if·(placements.every(p·=>·getDistance(p.x,·p.y,·point.x,·point.y)·>·max(minDistance,·p.dist))) | | [NORMAL] JSHintBear: | | Don't make functions within a loop. binaries/data/mods/public/maps/random/wild_lake.js | 255| » » if·(tries·!=·0·&&·tries·%·100·==·0)·//·Time·Check | | [NORMAL] JSHintBear: | | Use '!==' to compare with '0'. binaries/data/mods/public/maps/random/wild_lake.js | 255| » » if·(tries·!=·0·&&·tries·%·100·==·0)·//·Time·Check | | [NORMAL] JSHintBear: | | Use '===' to compare with '0'. binaries/data/mods/public/maps/random/wild_lake.js | 278| randomizeBiome() | | [NORMAL] JSHintBear: | | Missing semicolon. binaries/data/mods/public/maps/random/wild_lake.js | 519| » » if·(i·%·3·==·0) | | [NORMAL] JSHintBear: | | Use '===' to compare with '0'. binaries/data/mods/public/maps/random/wild_lake.js | 610| » » return·averageDistToCC·+·randFloat(-dAverageDistToCC,·dAverageDistToCC) | | [NORMAL] JSHintBear: | | Missing semicolon. binaries/data/mods/public/maps/random/wild_lake.js | 629| » » if·(i·%·2·==·0) | | [NORMAL] JSHintBear: | | Use '===' to compare with '0'. binaries/data/mods/public/maps/random/wild_lake.js | 893| » » let·actor·=·undefined; | | [NORMAL] JSHintBear: | | It's not necessary to initialize 'actor' to 'undefined'. binaries/data/mods/public/maps/random/wild_lake.js | 944| » if·(choice·==·0) | | [NORMAL] JSHintBear: | | Use '===' to compare with '0'. Executing section XML GUI... Executing section Python... Executing section Perl...
http://jw:8080/job/phabricator_lint/92/ for more details.
Seed 8491, Normal Mapsize spawns a bit many muskox in the forests.
(Mark my words with the mercenary camps.)
binaries/data/mods/public/maps/random/wild_lake.js | ||
---|---|---|
707 ↗ | (On Diff #2344) | Since its perfectly symmetrical, it looks like it could just be represented with a radius number |
Build is green
Updating workspaces. Build (release)... Build (debug)... Running release tests... Running cxxtest tests (306 tests)..................................................................................................................................................................................................................................................................................................................OK! Running debug tests... Running cxxtest tests (306 tests)..................................................................................................................................................................................................................................................................................................................OK! Checking XML files...
http://jw:8080/job/phabricator/1426/ for more details.
Build is green
Updating workspaces. Build (release)... Build (debug)... Running release tests... Running cxxtest tests (306 tests)..................................................................................................................................................................................................................................................................................................................OK! Running debug tests... Running cxxtest tests (306 tests)..................................................................................................................................................................................................................................................................................................................OK! Checking XML files...
http://jw:8080/job/phabricator/1429/ for more details.
Executing section Default... Executing section Source... Executing section JS... Executing section XML GUI... Executing section Python... Executing section Perl...
http://jw:8080/job/phabricator_lint/94/ for more details.