MetaDen Outdoors
Camping and outdoor interaction resource for your server with a focus on immersive, skill-gated gathering and cooking mechanics:
- Campfire cooking
- Collecting wood and rocks
- Filling bottles from river-like water
- Gutting snakes and lizards
- Sleeping in sleeping bags/tents
- Hiding in dumpsters
- Yoga stress relief
- Configurable loot tables, skill/XP rewards, and target interactions
Requirements
ox_libmetabridge
Optional integrations:
metaden-skills(only used whenConfig.UseMetaDenSkills = true)
Installation
- Place this folder in your resources.
- Ensure dependencies start before this resource.
- Add to your server cfg:
cfg
ensure metaden-outdoorsConfiguration
All configuration is in config.lua.
Main keys:
Config.UseMetaDenSkills– enables cooking XP/level gating callback integration.Config.RiverRingFractionThreshold– river/creek classifier sensitivity for bottle fill.Config.EnabledTargets– toggles each target interaction group on/off.Config.Rocks,Config.Wood,Config.WoodItem,Config.YogaMat,Config.Tents,Config.Bins,Config.SleepingBags,Config.Campfires– legacy model lists (still supported by compatibility defaults).Config.Timeout– local gather timeout in ms.Config.SearchTime– progressbar duration in ms for material searching.Config.NonceTTL– action nonce validity window in ms.Config.EventCooldowns– server-side anti-spam cooldowns per action.Config.ExperienceRewards– per-action skill/XP rewards (cookMeat,searchForMaterial,gutSnake,gutLizard,fillBottle).Config.SkillItemBonus– optional skill-level item amount bonus for configured actions.Config.GuttingRewards– configurable snake/lizard meat and skin reward amounts/items.Config.MushroomChance,Config.MushroomRewardItems– bonus mushroom reward configuration.Config.AnimalChance,Config.AnimalItems– random creature reward configuration.Config.MinToGet,Config.MaxToGet– min/max item amounts for gather rewards.Config.SearchAnimationSets,Config.DefaultSearchAnimationSet,Config.PlayerAnimationCommand– player-selectable search animation behavior.Config.Lootables– primary data-driven searchable target list with props, chance-based loot, required item rules, minigame hooks, and optional bonus pools.Config.Recipes– cookable recipes (name,title,duration,cooking,required).
Lootables schema
Each entry in Config.Lootables supports:
id(string): unique identifier used by client/server.enabled(bool): toggles this lootable.props(array): target model list.interaction(table):id,icon,label,distance,progressLabel,searchTime.
successChance(0-100): server-side success chance.cooldownMs(number): local retry cooldown for this lootable.rollMode(single|multi) androlls(number): chance pick behavior.lootTable(array): chance entries:{ item, chance, min, max, applySkillBonus? }weightis still accepted as a legacy alias, butchanceis preferred.
requiredItem(optional):{ enabled, item, amount, mode }mode:check|consume_on_success|consume_on_attempt
minigame(optional):{ enabled, resource, export, args, passOnNil }
animation(optional):{ defaultSet, allowPlayerOverride }
bonusPools(optional array): each haschance,rollMode,rolls,lootTable.
Player animation command
- Command name is configurable via
Config.PlayerAnimationCommand(default:outdoorsanim). - Use
/<command> <setName>to select your search animation set. - Run
/<command>with no args to list available sets. - Default set is
Config.DefaultSearchAnimationSet.
Skills integration
- Cooking XP is granted through
exports['metaden-skills']:AddExperience(identifier, 'cooking', amount)on successful cooking. - When
Config.UseMetaDenSkills = true, cooking menu progression reads current cooking XP throughmetaden-outdoors:server:requestCookingSkillDataand unlocks recipes byrecipe.cookingthreshold.
External APIs Used
metabridge
Used through MetaBridge/MetaBridgeClient or fallback exports:
requestCallbackregisterCallbackaddTargetModelgetItemImagegetItemLabelgetItemCountremoveItemaddItemgetItemFromSlotnotifyprogressBarregisterContextshowContext
GTA natives (direct animation)
TaskStartScenarioInPlaceTaskPlayAnimClearPedTasksClearPedSecondaryTaskClearPedTasksImmediately
Security Notes
- Sensitive server actions are nonce-protected (
Config.NonceTTL). - Server-side action cooldowns are enforced (
Config.EventCooldowns). - Player nonce/cooldown data is cleaned on disconnect.
Known Notes
- This resource intentionally relies on
metabridgeabstraction for inventory/target compatibility.
