Skip to main content

preload_emote_key

Function preload_emote_key 

Source
pub fn preload_emote_key(project_dir: &Path) -> Option<u32>
Expand description

Resolve the project Emote DWORD before scene execution starts.

Priority:

  1. key.toml: emote_key, validated against an encrypted PSB when one exists;
  2. fallback user-cache key from an earlier run where key.toml was not writable;
  3. one Eluna DWORD bruteforce against the smallest encrypted dat/*.psb candidate.

A newly discovered key is written back to key.toml. Only if that write fails is the fallback user cache used. Failures are logged and do not abort engine bootstrap; later Emote loading can report the missing/invalid key precisely.