Difference between revisions of "BuildingScenariosAdvanced"

From The Battle for Wesnoth Wiki
(Building scenarios: Advanced)
Line 12: Line 12:
 
= Building scenarios: Advanced =
 
= Building scenarios: Advanced =
  
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. We'll have a look at the new keys one by one.
+
''''TODO:''''
 +
This contained a repetition of what was already inside [[BuildingScenariosIntermediate]]
 +
This should contain:
 +
* (more) information about making & using preprocessors ([[PreprocessorRef]])
 +
* information about GetText and making your scenario translatable
 +
* information on guidelines concerning the general layout of a scenario file
 +
* LOTS of links to pages any campaign editor needs frequently
 +
* ...
  
[scenario]
+
Ayone who feels like writing something, go ahead
.
 
.
 
.
 
  [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]
 
.
 
.
 
.
 
[/scenario]
 
  
As you can see from the above listing, the '''[side]''' tag can get a little complex. The ''#ifdef'' is relatively simple
+
:Mathijs
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'''.
 
 
 
 
 
''''THIS IS OBSOLETE:'''' '''Editor's Note: For 0.8.3 and later, scenarios no longer need IDs'''
 
 
 
If a scenario is meant to be translated, it must have ID's. ID's 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 Also ==
 
== See Also ==
 
* [[ScenarioWML]], [[SyntaxWML]] & [[ReferenceWML]]
 
* [[ScenarioWML]], [[SyntaxWML]] & [[ReferenceWML]]
 
* [[BuildingScenarios]]
 
* [[BuildingScenarios]]

Revision as of 20:44, 27 June 2007

Quick Navigation:

BuildingScenarios

BuildingScenariosSimple - BuildingScenariosIntermediate - BuildingScenariosAdvanced
BuildingScenariosWML
BuildingScenariosComments
BuildingScenariosSamples
BuildingScenariosFAQ




Building scenarios: Advanced

'TODO:' This contained a repetition of what was already inside BuildingScenariosIntermediate This should contain:

  • (more) information about making & using preprocessors (PreprocessorRef)
  • information about GetText and making your scenario translatable
  • information on guidelines concerning the general layout of a scenario file
  • LOTS of links to pages any campaign editor needs frequently
  • ...

Ayone who feels like writing something, go ahead

Mathijs

See Also