[B42-41] KR CoreOS - Shared Library & Modding API
Изображение 1 из 12. Материалы автора из Steam Workshop.
О материале
«[B42-41] KR CoreOS - Shared Library & Modding API» — материал мастерской Project Zomboid. Карты, транспорт, оружие и моды для выживания. Данные Steam, описание автора и ссылка для установки через подписку. Совместимость редакцией не проверена.
Описание автора
KR CoreOS
KR CoreOS is a backend library: the shared foundation of every KR mod and a distribution API open to any modder. On its own it adds no items or game mechanics - it provides the infrastructure that powers loot distribution, vehicle spawning and cross-mod extensibility across the whole KR ecosystem.
Install it alongside any mod that requires it. No configuration needed.
What It Provides
-
Item Distribution API - Registers items into world loot using 140 themed groups that cover every one of the 1418 loot containers in B42.20 (military, firearms, medical, electronics, food, clothing, tools, books, warehouse crates and more), each container in exactly one group. A single call - KRCore does the rest.
-
Distribution Combos - Ready-made combined groups. The old names (ELECTRONIC, MEDICAL, CRATES...) still work as combos, plus cross-cutting concepts: WAREHOUSE, POWER, FOOD, COLD_STORAGE, COOKING, WARZONE, TACTICAL, LAW and WORKSHOP.
-
Vehicle Distribution API - Registers custom vehicles into the world's spawn zones (neighborhoods, parking lots, traffic jams, junkyards, emergency services...) with the same named groups as items. See the vehicle section below.
-
Care Package Protocol - A lightweight extensibility system that lets future mods register and receive extra content without editing each other's code.
For Modders: Item Distribution
Writing distribution by hand means touching ProceduralDistributions directly: hunting container names one by one among 1400+ entries, repeating the same block for every item, maintaining two versions of the code if you support B41 and B42 at once, and praying no other mod stomps your table. CoreOS removes all of that.
Registering an item looks like this:
KRCore.dist.add("Base.MyItem", {
TACTICAL = 0.20, -- military + survival (combo)
ELECTRONIC = 0.10, -- electronics stores
})
What CoreOS handles for you:
-
Full, verified coverage - 140 themed groups map every loot container in the game (all 1418, re-verified against B42.20), each in exactly one group with no overlaps. You don't need to know a single container name.
-
One codebase for B41 and B42 - Groups mix container names from both builds; each version uses its own and silently ignores the rest. You write the call once.
-
No mod conflicts - Registrations are queued and flushed together at the right point in the load cycle. Nobody overwrites anybody.
-
No duplicates - If two groups share a container, CoreOS deduplicates it automatically.
-
Precise overrides - custom containers take priority over groups: you can pin a special chance on one specific container without giving up the whole group.
-
Future-proof - When the game renames containers, it's fixed once in CoreOS and every dependent mod is fixed without shipping anything.
For Modders: Vehicle Distribution
The vehicle API works just like the item one, but over VehicleZoneDistribution. Instead of raw PZ zone names, you register your vehicle with named zone groups:
KRCore.dist.addVehicle("Base.MyVehicle", {
CIVILIAN = 3, -- normal neighborhoods and parking (combo)
JUNKYARD = 6, -- more common among the wrecks
})
-
Zone groups (VZONE) - RESIDENTIAL, PARKING, POOR, RICH, DEALERSHIP, TRAFFIC, JUNKYARD, COMMERCIAL, FARM, AIRPORT, POLICE, PRISON, FIRE, AMBULANCE, RANGER, SERVICES, ADVERTISING and STORY.
-
Combos (VCOMBO) - CIVILIAN, WRECKS, EMERGENCY, WORK, URBAN and ANYWHERE (recursive, deduplicated union, just like the item combos).
-
The number is a spawn weight - vanilla cars sit between 2 and 30; use 1-3 for a rare-but-findable modded vehicle.
-
The same guarantees as items - custom per-zone overrides, dedupe by table (the four traffic-jam zones share one table, so TRAFFIC covers all four directions with a single write), zone-name validation, and backward compatibility: raw zone names still work unchanged.
Real example: KR FriOS delegates its FriOS StepVan spawning to this API instead of touching VehicleZoneDistribution on its own.
Documentation & Source
Full documentation - groups, combos, the probability table, item and vehicle examples, and common pitfalls - is in the mod discussion, and the source code is in the GitHub repository.
Mods That Use It
-
KR FriOS - Fridges, freezers, portable electric stoves, a charger and the refrigerated FriOS StepVan.
-
KR SolarOS - Solar chargers and portable generators that power your base with no fuel.
Other Mods
Compatibility
-
Build 41 (41.78.7) ✔ - CoreOS's B41 support is here to stay
-
Build 42 (42.20.4) ✔
-
Singleplayer ✔
-
Multiplayer ✔
-
No known mod conflicts
Future Content
KR CoreOS is the foundation of every upcoming KR mod. As new mods release, they declare KR CoreOS as a dependency and register through its API - with no need to update the existing mods.
Steam Workshop ID: 3714654032
Mod ID: KRCoreOS
Mod Version: 1.2.3
Как установить и запустить
Откройте оригинальную страницу в Steam Workshop, проверьте версию игры, зависимости и порядок загрузки в описании автора. Нажмите «Подписаться» и дождитесь загрузки Steam. Включите материал в меню модификаций или контента игры, если это требуется. Совместимость и запуск редакцией не проверены.