All resources

rsg-fortuneteller – Docs (v3.0.1)#

Contents#

  1. Files
  2. How it works
  3. Configuration
  4. Events and commands
  5. Security
  6. Server owner how-tos
  7. Troubleshooting

1. Files#

FilePurpose
fxmanifest.luaManifest; depends on rsg-core, rsg-target
shared/config.luaPrice, cooldowns, interaction, timing, voices, machines
shared/lines.luaThe 72 fortune lines
shared/utils.luaShared helpers
client/main.luaMachines, animation, speech, interaction
client/dataview.luaBuffer helper
server/main.luaPayment, cooldowns, machine locks
server/versionchecker.luaGitHub version check
ui/Optional custom .ogg sound files (ui/sounds/)
locales/*.jsonen, de, el, es, fr, ja, nl, pl, pt-br, ro, ru

2. How it works#

  • Pay at a coin-operated machine, hand over cash, and the machine reads a random fortune using RDR2 FTELL voice lines. Nearby players within HearingDistance hear it.
  • Configured machines stream in and out by distance (StreamDistance); map-placed machines work too (AutoDetectExistingProps).
  • 72 game fortune lines, optional intro lines and custom .ogg files.
  • The player is charged only after the voice and animations are loaded, so failures never take money.
  • Hand-over animation with a pouch prop, machine glow and prop animation.
  • Interaction through rsg-target, falling back to the native G prompt.
  • Per-machine busy lock and an optional post-reading cooldown.

3. Configuration#

shared/config.lua:

OptionDefaultMeaning
DebugfalseDiagnostics and /fortunetest, /fortunespeech
Price1.00Cash per reading (0 = free)
CooldownSeconds0Per-machine cooldown after a reading
RequestCooldown2Per-player anti-spam seconds
Interaction'auto'auto, target or prompt
InteractionDistance2.0Range
TargetIcon, PromptKeymoon icon, GInteraction look
Approachtabledistance, lookHeight
PrepareTimeoutSeconds, MaxReadingSeconds, StartDelayMs, PauseBetweenLines, SpeechPaddingSecondsTiming
HearingDistance25.0Who hears the reading
Volume, SpeechParam, VoicesAudio
Model, StreamDistances_fortuneteller01x, 80.0Machine model and streaming
UseConfiguredMachines, AutoDetectExistingPropstrueWhich machines work
MachineAnim, Handover, LighttablesEffects
CoordinatesCommand'fortunecoords'Prints your vector4 for Config.Machines
IntroLines, CustomLinesExtra lines (.ogg in ui/sounds/)
MachineslistConfigured machine positions

4. Events and commands#

Events are named rsg-fortuneteller:<side>:<name>.

NameSideNotes
rsg-fortuneteller:server:requestserver event(clientKey, x, y, z) start a reading
rsg-fortuneteller:server:ready / failedserver events(id) client finished preparing / failed
rsg-fortuneteller:client:beginclient event(id, coords, sequence)
rsg-fortuneteller:client:playclient event(id, coords, sequence, starter) for nearby players
rsg-fortuneteller:client:stopclient event(id)
rsg-fortuneteller:client:denyclient event(msgKey, arg)
CommandWhoWhat
/fortunecoordseveryonePrint your position as a vector4
/fortunetest <lineId>debug onlyPlay one line
/fortunespeechdebug onlySpeech test

5. Security#

Server-authoritative: machine key, distance, price and cooldowns are all checked on the server, with a per-machine busy lock and a per-player anti-spam delay.

6. How-tos#

  • Add a machine: stand at it, run /fortunecoords, paste the vector4 into Config.Machines.
  • Free readings: Price = 0.
  • Custom voice: add .ogg files to ui/sounds/ and list them in CustomLines.

7. Troubleshooting#

ProblemFix
No interactionCheck Interaction and that rsg-target is running
No soundSpeech failed to load (no charge); try again; check Voices
"Busy"Another player is using that machine
Map machine ignoredAutoDetectExistingProps = true

Support the Project : https://rexshack.tebex.store/

<!-- BEGIN AUTO-REFERENCE (generated from the code; re-run the generator instead of editing by hand) -->

Technical reference#

Generated from the source of rsg-fortuneteller 3.0.1. Names, arguments and defaults below are read straight from the code.

Dependencies#

rsg-core, rsg-target

Configuration#

OptionDefaultNotes
Config.Debugfalseprints diagnostics and enables /fortunetest + /fortunespeech
Config.Price1.00cash per reading (0 = free)
Config.CooldownSeconds0per-machine cooldown after a reading
Config.RequestCooldown2per-player anti-spam (seconds)
Config.Interaction'auto''auto' = rsg-target if started, else native prompt | 'target' | 'prompt'
Config.InteractionDistance2.0
Config.TargetIcon'fa-solid fa-moon'
Config.PromptKey0x760A9C6FG
Config.ApproachtableHow the player lines up with the machine before a reading.
Config.PrepareTimeoutSeconds15── Timing ──────────────────────────────────────────────────────────────────
Config.MaxReadingSeconds120
Config.StartDelayMs750machine start -> first line
Config.PauseBetweenLines0.35seconds
Config.SpeechPaddingSeconds0.85breathing room after each line
Config.HearingDistance25.0── Audio ───────────────────────────────────────────────────────────────────
Config.Volume1.0CustomLines (.ogg) volume
Config.SpeechParam'SPEECH_PARAMS_FORCE'
Config.Voices{ 'FTELL', 'FORTUNE_TELLER', 'S_F_M_BWMWORKER_01', 'CS_FORTUNETELLER',Ambient voice names tried in order for the FTELL speech bank
Config.Model's_fortuneteller01x'── Machine ─────────────────────────────────────────────────────────────────
Config.StreamDistance80.0
Config.UseConfiguredMachinestrue
Config.AutoDetectExistingPropstrueallow map-placed machines that aren't in Config.Machines
Config.MachineAnimtableProp animation played on the machine itself.
Config.Handovertable── Handover (the player hands over cash before the reading) ────────────────
Config.Lighttable── Effects ─────────────────────────────────────────────────────────────────
Config.CoordinatesCommand'fortunecoords'prints your vector4 for Config.Machines
Config.IntroLines{}always played before the random fortune
Config.CustomLinestable.ogg files in ui/sounds/
Config.Machinestable── Machine placements ──────────────────────────────────────────────────────
Config.Linestable

Commands#

CommandNotesFile
/fortunetestclient/main.lua
/fortunespeechclient/main.lua

Locales#

Language files in locales/: de, el, en, es, fr, ja, nl, pl, pt-br, ro, ru. Set the language with setr rsg:locale "en".

<!-- END AUTO-REFERENCE -->