Spaces:
Running
Running
File size: 5,673 Bytes
20ffdca | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 | # βοΈ Scripting & Coding Format β OFFICIAL STANDARD
> **Version 1.0** β Nimbis / Bloomcore / QuarterBit Dev Canon
---
## π General Rules
- **Always read the last 20 comments before responding**
- **Never explain the script unless asked**
- **Always double-check names of everything**
- **Always return full scripts β no snippets, no paste-ins**
- All scripts returned in **full `.lua` code windowed format**
- No drift, no split, no in-text embeds
- **Every line must be commented** with a description using `--`
---
## ποΈ Script Header Template
Every script starts with this metadata block β no exceptions:
```lua
--[[
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
Script Name : [YourScriptNameHere]
Placement : [e.g. ServerScriptService, StarterPlayerScripts, etc.]
Type of Script : [e.g. Script, Local, Module, etc.]
Purpose : [Short description of what this script does]
Version : 1.0
Linked Objects : [Any linked parts, buttons, RemoteEvents, etc.]
Dependencies : [ModuleScripts, RemoteEvents, services required]
Last Updated : [YYYY-MM-DD]
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
]]
```
---
## βοΈ Setup Section
```lua
--==[ SETUP ]==--
-- Import services
local Players = game:GetService("Players") -- Player service
local ReplicatedStorage = game:GetService("ReplicatedStorage") -- Shared assets
local ServerStorage = game:GetService("ServerStorage") -- Private server-side storage
local RunService = game:GetService("RunService") -- Frame update loop utility
local TweenService = game:GetService("TweenService") -- Tween animations
-- Example references (replace as needed)
local exampleRemote = ReplicatedStorage:WaitForChild("ExampleRemote") -- RemoteEvent example
local exampleFolder = ServerStorage:WaitForChild("ExampleFolder") -- Folder or model reference
```
---
## π Debug Utility Function
```lua
--==[ DEBUG UTILITY FUNCTION ]==--
-- Function to print all key-value pairs in a table (useful for debugging data packets)
local function debugDumpTable(tbl, title)
print("π¦ Dumping Table: " .. (title or "Unnamed Table"))
for key, value in pairs(tbl) do
print(" ", key, "=", value)
end
end
```
---
## π§ Main Logic Entry
```lua
--==[ MAIN LOGIC ENTRY ]==--
-- This is where your core logic starts
-- Example: connect to a RemoteEvent
exampleRemote.OnServerEvent:Connect(function(player, payload)
print("π‘ Event received from:", player.Name)
-- Dump the payload for inspection
debugDumpTable(payload, "Incoming Payload")
-- Add your handling logic here
-- Example:
-- if payload.Action == "DoSomething" then
-- print("β
Action recognized. Proceeding...")
-- end
end)
```
---
## π Final Note Block (Nimbis Anchor)
```lua
--==[ FINAL NOTE FOR NIMBIS ]==--
--[[
NIMBIS: This is your blank template format for all future scripts.
Always duplicate this format:
- Header metadata block
- Setup section for services and references
- Debug utilities
- Main logic entry
- Final anchor note to you (optional)
Do not rename things without updating the header and notes.
Always document what each section does with emoji + comments.
End of file.
]]
```
---
## π Game Treatment Template (ModuleScript)
> Stored as a ModuleScript β NOT executed in-game. Acts as a living design doc.
> `require()` it in Studio to inspect values.
```lua
--[[
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
Script Name : [GameTitle]_Treatment.lua
Placement : Documentation > Design (ModuleScript)
Purpose : Structured, code-friendly game-treatment template.
Fill out this table before production so all devs
share a single source of truth.
Version : 0.4 (Lua-table skeleton)
Last Updated : 2025-06-22
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
]]
```
### Treatment Sections
| # | Section | Description |
|---|---------|-------------|
| 0 | `Metadata` | Game title, tagline, version, last updated |
| 1 | `Workspace` | Zones, interactables, leaderboards |
| 2 | `Players` | Leaderstats (Coins, XP, etc.) |
| 3 | `Lighting` | Style, atmosphere, color palette |
| 4 | `ReplicatedFirst` | Loading screens |
| 5 | `ReplicatedStorage` | Modules, shared assets |
| 6 | `ServerScriptService` | Services, game flow |
| 7 | `ServerStorage` | Hidden assets |
| 8 | `StarterGui` | UI β MainMenu, Inventory, HUD |
| 9 | `StarterPack` | Tools and slots |
| 10 | `StarterPlayer` | Client scripts |
| 11 | `Marketplace` | Store items, monetization notes |
| 12 | `DataProgression` | Level curve, prestige, DataStores |
| 13 | `SoundService` | Playlists, max concurrent SFX |
| 14 | `Roadmap` | Phases, dates, deliverables, known bugs |
| 15 | `Glossary` | Project-specific terms |
| 16 | `Moderation` | Chat filters, report workflow |
| 17 | `LiveOps` | Events calendar |
| 18 | `Analytics` | Metrics, SDKs |
| 19 | `Localization` | Languages, file structure |
| 20 | `Optimization` | Target device, poly budget, memory |
| 21 | `Marketing` | Thumbnail specs, trailer plan, socials |
---
## π Canon Rules
- No script leaves without a full header block
- No unnamed variables β everything gets a comment
- No unexplained logic β if it's clever, document it
- Naming changes require header + notes update
- This is the **official QuarterBit / Bloomcore scripting canon** |