Changes between Version 15 and Version 16 of Playing0AD


Ignore:
Timestamp:
Sep 30, 2010, 1:10:10 AM (14 years ago)
Author:
Erik Johansson
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Playing0AD

    v15 v16  
    66
    77== Starting the Game ==
    8 
    98So, you've gotten the game by downloading a release version or checking out the game from SVN. The next step is to try it out :D. If using a pre-compiled release version you should have a shortcut in your start menu (or Linux equivalent), just click it and the game will start. If you've compiled it yourself after checking out the game from SVN or using the source files in the latest release you'll have to start the game manually. To do this, go to the folder `binaries\system` in the folder where you checked out the game, and double-click `pyrogenesis.exe`. The game will take several minutes to start up the first few times, because it is building compressed data files so it can start faster in the future. Eventually, the startup time will go down to ~5 seconds. If you're having trouble with for example sound you can double-click 'Quickstart.bat' in the 'binaries\system folder which will start the game without some things enabled, like sound for example. If you're on another operating system, or prefer to do things another way - like adding a shortcut to the binary from the Desktop - the same can be achieved by using the argument `-quickstart` when you run the game. (If you have commit access another command line switch that can be good to know is `-publicFilesOnly` which will make it possible to test how things work using only the public files (which is everything except some of the Art which is kept internal until later), an example would be to test if a public map contains files in the internal mod )For other command line options see the `Readme.txt` file in `binaries\system`.
    109
    1110=== Exiting ===
    12 
    1311This is also a good place to mention how to quit the game. You can exit 0 A.D. at any time by pressing '''Esc''', pressing it once will bring up a confirmation box and when you've clicked ok on that you're taken to the main screen, press '''Esc''' again and 0 A.D. is shut down completely after you click ok on that confirmation. You can also quit using the GUI buttons, when playing a game press the '''Menu''' button followed by the '''Quit''' button. From the main button you can press the '''Quit''' GUI button as well as using the '''Alt'''+'''F4''' keys on your keyboard, you'll get a confirmation box when using the GUI button, but not when using the '''Alt'''+'''F4''' keyboard shortcut.
    1412
    1513=== Graphics Settings ===
    16 
    17 To switch between Windowed and Fullscreen mode press '''Alt'''+'''Enter''.
    18 Various graphic settings are in the file `binaries\data\config\default.cfg`. To change a setting, create a ''new'' file, on Windows, create: '%appdata%/0ad/config/local.cfg`, on Linux/OS X, create: '~/.config/0ad/config/local.cfg'. Open both these files in Notepad, and copy any lines you want to change from `default.cfg` into the new `local.cfg`. Here are the main ones you might be interested in changing:
     14To switch between Windowed and Fullscreen mode press '''Alt'''+'''Enter'''. Various graphic settings are in the file `binaries\data\config\default.cfg`. To change a setting, create a ''new'' file, on Windows, create: `%appdata%/0ad/config/local.cfg`, on Linux/OS X, create: `~/.config/0ad/config/local.cfg`. Open both these files in Notepad, and copy any lines you want to change from `default.cfg` into the new `local.cfg`. Here are the main ones you might be interested in changing:''''''''''
     15
    1916 * Render path: If you have any problems with graphics due to an older graphics card, add the line `renderpath=fixed` to make sure 0 A.D. uses no shaders. If this fixes the problems, please report it as a bug to us.
    2017 * Fancy water: Again, if you have an older graphics card, or just don't want all the fancy effects, you can disable pixel-shaded water by adding `fancywater=false`. Note that it's also possible to toggle fancy water while the game is running however, if you only want to check how things look temporarily or just want to use it occasionally.
    2118
    2219== Playing a Match ==
    23 
    2420On the main menu, press Single Player to begin your first match. This brings up a game setup screen. Some of the controls on this screen do not work yet, but there are two very useful ones that you should be aware of:
    2521
     
    2723 * Screenshot Mode: Check this box when you just want to open a map to take screenshots instead of playing. This will disable line of sight and fog of war, as well as put all the units in Passive stance, so they do not attack each other.
    2824 * LOS: You can switch from normal to explored or all visible, that will show the whole map (explored) or show the map + deactivate the fog of war (all visible)
     25
    2926For now, leave the settings as default. That is, play on the map '''Latium''', with screenshot mode off. '''Latium''' is our "typical" map, created from a random map script, and complete with resources, territories, etc.
    3027
    3128=== Moving the Camera ===
    32 
    3329The camera controls in 0 A.D. are similar to other RTS games. Here is an overview of what you can do:
     30
    3431 * Scrolling: Move the mouse to a side of the screen, or use the arrow keys.
    3532 * Rotating: Use Ctrl + left and right arrow keys.
     
    4340
    4441=== Tasking Units ===
    45 
    4642Click one of your soldiers to select him. Right-click on the ground to task him. You can also select multiple units by dragging a box with the left mouse button.
    4743
     
    5349
    5450=== Gathering Resources ===
    55 
    5651There are four types of resources in 0 A.D: Food, wood, metal and stone. Your current amount of each resource is listed at the top of the screen. In addition, there is a fifth "resource": housing space. This is provided by civic buildings such as houses and Civil Centres. The last counter at the top of the screen shows your current population over your current housing capacity. Note that some units, such as cavalry, take two population slots.
    5752
     
    6560
    6661=== Building Structures ===
    67 
    6862Your infantry and female citizens can build new buildings. To do this, select a unit, and hover the mouse over the leftmost tab above the unit portrait at the left of the screen. This will open up a tab of available buildings. You can leftclick on one to select it, and leftclick somewhere on the map to place the new building. To cancel the building placement cursor, rightclick. Note, however, that the GUI currently won't give you an error message you when a building cannot be built due to insufficient resources (except in the Console - see below). In that case, the mouse pointer simply won't switch to the new building, so you won't be able to place it. If you want to try building something now, try either a House or a Mill. You can also gather more wood and stone to make other buildings.
    6963
     
    7973
    8074=== Training Units ===
    81 
    8275Some of your buildings can train new units. For example, click your Civil Centre, and hover the mouse over the leftmost tab above the building's portrait, with a helmet on it. This will open up a list of things you can train. Click one to begin producing it. It will finish in several seconds and appear beside the Civil Center. You may also click multiple units or click the same unit multiple times to queue them. Note that if you don't have enough resources or population space for the unit, the GUI won't tell you (it will just ignore your command), but you can see a message about this in the console.
    8376
     
    8578
    8679=== Researching Technologies ===
    87 
    8880Some buildings also have a second tab with a wheel on it, that lets them research technologies. Like with units, hover over the tab and then click a button to start researching the technology. Technologies go into the same queue as unit production and will finish in a few seconds.
    8981
     
    9385
    9486=== Claiming Territories ===
    95 
    9687The key to expanding your civilization in 0 A.D. is conquering territories. Each map is divided into a number of territories (usually 3x the number of players). Each territory is centered around an object called a ''Settlement'', which looks like a little well with a fence around it. It is shaped like a polygon around this Settlement (it contains all the points that are nearer to this Settlement than to any other). These polygons are showed on both the minimap and the game world. On the minimap, the lines are gray and the territory is shaded depending on its owner. In the game world, each territory boundary is drawn as two lines, each of which is coloured based on who owns that territory.
    9788
     
    9990
    10091Owning a territory gives you several benefits:
     92
    10193 * You can only build structures within your own territories.
    10294 * Consequently, you can only gather resources near your own territories, since you need a dropsite.
     
    10799
    108100=== Fighting Enemies ===
    109 
    110101Finally, the reason for all this buildup: To slay some enemies :D! Combat in 0 A.D. works similarly to other real-time strategy games. You make your soldiers attack by rightclicking on a target. If you want to try this out on latium_generated, walk either North or East until you find an enemy town. Feel free to pillage at will :).
    111102
     
    113104
    114105==== Running and Charging ====
    115 
    116106As described earlier, double-rightclick to make a unit run, which makes them move faster but requires stamina.
    117107
     
    121111
    122112==== Ranged Units ====
    123 
    124113Archers and javelinists in 0 A.D. have a minimum range. They will automatically back up out of this range when they are trying to attack something too close to them.
    125114
     
    127116
    128117==== Unit Stances ====
    129 
    130118Each unit can be in one of four stances that controls its AI. These can be set from the Stance List tab, which normally has three daggers drawn on it. They include:
     119
    131120 * Aggress: The default. Causes the unit to automatically attack and pursue any enemies it sees.
    132121 * Defend: The unit will attack and pursue enemies, but it will not pursue them beyond its line-of-sight away from the position where it was stationed.
    133122 * Stand: The unit will stand at its position but still attack units that come in range (if it is a ranged unit).
    134123 * Hold: The unit will stand still and hold all fire (unless manually told to attack).
     124
    135125There is also an Avoid stance that is not currently implemented.
    136126
    137127==== Regeneration ====
    138 
    139128Units regenerate health slowly when they have not been in combat for a certain amount of time. They also regenerates stamina when idle.
    140129
    141130==== Damage Types ====
    142 
    143131Damage in 0 A.D. comes in three types: hack, pierce and crush. Units have different armour for each type. In addition, unit attacks may be of multiple types simultaneously (e.g. a Hoplite does both pierce and hack damage). Therefore, you may see some units do different amounts of damage to different enemies.
    144132
    145133==== Capturing ====
    146 
    147134Certain enemy objects can be captured. The main one is Female Citizens - if they are outside the range of their own soldiers but inside the range of your soldiers for a sufficiently long time, they will change ownership to you. Later, damaged buildings are planned to be capturable as well. One final capturable object is herd animals such as sheep, which are a movable food source.
    148135
    149136==== Unit Ranks ====
    150 
    151137As soldiers in 0 A.D. gain experience by killing enemies, they advance in rank. All units begin at Basic rank, and they can upgrade to Advanced and then Elite. Higher ranks give a unit more attack, armour and health, but reduce its economic effectiveness.
    152138
    153139=== Other Game Features ===
    154 
    155140==== Pausing the Game ====
    156 
    157141You can pause the game by pressing the '''Pause''' key on your keyboard (at the top right). Unpause it using the same key. The game will also be paused if you switch to another window.
    158142
    159143==== Quitting a Match ====
    160 
    161144You can quit a match and return to the main menu at any time by pressing '''Alt-X''' (For fast quiting), or pressing ESCAPE key. This will ask you for confirmation, if you click yes you will return to the main menu.
    162145
    163146== Developer Features ==
    164 
    165147=== The Console ===
    166 
    167148==== Introduction ====
    168 
    169 The in-game console displays various messages and lets you execute commands using JavaScript, with access to the same set of functions as the scripts.
     149The in-game console displays various messages and lets you execute commands using JavaScript, with access to the same set of functions as the scripts.
    170150
    171151To open or close the console, press F9 or '''~''' (the tilde key at the top left of the keyboard).
     
    182162
    183163==== Placing Objects ====
    184 
    185164You can place objects through the `startPlacing` command if you know their template name (the name of their XML file in `binaries/data/mods/public/entities/`. For example, the following places a Hoplite:
    186165
     
    188167:startPlacing("hele_infantry_spearman_b")
    189168}}}
    190 
    191169Note that when you place buildings (such as "hele_house"), only the foundation will be placed.
    192170
    193171==== Killing Units ====
    194 
    195172To kill the currently selected unit, use:
    196173
     
    198175:selection[0].kill()
    199176}}}
    200 
    201177You can also press the SUPR or DEL key to kill a selected unit.
    202178
    203 ==== Modifying Units ====``
    204 
     179==== Modifying Units ====
    205180You can modify a variety of traits on the selected units. For example, to give the currently selected unit 100 melee damage, use:
    206181
     
    208183:selection[0].actions.attack.melee.damage = 100
    209184}}}
    210 
    211185You can also modify entity templates for each player, which affects all units of the given type owned by that player. For example, to give 100 attack to all Hoplites owned by player 1, use
    212186
     
    214188:getEntityTemplate("hele_infantry_spearman_b", 1).actions.attack.melee.damage = 100
    215189}}}
    216 
    217190==== Giving Yourself Resources ====
    218 
    219191You can access your own resource values through `players[1].resources`. For example, to add 1000 food to your stockpile, use:
    220192
     
    222194:players[1].resources.food += 1000
    223195}}}
    224 
    225196The other resources are called `wood`, `metal`, `stone` and `housing`.
    226197
    227198==== Setting Graphics Options ====
    228 
    229199Various graphics options can be enabled or disabled through the `renderer` object. For example:
    230200
     
    232202:renderer.fancyWater = true
    233203}}}
    234 
    235204==== Using the Console from your code ====
    236 
    237 You can print anything to the console by using the {{{console.write()}}} method. This can be useful for debuging your scripts.
    238 If you are printing an entire object and not a variable be sure that the object can be printed and contains the toString() method.
     205You can print anything to the console by using the `console.write()` method. This can be useful for debuging your scripts. If you are printing an entire object and not a variable be sure that the object can be printed and contains the toString() method.
    239206
    240207==== Further Reference ====
    241 
    242208You can find many of the functions exposed to JavaScript in the source file ScriptGlue.cpp. In addition, classes are scriptable, such as CEntity, CTechnology and CRenderer, have a ScriptingInit function where they list their methods.
    243209
    244 Some useful global objects and functions include:
    245 * `selection`: An array containing the currently selected objects.
    246 * `players`: An array containing the players.
    247 * `renderer`: The renderer object.
    248 * `getGuiGlobal()`: The GUI globals object (which contains a bunch of GUI-related functions).
    249 * `getEntityTemplate(unitName, playerNum)`: Get the entity template for a given unit, which instances of each type of unit inherit from. (Affects properties of all units at once.)
     210Some useful global objects and functions include: * `selection`: An array containing the currently selected objects. * `players`: An array containing the players. * `renderer`: The renderer object. * `getGuiGlobal()`: The GUI globals object (which contains a bunch of GUI-related functions). * `getEntityTemplate(unitName, playerNum)`: Get the entity template for a given unit, which instances of each type of unit inherit from. (Affects properties of all units at once.)
    250211
    251212=== The Profiler ===
    252 
    2532130 A.D. includes a built-in low-overhead profiler which can help you figure out bottlenecks. You can access it by pressing '''F11'''. The first view shows render stats. If you press '''F11''' again, you will be taken to a second view, which shows time per frame (in milliseconds) and breaks it down into different areas. Each area has a number in front of it (1, 2, 3, etc) that you can press to go deeper into it to explore how its time is divided up. You can also press 0 to go up one level in this "tree" of time usage. Finally, press '''F11''' a third time to close the profiler overlay.
    254214
     
    256216
    257217=== Debugging Functions ===
    258 
    259218(Todo. Please see debug.h for now. The main thing to watch out for is that you must use debug_printf, not printf or cout, to print output so that it can be seen in the Visual C++ output window.)
    260219
    261220== Tools ==
    262 
    263221=== Atlas - The Map Editor ===
    264 
    265222Run Atlas using the file `binaries/system/Atlas.bat`, or on non-Windows platforms use `./pyrogenesis_dbg -editor` in `binaries/system/`.
    266223
     
    268225
    269226=== Actor Viewer ===
    270 
    271227Run the Actor Viewer through `binaries/system/ActorViewer.bat`.
    272228
     
    274230
    275231=== Actor Editor ===
    276 
    277232Run the Actor Editor through `binaries/system/ActorEditor.exe`.
    278233