In this page you'll learn how to mod weapons in Elegos. This can be either by changing an existing weapon or adding a new one
As in any other modding in the game you need to:
<mod name>/weapons
.fists.json
<mod name>/weapons
folder.You can still refer to this page to check the basics in doubt
First, you'll need to download an FBX or OBJ object (it's a 3D model), you can found some free online. Then, copy the file or files inside elegos folder, preferably inside the weapons folder with your .json file, like this:
Then, inside the json file you should have something like this (you can check below what each of these keys are and the values you can add:
{
"ID": "6effe6bb-9545",
"Name": "Mighty Paws",
"Damage": 10000,
"CriticalHitBoost": 500,
"CriticalHitChance": 1,
"Range": 20,
"FirstAttackDelay": 0.2,
"SecondAttackDelay": 0.2,
"Model": "weapawn.obj",
"IsPlayer": true,
"ModelScale": {"x":1,"y":1,"z":1},
"RotationOffset": {"x":-90, "y":0, "z":0},
"PositionOffset": {"x":-0.01, "y":0.31,"z":-0.02},
"FirstAttackAudioId": "Sound.SFX.Item.Chest_Open"
}
-------- TO DO
ID | Type | Description | Range |
---|---|---|---|
ID |
String | Mandatory if you are creating a new weapon, this should be unique for this object | |
Name |
String | A name, this is not visible in game yet | |
Damage |
Int | Mandatory if you are creating a new weapon, Damage dished out when hit | Between 1 - 500 |
CriticalHitBoost |
Float | Mandatory if you are creating a new weapon, % damage boost when a critical hit occurs. 0% boost to 500% boost | Between 0 - 500 |
CriticalHitChance |
Float | Mandatory if you are creating a new weapon, % chance that the damage will be a critical hit. 0% chance to 100% chance. | Between 0 - 1 |
Range |
Float | Mandatory if you are creating a new weapon, Distance from player/actor that this weapon can register a hit. Approximately in meters | Between 1 - x |
FirstAttackDelay |
Float | Mandatory if you are creating a new weapon, Time, in seconds, to the point of animation where damage is actually dished out | Between 0 - x |
FirstAttackAudioId |
String | Audio id of what sound to play | Visit the audio modding page for the list of availables audio ID |
SecondAttackDelay |
Float | Mandatory if you are creating a new weapon, Time, in seconds, to the point of animation where damage is actually dished out | Between 0 - x |
HitFleshAudioId |
String | Audio id of what sound to play when it hits someone elses | Visit the audio modding page for the list of availables audio ID |
HitMetalAudioId |
String | Audio id of what sound to play when it hits metal | Visit the audio modding page for the list of availables audio ID |
HitDefaultAudioId |
String | Audio id of what sound to play for anything else | Visit the audio modding page for the list of availables audio ID |
SwingAudioId |
String | Audio id of what sound to play when swinging the sword | Visit the audio modding page for the list of availables audio ID |
Model |
Enum | Mandatory if you are creating a new weapon, the OBJ or FBX file used for the model | |
IsPlayer |
Bool | Is this a weapon for the player? if false or not present, only the NPC will be able to use that weapon | true or false |
Override |
String | Mandatory if you are modding an existing weapon Id of the weapon you want to override, the available list is below this table | |
ModelScale |
Vector | Used to scale the 3D model of your weapon to the proportions of the game | {"x":float value, "y": float value, "z": float value} the values should be positive. More information on vectors in the next section |
RotationOffset |
Vector | This is used to rotate your object to display it in the right direction | {"x":float value, "y": float value, "z": float value} the values should be positive. More information on vectors in the next section |
PositionOffset |
Vector | Used to literally put the weapon in the right position (tha hand) of the player or NPC | {"x":float value, "y": float value, "z": float value} the values should be positive. More information on vectors in the next section |
Weapon | In-game ID |
---|---|
Player fists | y2pmcDtunk2IBogpabj3Sw |
Player sword | WR9EA-ZPAkS61piXKb4x_g |
NPC fists | qMKJbCPwY0iSW6AxU3ZwSA |
NPC sword | _IBDnOdmGEuzy8cKtHN1ww |
The default values of a model is 1,1,1 that's 1 for X, 1 for Y and 1 for Z. If you are not familiar with 3D environments here's a little sheat that can help you when you are scaling 3D models in Elegos
Changing the X value, would have this effect:
Changing the Y value, would have this effect:
And finally changing the Z value, would be noticeable from the profile:
The default values of a model is 0,0,0 that's 0 for X, 0 for Y and 0 for Z. If you are not familiar with 3D environments here's a little sheat that can help you when you are rotating 3D models in Elegos
Changing the X value, would have this effect:
Changing the Y value, would have this effect:
And finally changing the Z value, would be noticeable from the profile: