Spaces:
Running
Running
Rename scripting_coding_format/LUA_format.md to utilities/scripting_coding_format/LUA_format.md
3251fd4 verified A newer version of the Gradio SDK is available:
6.9.0
βοΈ 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
.luacode 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:
--[[
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
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
--==[ 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
--==[ 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
--==[ 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)
--==[ 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.
--[[
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
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