Page MenuHomeWildfire Games

Add a nonbuilder filter, use on survival of the fittest
ClosedPublic

Authored by temple on Mar 14 2018, 12:03 AM.

Details

Summary

The starting women on survival of the fittest should only gather treasures, not build things.

Test Plan

See that the starting women can't build or repair.

Diff Detail

Repository
rP 0 A.D. Public Repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

temple created this revision.Mar 14 2018, 12:03 AM

I decline this patch due to not more possible to build in mid

Vulcan added a subscriber: Vulcan.Mar 14 2018, 4:07 AM

Successful build - Chance fights ever on the side of the prudent.

Linter detected issues:
Executing section Default...
Executing section Source...
Executing section JS...
|    | [NORMAL] ESLintBear (no-multi-spaces):
|    | Multiple spaces found before 'i'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/maps/random/survivalofthefittest.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/maps/random/survivalofthefittest.js
|  73|  73| var passage = distributePointsOnCircle(numPlayers, startAngle + Math.PI / numPlayers, fractionToTiles(0.5), mapCenter)[0];
|  74|  74| 
|  75|  75| g_Map.log("Creating player bases, passages, treasure seeker woman and attacker points");
|  76|    |-for (let  i = 0; i < numPlayers; ++i)
|    |  76|+for (let i = 0; i < numPlayers; ++i)
|  77|  77| {
|  78|  78| 	placeStartingEntities(playerPosition[i], playerIDs[i], getStartingEntities(playerIDs[i]).filter(ent =>
|  79|  79| 		ent.Template.indexOf("civil_centre") != -1 || ent.Template.indexOf("infantry") != -1));
|    | [NORMAL] ESLintBear (comma-spacing):
|    | There should be no space before ','.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/maps/random/survivalofthefittest.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/maps/random/survivalofthefittest.js
|  93|  93| 		]);
|  94|  94| 
|  95|  95| 	// Treasure seeker woman
|  96|    |-	let femaleLocation = findLocationInDirectionBasedOnHeight(playerPosition[i], mapCenter, -3 , 3.5, 3).round();
|    |  96|+	let femaleLocation = findLocationInDirectionBasedOnHeight(playerPosition[i], mapCenter, -3, 3.5, 3).round();
|  97|  97| 	clWomen.add(femaleLocation);
|  98|  98| 	g_Map.placeEntityPassable(oTreasureSeeker, playerIDs[i], femaleLocation, playerAngle[i] + Math.PI);
|  99|  99| 
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/maps/random/survivalofthefittest.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/maps/random/survivalofthefittest.js
| 182| 182| 		[new SimpleObject(aRockMedium, 1, 3, 0, 1)],
| 183| 183| 		[new SimpleObject(aRockLarge, 1, 2, 0, 1), new SimpleObject(aRockMedium, 1, 3, 0, 2)],
| 184| 184| 		[new SimpleObject(aGrassShort, 1, 2, 0, 1)],
| 185|    |-		[new SimpleObject(aGrass, 2,4, 0, 1.8), new SimpleObject(aGrassShort, 3, 6, 1.2, 2.5)],
|    | 185|+		[new SimpleObject(aGrass, 2, 4, 0, 1.8), new SimpleObject(aGrassShort, 3, 6, 1.2, 2.5)],
| 186| 186| 		[new SimpleObject(aBushMedium, 1, 2, 0, 2), new SimpleObject(aBushSmall, 2, 4, 0, 2)]
| 187| 187| 	],
| 188| 188| 	[

Link to build: https://jenkins.wildfiregames.com/job/differential/241/display/redirect

elexis accepted this revision.Mar 14 2018, 10:32 AM
elexis added a subscriber: elexis.

I decline this patch due to not more possible to build in mid

That is the idea of the patch.
Which buildings do you want to build there?
Most of them are disabled already, in particular the storehouse and civic center.
The problem with building in the middle is that it entirely depends on mapgen luck who can build there.
Often only one player can. So why would this be legitimate?
The only building I can think of is the outpost to give more vision range.

var disabledTemplates = (civ) => [
	// Economic structures
	"structures/" + civ + "_corral",
	"structures/" + civ + "_farmstead",
	"structures/" + civ + "_field",
	"structures/" + civ + "_storehouse",
	"structures/" + civ + "_rotarymill",
	"units/maur_support_elephant",

	// Expansions
	"structures/" + civ + "_civil_centre",
	"structures/" + civ + "_military_colony",

	// Walls
	"structures/" + civ + "_wallset_stone",
	"structures/rome_wallset_siege",
	"other/wallset_palisade",

	// Shoreline
	"structures/" + civ + "_dock",
	"structures/brit_crannog",
	"structures/cart_super_dock",
	"structures/ptol_lighthouse"
];

Hannibal barca agreed with the patch, who is the only one I know who builds outposts there.

This revision is now accepted and ready to land.Mar 14 2018, 10:32 AM
lyv added a subscriber: lyv.Mar 14 2018, 3:18 PM

What i had in mind when I brought it up in irc were barracks and other unit trainable buildings. Using cav is equivalent to cheating in this map. So imo this is merely fixing an oversight.

In D1385#56994, @smiley wrote:

What i had in mind when I brought it up in irc were barracks and other unit trainable buildings. Using cav is equivalent to cheating in this map. So imo this is merely fixing an oversight.

Also towers preventing the enemies from picking treasures.

just liking the freedom we have with it. more possibilities more fun

just liking the freedom we have with it. more possibilities more fun

How much freedom is there if one player can build and the other 7 can't?
The map would have to be redesigned to allow that.

This revision was automatically updated to reflect the committed changes.
Owners added a subscriber: Restricted Owners Package.Mar 14 2018, 11:40 PM
ffffffff added a comment.EditedMar 15 2018, 5:02 AM

but normaly if u phase all got access to build down didnt see one couldnt

Last time I checked, one player can build towers and barracks in age 2 already and deny everyone else the treasures and building of anything down there.
Besides the rational arguments, I'd bring this commit rP15663 as evidence to the court that it is intended by the original map author that one can't build in the middle.

(Speaking about the idea of the map, it probably wasn't the idea either that one can trade and just ignore the treasure.
It probably wasnt either the idea that the number of treasures increases by the square of the mapsize, yielding very different difficulty levels.)

map survival build mid
or survival old version?

IMO maps should have a way to specify custom options. Then you could add an option to survival that if enabled, creats a path leading downwards.