Skip to content

Specifying Sockets โ€‹

You can specify gun sockets by using the tag addSocket and addSocket(enchant_alias) in the Thing sheet. For example, addSocket,addSocket,addSocket(bane_god) will ensure 2 empty sockets and 1 socket with enchant God Bane will be added.

You can also use noRandomSocket tag to remove all random generated sockets before applying your own.

Import Ranged Weapon Data โ€‹

Sometimes you want to customize some data for your ranged weapon. The gun data is a JSON file located in your LangMod/**/Data/ folder, named EffectSetting.guns.json.

json
{
    "biubiu_gun": {
        "Num": 1,
        "Delay": 0.1,
        "IdEffect": "gunfire",
        "IdSprite": "ranged_gun",
        "IdSound": "attack_gun",
        "IdSoundEject": "bullet_drop",
        "Eject": true,
        "FirePos": {
            "x": 0.23,
            "y": 0.04
        },
        "FireFromMuzzle": false,
        "CaneColor": "",
        "CaneColorBlend": false,
        "ForceLaser": false,
        "ForceRail": false,
    }
}

This will import a gun data named biubiu_gun, which should match your ranged weapon ID. You can also use an existing weapon ID in the game to override it.

Here are the existing gun data in game:

Gun Data
json
{
    "gun": {
        "Num": 1,
        "Delay": 0.1,
        "IdEffect": "gunfire",
        "IdSprite": "ranged_gun",
        "IdSound": "attack_gun",
        "IdSoundEject": "bullet_drop",
        "Eject": true,
        "FirePos": {
            "x": 0.23,
            "y": 0.04
        }
    },
    "gun_assault": {
        "Num": 3,
        "Delay": 0.1,
        "IdEffect": "",
        "IdSprite": "ranged_gun",
        "IdSound": "attack_gun_assault",
        "IdSoundEject": "bullet_drop",
        "Eject": true,
        "FirePos": {
            "x": 0.48,
            "y": 0.04
        }
    },
    "bow": {
        "Num": 1,
        "Delay": 0.1,
        "IdEffect": "",
        "IdSprite": "ranged_arrow",
        "IdSound": "attack_bow",
        "Eject": false,
        "FirePos": {}
    },
    "gun_rail": {
        "Num": 1,
        "Delay": 0.1,
        "IdEffect": "",
        "IdSprite": "",
        "IdSound": "attack_gun_rail",
        "Eject": false,
        "FirePos": {}
    },
    "cane": {
        "Num": 1,
        "Delay": 0.1,
        "IdEffect": "",
        "IdSprite": "ranged_cane",
        "IdSound": "attack_cane",
        "Eject": false,
        "FirePos": {}
    },
    "windbow": {
        "Num": 1,
        "Delay": 0.1,
        "IdEffect": "",
        "IdSprite": "ranged_arrow_wind",
        "IdSound": "attack_windbow",
        "Eject": false,
        "FirePos": {}
    },
    "gun_mani": {
        "Num": 1,
        "Delay": 0.1,
        "IdEffect": "",
        "IdSprite": "ranged_gun",
        "IdSound": "attack_gun_shotgun",
        "IdSoundEject": "bullet_drop",
        "Eject": true,
        "FirePos": {
            "x": 0.23,
            "y": 0.04
        }
    },
    "gun_laser": {
        "Num": 1,
        "Delay": 0.1,
        "IdEffect": "",
        "IdSprite": "",
        "IdSound": "attack_gun_laser",
        "Eject": false,
        "FirePos": {}
    },
    "panzerfaust": {
        "Num": 1,
        "Delay": 0.01,
        "IdEffect": "",
        "IdSprite": "ranged_gun_rocket",
        "IdSound": "attack_gun_rocket",
        "Eject": false,
        "FirePos": {}
    }
}
  • Num is the number of shots in a burst.
  • Delay is the animation delay in seconds.
  • IdEffect is the ID of the muzzle effect. You may use Custom Effect. Default value is gunfire. Lasers and canes don't use this value.
  • IdSprite is the name of the projectile texture, which needs to be an existing texture in the game or a texture you placed in the Texture folder. Lasers don't use this value.
  • IdSound is the ID of the firing sound. You may use Custom Sound. This can be set for all types of guns.
  • IdSoundEject is the ID of the ejecting sound. You may use Custom Sound. This can be set for all types of guns.
  • Eject determines whether there is a shell eject animation. This can be set for all types of guns.
  • FirePos is the position offset of the muzzle effect relative to the center of the weapon. This can be set for all types of guns.
  • FireFromMuzzle (new!) determines whether the projectiles start from gun muzzle or by default from player's body. This can be set for all types of guns.
  • CaneColor is the optional tint override for cane type weapons, leave blank to use weapon's default element's color. The format is RRGGBB hex string. Only guns with trait ToolRangeCane can use this value.
  • CaneColorBlend enables default color and override color blending for cane type weapons. Only guns with trait ToolRangeCane can use this value.
  • ForceLaser forces the gun to use laser animation(added in 23.206 Nightly). This is not needed if gun has trait ToolRangeGunEnergy.
  • ForceRail forces the gun to use railgun animation. This is no longer the default behaviour for guns with trait ToolRangeGunEnergy.

Any value that you wish to use default for, can be omitted.

You may add as many gun data as you want in this file, simply separate them by , comma, such as:

json
{
    "biubiu_gun": { 
        data 
    },
    "rainbow_wand": {
        data
    }
}

You can use console command cwl.data.load_effect_setting to reload all gun data.