Skip to content

Commit 4fede41

Browse files
committed
some texts tweaks
1 parent 6d2b337 commit 4fede41

File tree

8 files changed

+40
-21
lines changed

8 files changed

+40
-21
lines changed

sphinx/source/bots/index.rst

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,10 @@ Bots
22
====
33
Guide on writing custom AI/bots for Unnatural Worlds.
44

5-
You can write your bot in any language, as long as it can load a dynamic/shared library (.dll/.so).
6-
The shared library is distributed together with the game.
7-
The uwapi repository contains c/c++ headers for all functions and structures provided by the library.
8-
9-
The uwapi repository also contains convenient wrappers for Python and for C# for quicker start of writing your bot.
10-
11-
The bots api is designed such that you retain full control over your bot program - aka it makes it possible to develop and debug it the way you are used to.
12-
However, to be able to start the game outside of the Steam, it is necessary to copy the file ``steam_appid.txt`` (contained in the uwapi repository) into the ``bin`` folder, next to the game executable.
13-
This also allows you to start the game, and all other accompanying programs, from command line or from bash, which allows you to manually start the server, and connect any number of bots and human players.
5+
Bots act as a client connected to the game server.
6+
The server generally makes no assumption on whether a connection is a bot or a regular player.
7+
Specifically, bots cannot cheat - no more than a regular player could.
148

159
.. toctree::
10+
setup
1611
troubleshooting

sphinx/source/bots/setup.rst

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
Setup
2+
====
3+
You can write your bot in any language, as long as it can load a dynamic/shared library (.dll/.so).
4+
The shared library is distributed together with the game.
5+
6+
The uwapi repository contains c/c++ headers for all functions and structures provided by the library.
7+
Furthermore, it contains convenient wrappers for Python and for C# for quicker start.
8+
9+
.. important::
10+
Copy ``steam_appid.txt`` into the ``bin`` folder.
11+
12+
The file ``steam_appid.txt`` tells Steam that this is developer copy of the game.
13+
It allows running multiple processes of the game simultaneously, and to start the programs directly from outside the Steam.
14+
This allows you to retain full control over your bot program - it makes it possible to develop and debug it from inside your IDE.
15+
You may also start the game client, game server, built-in AI, or any other associated programs from your terminal.
16+
You will find the ``steam_appid.txt`` in the uwapi repository.
17+
Copy it into the ``bin`` folder, next to the game executable.
18+
19+
.. important::
20+
If your Steam games are in non-default location, define environment variable ``UNNATURAL_ROOT`` to the directory containing the library.
21+
22+
The default path on Windows: ``C:\Program Files (x86)\Steam\steamapps\common\Unnatural Worlds\bin``, on linux: ``~/.steam/steam/steamapps/common/Unnatural Worlds/bin``.

sphinx/source/bots/troubleshooting.rst

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,19 @@ Troubleshooting
88

99
Make sure you have installed Unnatural Worlds in Steam.
1010

11-
If your Steam games are in non-default location, define the environment variable ``UNNATURAL_ROOT`` to the directory containing the library.
12-
Example: ``C:\Program Files (x86)\Steam\steamapps\common\Unnatural Worlds\bin``
11+
If your Steam games are in non-default location, define environment variable ``UNNATURAL_ROOT`` to the directory containing the library.
1312

1413
.. dropdown:: OSError: cannot load library 'unnatural-uwapi-hard'
1514

1615
Make sure you have installed Unnatural Worlds in Steam.
1716

18-
If your Steam games are in non-default location, define the environment variable ``UNNATURAL_ROOT`` to the directory containing the library.
19-
Example: ``C:\Program Files (x86)\Steam\steamapps\common\Unnatural Worlds\bin``
17+
If your Steam games are in non-default location, define environment variable ``UNNATURAL_ROOT`` to the directory containing the library.
2018

2119
.. dropdown:: Failed to initialize Steam API
2220

2321
Make sure that Steam is running and logged in.
2422
It must run under the same user as the program.
23+
Do not use any containerization.
2524

2625
.. dropdown:: Linux laptop with switchable GPUs
2726

sphinx/source/concepts/map.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ Tiles are indexed `0 .. N-1`.
1212
Data available for each tile:
1313

1414
- Position - 3D coordinates
15-
- Up - 3D vector - direction opposite of local gravity
15+
- Up - 3D vector - direction opposite of *local* gravity
1616
- Neighbors - array of indices of neighboring tiles
1717
- Cluster - index of the cluster this tile belongs to
18-
- Terrain - index of the terrain at this tile
18+
- Terrain - index of the terrain type at this tile
1919

2020
Clusters
2121
--------

sphinx/source/concepts/prototypes.rst

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ It contains amounts and ids of inputs and outputs.
1616
Also defines the duration of the recipe.
1717
Recipes are processed in buildings/units.
1818

19-
Some recipes have a *place-over* requirement, which is an id of a unit, that the building must be placed on, in order for the recipe to be available.
19+
Some recipes have a *place-over* requirement, which is an id of a unit, that the building must be placed on, in order for the recipe to function.
2020

2121
Construction Prototype
2222
----------------------
@@ -26,9 +26,11 @@ It contains amounts of input resources, and has exactly one output unit/building
2626
Unit Prototype
2727
--------------
2828
Both buildings and units are treated as units in the game.
29-
Some neutral objects, such as trees, rocks, ore deposits, etc. are all also units.
3029

31-
The prototype contains combat related properties, movement (speeds), building radius, a list of available recipes, and a list of applicable upgrades.
30+
.. note::
31+
Some neutral objects, such as trees, rocks, ore deposits, etc. are all units too.
32+
33+
The prototype contains combat related properties, movement speeds or building radius, a list of available recipes, and a list of applicable upgrades.
3234
Additionally, there are several boolean properties, which modify behavior or requirements of the unit/building.
3335

3436
Upgrade Prototype

sphinx/source/maps/index.rst

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@ It may contain :ref:`prototypes <Prototypes>`, :ref:`scripts <Scripts>`, models,
1010

1111
Assets found in a map have precedence over assets in the base game.
1212

13-
Additional files in the map
14-
---------------------------
1513
.. toctree::
1614
scene
1715
collider

sphinx/source/mods/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ Consequently, multiple mods can be enabled simultaneously.
1414
Assets found in a mod have precedence over assets in a map or in the base game.
1515
However, when multiple mods contain same asset ID, the map will fail to load.
1616
Managing mods with clashing assets IDs is left to the player.
17-
It is advised to prefix names of all assets in a mod with the name of the mod to reduce a chance of clashing IDs.
17+
It is advised to prefix names of all assets in a mod with the name of the mod, to reduce a chance of clashing IDs.

sphinx/source/scripts/index.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ Guide on making scripts for custom maps for Unnatural Worlds.
55
.. warning::
66
Making custom scripts is not yet fully supported.
77

8+
Scripts are executed within the server.
9+
They have access to all data within the game, and may modify all data.
10+
811
Scripts can be written in any language that can be compiled into `WASM <https://en.wikipedia.org/wiki/WebAssembly>`_.
912

1013
The uwapi repository provides c/c++ headers for scripts.

0 commit comments

Comments
 (0)