Query String


Object Preview
Live API Fetch Example
Click to connect to server...
*Interactive preview: Click the box to simulate a live fetch.
Dynamic Data Object

The Query String object is your direct pipeline to the web. It allows your Custom Launcher to communicate with remote URLs, APIs, and web servers, fetching live text data and displaying it directly inside your interface.

Whether you need to display a live player count, a daily message, the latest patch version, or server status details, the Query String object handles the network request and presents the result seamlessly. It seamlessly integrates into your Custom Game Launcher logic, triggering events the moment your data arrives or fails.

Query String Overview

At its core, the Query String object acts as both a network fetcher and a text display. It holds temporary "Loading" text while the request is processing, displays the downloaded content upon success, or shows an "Error" message if the connection drops. You can configure it to fetch automatically when the page loads or trigger it manually using actions.

Typical Uses

  • Fetching live server player counts
  • Displaying a remote Message of the Day
  • Checking the latest available game version
  • Sending form data (POST) to a web webhook

Default Settings

When you drag a Query String onto your canvas, it starts with a minimal footprint designed for easy styling.

Property Default Value
Dimensions Width: 300, Height: 40
HTTP Method GET
Loading Text Loading data…
Error Text Failed to load data.
Background & Text Color BG: #222222, Text: #E0E0E0

Properties

You can configure exactly how the Query String behaves and looks using the properties panel.

Request

  • Query URL: The endpoint to fetch data from. Variables are allowed here (e.g., https://api.example.com/status?user={{username}}).
  • HTTP Method: Choose GET to request data or POST to send form data.
  • Auto Start: If checked, the object will immediately send the request as soon as the launcher page loads.

Key-Value Pairs

If you need to send specific data parameters along with your request, you can define them here. If your method is POST, these pairs are sent in the body. If your method is GET, they are automatically appended to the URL as query parameters.

Display and Typography

  • Colors & Alpha: Fine-tune the text color, background color, and background transparency.
  • Text Align: Align the loaded text to the Left, Center, or Right.
  • Font Settings: Choose your font family, size in pixels, thickness (weight), and toggle Italic or Underline.
  • Border Settings: Define the border color, thickness, and corner radius to match your UI.

Events

The Query String object emits events based on the success or failure of its network request. These are crucial for building responsive logic.

Event Description
onQueryFinished Fires immediately when the query completes and the remote text data is successfully loaded and displayed.
onQueryError Fires if the query fails due to a network outage, bad URL format, or a server-side error.

Actions

You can control the Query String object remotely using specific actions, allowing you to trigger network calls precisely when needed.

Action How it works
GET Query Forces the specified Query String object to execute its HTTP request and process the response immediately.

Additionally, standard visual actions like Show Objects, Hide Objects, Move Object, and Resize Object are fully supported, allowing you to slide the data into view only after it has loaded.

Building Logic with the Query String

Example 1: Safe MOTD Reveal

Only display the Message of the Day (MOTD) block if the remote server is actually online and responsive.

  1. Place a Query String object on your page and configure its URL to your remote MOTD text file.
  2. Check the box for Auto Start and set it to be Hidden at Start.
  3. Select the Query String object and assign an action to the onQueryFinished event.
  4. Set the action to Show Objects and target the Query String itself. The text will remain invisible until the download completes successfully!

Example 2: Manual Refresh Button

Allow users to ping your server and update the player count without restarting the launcher.

  1. Add a Query String object and leave Auto Start unchecked. Let the Loading Text say "Click refresh to ping...".
  2. Add a standard Button object nearby, labeled "Refresh Ping".
  3. On the Button's onClick event, add the GET Query action.
  4. Target your Query String object. Now, every time the button is clicked, the object will hit your server and update its text live.

Custom CSS Example

If you are using the Developer Edition, you can apply Custom CSS to make the fetched data stand out with advanced visual effects like inner glows and text shadows.

Important Notice

When writing Custom CSS, always use !important to guarantee your overrides take priority. Avoid setting structural properties (like width, height, position) as the engine manages these dynamically.

Custom CSS Glow Preview
Status: Systems Nominal

Pro Tip

Hover over the preview above to see the enhanced, pulsing text and border glow applied by the CSS snippet below!

css

/* Developer Edition Custom CSS Example for Query String */
/* Applies a futuristic inner box glow and text shadow */
box-shadow: inset 0 0 10px rgba(59, 130, 246, 0.2) !important;
text-shadow: 0 0 8px rgba(96, 165, 250, 0.6) !important;
border-radius: 8px !important;
transition: box-shadow 0.3s ease, text-shadow 0.3s ease !important;
:hover {
 box-shadow: inset 0 0 20px rgba(59, 130, 246, 0.4) !important;
 text-shadow: 0 0 12px rgba(96, 165, 250, 1) !important;
}

Summary

The Query String object turns a static interface into a living, breathing application. By linking your Custom Game Launcher to external APIs or remote text files, you can keep your community informed with live server data, instant patch notifications, and dynamic messaging, all handled effortlessly through robust network actions and events.