jayates

Member
Can 2 main skills be added to a craft? Such Cooking & exa:Lumberjacking?
I tried just putting a comma after SkillName Cooking and then adding Lumberjacking but it didn't work. Is this even possible?
I've searched alot and couldn't find anything supporting this.

public class DefCustomCooking : CraftSystem
{
public override SkillName MainSkill
{
get
{
return SkillName.Cooking;
}
}
 
There can be only one MainSkill, but you can add a secondary skill requirement by adding a method to the CanCraft method. For example, in DefBlacksmithy.cs, the CanCraft method calls "CheckAnvilAndForge" which is another method that looks to see if the player is near a forge. You could call your own method that checks to see if the player has the necessary secondary skill.

** EDIT **

I forgot about the built-in secondary skills. Thanks, @Falkor for pointing that out! That is much easier.
 
Last edited:
You can add other skills to crafting quite easily. This example is in DefCarpentry.cs:

Code:
                index = AddCraft(typeof(ShojiScreen), 1044294, 1029423, 80.0, 105.0, typeof(Board), 1044041, 75, 1044351);
                AddSkill(index, SkillName.Tailoring, 50.0, 55.0);
                AddRes(index, typeof(Cloth), 1044286, 60, 1044287);

So the main skill checks carpentry but this item also requires Tailoring, min skill of 50.0 and 100% success at 55.0. This approach makes it a lot easier to add a "custom" section to your existing cooking menu if you don't want to create an entire new tool /system.

The example also shows an additional required resource (cloth) for that item just in case you want to add another required ingredient.
 

Active Shards

Donations

Total amount
$0.00
Goal
$1,000.00
Back