🤠 Wild Country Libs
Reference

Framework & Raw

For the cases where you genuinely need to know or reach past which framework is running — these two exist so you're never blocked waiting on a wc_lib update.

Framework introspection

Framework.Get()shared

Returns the active framework name.

ReturnsType
name'vorp' | 'rsg' | nil
example
print(wc:Framework_Get()) -- "vorp"
Framework.Is(name)shared

Boolean check against the active framework.

example — VORP-only feature gate
if wc:Framework_Is('vorp') then
  -- e.g. a Honor-skill feature that only exists in VORP's skill system
end

Raw escape hatch

Need something the bridge doesn't cover yet — a specific VORP character setter, an RSG export with no wc_lib equivalent? WCLib.Raw.VORP() / WCLib.Raw.RSG() return the native core object directly.

Not currently exported to other resources. Unlike Framework.Get/Framework.Is (which get flattened into Framework_Get/Framework_Is exports), client/init.lua and server/init.lua only loop over WCLibFramework's members when registering nested-table exports — there is no equivalent loop for WCLibRaw. WCLib.Raw is a table, not a function, so it's skipped by the main export loop too. The practical effect: wc:Raw_VORP() / wc:Raw_RSG() do not exist as callable exports today and will error with "no such export" if you try them from another resource. This is a gap in the library itself, not a documentation choice — see the note on the VORP & RSG compatibility guide.
Raw.VORP()shared

Returns VORP's native Core object directly. Returns nil with a console warning if vorp_core isn't running.

Usable today only from code that runs inside the wc_libs resource itself — _custom/client.lua and _custom/server.lua load in the same Lua state as WCLib, so they can call WCLib.Raw.VORP() directly without going through the export system at all.

example — from _custom/server.lua, wrapping it into a real export
local function setNickname(source, name)
  local Core = WCLib.Raw.VORP()
  if not Core then return end
  local ch = WCLib.GetCharacter(source)
  if ch then ch.setNickName(name) end
end

WCLib.SetNickname = setNickname
exports('SetNickname', setNickname) -- now other resources CAN call wc:SetNickname(...)
Raw.RSG()shared

Returns RSG's native RSGCore object directly. Returns nil with a console warning if rsg-core isn't running. Same export gap as Raw.VORP above.

Suggested fix for wc_libs itself. Add a third export loop next to the WCLibFramework one in both client/init.lua and server/init.lua: for fnName, fn in pairs(WCLibRaw) do exports('Raw_' .. fnName, fn) end. Until that ships, wrap any raw call you need in _custom/ and export it yourself, as shown above.
Reaching for Raw often enough? That's the signal to add a proper wrapped function instead — either contribute it back to wc_lib's modules, or add it once in _custom/ so every resource gets the clean version instead of repeating the raw call. See Custom overrides.

Real Wild County example — VORP-only honor bonus

wc_stagecoach/server/main.lua
if wc:Framework_Is('vorp') then
  wc:ApplySkillBonus(src, 'trading', 10) -- VORP-only skill system, see Skills page
end

Common mistakes

Troubleshooting