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.
{
"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
{
"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": "gunfire",
"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": "gunfire",
"IdSprite": "ranged_gun_rocket",
"IdSound": "attack_gun_rocket",
"Eject": false,
"FirePos": {}
},
"gun_laser_assault": {
"Num": 3,
"Delay": 0.1,
"IdEffect": "",
"IdSprite": "ranged_gun_laser",
"IdSound": "attack_gun_laser_assault",
"Eject": false,
"FirePos": {
"x": 0.28,
"y": 0.2
}
},
"shotgun": {
"Num": 1,
"Delay": 0.1,
"IdEffect": "",
"IdSprite": "ranged_fun",
"IdSound": "attack_gun_shotgun",
"Eject": false,
"FirePos": {
"x": 0.3,
"y": 0.18
}
},
"sling": {
"Num": 1,
"Delay": 0.1,
"IdEffect": "",
"IdSprite": "ranged_stone",
"IdSound": "throw",
"Eject": false,
"FirePos": {}
}
}Numis the number of shots in a burst.Delayis the animation delay in seconds.IdEffectis the ID of the muzzle effect. You may use Custom Effect. Default value isgunfire. Lasers and canes don't use this value.IdSpriteis 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.IdSoundis the ID of the firing sound. You may use Custom Sound. This can be set for all types of guns.IdSoundEjectis the ID of the ejecting sound. You may use Custom Sound. This can be set for all types of guns.Ejectdetermines whether there is a shell eject animation. This can be set for all types of guns.FirePosis 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.CaneColoris the optional tint override for cane type weapons, leave blank to use weapon's default element's color. The format isRRGGBBhex string. Only guns with traitToolRangeCanecan use this value.CaneColorBlendenables default color and override color blending for cane type weapons. Only guns with traitToolRangeCanecan use this value.ForceLaserforces the gun to use laser animation(added in 23.206 Nightly). This is not needed if gun has traitToolRangeGunEnergy.ForceRailforces the gun to use railgun animation. This is no longer the default behaviour for guns with traitToolRangeGunEnergy.
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:
{
"biubiu_gun": {
data
},
"rainbow_wand": {
data
}
}You can use console command cwl.data.load_effect_setting to reload all gun data.