Kartik Scripts

Migrations

Move an existing server onto Kartik Properties without losing player homes. Each importer reads another housing script's tables from the same database and files the properties into the kp_* tables, including stash contents.


Supported sources

SourceCommandSource tables needed
sn-properties (Snak Properties)kp_migrate_snproperties (name set in migration/open/sn.lua)
Origen Housingkp_migrate_origenorigen_housing
BCS Housingkp_migrate_bcshouse, house_owned, house_apartment
NoLag (ps-housing lineage)kp_migrate_nolagbuildings, properties, properties_doors, properties_furniture, properties_owners, properties_prices, properties_renters, properties_rentprices

kp_migrate_sn also works as kp_migrate_sn_properties and kp_migrate_snproperties.

What gets imported

sn-propertiesOrigenBCSNoLag
Properties, owners and entrances✅✅✅✅
Shell / IPL / walk-in (MLO) interiors✅✅✅✅
Yard zones for walk-ins✅✅✅✅
Garages✅✅✅✅
Keyholders✅✅✅✅
Furniture layout✅✅✅✅
Stashes and their items✅✅✅✅
Wardrobes✅✅✅✅
Doors✅✅✅
CCTV cameras✅✅✅
Listing photos✅✅
Apartment complexes / buildings✅✅
Tenants (leases) and history✅

Furniture and placed points are converted into the right coordinate frame for each interior type: shell-relative for shells, absolute for walk-ins and IPLs. If a source shell is mapped to a different Kartik shell, the layout will be close but not pixel-perfect.

Not imported (NoLag): sink/shower/light-switch points (these are built into the shell here), per-keyholder point permissions (use access roles instead), listing tags, descriptions and contact numbers. The closing report counts every skipped item.


Before you start

  1. Back up your database.
  2. Import the old script's tables into the same database as Kartik Properties.
  3. Start Kartik Properties once so its own tables are created. The importer waits for this and aborts if the schema never finishes.
  4. Edit the mapping file for your source in migration/open/:
FileUse it to set
sn.luaSource table name, shell map, wardrobe/stash prop models, stash name patterns, default sizes
origen.luaShell map, stash name pattern, default stash/wardrobe/garage sizes
bcs.luaShell map, default shell, stash sizes (house, apartment, furniture stashes), garage slots
nolag.luaShell map and default sizes

Any shell name not in the map is used as-is, so you only need entries for names that differ.

Stash items

Stash contents are moved from the old stash id to the new one by your inventory bridge. This works with ox_inventory and qb-inventory. If the bridge can't move items (for example codem-inventory), the importer stops before importing anything, so no stash is left empty by mistake. To support another inventory, add RelinkStash to its file in bridge/inventory/server/.


Running an import

Run the command from the server console (it is refused in-game):

kp_migrate_sn
kp_migrate_origen
kp_migrate_bcs
kp_migrate_nolag

Run each importer once and check the result before restarting.

Already have properties? kp_migrate_sn, kp_migrate_origen and kp_migrate_nolag stop if Kartik Properties already holds properties that could collide with the imported ids. If you understand the risk, run the command again with confirm, e.g. kp_migrate_sn confirm.


After importing

Tidy imported deeds with the operator tools (run kp_ops to list them):

  • kp_assign_blocks (Block mode): assign each block-less imported property to the block that contains its entrance. Draw your blocks first, then run this.
  • kp_repair_block_geometry: fix any block left with an empty polygon.
  • kp_bulk_list_state: list imported state-owned stock For Sale at its stored price so citizens can buy it.

See Commands for the full operator toolset, and Admin Registry for drawing blocks.


Switching from Block to Classic mode

If you move a server from Block mode to Classic mode, properties and leases still held by companies would belong to nobody. Open Admin → Company → Job Migration (Classic mode only), pick a realtor job for each company, and its properties and tenancies move to that job's stock. Rent keeps flowing to the job.


Notes

  • Importers live in migration/ and are open (not escrowed), so you can adapt them to a different source schema. Open a ticket if you need a new importer.

On this page