X4: Foundations

X4: Foundations

Ikke nok vurderinger
Gate Manage API
   
Utmerkelse
Favoritt
Favoritter
Fjern som favoritt
Filstørrelse
Lagt ut
Oppdatert
59.182 KB
17. okt. kl. 10.27
18. okt. kl. 3.05
3 endringslogger ( vis )

Abonner for å laste ned
Gate Manage API

Beskrivelse
Provides an in‑game API for managing Jump Gates and Accelerators in X4: Foundations. The API supports creating, connecting or disconnecting, and destroying gates and accelerators.

Features
  • Create Jump Gates and Accelerators at specified positions and orientations, with optional ownership assignment.
  • Connect or disconnect existing Jump Gates and Accelerators.
  • Destroy existing Jump Gates and Accelerators.
  • Provides lists of available gate and accelerator macros id's.
  • Asynchronous command processing with callback support.
Installation

You can download the latest version via Steam client - Gate Manager
Or you can do it via the Nexus Mods - Gate Manager[www.nexusmods.com]

Usage

The API is designed to be used by other scripts or mods. It provides a set of functions that can be called to perform various operations related to Jump Gates and Accelerators.


Main principles

In common you need to do only one thing - call the md.Gate_Manage_API.Request cue with a table of arguments. If you need to get the result of the command, you should provide a callback function in the arguments table. The callback function will be called with a result table when the command is completed.

Basic Example

<cue name="..." > <actions> ... <set_value name="$args" exact="table[ $command = 'destroy_gate', $gate = @$gate, $callback = Your_Capture_Results, ]" /> <signal_cue_instantly cue="md.Gate_Manage_API.Request" param="$args" /> ... </actions> </cue> <cue name="Your_Capture_Results" instantiate="true"> <conditions> <event_cue_signalled/> </conditions> <actions> ... <set_value name="$result" exact="@event.param" /> <debug_text text="'Command %s completed with result %s (%s)'.[@$result.$command, @$result.$result, @$result.$info]" chance="100" filter="general" /> ... </actions> </cue>

More details please see in README.md file or on Nexus Mods in description, due to size limitation for descriptions on Steam

Reference

Currently, there is only one mod that uses this API - Gate Manager, from version 1.16 and above:
Credits
Acknowledgements
  • EGOSOFT[www.egosoft.com] - for the game itself (In fact - for the series of games)!
  • Enormous big thank to Forleyor[github.com], for his help with Lua! For make me curious about it and for his patience! Without him I will never touched the Lua and started to make this mod!
  • Thanks to cheapman44 for the discussion on Discord about the gate management which pushed me to make this API.
  • Thanks to all members of the X4 modding channel[discord.com] on Egosoft Discord[discord.com].
Changelog

[1.00] - 2024-10-17
  • Added
    • Initial public version