Features
My Cards
The wallet of papers and deeds: identity papers and licences, house and farm deeds, showing a paper, handing out keys, and Config.Kartlarim.
My Cards (kartlarim) is a wallet of the character's papers (identity, licences) and deeds (house, farm, shop, stable). Other resources write the records through server exports; the player reads them and uses them. Settings are in apps/kartlarim/config.lua (Config.Kartlarim) and apps/kartlarim/config_server.lua.
#What the player can do
- Browse two tabs of cards: papers and deeds. A card opens the paper itself: number, issuing office, signer, class, issue and expiry dates, terms and record history. A paper reads valid, suspended, expired or not valid. A deed shows its parcel number, owner, key holders and, when a script sets one, its yearly tax and due date.
- Show a paper or a deed to a player close by. They get a read-only copy that they can open within
SeenSeconds. - Give a key of an owned deed to a player close by, and take the key back. A key holder sees the deed with "I hold a key".
- Mark the location of a deed on the map. The route clears itself on arrival.
The first time the wallet is opened, an identity paper is made for the character when AutoIdentity.Enabled = true.
#What it needs
Other scripts to issue papers and deeds: a licence seller, a housing script, a court. The exports are IssueDocument, RevokeDocument, SetDocumentStatus, GetDocuments, HasValidDocument, AddDeed, RemoveDeed, TransferDeed, SetDeedTax, GiveDeedKey, TakeDeedKey, GetDeedAccess and GetDeeds. A type that is not in the config can be issued too; it shows plain.
lualocal book = exports['fx-pocketbook']
local id, number = book:IssueDocument(source, { type = 'avci', days = 30 })
target in the exports is a player source or a pocketbook character id ('vorp:12', 'rsg:ABC12345'). Every export answers a value, or false and a reason, and waits for the database, so call them from a thread or an event handler.
No signal, money or items are needed.
#Settings
| Key | Default | What it does |
|---|---|---|
Enabled |
true |
Turns the app on |
ShowDistance |
5.0 |
Metres for Show and Give a key. The server measures again |
PickerDistance |
15.0 |
Players up to this far are listed but cannot be picked |
ShowCooldown |
3 |
Seconds between two Shows |
SeenSeconds |
120 |
How long a shown paper can be opened by the other player |
MaxKeys |
8 |
Key holders per deed |
YearOffset |
-127 |
Year printed on papers = real year + this (2026 becomes 1899). 0: real year |
Waypoint |
{ RouteColor = 'COLOR_YELLOW', ArrivalDistance = 15.0 } |
The map route of Mark the location |
AutoIdentity |
{ Enabled = true, Type = 'kimlik' } |
Make an identity paper on first open. Turn off if an office sells identity papers |
DocumentTypes |
six types | kimlik, avci, balikci, silah, saglik, at |
DeedTypes |
four types | ev, ciftlik, dukkan, ahir |
Registrar |
{ name = 'E. Fontaine', role = 'Tapu memuru' } |
Signature under deeds |
A paper type:
luaavci = { label = 'Avci Ruhsati', icon = 'bow-arrow', color = 'green', prefix = 'AV', days = 30,
office = 'Serif Dairesi, Valentine', signer = 'L. Malloy', role = 'Serif', class = 'Buyuk av',
terms = 'Geyik, ayi ve bizon avina izin verir.' },
prefix starts the paper number, days is how long it is valid (0: no end), icon is a file name in preview/assets/mdi/, color is blue, green, teal, plum, red or ochre. An export can change every one of these fields for a single paper. A deed type has label, icon, color and prefix (the start of the parcel number when the export gives none).
#Server-only settings
apps/kartlarim/config_server.lua:
| Key | Default | What it does |
|---|---|---|
API.AllowedResources |
{} |
Resources allowed to call the exports. Empty: every resource on the server |
Identity |
a function | Extra lines for the automatic identity paper: birth, class, terms |
The shipped Identity function reads the birth date on RSG and the age on VORP:
luaIdentity = function(src, char)
-- char = { id, name, job, grade, framework }
return { birth = '1871-04-02' }
end,
Limit the exports to your own scripts:
luaAPI = { AllowedResources = { ['my-housing'] = true, ['my-licenses'] = true } },