Skip to main content

Vote System

The Vote System Extension enables server-wide polling. Create votes with custom options, set deadlines, and let players cast their ballots.

Features

  • Custom Polls — Up to 10 options per vote.
    • Deadlines — Auto-closing dates.
    • Persistence — Votes survive restarts.
    • Live Results — Real-time placeholder data.

Entries

The extension is organized around a central VoteService, with one entry per concern:

EntryTypeDescription
vote_definitionManifestPoll configuration: options, deadline, messages.
vote_configManifestGlobal vote system settings.
vote_actionActionCasts a ballot for the triggering player.
vote_messageActionSends vote status/result messages.
vote_dataArtifactPersistent ballots and results.
vote_factFactExposes a player's vote state to criteria (gate content on having voted).
vote_cast_eventEventFires when a ballot is cast — wire follow-up triggers to it.

Quick Start

  • 1. Define — Add definition entries: vote_definition. These define the structures, entities, or rules the extension operates on. → vote_definition
  • 2. Create Storage — Add artifact entries to persist data: vote_data. → vote_data
  • 3. Trigger Actions — Use action entries to interact with the extension: vote_action. Trigger them from commands, NPCs, events, or other entries. → vote_action

Commands

Prefix: /tw vote

CommandDescription
/tw vote <id> <option>Cast vote.
/tw vote stats <id>View results.
/tw vote reset <id>Clear votes.

Placeholders

Prefix: %typewriter_vote_*%

PlaceholderDescription
%typewriter_vote_display_<id>%Poll title.
%typewriter_vote_total_<id>%Total votes.
%typewriter_vote_stats_<id>_<option>%Option count.

Permissions

PermissionDescription
typewriter.voteBase access to vote commands.
typewriter.vote.castCast a vote.
typewriter.vote.statsView vote statistics.
typewriter.vote.resetReset vote data.