Archetype Crafting

pure7angelpure7angel REGISTERED Posts: 22 Seed
Hi i'm Leann, and I'm the creator of the TUG Guide on Steam, I am trying to update it , but I keep coming across this "Crafting Archetype", I was wondering if someone can explain that to me more and how I would put that in my guide. Thank you.
Don't Waste Life


  • NekochuNekochu REGISTERED Posts: 244 Developer
    In our crafting recipes you can specify an archetype as a resource for the recipe. What this means is that one or several resources have been named a particular archetype in their schematic files, allowing them to be referenced as one item by the crafting system.

    Here is an example of what this looks like in the schematic file for Round Rock (Assets\TUG\Game\Core\Data\GameObjects\PlaceableObjects\Harvestables\Rock Round.txt)

    Equipable { name = "Round Rock" icon = "RockRoundGray" minScale = 1.0 maxScale = 1.0 category = "Hammer" tier = 1 resource = 1 damageToCharacters = 5 damageToObjects = 5 durability = 30.0 maxStackCount = 1 craftingArchetype = "Crude Rock Head" placementSound = "StonePlace" Equipment Slots { Tool } }

    So in this example this resource as well as the other rock tool heads have been identified as the same crafting archetype. Now if we look at a recipe that uses this:

    Fire Pit Recipe { Script = "Scripts/Recipes/DefaultRecipe.lua" LuaData { #Craft times are below unconsumedDamage = 3 priority = 2.0 Components { Wood { "Chopped Wood" = 3 } } Unconsumed Components { Stones { #Crafting Archetype "Crude Rock Head" = 2 } } Results { "Fire Pit" = 1 } Crafting Stations { Flat Rock { craftTime = 8.0 } } } }

    The recipe now looks for 2 of any type of "Crude Rock Head" resources. This saves from having to write recipes for every possible resource combination using these different tool heads and instead allows us to write one recipe using the archetype as its ingredient. You can also see that this method allows us to mix and match any number of these archetypes as part of the recipe components.

    If you dig through the crafting directory, you will find a new file listing all of the archetypes and their component list for more info. (Assets\TUG\Game\Core\Data\Crafting\ArchetypesCrafting_README.txt)

    Hope this helps!
    Twitter: @X_Nekochu_X
    Tumblr: xnekochux
  • pure7angelpure7angel REGISTERED Posts: 22 Seed
    Oh ok, so basically if you don't have one item but you do of the other and it accepts it in the recipe, you can use it.
    Don't Waste Life
  • NekochuNekochu REGISTERED Posts: 244 Developer
    It's purpose is really more for the designers/modders than anything else. It saves us having to have an exponential amount of recipe variations with instead having only one. So any recipes that can use a lot of variations as one of its resources now only needs that one definition for the archetype.
    Twitter: @X_Nekochu_X
    Tumblr: xnekochux
  • RawrRawr REGISTERED, Tester Posts: 511 Seed
    Programmer, designer, artist.
Sign In or Register to comment.