Lua API catalogs: Difference between revisions
Jump to navigation
Jump to search
Add player body and head catalogs |
Document 0.1a identities and synchronized spell catalog |
||
| Line 8: | Line 8: | ||
| [[Player skin catalog]] || [[setPlayerSkin]], [[setNpcSkin]] | | [[Player skin catalog]] || [[setPlayerSkin]], [[setNpcSkin]] | ||
|- | |- | ||
| [[Player body catalog]] || [[setPlayerBody]] | | [[Player body catalog]] || deprecated compatibility reference for [[setPlayerBody]] | ||
|- | |- | ||
| [[Player head catalog]] || [[setPlayerHead]] | | [[Player face catalog]] || deprecated compatibility reference for [[setPlayerFace]] | ||
|- | |||
| [[Player head catalog]] || deprecated compatibility reference for [[setPlayerHead]] | |||
|- | |||
| [[Player identity catalog]] || supported complete identity setter [[setPlayerIdentity]] | |||
|- | |||
| [[Synchronized spell catalog]] || basic synchronized spell set for G1R:MP 0.1a | |||
|- | |- | ||
| [[Monster type catalog]] || [[spawnMonster]] | | [[Monster type catalog]] || [[spawnMonster]] | ||
| Line 29: | Line 35: | ||
| [[getPlayerAmmunitionNames]] || Ammunition keys | | [[getPlayerAmmunitionNames]] || Ammunition keys | ||
|- | |- | ||
| [[getPlayerRuneNames]] || | | [[getPlayerRuneNames]] || All rune/spell-item keys; not a synchronization-support list | ||
|- | |||
| [[getSpellCatalog]] || All spell definitions and their <code>implemented</code> status; see [[Synchronized spell catalog]] | |||
|- | |- | ||
| [[getPlayerStatNames]] || Progression statistic keys | | [[getPlayerStatNames]] || Progression statistic keys | ||
Revision as of 11:36, 27 August 2026
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 |
| Synchronized spell catalog | basic synchronized spell set for G1R:MP 0.1a |
| Monster type catalog | spawnMonster |
Runtime catalogs
These functions return the authoritative keys supported by the running server build:
| Function | Values |
|---|---|
| getPlayerArmorNames | Armor keys |
| 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