Commit graph

4 commits

Author SHA1 Message Date
smthspec
e4cb0e4009 Rework interaction layer onto ZenProxyFramework proxy API
Furniture (sink/fridge/lekarnicka/vending) are house proxies, not entities, so
actions are now driven by ZenProxyFramework: actions target proxies by name
(GetZenProxyNameTarget), the proxy world position is synced to the server via
ActionData, repair spawns an invisible ZenProxySinkTest marker (presence =
repaired), and gather-water checks for it. Registry is keyed by proxy name;
loot tables / cooldowns / settings JSON kept.

NOTE: superseded approach - ZenProxyFramework does not compile on DayZ 1.29
(HouseType type-name collision). Next: a self-contained @YAProxy framework
(based on ZenProxyFramework + ShowMeInfoV2's geometry-LOD proxy scan) that
YAInteraction will depend on instead.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-19 09:07:02 +03:00
smthspec
1f63096cdb Fix mod loading: PBO prefix file + $profile path
Two issues prevented the mod from running on the live server:

- Add $PBOPREFIX$.txt (=YAInteraction) matching the toolchain convention so
  the packer mounts scripts at YAInteraction/... where config.cpp defs expect
  them. Without it the script modules were silently never compiled.
- Replace GetGame().GetProfileFolder() (undefined function in this engine build,
  caused a World module compile error) with the "$profile:" virtual path, the
  portable idiom used by ZenRepairWells / TerjeMods.

Verified on the live server: modules compile, MissionServer.OnInit runs, and
settings.json + interactables.json are generated under profiles/YAInteraction/.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-18 22:29:07 +03:00
smthspec
c1cd01f224 Replace EnScript config with JSON-based system
Move the registry, loot tables and scalar tunables out of hardcoded EnScript
into JSON loaded via DayZ's JsonFileLoader. Defaults are written to
<ProfileFolder>/YAInteraction/{settings.json,interactables.json} on first start
and read back (overriding code defaults) on subsequent starts.

- Add YAInteractionSettings (settings.json) and YAInteractionData
  (interactables.json) serializable classes with inline defaults
- Add YAInteractionConfigLoader singleton: MakeDirectory + FileExist driven
  load-or-save, plus client-safe in-code default fallback (EnsureDefaults)
- Load server-side via modded MissionServer.OnInit before players connect
- Gut YAInteractionConfig down to compile-time constants
- Rebuild manager lookups from loaded Data; update field names and float weights
- Remove redundant 5_Mission placeholder; update README

CF persistence and config hot-reload remain marked with // TODO (v2).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-18 21:45:56 +03:00
smthspec
ac90535b5e Initial commit: YAInteraction DayZ mod
Searchable furniture (med cabinet, fridge, vending machine) with weighted,
config-driven loot tables, and a two-stage repairable sink (repair then gather
water). Data-driven registry, in-memory cooldowns/repair state with v2 CF hooks.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-18 21:11:55 +03:00