### Install Keybinds File Source: https://github.com/sfttech/openage/blob/master/cfg/CMakeLists.txt Installs the 'keybinds.oac' file to the global configuration directory. ```cmake install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/keybinds.oac" DESTINATION "${GLOBAL_CONFIG_DIR}" ) ``` -------------------------------- ### Install Doxygen for Documentation Source: https://github.com/sfttech/openage/blob/master/doc/build_instructions/macos.md Installs Doxygen, an optional tool for generating project documentation. ```bash brew install doxygen ``` -------------------------------- ### Install Openage Source: https://github.com/sfttech/openage/blob/master/doc/building.md Installs the compiled openage game to the prefix specified during configuration. ```bash make install ``` -------------------------------- ### Build Action Example Source: https://github.com/sfttech/openage/blob/master/doc/reverse_engineering/networking/11-buildings.md Example byte sequence for a build action packet. Corresponds to the Build definition. ```plaintext 66 02 01 00 00 00 10 43 00 00 88 42 46 00 00 00 ff ff ff ff 02 00 00 00 6e 17 00 00 6c 17 00 00 ``` -------------------------------- ### Install and Rename File Source: https://github.com/sfttech/openage/blob/master/assets/logo/CMakeLists.txt Installs a file with a specified new name to a destination directory. ```cmake install( FILES "crown.svg" RENAME "openage.svg" DESTINATION "share/pixmaps/" ) ``` -------------------------------- ### Install gdbgui Source: https://github.com/sfttech/openage/blob/master/doc/debug.md Install the gdbgui package using pip3 on Ubuntu. ```bash sudo pip3 install gdbgui --upgrade ``` -------------------------------- ### Install Directory Source: https://github.com/sfttech/openage/blob/master/assets/CMakeLists.txt Installs a directory and its contents to a specified destination during the build process. ```cmake install(DIRECTORY "qml" DESTINATION "${ASSET_DIR}" ) ``` -------------------------------- ### Install Dependencies via Homebrew Source: https://github.com/sfttech/openage/blob/master/doc/build_instructions/macos.md Installs essential build tools and libraries using Homebrew. Ensure Homebrew is up-to-date before running. ```bash brew update-reset && brew update brew install --cask font-dejavu brew install cmake python3 libepoxy freetype fontconfig harfbuzz opus opusfile qt6 libogg libpng toml11 eigen brew install llvm pip3 install --upgrade --break-system-packages cython numpy mako lz4 pillow pygments setuptools toml ``` -------------------------------- ### Install Converter Directory Source: https://github.com/sfttech/openage/blob/master/cfg/CMakeLists.txt Installs the 'converter' directory and its contents to the global configuration directory. ```cmake install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/converter" DESTINATION "${GLOBAL_CONFIG_DIR}/" ) ``` -------------------------------- ### Install openage Dependencies on openSUSE Source: https://github.com/sfttech/openage/blob/master/doc/build_instructions/opensuse.md Installs essential development libraries and tools required for building openage on openSUSE using zypper. Ensure you have nyan and its dependencies installed separately. ```bash zypper install --no-recommends cmake doxygen eigen3-devel fontconfig-devel gcc-c graphviz++ harfbuzz-devel libepoxy-devel libfreetype-dev libogg-devel libopus-devel libpng-devel libtoml11-dev qt6-declarative-dev qt6-quickcontrols2 qt6-multimedia-dev opusfile-devel python3-Cython python3-Mako python3-lz4 python3-Pillow python3-Pygments python3-toml python3-devel ``` -------------------------------- ### Install Required Windows Utilities Source: https://github.com/sfttech/openage/blob/master/packaging/CMakeLists.txt Installs required Windows utility executables. This loop iterates through a list of utilities and installs their executables. ```cmake foreach(_UTILITY ${REQUIRED_UTILITIES}) install(FILES "${${_UTILITY}_EXECUTABLE}" DESTINATION "${CMAKE_INSTALL_BINDIR}") endforeach() ``` -------------------------------- ### Install Windows openage.bat Source: https://github.com/sfttech/openage/blob/master/packaging/CMakeLists.txt Installs the configured openage.bat script to the root of the installation directory. ```cmake install(FILES "${CMAKE_CURRENT_BINARY_DIR}/openage.bat" DESTINATION ".") ``` -------------------------------- ### Install File to Asset Directory Source: https://github.com/sfttech/openage/blob/master/assets/logo/CMakeLists.txt Installs a file to a destination directory defined by a variable. ```cmake install( FILES "banner.svg" DESTINATION "${ASSET_DIR}" ) ``` -------------------------------- ### Set CPack Generators Source: https://github.com/sfttech/openage/blob/master/packaging/CMakeLists.txt Configures the CPack generators to be used. This example specifies NSIS and 7Z for creating installers and archives. ```cmake set(CPACK_GENERATOR "NSIS" "7Z") ``` -------------------------------- ### Package openage Installer Source: https://github.com/sfttech/openage/blob/master/doc/build_instructions/windows_msvc.md Use cpack to generate the openage installer. Append -V for verbose output. ```bash cpack -C RelWithDebInfo ``` -------------------------------- ### Launch gdbgui Source: https://github.com/sfttech/openage/blob/master/doc/debug.md Start gdbgui with the run executable to begin debugging in a browser. ```bash gdbgui ./run ``` -------------------------------- ### Install Debian Dependencies Source: https://github.com/sfttech/openage/blob/master/doc/build_instructions/debian.md Installs all required development libraries and tools for building openage on Debian systems. ```bash sudo apt-get install cmake cython3 libeigen3-dev libepoxy-dev libfontconfig1-dev libfreetype-dev libharfbuzz-dev libogg-dev libopus-dev libopusfile-dev libpng-dev libtoml11-dev python3-dev python3-mako python3-numpy python3-lz4 python3-pil python3-pip python3-pygments python3-toml qml6-module-qtquick-controls qt6-declarative-dev qt6-multimedia-dev qml6-module-qtquick3d-spatialaudio ``` -------------------------------- ### Install Windows Forward Variables Script Source: https://github.com/sfttech/openage/blob/master/packaging/CMakeLists.txt Installs the configured forward variables script for Windows builds. This script is used during the installation process. ```cmake install(SCRIPT "${CMAKE_CURRENT_BINARY_DIR}/ForwardVariables.cmake") ``` -------------------------------- ### Install Openage using emerge Source: https://github.com/sfttech/openage/blob/master/doc/build_instructions/gentoo.md Install the latest stable release of Openage using the emerge package manager. ```shell emerge -avt openage ``` -------------------------------- ### Install Required Packages on FreeBSD Source: https://github.com/sfttech/openage/blob/master/doc/build_instructions/freebsd.md Installs essential development packages and libraries required for building openage. Ensure you have sudo privileges. ```bash sudo pkg install cmake cython eigen3 harfbuzz opus-tools opusfile png py-mako py-numpy py-lz4 py-pillow py-pygments py-toml pylint python qt6 toml11 ``` -------------------------------- ### Call setup function in Python interface Source: https://github.com/sfttech/openage/blob/master/doc/code/pyinterface.md Integrates the setup for calling Python functions into the main setup routine of the Python interface. This ensures that the Python functions are correctly registered and ready for C++ calls. ```python def setup(): # (...) from openage.foo import setup setup() # (...) ``` -------------------------------- ### Build Wall Action Example Source: https://github.com/sfttech/openage/blob/master/doc/reverse_engineering/networking/11-buildings.md Example byte sequence for a build wall action packet. Corresponds to the BuildWall definition. ```plaintext 69 02 01 a0 4a ac 47 00 48 00 00 00 ff ff ff ff 6c 17 00 00 6e 17 00 00 ``` -------------------------------- ### Tribute Example Source: https://github.com/sfttech/openage/blob/master/doc/reverse_engineering/networking/13-other.md An example byte sequence for a tribute action, detailing the transfer of resources between players. ```plaintext 6c 03 01 03 00 00 c8 42 cd cc 4c 3e ``` -------------------------------- ### Launch Openage Source: https://github.com/sfttech/openage/blob/master/doc/building.md Launches the installed openage executable. ```bash /usr/local/bin/openage ``` -------------------------------- ### Install Nyan Dependencies Source: https://github.com/sfttech/openage/blob/master/doc/build_instructions/macos.md Installs flex and make, which are dependencies for the nyan build tool. ```bash brew install flex make ``` -------------------------------- ### Start GDB Debugging Session Source: https://github.com/sfttech/openage/blob/master/doc/debug.md Launch GDB with specific commands to set a pending breakpoint at openage::run_game and start the game executable. ```bash gdb -ex 'set breakpoint pending on' -ex 'b openage::run_game' -ex run --args run game ``` -------------------------------- ### Ungarrison Action Example: Ungarrisoning from Building Source: https://github.com/sfttech/openage/blob/master/doc/reverse_engineering/networking/08-movement.md Example byte sequence for ungarrisoning all units from a building. ```plaintext 6f 01 00 00 00 00 80 bf 00 00 80 bf 00 00 00 00 ff ff ff ff 4b 17 00 00 ``` -------------------------------- ### Integer Syntax Examples Source: https://github.com/sfttech/openage/wiki/Integer-(data-type) Demonstrates the syntax for declaring positive, negative, and infinite integers in nyan. ```nyan positive_number : int = 1 negative_number : int = -5 infinite : int = inf ``` -------------------------------- ### Install Texture Assets Source: https://github.com/sfttech/openage/blob/master/assets/test/textures/CMakeLists.txt Installs files from the current directory to a specified asset destination, excluding CMakeLists.txt itself. ```cmake install(DIRECTORY "." DESTINATION "${ASSET_DIR}/test/textures" PATTERN "CMakeLists.txt" EXCLUDE ) ``` -------------------------------- ### Flare Example Source: https://github.com/sfttech/openage/blob/master/doc/reverse_engineering/networking/13-other.md An example byte sequence for launching a flare, indicating coordinates, player who launched it, and which players receive the flare. ```plaintext 73 00 00 00 ff ff ff ff 00 01 01 01 00 00 00 00 00 00 00 00 00 00 c7 42 00 80 33 43 03 04 00 00 ``` -------------------------------- ### Install Fedora Build Dependencies Source: https://github.com/sfttech/openage/blob/master/doc/build_instructions/fedora.md Installs required development packages for building openage on Fedora 34+ using dnf. ```bash sudo dnf install clang cmake eigen3-devel fontconfig-devel gcc-c harfbuzz-devel libepoxy-devel libogg-devel libopusenc-devel libpng-devel opusfile-devel python3-Cython python3-devel python3-mako python3-numpy python3-lz4 python3-pillow python3-pygments python3-toml toml11-devel qt6-qtdeclarative-devel qt6-qtmultimedia-devel ``` -------------------------------- ### Follow Action Example Source: https://github.com/sfttech/openage/blob/master/doc/reverse_engineering/networking/09-formation.md Example byte sequence for a Follow action. Identifies the action, number of selected units, zero bytes, the ID of the unit to be followed, and the IDs of the units performing the follow. ```plaintext 14 02 00 00 40 18 00 00 44 18 00 00 42 18 00 00 ``` -------------------------------- ### Start Node Definition Source: https://github.com/sfttech/openage/blob/master/doc/nyan/api_reference/reference_util.md Defines a Start node, which initiates an activity graph and points to the next node. It does not perform any actions itself. ```python Start(Node): next : Node ``` -------------------------------- ### Install Vulkan Support with vcpkg Source: https://github.com/sfttech/openage/blob/master/doc/build_instructions/windows_msvc.md Installs the Vulkan development libraries using vcpkg, required for Vulkan graphics support in openage. This is an optional step. ```powershell vcpkg install vulkan ``` -------------------------------- ### Ungarrison Action Example: Ungarrisoning with CTRL+SHIFT Source: https://github.com/sfttech/openage/blob/master/doc/reverse_engineering/networking/08-movement.md Example byte sequence for ungarrisoning units using the 'CTRL + SHIFT' hotkey combination. ```plaintext 6f 01 00 00 00 00 80 bf 00 00 80 bf 06 00 00 00 5a 1a 00 00 4b 17 00 00 ``` -------------------------------- ### Attacking Building Example Source: https://github.com/sfttech/openage/blob/master/doc/reverse_engineering/networking/07-primary_action.md Example of a primary action for attacking a building. The selection_count is 2, indicating two selected units. ```plaintext 00 02 00 00 38 1a 00 00 02 00 00 00 00 00 40 42 00 00 0b 43 5e 1a 00 00 62 1a 00 00 ``` -------------------------------- ### Install Core Dependencies on Arch Linux Source: https://github.com/sfttech/openage/blob/master/doc/build_instructions/arch_linux.md Installs essential packages for openage from the Arch Linux repositories using pacman. Ensure you have the necessary permissions to run sudo commands. ```bash sudo pacman -S --needed eigen python python-mako python-pillow python-numpy python-lz4 python-pygments cython libepoxy libogg libpng ttf-dejavu freetype2 fontconfig harfbuzz cmake opusfile opus python-pylint python-toml qt6-declarative qt6-multimedia ``` -------------------------------- ### Waypoint Action Example (Single) Source: https://github.com/sfttech/openage/blob/master/doc/reverse_engineering/networking/08-movement.md Example packet data for setting a single waypoint for a unit. Includes player ID, coordinates, and unit ID. ```plaintext 10 01 01 34 16 a0 06 00 00 ``` -------------------------------- ### Python Demo Function Example Source: https://github.com/sfttech/openage/blob/master/doc/code/testing.md Example of a Python demo function that accepts command-line arguments via argv. Demos are run manually and are useful for developing new features. ```python def prime_demo(argv): import argparse cli = argparse.ArgumentParser() cli.add_argument('max_number', type=int) args = cli.parse_args(argv) for p in range(2, args.max_number): if is_prime(p): print(p) ``` -------------------------------- ### Move Action Example (with Selected IDs) Source: https://github.com/sfttech/openage/blob/master/doc/reverse_engineering/networking/08-movement.md Example packet data for a movement command including selected unit IDs. Specifies player, coordinates, and unit IDs. ```plaintext 03 02 00 00 ff ff ff ff 02 00 00 00 00 40 22 43 ab aa 51 43 62 1a 00 00 5e 1a 00 00 ``` -------------------------------- ### Basic Build and Run Commands Source: https://github.com/sfttech/openage/blob/master/doc/building.md Standard commands for building the project with 'make' and running the game. The 'run' target launches the game, and '--help' provides command-line options. ```bash make make run bin/run --help ``` -------------------------------- ### Install vcpkg Packages Source: https://github.com/sfttech/openage/blob/master/doc/build_instructions/windows_msvc.md Installs core C++ libraries using the vcpkg package manager. These are necessary for openage functionality. Ensure vcpkg is set up in your environment. ```powershell vcpkg install dirent eigen3 fontconfig freetype harfbuzz libepoxy libogg libpng opus opusfile qtbase qtdeclarative qtmultimedia toml11 ``` -------------------------------- ### PlayerSetup Class Definition Source: https://github.com/sfttech/openage/blob/master/doc/nyan/api_reference/reference_util.md Defines the pre-configured settings for a player in a game, including name, descriptions, leader names, modifiers, starting resources, and game setup patches. ```python PlayerSetup(Object): name : TranslatedString description : TranslatedMarkupFile long_description : TranslatedMarkupFile leader_names : set(TranslatedString) modifiers : set(Modifier) starting_resources : set(ResourceAmount) game_setup : orderedset(Patch) ``` -------------------------------- ### Run Renderer Demo 1 Source: https://github.com/sfttech/openage/blob/master/doc/code/renderer/demos.md Launches the second renderer demo, focusing on creating and rendering simple textured meshes. It also demonstrates interaction with the window and renderer via callbacks. ```bash cd bin && ./run test --demo renderer.tests.renderer_demo 1 ``` -------------------------------- ### Build and Run openage Source: https://github.com/sfttech/openage/blob/master/doc/running.md Build the project using configure and make, then execute the main run script. This defaults to the game mode. ```bash ./configure make bin/run ``` -------------------------------- ### Buy Market Action Example Source: https://github.com/sfttech/openage/blob/master/doc/reverse_engineering/networking/12-market.md An example byte sequence representing a 'Buy' market action. This includes the action identifier, player number, resource type, amount, and market ID. ```plaintext 7b 01 01 05 46 1a 00 00 ``` -------------------------------- ### Launch openage Game Source: https://github.com/sfttech/openage/blob/master/doc/build_instructions/macos.md Starts the openage game. Provides an option to view help for further instructions. ```bash make run cd bin && ./run ``` -------------------------------- ### Run Renderer Demo 7 Source: https://github.com/sfttech/openage/blob/master/doc/code/renderer/demos.md Launches the eighth renderer demo, demonstrating the use of shader templating in the renderer. ```bash cd bin && ./run test --demo renderer.tests.renderer_demo 7 ``` -------------------------------- ### Openage Blendmask Format Examples Source: https://github.com/sfttech/openage/blob/master/doc/media/openage/blendmask_format_spec.md Provides examples of how to define blendmasks in Openage. The first example uses a decimal value for directions, while the second uses a binary literal. ```plaintext mask 131 0 0 ``` ```plaintext mask 0b00101010 0 0 ``` -------------------------------- ### Stance Action Example Source: https://github.com/sfttech/openage/blob/master/doc/reverse_engineering/networking/09-formation.md Example byte sequence for a Stance action. Identifies the action, number of selected units, the stance (Defensive), and the ID of the selected unit. ```plaintext 12 01 02 4b 15 00 00 ``` -------------------------------- ### AI Training Unit Byte Representation Example Source: https://github.com/sfttech/openage/blob/master/doc/reverse_engineering/networking/14-ai.md Shows a concrete byte sequence for the AI training unit. This example illustrates the expected format for sending training commands. ```plaintext 64 00 00 00 ae 1a 00 00 03 00 27 00 ff ff ff ff ``` -------------------------------- ### Run Renderer Demo 5 Source: https://github.com/sfttech/openage/blob/master/doc/code/renderer/demos.md Starts the sixth renderer demo, demonstrating the creation and usage of uniform buffers to pass data to shaders. It also shows uniform buffer usage for the camera system. ```bash cd bin && ./run test --demo renderer.tests.renderer_demo 5 ``` -------------------------------- ### Install Clang Compiler on Arch Linux Source: https://github.com/sfttech/openage/blob/master/doc/build_instructions/arch_linux.md Installs the Clang compiler, an alternative to GCC, for building software from source on Arch Linux. This command uses pacman and requires sudo privileges. ```bash sudo pacman -S --needed clang ``` -------------------------------- ### Float Syntax Examples Source: https://github.com/sfttech/openage/wiki/Float-(data-type) Demonstrates the syntax for declaring positive, negative, and infinite float values in nyan. ```nyan positive_float : float = 2.05 negative_float : float = -15.234 infinite_float : float = inf ``` -------------------------------- ### Launch Qt Creator in English on Linux Source: https://github.com/sfttech/openage/blob/master/doc/ide/qt_creator.md Use this command to launch Qt Creator with English language settings on a Linux system. ```bash $ LANGUAGE=C qtcreator ``` -------------------------------- ### Sell Market Action Example Source: https://github.com/sfttech/openage/blob/master/doc/reverse_engineering/networking/12-market.md An example byte sequence representing a 'Sell' market action. This includes the action identifier, player number, resource type, amount, and market ID. ```plaintext 7a 01 02 01 46 1a 00 00 ``` -------------------------------- ### Install Openage Dependencies on Ubuntu (23.04+) Source: https://github.com/sfttech/openage/blob/master/doc/build_instructions/ubuntu.md Installs essential development packages required for building openage on Ubuntu 23.04 and newer versions. Ensure your package list is up-to-date before running. ```bash sudo apt-get update sudo apt-get install g++ cmake cython3 libeigen3-dev libepoxy-dev libfontconfig1-dev libfreetype-dev libharfbuzz-dev libogg-dev libopus-dev libopusfile-dev libpng-dev libtoml11-dev python3-dev python3-mako python3-numpy python3-lz4 python3-pil python3-pip python3-pygments python3-toml qml6-module-qtquick-controls qt6-declarative-dev qt6-multimedia-dev qml6-module-qtquick3d-spatialaudio ``` -------------------------------- ### Install toml11 from AUR using yay Source: https://github.com/sfttech/openage/blob/master/doc/build_instructions/arch_linux.md Installs the toml11 package, a required dependency, from the Arch User Repository (AUR) using the yay helper. This command assumes yay is installed and configured. ```bash yay -S toml11 ``` -------------------------------- ### Run Renderer Demo 0 Source: https://github.com/sfttech/openage/blob/master/doc/code/renderer/demos.md Executes the first renderer demo, which illustrates a minimal renderer setup and the rendering of a simple mesh. This demo follows basic usage steps for the renderer API. ```bash cd bin && ./run test --demo renderer.tests.renderer_demo 0 ``` -------------------------------- ### Dict Initialization Example Source: https://github.com/sfttech/openage/wiki/Dict-(data-type) Illustrates how to initialize a dictionary within a class definition, specifying key and value types. ```Nyan Unit(): cost : dict(Resource, int) Archer(Unit): cost = {Wood: 20, Gold: 45} ``` -------------------------------- ### Clone and Set Up Forked Repository Source: https://github.com/sfttech/openage/blob/master/doc/contributing.md Steps to clone your forked repository and add the upstream remote for tracking the main project. ```bash git clone git@github.com:YourAccount/openage.git cd openage git remote add upstream https://github.com/SFTtech/openage.git ``` -------------------------------- ### Run Docker Container with Wayland Support Source: https://github.com/sfttech/openage/blob/master/doc/build_instructions/docker.md Start the Docker container and configure it to use the Wayland display server. This involves setting specific environment variables and mounting the Wayland socket. ```bash docker run -it \ -e XDG_RUNTIME_DIR=/tmp \ -e QT_QPA_PLATFORM=wayland \ -e WAYLAND_DISPLAY=$WAYLAND_DISPLAY \ -v $XDG_RUNTIME_DIR/$WAYLAND_DISPLAY:/tmp/$WAYLAND_DISPLAY \ --user=$(id -u):$(id -g) \ --network host openage ``` -------------------------------- ### Run Renderer Demo 2 Source: https://github.com/sfttech/openage/blob/master/doc/code/renderer/demos.md Starts the third renderer demo, which explains parsing animation and texture metadata files for loading and rendering correct textures and animations for a mesh. It includes controls for navigating animation frames. ```bash cd bin && ./run test --demo renderer.tests.renderer_demo 2 ``` -------------------------------- ### Resign/Disconnect Example Data Source: https://github.com/sfttech/openage/blob/master/doc/reverse_engineering/networking/13-other.md An example byte sequence representing a player resignation or disconnection action. ```plaintext 0b 02 03 00 ``` -------------------------------- ### Configure Release Build Source: https://github.com/sfttech/openage/blob/master/doc/building.md Sets the build mode to release and specifies the compiler. Installs the game to a specified prefix. ```bash ./configure --mode=release --compiler=clang --prefix=/usr/local ``` -------------------------------- ### Build openage from Source Source: https://github.com/sfttech/openage/blob/master/README.md Build the project from source after cloning the repository and installing dependencies. This command downloads necessary assets. ```bash ./configure --download-nyan make ``` -------------------------------- ### Build and Run openage Immediately with Nix Source: https://github.com/sfttech/openage/blob/master/doc/build_instructions/nix.md This command builds the openage project and runs it immediately, avoiding the need to manually execute the built artifact from the './result' directory. ```bash nix run .#openage ``` -------------------------------- ### Run Docker Container with X11 Support Source: https://github.com/sfttech/openage/blob/master/doc/build_instructions/docker.md Start the Docker container and configure it to use the X11 display server. This includes setting environment variables and mounting necessary volumes for GUI applications. ```bash docker run -it \ -e DISPLAY=$DISPLAY \ -v /tmp/.X11-unix:/tmp/.X11-unix \ -v $HOME/.Xauthority:/root/.Xauthority \ --network host openage ``` -------------------------------- ### Research Action Example Source: https://github.com/sfttech/openage/blob/master/doc/reverse_engineering/networking/11-buildings.md Example byte sequence for a research action packet. Corresponds to the Research definition. ```plaintext 65 00 00 00 63 1a 00 00 01 00 d9 00 ff ff ff ff ``` -------------------------------- ### Run openage in game mode Source: https://github.com/sfttech/openage/blob/master/doc/running.md Starts the engine and immediately creates a new game instance. This is the default mode if no other mode is specified. ```bash bin/run game ``` -------------------------------- ### Example Header Bytes Source: https://github.com/sfttech/openage/blob/master/doc/reverse_engineering/networking/02-header.md An example of a raw protocol header represented in hexadecimal bytes, with a breakdown of each field. ```plaintext 82 b2 45 00 00 00 00 00 53 02 8f 0b 30 00 00 00 01 08 00 00 >82 b2 45 00 — network_source_id >00 00 00 00 — network_dest_id >53 — command >02 — option1 >8f — option2 >0b — option3 >30 00 00 00 — communication_turn >01 08 00 00 — individual_counter ``` -------------------------------- ### Build openage using Nix Source: https://github.com/sfttech/openage/blob/master/doc/build_instructions/nix.md Use this command to build the openage project with Nix. The built artifact will be available in the './result' directory. ```bash nix build .#openage ``` -------------------------------- ### Run Renderer Demo 3 Source: https://github.com/sfttech/openage/blob/master/doc/code/renderer/demos.md Executes the fourth renderer demo, introducing a minimal setup for the Level 2 Renderer and demonstrating object rendering. It also covers the camera system and its interaction. ```bash cd bin && ./run test --demo renderer.tests.renderer_demo 3 ``` -------------------------------- ### Start Node Source: https://github.com/sfttech/openage/blob/master/doc/nyan/api_reference/reference_util.md Represents the starting point of an activity graph. This node initiates an activity and directs flow to the next node. ```APIDOC ## util.activity.node.type.Start ```python Start(Node): next : Node ``` Start of an activity. Does nothing but pointing to the next node. **next** Next node in the activity graph. ``` -------------------------------- ### Add SFT Overlay with Layman Source: https://github.com/sfttech/openage/blob/master/doc/build_instructions/gentoo.md Add the SFT overlay to your Gentoo system using the layman tool for access to up-to-date builds. ```shell layman -a sft ``` -------------------------------- ### Set CPack Package Install Directory Source: https://github.com/sfttech/openage/blob/master/packaging/CMakeLists.txt Defines the top-level directory name for the installed package. Uses the project name variable. ```cmake set(CPACK_PACKAGE_INSTALL_DIRECTORY "${PROJECT_NAME}") ``` -------------------------------- ### Install Windows Dependency Embedding Script Source: https://github.com/sfttech/openage/blob/master/packaging/CMakeLists.txt Installs a script to embed Windows dependencies. This ensures that required DLLs are included with the application. ```cmake install(SCRIPT "${BUILDSYSTEM_DIR}/scripts/EmbedWinDependencies.cmake") ``` -------------------------------- ### Drop Relic Example Source: https://github.com/sfttech/openage/blob/master/doc/reverse_engineering/networking/08-movement.md Example byte sequence for dropping a relic, showing the action identifier, unused bytes, and monk ID. ```plaintext 7e 00 00 00 17 1b 00 00 ``` -------------------------------- ### Resource Pricing Example Source: https://github.com/sfttech/openage/blob/master/doc/reverse_engineering/game_mechanics/market.md Illustrates the relationship between base price, selling price, and buying price for resources, showing a price change scenario. ```plaintext sell price = 70 base price = 100 buy price = 130 Every time any player sells 100 resources of any kind, the base price of this resource decrements by 3. Buying a resource increments the base price by 3. sell price = 70 ---> sell price = 68 base price = 100 ---> base price = 97 buy price = 130 ---> buy price = 127 The lowest the base price can go is 20, while the highest base price is 9999. sell price = 70 ---> sell price = 68 ---> ... ---> sell price = 14 base price = 100 ---> base price = 97 ---> ... ---> base price = 20 buy price = 130 ---> buy price = 127 ---> ... ---> buy price = 26 ``` -------------------------------- ### Run openage in main mode Source: https://github.com/sfttech/openage/blob/master/doc/running.md Intended to start a main menu or launcher for configuring a game. Currently, it functions identically to the 'game' mode. ```bash bin/run main ``` -------------------------------- ### Ungarrison Action Example: Unloading Transport Ship Source: https://github.com/sfttech/openage/blob/master/doc/reverse_engineering/networking/08-movement.md Example byte sequence for unloading a transport ship using the 'Ungarrison' action. ```plaintext 6f 01 00 00 00 c0 c7 41 55 4d 3f 43 00 00 00 00 ff ff ff ff 4c 1a 00 00 ``` -------------------------------- ### Gathering Stone Example Source: https://github.com/sfttech/openage/blob/master/doc/reverse_engineering/networking/07-primary_action.md Example of a primary action for gathering stone with a villager. The selection_count is 1, indicating a single selected unit. ```plaintext 00 02 00 00 92 17 00 00 01 00 00 00 00 80 33 43 00 80 16 43 4d 17 00 00 ``` -------------------------------- ### Execute openage Application Source: https://github.com/sfttech/openage/blob/master/doc/build_instructions/windows_msvc.md Run the openage executable after the initial build. ```bash run.exe ``` -------------------------------- ### Delete Action Example Source: https://github.com/sfttech/openage/blob/master/doc/reverse_engineering/networking/08-movement.md Example packet data for the Delete action, specifying the object ID and player number of the unit or building to be removed. ```plaintext 6a 00 00 00 9f 06 00 00 02 00 00 00 ``` -------------------------------- ### Compiling and Importing Cython Modules Source: https://github.com/sfttech/openage/blob/master/doc/code/pyinterface.md Demonstrates the command-line steps to compile a Cython (.pyx) file into a C++ file, then compile the C++ file into a Python extension module, and finally import and use it in Python. ```bash $ cython --cplus -3 test.pyx $ g++ -shared -fPIC $(python3-config --includes) test.cpp -o test.so $ python3 >>> import test >>> test.foo() ``` -------------------------------- ### Example Chat Message Packet Source: https://github.com/sfttech/openage/blob/master/doc/reverse_engineering/networking/05-chat_protocol.md An example of a raw chat message packet, showing the byte-level representation of the fields defined in the ChatMessage structure. ```text 0000 02 00 4e 59 59 4e 4e 4e 4e 4e 32 00 09 00 00 00 0010 00 61 62 63 64 65 66 67 68 69 00 00 18 dc 32 ``` -------------------------------- ### SMP Pixel Example Data Source: https://github.com/sfttech/openage/blob/master/doc/media/smp-files.md Example of raw SMP pixel data, where the two latter bytes are relevant for damage modifier calculation. ```plaintext 0x90 0x56 0x30 0x33 ``` -------------------------------- ### Run openage in Devmode Source: https://github.com/sfttech/openage/blob/master/doc/build_instructions/windows_msvc.md Open a CMD window in the build directory and run the openage main module. ```bash python -m openage main ``` -------------------------------- ### Blendmask Texture Attribute Examples Source: https://github.com/sfttech/openage/blob/master/doc/media/openage/blendmask_format_spec.md Defines texture resources to be loaded by the renderer. Multiple examples show different path referencing methods. ```plaintext texture 0 "grass.texture" texture 1 "../../grass.texture" texture 2 "/{aoe2_base}/graphics/grass.texture" ``` -------------------------------- ### Create Window Source: https://github.com/sfttech/openage/blob/master/doc/code/renderer/level1.md Creates a renderer window. The static method `Window::create()` automatically determines the appropriate backend (OpenGL or Vulkan). ```c++ std::shared_ptr window = Window::create("title", 1024, 768); ``` -------------------------------- ### Python Doctest Example Source: https://github.com/sfttech/openage/blob/master/doc/code/testing.md Example of a Python function with embedded doctests. Doctests are lightweight, serve as documentation, and are run when the module is registered in openage/testing/testlist.py. ```python def is_prime(p): """ High-performance, state-of-the-art primality tester. >>> is_prime(23) True >>> is_prime(42) False """ return not any(p % x == 0 for x in range(2, p)) ``` -------------------------------- ### Importing Namespaces with Aliases Source: https://github.com/sfttech/openage/wiki/Namespaces This example shows how to use the 'import ... as ...' syntax to create an alias for a namespace, shortening the fully qualified object name when referencing objects from other mods. ```nyan # filename: ageofempires2/units/spearman.nyan Spearman(): hp = 40 speed = 2.0 ... ``` ```nyan import ageofempires2.units.spearman as basegame # 'basegame' is an alias for namespace 'ageofempires2.units.spearman' SuperSpearman(basegame.Spearman): hp += 20 speed += 0.5 ... ``` -------------------------------- ### Waypoint Action Example (Consecutive) Source: https://github.com/sfttech/openage/blob/master/doc/reverse_engineering/networking/08-movement.md Example packet data for setting consecutive waypoints, where selection count is 0xFF, indicating previous unit references. ```plaintext 10 01 ff 31 17 ``` -------------------------------- ### Move Action Example (Consecutive) Source: https://github.com/sfttech/openage/blob/master/doc/reverse_engineering/networking/08-movement.md Example packet data for a consecutive movement command, where selection count is 0xFF, indicating previous unit references. ```plaintext 03 02 00 00 ff ff ff ff ff 00 00 00 00 00 78 27 43 55 cd 39 43 ``` -------------------------------- ### Sprite Dimensions and Command Array Example Source: https://github.com/sfttech/openage/blob/master/doc/media/sld-files.md Illustrates the dimensions of a sprite and the initial state of its command array in hexadecimal format. ```text Width: 32px Height: 12px Command Array Length (Hex): 03 00 Command Array (Hex): 03 01 07 04 05 04 ``` -------------------------------- ### PrimaryActionAI Example Data Source: https://github.com/sfttech/openage/blob/master/doc/reverse_engineering/networking/14-ai.md An example byte string representing a PrimaryActionAI interaction, showing the breakdown of fields like action_identifier, target_id, coordinates, and selected_id. ```plaintext 02 00 00 00 21 1f 00 00 01 00 00 00 00 80 36 43 00 80 0f 43 72 1e 00 00 ``` -------------------------------- ### CMakeLists.txt for pxdgen Integration Source: https://github.com/sfttech/openage/blob/master/doc/code/pyinterface.md CMake configuration to enable the 'pxdgen' helper for processing pxd-annotated header files. ```cmake pxdgen(example.h) ``` -------------------------------- ### Boarding Transport Ship Example Source: https://github.com/sfttech/openage/blob/master/doc/reverse_engineering/networking/07-primary_action.md Example of a primary action for boarding a transport ship. The selection_count is FF, indicating units referenced in the previous command. ```plaintext 00 02 00 00 57 1a 00 00 ff 00 00 00 7a 7c 47 43 52 da 38 43 ``` -------------------------------- ### Get a Development Shell with Nix Source: https://github.com/sfttech/openage/blob/master/doc/build_instructions/nix.md This command provides a development shell with all the necessary dependencies for building and developing openage. You can then run build phases like 'configurePhase' and 'buildPhase' within this shell. ```bash nix shell ```