Ares-studio Documentation
  • Welcome
  • Ares Armory
    • ⭐Getting started
    • 🎨 Script Customization Guide
    • 🛃Custom weapon
Powered by GitBook
On this page
  1. Ares Armory

Custom weapon

Still in beta a fully web version is coming soon ! Webtool

🇬🇧 English Version

You’re free to customize this workflow as much as you’d like. Follow these five main steps:

1️⃣ Generate Anchor Data (Anchor Point Calculator)

  • Open the Anchor Point Calculator (link to be added).

  • Upload each part image (PNG, JPG, GIF).

  • Click Place Anchor Mode to drop anchors on every merge point.

  • Toggle Set Merge Pair, then click matching anchors.

  • Rearrange parts with Drag, use Bring to Front / Send to Back.

  • Click Calculate Anchor Info and download myweapon-anchors.json.

2️⃣ Build Your .js Config (Config Manager)

  • Open the Config Manager (link to be added).

  • Click Load Template → Empty Template.

  • Paste your anchor JSON into the parts: [] section.

  • Complete Workbench Data below. Example:

    workbenchData: {
      name: "MyWeapon",          // Internal ID
      displayName: "My Custom Gun", // Shown in UI
      description: "A sleek custom weapon.",
      type: "rifle",             // pistol | rifle | shotgun
      totalCost: {                // the cost of the weapon
        Receiver: 1,
        Barrel: 1
      },
      parts: [                    // IDs match your anchors output
        { id: "part1", name: "Receiver", description: "Main body.", image: "./assets/mygun/receiver.blueprint.png", category: "Receiver", cost: { metal_scrap: 6 } },
        { id: "part2", name: "Barrel", description: "High‑precision.", image: "./assets/mygun/barrel.blueprint.png", category: "Barrel", cost: { metal_scrap: 4, plastic: 2 } }
      ]
    }
  • Validate, then Export Configuration → save as myweapon.js.

3️⃣ Deploy Client‑Side

  • Copy myweapon.js to /html/guns/myweapon.js.

  • Ensure your HTML loads this script.

4️⃣ Update Server Config (server/config.lua)

  • Open server/config.lua.

  • Under Config.Weapons, add:

    Config.Weapons["myweapon"] = {
      jsConfig = "myweapon",
      model = "weapon_modelname",
      parts = { "part1", "part2" },
      display = "My Custom Gun"
    }
  • Under Config.Materials, define each part:

    Config.Materials["part1"] = { display = "Gun Receiver", craftTime = 8, costs = { metal_scrap = 6 } }
    -- Repeat for part2, part3, …
  • Save and restart your server.

5️⃣ Generate Blueprint Images (Blueprint Converter)

  • Open the Blueprint Converter (link to be added).

  • Upload PNGs or paste your blueprint config.

  • Download blueprint‑style PNGs to ./assets/[yourweapon]/.

  • Match filenames to your workbenchData.parts.

📂 See AK‑47 (ak47.js, Config.Weapons.ak47, Config.Materials.ak47part*) for examples.


🇫🇷 Version Française

Vous êtes libre de personnaliser ce processus autant que vous le souhaitez. Suivez ces cinq étapes principales :

1️⃣ Générer les Données d’Ancrage (Calculateur d’Points d’Ancre)

  • Ouvrez le calculateur (lien à ajouter).

  • Importez chaque image de pièce (PNG, JPG, GIF).

  • Cliquez sur Place Anchor Mode pour déposer les ancres.

  • Activez Set Merge Pair, puis cliquez sur chaque paire.

  • Réorganisez les pièces par glisser, utilisez Bring to Front / Send to Back.

  • Cliquez sur Calculate Anchor Info et téléchargez myweapon-anchors.json.

2️⃣ Créer Votre Config .js (Config Manager)

  • Ouvrez le Config Manager (lien à ajouter).

  • Cliquez sur Load Template → Empty Template.

  • Collez votre JSON d’ancre dans la section parts: [].

  • Complétez les Workbench Data :

    workbenchData: {
      name: "MyWeapon",          // ID interne
      displayName: "Mon Arme Perso", // Affiché dans l’UI
      description: "Une arme personnalisée élégante.",
      type: "rifle",             // pistol | rifle | shotgun
      totalCost: {                // Coût total des pièces
        Corps: 1,
        Canon: 1
      },
      parts: [                    // IDs correspondant aux ancres
        { id: "part1", name: "Corps", description: "Corps principal.", image: "./assets/mygun/receiver.blueprint.png", category: "Receiver", cost: { metal_scrap: 6 } },
        { id: "part2", name: "Canon", description: "Canon haute précision.", image: "./assets/mygun/barrel.blueprint.png", category: "Barrel", cost: { metal_scrap: 4, plastic: 2 } }
      ]
    }
  • Cliquez sur Validate, puis Export Configuration → enregistrez sous myweapon.js.

3️⃣ Déployer Côté Client

  • Copiez myweapon.js dans /html/guns/myweapon.js.

  • Vérifiez que votre HTML charge ce script.

4️⃣ Mettre à Jour le Config Serveur (server/config.lua)

  • Ouvrez server/config.lua.

  • Sous Config.Weapons, ajoutez :

    Config.Weapons["myweapon"] = {
      jsConfig = "myweapon",
      model = "weapon_modelname",
      parts = { "part1", "part2" },
      display = "Mon Arme Perso"
    }
  • Sous Config.Materials, définissez chaque pièce :

    Config.Materials["part1"] = { display = "Récepteur", craftTime = 8, costs = { metal_scrap = 6 } }
    -- Répétez pour part2, part3, …
  • Enregistrez et redémarrez le serveur.

5️⃣ Générer les Images Blueprint (Convertisseur Blueprint)

  • Ouvrez le convertisseur (lien à ajouter).

  • Importez vos PNG ou collez la config blueprint.

  • Téléchargez les PNG style blueprint dans ./assets/[votrearme]/.

  • Vérifiez que les noms correspondent à workbenchData.parts.


Vous êtes prêt ! Votre arme personnalisée s’affichera désormais en jeu avec tout le système d’assemblage, de craft et de visuels blueprint.

Previous🎨 Script Customization Guide

Last updated 1 month ago

🛃