RoyaleWind Documentation

website·Indexed 31 days ago

https://docs.royalewind.com

Documentation for RoyaleWind resources for FiveM and RedM, including RW Fashion for outfit boutiques, RW Buckets for routing bucket management, RW Transform for entity transitions, RW Voiceline for dialogs and announcements, and RW Datatables for UI handling.

Tokens
13.6K
Snippets
73
Records
107
Agent score
54%

What's inside RoyaleWind

  1. Overview of RW Fashion for FiveM

    RW Fashion is an outfit boutique resource for FiveM where players can browse complete looks on their own character, purchase them, and wear them immediately. Key features include:

    • Curated Outfits: Catalog entries are full looks rather than individual garments to maintain server style.
    • Player Marketplace: Players can list their own outfits for a fee and earn a share of every sale.
    • Dynamic Pricing: Supports recurring sale windows (by day/hour/store), job/gang discounts, and store-specific price multipliers.
    • Privacy: Shoppers are placed in their own routing bucket while browsing to prevent other players from seeing them change.
    • Security: Outfit contents are sealed on the server and only sent to the client after payment to prevent catalog ripping.
    • Automatic Photography: Saving an outfit automatically photographs the ped, crops the image, and uploads it to Fivemanage.
    • Framework Support: Out-of-the-box compatibility with qbx_core, qb-core, ESX, ox_core, and ND_Core. Supports ox_target or marker fallbacks.
  2. Overview of RW Buckets routing management

    RW Buckets is a standalone routing bucket manager for FiveM and RedM. It abstracts the game engine's native numeric routing bucket system—which isolates players and entities so they cannot see, hear, or collide with those in different buckets—into a system using string-keyed exports and admin commands. Key features include named buckets (e.g., 'mission_alpha'), automatic numeric ID allocation and recycling, helpers to move players and their vehicles simultaneously, and admin tools for auditing and resetting buckets.
  3. Manage routing buckets with rw_buckets Server API

    The rw_buckets Server API allows for the inspection and management of whole buckets. Buckets are created automatically when a key is first used via setPlayerBucket or setEntityBucket and are garbage-collected automatically once the last player or entity leaves. Users do not create or destroy buckets manually, except when using the killBucket function.
  4. Integrate RW Fashion with a custom framework

    If using a framework other than the built-in supported ones, you must implement a custom bridge:

    1. Open shared/bridge/framework/custom.lua.
    2. Set ENABLED = true and define the RESOURCE name.
    3. Implement all required functions for both server (player identifiers, name, job, gang, balance, money transactions) and client (login status, job, gang, load/unload events).
    4. In config/config.lua, set Config.Bridge.framework to 'custom' or leave it as 'auto' (custom takes priority).

    Note: Money functions must actually deduct funds, otherwise outfits will be free.

  5. Install RW Buckets for FiveM or RedM

    To install RW Buckets, ensure the required dependency ox_lib is installed. You can then download a release from GitHub or clone the source repository. For users who want the optional in-game buckets menu, the rw_datatable resource must also be installed.
    git clone https://github.com/RoyaleWind/rw_buckets.git
  6. Integrate with RW Fashion using Exports and Hooks

    To ensure stability across versions, developers should use official exports and hooks rather than internal net events.

    • For Purchases and Listings: Use the bought and listed hooks.
    • Internal Events: Events such as rw_fashion:admin:*, rw_fashion:privacy:*, rw_fashion:openStore, and rw_fashion:checkout are internal. They are validated on the server and may change between versions; avoid relying on them for custom integrations.
  7. Initialize RW Fashion database

    Database tables are automatically created on the first boot of the server. Alternatively, you can create them manually by running the provided SQL script: sql/install.sql.

    Created Tables:

    • rw_fashion_catalog: Outfit data
    • rw_fashion_wardrobe: Player ownership
    • rw_fashion_transactions: Sales and grants
    • rw_fashion_earnings: Pending seller earnings
    • rw_fashion_settings: Admin settings
    • rw_fashion_daily: Dashboard totals
  8. Modify RW Fashion behavior using Hooks

    RW Fashion allows developers to change resource behavior without modifying escrowed code using hooks. Hooks are registered in two specific files that remain readable: hooks/server.lua for server-side logic and hooks/client.lua for client-side logic. To implement a hook, uncomment the example in the respective file, modify the function body, and restart the resource.
    Hooks.on('canBuy', function(source, order)
        if order.total > 50000 and not IsPlayerAceAllowed(source, 'fashion.bigspender') then
            return false, 'no_access'
        end
    end)
  9. Install RW Fashion and its dependencies

    To install RW Fashion, extract the rw_fashion folder into your server's resources directory. The interface is pre-built and does not require compilation. The server must run OneSync and artifact 7290 or newer.

    Required Dependencies

    • Framework: Supports qbx_core, qb-core, ESX, ox_core, or ND_Core (detected automatically). Other frameworks require a custom bridge.
    • Libraries: ox_lib and oxmysql are required.

    Optional Dependencies

    • Targeting: ox_target (if not present, the resource falls back to an ox_lib marker prompt).
    • Photos: A Fivemanage token for outfit thumbnails.
  10. Open the in-game buckets management menu

    Use the buckets command to open an interactive in-game menu to view active buckets, inspect contents, or kill buckets.

    Requirements:

    • Permission: Restricted by cfg.ace.menu (default: god).
    • Configuration: useDataTables = true must be set in data/cfg.lua and a compatible datatable resource must be running.
    • Additional Permissions: The Kill and Reset Player actions within the menu require the hardcoded command.rw_buckets ACE permission.
    buckets
  11. Install RW Transform via GitHub

    To install RW Transform, you can either download a pre-built release from the GitHub releases page or clone the source code directly from the repository.
    git clone https://github.com/RoyaleWind/rw_transform.git
  12. Manage outfits and listings in the catalog

    The Listings tab allows staff to search and edit all outfits in the catalog (both store-owned and player-listed).

    Key actions include:

    • Editing Details: Modify name, description, collection, and price.
    • Updating Photos: Paste a direct image link.
    • Controlling Access: Specify which stores sell the outfit or hide it from the catalog entirely. Hiding an outfit stops it from being sold without removing it from players who already own it.
    • Granting Outfits: Use 'Give to a player' by entering a server ID to add the outfit to their wardrobe for free.
    • Deletion: The 'Danger zone' permanently deletes an outfit from all wardrobes that own it.