Changes between Version 7 and Version 8 of Playing0AD
- Timestamp:
- Jun 25, 2009, 4:21:01 PM (15 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Playing0AD
v7 v8 1 [[TOC]] 2 1 3 This tutorial will introduce you to 0 A.D. in its current state, including how to play the game, how to use the tools, and how to use various cool developer features. It is written for both programmers and artists. 2 4 3 = Starting the Game=5 == Starting the Game == 4 6 5 7 So, you've checked out the game from SVN. The next step is to try it out :D. 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. 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`). 6 8 7 == Exiting==9 === Exiting === 8 10 9 11 This 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. 10 12 11 == Graphics Settings==13 === Graphics Settings === 12 14 13 15 You can change various graphics settings in the file `binaries\data\config\system.cfg`. Open this file in Notepad to be able to edit it. You need not do this now, but they might be useful in the future. Here are the main ones you might be interested in changing: … … 18 20 If you modify `system.cfg`, make sure you do *not* commit it to SVN, so that new members check out the default version of the file. 19 21 20 = Playing a Match=22 == Playing a Match == 21 23 22 24 On 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: … … 27 29 For 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. 28 30 29 == Moving the Camera==31 === Moving the Camera === 30 32 31 33 The camera controls in 0 A.D. are similar to other RTS games. Here is an overview of what you can do: … … 40 42 Try moving around the map a little bit and then returning to your original view. 41 43 42 == Tasking Units==44 === Tasking Units === 43 45 44 46 Click 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. … … 50 52 You can also make your units ''run'' by double-rightclicking instead of rightclicking. This depletes the unit's "stamina", represented by the blue bar above its head. Stamina slowly regenerates when the unit is idle. For military units, the first attack after running at an enemy is considered a charge attack and does more damage. 51 53 52 == Gathering Resources==54 === Gathering Resources === 53 55 54 56 There 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. … … 62 64 Note also that units will automatically go to nearby resource objects of the same type when they finish chopping down a tree, etc. 63 65 64 == Building Structures==66 === Building Structures === 65 67 66 68 Your 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. … … 76 78 Units can also repair damaged buildings. This is done by rightclicking as well. 77 79 78 == Training Units==80 === Training Units === 79 81 80 82 Some 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. … … 82 84 The other structures that can train units are the Barracks and Fortress. The Dock will also eventually train ships. 83 85 84 == Researching Technologies==86 === Researching Technologies === 85 87 86 88 Some 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. … … 90 92 (Todo: Write about an example technology here.) 91 93 92 == Claiming Territories==94 === Claiming Territories === 93 95 94 96 The 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. … … 104 106 On latium_generated, you can find a Settlement by walking directly South from your Civil Centre. Make sure you bring an infantry unit there to actually be able to build on it (cavalry can't build). 105 107 106 == Fighting Enemies==108 === Fighting Enemies === 107 109 108 110 Finally, 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 :). … … 110 112 There are a few special combat system features that should be noted: 111 113 112 === Running and Charging===114 ==== Running and Charging ==== 113 115 114 116 As described earlier, double-rightclick to make a unit run, which makes them move faster but requires stamina. … … 118 120 In addition, some cavalry units can ''trample'' enemies while running. The area in which the trample damage happens is shown in red around the cavalry unit. Simply run the cavalry around to trample enemies, or double-rightclick an enemy to charge and trample. (When the cavalry stops running in order to attack, the trample effect will continue for about 5 seconds, so this can be more efficient than just running around.) 119 121 120 === Ranged Units===122 ==== Ranged Units ==== 121 123 122 124 Archers 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. … … 124 126 Projectiles in 0 A.D. do area damage and hurt friendly units as well. 125 127 126 === Unit Stances===128 ==== Unit Stances ==== 127 129 128 130 Each 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: … … 133 135 There is also an Avoid stance that is not currently implemented. 134 136 135 === Regeneration===137 ==== Regeneration ==== 136 138 137 139 Units regenerate health slowly when they have not been in combat for a certain amount of time. They also regenerates stamina when idle. 138 140 139 === Damage Types===141 ==== Damage Types ==== 140 142 141 143 Damage 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. 142 144 143 === Capturing===145 ==== Capturing ==== 144 146 145 147 Certain 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. 146 148 147 === Unit Ranks===149 ==== Unit Ranks ==== 148 150 149 151 As 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. 150 152 151 == Other Game Features==152 153 === Pausing the Game===153 === Other Game Features === 154 155 ==== Pausing the Game ==== 154 156 155 157 You 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. 156 158 157 === Quitting a Match===159 ==== Quitting a Match ==== 158 160 159 161 You 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. 160 162 161 = Developer Features=162 163 == The Console==164 165 === Introduction===163 == Developer Features == 164 165 === The Console === 166 167 ==== Introduction ==== 166 168 167 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. … … 179 181 The rest of this section will show you specific commands you can give with the console that should be useful for any kind of testing. It is targeted at both programmers and artists. The last section, Further Reference, lists more resources for programmers. 180 182 181 === Placing Units===183 ==== Placing Units ==== 182 184 183 185 You can place units through the `startPlacing` command if you know their template name (the name of their XML file in `binaries/data/mods/official/entities`. For example, the following places a Hoplite: … … 189 191 Note that when you place buildings (such as "hele_house"), only the foundation will be placed. 190 192 191 === Killing Units===193 ==== Killing Units ==== 192 194 193 195 To kill the currently selected unit, use: … … 199 201 You can also press the SUPR or DEL key to kill a selected unit. 200 202 201 === Modifying Units===``203 ==== Modifying Units ====`` 202 204 203 205 You can modify a variety of traits on the selected units. For example, to give the currently selected unit 100 melee damage, use: … … 213 215 }}} 214 216 215 === Giving Yourself Resources===217 ==== Giving Yourself Resources ==== 216 218 217 219 You can access your own resource values through `players[1].resources`. For example, to add 1000 food to your stockpile, use: … … 223 225 The other resources are called `wood`, `metal`, `stone` and `housing`. 224 226 225 === Setting Graphics Options===227 ==== Setting Graphics Options ==== 226 228 227 229 Various graphics options can be enabled or disabled through the `renderer` object. For example: … … 231 233 }}} 232 234 233 === Using the Console from your code===235 ==== Using the Console from your code ==== 234 236 235 237 You can print anything to the console by using the {{{console.write()}}} method. This can be useful for debuging your scripts. 236 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. 237 239 238 === Further Reference===240 ==== Further Reference ==== 239 241 240 242 You 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. … … 247 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.) 248 250 249 == The Profiler==251 === The Profiler === 250 252 251 253 0 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. … … 253 255 For information on how to use the profiler in your own code, take a look at Profile.h. It's pretty straight-forward (mostly involves calling macros to start/stop a new subsection of the tree). 254 256 255 == Debugging Functions==257 === Debugging Functions === 256 258 257 259 (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.) 258 260 259 = Tools=260 261 == Atlas - The Map Editor==261 == Tools == 262 263 === Atlas - The Map Editor === 262 264 263 265 Run Atlas using the file `binaries/system/Atlas.bat`. … … 265 267 See the [wiki:Atlas_User%27s_Guide Atlas User's Guide] for more info on how to use Atlas. 266 268 267 == Actor Viewer==269 === Actor Viewer === 268 270 269 271 Run the Actor Viewer through `binaries/system/ActorViewer.bat`. … … 271 273 (Todo: Explain.) 272 274 273 == Actor Editor==275 === Actor Editor === 274 276 275 277 Run the Actor Editor through `binaries/system/ActorEditor.exe`. 276 278 277 See 279 (Todo: Explain.)