Page MenuHomeWildfire Games

Enable the Kushite mercenary camps
ClosedPublic

Authored by temple on Mar 5 2018, 2:02 AM.

Details

Summary

Move the mercenary units out of the barracks and into the mercenary camps (embassies).
Move the advanced mercenary tech as well, and give mercenaries the Mercenary class.
Remove the skirm nerf (clubman is discussed in D1343).

Test Plan

Agree. See that I didn't miss anyhing.

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 5 2018, 2:02 AM
temple added a subscriber: Stan.Mar 5 2018, 2:04 AM
Vulcan added a subscriber: Vulcan.Mar 5 2018, 2:09 AM

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

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

Also includes a fix or two from rP21315.
(Looks like the kush archery range also needs merc_jav -> jav_merc rename, which I can do as well.)

Stan added inline comments.Mar 5 2018, 8:10 AM
binaries/data/mods/public/simulation/templates/structures/kush_blemmye_camp.xml
3 ↗(On Diff #6040)

I think this was on purpose.

binaries/data/mods/public/simulation/templates/structures/kush_nuba_village.xml
3 ↗(On Diff #6040)

Same. Both are some kind of villages so not sure it makes sense they shoot arrows

mimo added a comment.Mar 5 2018, 6:51 PM

You may want to add these two templates in ai/petra/config.js line 60. These are templates for which petra has not (yet?) any strategy to build, and are thus only built in phase_3 when enough resources (in the order given in that list).

binaries/data/mods/public/simulation/templates/structures/kush_nuba_village.xml
3 ↗(On Diff #6040)

But the parent has no Attack component. So no need to disable it.

temple updated this revision to Diff 6044.Mar 6 2018, 2:36 AM
Vulcan added a comment.Mar 6 2018, 2:42 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 (key-spacing):
|    | Extra space after key 'towerLapseTime'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/ai/petra/config.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/ai/petra/config.js
|  17|  17| 	this.popScaling = 1;	// scale factor depending on the max population
|  18|  18| 
|  19|  19| 	this.Military = {
|  20|    |-		"towerLapseTime" : 90,	// Time to wait between building 2 towers
|    |  20|+		"towerLapseTime": 90,	// Time to wait between building 2 towers
|  21|  21| 		"fortressLapseTime" : 390,	// Time to wait between building 2 fortresses
|  22|  22| 		"popForBarracks1" : 25,
|  23|  23| 		"popForBarracks2" : 95,
|    | [NORMAL] ESLintBear (key-spacing):
|    | Extra space after key 'fortressLapseTime'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/ai/petra/config.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/ai/petra/config.js
|  18|  18| 
|  19|  19| 	this.Military = {
|  20|  20| 		"towerLapseTime" : 90,	// Time to wait between building 2 towers
|  21|    |-		"fortressLapseTime" : 390,	// Time to wait between building 2 fortresses
|    |  21|+		"fortressLapseTime": 390,	// Time to wait between building 2 fortresses
|  22|  22| 		"popForBarracks1" : 25,
|  23|  23| 		"popForBarracks2" : 95,
|  24|  24| 		"popForBlacksmith" : 65,
|    | [NORMAL] ESLintBear (key-spacing):
|    | Extra space after key 'popForBarracks1'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/ai/petra/config.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/ai/petra/config.js
|  19|  19| 	this.Military = {
|  20|  20| 		"towerLapseTime" : 90,	// Time to wait between building 2 towers
|  21|  21| 		"fortressLapseTime" : 390,	// Time to wait between building 2 fortresses
|  22|    |-		"popForBarracks1" : 25,
|    |  22|+		"popForBarracks1": 25,
|  23|  23| 		"popForBarracks2" : 95,
|  24|  24| 		"popForBlacksmith" : 65,
|  25|  25| 		"numSentryTowers" : 1
|    | [NORMAL] ESLintBear (key-spacing):
|    | Extra space after key 'popForBarracks2'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/ai/petra/config.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/ai/petra/config.js
|  20|  20| 		"towerLapseTime" : 90,	// Time to wait between building 2 towers
|  21|  21| 		"fortressLapseTime" : 390,	// Time to wait between building 2 fortresses
|  22|  22| 		"popForBarracks1" : 25,
|  23|    |-		"popForBarracks2" : 95,
|    |  23|+		"popForBarracks2": 95,
|  24|  24| 		"popForBlacksmith" : 65,
|  25|  25| 		"numSentryTowers" : 1
|  26|  26| 	};
|    | [NORMAL] ESLintBear (key-spacing):
|    | Extra space after key 'popForBlacksmith'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/ai/petra/config.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/ai/petra/config.js
|  21|  21| 		"fortressLapseTime" : 390,	// Time to wait between building 2 fortresses
|  22|  22| 		"popForBarracks1" : 25,
|  23|  23| 		"popForBarracks2" : 95,
|  24|    |-		"popForBlacksmith" : 65,
|    |  24|+		"popForBlacksmith": 65,
|  25|  25| 		"numSentryTowers" : 1
|  26|  26| 	};
|  27|  27| 	this.Economy = {
|    | [NORMAL] ESLintBear (key-spacing):
|    | Extra space after key 'numSentryTowers'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/ai/petra/config.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/ai/petra/config.js
|  22|  22| 		"popForBarracks1" : 25,
|  23|  23| 		"popForBarracks2" : 95,
|  24|  24| 		"popForBlacksmith" : 65,
|  25|    |-		"numSentryTowers" : 1
|    |  25|+		"numSentryTowers": 1
|  26|  26| 	};
|  27|  27| 	this.Economy = {
|  28|  28| 		"popPhase2" : 38,	// How many units we want before aging to phase2.
|    | [NORMAL] ESLintBear (key-spacing):
|    | Extra space after key 'popPhase2'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/ai/petra/config.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/ai/petra/config.js
|  25|  25| 		"numSentryTowers" : 1
|  26|  26| 	};
|  27|  27| 	this.Economy = {
|  28|    |-		"popPhase2" : 38,	// How many units we want before aging to phase2.
|    |  28|+		"popPhase2": 38,	// How many units we want before aging to phase2.
|  29|  29| 		"workPhase3" : 65,	// How many workers we want before aging to phase3.
|  30|  30| 		"workPhase4" : 80,	// How many workers we want before aging to phase4 or higher.
|  31|  31| 		"popForDock" : 25,
|    | [NORMAL] ESLintBear (key-spacing):
|    | Extra space after key 'workPhase3'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/ai/petra/config.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/ai/petra/config.js
|  26|  26| 	};
|  27|  27| 	this.Economy = {
|  28|  28| 		"popPhase2" : 38,	// How many units we want before aging to phase2.
|  29|    |-		"workPhase3" : 65,	// How many workers we want before aging to phase3.
|    |  29|+		"workPhase3": 65,	// How many workers we want before aging to phase3.
|  30|  30| 		"workPhase4" : 80,	// How many workers we want before aging to phase4 or higher.
|  31|  31| 		"popForDock" : 25,
|  32|  32| 		"targetNumWorkers" : 40,// dummy, will be changed later
|    | [NORMAL] ESLintBear (key-spacing):
|    | Extra space after key 'workPhase4'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/ai/petra/config.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/ai/petra/config.js
|  27|  27| 	this.Economy = {
|  28|  28| 		"popPhase2" : 38,	// How many units we want before aging to phase2.
|  29|  29| 		"workPhase3" : 65,	// How many workers we want before aging to phase3.
|  30|    |-		"workPhase4" : 80,	// How many workers we want before aging to phase4 or higher.
|    |  30|+		"workPhase4": 80,	// How many workers we want before aging to phase4 or higher.
|  31|  31| 		"popForDock" : 25,
|  32|  32| 		"targetNumWorkers" : 40,// dummy, will be changed later
|  33|  33| 		"targetNumTraders" : 5,	// Target number of traders
|    | [NORMAL] ESLintBear (key-spacing):
|    | Extra space after key 'popForDock'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/ai/petra/config.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/ai/petra/config.js
|  28|  28| 		"popPhase2" : 38,	// How many units we want before aging to phase2.
|  29|  29| 		"workPhase3" : 65,	// How many workers we want before aging to phase3.
|  30|  30| 		"workPhase4" : 80,	// How many workers we want before aging to phase4 or higher.
|  31|    |-		"popForDock" : 25,
|    |  31|+		"popForDock": 25,
|  32|  32| 		"targetNumWorkers" : 40,// dummy, will be changed later
|  33|  33| 		"targetNumTraders" : 5,	// Target number of traders
|  34|  34| 		"targetNumFishers" : 1,	// Target number of fishers per sea
|    | [NORMAL] ESLintBear (key-spacing):
|    | Extra space after key 'targetNumWorkers'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/ai/petra/config.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/ai/petra/config.js
|  29|  29| 		"workPhase3" : 65,	// How many workers we want before aging to phase3.
|  30|  30| 		"workPhase4" : 80,	// How many workers we want before aging to phase4 or higher.
|  31|  31| 		"popForDock" : 25,
|  32|    |-		"targetNumWorkers" : 40,// dummy, will be changed later
|    |  32|+		"targetNumWorkers": 40,// dummy, will be changed later
|  33|  33| 		"targetNumTraders" : 5,	// Target number of traders
|  34|  34| 		"targetNumFishers" : 1,	// Target number of fishers per sea
|  35|  35| 		"supportRatio" : 0.35,	// fraction of support workers among the workforce
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/ai/petra/config.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/ai/petra/config.js
|  29|  29| 		"workPhase3" : 65,	// How many workers we want before aging to phase3.
|  30|  30| 		"workPhase4" : 80,	// How many workers we want before aging to phase4 or higher.
|  31|  31| 		"popForDock" : 25,
|  32|    |-		"targetNumWorkers" : 40,// dummy, will be changed later
|    |  32|+		"targetNumWorkers" : 40, // dummy, will be changed later
|  33|  33| 		"targetNumTraders" : 5,	// Target number of traders
|  34|  34| 		"targetNumFishers" : 1,	// Target number of fishers per sea
|  35|  35| 		"supportRatio" : 0.35,	// fraction of support workers among the workforce
|    | [NORMAL] ESLintBear (key-spacing):
|    | Extra space after key 'targetNumTraders'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/ai/petra/config.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/ai/petra/config.js
|  30|  30| 		"workPhase4" : 80,	// How many workers we want before aging to phase4 or higher.
|  31|  31| 		"popForDock" : 25,
|  32|  32| 		"targetNumWorkers" : 40,// dummy, will be changed later
|  33|    |-		"targetNumTraders" : 5,	// Target number of traders
|    |  33|+		"targetNumTraders": 5,	// Target number of traders
|  34|  34| 		"targetNumFishers" : 1,	// Target number of fishers per sea
|  35|  35| 		"supportRatio" : 0.35,	// fraction of support workers among the workforce
|  36|  36| 		"provisionFields" : 2
|    | [NORMAL] ESLintBear (key-spacing):
|    | Extra space after key 'targetNumFishers'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/ai/petra/config.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/ai/petra/config.js
|  31|  31| 		"popForDock" : 25,
|  32|  32| 		"targetNumWorkers" : 40,// dummy, will be changed later
|  33|  33| 		"targetNumTraders" : 5,	// Target number of traders
|  34|    |-		"targetNumFishers" : 1,	// Target number of fishers per sea
|    |  34|+		"targetNumFishers": 1,	// Target number of fishers per sea
|  35|  35| 		"supportRatio" : 0.35,	// fraction of support workers among the workforce
|  36|  36| 		"provisionFields" : 2
|  37|  37| 	};
|    | [NORMAL] ESLintBear (key-spacing):
|    | Extra space after key 'supportRatio'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/ai/petra/config.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/ai/petra/config.js
|  32|  32| 		"targetNumWorkers" : 40,// dummy, will be changed later
|  33|  33| 		"targetNumTraders" : 5,	// Target number of traders
|  34|  34| 		"targetNumFishers" : 1,	// Target number of fishers per sea
|  35|    |-		"supportRatio" : 0.35,	// fraction of support workers among the workforce
|    |  35|+		"supportRatio": 0.35,	// fraction of support workers among the workforce
|  36|  36| 		"provisionFields" : 2
|  37|  37| 	};
|  38|  38| 
|    | [NORMAL] ESLintBear (key-spacing):
|    | Extra space after key 'provisionFields'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/ai/petra/config.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/ai/petra/config.js
|  33|  33| 		"targetNumTraders" : 5,	// Target number of traders
|  34|  34| 		"targetNumFishers" : 1,	// Target number of fishers per sea
|  35|  35| 		"supportRatio" : 0.35,	// fraction of support workers among the workforce
|  36|    |-		"provisionFields" : 2
|    |  36|+		"provisionFields": 2
|  37|  37| 	};
|  38|  38| 
|  39|  39| 	// Note: attack settings are set directly in attack_plan.js
|    | [NORMAL] ESLintBear (key-spacing):
|    | Extra space after key 'defenseRatio'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/ai/petra/config.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/ai/petra/config.js
|  40|  40| 	// defense
|  41|  41| 	this.Defense =
|  42|  42| 	{
|  43|    |-		"defenseRatio" : { "ally": 1.4, "neutral": 1.8, "own": 2 },	// ratio of defenders/attackers.
|    |  43|+		"defenseRatio": { "ally": 1.4, "neutral": 1.8, "own": 2 },	// ratio of defenders/attackers.
|  44|  44| 		"armyCompactSize" : 2000,	// squared. Half-diameter of an army.
|  45|  45| 		"armyBreakawaySize" : 3500,	// squared.
|  46|  46| 		"armyMergeSize" : 1400	// squared.
|    | [NORMAL] ESLintBear (key-spacing):
|    | Extra space after key 'armyCompactSize'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/ai/petra/config.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/ai/petra/config.js
|  41|  41| 	this.Defense =
|  42|  42| 	{
|  43|  43| 		"defenseRatio" : { "ally": 1.4, "neutral": 1.8, "own": 2 },	// ratio of defenders/attackers.
|  44|    |-		"armyCompactSize" : 2000,	// squared. Half-diameter of an army.
|    |  44|+		"armyCompactSize": 2000,	// squared. Half-diameter of an army.
|  45|  45| 		"armyBreakawaySize" : 3500,	// squared.
|  46|  46| 		"armyMergeSize" : 1400	// squared.
|  47|  47| 	};
|    | [NORMAL] ESLintBear (key-spacing):
|    | Extra space after key 'armyBreakawaySize'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/ai/petra/config.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/ai/petra/config.js
|  42|  42| 	{
|  43|  43| 		"defenseRatio" : { "ally": 1.4, "neutral": 1.8, "own": 2 },	// ratio of defenders/attackers.
|  44|  44| 		"armyCompactSize" : 2000,	// squared. Half-diameter of an army.
|  45|    |-		"armyBreakawaySize" : 3500,	// squared.
|    |  45|+		"armyBreakawaySize": 3500,	// squared.
|  46|  46| 		"armyMergeSize" : 1400	// squared.
|  47|  47| 	};
|  48|  48| 
|    | [NORMAL] ESLintBear (key-spacing):
|    | Extra space after key 'armyMergeSize'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/ai/petra/config.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/ai/petra/config.js
|  43|  43| 		"defenseRatio" : { "ally": 1.4, "neutral": 1.8, "own": 2 },	// ratio of defenders/attackers.
|  44|  44| 		"armyCompactSize" : 2000,	// squared. Half-diameter of an army.
|  45|  45| 		"armyBreakawaySize" : 3500,	// squared.
|  46|    |-		"armyMergeSize" : 1400	// squared.
|    |  46|+		"armyMergeSize": 1400	// squared.
|  47|  47| 	};
|  48|  48| 
|  49|  49| 	this.buildings =
|    | [NORMAL] ESLintBear (key-spacing):
|    | Extra space before value for key 'defensive'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/ai/petra/config.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/ai/petra/config.js
| 147| 147| 		let max = personalityList[this.behavior].max;
| 148| 148| 		this.personality = {
| 149| 149| 			"aggressive": min + aggressive * (max - min),
| 150|    |-			"defensive":  1 - max + defensive * (max - min),
|    | 150|+			"defensive": 1 - max + defensive * (max - min),
| 151| 151| 			"cooperative": randFloat(0, 1)
| 152| 152| 		};
| 153| 153| 	}

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

mimo accepted this revision.Mar 6 2018, 7:14 PM

Patch is good.

This revision is now accepted and ready to land.Mar 6 2018, 7:14 PM
This revision was automatically updated to reflect the committed changes.
Owners added a subscriber: Restricted Owners Package.Mar 7 2018, 2:24 AM