Skip to content

Commit 73cf3e5

Browse files
committed
docs
1 parent 0f46e87 commit 73cf3e5

File tree

6 files changed

+113
-3
lines changed

6 files changed

+113
-3
lines changed

csharp/uwapi/prototypes.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ public class ProtoUnit : ProtoCommon
5454
public bool assembler; // the unit must have at least one valid recipe
5555
public bool emptyNeighbors; // the building requires empty space around
5656
public bool maximumDistance; // the unit moves to maximum distance when shooting
57+
public bool excludeFromMilitary; // the unit is excluded from all-army hotkey
5758
public bool neutralCategory; // the unit is put in neutral category in lexicon
5859
public bool explodesWhenAttacks; // suicidal unit
5960
public bool explodesWhenKilled;

sphinx/source/bots/programOverview.rst

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,38 @@ Program Overview
22
================
33
High-level look at basic bot program.
44

5-
Program Lifecycle
5+
Accessor Objects
66
-----------------
7+
8+
These are globally accessible objects that you use to interact with the game.
9+
10+
.. tab-set::
11+
:sync-group: language
12+
13+
.. tab-item:: Python
14+
:sync: python
15+
16+
- ``uw_admin`` - managing the game server and other players; requires administrator privilege on the game server.
17+
- ``uw_commands`` - sending commands and orders to your units, and queries for current orders.
18+
- ``uw_events`` - register your callbacks here.
19+
- ``uw_game`` - managing game connection, and other settings.
20+
- ``uw_map`` - queries about tiles, clusters, etc; data that do *not* change during game.
21+
- ``uw_prototypes`` - access to all prototypes; they do *not* change during game.
22+
- ``uw_world`` - list all entities, and some additional queries for data that do change during game.
23+
24+
.. tab-item:: C#
25+
:sync: csharp
26+
27+
- ``Admin`` - managing the game server and other players; requires administrator privilege on the game server.
28+
- ``Commands`` - sending commands and orders to your units, and queries for current orders.
29+
- ``Events`` - register your callbacks here.
30+
- ``Game`` - managing game connection, and other settings.
31+
- ``Map`` - queries about tiles, clusters, etc; data that do *not* change during game.
32+
- ``Prototypes`` - access to all prototypes; they do *not* change during game.
33+
- ``World`` - list all entities, and some additional queries for data that do change during game.
34+
35+
Program Lifetime
36+
----------------
737
At start, you are in full control of the program.
838

939
Initialization

sphinx/source/concepts/combat.rst

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,58 @@
11
Combat & Upgrades
22
=================
3+
4+
Shooting
5+
--------
6+
7+
todo
8+
9+
Visibility
10+
^^^^^^^^^^
11+
12+
todo
13+
14+
Elevation
15+
^^^^^^^^^
16+
17+
todo
18+
19+
Explosions
20+
----------
21+
22+
A unit may have any combination (or none) of the following triggers:
23+
24+
- ``explodesWhenAttacks`` - suicidal unit.
25+
- ``explodesWhenKilled`` - explodes when the unit is naturally killed.
26+
- ``explodesWhenSelfDestructed`` - explodes when the unit receives self-destruct command from owner.
27+
28+
When a unit explodes, it does splash damage in area around it.
29+
Damage type of the explosion may be different from shooting.
30+
31+
Splash
32+
------
33+
34+
Splash means the damage is an area-of-effect.
35+
It is centered at the target of shooting, or at the unit that explodes, and is circular with specified radius.
36+
37+
Damage of splash decreases with distance from center, which is determined by ``splashFractionAtEdge``.
38+
It may also affect own/ally units, depending on ``splashFractionToFriendly``.
39+
40+
Damage And Armor Types
41+
----------------------
42+
43+
Each unit has associated armor type, and each shooting (or explosion) has associated damage type.
44+
The game has a table that defines a fraction for each combination of damage type with each armor type.
45+
Some values are over 100 % and some are below.
46+
47+
For example, energy shield is designed to be highly resistant to lasers and plasma, which are most often used in long-range guns; and antimatter guns are designed for destroying buildings.
48+
49+
Life Regeneration
50+
-----------------
51+
52+
Life regeneration has a delay, which is extended whenever the unit is attacked, or whenever the unit itself shoots.
53+
When the delay expires, the unit starts healing at the specified rate.
54+
55+
Upgrades
56+
--------
57+
58+
todo

sphinx/source/concepts/entities.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ Amount of mana of the unit (or building).
7373

7474
Move Component
7575
--------------
76-
Contains information about current movement of the unit.
76+
Timestamp of when the unit finishes its current movement.
7777
Information is available for the next neighboring tile only.
7878

7979
Aim Component
@@ -141,7 +141,7 @@ This component contains private information about the force.
141141

142142
Foreign Policy Component
143143
------------------------
144-
This entity declares the policy between two forces.
144+
This entity declares a policy between two forces.
145145

146146
Diplomacy Proposal Component
147147
----------------------------

sphinx/source/concepts/prototypes.rst

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,3 +55,24 @@ All prototypes may have associated some tags with them.
5555
Tags are short strings (mapped to unique ids), that are provided by the game/map/mods to help programs understand the nuances of that particular prototype.
5656
Tags are *not* used by the game, except by the built-in AI/bot, which uses tags to alter behavior of some units.
5757
Tags may be used by both Bots and Scripts.
58+
59+
- ``ambush`` - walks over additional terrain types.
60+
- ``artillery`` - longer range than most.
61+
- ``assault`` - good for front-line combat.
62+
- ``harassment`` - good for hit-and-run attacks, especially targeting workers.
63+
- ``home`` - the center of your base. dont let it die.
64+
- ``miner`` - generates resources, usually from ore deposits.
65+
- ``navy`` - moves on water only.
66+
- ``noncombat`` - not intended for combat, even if it has an attack/explosion.
67+
- ``nonprogression`` - an alternative for another prototype (this tag is used to break cyclic dependencies).
68+
- ``production`` - produces more units.
69+
- ``research`` - produces upgrades.
70+
- ``scout`` - fast and cheap, good as a scout.
71+
- ``siege`` - designed for destroying buildings.
72+
- ``splash`` - area-of-effect attack/explosion.
73+
- ``suicidal`` - sacrifices itself when attacking.
74+
- ``tank`` - defensive unit with life above typical.
75+
- ``tower`` - stationary defensive structure.
76+
- ``volatile`` - may damage own/allied units.
77+
- ``wall`` - stationary path blocking structure.
78+
- ``worker`` - carries resources, automatic control by logistics planning.
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
Resources & Logistics
22
=====================
3+
4+
todo

0 commit comments

Comments
 (0)