CitizenContact
Library for other mods: lets citizens send you vmails, ring your phone and walk up to talk to you. Does nothing on its own.Citizen Contact
A library for other mods. On its own it does nothing: install it only if a mod asks for it.
It lets a mod have a citizen get in touch with you:
- vmail: a letter with text of its own, written when it is sent, with no DDS files to ship, or a fixed letter the mod sets up once, with the game's usual name substitutions;
- a phone call to your home or hotel room. Pick up and they say their piece (the game gives you no replies on an incoming call);
- walking up to you and starting a conversation, where the mod can offer replies of its own.
Only one call and one visit at a time, whichever mod asks, so they never pile up on you.
Letters with text of their own are kept in a file next to your save, so they still read correctly after you load it. If that file is lost, those letters open empty.
For mod authors
// A letter with text of its own. The first paragraph is the subject.
CitizenContact.Vmail.Send(sender, new[] { "Still around?", "Haven't seen you in a while.", "- Jane" }, "check-in");
// A fixed letter: ids are yours and must never change, they end up in saves.
CitizenContact.Vmail.Define(new Letter { Name = "MyMod_Hello", Tree = "...", Message = "...", Instance = "...",
Blocks = { new Block { Id = "...", Instance = "...", Text = "|receiver.casualname|," } } });
CitizenContact.Vmail.Send(sender, "<tree id>", "hello");
// A phone call. The answer is asked for when you pick up. null means no call (send a letter instead).
CitizenContact.Phone.Ring(caller, CitizenContact.Phone.KnownPlaces(), call => "It's me. Got your note.", "reply",
onMissed: call => SendLetterInstead());
// Walk up and talk. Show your replies only to them: Approach.CameToTalk(saysTo) in IsDialogShown.
CitizenContact.Approach.Start(citizen, "Hey, got a minute?", "favour", onGaveUp: v => TryLater());
Declare [BepInDependency(CitizenContact.PluginInfo.Guid)]. Your home cruncher only shows the
newest vmail without Cruncher List Fix,
so depend on that too.
Requirements
- BepInEx (IL2CPP)
- SOD.Common
