Board Bibles V1 retrieves scripture dynamically from the publicDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/ASTRA228b/BoardBiblesV1/llms.txt
Use this file to discover all available pages before exploring further.
bible-api.com REST API at runtime. When the network is unavailable or the API returns an unexpected response, the mod falls back to a curated list of 20 hardcoded verses without interrupting gameplay. This page documents the fetch logic, the response model, every failure path, and the complete offline verse list.
How the API request is built
PickVerse() starts the APIPuller coroutine. The coroutine selects a book, chapter, and verse at random, then constructs a URL from those values:
| Parameter | Pool |
|---|---|
| Book | One of 8 books (index 0–7) |
| Chapter | 1–19 (inclusive) |
| Verse | 1–29 (inclusive) |
UnityWebRequest.EscapeURL percent-encodes the reference string so spaces and colons are safely transmitted — for example, john 3:16 becomes john%203%3A16 in the final URL.
Not every book/chapter/verse combination exists in the Bible. When the API receives a reference that does not resolve to a real verse, it returns an HTTP error, which triggers the offline fallback automatically.
Request settings and response model
The request is issued with an 8-second timeout:ApiBibleRes using JsonUtility.FromJson:
reference and text fields with -, and ApplyTexts() then uppercases the whole string before writing it to the bulletin board. For example:
Failure handling
The coroutine checks for every failure mode before attempting to deserialise the response. Each failure path callsUseLocal() and exits the coroutine with yield break:
ConnectionError / DataProcessingError
ConnectionError / DataProcessingError
Triggered when the device cannot reach the server — no network, DNS failure, or a transport-layer problem. The mod logs a warning and switches to offline mode immediately.
ProtocolError (HTTP error)
ProtocolError (HTTP error)
Triggered when the server returns a 4xx or 5xx status code — for example, a 404 when the requested verse reference does not exist in the API database.
Empty response body
Empty response body
If the download handler returns a null or empty string despite a 200 status, the mod treats that as a failure.
JSON parse failure
JSON parse failure
If
JsonUtility.FromJson throws an exception, or if the deserialised object is null or has an empty text field, the mod falls back to offline mode.Offline fallback
UseLocal() picks a verse at random from the hardcoded verses array, appends \n\n(offline mode) so players know the live API was not reached, then resets the rotation timer and clears the loading flag:
The offline list includes verses from books outside the 8 sampled by the API (Philippians, Jeremiah, Joshua, 1 Peter, 2 Timothy, Colossians, Galatians). This gives a broader range of scripture in offline mode.
Full fetch flow summary
Build random reference
A book, chapter, and verse are chosen at random. The reference string is URL-encoded and appended to the
bible-api.com base URL.Send request (8-second timeout)
UnityWebRequest.Get sends the request. The coroutine yields until the response arrives or the timeout expires.Check for errors
Connection errors, HTTP errors, empty bodies, and JSON parse failures each call
UseLocal() and exit.