Wiki source code of Item Spawners
Version 1.1 by Alexandros Mloukie on 2026/01/26 16:30
Hide last authors
| author | version | line-number | content |
|---|---|---|---|
| |
1.1 | 1 | = 0 - Introduction = |
| 2 | |||
| 3 | This document outlines the basics of respawnable sources of items in the game. | ||
| 4 | |||
| 5 | Should the information presented in this document require further revising/explanation, contact {{mention reference="XWiki.AlexandrosMloukie" style="FULL_NAME" anchor="XWiki-AlexandrosMloukie-iosemn"/}}. | ||
| 6 | |||
| 7 | ---- | ||
| 8 | |||
| 9 | [[image:ItemSpawners.png]] | ||
| 10 | |||
| 11 | = 1 - Spawner Makeup = | ||
| 12 | |||
| 13 | The goal of Item Spawners is to provide the player with a reliable supply of items they require. As such, they must be able to act as **interactable **actors, with **timed respawns** on the items they provide. | ||
| 14 | |||
| 15 | == 1.1 - Spawner Meshes == | ||
| 16 | |||
| 17 | The spawners require 2 distinct meshes, each depicting a separate part of the overall visuals of the spawner: | ||
| 18 | |||
| 19 | (% class="table-bordered" %) | ||
| 20 | (% class="active" %)|=(% style="width: 205px;" %)Mesh|=(% style="width: 1232px;" %)Description | ||
| 21 | |(% style="width:205px" %)Base Mesh|(% style="width:1232px" %)Used to depict the base (unchangeable) part of the spawner (e.g. the bush part of a berry bush). This mesh is always visible. | ||
| 22 | |(% style="width:205px" %)Item Growth Mesh|(% style="width:1232px" %)Used to depict the growth of the collectable item(s) on the spawner (e.g. the berries of the berry bush). This mesh disappears after collection by the player, and reappears when the respawn timer has been completed. | ||
| 23 | |||
| 24 | Both of these meshes overlap each other to create the look of a singular mesh with and without the item growths. | ||
| 25 | |||
| 26 | == 1.2 - Spawn Timer == | ||
| 27 | |||
| 28 | Each spawner has a timer that determines the amount of time it will take to respawn the items. The timer's properties should be easily accessible to allow for easier balancing later in development. | ||
| 29 | |||
| 30 | A manager-type actor can be utilized to control the timers for all available spawners //(let me know if you want to discuss this).// | ||
| 31 | |||
| 32 | == 1.3 - Item Acquisition == | ||
| 33 | |||
| 34 | Similar to looting, each spawner has an internal set of items that the player can pick up. Unlike looting however, the items are automatically added to the player's inventory (as many as can fit), without the player manually moving them. Items are determined using a structure similar to the one [[used for looting>>doc:Game Design.Looting System.WebHome||anchor="lootingStruct"]]. A Data Table will hold the entries for all spawner types in the game, allowing for easy balancing changes later in development. | ||
| 35 | |||
| 36 | Assuming a manager-type actor, the items that a spawner has can be determined by the manager once the timer is up, and added to the spawner from there. |