Wesnoth Evolution: 0.3

It’s time to continue with our journey into the past to unveil the mysteries of the Battle for Wesnoth Project and its history. This time, we’ll take a look at the third major version of Wesnoth ever released, which succeeds versions 0.1, 0.2 and 0.2.1.

I have not been able to find a package for Wesnoth 0.2.1, but it also happens to be the first version to have changelog entries which can be found even nowadays in SVN trunk:

Version 0.2.1:
* many redraw bugs fixed
* new scenarios added
* many new graphics added that were contributed by Paco
* infinite recall bug fixed
* recalling now costs 20 gold pieces. Gold from previous scenarios carries over,
and there is a bonus for finishing a scenario early
* better transitions between tiles added (graphics for this not complete though)

Nonetheless, Wesnoth 0.3 — packaged on July 29th 2003 and including a lot of hidden files created by vi/vim and other applications — includes more changes than the changelog entries in SVN would lead us to believe.

This is apparently the first version where it’s possible to disable fullscreen mode without hacking the source — which is what I did with 0.1 and 0.2. As many other trivial user interface elements, this one is hastily implemented in the form of any (yep, any) command line argument that you can think of. So for example, wesnoth FooBar is enough to start in windowed mode. I’ll go back to the source code later.

In any case, Wesnoth still runs only on a 1024x768 video surface, which is a pain to use with my 1280x800 laptop display.

Titlescreen

Now we have a titlescreen! Great — and apparently we can load and save games at the end of a scenario too.

Story 1

And there are actual (automatically-advancing) story screens now, including an unfinished preliminary map of Wesnoth that’s not really related to our current Great Continent in any way. You may notice that the story text in this opportunity is not the same as in versions 0.1 and 0.2 — and this is where the creative divergence between David White and Francisco Muñoz, mentioned in my interview with Dave, starts to become a little more evident. But more of that later, let’s play the game first!

Gameplay 1

Once again we find ourselves before a wreck of ugly map tiles, but at least now the game starts at 1:1 scale instead of being excessively zoomed in like in previous versions. The first scenario of the Campaign mode is called “The Elves Besieged”. Sounds familiar?

We start the scenario with two units: the Good Ol’ Mary Sue Delfador, and Commander Whimpy Konrad. The set-up is very similar to what you’ll find in current stable and development versions, and our protagonists are humans rather than elves this time around. Same bad guys, same basic map structure, same (unnamed) location. What you won’t find here is allies, since Chantal and Galdrad were probably on their honeymoon or something. Those bastards.

Gameplay 2
Konrad and Delfador about to face certain death, but not at the claws of the goblin rider.

Haha! We will rip the filthy Elves to pieces!

Sure you don’t mean “RIP AND TEAR”? … This quote is from Knafa-Tan, a.k.a. the Green orcs leader. There are many lines here that have survived almost unchanged since 2003 until these days. So far we can say that Wesnoth 0.3 finally gives life to Heir to the Throne and its characters, despite some major changes that will occur in later versions in the road before 1.0.

Trying to play this thing, I start to realize that a certain changelog entry does not seem to apply to my Win32 (Wine) build of 0.3 — despite it says “speed improved”, in reality 0.3 feels much slower than 0.2 and 0.1 when moving units or scrolling the map. This makes it a royal pain in the butt to play the game, but fear not, for I have the solution! Disabling move animations in the source code. Yeah, I know. Since Dave’s preferred platform was and continues to be GNU/Linux, I bet if I could get the sources to compile with modern GCC versions this thing would work much faster than in Wine.

If you do play 0.3 you’ll soon start to miss the pointy eared couple that usually helps you around in this scenario. As with the review of Wesnoth 0.1, the AI is challenging enough to surpass my expectations at any moment — my first attempt at playing 0.3 ended up with every single one of my units getting killed by those vicious orcish mercenaries.

One would wonder at this point whether Dave got a bit too much obsessed with the part about making an AI-playable game and forgot about the human player in front of the screen 😉.

Gameplay 2

At the left we have a gratuitous Lord of the Rings reference for kicks. It’s actually one of several cheesy messages in this scenario that have mostly evolved over time — they may have been added to show off the power of WML events as 0.3 introduces new goodies in that department. Contrary to the trope though, Delfador’s effort was vain and Konrad got killed first. I’m such a bad player.

User interface 1

It is probably not fully evident in the screenshots, but Wesnoth 0.3 already has semi-transparent dialog boxes like those seen in 1.0 and later. A neat yet primitive units description system (available in the context menu for occupied hexes) already exists as well, and you can read Konrad’s beautifully crafted, manually line-wrapped description in the game.

The sidebar also received its own share of changes in 0.3. You can grab the following screenshots and compare them side by side if you wish:

The main notable changes are:

  • There’s now an indication of the unit’s poisoned status, which is fitting since in this version the Orcish Assassin and Slayer are introduced. Accordingly, units will normally show up as “healthy” — if they are poisoned, “poisoned” takes over that space in the sidebar.
  • The minimap now has some decoration similar to the ToD display, with little icons indicating the North and South of the map.
  • It’s also possible (at last!) to scroll around by dragging the viewport rectangle on the minimap.
  • A little text label displays the coordinates of the hex under the mouse pointer, right below the tile type information.
Screenshot

Of course, we can’t forget that there’s a brand new titlescreen! There’s also the much-beloved story map screen, back then implemented under the name of “bigmap”, which is pictured to the left.

Let’s face it: there was barely anything in 0.1 and 0.2 that could be described as a storyline. Of course Dave later fixed that, bringing us Wesnoth 0.3. So, what’s the plot now?

New players might not be familiarized with the integration of campaigns into mainline in Wesnoth. There is only one campaign that could be called a “core campaign”, and that is Heir to the Throne, which didn’t have a name at the beginning. All the other campaigns came afterwards, with most of them being added to the game after being developed and played for a long time as user-made add-ons, save for a few exceptions which were developed in mainline. The latter strategy didn’t work for everyone anyway, and that’s why The Dark Hordes and Son of the Black Eye were dropped from mainline in 1.1.x — SotBE was reintegrated thanks to Taurus’ efforts with finishing it as incomplete as it was as a 1.1.x/1.2.x add-on.

Back to the topic, though, there are really not too many significant differences between HttT in 0.3 and its current incarnations post-1.0.

  • The storytext in 0.3 refers to the “Northern peoples” rather than “Orcs of the North”, suggesting the intention to have human opposition to the kingdom of Wesnoth — in fact, later in the text we can find a mention of the “Northern king”. In current mainline, only Wesnoth and the city-state of Elensefar are ever mentioned after Haldric’s arrival to the Great Continent. Of course, there’s also the random northern human villages that latter became part of the Northern Alliance’s (Northern Rebirth) territories. Additionally, Westin (The South Guard) appears to be located in a relatively isolated province that doesn’t have much regular communication with Wesnoth.
  • In 0.3 there’s also mention of Garard’s unnamed brother being slain along with Garard & co. by Eldred. Also, Asheviere is referred to as the “Queen Mother of Wesnoth” in the passages narrating her takeover. While this remained as far as Wesnoth 0.9.6 (the first version I ever played), it seems to have been replaced much later by the simpler “Queen of Wesnoth” title.
  • As previously mentioned, Galdrad or Chantal don’t make any appearance yet, so their dialogue bits are missing along with any help you might need playing this first scenario. It’s likely that their later addition was warranted by gameplay rather than plot.
  • You can recruit Elvish Archers, Fighters, Human Magi and Horsemen in this scenario from the very beginning, unlike in later versions where you start with elves only.
  • Since Wesnoth 1.3.7, this scenario is known as the Isle of Alduin. Additionally, it was relocated and became the third scenario in a later 0.x version.
  • The map used here is map1, from 0.1 and 0.2.
  • The isle is implied to be inhabited by elves, not magi. An Elvish Fighter called Glordorf greets you at the end of the scenario instead of the Arch Mage Seimus seen in modern versions.
  • The Trident of Storms, and the comic relief sequence with the “Sea Orc” don’t exist yet.
  • There’s no option to travel by sea at the end of this scenario. Isle of the Damned didn’t come to exist until Wesnoth 0.6, which is also the first version to support multiple campaigns.
  • It is clear that this scenario was written by Francisco Muñoz as the random fragments of bad English show. According to Dave, fmunoz came up with the idea of adding undead in the first place. Nonetheless, as Moremirmu (who’d eventually be sent to the Isle of the Damned instead) kindly reminds us:

    I was hiding in this holy place planning how to defeat the evil undeads, now I with your help, we can destroy them.

  • Not only Moremirmu appears in this scenario — the three temples and their WML events from the Isle of the Damned in current versions belong to Muffin Muff’s Peninsula in this opportunity.
  • The necromancer enemy leader in this version is a level 2 unit. In fact, this was the case until as late as version 1.1.2, in which the L3 Dark Sorcerer and L2 Necromancer unit type names were swapped. Whether that makes sense or not might be a matter of debate akin to holy vs. arcane.
  • The map is very differently arranged in comparison to the current incarnations.
  • Thief
    While the allied thieves do appear in this version, their event is much simpler, and they immediately join your army on the turn they appear instead of waiting for a signal or helping you infiltrate the city. They also look like [hideous mutated elves with blue hair](https://tvtropes.org/pmwiki/pmwiki.php/Main/YouGottaHaveBlueHair) (see picture).
  • Delfador presents us with a somewhat different exposition on the Sceptre of Fire than what is currently canon:

    [...] During the reign of Garard I, your uncle’s father, the dwarves of Knalga agreed to make the king a magnificent scepter. It took their finest smiths years to make it. But soon after it was completed, Orcs invaded the tunnels of Knalga. Now Knalga is in chaos, and though some Dwarves still live in parts of it, always at war with the Orcs, the sceptre was lost somewhere in the great caverns. [...] Garard II, your uncle, was deciding upon a successor. He issued an edict that whichever member of the royal family could retrieve the Sceptre of Fire would rule the land. [...]

  • At the bigmap screen, this title may sound like relief, however...IT’S A TRAP. This is where the Princess of Wesnoth, Li’sar (named after Dave’s girlfriend, now wife), makes her first appearance.
  • This is the last playable scenario in this version and it’s supposed to tie in with the good old (and appropriately named, may I say) Valley of Death. The plot is perhaps a bit too different from 1.0 and later, but the map isn’t. Nonetheless, if this is the second most difficult scenario in HttT nowadays, I can’t imagine how much of a sadistic hell it was in 0.3. No, I haven’t played up to this point in case you couldn’t tell. 😛 That is left as an exercise for the reader.

I mentioned during my interview with Dave that Wesnoth 0.3 included an extra plot mentioning the name of Asheviere for the first time. Notably, I mistook Wesnoth 0.3’s campaign for having no relation whatsoever with HttT back then. This was a major mistake.

In the sixth year of the reign of Garard II, king of Wesnoth, the kingdom was unwillingly plunged into war with the Eastern peoples. Thousands were slain in the fighting. Garard II tried desperately to forge a treaty of peace with the Beldian empire, and succeeded only with numerous concessions.

Wanting to maintain the highly-priced peace, Garard II proceeded to encourage trade with Beldia. Furs, cedar, and gold were sold to Beldia, and gems, iron, and rare birds were purchased in exchanged. The emperor of Beldia decided to expand his empire to the east instead of to the west, happily trading with the people of Wesnoth.

Garard II was adored by his people, but his Queen, Adele, remained barren, unable to give him a son to succeed him. With his nobles pressuring him for an heir to succeed him, Garard began searching for a second queen. His foreign advisor proposed a plan: he could seal peace, prosperity, and unity with the land of Beldia forever through a union with a certain eligible noblewoman of Beldia, Lady Asheviere.

Asheviere's stunning beauty concealed her vast ambition well. Upon their first meeting, Garard became determined to have her as his queen. The union was sealed in Garard's fourteenth year as king.

Asheviere bore Garard a son, Jeroth, and then two daughters. Adele --end of file--

This is the complete contents of data/intro.txt in the 0.3 distribution. Note that it’s clearly not finished, and abruptly ends at the marked location. I’m not sure what to think about it — it somehow sounds like a lead-up to a more interesting story than what has stuck all these years.

Since it’s far shorter than what we have in the mainline campaign so far, I think it’s safe to say that it predates it by some time. I can’t tell for sure whether this is Dave’s own writing or Francisco Muñoz’s, or some random user’s — however, considering the language skill displayed, it’s more likely to have been written by someone whose first language is English, thus ruling out Francisco’s involvement.

UPDATE (2010-10-26): Dave confirms that this story text predates the campaign implemented in 0.3, and in fact, he wrote it too!

18:17:23 <Sirp> IIRC that text later evolved into HTTT
18:20:00 <Sirp> I had originally thought Wesnoth would have a more ancient setting, a Biblical feel to it, and thus polygamy amongst royals would likely be common. Later it seemed to be pushing in the direction of a middle-ages type storyline, and so I removed the polygamy.

While Wesnoth 0.3 still uses an ugly preliminary syntax for WML (the major offenders being the [end] elements), there are some interesting innovations in this release that aren’t evident unless you feel at ease with the WML engine and its source code. The source files game_events.cpp/game_events.hpp, which are nowadays essential foundations of the Events WML dialect, were first introduced in this version.

Along with the game events engine, new script-like WML features start to appear despite the implementation’s primitiveness.

  • [event] is implemented in 0.3 and supports the name and first_time_only attributes with the most basic semantics expected in current versions. Nested events are also already possible with this release.
  • [role] — with the role and type attributes, the latter being a comma-separated list of candidate unit types for a role.
  • [removeitem] (renamed to [remove_item] in 1.9.0) with a Simple Location x, y specifier.
  • [item], to put images onto the map using a Simple Location and image attribute.
  • [terrain], with a Simple Location and a terrain type letter attribute — don’t forget that the current multi-letter terrains system was introduced just in 1.3.x.
  • [unit], to spawn new units on the game map.
  • [recall], to automatically recall a unit matching certain criteria.
  • [message], to display dialog messages as spoken by the narrator or a particular unit. The other supported attributes in 0.3 are image and caption.
  • [kill], to delete a unit from the game map. Only the most basic functionality is present, so no additional attributes besides the simple unit filter.
  • [endlevel], to force victory or defeat from a scripted WML event. In 0.3 it supports the bonus attribute.

This is also the first version featuring the WML preprocessor, thus providing the ability to include files using the inclusion directive {}, and uninterpreted text with the comment directive #.

0.1 and 0.2 managed the game data in a single monolithic game.cfg file. Apparently the readability issues started to become evident with the addition of many new unit types in 0.3, including the original units of the Undead faction, and the campaign scenarios, so {} is exploited for all its worth in the new game.cfg, which includes data from separate files.

drwxrwxr-x david/david 0 2003-07-29 03:27 wesnoth-0.3/language/
-rw-rw-r-- david/david 3026 2003-07-29 03:27 wesnoth-0.3/language/tokenizer.cpp
-rw-rw-r-- david/david 86 2003-07-29 03:27 wesnoth-0.3/language/spec.txt
-rw-rw-r-- david/david 738 2003-07-29 03:27 wesnoth-0.3/language/tokenizer.hpp
-rw-rw-r-- david/david 1325 2003-07-29 03:27 wesnoth-0.3/language/type.hpp
-rw-rw-r-- david/david 5175 2003-07-29 03:27 wesnoth-0.3/language/type.cpp
-rw-rw-r-- david/david 711 2003-07-29 03:27 wesnoth-0.3/language/value.hpp
-rw-rw-r-- david/david 2296 2003-07-29 03:27 wesnoth-0.3/language/value.cpp
-rw-rw-r-- david/david 495 2003-07-29 03:27 wesnoth-0.3/language/exceptions.hpp
-rw-rw-r-- david/david 157 2003-07-29 03:27 wesnoth-0.3/language/expression.hpp

There’s a fair mount of unused source code files in the language/ subdir of the original distribution archive, sharing timestamps with most of the rest of Wesnoth 0.3, which seem to be an attempt at implementing some kind of scripting language distinct from WML. Maybe Dave was already experimenting with creating an embedded functional programming language like the Formula Language employed in Silvertree RPG and later Wesnoth and Frogatto? The language/spec.txt contains this tiny bit of code resembling an AI script:

choose_target = map(rate_target,enemy_units);
rate_target(unit u) = move_next_to(u);

UPDATE (2010-10-26): According to Dave, this was part of an abandoned attempt at implementing some kind of AI scripting facility using a custom language. It’s nonetheless interesting to know that such an idea already existed long before it became possible to implement in in 1.5.x and later thanks to some of our students’ work for the Google Summer of Code program, based on Dave’s own work on porting Silvertree’s formula language engine into Wesnoth.

Wesnoth 0.3 is a vastly different experience from 0.1 and 0.2, and of course, modern versions. It seems that at this point the Battle for Wesnoth Project finally started acquiring the momentum that would later lead to what we have today, but the development team still consisted of only two people: Dave himself, and his contributing artist, Francisco Muñoz. Of course, ignoring the technical difficulties, the simplicity of the game already allowed for fun gameplay even against an artificial intelligence module, which was a goal from the very beginning.

Still, it remains to be seen at what exact point external contributions started to enter mainline.