Difference between revisions of "(sk) Jazyk WML"

From The Battle for Wesnoth Wiki
(minor updates)
m (Reverted edits by BettyMorgan (Talk) to last revision by Alem)
 
Line 70: Line 70:
  
 
[[Category:Translations]]
 
[[Category:Translations]]
 
== Authors Nominate Top Books of All Time ==
 
 
In 2002, the Norwegian Book Clubs gathered 100 authors from 54 countries and asked each one to list the 10 best works of fiction of all time. The authors responded and this list was created. The titles are arranged alphabetically by author name, so no one book stands above any other. The following list is the groups selection of the worlds 100 best books.How many have you read?
 
 
[[http://goodvillenews.com/Authors-Nominate-Top-Books-of-All-Time-kRj65H.html Authors Nominate Top Books of All Time]]
 
 
[[http://goodvillenews.com/wk.html GoodvilleNews.com - good, positive news, inspirational stories, articles]]
 
 
== Seeking Silence & Stillness in the Rush of Business Life ==
 
 
Pico Iyer -- essayist, author, travel writer and thinker -- has a unique perspective on many things. His physical domain ranges from California (where he lived as a child) and England (where he studied) to Cuba, North Korea and Ethiopia (which he visited) and Japan (where he resides). His mental domain knows no limiting boundaries. In this interview with Wharton associate dean and chief information officer Deirdre Woods and Knowledge@Wharton
 
 
[[http://goodvillenews.com/Seeking-Silence-Stillness-in-the-Rush-of-Business-Life-LCK85X.html Seeking Silence & Stillness in the Rush of Business Life]]
 
 
[[http://goodvillenews.com/wk.html GoodvilleNews.com - good, positive news, inspirational stories, articles]]
 
 
== Disney Brings "Cars" To Life With Cars Land ==
 
 
After five years in the making, Disney California Adventure is finally ready to rev up the engines on Cars Land. Disneys latest creation, based on the hit Pixar movie, brings the popular characters to life at Disney California Adventure.
 
 
[[http://goodvillenews.com/Disney-Brings-Cars-To-Life-With-Cars-Land-YfdwZj.html Disney Brings "Cars" To Life With Cars Land]]
 
 
[[http://goodvillenews.com/wk.html GoodvilleNews.com - good, positive news, inspirational stories, articles]]
 
 
== A Savior At the Grocery Store ==
 
 
Numbly, I left my husband, Marty, at the hospital where I had been visiting two of my children and headed for the grocery store. Since it was eleven p.m., I drove to the only store I knew was open twenty-four hours a day. I turned my car motor off and rested my head against the seat.
 
 
[[http://goodvillenews.com/A-Savior-At-the-Grocery-Store-XTmcwi.html A Savior At the Grocery Store]]
 
 
[[http://goodvillenews.com/wk.html GoodvilleNews.com - good, positive news, inspirational stories, articles]]
 
 
== Starting A Slow Story Movement ==
 
 
"It is said that we become the stories that we tell among ourselves. This might have been true before we became salespersons. For a few decades now, I think we have become numb to the stories that we tell among ourselves. So stories have become shorter and crisper to the length of a tweet. We are so committed to telling a story to the point that finally what remains is a dimensionless point.
 
 
[[http://goodvillenews.com/Starting-A-Slow-Story-Movement-V4LmVD.html Starting A Slow Story Movement]]
 
 
[[http://goodvillenews.com/wk.html GoodvilleNews.com - good, positive news, inspirational stories, articles]]
 

Latest revision as of 19:58, 6 August 2012

(Návod - Tvorba - Jazyk WML)


Jazyk WML (Wesnoth Markup Language) je špeciálny jazyk na programovanie súčastí hry Bitka o Wesnoth. Program v jazyku WML sa skladá zo značiek a vlastností.


Vlastnosti

Vlastnosť má dve časti; kľúč a hodnotu. Kľúč určuje, čo táto vlastnosť popisuje, hodnota označuje poradie, množstvo, názov, alebo niečo také.

gold=100

Takáto vlastnosť (umiestnená na správnom mieste) označuje, že daná strana má na začiatku scenára k dispozícii 100 zlatiek.

V danom prípade je kľúčom slovo "gold" a hodnotou číslo "100". Ako kľúče možno používať iba slová uvedené v návode. Znamienko "=" musí nasledovať hneď za kľúčom, bez medzery. Všetko, čo nasleduje po znamienku "=", je hodnota.

Číselné aj textové hodnoty možno písať priamo; textové hodnoty možno okrem toho uzavrieť do úvodzoviek. Textová hodnota v úvodzovkách môže byť aj viacriadková. Ak pred textovou hodnotou v úvodzovkách použijeme znamienko "_", znamená to, že táto hodnota sa v rôznych jazykoch prekladá (uvedená hodnota zodpovedá americkej angličtine). Znamienko "+" možno použiť na spojenie dvoch textových hodnôt.

type=Fighter
description=Konrad
user_description= _ "Konrad"

Táto skupina vlastností označuje, že daná jednotka je typu "Fighter" (Bojovník), v rámci programu ju budeme označovať slovom "Konrad", a jej názov v americkej angličtine je "Konrad" (ale napríklad v slovenčine je preložený ako "Konrád" s dĺžňom).

Na jednom riadku možno zadať aj viacero vlastností, napríklad takto:

x,y=10,20

Znamená to to isté ako:

x=10
y=20


Značky

Značka je skupina súvisiacich informácií.

[unit]
  type=Elder Mage
  description=Delfador
  user_description= _ "Delfador"
[/unit]

Táto značka popisuje jednotku; na začiatku aj na konci značky je rovnaký text, ale pred koncom je lomka.

Ak sa na začiatku značky použije znamienko "+", pripoja sa uvedené vlastnosti k poslednej značke rovnakého mena. (Ak sa niektoré vlastnosti zhodujú, potom nové vlastnosti prepisujú staré.)

[+unit]
  x,y=10,20
[/unit]

Predchádzajúce dva príklady napísané po sebe urobia to isté, ako keby bolo napísané:

[unit]
  type=Elder Mage
  description=Delfador
  user_description= _ "Delfador"
  x,y=10,20
[/unit]
This page was last edited on 6 August 2012, at 19:58.