My English is bad, but I tried to translate some wiki to Chs

Discussion of all aspects of the website, wiki, and forums, including assistance requests and new ideas for them.

Moderator: Forum Moderators

Post Reply
vanfans
Posts: 4
Joined: March 10th, 2017, 12:25 pm

My English is bad, but I tried to translate some wiki to Chs

Post by vanfans »

ldingScenarios
建立场景

Wesnoth scenarios are the individual levels within the game. They can be as simple or advanced as you choose, ranging from two sides who must fight each other to multiple sides with different characters, custom items, and complicated events. This page is split into several sections, starting with the basics and moving into more complex techniques. When you're done, you should have all the knowledge necessary to create your own scenarios.
韦诺场景包括许多游戏级别。可以选择简单或者复杂,包括必须交战的两只队伍,到自定义复杂的角色、物品、事件。这个页面分为几个部分,从基本知识开始到复杂的技术。阅读这个页面,您应该掌握创建场景的所有知识。

Each scenario is made up of two files: the map file and the configuration file. The former, the map itself, is discussed in BuildingMaps. The latter describes everything about, and what occurs in, a scenario, from the setup of sides, units, music, events, and so on. Both files are plaintext are can be edited in any standard text editor. If you decide to use a wordprocessor, please make sure to Save As text (preferably with a .cfg extension), not as rich text.
每个场景由两个文件组成:地图文件和配置文件。前者是地图本身,在 BuildingMaps 章节中讨论。后者描述了场景的全部,包括单位、音乐、事件等等。两个文件都可以在标准的文本编辑器中进行编辑。如果您使用文字处理程序,情报整文本保存为纯文本格式(最好使用 .cfg 扩展名),不要用富文本。

Remember that you can use the scenarios that ship with the game for reference should you get stuck. They cover a wide range of techniques, so it's likely you'll find an example of what you need.
记得您也可以用游戏附带的场景作为参考。这些场景汗干了所有的技术,您可以在这些场景中找到您需要的示例。

If you still don't understand something or can't get it to work, feel free to ask for assistance in the WML Workshop on the forums.
如果您仍然遇到问题,可以在论坛中的 WML Workshop 板块中提问。

Contents

1 The Wesnoth Markup Language
1 韦诺标记语言
1.1 Quick Tag Index
1.1 快速索引
1.2 Sample Code
1.2 示例代码
2 Scenarios and the Map Editor
2 场景和地图编辑器
3 Building Your Scenario
3 建立您的场景
4 See Also
4 参考

The Wesnoth Markup Language
韦诺标记语言

Scenarios are written in the Wesnoth Markup Language (WML), a custom language written specially to work with the game. It sports a relatively simple tag/key-based syntax, a complete guide to which can be found on the SyntaxWML page.
场景使用韦诺标记语言(WML)编写,WML 专门用于游戏开发。它使用相对简单的 标签/键值 语法,完整的指南可以从 SyntaxWML 页面中找到。

Quick Tag Index
快速索引

Below follows an index of the basic WML tags used to create scenarios.
下面是基本的 WML 标签。

ScenarioWML: The top level tags [scenario], [multiplayer], [test], and [tutorial]
ScenarioWML:顶级标签[scenario]、[multiplayer]、[test]、[tutorial]
IntroWML: Setting up the intro screen
IntroWML:设置简介屏幕
TimeWML: Setting up the time schedule
TimeWML:设置时间表
SideWML: Describing a side
SideWML:描述 side
SingleUnitWML: The syntax of a single unit
SingleUnitWML:单个单元的语法
ShroudDataWML
EventWML: An event that happens in the scenario
EventWML:一个场景中的事件
FilterWML: All about filters
FilterWML:过滤器
DirectActionsWML, InterfaceActionsWML, InternalActionsWML
DirectActionsWML、InterfaceActionsWML、InternalActionsWML
MapGeneratorWML: The random map generator
MapCeneratorWML:随机地图生成器
Macro Reference: A set of useful macro shortcuts you can use
Macro Reference:一个您可以用到的宏的快捷方式

Sample Code
示例代码

A nice collection of simple beginner code to look at is documented on the Samples page, showcasing the basic usage and structure of WML in an actual coding sense.
面对初学者的代码可以在 Samples 页面中找到,这些示例展示了WML的基本用法和结构。

As of Wesnoth 1.12, the Map Editor has become more fully featured, and includes options to define more basic scenario-related content for your scenario, such as name, unit placement, graphical items, time of day schedules, etc, without having to manually write the code yourself. However, the editor cannot create more complex WML. Those interesting snippets still have to be written by hand. These functions are most useful for creating a simple scenario from a map, or streamlining your workflow in creating a more complicated scenario.
从韦诺 1.12 开始,地图编辑器变得更加全面,可以定义更多的场景选项,比如名称、单元放置、显示项目、时间表等等,免去了手动编辑代码。但是,编辑器无法创建更复杂的 WML。有些片段仍然需要手动编写。这些功能可以用于创建复杂场景时的简化工作流程。

In order to edit scenario metadata, select File → New Scenario. By default, the editor opens with a blank map file open only.
如果要编辑场景数据,选择文件 → 新场景。默认情况下,编辑器会打开一个空白地图。

NOTE: Scenario-specific content will not be saved unless you also select the File → Save Scenario option before exit. Otherwise, you will simply get a map file.
请注意:请在退出之前保存场景。否则只会保存地图文件。

Building Your Scenario
建立您的场景

• Simple • Intermediate • Advanced

Creating a scenario is no simple task. Generally, you should have a premise mapped out for the scenario before you begin. Who will your protagonists face? What events will occur? How long will it be? You might decide to revise your plans as you code and test them. It will generally take many iterations of writing, coding, and playtesting until your scenario reaches a product you are satisfied with.
建立场景并不简单。通常,您需要在开始之前 premise mapped。主人公要对抗谁?会发生什么事件?多长时间?您可以在编写和测试的时候修改计划。在您编写、测试的过程中,您可能需要修改多次计划。

A discussion on tweaking and balancing your scenario to make it more fun is found on the Balancing page. ESR has more handy tips in his Campaign Design How-To article, and as mentioned before, don't hesitate to ask for help in the WML Workshop.
关于调整场景,使之更有趣的讨论,请参见平衡页面。ESR 在他的文章 Campaign Design How-To 页面上有更多的介绍,您可以在 WML Workshop 上提问。

A handy breakdown of the code of a scenario, line-by-line, is available on the three pages linked here. Each explores gradually more complex WML concepts.
这个链接上的三个页面逐行解释了代码。探索更复杂的 WML 概念。

See Also
参考

ReferenceWML - WML master reference

注意!译文质量不佳。
vanfans
Posts: 4
Joined: March 10th, 2017, 12:25 pm

Re: My English is bad, but I tried to translate some wiki to

Post by vanfans »

ScenarioWML

Contents

1 the toplevel tags [multiplayer], [test], [tutorial], [scenario]
2 The [scenario] tag
3 Scenario End Conditions
4 See Also

the toplevel tags [multiplayer], [test], [tutorial], [scenario]
toplevel 标签[multiplayer]、[test]、[tutorial]、[scenario]

The top level tags [multiplayer], [test], [tutorial] and [scenario] are all formatted the same way. The difference between these tags is the way that the scenarios they describe are accessed.
顶级标签 multiplayer、test、tutorial、scenario 都有相同的格式。这些标签的区别在于被场景访问的方式。

The keys id and next_scenario affect how scenarios can be accessed. Whenever a scenario is won, the scenario with id=next_scenario of the same tag type will be played. Units from the first scenario will be available for recall in the second.
键值 id 和 next_scenario 影响如何访问场景。当胜利之后,会进入 id=next_scenario 且标签相同的场景。第一个场景中的单位会在第二个场景中被召唤出来。

Some scenarios can be played without playing other scenarios first (in this case there is nothing on the recall list). These scenarios are called initial scenarios.
一些场景可以在不进入第一个场景的情况下进入(此时在召唤列表上没有内容)。这些场景称为初始场景。

A list of initial scenarios, and how to access them:
初始场景列表和访问方法:

All [multiplayer] scenarios (without allow_new_game=no) are initial scenarios listed in the multiplayer scenario selector screen (accessed by the "multiplayer" button).
所有的 [multiplayer] 场景(没有 allow_new_game=no)是初始场景,可以通过多人游戏中的场景选择进入。

任意 [test] scenario is an initial scenario. A test scenario can be accessed by running the game in test mode. (note: this is NOT the same as debug mode. It can be accessed using -t or --test followed by an optional scenario ID which defaults to 'test'.)
Any [test] 场景是一个初始场景。测试场景可以使用测试模式运行(注意:这和调试模式不同。可以使用参数 -t 或者 --test 和场景 ID 进入,默认为‘test’。)

The [tutorial] scenario with the attribute id=tutorial is an initial scenario. The tutorial is accessed by clicking on the "tutorial" button.
[tutorial] 场景是属性 id=tutorial 的初始场景。教程可以通过点击 “教程” 按钮来访问。

Any [scenario] scenario with an id listed in the value of first_scenario in a campaign tag (see CampaignWML) is an initial scenario accessed by selecting that campaign after clicking on the "campaign" button.

The [scenario] tag

The following keys and tags are recognized in [scenario] tags:
[scenario] 标签可以识别以下键值和标签:

id: A unique identifier for this scenario. All scenarios must have an id. Can't clash with id used in [multiplayer] tags.
id:场景的唯一标识符。所有场景都必须有 id。不能和 [multiplayer] 的标签中的 id 产生冲突。

next_scenario: The id of the scenario to load when the current one is won. This can be changed dynamically, to build non-linear campaigns.
next_scenario:当当前场景获胜后,载入的下一个场景。可以动态修改,建立非线性流程。

description: (translatable) only for multiplayer maps. Will show up as a tooltip when mousing over the minimap in the multiplayer setup screen.
description:(可翻译)只用于多人地图。当鼠标划过小地图时,会显示工具提示。

name: (translatable) is shown in several places in the level, including the intro screen. It is also the default name for saves on the level.
name:(可翻译)在许多地方显示出来,包括介绍界面。也是游戏存档的默认名称。

map_data: inputs valid Wesnoth map data. See BuildingMaps for a description of the Wesnoth map syntax.
map_data:输入有效的韦诺地图数据。详见 BuildingMaps 中对语法的描述。

turns: sets an event on turn turns causing the player to lose. Use -1 to have no turn limit (default). See also EventWML
turns:设置让玩家输掉的事件。使用 -1 表示没有限制(默认)。详见 EventWML

turn_at: the turn to start on (default=1)
turn_at:开始(默认=1)

Note that none of the regular start-of-turn behavior, including poison damage, healing, income and refreshing unit movement and status, will occur before the start of turn 2. All start-of-turn WML events will still be fired, however.
注意,在回合开始之前,不会发生回合行为,包括重度伤害、治疗、收入、刷新单元,但是回合开始的 WML 事件会被触发。

random_start_time: controls random starting time of day. Possible values are yes and no or list of possible start times; starting from 1 to number of times. for example random_start_time=2,3,5,6 (default depends on version and mp/sp, better include this key)
random_start_time:控制一天的开始时间。可以设置为 yes 和 no,或者可能开始的时间的列表;从1开始。例如 random_start_time=2,3,5,6(默认取决于版本和 mp/sp,最好包括这个键值)

music: the music file relative to ./music/ to play during the scenario
music:音乐文件位置为和场景相对的 ./music/

[music]: specifies the music tracks to play during this scenario, see MusicListWML.
[music]:制定要播放的音乐文件,详见 MusicListWML。

defeat_music: specifies a comma-separated list of music tracks which may be chosen to play on defeat. If not provided, the default in GameConfigWML is used instead. May be overridden by endlevel clauses.
defeat_music:指定用逗号分割的曲目列表,在失败时播放。如果不指定,则默认使用 CameConfigWML 代替。可以被 endlevel 覆盖。

victory_music: specifies a comma-separated list of music tracks which may be chosen to play on victory. If not provided, the default in GameConfigWML is used instead. May be overridden by endlevel clauses.
victory_music:指定用逗号分隔的音乐列表,在胜利时播放。如果不指定,则默认使用 CameConfigWML 代替。可以被 endlevel 覆盖。

theme: the name of the UI theme that should be used when playing this scenario.
theme:当进入这个场景后的 UI 主题的名称。

victory_when_enemies_defeated: when this is set to yes (default), the player wins once all non-allied units with canrecruit=yes (aka leaders) are killed. (Currently this only controls the win condition for when all enemies are defeated; it does not prevent the player from losing if he has no leader.) See Also SideWML. When this value is true the following keys can be used:
victory_when_enemies_defeated:当设置为 yes(默认),一旦所有非盟军单位、首领被击杀,则玩家胜利。(就是所有敌人被击败的胜利条件,如果没有首领,则不能判断玩家胜负。)详见 SideWML。当这个值为 true 时,可以使用如下键值:

carryover_percentage: by default 80% of the gold is carried over to the next scenario, with this key the amount can be changed.
carryover_percentage:默认为 80%,表示转到下一个场景的资金。

carryover_add: if true the gold will be added to the starting gold the next scenario, if false the next scenario will start with the amount of the current scenario (after taxes) or the minimum in the next scenario. Default is false.
carryover_add:如果为 true,则添加到下一个场景的起始资金上,如果为 false,下一个场景将继承当前场景的金额(税后)。默认为 false。

remove_from_carryover_on_defeat: when this is set to yes (default), for sides who got defeated (according to the side.defeat_condition), carryover will be removed.
remove_from_carryover_on_defeat:如果为 yes(默认),失败的一方会丢失资金。

disallow_recall: when this is set to 'no'(default), the player is allowed to recall units from previous scenarios.
disallow_recall:当设置为‘no’(默认),玩家允许从之前的场景中调用单位。

experience_modifier: the percentage that required XP to level up (for all units in the scenario) is multiplied by. Default 100. Note that when used in a campaign, weird things (like units being above the required XP to level up) can happen if this value is different for different scenarios.
experience_modifier:升级所需的 XP 增加的百分比(对于场景中的所有单位)。默认为 100。注意,在游戏流程中,如果不同场景使用不同比例,会产生奇怪的问题(比如单位的 xp 高于可以升级的级别)。

[story]: describes the intro screen. See IntroWML
[story]:描述介绍界面。详见 IntroWML

[label]: sets a label
[label]:设置标签
x, y: location to set label
x, y:标签位置
text: the label
text:标签文本

[item]: places an item on map. See InterfaceActionsWML.
[item]:在地图上放置一个项目。详见 InterfaceActionsWML。

[time]: how a day should progress. See TimeWML
[time]:一天如何度过。详见 TimeWML

current_time: The time of day slot number (starting from zero) active at scenario start.
current_time:在场景开始时的时间(从零开始)。

[time_area]: how a day should progress in a given area. Everywhere not specified in a [time_area] tag is affected by the [time] tags in the [scenario] tag
[time_area]:一天应该如何经过。在 [time_area] 标签中指定的会受到 [time] 标签的影响

takes x and y coordinates.
x 和 y 坐标。

[time]: how a day should progress in those locations. See TimeWML
[time]:一天如何度过。详见 TimeWML

current_time: The time slot number (starting with zero) active at the creation of the area.
在时间区域的时间(从零开始)。

time areas can be used in events, assigned identifiers, and removed at discretion. They also accept complete Standard Location Filters. See DirectActionsWML.
时间区域可以用于事件、分配标识符、可以删除。Standard Location Filters 请参见 DirectActionsWML。

[side]: describes one player. See SideWML
[side]:描述玩家。详见 SideWML

[event]: describes an event that may be triggered at a certain point of the scenario. See EventWML
[event]:描述在场景中的某一点触发的事件。详见 EventWML

map_generation: another way to generate a map. The map will be generated randomly
map_generation:另一个生成地图的方式。随机地图
default: the default random map generator
default:默认随机地图生成

[generator] if this is present, the map and scenario will be generated randomly. See MapGeneratorWML
[generator] 如果存在,则自动生成地图和场景。详见 MapGeneratorWML

The following keys and subtags are additionally recognized in [multiplayer] scenarios:
下面的键值和标签在 [multiplayer] 场景中识别:

force_lock_settings: provides a default value for SideWML lock attributes and forces the "Use map settings" to be checked and disabled. This is useful if author wants to limit game customization in order to keep the scenario/campaign balanced. Individual options can still be enabled if this key is set to yes. E.g. color selection can be enabled by explicitly setting color_lock=yes in SideWML.
force_lock_settings:为 SideWML 属性提供默认值,并且强制选中和禁用 “用户地图设置”。这可以用于保持游戏的平衡。如果设置为 yes,则可以启用选项。例如可以在 SideWML 中通过 color_lock=yes 进行设置。

new_game_title: if provided will be used instead of name for campaign entry points.
new_game_title:如果指定,则代替战役的名称。

allow_new_game: (default=yes) allow/prevent the scenario to be listed in the game configuration screen. This is intended for multiplayer campaigns with multiple entry points.
allow_new_game:(default=yes)允许/阻止在设置界面中列出场景。用于具有多个入口的多人战役。

allow_era: a list of era ids. Only the eras with matching ids will be allowed to be played with this scenario.
allow_era:时代 id 列表。只有 时代 id 匹配的玩家可以进入场景。

disallow_era: a list of era ids. Only the eras with matching ids will not be allowed to be played with this scenario. Cannot be used in parallel with allow_era.
disallow_era:时代 id 列表。时代 id 匹配的玩家不能进入场景。

ignore_incompatible_era: a list of era ids. The eras with matching ids will be considered compatible with this scenario regardless their dependencies.
ignore_incompatible_era:时代 id 列表。时代 id 匹配的玩家可以忽略依赖性。

allow_modification: same as allow_era, but for modifications.
allow_modification:和 allow_era 相同,但是可以修改。

disallow_modification: same as disallow_era, but for modifications. Cannot be used in parallel with allow_modification.
disallow_modification:和 disallow_era 相同,但是可以修改。不能和 allow_modification 同时使用。

ignore_incompatible_modification: same as ignore_incompatible_era, but for modifications.
ignore_incompatible_modification:和 ignore_incompatible_era 相同,但是可以修改。

force_modification: a list of modification ids. The specified modifications must be enabled to play this scenario.
force_modification:id 修改列表。必须启用才能进入这个场景。

[options]: custom options. See OptionWML for details.
[options]:自定义选项。详见 OptionWML。

require_scenario: (Version 1.13.0 and later only) In a multiplayer scenario, this indicates that the scenario file is not enough (you have custom assets like terrain or additional unit art) and other player must download the full add-on not just the scenario WML to join a game. This will also mean that the addon_min_version attribute will control the minimum version number of your add-on which is compatible with this version.
require_scenario:(用于1.13.0或更高版本)在多人游戏中,表示场景文件不足(如果您有自定义的单位),其他玩家必须下载完整的附加项目。addon_min_version 属性控制与这个场景兼容的附加项目最低版本。

Scenario End Conditions
场景结束条件

In this section we will give a more precise explanation of things that can cause a scenario to end.
这段会给出场景结束的准确解释。

At the end of every turn, the turn number will be compared with the turn limit.
每回合结束时,会将回合数和回合限制进行比较。

If we pass the limit, the time over event will fire. If turns are not added by WML in response to this event, then the scenario will immediately end in defeat. EventWML#The_.27name.27_Key_.28Mandatory.29
如果超过回合数限制,则会触发超时事件。如果 WML 不响应这个事件,则场景失败。

At the beginning of any turn, and at the end of any user or ai action, the victory conditions will be checked. This will result either in the scenario ending or continuing. The procedure for this is as follows:
在回合开始时和回合结束时检查获胜条件。然后决定场景结束或者继续。程序如下:

Every side will have its defeat_condition evaluated based on the units it currently has on the board. SideWML
每一方根据 defeat_condition 来评估单位数量。SideWML

At this time, villages of defeated sides will be unflagged, and if remove_from_carryover_on_defeat = yes then their carryover will be cleared as well.
被击败的一方会取消村庄标志,如果 remove_from_carryover_on_defeat = yes,则遗留物会被清除。

If any two not-defeated sides are enemies, the scenario will continue.
如果两方都没有被击败,则继续游戏。

At this time, the enemies defeated event will fire.
此时会触发敌人失败的事件。

Furthermore, if victory_when_enemies_defated=no and there exists a human controlled side, then the scenario will continue.
此外,如果 victory_when_enemies_defated=no 并且有玩家控制的一方,场景继续。

The human controlled side may be local or remote, for networked mp play.
玩家控制的一方可以是本地或者远程,对于多人游戏。

If neither of these conditions is met then the scenario will end.
如果上面的条件都不满足,则游戏结束。

In victory of defeat according to whether a local human-controlled side is not defeated.
根据玩家控制的一方是否被击败,决定是否胜利。

注意!译文质量不佳。
User avatar
pauxlo
Posts: 1047
Joined: September 19th, 2006, 8:54 pm

Re: My English is bad, but I tried to translate some wiki to

Post by pauxlo »

I'm not sure whether posting it here in the forum is a good idea ... I doubt anyone will read it here.

Maybe create a subpage on the wiki with the translation? (Though I'm not sure if this is wanted, if no moderator can check whether it is spam.) Otherwise, just set up your own web page with the translation?
vanfans
Posts: 4
Joined: March 10th, 2017, 12:25 pm

Re: My English is bad, but I tried to translate some wiki to

Post by vanfans »

pauxlo wrote:I'm not sure whether posting it here in the forum is a good idea ... I doubt anyone will read it here.

Maybe create a subpage on the wiki with the translation? (Though I'm not sure if this is wanted, if no moderator can check whether it is spam.) Otherwise, just set up your own web page with the translation?
But I have no experience with wiki.
gfgtdf
Developer
Posts: 1432
Joined: February 10th, 2013, 2:25 pm

Re: My English is bad, but I tried to translate some wiki to

Post by gfgtdf »

i'd say just make a subpage on the wesnoth wiki. Its not that hard, if you don't have a wiki account yet see this page viewtopic.php?f=17&t=43815 for instructions on how to get one.
Scenario with Robots SP scenario (1.11/1.12), allows you to build your units with components, PYR No preperation turn 1.12 mp-mod that allows you to select your units immideately after the game begins.
User avatar
Zap-Zarap
Posts: 159
Joined: March 16th, 2015, 2:18 pm

Re: My English is bad, but I tried to translate some wiki to

Post by Zap-Zarap »

Hello.
Under "support" in the top row menu, there is a link to a chinese forum. Maybe that's the right place, where people will want to like to read this?

http://www.wesnoth.cn/
I like beavers.
vanfans
Posts: 4
Joined: March 10th, 2017, 12:25 pm

Re: My English is bad, but I tried to translate some wiki to

Post by vanfans »

gfgtdf wrote:i'd say just make a subpage on the wesnoth wiki. Its not that hard, if you don't have a wiki account yet see this page viewtopic.php?f=17&t=43815 for instructions on how to get one.
Thank you! I'll try it.
Zap-Zarap wrote:Hello.
Under "support" in the top row menu, there is a link to a chinese forum. Maybe that's the right place, where people will want to like to read this?
It’s closed the registration.
Post Reply