Differential D2952 Diff 14052 ps/trunk/binaries/data/mods/public/maps/tutorials/starting_economy_walkthrough.js
Changeset View
Changeset View
Standalone View
Standalone View
ps/trunk/binaries/data/mods/public/maps/tutorials/starting_economy_walkthrough.js
Show First 20 Lines • Show All 93 Lines • ▼ Show 20 Lines | Trigger.prototype.tutorialGoals = [ | ||||
}, | }, | ||||
{ | { | ||||
"instructions": [ | "instructions": [ | ||||
markForTranslation("Now that the rally point is set, we can produce additional units and they will do their assigned task automatically.\n"), | markForTranslation("Now that the rally point is set, we can produce additional units and they will do their assigned task automatically.\n"), | ||||
markForTranslation("Citizen soldiers gather wood faster than female citizens. Select the Civic Center and, while holding Shift, click on the second unit icon, the hoplites (holding Shift trains a batch of five units). You can also train units individually by simply clicking, but training 5 units together takes less time than training 5 units individually.") | markForTranslation("Citizen soldiers gather wood faster than female citizens. Select the Civic Center and, while holding Shift, click on the second unit icon, the hoplites (holding Shift trains a batch of five units). You can also train units individually by simply clicking, but training 5 units together takes less time than training 5 units individually.") | ||||
], | ], | ||||
"OnTrainingQueued": function(msg) | "OnTrainingQueued": function(msg) | ||||
{ | { | ||||
if (msg.unitTemplate != "units/athen_infantry_spearman_b" || +msg.count == 1) | if (msg.unitTemplate != "units/athen/infantry_spearman_b" || +msg.count == 1) | ||||
{ | { | ||||
let entity = msg.trainerEntity; | let entity = msg.trainerEntity; | ||||
let cmpProductionQueue = Engine.QueryInterface(entity, IID_ProductionQueue); | let cmpProductionQueue = Engine.QueryInterface(entity, IID_ProductionQueue); | ||||
cmpProductionQueue.ResetQueue(); | cmpProductionQueue.ResetQueue(); | ||||
let txt = +msg.count == 1 ? | let txt = +msg.count == 1 ? | ||||
markForTranslation("Do not forget to hold Shift while clicking to train several units.") : | markForTranslation("Do not forget to hold Shift while clicking to train several units.") : | ||||
markForTranslation("Hold Shift and click on the Hoplite icon."); | markForTranslation("Hold Shift and click on the Hoplite icon."); | ||||
this.WarningMessage(txt); | this.WarningMessage(txt); | ||||
Show All 16 Lines | Trigger.prototype.tutorialGoals = [ | ||||
{ | { | ||||
"instructions": [ | "instructions": [ | ||||
markForTranslation("The newly trained units automatically go to the trees and start gathering Wood.\n"), | markForTranslation("The newly trained units automatically go to the trees and start gathering Wood.\n"), | ||||
markForTranslation("But as they have to bring it back to the Civic Center to deposit it, their gathering efficiency suffers from the distance. To fix that, we can build a storehouse, a dropsite for Wood, Stone, and Metal, close to the trees. To do so, select your five newly trained Citizen Soldiers and look for the construction panel on the bottom right, click on the storehouse icon, move the mouse as close as possible to the trees you want to gather and click on a valid place to build the dropsite.\n"), | markForTranslation("But as they have to bring it back to the Civic Center to deposit it, their gathering efficiency suffers from the distance. To fix that, we can build a storehouse, a dropsite for Wood, Stone, and Metal, close to the trees. To do so, select your five newly trained Citizen Soldiers and look for the construction panel on the bottom right, click on the storehouse icon, move the mouse as close as possible to the trees you want to gather and click on a valid place to build the dropsite.\n"), | ||||
markForTranslation("Invalid (obstructed) positions will show the building preview overlay in red.") | markForTranslation("Invalid (obstructed) positions will show the building preview overlay in red.") | ||||
], | ], | ||||
"OnPlayerCommand": function(msg) | "OnPlayerCommand": function(msg) | ||||
{ | { | ||||
if (msg.cmd.type == "construct" && msg.cmd.template == "structures/athen_storehouse") | if (msg.cmd.type == "construct" && msg.cmd.template == "structures/athen/storehouse") | ||||
this.NextGoal(); | this.NextGoal(); | ||||
} | } | ||||
}, | }, | ||||
{ | { | ||||
"instructions": [ | "instructions": [ | ||||
markForTranslation("The selected citizens will automatically start constructing the building once you place the foundation.") | markForTranslation("The selected citizens will automatically start constructing the building once you place the foundation.") | ||||
], | ], | ||||
"OnStructureBuilt": function(msg) | "OnStructureBuilt": function(msg) | ||||
Show All 9 Lines | "instructions": [ | ||||
markForTranslation("Let's train some female citizens to gather more food. Select the Civic Center, hold Shift and click on the female citizen icon to train 5 female citizens.") | markForTranslation("Let's train some female citizens to gather more food. Select the Civic Center, hold Shift and click on the female citizen icon to train 5 female citizens.") | ||||
], | ], | ||||
"Init": function() | "Init": function() | ||||
{ | { | ||||
this.trainingDone = false; | this.trainingDone = false; | ||||
}, | }, | ||||
"OnTrainingQueued": function(msg) | "OnTrainingQueued": function(msg) | ||||
{ | { | ||||
if (msg.unitTemplate != "units/athen_support_female_citizen" || +msg.count == 1) | if (msg.unitTemplate != "units/athen/support_female_citizen" || +msg.count == 1) | ||||
{ | { | ||||
let entity = msg.trainerEntity; | let entity = msg.trainerEntity; | ||||
let cmpProductionQueue = Engine.QueryInterface(entity, IID_ProductionQueue); | let cmpProductionQueue = Engine.QueryInterface(entity, IID_ProductionQueue); | ||||
cmpProductionQueue.ResetQueue(); | cmpProductionQueue.ResetQueue(); | ||||
let txt = +msg.count == 1 ? | let txt = +msg.count == 1 ? | ||||
markForTranslation("Do not forget to hold Shift and click to train several units.") : | markForTranslation("Do not forget to hold Shift and click to train several units.") : | ||||
markForTranslation("Hold shift and click on the Female Citizen icon."); | markForTranslation("Hold shift and click on the Female Citizen icon."); | ||||
this.WarningMessage(txt); | this.WarningMessage(txt); | ||||
▲ Show 20 Lines • Show All 86 Lines • ▼ Show 20 Lines | Trigger.prototype.tutorialGoals = [ | ||||
{ | { | ||||
"instructions": [ | "instructions": [ | ||||
markForTranslation("Select the three remaining (idle) female citizens and order them to build a farmstead in the center of the large open area to the west of the Civic Center.\n"), | markForTranslation("Select the three remaining (idle) female citizens and order them to build a farmstead in the center of the large open area to the west of the Civic Center.\n"), | ||||
markForTranslation("We will need a decent chunk of space around the farmstead to build fields. In addition, we can see goats on the west side to further improve our food gathering efficiency should we ever decide to hunt them.\n"), | markForTranslation("We will need a decent chunk of space around the farmstead to build fields. In addition, we can see goats on the west side to further improve our food gathering efficiency should we ever decide to hunt them.\n"), | ||||
markForTranslation("If you try to select the three idle female citizens by clicking and dragging a selection rectangle over them, you might accidentally select additional units. To avoid that, hold the I key while selecting so that only idle units are selected. If you accidentally select a cavalry unit, hold Ctrl and click on the cavalry unit icon of the selection panel at the bottom of the screen to remove the cavalry unit from the current selection.") | markForTranslation("If you try to select the three idle female citizens by clicking and dragging a selection rectangle over them, you might accidentally select additional units. To avoid that, hold the I key while selecting so that only idle units are selected. If you accidentally select a cavalry unit, hold Ctrl and click on the cavalry unit icon of the selection panel at the bottom of the screen to remove the cavalry unit from the current selection.") | ||||
], | ], | ||||
"OnPlayerCommand": function(msg) | "OnPlayerCommand": function(msg) | ||||
{ | { | ||||
if (msg.cmd.type == "construct" && msg.cmd.template == "structures/athen_farmstead") | if (msg.cmd.type == "construct" && msg.cmd.template == "structures/athen/farmstead") | ||||
this.NextGoal(); | this.NextGoal(); | ||||
}, | }, | ||||
"OnOwnershipChanged": function(msg) | "OnOwnershipChanged": function(msg) | ||||
{ | { | ||||
if (this.houseGoal.has(+msg.entity)) | if (this.houseGoal.has(+msg.entity)) | ||||
this.houseGoal.delete(+msg.entity); | this.houseGoal.delete(+msg.entity); | ||||
} | } | ||||
}, | }, | ||||
Show All 15 Lines | Trigger.prototype.tutorialGoals = [ | ||||
} | } | ||||
}, | }, | ||||
{ | { | ||||
"instructions": [ | "instructions": [ | ||||
markForTranslation("When both houses are built, select your two female citizens and order them to build a field as close as possible to the farmstead, which is a dropsite for all types of food.") | markForTranslation("When both houses are built, select your two female citizens and order them to build a field as close as possible to the farmstead, which is a dropsite for all types of food.") | ||||
], | ], | ||||
"OnPlayerCommand": function(msg) | "OnPlayerCommand": function(msg) | ||||
{ | { | ||||
if (msg.cmd.type == "construct" && msg.cmd.template == "structures/athen_field") | if (msg.cmd.type == "construct" && msg.cmd.template == "structures/athen/field") | ||||
this.NextGoal(); | this.NextGoal(); | ||||
} | } | ||||
}, | }, | ||||
{ | { | ||||
"instructions": [ | "instructions": [ | ||||
markForTranslation("When the field is ready, the builders will automatically start gathering it.\n"), | markForTranslation("When the field is ready, the builders will automatically start gathering it.\n"), | ||||
markForTranslation("The cavalry unit should have slaughtered all chickens by now. Select it and explore the south-west area: there is a lake with some camels around. Move your cavalry by right-clicking on the point you want to go, and when you see a herd of camels, right-click on one of them to start hunting for food.") | markForTranslation("The cavalry unit should have slaughtered all chickens by now. Select it and explore the south-west area: there is a lake with some camels around. Move your cavalry by right-clicking on the point you want to go, and when you see a herd of camels, right-click on one of them to start hunting for food.") | ||||
], | ], | ||||
Show All 25 Lines | "instructions": [ | ||||
markForTranslation("Now click three times on the female citizen icon in the bottom right panel to train three additional farmers.") | markForTranslation("Now click three times on the female citizen icon in the bottom right panel to train three additional farmers.") | ||||
], | ], | ||||
"Init": function(msg) | "Init": function(msg) | ||||
{ | { | ||||
this.femaleCount = 0; | this.femaleCount = 0; | ||||
}, | }, | ||||
"OnTrainingQueued": function(msg) | "OnTrainingQueued": function(msg) | ||||
{ | { | ||||
if (msg.unitTemplate != "units/athen_support_female_citizen" || +msg.count != 1) | if (msg.unitTemplate != "units/athen/support_female_citizen" || +msg.count != 1) | ||||
{ | { | ||||
let entity = msg.trainerEntity; | let entity = msg.trainerEntity; | ||||
let cmpProductionQueue = Engine.QueryInterface(entity, IID_ProductionQueue); | let cmpProductionQueue = Engine.QueryInterface(entity, IID_ProductionQueue); | ||||
cmpProductionQueue.ResetQueue(); | cmpProductionQueue.ResetQueue(); | ||||
let txt = +msg.count != 1 ? | let txt = +msg.count != 1 ? | ||||
markForTranslation("Click without holding Shift to train a single unit.") : | markForTranslation("Click without holding Shift to train a single unit.") : | ||||
markForTranslation("Click on the Female Citizen icon."); | markForTranslation("Click on the Female Citizen icon."); | ||||
this.WarningMessage(txt); | this.WarningMessage(txt); | ||||
Show All 22 Lines | Trigger.prototype.tutorialGoals = [ | ||||
{ | { | ||||
"instructions": [ | "instructions": [ | ||||
markForTranslation("We should start preparing to phase up into Town Phase, which will unlock many more units and buildings. Select the Civic Center and hover the cursor over the Town Phase icon to see what is still needed.\n"), | markForTranslation("We should start preparing to phase up into Town Phase, which will unlock many more units and buildings. Select the Civic Center and hover the cursor over the Town Phase icon to see what is still needed.\n"), | ||||
markForTranslation("We now have enough resources, but one structure is missing. Although this is an economic tutorial, it is nonetheless useful to be prepared for defense in case of attack, so let's build Barracks.\n"), | markForTranslation("We now have enough resources, but one structure is missing. Although this is an economic tutorial, it is nonetheless useful to be prepared for defense in case of attack, so let's build Barracks.\n"), | ||||
markForTranslation("Select four of your soldiers and ask them to build a Barracks: as before, start selecting the soldiers, click on the Barracks icon in the production panel and then lay down a foundation not far from your Civic Center where you want to build.") | markForTranslation("Select four of your soldiers and ask them to build a Barracks: as before, start selecting the soldiers, click on the Barracks icon in the production panel and then lay down a foundation not far from your Civic Center where you want to build.") | ||||
], | ], | ||||
"OnPlayerCommand": function(msg) | "OnPlayerCommand": function(msg) | ||||
{ | { | ||||
if (msg.cmd.type == "construct" && msg.cmd.template == "structures/athen_barracks") | if (msg.cmd.type == "construct" && msg.cmd.template == "structures/athen/barracks") | ||||
this.NextGoal(); | this.NextGoal(); | ||||
} | } | ||||
}, | }, | ||||
{ | { | ||||
"instructions": [ | "instructions": [ | ||||
markForTranslation("Let's wait for the Barracks to be built. As this construction is lengthy, you can add two soldiers to build it faster. To do so, select your Civic Center and set up a rally point on the Barracks foundation by right-clicking on it (you should see a hammer icon). Then produce two more builders by clicking on the hoplite icon twice.") | markForTranslation("Let's wait for the Barracks to be built. As this construction is lengthy, you can add two soldiers to build it faster. To do so, select your Civic Center and set up a rally point on the Barracks foundation by right-clicking on it (you should see a hammer icon). Then produce two more builders by clicking on the hoplite icon twice.") | ||||
], | ], | ||||
▲ Show 20 Lines • Show All 74 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator