Wiremod Documentation

repository·master·Indexed 20 days ago

https://github.com/wiremod/wire

A Garry's Mod addon that introduces entities capable of communicating via wires to build complex systems like robots, vehicles, and computers. Includes instructions for installation via Steam Workshop or Git, guidelines for submitting bug reports and pull requests, and technical details for creating custom Expression2 extensions using Lua.

Tokens
551
Snippets
2
Records
4
Agent score
20%

What's inside Wiremod

  1. Create custom Expression2 extensions

    master

    You can extend Expression2 by placing custom Lua files in the lua/entities/gmod_wire_expression2/core/custom/ directory. These files are automatically loaded by the system at runtime.

    To support both server-side logic and client-side rendering/functionality, use a dual-file naming convention:

    1. Server-side logic: Create a file with the base name (e.g., filename.lua). This file is loaded on the server.
    2. Client-side logic: Create a file prefixed with cl_ using the same base name (e.g., cl_filename.lua). This file is automatically transferred to and loaded on the client.

    Example File Structure:

    • foo.lua (Loaded on the server)
    • cl_foo.lua (Transferred to and loaded on the client)
    # Example for an extension named 'foo'
    foo.lua      -> Server-side
    cl_foo.lua   -> Client-side
  2. Install Wiremod

    master

    Wiremod can be installed via the Steam Workshop or by cloning the repository directly into your Garry's Mod addons folder.

    Workshop Installation

    Git Installation

    To install via Git, navigate to your Garry's Mod addons directory (steamapps/common/Garrysmod/garrysmod/addons) and run the clone command.

    git clone https://github.com/wiremod/wire