Lua API catalogs: Difference between revisions

From Wiki G1R-MP G1 Remake Multiplayer
Jump to navigation Jump to search
Complete upcoming 0.1.9 documentation: weather, crafting UI, world removal, doors and ladders; preserve release status
Document upcoming 0.1.9 Discord Rich Presence: server Lua functions, callback, opt-in and owner setup; not a release
Line 141: Line 141:
See [[Update 0.1.9]] for the complete feature overview, including [[Item type stats]], [[Armor upgrades]], [[Female identities]] and [[Activity animations]].
See [[Update 0.1.9]] for the complete feature overview, including [[Item type stats]], [[Armor upgrades]], [[Female identities]] and [[Activity animations]].
<!-- complete019:end -->
<!-- complete019:end -->
<!-- discord019:start -->
== Discord Rich Presence (from 0.1.9) ==
'''Available from 0.1.9 (upcoming; not yet publicly released). Not included in public 0.1.8. Use matching updated clients and server.'''
[[Discord Rich Presence]]: [[setDiscordApplicationId]], [[getDiscordApplicationId]], [[getDiscordTimestamp]], [[setPlayerDiscordPresence]], [[updatePlayerDiscordPresence]], [[clearPlayerDiscordPresence]], [[getPlayerDiscordPresence]], [[getPlayerDiscordPresenceStatus]]. [[onPlayerDiscordPresenceStatus]] is the diagnostic callback. [[Discord Presence configuration]] provides server-owner setup and a complete starter resource.
<!-- discord019:end -->

Revision as of 09:35, 20 October 2026


See current Lua, resource and API limits for 0.1.3 BUILD81, all numeric server configuration bounds and all 59 statistic ranges. Lua API catalogs collect stable, server-validated keys used by G1R:MP resources. Prefer catalog keys and enumeration functions over hard-coded Unreal paths.

Static catalogs

Catalog Used by
Player skin catalog setPlayerSkin, setNpcSkin
Player body catalog deprecated compatibility reference for setPlayerBody
Player face catalog deprecated compatibility reference for setPlayerFace
Player head catalog deprecated compatibility reference for setPlayerHead
Player identity catalog supported complete identity setter setPlayerIdentity
Player tattoo catalog (available from update 0.1.3) setPlayerTattoo, getPlayerTattooNames
Synchronized spell catalog basic synchronized spell set for G1R:MP 0.1a
Monster type catalog spawnMonster
World item catalog (available from update 0.1.2) spawnItem and spawnTestItem
NPC and monster navigation collision (available from update 0.1.2) NPC and monster collision-source modes and resource-owned AI navigation blockers
Player animation catalog (available from update 0.1.2) startAnim, stopAnim and startNpcAnim; 118 earlier aliases, expanded to 962 in upcoming 0.1.9. Activity animation catalog lists all 844 additions; getPlayerAnimationNames and getPlayerAnimationInfo query the running server.

Camera scripting

Scripted camera and Camera Functions document camera poses, units, state fields, movement, paths, orbits and client/server ownership. These new functions and their client events are available from update 0.1.3.

Player customization

Player customization documents the seven skin-color and tattoo functions available from update 0.1.3, including RGB ranges, independent resets, tattoo removal and persistence. Existing setPlayerIdentity head/armor handling is improved from update 0.1.3; it is not a newly introduced identity API or a full NPC body replacement.

Observer-specific nameplates

Observer nameplates documents the 12 observer/nameplate-ID functions available from update 0.1.3. Text, whole-label visibility and numeric-ID policy resolve independently for each observer/target pair. The guide covers explicit versus effective getters, exclusive per-field resource ownership, lifecycle, configurable limits, developer-owned acquaintance persistence, and the optional /nametest resource. This is overhead presentation, not network anonymity.

Runtime catalogs

These functions return the authoritative keys supported by the running server build:

Function Values
getPlayerAnimationNames Player animation aliases (since 0.1.4); getPlayerAnimationInfo provides mode/timing/group metadata
getPlayerArmorNames Armor keys
getPlayerTattooNames Tattoo preset keys (available from update 0.1.3)
getPlayerWeaponNames Melee weapon keys
getPlayerRangedWeaponNames Bow and crossbow keys
getPlayerAmmunitionNames Ammunition keys
getPlayerRuneNames All rune/spell-item keys; not a synchronization-support list
getSpellCatalog All spell definitions and their implemented status; see Synchronized spell catalog
getPlayerStatNames Progression statistic keys
getPlayerSkillNames Skill keys
getPlayerGuildNames Guild keys

Example

local function contains(values, wanted)
    for _, value in ipairs(values) do
        if value == wanted then
            return true
        end
    end
    return false
end

if contains(getPlayerArmorNames(), "none") then
    setPlayerArmor(playerId, "none")
end

Client game-audio catalog (since 0.1.7)

Game dialogue catalog lists all 34,795 dialogue identifiers. Unlike the server-side catalogs above, getGameSoundCatalog is a client function; it searches SFX, music and dialogue metadata and supports pagination. Use getGameSoundInfo for entry metadata and Game audio for playback. Available since update 0.1.7. Catalog membership does not guarantee recording availability in every installed language or game version.

Native HUD and menus (since 0.1.7)

Five new client-side functions: showNativeHud, setNativeHudComponentVisible, setNativeMenuEnabled, getNativeUiState and resetNativeUi. Result event: onClientNativeUiResult.

See Native HUD and menus for component/menu keys, asynchronous results, multi-resource ownership, ordinary Lua key bindings and examples. The core API exists since 0.1.7; the crafting extension requires upcoming 0.1.9. Use matching client/server versions. Native save/load protection is independent of these resource-owned restrictions.

Character dimensions (since 0.1.8)

Server-side setPlayerDimension / getPlayerDimension, setNpcDimension / getNpcDimension, and setMonsterDimension / getMonsterDimension separate characters on the same map. See Character dimensions for appearance replay, direct private spawning, character-creator usage, ownership and the shared-world boundary. Requires matching 0.1.8 / Protocol 40 client and server.

Item statistics and interactive prefabs (upcoming 0.1.9)

Not yet publicly released; not included in public 0.1.8. Item type stats: eight server APIs for type-wide equipment/consumable/rune balance, with property support and ranges and resource-owned profiles. getItemTypes lists canonical keys; getItemStatDefinitions checks per-type support.

Interactive prefab catalog lists 94 entries: 18 seats, 48 lights/flames, seven doors and 21 ladder sizes. Interactive map objects separates local native tests from the server-owned shared door runtime. World model removal covers original-world inspection, hide/restore and live publication. See Update 0.1.9 for scope.

Armor bases and upgrade pieces (from 0.1.9)

Not yet publicly released; not included in public 0.1.8. Armor catalog lists all 26 bases (24 existing plus Royal Guard and Judge additions); Armor upgrade catalog lists all 84 authored parts and exact family presets. Armor upgrades explains ownership, full sets, individual slots, players/NPCs, numeric protection and persistence.

Eight new server functions: getArmorUpgrades, getArmorUpgradePresets, getPlayerArmorUpgrades, setPlayerArmorUpgrades, setPlayerArmorPreset, getNpcArmorUpgrades, setNpcArmorUpgrades, setNpcArmorPreset. Local-player and NPC checks are reported working; remote-human/late-join visual qualification remains pending. This is documentation, not a release announcement.

Activity animation expansion (from 0.1.9)

Available from 0.1.9 (upcoming; not yet publicly released). Not included in public 0.1.8. Both the server and observing clients need the matching update. Activity animations explains player/NPC playback, gathering, work, fishing with a cosmetic rod, four held fishing poses and visual-only gameplay boundaries. Activity animation catalog lists all 844 additions with modes and timing (962 total including the earlier 118). getPlayerAnimationInfo also gains four metadata fields. This does not add new start/stop function signatures.

Available from 0.1.9 (upcoming; not yet publicly released). Not included in public 0.1.8. Use matching updated server and clients.

Custom keys and placed doors

Custom keys: registerKeyDefinition, getKeyDefinition, getKeyDefinitions, getKeyModels, isPlayerKeyDefinitionReady, getWorldDoorPrefabs, setWorldDoors, validateWorldDoors, getWorldDoors, getWorldDoor, setWorldDoorKey, setWorldDoorLocked, clearWorldDoorKey, hasPlayerWorldDoorAccess. Existing inventory and spawn APIs accept the canonical custom key. World door prefab catalog lists placement aliases.

Further additions from 0.1.9

Available from 0.1.9 (upcoming; not yet publicly released). Not included in public 0.1.8. Use matching updated clients and server.

See Update 0.1.9 for the complete feature overview, including Item type stats, Armor upgrades, Female identities and Activity animations.

Discord Rich Presence (from 0.1.9)

Available from 0.1.9 (upcoming; not yet publicly released). Not included in public 0.1.8. Use matching updated clients and server.

Discord Rich Presence: setDiscordApplicationId, getDiscordApplicationId, getDiscordTimestamp, setPlayerDiscordPresence, updatePlayerDiscordPresence, clearPlayerDiscordPresence, getPlayerDiscordPresence, getPlayerDiscordPresenceStatus. onPlayerDiscordPresenceStatus is the diagnostic callback. Discord Presence configuration provides server-owner setup and a complete starter resource.