mirror of
https://github.com/TemujinCalidius/SurvivorCore.git
synced 2026-08-14 09:02:29 +00:00
Server tick (src/systems/SurvivalStats) simulates per-stat drain/regen stored as Player Attributes, which auto-replicate so the client HUD (src/client/Hud) binds reactively via GetAttributeChangedSignal — no RemoteEvents. Stats are defined in src/stats/StatDefs and resolved through three layers (defaults < Config.override < a Studio SurvivalStatsConfig instance) by src/stats/StatConfig, so owners retune rates with no code. The HUD is a real, designer-editable ScreenGui in StarterGui, authored as diff-friendly JSON (assets/hud/SurvivalHud.model.json); bars bind by a `Stat` attribute + a `Fill` child, so re-texturing needs zero code. It ships for every distribution: the demo/Rojo source mount it, the drop-in .rbxm bundles it under a Templates folder and start()/installHud() deploys it, and HudFallback guarantees a HUD always appears. Adds the engine's first client layer (startClient()). Allow committing *.rbxmx/model templates (.gitignore) and skip the CI-fetched globalTypes.d.luau in selene. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
90 lines
1.7 KiB
JSON
90 lines
1.7 KiB
JSON
{
|
|
"className": "Configuration",
|
|
"children": [
|
|
{
|
|
"className": "Configuration",
|
|
"name": "Health",
|
|
"attributes": {
|
|
"RatePerSecond": 0.0,
|
|
"Max": 100,
|
|
"Start": 100,
|
|
"WarnAt": 25,
|
|
"Invert": false,
|
|
"Display": true
|
|
}
|
|
},
|
|
{
|
|
"className": "Configuration",
|
|
"name": "Energy",
|
|
"attributes": {
|
|
"RatePerSecond": 0.0,
|
|
"Max": 100,
|
|
"Start": 100,
|
|
"WarnAt": 25,
|
|
"Invert": false,
|
|
"Display": true
|
|
}
|
|
},
|
|
{
|
|
"className": "Configuration",
|
|
"name": "Hunger",
|
|
"attributes": {
|
|
"RatePerSecond": 0.055556,
|
|
"Max": 100,
|
|
"Start": 0,
|
|
"WarnAt": 25,
|
|
"Invert": true,
|
|
"Display": true
|
|
}
|
|
},
|
|
{
|
|
"className": "Configuration",
|
|
"name": "Thirst",
|
|
"attributes": {
|
|
"RatePerSecond": 0.083333,
|
|
"Max": 100,
|
|
"Start": 0,
|
|
"WarnAt": 25,
|
|
"Invert": true,
|
|
"Display": true
|
|
}
|
|
},
|
|
{
|
|
"className": "Configuration",
|
|
"name": "Fatigue",
|
|
"attributes": {
|
|
"RatePerSecond": 0.027778,
|
|
"Max": 100,
|
|
"Start": 0,
|
|
"WarnAt": 25,
|
|
"Invert": true,
|
|
"Display": true
|
|
}
|
|
},
|
|
{
|
|
"className": "Configuration",
|
|
"name": "Blood",
|
|
"attributes": {
|
|
"RatePerSecond": 0.0,
|
|
"Max": 100,
|
|
"Start": 100,
|
|
"WarnAt": 25,
|
|
"Invert": false,
|
|
"Display": true
|
|
}
|
|
},
|
|
{
|
|
"className": "Configuration",
|
|
"name": "Poison",
|
|
"attributes": {
|
|
"RatePerSecond": 0.0,
|
|
"Max": 100,
|
|
"Start": 0,
|
|
"WarnAt": 25,
|
|
"Invert": true,
|
|
"Display": true
|
|
}
|
|
}
|
|
]
|
|
}
|