Lanterns
KCD:MP adds two items to every player’s game, a lantern and a fine lantern. A player carries one exactly like the torch: it goes in the inventory’s torch slot, the torch key raises and lowers it, it stays in the left hand beside a one-handed weapon, on foot, sprinting and in the saddle, and it is lit while it is in the hand - the lantern’s own candle with the torch’s light around the player. Every other player sees it lit in the hand.
| Name | English name | Weight | Price | GUID |
|---|---|---|---|---|
kcdmp_lantern |
Lantern | 1 | 15 Groschen | 6ac44bf4-e42a-424b-920f-81a1bdd3bc46 |
kcdmp_lantern_fancy |
Fine lantern | 1 | 40 Groschen | c01e755f-8bb9-4325-baaa-9694a45d48bb |
The game itself has no lantern a player can own, so neither is in the item lists - but every server knows both by name, English name and GUID, with or without the tables export:
- Give, take and keep them like any item:
GivePlayerItem,SetPlayerInventoryandGetPlayerInventory(so a mode’s database keeps them), chests, saddlebags, pickups (CreatePickup) and the admins’/give kcdmp_lantern.GetItemInfoanswers both. - Sell them:
SetShopItemwith the name - the shop shows the item and its price like any other. - Make your own on one:
DefineItemwithbase = "kcdmp_lantern"gives a lantern of your own name, text, weight and price; it is carried and lit the same way. - Light an NPC actor’s way:
SetActorTorch(id, true, "lantern")(or"lantern_fancy");GetActorLightsays which light an actor holds. - Their names in your players’ language: the names and descriptions in the inventory are English. A mode words them with
SetTextOverride- the keyskcdmp_ui_nm_lanternandkcdmp_ui_in_lantern(the lantern’s name and description),kcdmp_ui_nm_lantern_fancyandkcdmp_ui_in_lantern_fancy(the fine lantern’s).
-- lanterns for sale at the general trader (15 and 40 Groschen, unlimited stock), named in German for German playersSetShopItem(trader, "kcdmp_lantern", 15)SetShopItem(trader, "kcdmp_lantern_fancy", 40)SetTextOverride("kcdmp_ui_nm_lantern", "Laterne", "german")
-- and one for the night watch's new recruitfunction OnPlayerCommandText(pid, cmd, args) if cmd == "enlist" then GivePlayerItem(pid, "kcdmp_lantern", 1) return true endendA player whose game could not add the two items (rare: a game update KCD:MP does not support yet) is never given one -
GivePlayerItem gives that player nothing, and the server’s log says so.
