ekem-CitizenContact icon

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.

By ekem
Last updated 2 weeks ago
Total downloads 661
Total rating 1 
Categories Mods Libraries
Dependency string ekem-CitizenContact-1.1.0
Dependants 1 other package depends on this package

This mod requires the following mods to function

BepInEx-BepInExPack_IL2CPP-6.0.755 icon
BepInEx-BepInExPack_IL2CPP

BepInEx pack for IL2CPP x64 Unity games. Preconfigured and ready to use.

Preferred version: 6.0.755
Venomaus-SODCommon-2.1.5 icon
Venomaus-SODCommon

A common library for SOD mods.

Preferred version: 2.1.5

README

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