{"id":30441721,"url":"https://github.com/outpostuniverse/tethysapi","last_synced_at":"2025-08-23T07:11:05.164Z","repository":{"id":102063785,"uuid":"338695590","full_name":"OutpostUniverse/TethysAPI","owner":"OutpostUniverse","description":"Modern Outpost 2 SDK for developing missions and mods","archived":false,"fork":false,"pushed_at":"2025-04-27T05:48:32.000Z","size":478,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-27T06:29:50.257Z","etag":null,"topics":["game-development","outpost-2"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/OutpostUniverse.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2021-02-14T00:01:33.000Z","updated_at":"2025-04-27T05:48:36.000Z","dependencies_parsed_at":null,"dependency_job_id":"5bf86664-5e93-4920-8b28-13a97266ceb4","html_url":"https://github.com/OutpostUniverse/TethysAPI","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/OutpostUniverse/TethysAPI","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OutpostUniverse%2FTethysAPI","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OutpostUniverse%2FTethysAPI/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OutpostUniverse%2FTethysAPI/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OutpostUniverse%2FTethysAPI/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/OutpostUniverse","download_url":"https://codeload.github.com/OutpostUniverse/TethysAPI/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OutpostUniverse%2FTethysAPI/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271745788,"owners_count":24813527,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-23T02:00:09.327Z","response_time":69,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["game-development","outpost-2"],"created_at":"2025-08-23T07:11:00.149Z","updated_at":"2025-08-23T07:11:05.152Z","avatar_url":"https://github.com/OutpostUniverse.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# TethysAPI\n\nTethysAPI is a C++17 library providing access to Outpost 2's public API as well as its internal functions and data, which can be used to create custom missions and mods for the game.\n\nTethysAPI is purely header-only, and does not require linking against any libs to function.\n\nCompared to Outpost2DLL, the public API exposed in TethysAPI has been changed to be more modern and tidier, and with better const-correctness in order to properly support MSVC in C++20 mode. TethysAPI essentially supercedes the Outpost2DLL, HFL/OP2Types, and OP2Internal libraries, although it should not be considered a drop-in replacement for them due to interface changes. TethysAPI can be used alongside these legacy libraries, which is helpful when transitioning an existing project to it.\n\n# Requirements\n\n* Outpost 2 v1.2.7 or newer\n* C++17\n\n# Usage\n\n**ATTENTION: TethysAPI is a work in progress. You should expect breaking major interface changes between releases prior to 1.0.**\n\nTethysAPI is intended to be added as a Git submodule to projects. It must reside in a subdirectory called `Tethys` (not \"TethysAPI\"!)\n\nThe public mission API headers are located under the `API` directory. For your convenience, you may use `#include \"Tethys/API/API.h\"` to include all public API headers, but you are also free to include individual headers. `Tethys/API/Mission.h` documents how to interface a mission with the game.\n\nHeaders containing internals, non-exported enums, or non-mission public APIs are located under the other directories:\n* `Game` contains internal gameplay interfaces.\n* `Network` contains internal networking interfaces.\n* `Resource` contains resource management and graphics rendering interfaces.\n* `UI` contains graphical user interface and related interfaces.\n\nThe public mission APIs are within the `TethysAPI` namespace, while everything else is within the `Tethys` namespace. You may wish to do `using namespace TethysAPI` and/or `using namespace Tethys`.\n\n# Change log\n\n## Version 0.8.2\n* Change `Create*Trigger()` functions to take `triggerFunction` as a `std::string_view` instead of a `const char*`. This is a backwards-compatible interface change.\n* Rename `OnProcessCommandArgs` to `OnGameCommandArgs`\n* Add `Unit::GetMapObject()` template overloads that take a `MapID` as a template arg\n* Add `TethysUtil::AutoDestroy\u003c\u003e` template class\n* Rename `TethysUtil::Span::Data()`, `Length()`, and `IsEmpty()` to `data(`), `length()`, and `empty()` in preparation to switch to C++20 std::span eventually\n* Fix `IDirectDraw` forward declaration in `TApp.h`\n* Add some member function definitions to `ScriptDataBlock` and `FuncReference`\n* Define vtbl info for `TriggerImpl` and `VictoryConditionImpl`\n* Add post-increment operators for unit iterator types\n* Remove decrement operator for `GroupIterator`\n* Remove `Location` operator+/- overload for scalar integers\n\n\n## Version 0.8.1\n* Rework Enumerator interfaces to more closely match `std::iterator` semantics.\n* Remove `GroupEnumerator`; replace with `ScGroup::begin()` and `end()`.\n* Rename `OnLoadArgs`, `OnUnloadArgs`, `OnEndArgs` to `OnLoadMissionArgs`, `OnUnloadMissionArgs`, and `UnEndMissionArgs` (1.4.2).\n* Add `OnDamageUnitArgs`, `OnSaveGameArgs`, `OnLoadSavedGameArgs` (1.4.2).\n* Add `triggeredBy` and `prevTriggeredBy` fields to `OnTriggerUnitArgs` (1.4.2).\n* Replace `TethysGame::UnsetBlight()` with `GameMap::UnsetBlight()`.\n* Change `GameMap::GetWidth()` to return unpadded width; add `GameMap::GetPaddedWidth()` to return padded width (old `GetWidth()` behavior).\n* Add `GameMap::SetBulldozed()`, `CreateScorchMark()`, `CreateCommonRubble()`, `CreateRareRubble()`.\n* Add `GameMap::CreateLavaFlow*()`, `FreezeLavaFlow*()` (where * can be SW, S, SE).\n* Add `TethysUtil::Span`, an accessor class for array-like data.\n* Change various methods in `API/*.h` headers to take `std::string_view` instead of `const char*`.  Other methods are changed to take `TethysUtil::Span` instead of a pointer and array size.\n* Change `_Player::GetBuildings()`, `GetVehicles()`, `GetBeacons()`, `GetEntities()` to return a `PlayerUnitIterator` instead of a `Unit`.\n* Rename `TethysGame::ForceMorale()` to `ForceMoraleLevel()`.\n* Replace references to `Player[i]` within TethysAPI itself with `_Player::GetInstance(i)`.\n* Add `GameImpl::ProcessUnits()`.\n* Rename `MapObject::ProcessForGameCycle()` and `ProcessTimers()` to `ProcessCommands()` and `ProcessActions()`.\n* Add missing `OP2_MO_GET_INSTANCE_IMPL()` to `Projectile` class.\n* Add `StreamIO::WriteString()`, `ReadString()`, `WriteValue()`, `ReadValue()`, and `StreamIO` vtbl data.\n* Add more constructors to `TethysUtil::Library`.\n* Add `OP2Strdup()`.\n* Rename `OP2Class\u003c\u003e::DestroyVirtual()` dummy to `_DestroyVirtual()`.\n* Add member functions to `TerrainManager`.\n* Add `MapImpl::FindFirstUnitInRange()`, `FindNextUnitInRange()`, `DestroyWall()`.\n* Add `VictoryConditionImpl`.\n* Change `TriggerIml::playerVectorHasFired_` type from `int` to `PlayerBitmask`.\n* Change `RecordedTubeWall::cellType` type from `int` to `CellType`.\n\n## Version 0.8\n* Initial release.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foutpostuniverse%2Ftethysapi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foutpostuniverse%2Ftethysapi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foutpostuniverse%2Ftethysapi/lists"}