In Progress The 1.8.0 crafted sword gap bug

Users who are viewing this thread

Version number
v1.0.0.4407
Branch
Main
Modded/unmodded
No, I didn't use any mods.
Summary: Swords whose blades are longer than the default length have an unsightly gap between the crossguard and the blade. This issue has existed since the Early Access launch, but was recently made worse in the 1.8.0 update. Previously, only certain weapon parts would cause a gap to occur, but since 1.8.0, a gap will always occur if the sword's blade length is longer than the default.
How to Reproduce: Craft any sword using any parts and increase the length of the blade to any value greater than default
Have you used cheats and if so which: Yes, but simply to teleport around the map and spawn money in order recreate the bug quickly on a new (unmodded) save. This problem occurs on cheat-free saves as well.
Scene Name (if related): N/A
Media (Screenshots & Video): See below
Computer Specs:
OS:
GPU:
GPU Driver Version:
CPU:
RAM:
Motherboard:
Storage Device (HDD/SSD):

mjHoUY3_d.webp
tG07flw_d.webp
Zp0VLKd_d.webp
 
Summary: Swords whose blades are longer than the default length have an unsightly gap between the crossguard and the blade. This issue has existed since the Early Access launch, but was recently made worse in the 1.8.0 update. Previously, only certain weapon parts would cause a gap to occur, but since 1.8.0, a gap will always occur if the sword's blade length is longer than the default.
How to Reproduce: Craft any sword using any parts and increase the length of the blade to any value greater than default
Have you used cheats and if so which: Yes, but simply to teleport around the map and spawn money in order recreate the bug quickly on a new (unmodded) save. This problem occurs on cheat-free saves as well.
Scene Name (if related): N/A
Media (Screenshots & Video): See below
Computer Specs:
OS:
GPU:
GPU Driver Version:
CPU:
RAM:
Motherboard:
Storage Device (HDD/SSD):

mjHoUY3_d.webp
tG07flw_d.webp
I found it the bug.

Code here:
public void SwitchToPiece(WeaponDesignElement piece)
{
this.SelectedPieces[(int)piece.CraftingPiece.PieceType].SetScale(100); //This line of code causes bug, change it to match weapon blade length or delete it altogether.
CraftingPiece.PieceTypes pieceType = piece.CraftingPiece.PieceType;
WeaponDesignElement[] array = new WeaponDesignElement[4];
for (int i = 0; i < array.Length; i++)
{
if (pieceType == (CraftingPiece.PieceTypes)i)
{
array = piece.GetCopy();
}
else
{
array = this.CurrentWeaponDesign.UsedPieces.GetCopy();
if (array.IsValid)
{
array.SetScale(this.CurrentWeaponDesign.UsedPieces.ScalePercentage);
}
}
}
this.CurrentWeaponDesign = new WeaponDesign(this.CurrentWeaponDesign.Template, this.CurrentWeaponDesign.WeaponName, array);
this.ReIndex(false);
}

Some weapons have broken meshes or meshes at incorrect position, causing gap. Lod 4 of is aserai_noble_blade_4 is broken and only half the mesh or more like one triangle. While lod 1-4 of aserai_noble_blade_5 are at incorrect position, you need to substract -0.07 on all lod levels.
4ypHWzA.gif
 
Last edited:
Back
Top Bottom