From the forums:
aCode has just gone through a huge overhaul. What is aCode?
It works like bbcode, like a simplified and specific version of html that is unique to Afar. It is used for building scenes, and you'll see it in use any time you view a section of the game that uses page.php, which is essentially the aCode browser.
aCode started off very simple - as bbcode from phpBB in fact. One could make images, bold text, center text, and add hyperlinks, and that was about it.
In Build 2 it was updated to include our own key functions for navigation, random battles, and more.
In the new aCode build there are a variety of features which are going to make maps and scenes using page.php a lot more dynamic and interesting.
New dynamic code!
[sw 1] - echoes the value of a switch. Switches can be 1 (on) or 0 (off).
[var xyz] - echoes the value of game variables xyz. Variables can hold any kind of data from the player's name, to their equipment.
[func functionname] - runs an aCode function before loading the page. This is the most important part, as aCode functions use full PHP - we can do pretty much anything.
[set xyz]value[/set] - sets the value of variable xyz to "value" before loading the page.
[setsw 1]1/0[/set] - sets the value of a switch to on or off before loading the page, ignoring it if already true.
[flipsw 1] - flips the value of a switch before loading the page. (1 becomes 0, 0 becomes 1)
There is more but these are the most important.
So how does it work?
Consider this scene - the woods next to the base camp:
http://afar.ws/v/page.php?p=area-woods-4
Notice it uses page.php so aCode is in use...
---------------------------------------------------------------
//// set some initial variables and switches
[setsw 18]1[/setsw] //// show we've visited this page (example)
//// the page
[rbattle]1[/rbattle] //// creates a random battle from group 1
[cen
ter][b]Woods[/b
][/center] //// centres the content and creates an image and title
[desc]You hear running water up ahead. Behind you the woods go on for miles. It is said that this land was the first settled upon when humans reached the Tiben region. A small settlement nearby offers free food to the poor who often use this route having arrived at Tiben Port.[/desc] //// creates a properly formatted description
[north]area-port[/north]
[west=no]
[token]
[east]area-basecamp[/east]
[south]area-woods-5[/south]
//// above is the navigation widget - with no west pointer, and the familiar token in the middle.
-----------------------------------------------------
And that is how a map is made.
"Phase 1" of the southern expansion is now complete. A long, winding path following one of the Great Lakes, leading to a new location on the world map, "Faygrin's Fayre".
The Fayre will eventually have a merchant to buy goods.
This update involves 23 new maps or finished shell maps and several new graphics.
The World Map system now allows the map to be resized in the future to allow more content - as you can see it's already been expanded quite a bit! All of the map has plans which will be coming in the future.
---
The merchant at Faygrin's Fayre is now open for business with some brand new items that will become usable soon.
There are also several new rare items to be found from battle - no more said. :]