Since I edited the mod the first time I encountered a few more problems.
As you may know, Terraria will not let you apply a modifier if the item does not have the respective stats like if you don't have a damage value on the item that is more than 5 you will not be able to get Legendary.
I found a solution.
In the MoonstoneWeapon.cs you should add the following lines inside the curly brackets of SetDefaults()
If you make the item have a damage, knockback, and mana value, it will let it have modifiers that edit those values.
Terraria cant apply legendary to an item with less than 5 damage. It also can't apply a mana cost modifier to an item with less than 5 mana. Knockback at 5 is just for consistency.
This will let you get every weapon modifier on the weapons moonstone...
It will let accessory mods on it as well, so I suggest you add these lines inside the curly brackets of ChoosePrefix(UnifiedRandom rand)
Thanks again! Could you please clarify what you mean with "get recognition for the code"? Do you mean I should give you credit somewhere? If so, I'd be happy to do so.
Hello, again Beetrootmonkey,
Since I edited the mod the first time I encountered a few more problems.
As you may know, Terraria will not let you apply a modifier if the item does not have the respective stats like if you don't have a damage value on the item that is more than 5 you will not be able to get Legendary.
I found a solution.
In the MoonstoneWeapon.cs you should add the following lines inside the curly brackets of SetDefaults()
item.damage = 5; item.knockBack = 5; item.mana = 5;
If you make the item have a damage, knockback, and mana value, it will let it have modifiers that edit those values.
Terraria cant apply legendary to an item with less than 5 damage. It also can't apply a mana cost modifier to an item with less than 5 mana. Knockback at 5 is just for consistency.
This will let you get every weapon modifier on the weapons moonstone...
It will let accessory mods on it as well, so I suggest you add these lines inside the curly brackets of ChoosePrefix(UnifiedRandom rand)
byte roll = (byte)rand.Next(1, 83) >= 3 ? (byte)rand.Next(1, 61) : (byte)rand.Next(81, 84); return roll;
It will exclude the accessory modifiers and still allow all the weapon ones.
As always I would prefer if I was given recognition for the code...
Thank you for your time,
Yangfu1000, The Shy Coder