Quests (#10): a Quests registry + server runtime — objectives (gather/craft/ kill/use × count, blank target = any) and rewards, autoStart + requires chains (completing a prerequisite auto-starts dependents), optional turn-in at a tagged QuestGiver (component + prompt). Rewards are never lost: a full inventory parks the quest as ready and the grant retries on inventory change. Quests menu tab (L) with per-objective progress bars; QuestLog JSON attribute replicates state; quest:started/progress/completed/blocked via Hooks + bus. Achievements: an always-on runtime for the existing registry, ported architecturally from TCE. A shared Progression layer translates bus events into auto-derived counters (gathers_reed, crafts_total, kills_husk, …) so a def is just { key, name, counter, threshold } — flat in code and no-code. Unlock-once + toast + Achievements tab (J) with progress bars. Toasts: themed top-right notification queue (Notify remote + Toasts.show). No-code: admin plugin gains Quests (single-objective + "+ Quest giver" drop) and Achievements (counter/threshold) editors; the engine loads both from SurvivorCoreContent. Demo: a 3-quest chain + 4 achievements + a giver post. Fixed: registerPanel now ADOPTS a template-scaffolded tab (hides the placeholder, builds into the authored frame) instead of silently no-opping — this replaces the Quests/Achievements "coming soon" placeholders. EventBridge parity: gather:*, craft:* and item:use now also cross the bus. Changed: rojo 7.6.1 → 7.7.0 (rokit pin; CI follows; gate verified). Docs: quests.md + achievements.md (new), content-authoring/admin-plugin/ extending/README updated, CHANGELOG Unreleased, site feature card. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
6.3 KiB
No-code content authoring
📹 Demos: creating mobs, weapons & ammo (with full stats) · creating an item + gatherable
The engine ships zero items, resources, or recipes — your game supplies them. You can do this two ways, and they coexist:
- From code —
SurvivorCore.Items.register{…},SurvivorCore.Resources.register{…},SurvivorCore.Recipes.register{…}beforestart()(see the demoBoot.server.luau). - No-code, as instances — author content in the place and the engine loads it at
start(). The admin plugin's Content widget writes exactly this for you.
The SurvivorCoreContent folder
At start(), the engine reads ReplicatedStorage.SurvivorCoreContent and registers any defs found:
ReplicatedStorage
└─ SurvivorCoreContent
├─ Items (Folder)
│ └─ berry (Configuration) ← child Name = item id
│ • name = "Wild Berries" ← attributes = def fields
│ • stack = 20
│ • weight = 0.05
│ • category = "consumable"
├─ Weapons (Folder) ← items with category="weapon" (loaded into the Items registry)
│ └─ wood_club (Configuration)
│ • category = "weapon"
│ • toolType = "club" (lets the hotbar equip it)
│ • weaponKind = "melee" ("melee" | "bow")
│ • weaponDamage = 20
├─ Arrows (Folder) ← items with category="ammo" (loaded into the Items registry)
│ └─ heavy_arrow (Configuration)
│ • category = "ammo"
│ • ammoDamage = 1.4 (× the bow's damage)
│ • ammoDrop = 2 (× gravity = the curve)
│ • ammoRange = 140
├─ Resources (Folder)
│ └─ berry_bush (Configuration)
│ • item = "berry"
│ • hp = 4
│ • requireTool = "" (blank = bare-hand)
│ • yieldMin = 1
│ • yieldMax = 3
├─ Mobs (Folder)
│ └─ husk (Configuration)
│ • faction = "hostile" ("hostile" | "passive" | "neutral")
│ • health = 60
│ • aggroRange = 40
├─ Quests (Folder) ← flat single-objective quests (normalized at load)
│ └─ gather_reeds (Configuration)
│ • name = "Gather Reeds"
│ • objectiveType = "gather" ("gather" | "craft" | "kill" | "use")
│ • objectiveTarget = "reed"
│ • objectiveCount = 3
│ • rewardItem = "berry"
│ • rewardCount = 2
│ • autoStart = true
├─ Achievements (Folder) ← flat counter + threshold defs
│ └─ husk_slayer (Configuration)
│ • name = "Husk Slayer"
│ • counter = "kills_husk" (see docs/achievements.md for the counter catalogue)
│ • threshold = 3
├─ Tools (Folder) ← Tool templates the hotbar equips (named by item id)
└─ MobModels (Folder) ← rigged mob templates Mobs.spawn clones (named by mob id)
Each child's Name is the id; its attributes are the def fields
(Registry.loadFromFolder copies them verbatim). This is the
same instance-config pattern the survival stats use.
The admin plugin Content widget
Open Studio → the SurvivorCore toolbar → Content. Seven builders:
- Items — create an item by id, then set Name / Max stack / Weight / Category / Tool type / Icon / Description.
- Weapons — create a weapon by id, then set Kind (melee/bow) / Damage / Range / Cooldown, plus
bow Draw time / Arrow speed / Max range / Ammo item. (Weapons are items with
category = "weapon"; they live in their own folder so this editor never collides with the Items editor.) + Tool model drops a starterTool(a Handle carrying the weapon'sToolType/WeaponKind) into the world so you can build the held look on it; move the finished Tool underSurvivorCoreContent.Tools(named by the weapon id) and the hotbar clones it when the weapon is equipped. - Arrows / Ammo — create an arrow type by id, then set Damage × / Drop (curve) × / Max range /
Speed × / Carry weight. A bow's Ammo item points at one of these. (Arrows are items with
category = "ammo", in their own folder — see combat.md.) - Gatherables — create a resource by id, then set Yields item / HP (gathers) / Tool required /
Yield min / Yield max. + Add to World drops a tagged
Gatherablenode. - Mobs — create a mob type by id, then set Faction / Health / Speeds / Aggro / Leash / Attack.
+ Add to World drops a tagged
Mobplaceholder rig (swap in your own model later). - Quests — create a quest by id, then set Name / Description / Objective (type, target, count) /
Reward (item, count) / Auto-start / Requires / Turn in. + Quest giver drops a tagged
QuestGiverpost offering it (see quests.md). Multi-objective chains stay code-authored, like recipes. - Achievements — create an achievement by key, then set Name / Description / Counter / Threshold / Icon — counters are the engine's auto-derived progression counters (see achievements.md).
Each edit is one Studio undo step. Behind the scenes it creates/edits the
SurvivorCoreContent instances above, so pressing Play registers your content with no code.
Binding a world object
A creator builds any mesh, tags it Gatherable (CollectionService), and sets a Resource
attribute to a resource id (e.g. "berry_bush"). The node inherits item/HP/tool/yield from the def.
See harvesting.md for the full attribute list and the per-type reaction hooks
(shake / fell / etc.).
For creatures, tag a rigged Model (Humanoid + PrimaryPart) Mob and set MobType to a mob id
(e.g. "husk"); it inherits faction/health/speed/ranges from the def. See mobs.md and
combat.md.
Tools
For a tool item, set toolType (e.g. "axe") and category = "tool". To give it a custom look,
place a Tool named by the item id under SurvivorCoreContent.Tools; otherwise the engine equips a
plain default. Trees etc. require the matching RequireTool.