Difference between revisions of "BuildingScenariosAdvanced"
(add scenario doco nav links) |
m (id isn't a title anymore) |
||
Line 83: | Line 83: | ||
in the French translation file and when Wesnoth is played in French this message will be displayed rather than the | in the French translation file and when Wesnoth is played in French this message will be displayed rather than the | ||
original one. The key | original one. The key | ||
− | + | ''' id ''' should be added to any tag with text that is meant to be translated (remember, the [scenario] tag already has an | |
id, do not add | id, do not add | ||
another one). | another one). |
Revision as of 07:27, 19 July 2006
BuildingScenarios | BuildingScenariosWML | BuildingScenariosSimple | BuildingScenariosIntermediate | BuildingScenariosAdvanced |
BuildingScenariosComments | BuildingScenariosSamples | BuildingScenariosFAQ |
<<<<<<< BuildingScenariosAdvanced
Ok, so as you have seen in BuildingScenariosSimple, you can setup what the human player and AI player start with. From
the [side] tag listed below you can see we are going to learn some more interesting things about AI that can be
controlled from there. I'm not going to explain all the keys, just the new ones.
. . . [side] side=2 enemy=1 canrecruit=1 type=Lich description=Galga #ifdef EASY recruit=Skeleton,Revenant,Blood Bat,Ghost,Bone Shooter recruitment_pattern=fighter,fighter,archer,scout gold=300 #endif #ifdef NORMAL recruit=Skeleton,Revenant,Chocobone,Blood Bat,Wraith,Bone Shooter,Dark Adept recruitment_pattern=fighter,fighter,archer,scout gold=500 #endif #ifdef HARD recruit=Skeleton,Revenant,Chocobone,Wraith,Bone Shooter,Dark Adept recruitment_pattern=fighter,fighter,archer,scout gold=700 #endif aggression=1.0 village_value=0.0 leader_value=50.0 [/side]
As you can see from the above listing, the [side] tag can get a little complex. The #ifdef is relatively simple to explain. If the user is playing EASY then everything between #ifdef EASY and #endif is set and the others are ignored. If the user is playing NORMAL then everything between #ifdef NORMAL and #endif is set and the others are ignored. Finally if the user is playing HARD then everything between #ifdef HARD and #endif is set and the others are ignored. This allows a scenario to be configured differently for each level of gameplay the user may choose. There are also four new keys listed, recruitment_pattern, aggression, village_value and leader_value.
If a scenario is meant to be translated, it must have ids (Editor's Note: For 0.8.3 and later, scenarios no longer need IDs.). IDs are used to represent text in the scenario. A translation maps the ID of each text in the scenario to a translation text.
Example:
[message] message= _ "Where are we? Which way now? I am tired of this darkness!" description=Konrad id=hasty_1 [/message]
This is the first message in the scenario "Hasty Alliance". To translate this message into French, we put the key
hasty_1="Où sommes-nous ? Quel chemin devons-nous emprunter maintenant ? Je suis fatigué de cette obscurité !"
in the French translation file and when Wesnoth is played in French this message will be displayed rather than the original one. The key id should be added to any tag with text that is meant to be translated (remember, the [scenario] tag already has an id, do not add another one).
Now you have enough information to make some interesting looking scenarios with tuned AI players. This is a big step. Next we are going to learn how to make your newly created scenario fit nicely into a campaign. This involves making a descriptive intro shown before the scenario is played. See IntroWML for a description of the intro screen.
See ReferenceWML for a more complete description of what WML can do.