Lore characters speak
A lore character says recorded lines out loud from its NPC, heard like a player's voice by the players near it, its mouth moving. It greets players, says goodbye, and reacts when bumped or threatened. It needs whip_voice and its voice bot, like Lore phone calls.
1. Give it linesServer owners
- Upload each recording as for a phone call.
- In
/whip→ Director → Lore characters, pick the character and open its Audio tab. - Press + Variant on a line, paste the recording's link, and add a subtitle if you like. Add as many variants as you want: it takes them in turn, never the same twice running.
- Play hears one as it will sound. Then Save.
| Line | When it says it |
|---|---|
| Hello | A player walks up (Hello when this close, 4 m). Once, until they've walked off and Greet again after (3 minutes) has passed |
| Goodbye | A player it met walks away (Goodbye when this far, 10 m) |
| React positive · React negative | A Lore Says card or a script asks: something went its way, or didn't |
| Bumped into · Hit by a car · Gun aimed at it · Gunfire nearby · Its car stolen | A player does it. The same reaction again only after Same reaction again after (6 s); a reaction cuts in on whatever it was saying |
A line with no variant isn't said. Its NPC must be in the world: a scenario NPC whose Lore character picker names it, standing or spawned by a card. A subtitle shows over its head as each player starts hearing the line (at once for a player too far to hear it).
2. In a scenarioServer owners
- Lore Says (the green Lore group): Who (empty is the scenario's own), Line, and Wait until it has been said. It goes on by done or failed (no NPC in the world, no such line, or no voice bot; the run's log says why).
- Play Custom Voice Line, for a line one scenario needs: Who, a Recording link (the same links accepted), an optional Subtitle, If it is already talking (say it after, the default; cut in; or skip it) and Wait until it has been said. It goes on by Said, Could not or Took too long.
- Bonus range (both cards, 0 to 250 m): for a line said from a car ahead or across a yard. The character is heard at full volume that much further out, fading over the usual distance past it, and its subtitle is seen as far. It waits a second first, so players now in reach hear it from the start. The next line is back to normal.
- Through a megaphone (both cards): its NPC holds one up as a player does, and the line carries further with the bullhorn sound. On the radio says it on a frequency as well as out loud: On the player's frequency (the one the radio of the player the card acts for is on; with their radio off it's said out loud only, and the run's log says so) or On a frequency (100 to 999). Everyone on that frequency hears it as a player's radio, breaking up with distance, while its NPC holds a radio to its mouth. Both last for that line only. The radio needs the voice bot from whip_voice 1.4.0 or newer.
3. The settingsServer owners
/whip → Settings → Config → Emotes, /me and talk has Lore characters speak (on/off) and Voice line links accepted (Fivemanage by default). The voice range (15 m) and the Hello, Goodbye and reaction timings are Config.LoreVoice in config.lua.
4. From your own resource
A lore character says one of its voice lines from its NPC, as the Lore Says card does. opts = { near = source, npcId, wait, busy, bonus, megaphone, radio }: near picks its NPC nearest that player (else npcId, else the first); wait = true returns once it's been said; busy ('skip', 'queue', 'cut') overrides the line's If talking; bonus is its Bonus range in metres; megaphone = true says it through a megaphone; radio is a frequency to say it on too, a whole number (whip_voice's GetPlayerRadio(source) gives a player's; one that isn't whole is refused, and one whip_voice won't take is said out loud only, with no radio in its hand, and named in the console). It waits while the recording is fetched: call it from a thread or a handler.
true (or true, 'queued'), or false, why: no such character, no NPC of it in the world, no such line, no voice bot. With wait, also when whip_voice stopped or the NPC went before it was saidlocal ok, why = exports.whip_core:LoreSay('irwin', 'positive', { near = source })
Checks a profile picture as WHIP takes one, for a resource that keeps its own (whip_phone's contact card). The link must be on the accepted sites (Picture links accepted); an empty link is no picture. frame is { x, y, z } as Edit picture makes it: the middle, 0 to 100 across and down, and the zoom, 1 to 3. It comes back cleaned; the plain framing (the middle, no zoom) is none.
true, frame (frame nil for none, and for an empty link), or false, why