vsapi

repository·master·Indexed 41 days ago

https://github.com/anegostudios/vsapi

A proprietary API module by Anego Studios designed as a foundation for creating mods for the game Vintage Story. It includes the Vintagestory.API.Config namespace for managing configuration data, runtime environment information via RuntimeEnv and GameVersion, and localization services through Lang and TranslationService.

Tokens
567
Snippets
0
Records
5
Agent score
1%

What's inside vsapi

  1. Understand the licensing and usage terms for vsapi

    master

    The vsapi module is proprietary software owned by Anego Studios. Developers are permitted to read the code, learn from it, and use it as a basis for creating mods for the game Vintage Story.

    Prohibited Actions:

    • You may NOT sell this software in any way, shape, or form.
    • You may NOT distribute this software in its unmodified form.

    If you are unsure about your intended use, contact the Vintage Story Team via the official Forums or Discord Server.

  2. Explore the Vintagestory.API.Config namespace

    master

    The Vintagestory.API.Config namespace contains classes, interfaces, and enums used to access configuration data, runtime environment information, and localization services within the VintageStory API.

    Key components include:

    • Environment & Versioning: RuntimeEnv for runtime information, GameVersion for the current game version, and GamePaths for file system paths.
    • Localization: Lang and TranslationService (and the ITranslationService interface) for handling internationalization and translated strings via JSON files.
    • Constants & Dimensions: GlobalConstants for static values and Dimensions for spatial configuration.
    • Enums: EnumGameBranch, EnumReleaseType, and OS for categorizing game states and operating systems.
  3. Use localization and translation services

    master

    The API provides tools for enabling internationalization (i18n) and accessing translated content:

    • Lang: A utility class that loads language entries from assets/[locale].json files.
    • TranslationService / ITranslationService: A service that provides access to translated strings based on key/value pairs read from JSON files.
  4. Access runtime and game environment information

    master

    To understand the context in which the API is running, use the following classes:

    • RuntimeEnv: Provides information about the current runtime environment.
    • GameVersion: Provides access to the current version of the game. This class also includes the EnumGameBranch and EnumReleaseType enums.
    • GamePaths: Provides access to relevant game-related file paths.
    • OS: An enum representing the operating system.