### GET /documentation/developer-guide/core-systems/ui-system/commands.md Source: https://docs.sparkframework.dev/documentation/developer-guide/core-systems/ui-system/commands.md Queries the documentation dynamically by asking a question. ```APIDOC ## GET /documentation/developer-guide/core-systems/ui-system/commands.md ### Description Perform an HTTP GET request on the current page URL to query the documentation dynamically. ### Method GET ### Query Parameters - **ask** (string) - Required - The immediate question to ask. - **goal** (string) - Optional - Describes the broader end goal to tailor the answer. ``` -------------------------------- ### GET /documentation/developer-guide/core-systems/playables-system/events.md Source: https://docs.sparkframework.dev/documentation/developer-guide/core-systems/playables-system/events.md Query the documentation dynamically using an HTTP GET request. ```APIDOC ## GET /documentation/developer-guide/core-systems/playables-system/events.md ### Description Performs a query against the documentation to retrieve specific information or clarification. ### Method GET ### Endpoint https://docs.sparkframework.dev/documentation/developer-guide/core-systems/playables-system/events.md ### Parameters #### Query Parameters - **ask** (string) - Required - The specific question to ask. - **goal** (string) - Optional - The broader end goal to help tailor the answer. ``` -------------------------------- ### GET /documentation/user-guide/plugins/currency.md Source: https://docs.sparkframework.dev/documentation/user-guide/plugins/currency.md Queries the documentation dynamically by providing a question and an optional goal. ```APIDOC ## GET /documentation/user-guide/plugins/currency.md ### Description Queries the documentation dynamically to retrieve information not explicitly present in the current page. ### Method GET ### Endpoint https://docs.sparkframework.dev/documentation/user-guide/plugins/currency.md ### Parameters #### Query Parameters - **ask** (string) - Required - The immediate question to ask. - **goal** (string) - Optional - The broader end goal to help tailor the answer. ``` -------------------------------- ### GET /documentation/user-guide/plugins/currency/conversions.md Source: https://docs.sparkframework.dev/documentation/user-guide/plugins/currency/conversions.md Queries the documentation dynamically by asking a question related to the content. ```APIDOC ## GET /documentation/user-guide/plugins/currency/conversions.md ### Description Perform a query against the documentation to retrieve information or clarification regarding currency conversions or other topics. ### Method GET ### Endpoint https://docs.sparkframework.dev/documentation/user-guide/plugins/currency/conversions.md ### Parameters #### Query Parameters - **ask** (string) - Required - The immediate question to ask. - **goal** (string) - Optional - The broader end goal to help tailor the answer. ``` -------------------------------- ### GET /documentation/developer-guide/creating-your-first-plugin.md Source: https://docs.sparkframework.dev/documentation/developer-guide/creating-your-first-plugin.md Queries the documentation for specific information by providing a question and an optional goal. ```APIDOC ## GET /documentation/developer-guide/creating-your-first-plugin.md ### Description Queries the documentation dynamically to retrieve answers, relevant excerpts, and sources based on a specific question. ### Method GET ### Endpoint https://docs.sparkframework.dev/documentation/developer-guide/creating-your-first-plugin.md ### Parameters #### Query Parameters - **ask** (string) - Required - The specific, self-contained question to ask. - **goal** (string) - Optional - The broader end goal to help tailor the answer. ``` -------------------------------- ### GET /documentation/user-guide/plugins/items.md Source: https://docs.sparkframework.dev/documentation/user-guide/plugins/items.md Queries the documentation dynamically by asking a question related to the content. ```APIDOC ## GET /documentation/user-guide/plugins/items.md ### Description Perform a query against the documentation to retrieve answers, excerpts, or sources related to the Items plugin or general framework usage. ### Method GET ### Endpoint https://docs.sparkframework.dev/documentation/user-guide/plugins/items.md ### Parameters #### Query Parameters - **ask** (string) - Required - The immediate question to ask. - **goal** (string) - Optional - The broader end goal to help tailor the response. ``` -------------------------------- ### GET /documentation/developer-guide/core-systems/playables-system/commands.md Source: https://docs.sparkframework.dev/documentation/developer-guide/core-systems/playables-system/commands.md Queries the documentation dynamically by asking a question related to the content. ```APIDOC ## GET /documentation/developer-guide/core-systems/playables-system/commands.md ### Description Perform an HTTP GET request on the current page URL to query the documentation dynamically. ### Method GET ### Query Parameters - **ask** (string) - Required - The immediate question to ask. - **goal** (string) - Optional - Describes the broader end goal to tailor the answer. ``` -------------------------------- ### GET /documentation/user-guide/getting-started.md Source: https://docs.sparkframework.dev/documentation/user-guide/getting-started.md Queries the documentation dynamically by providing a specific question and an optional end goal. ```APIDOC ## GET /documentation/user-guide/getting-started.md ### Description Perform an HTTP GET request on the documentation page URL to retrieve answers to specific questions based on the documentation content. ### Method GET ### Endpoint https://docs.sparkframework.dev/documentation/user-guide/getting-started.md ### Parameters #### Query Parameters - **ask** (string) - Required - The immediate question to ask. - **goal** (string) - Optional - The broader end goal to help tailor the response. ### Response #### Success Response (200) - **answer** (string) - A direct answer to the question. - **excerpts** (array) - Relevant excerpts and sources from the documentation. ``` -------------------------------- ### Query Documentation via HTTP GET Source: https://docs.sparkframework.dev/documentation/developer-guide/core-systems/gamesettings/commands.md Perform an HTTP GET request to the documentation URL with 'ask' and 'goal' parameters to retrieve dynamic information. ```http GET https://docs.sparkframework.dev/documentation/developer-guide/core-systems/gamesettings/commands.md?ask=&goal= ``` -------------------------------- ### GET /documentation/developer-guide/plugins/progression/extensions.md Source: https://docs.sparkframework.dev/documentation/developer-guide/plugins/progression/extensions.md Queries the documentation dynamically by providing a question and an optional goal. ```APIDOC ## GET /documentation/developer-guide/plugins/progression/extensions.md ### Description Perform a query against the documentation to retrieve answers, excerpts, or sources related to a specific question. ### Method GET ### Endpoint https://docs.sparkframework.dev/documentation/developer-guide/plugins/progression/extensions.md ### Parameters #### Query Parameters - **ask** (string) - Required - The immediate question to ask. - **goal** (string) - Optional - The broader end goal to help tailor the response. ``` -------------------------------- ### GET /documentation/developer-guide/plugins/items/api.md Source: https://docs.sparkframework.dev/documentation/developer-guide/plugins/items/api.md Query the documentation dynamically using the GitBook API. ```APIDOC ## GET /documentation/developer-guide/plugins/items/api.md ### Description Perform a query against the documentation to retrieve specific information or context. ### Method GET ### Endpoint https://docs.sparkframework.dev/documentation/developer-guide/plugins/items/api.md ### Parameters #### Query Parameters - **ask** (string) - Required - The specific question to ask. - **goal** (string) - Optional - The broader end goal for the query. ``` -------------------------------- ### GET /documentation/developer-guide/plugins/crafting.md Source: https://docs.sparkframework.dev/documentation/developer-guide/plugins/crafting.md Queries the documentation dynamically by providing a question and an optional goal. ```APIDOC ## GET /documentation/developer-guide/plugins/crafting.md ### Description Perform an HTTP GET request on the documentation page URL to retrieve answers to specific questions based on the documentation content. ### Method GET ### Endpoint https://docs.sparkframework.dev/documentation/developer-guide/plugins/crafting.md ### Parameters #### Query Parameters - **ask** (string) - Required - The immediate question to ask. - **goal** (string) - Optional - The broader end goal to help tailor the response. ``` -------------------------------- ### GET /documentation/user-guide/plugins/progression.md Source: https://docs.sparkframework.dev/documentation/user-guide/plugins/progression.md Queries the documentation dynamically by asking a question related to the content. ```APIDOC ## GET /documentation/user-guide/plugins/progression.md ### Description Perform an HTTP GET request on the current page URL to query the documentation dynamically. This is useful for retrieving information not explicitly present in the page or for clarifying context. ### Method GET ### Endpoint https://docs.sparkframework.dev/documentation/user-guide/plugins/progression.md ### Parameters #### Query Parameters - **ask** (string) - Required - The specific, self-contained question in natural language. - **goal** (string) - Optional - Describes the broader end goal to help tailor the answer. ``` -------------------------------- ### GET /documentation/developer-guide/plugins/combat/requirements.md Source: https://docs.sparkframework.dev/documentation/developer-guide/plugins/combat/requirements.md Queries the documentation dynamically by asking a question related to the content. ```APIDOC ## GET /documentation/developer-guide/plugins/combat/requirements.md ### Description Perform an HTTP GET request on the current page URL to query the documentation dynamically. This is useful for retrieving information not explicitly present in the page or for clarifying context. ### Method GET ### Endpoint /documentation/developer-guide/plugins/combat/requirements.md ### Parameters #### Query Parameters - **ask** (string) - Required - The specific, self-contained question written in natural language. - **goal** (string) - Optional - The broader end goal you are trying to accomplish to help tailor the response. ``` -------------------------------- ### GET /documentation/user-guide/plugins/customization/presets.md Source: https://docs.sparkframework.dev/documentation/user-guide/plugins/customization/presets.md Queries the documentation for specific information by providing a question and an optional goal. ```APIDOC ## GET /documentation/user-guide/plugins/customization/presets.md ### Description Perform a query against the documentation to retrieve answers, excerpts, and sources based on a specific question. ### Method GET ### Endpoint https://docs.sparkframework.dev/documentation/user-guide/plugins/customization/presets.md ### Parameters #### Query Parameters - **ask** (string) - Required - The specific, self-contained question to ask. - **goal** (string) - Optional - The broader end goal to help tailor the response. ``` -------------------------------- ### GET /documentation/developer-guide/plugins/itembar/database-entries.md Source: https://docs.sparkframework.dev/documentation/developer-guide/plugins/itembar/database-entries.md Queries the documentation page dynamically to retrieve information or clarification. ```APIDOC ## GET /documentation/developer-guide/plugins/itembar/database-entries.md ### Description Perform a query against the documentation page to retrieve answers, excerpts, or sources related to the content. ### Method GET ### Endpoint https://docs.sparkframework.dev/documentation/developer-guide/plugins/itembar/database-entries.md ### Parameters #### Query Parameters - **ask** (string) - Required - The immediate question to ask. - **goal** (string) - Optional - The broader end goal to help tailor the response. ``` -------------------------------- ### GET /documentation/developer-guide/plugins/progression/database-entries.md Source: https://docs.sparkframework.dev/documentation/developer-guide/plugins/progression/database-entries.md Queries the documentation dynamically by asking a question related to the content. ```APIDOC ## GET /documentation/developer-guide/plugins/progression/database-entries.md ### Description Perform a query against the documentation to retrieve answers, excerpts, or sources related to the progression plugin or other documentation topics. ### Method GET ### Endpoint https://docs.sparkframework.dev/documentation/developer-guide/plugins/progression/database-entries.md ### Parameters #### Query Parameters - **ask** (string) - Required - The specific, self-contained question to ask. - **goal** (string) - Optional - The broader end goal to help tailor the response. ``` -------------------------------- ### GET /documentation/developer-guide/plugins/customization/events.md Source: https://docs.sparkframework.dev/documentation/developer-guide/plugins/customization/events.md Query the documentation dynamically by asking a question related to the content. ```APIDOC ## GET /documentation/developer-guide/plugins/customization/events.md ### Description Perform an HTTP GET request on the current page URL to query the documentation dynamically using natural language. ### Method GET ### Endpoint https://docs.sparkframework.dev/documentation/developer-guide/plugins/customization/events.md ### Parameters #### Query Parameters - **ask** (string) - Required - The immediate question to ask. - **goal** (string) - Optional - The broader end goal to help tailor the answer. ``` -------------------------------- ### GET /documentation/developer-guide/core-systems/save.md Source: https://docs.sparkframework.dev/documentation/developer-guide/core-systems/save.md Queries the documentation for information by providing a question and an optional goal. ```APIDOC ## GET /documentation/developer-guide/core-systems/save.md ### Description Queries the documentation dynamically to retrieve answers and relevant excerpts based on a provided question. ### Method GET ### Endpoint https://docs.sparkframework.dev/documentation/developer-guide/core-systems/save.md ### Parameters #### Query Parameters - **ask** (string) - Required - The specific, self-contained question to ask. - **goal** (string) - Optional - The broader end goal to help tailor the response. ``` -------------------------------- ### GET /documentation/developer-guide/plugins/customization.md Source: https://docs.sparkframework.dev/documentation/developer-guide/plugins/customization.md Queries the documentation for specific information by providing a question and an optional goal. ```APIDOC ## GET /documentation/developer-guide/plugins/customization.md ### Description Performs a dynamic query against the documentation to retrieve answers, excerpts, and sources based on a natural language question. ### Method GET ### Endpoint https://docs.sparkframework.dev/documentation/developer-guide/plugins/customization.md ### Parameters #### Query Parameters - **ask** (string) - Required - The specific, self-contained question to ask. - **goal** (string) - Optional - The broader end goal to help tailor the response. ### Request Example GET https://docs.sparkframework.dev/documentation/developer-guide/plugins/customization.md?ask=How do I add a new customization category?&goal=Implementing a character creator ``` -------------------------------- ### GET /documentation/user-guide/plugins/combat/factions.md Source: https://docs.sparkframework.dev/documentation/user-guide/plugins/combat/factions.md Queries the documentation for specific information by providing a question and an optional goal. ```APIDOC ## GET /documentation/user-guide/plugins/combat/factions.md ### Description Queries the documentation dynamically to retrieve answers, excerpts, and sources based on a specific question. ### Method GET ### Endpoint https://docs.sparkframework.dev/documentation/user-guide/plugins/combat/factions.md ### Parameters #### Query Parameters - **ask** (string) - Required - The specific, self-contained question to ask. - **goal** (string) - Optional - The broader end goal to help tailor the response. ``` -------------------------------- ### GET /documentation/developer-guide/plugins/currency/requirements.md Source: https://docs.sparkframework.dev/documentation/developer-guide/plugins/currency/requirements.md Queries the documentation for specific information using natural language questions. ```APIDOC ## GET /documentation/developer-guide/plugins/currency/requirements.md ### Description Queries the documentation dynamically by asking a question related to the content. ### Method GET ### Endpoint https://docs.sparkframework.dev/documentation/developer-guide/plugins/currency/requirements.md ### Parameters #### Query Parameters - **ask** (string) - Required - The specific, self-contained question in natural language. - **goal** (string) - Optional - The broader end goal to help tailor the answer. ``` -------------------------------- ### GET /documentation/user-guide/plugins/customization/colors.md Source: https://docs.sparkframework.dev/documentation/user-guide/plugins/customization/colors.md Performs a dynamic query against the documentation page to retrieve information or clarification. ```APIDOC ## GET /documentation/user-guide/plugins/customization/colors.md ### Description Queries the documentation dynamically to retrieve answers, excerpts, or context related to the current page. ### Method GET ### Endpoint https://docs.sparkframework.dev/documentation/user-guide/plugins/customization/colors.md ### Parameters #### Query Parameters - **ask** (string) - Required - The specific, self-contained question to ask. - **goal** (string) - Optional - The broader end goal to help tailor the response. ``` -------------------------------- ### GET /documentation/developer-guide/plugins/currency/database-entries.md Source: https://docs.sparkframework.dev/documentation/developer-guide/plugins/currency/database-entries.md Queries the documentation dynamically by asking a question related to the content of this page. ```APIDOC ## GET /documentation/developer-guide/plugins/currency/database-entries.md ### Description Perform an HTTP GET request on the current page URL to query the documentation dynamically using natural language questions. ### Method GET ### Endpoint https://docs.sparkframework.dev/documentation/developer-guide/plugins/currency/database-entries.md ### Parameters #### Query Parameters - **ask** (string) - Required - The immediate question to ask. - **goal** (string) - Optional - The broader end goal to help tailor the answer. ``` -------------------------------- ### GET /documentation/user-guide/plugins/crafting/recipes.md Source: https://docs.sparkframework.dev/documentation/user-guide/plugins/crafting/recipes.md Queries the documentation for specific information using natural language questions. ```APIDOC ## GET /documentation/user-guide/plugins/crafting/recipes.md ### Description Performs a dynamic query against the documentation to retrieve answers, excerpts, or context related to the crafting plugin or other framework topics. ### Method GET ### Endpoint https://docs.sparkframework.dev/documentation/user-guide/plugins/crafting/recipes.md ### Parameters #### Query Parameters - **ask** (string) - Required - The specific question to ask the documentation. - **goal** (string) - Optional - The broader end goal to help tailor the response context. ``` -------------------------------- ### Access and Use Input Actions Source: https://docs.sparkframework.dev/documentation/developer-guide/core-systems/inputs/api.md Example of retrieving an input entry and subscribing to its action. ```csharp var inputPlugin = Spark.GetPlugin(); if (inputPlugin != null) { InputEntry jumpEntry = inputPlugin.GetInputEntry("input_jump"); if (jumpEntry != null && jumpEntry.IsValid()) { InputAction jumpAction = jumpEntry.GetInputAction(); jumpAction.performed += ctx => Debug.Log("Jump!"); } } ``` -------------------------------- ### GET /documentation/user-guide/plugins/combat/formulas.md Source: https://docs.sparkframework.dev/documentation/user-guide/plugins/combat/formulas.md Queries the documentation for specific information by providing a question and an optional goal. ```APIDOC ## GET /documentation/user-guide/plugins/combat/formulas.md ### Description Queries the documentation dynamically to retrieve answers, excerpts, and sources based on a specific question. ### Method GET ### Endpoint https://docs.sparkframework.dev/documentation/user-guide/plugins/combat/formulas.md ### Parameters #### Query Parameters - **ask** (string) - Required - The specific, self-contained question to ask the documentation. - **goal** (string) - Optional - The broader end goal to help tailor the response. ``` -------------------------------- ### GET /documentation/user-guide/core-systems/requirements.md Source: https://docs.sparkframework.dev/documentation/user-guide/core-systems/requirements.md Queries the documentation for specific information by providing a question and an optional goal. ```APIDOC ## GET /documentation/user-guide/core-systems/requirements.md ### Description Queries the documentation dynamically to retrieve answers, excerpts, and sources based on a specific question. ### Method GET ### Endpoint https://docs.sparkframework.dev/documentation/user-guide/core-systems/requirements.md ### Parameters #### Query Parameters - **ask** (string) - Required - The specific, self-contained question to ask the documentation. - **goal** (string) - Optional - The broader end goal to help tailor the response context. ``` -------------------------------- ### GET /documentation/developer-guide/plugins/customization/api.md Source: https://docs.sparkframework.dev/documentation/developer-guide/plugins/customization/api.md Queries the documentation for specific information by providing a question and an optional goal. ```APIDOC ## GET /documentation/developer-guide/plugins/customization/api.md ### Description Queries the documentation dynamically to retrieve answers, excerpts, and sources based on a natural language question. ### Method GET ### Endpoint https://docs.sparkframework.dev/documentation/developer-guide/plugins/customization/api.md ### Parameters #### Query Parameters - **ask** (string) - Required - The immediate question to ask. - **goal** (string) - Optional - The broader end goal to help tailor the response. ``` -------------------------------- ### GET /documentation/developer-guide/core-systems/ui-system/api.md Source: https://docs.sparkframework.dev/documentation/developer-guide/core-systems/ui-system/api.md Queries the documentation for specific information by providing a question and an optional goal. ```APIDOC ## GET /documentation/developer-guide/core-systems/ui-system/api.md ### Description Queries the documentation dynamically to retrieve answers, excerpts, and sources based on a provided question. ### Method GET ### Endpoint https://docs.sparkframework.dev/documentation/developer-guide/core-systems/ui-system/api.md ### Parameters #### Query Parameters - **ask** (string) - Required - The immediate question to ask the documentation. - **goal** (string) - Optional - The broader end goal to help tailor the response. ``` -------------------------------- ### GET /documentation/developer-guide/plugins/customization/extensions.md Source: https://docs.sparkframework.dev/documentation/developer-guide/plugins/customization/extensions.md Queries the documentation page for specific information using natural language. ```APIDOC ## GET /documentation/developer-guide/plugins/customization/extensions.md ### Description Performs a query against the documentation page to retrieve answers and relevant excerpts based on a natural language question. ### Method GET ### Endpoint https://docs.sparkframework.dev/documentation/developer-guide/plugins/customization/extensions.md ### Parameters #### Query Parameters - **ask** (string) - Required - The specific, self-contained natural language question. - **goal** (string) - Optional - The broader end goal to help tailor the answer. ``` -------------------------------- ### GET /documentation/developer-guide/plugins/itembar.md Source: https://docs.sparkframework.dev/documentation/developer-guide/plugins/itembar.md Queries the documentation for specific information by providing a question and an optional goal. ```APIDOC ## GET /documentation/developer-guide/plugins/itembar.md ### Description Perform a query against the documentation to retrieve answers, excerpts, and sources based on a natural language question. ### Method GET ### Endpoint https://docs.sparkframework.dev/documentation/developer-guide/plugins/itembar.md ### Parameters #### Query Parameters - **ask** (string) - Required - The specific, self-contained question to ask. - **goal** (string) - Optional - The broader end goal to help tailor the response. ``` -------------------------------- ### GET /documentation/developer-guide/core-systems/scenes.md Source: https://docs.sparkframework.dev/documentation/developer-guide/core-systems/scenes.md Queries the documentation for specific information by providing a question and an optional goal. ```APIDOC ## GET /documentation/developer-guide/core-systems/scenes.md ### Description Performs a dynamic query against the documentation to retrieve answers, excerpts, and sources based on a specific question. ### Method GET ### Endpoint https://docs.sparkframework.dev/documentation/developer-guide/core-systems/scenes.md ### Parameters #### Query Parameters - **ask** (string) - Required - The specific, self-contained question to ask. - **goal** (string) - Optional - The broader end goal to help tailor the response. ``` -------------------------------- ### GameSettings Usage Example Source: https://docs.sparkframework.dev/documentation/developer-guide/core-systems/gamesettings/api.md Demonstrates how to retrieve the plugin instance and perform common operations like adjusting audio, video settings, and handling interactive rebinds. ```csharp var settings = Spark.GetPlugin(); if (settings != null) { // Audio settings.SetVolume(AudioChannel.Master, -10f); float masterVol = settings.GetVolume(AudioChannel.Master); // Video settings.SetResolution(1920, 1080, FullScreenMode.FullScreenWindow); settings.SetVSync(true); // Keybinds settings.RegisterInputActionAsset(myInputActions); settings.StartInteractiveRebind("Jump", 0, onComplete: () => Debug.Log("Rebound!"), onCancel: () => Debug.Log("Cancelled")); // Save await settings.SaveSettingsAsync(); } ``` -------------------------------- ### GET /documentation/developer-guide/plugins/currency/triggers.md Source: https://docs.sparkframework.dev/documentation/developer-guide/plugins/currency/triggers.md Query the documentation dynamically by performing an HTTP GET request on the page URL with an ask parameter. ```APIDOC ## GET /documentation/developer-guide/plugins/currency/triggers.md ### Description Perform a query against the documentation to retrieve information not explicitly covered in the page content. ### Method GET ### Endpoint https://docs.sparkframework.dev/documentation/developer-guide/plugins/currency/triggers.md ### Parameters #### Query Parameters - **ask** (string) - Required - The specific, self-contained question to ask. - **goal** (string) - Optional - The broader end goal to help tailor the response. ``` -------------------------------- ### GET /documentation/user-guide/plugins/quests.md Source: https://docs.sparkframework.dev/documentation/user-guide/plugins/quests.md Queries the documentation dynamically by providing a specific question and an optional end goal. ```APIDOC ## GET /documentation/user-guide/plugins/quests.md ### Description Queries the documentation dynamically to retrieve answers, excerpts, and sources based on a specific question. ### Method GET ### Endpoint https://docs.sparkframework.dev/documentation/user-guide/plugins/quests.md ### Parameters #### Query Parameters - **ask** (string) - Required - The immediate question to ask. - **goal** (string) - Optional - The broader end goal to help tailor the response. ``` -------------------------------- ### Manage Currency and Wallets in C# Source: https://docs.sparkframework.dev/documentation/developer-guide/plugins/currency/api.md Demonstrates how to initialize the currency plugin, create wallets, perform transactions, and process currency conversions. ```csharp var currency = Spark.GetPlugin(); if (currency != null) { // Create a wallet for an entity var wallet = currency.CreateEntityWallet(entityId); // Add gold currency.AddCurrency(wallet.WalletId, "gold", 100); // Check if player can afford something if (currency.HasCurrency(wallet.WalletId, "gold", 50)) { currency.RemoveCurrency(wallet.WalletId, "gold", 50); } // Transfer between wallets currency.TransferCurrency(playerWalletId, shopWalletId, "gold", 200); // Convert currency (e.g., 100 copper -> 1 silver) currency.ProcessConversion(wallet.WalletId, "copper_to_silver"); } ``` -------------------------------- ### GET /documentation/developer-guide/plugins/classes/events.md Source: https://docs.sparkframework.dev/documentation/developer-guide/plugins/classes/events.md Query the documentation dynamically by performing an HTTP GET request on the page URL with specific parameters. ```APIDOC ## GET /documentation/developer-guide/plugins/classes/events.md ### Description Perform an HTTP GET request on the current page URL to query the documentation dynamically for information not explicitly present in the page. ### Method GET ### Endpoint https://docs.sparkframework.dev/documentation/developer-guide/plugins/classes/events.md ### Parameters #### Query Parameters - **ask** (string) - Required - The immediate question to ask, written in natural language. - **goal** (string) - Optional - The broader end goal to help tailor the answer. ``` -------------------------------- ### GET /documentation/developer-guide/plugins/items.md Source: https://docs.sparkframework.dev/documentation/developer-guide/plugins/items.md Queries the documentation page for specific information using natural language questions. ```APIDOC ## GET /documentation/developer-guide/plugins/items.md ### Description Perform an HTTP GET request on the documentation page URL to retrieve answers to specific questions based on the documentation content. ### Method GET ### Endpoint https://docs.sparkframework.dev/documentation/developer-guide/plugins/items.md ### Parameters #### Query Parameters - **ask** (string) - Required - The immediate question to ask, written in natural language. - **goal** (string) - Optional - Describes the broader end goal to help tailor the response. ``` -------------------------------- ### Query Documentation via HTTP GET Source: https://docs.sparkframework.dev/documentation/user-guide/plugins/combat/abilities.md Perform an HTTP GET request to the documentation endpoint to retrieve information dynamically. ```http GET https://docs.sparkframework.dev/documentation/user-guide/plugins/combat/abilities.md?ask=&goal= ``` -------------------------------- ### Scenes System Usage Example Source: https://docs.sparkframework.dev/documentation/developer-guide/core-systems/scenes/api.md Demonstrates how to retrieve the plugin, load scenes using different methods, and subscribe to load completion events. ```csharp var scenesPlugin = Spark.GetPlugin(); if (scenesPlugin != null) { // Load by entry SceneEntry dungeon = scenesPlugin.GetSceneEntry("dungeon_01"); scenesPlugin.LoadScene(dungeon); // Load by ID scenesPlugin.LoadSceneById("town_01"); // Load by name scenesPlugin.LoadSceneByName("MainMenu"); } // Listen for scene load events SparkEventBus.Subscribe(this); public bool Handle(SceneLoadCompletedEvent evt) { Debug.Log($"Scene loaded: {evt.SceneFileName}"); return false; } ``` -------------------------------- ### GET /documentation/developer-guide/core-systems/characters/player-api.md Source: https://docs.sparkframework.dev/documentation/developer-guide/core-systems/characters/player-api.md Perform an HTTP GET request on the documentation page URL to ask questions and retrieve information dynamically. ```APIDOC ## GET /documentation/developer-guide/core-systems/characters/player-api.md ### Description Queries the documentation dynamically by asking a question related to the content. ### Method GET ### Endpoint https://docs.sparkframework.dev/documentation/developer-guide/core-systems/characters/player-api.md ### Parameters #### Query Parameters - **ask** (string) - Required - The specific, self-contained question to ask. - **goal** (string) - Optional - The broader end goal to help tailor the answer. ``` -------------------------------- ### GET /documentation/developer-guide/plugins/professions/triggers.md Source: https://docs.sparkframework.dev/documentation/developer-guide/plugins/professions/triggers.md Perform an HTTP GET request on the current page URL to query the documentation dynamically using natural language questions. ```APIDOC ## GET /documentation/developer-guide/plugins/professions/triggers.md ### Description Query the documentation dynamically by asking a question related to the content. ### Method GET ### Endpoint https://docs.sparkframework.dev/documentation/developer-guide/plugins/professions/triggers.md ### Parameters #### Query Parameters - **ask** (string) - Required - The immediate question to ask. - **goal** (string) - Optional - The broader end goal to help tailor the answer. ``` -------------------------------- ### GET /documentation/developer-guide/welcome.md Source: https://docs.sparkframework.dev/documentation/developer-guide/welcome.md Queries the documentation dynamically by providing a question and an optional goal to receive a tailored answer with relevant excerpts. ```APIDOC ## GET /documentation/developer-guide/welcome.md ### Description Queries the documentation dynamically by providing a question and an optional goal to receive a tailored answer with relevant excerpts. ### Method GET ### Endpoint https://docs.sparkframework.dev/documentation/developer-guide/welcome.md ### Parameters #### Query Parameters - **ask** (string) - Required - The immediate question to ask. - **goal** (string) - Optional - The broader end goal to help tailor the response. ``` -------------------------------- ### Implement Classes Plugin Usage Source: https://docs.sparkframework.dev/documentation/developer-guide/plugins/classes/api.md Example demonstrating how to retrieve the plugin instance and perform common operations like setting classes and checking unlock status. ```csharp var classes = Spark.GetPlugin(); if (classes != null) { // Set the player's main class classes.SetMainClass(entityId, "warrior"); // Add a secondary class classes.AddSecondaryClass(entityId, "mage"); // Unlock a class without assigning it classes.UnlockClass(entityId, "ranger"); // Query class state string main = classes.GetMainClass(entityId); var secondary = classes.GetSecondaryClasses(entityId); bool hasMage = classes.IsClassUnlocked(entityId, "mage"); } ``` -------------------------------- ### GET /documentation/user-guide/getting-started/core-concepts.md Source: https://docs.sparkframework.dev/documentation/user-guide/getting-started/core-concepts.md Queries the documentation for a specific question, optionally providing a broader goal to refine the context of the response. ```APIDOC ## GET /documentation/user-guide/getting-started/core-concepts.md ### Description Perform a query against the documentation to retrieve an answer and relevant excerpts based on a specific question. ### Method GET ### Endpoint https://docs.sparkframework.dev/documentation/user-guide/getting-started/core-concepts.md ### Parameters #### Query Parameters - **ask** (string) - Required - The specific, self-contained question to ask. - **goal** (string) - Optional - The broader end goal to help tailor the response context. ### Request Example GET https://docs.sparkframework.dev/documentation/user-guide/getting-started/core-concepts.md?ask=How+do+I+initialize+the+framework?&goal=Setting+up+a+new+project ### Response #### Success Response (200) - **answer** (string) - The direct answer to the question. - **excerpts** (array) - Relevant sections and sources from the documentation. ``` -------------------------------- ### GET https://docs.sparkframework.dev/documentation/developer-guide/core-systems/inputs/api.md?ask=&goal= Source: https://docs.sparkframework.dev/documentation/developer-guide/core-systems/inputs/api.md Perform an HTTP GET request to query the documentation dynamically for information not explicitly present in the page. ```APIDOC ## GET https://docs.sparkframework.dev/documentation/developer-guide/core-systems/inputs/api.md ### Description Queries the documentation dynamically to retrieve answers, excerpts, or sources related to the Spark Framework inputs system. ### Method GET ### Endpoint https://docs.sparkframework.dev/documentation/developer-guide/core-systems/inputs/api.md ### Parameters #### Query Parameters - **ask** (string) - Required - The specific, self-contained question to ask. - **goal** (string) - Optional - The broader end goal to help tailor the response. ``` -------------------------------- ### ItemBar Usage Example Source: https://docs.sparkframework.dev/documentation/developer-guide/plugins/itembar/api.md Demonstrates how to retrieve the plugin and perform basic slot selection and inspection. ```csharp var itemBar = Spark.GetPlugin(); if (itemBar != null) { // Select a slot itemBar.SelectSlot(playerObject, 0); // Cycle through slots itemBar.CycleSlot(playerObject, 1); // Next itemBar.CycleSlot(playerObject, -1); // Previous // Get selected slot var slot = itemBar.GetSelectedSlot(playerObject); if (slot.HasItem()) { Debug.Log($"Selected: {slot.GetSlottedItem().GetDisplayName()}"); } } ``` -------------------------------- ### Crafting Plugin Usage Example Source: https://docs.sparkframework.dev/documentation/developer-guide/plugins/crafting/api.md Demonstrates retrieving the plugin, querying recipes, and executing a craft command. ```csharp var crafting = Spark.GetPlugin(); if (crafting != null) { // List all recipes var recipes = crafting.GetAllRecipes(); // Find a specific recipe var recipe = crafting.FindRecipeById("iron_sword_recipe"); // Find recipes that produce an item var swordRecipes = crafting.FindRecipesForItem(ironSwordEntry); // Craft via command Spark.Network?.ExecuteCommand(new CraftItemCommand { crafter = playerObject, recipe = recipe }); } ``` -------------------------------- ### WalletInstance Methods Source: https://docs.sparkframework.dev/documentation/developer-guide/plugins/currency/api.md Methods for managing currency balances and conversions at runtime. ```csharp bool Add(string currencyId, long amount) bool Remove(string currencyId, long amount) bool Has(string currencyId, long amount) long GetAmount(string currencyId) void SetAmount(string currencyId, long amount) bool TryConvert(string conversionEntryId, long count) Dictionary GetAllCurrencies() ``` -------------------------------- ### Progression Plugin Usage Source: https://docs.sparkframework.dev/documentation/developer-guide/plugins/progression/api.md Example demonstrating how to retrieve the progression plugin, create instances, award experience, and manage levels. ```csharp var progression = Spark.GetPlugin(); if (progression != null) { // Create a progression var instance = progression.CreateProgressionFromInstance( entityId, combatLevelingInstance); // Award XP progression.AwardExperience(instance.progressionId, 500, "quest_reward"); // Check level int level = progression.GetLevel(instance.progressionId); float progress = progression.GetLevelProgress(instance.progressionId); // Set level directly progression.SetLevel(instance.progressionId, 10); } ``` -------------------------------- ### GET /documentation/user-guide/core-systems/triggers.md Source: https://docs.sparkframework.dev/documentation/user-guide/core-systems/triggers.md Queries the documentation for information by providing a question and an optional goal. ```APIDOC ## GET /documentation/user-guide/core-systems/triggers.md ### Description Queries the documentation dynamically to retrieve answers, excerpts, and sources based on a specific question. ### Method GET ### Endpoint https://docs.sparkframework.dev/documentation/user-guide/core-systems/triggers.md ### Parameters #### Query Parameters - **ask** (string) - Required - The specific, self-contained question to ask. - **goal** (string) - Optional - The broader end goal to help tailor the response. ``` -------------------------------- ### Spellbooks API Usage Example Source: https://docs.sparkframework.dev/documentation/developer-guide/plugins/spellbooks/api.md Demonstrates retrieving the plugin, fetching spellbooks, and iterating through abilities. ```csharp var spellbooks = Spark.GetPlugin(); if (spellbooks != null) { // Get all spellbooks var allBooks = spellbooks.GetAllSpellbooks(); // Get a specific spellbook SpellbookEntry fireBook = spellbooks.GetSpellbook("fire_spellbook"); // List abilities in a spellbook var abilities = fireBook.GetAbilities(); foreach (var ability in abilities) { Debug.Log(ability.DisplayName); } // Check if spellbook contains an ability bool hasFireball = fireBook.HasAbility("fireball"); } ``` -------------------------------- ### GET /documentation/developer-guide/core-systems.md Source: https://docs.sparkframework.dev/documentation/developer-guide/core-systems.md Queries the documentation dynamically by providing a question and an optional goal to receive a tailored response with relevant excerpts. ```APIDOC ## GET /documentation/developer-guide/core-systems.md ### Description Performs a dynamic query against the documentation to retrieve answers, excerpts, and sources based on a specific question. ### Method GET ### Endpoint https://docs.sparkframework.dev/documentation/developer-guide/core-systems.md ### Parameters #### Query Parameters - **ask** (string) - Required - The specific, self-contained question to ask the documentation system. - **goal** (string) - Optional - The broader end goal to help tailor the response context. ``` -------------------------------- ### GET /documentation/developer-guide/plugins/races/database-entries.md Source: https://docs.sparkframework.dev/documentation/developer-guide/plugins/races/database-entries.md Queries the documentation for specific information using natural language. ```APIDOC ## GET /documentation/developer-guide/plugins/races/database-entries.md ### Description Performs a dynamic query against the documentation to retrieve answers, excerpts, or sources related to a specific question. ### Method GET ### Endpoint https://docs.sparkframework.dev/documentation/developer-guide/plugins/races/database-entries.md ### Parameters #### Query Parameters - **ask** (string) - Required - The specific, self-contained question to ask. - **goal** (string) - Optional - The broader end goal to help tailor the response. ``` -------------------------------- ### Accessing and Interacting with a Plugin Source: https://docs.sparkframework.dev/documentation/developer-guide/creating-your-first-plugin.md Demonstrates how to retrieve a plugin instance, read entry data, execute commands, and subscribe to events. ```csharp // Get the plugin var myPlugin = Spark.GetPlugin(); // Read entry data MyPluginEntry entry = myPlugin?.GetEntry("my_entry_01"); // Modify values via command Spark.Network?.ExecuteCommand(new ModifyMyPluginValueCommand { CharacterId = "player_01", EntryId = "my_entry_01", Amount = 50, Source = "quest_completed" }); // Listen for value changes SparkEventBus.Subscribe(myHandler); ``` -------------------------------- ### Manage Items and Inventory with IItemPlugin Source: https://docs.sparkframework.dev/documentation/developer-guide/plugins/items/api.md Demonstrates creating item instances, modifying inventories, checking equipment status, and using the fluent operation builder for transfers. ```csharp var items = Spark.GetPlugin(); if (items != null) { // Create an item instance ItemInstance sword = items.CreateItemInstance(swordEntry, 1); // Inventory operations var inventory = items.GetEntityInventory(entityId, "backpack"); inventory.AddItem(sword); // Check equipment if (items.IsItemEquippable(swordEntry)) { items.EquipVisualItem(playerObject, swordEntry); } // Fluent operation builder items.BeginOperation() .From(sourceInventory) .To(targetInventory) .Transfer(itemInstance) .Execute(); } ``` -------------------------------- ### GET /documentation/developer-guide/plugins/professions/events.md Source: https://docs.sparkframework.dev/documentation/developer-guide/plugins/professions/events.md Query the documentation dynamically by asking a question related to the content. ```APIDOC ## GET /documentation/developer-guide/plugins/professions/events.md ### Description Perform an HTTP GET request on the current page URL to query the documentation dynamically using natural language. ### Method GET ### Endpoint https://docs.sparkframework.dev/documentation/developer-guide/plugins/professions/events.md ### Parameters #### Query Parameters - **ask** (string) - Required - The specific, self-contained question to ask. - **goal** (string) - Optional - The broader end goal to help tailor the answer. ``` -------------------------------- ### GET /documentation/developer-guide/plugins/professions/extensions.md Source: https://docs.sparkframework.dev/documentation/developer-guide/plugins/professions/extensions.md Query the documentation dynamically by asking a question related to the content. ```APIDOC ## GET /documentation/developer-guide/plugins/professions/extensions.md ### Description Perform an HTTP GET request on the current page URL to query the documentation dynamically using natural language. ### Method GET ### Endpoint /documentation/developer-guide/plugins/professions/extensions.md ### Parameters #### Query Parameters - **ask** (string) - Required - The immediate question to ask. - **goal** (string) - Optional - The broader end goal to help tailor the answer. ``` -------------------------------- ### Managing Quests with IQuestsPlugin Source: https://docs.sparkframework.dev/documentation/developer-guide/plugins/quests/api.md Demonstrates how to retrieve the quest plugin instance and perform common operations like accepting quests, updating progress, and turning in completed quests. ```csharp var quests = Spark.GetPlugin(); if (quests != null) { // Accept a quest if (quests.CanAcceptQuest(playerEntity, mainQuest)) { quests.AcceptQuest(playerEntity, mainQuest); } // Update objective progress quests.UpdateObjective(playerEntity, "kill_wolves", 0, 1); // Check quest state if (quests.IsQuestCompleted(playerEntity, "kill_wolves")) { quests.SelectReward(playerEntity, "kill_wolves", 0); quests.TurnInQuest(playerEntity, "kill_wolves"); } // Get active quests var active = quests.GetActiveQuests(playerEntity); } ``` -------------------------------- ### Execute Playables via IPlayablesPlugin Source: https://docs.sparkframework.dev/documentation/developer-guide/core-systems/playables-system/api.md Demonstrates initializing the execution context and triggering various playable types such as sounds, animations, and game objects. ```csharp var playables = Spark.GetPlugin(); if (playables != null) { var context = new PlayableExecutionContext { source = playerObject }.WithPosition(spawnPoint); // Play a sound playables.ExecutePlayableSound(hitSoundEntry, context); // Play an animation playables.ExecutePlayableAnimation(attackAnimEntry, context); // Spawn a VFX prefab playables.ExecutePlayableGameObject(vfxEntry, context, delay: 0.5f); // Generic execution (auto-detects type) playables.ExecutePlayable(someEntry, context); } ``` -------------------------------- ### Implement a command handler Source: https://docs.sparkframework.dev/documentation/developer-guide/core-systems/command-system.md Example handler demonstrating the four-step pattern: validation, entity lookup, state modification, and event publication. ```csharp public class GiveItemCommandHandler : ICommandHandler { public void Handle(GiveItemCommand command) { // 1. Validate inputs if (string.IsNullOrEmpty(command.TargetEntityId)) { Debug.LogWarning("GiveItemCommand: No target entity specified."); return; } var entry = SparkDatabaseRegistry.GetEntry(command.ItemEntryId); if (entry == null) { Debug.LogWarning($"GiveItemCommand: Item not found: {command.ItemEntryId}"); return; } // 2. Find the target entity if (!SparkEntityRegistry.TryGetEntity(command.TargetEntityId, out SparkEntity entity)) { Debug.LogWarning($"GiveItemCommand: Entity not found: {command.TargetEntityId}"); return; } var inventory = entity.GetSparkComponent(); if (inventory == null) { Debug.LogWarning($"GiveItemCommand: No inventory on entity."); return; } // 3. Apply the state change inventory.AddItem(command.ItemEntryId, command.Quantity); // 4. Publish an event SparkEventBus.Publish(new ItemGivenEvent( command.TargetEntityId, command.ItemEntryId, command.Quantity)); } } ``` -------------------------------- ### GET /documentation/developer-guide/plugins/crafting/triggers.md Source: https://docs.sparkframework.dev/documentation/developer-guide/plugins/crafting/triggers.md Queries the documentation dynamically by asking a question related to the content. ```APIDOC ## GET /documentation/developer-guide/plugins/crafting/triggers.md ### Description Perform a query against the documentation to retrieve answers, excerpts, or sources when information is not explicitly present in the page. ### Method GET ### Endpoint https://docs.sparkframework.dev/documentation/developer-guide/plugins/crafting/triggers.md ### Parameters #### Query Parameters - **ask** (string) - Required - The specific, self-contained question in natural language. - **goal** (string) - Optional - The broader end goal to help tailor the response. ``` -------------------------------- ### GET /documentation/developer-guide/plugins.md Source: https://docs.sparkframework.dev/documentation/developer-guide/plugins.md Queries the documentation dynamically by providing a question and an optional goal to receive a contextual answer. ```APIDOC ## GET /documentation/developer-guide/plugins.md ### Description Perform a dynamic query against the documentation to retrieve answers, excerpts, and sources based on a specific question. ### Method GET ### Endpoint https://docs.sparkframework.dev/documentation/developer-guide/plugins.md ### Parameters #### Query Parameters - **ask** (string) - Required - The specific, self-contained question to ask. - **goal** (string) - Optional - The broader end goal to help tailor the response. ### Response #### Success Response (200) - **answer** (string) - A direct answer to the question. - **excerpts** (array) - Relevant excerpts from the documentation. - **sources** (array) - Sources used to generate the answer. ``` -------------------------------- ### Professions Plugin Usage Example Source: https://docs.sparkframework.dev/documentation/developer-guide/plugins/professions/api.md Demonstrates how to retrieve the plugin instance and perform basic profession operations. ```csharp var professions = Spark.GetPlugin(); if (professions != null) { // Learn a profession professions.LearnProfession(entityId, "blacksmithing"); // Check if learned bool canSmith = professions.IsProfessionLearned(entityId, "blacksmithing"); // List all learned professions var all = professions.GetLearnedProfessions(entityId); } ``` -------------------------------- ### Implement MyPluginImplementation Class Source: https://docs.sparkframework.dev/documentation/developer-guide/creating-your-first-plugin.md Registers the plugin with the Spark system and sets up network command handlers during initialization. ```csharp using System.Collections.Generic; using UnityEngine; public class MyPluginImplementation : IMyPlugin { private static MyPluginImplementation _instance; private static bool _hasRegistered = false; [RuntimeInitializeOnLoadMethod( RuntimeInitializeLoadType.SubsystemRegistration)] private static void Reset() { _hasRegistered = false; _instance = null; } [RuntimeInitializeOnLoadMethod( RuntimeInitializeLoadType.BeforeSceneLoad)] private static void RegisterPlugin() { if (!_hasRegistered) { _instance = new MyPluginImplementation(); Spark.RegisterPlugin(_instance); _hasRegistered = true; // Register command handlers Spark.Network?.RegisterHandler( new ModifyMyPluginValueCommandHandler()); } } #if UNITY_EDITOR [UnityEditor.InitializeOnLoadMethod] private static void RegisterPluginInEditor() { Reset(); RegisterPlugin(); } #endif public List GetAllEntries() { return SparkDatabaseRegistry.GetAllEntries(); } public MyPluginEntry GetEntry(string entryId) { return SparkDatabaseRegistry.GetEntry(entryId); } public bool HasEntry(string entryId) { return SparkDatabaseRegistry.HasEntry(entryId); } } ``` -------------------------------- ### GET /documentation/developer-guide/core-systems/save/api.md Source: https://docs.sparkframework.dev/documentation/developer-guide/core-systems/save/api.md Queries the documentation dynamically using natural language questions. ```APIDOC ## GET /documentation/developer-guide/core-systems/save/api.md ### Description Performs a dynamic query against the documentation to retrieve specific information or context. ### Method GET ### Endpoint https://docs.sparkframework.dev/documentation/developer-guide/core-systems/save/api.md ### Parameters #### Query Parameters - **ask** (string) - Required - The specific question to ask the documentation system. - **goal** (string) - Optional - The broader end goal to help tailor the response. ```