Jump to content

Photo

Tutorial: Making New Smithing Recipes (pre-CK)


  • Please log in to reply
95 replies to this topic

#1
Samutz

Samutz
  • Members
  • Novice
  • Joined: 17-November 11
  • 41 posts
The Creation-Kit has been released. I recommend you use it instead.

I've received a lot of questions about how I made the Arrowsmith mod without the Creation Kit (CK). On top of that I don't have the time to fulfill everybody's requests and make every variation of the mod that every person wants.

So in this tutorial I'm going to explain how to create a simple recipe mod to make a Woodcutter's Axe out of Iron Ingots and Firewood. And hopefully this will help fellow modders figure out how to make their own or make changes to mine.
This may be updated in the future to reflect bug fixes or other discoveries.

Before You Start
  • You need a basic understand of hexadecimal numbers. All integers I mention are unsigned unless stated otherwise.
  • You also need to know that converting an integer or an ID to raw data requires reversing the bytes. For example, an ID of 01234567 becomes 67 45 23 01 in raw data.
    (Anytime I show data split up with spaces like 67 45 23 01, it's raw data.)
  • DO NOT save your esp file while Skyrim is running. It will cause TESsnip to crash and you will loose all of your changes since the last save.


Part 1: Install and configure Fall Out Mod Manager


Since there is no Skyrim Mod Manager or CK yet we have to use the latest FOMM. With a few tweaks it will work with Skyrim.

  • Open your Skyrim install folder and make a copy of TESV.exe. Rename the new copy falloutnv.exe.
  • Download and install FOMM: http://sourceforge.net/projects/fomm/
  • After installing FOMM, run FOMM and it will ask you to select a FallOut game. Select New Vegas.
  • When FOMM asks your for the game directory, select your Skyrim folder (where falloutnv.exe is located).
  • Sometimes FOMM will pop up an error about missing an INI file when you run it. You can ignore this error and continue.


Part 2: Creating a Basic Plugin File (ESP)

  • In FOMM, select TESsnip from the Tools Menu.
  • In TESsnip, select New from the File menu.
  • The new plugin will have one record by default. Double click this record and change the name to TES4 if it's not already.
  • From the Edit menu, select Add Master and select Skyrim.esm. (You may need to select Master Files from a drop down when browsing for the file.)
  • Select the TES4 record. With the TES4 record selected there will be several subrecords listed in the bottom left pane of the window.
    The first one is called HEDR. Double click HEDR and change the file version to 0.94.
    Leave record count as it is. We will change it later.
    Change the 3rd field (Unknown) to 2048.
  • The CNAM subrecord is the author's name. You can change this to your name if you'd like.
  • I recommend you save this plugin as a blank plugin for future use.


Part 3: Create the Recipe Record


Before continuing with TESsnip, you need to find the item IDs for all of the materials needed to make the item and the ID of the item that's being made. In this tutorial we need the item IDs of Iron Ingots, Firewood, and Woodcutter's Axe.

There are several ways to find the IDs. The easiest way is to look them up on the UESP wiki. Or you can look through the Skyrim.esm file using TESnip or Skyrim Viewer but that may be more difficult.

Another way is to use the game's console to do a search. To do this use the command help "query" 0, where query is your search term. This will give you a list of all the records in the game containing the query. You can scroll through a long list using PgUp and PgDn keys.

So our IDs are:
Iron Ingot: 0005ace4
Firewood: 0006f993
Woodcutter's Axe: 0002f2f4

Now that we have the IDs, let's continue in FOMM.

  • In the main FOMM window, right click Skyrim.esm and select TESsnip. It might take a few minutes to load the file.
  • In Skyrim.esm find the GRUP (COBJ) record group and select it.
  • In the Edit menu, select Copy.
  • Go back to your New plugin window and select the root of the plugin (it says New plugin or will be the filename if you saved it).
  • In the Edit menu, select Paste.
  • Delete all the records in the GRUP (COBJ) group (still in your plugin window).
    (This is the only way I know of to create a group in TESsnip. If anyone knows how to do it without Copy/Paste, let me know.)
  • Select GRUP (COBJ) and select New Record from the Edit menu.
  • Double click NEW_ and change the new to COBJ.
    Create a form ID and enter it in the form ID field (see Appendix A: Form IDs at the bottom of the post).
    In the Unknown 2 field enter 000e6917.
    In the Unknown 3 field enter 00020028. (I don't know what these 2 do. I took them from existing recipes)
    Click Save.
  • Select the COBJ record and select New Subrecord from the Edit menu.
  • Double click the NEW_ subrecord and change the name to EDID.
    In the large edit box on the right side, type an editor ID that's not already being used. For this tutorial we'll use RecipeWeaponWoodcutterAxe
    On the left side add a 00 byte to the end.
    Click Save.
  • Create a new subrecord. Double click it and name it COCT.
    In the hex (left) section of the editor, enter the number of materials that will be used in this recipe as a 4byte hex number. If you use stacks (eg. 10 Iron Ingots) the stack counts as 1.
    In this tutorial we have 2 materials, firewood and iron ingots. So enter 02 00 00 00.
  • Create a CNTO subrecord for each material. The data for this subrecord is split into two 4byte integers. The first 4 bytes is the item id and the last 4 bytes is the number of that item needed.
    For this tutorial we will enter the id for Iron Ingots (0005ace4) and the number (1) as E4 AC 05 00 01 00 00 00.
    Then for the Firewood (0006f993) we will create a second CNTO subrecord with the data 93 F9 06 00 01 00 00 00.
  • (Optional) If you want to have a requirement for this recipe, create a new CTDA subrecord and enter the data.
    See Appendix B: CTDA Subcrecords towards the bottom of the post.
    For the tutorial, we will not create this subrecord.
  • Create a CNAM subrecord. This is the ID of the item you want the recipe to create.
    For the tutorial, we will use the Woodcutter's Axe ID (0002f2f4), so enter F4 F2 02 00.
  • Create a BNAM subrecord. This is the ID of the station required to make the item.
    Smelter: CE 5C 0A 00
    Forge: 05 81 08 00 (use this for the tutorial)
    Skyforge: CE 46 0F 00
    Cooking Pot: B3 5C 0A 00
    Tanning Rack: 6A 86 07 00
  • Create a NAM1 subrecord. This is the number of the resulting item to create. This can either be a 2 byte or a 4 byte integer.
    For the tutorial enter 01 00.


Part 4: Finalize and Test


Almost done!
Go back to TES4's HEDR subrecord and change Record Count to the total number of GRUPs plus the TES4 record. For some reason this does not include records inside of GRUPs.
If you followed the tutorial, this will be 2. TES4 and GRUP (COBJ).
Now save your plugin as an esp file and enable it in Skyrim (Data Files in launcher or edit plugins.txt).
Load the game and visit a forge. You will find the Woodcutter's Axe recipe in the MISC section of the Forge.

If you would like to know how to move the recipe to another section besides MISC, follow the steps below.


(Optional) Part 5: Moving Your Recipe to a Different Menu


The data that determines where in the smithing menu the recipe appears is actually found in the resulting item rather than the recipe.
Each item contains keywords (like tags or categories) that affect where they appear in various menus, such as shopping menus, smithing menus, or in your inventory.
So to move your recipe to a different menu, you have to edit the keywords for that item, which also means overwriting the game's record for that item.

  • Open Skyrim.esm with TESsnip. Find the item and copy it and it's group record to your plugin.
    For the tutorial, copy the WEAP record Axe01 (0002f2f4).
  • TESsnip doesn't handle string references properly and causes the item name to display the string ID as a string instead of getting the actual string. The fix for this is to change the FULL subrecord to the actual name. This will need to be translated for translated versions of the plugin.
    For the tutorial, set the FULL subrecord to Woodcutter's Axe.
  • The KWDA subrecord contains the keywords for the item. Similar to the CNTO subrecord for COBJ (recipe) records, the KWDA subrecord can contain multiple values. Every 4 bytes is a keyword ID, corresponding to a KYWD record.
    Items crafted by recipes need a Material keyword in order to appear in one of the existing sections of the smithing menu. Without a Material keyword, the recipe will appear in the MISC section by default.
    Most Material keywords are either WeapMaterial or ArmorMaterial. These can be found in the KYWD records.
    For the tutorial, we want to add the WeapMaterialIron keyword, which is keyword ID 0001e718.
    So add to the end of the KWDA, after the existing keyword ID, 18 E7 01 00.
  • The last subrecord that needs to be modified is the KSIZ subrecord. This subrecord is an integer that specifies the number of keyword IDs used in KWDA.
    For the tutorial, we now have 2 keywords assigned to the item, so change KSIZ to 02 00 00 00.

And that's it! Update your record count, save your esp and load it in the game to test it out. You should find the Woodcutter's Axe in the Iron smithing menu.


Appendix A: Form IDs

Feel free to correct me if I'm wrong about this, but this has worked for me so far.
I believe form IDs are normally created automatically by the CK. But in this case we have to make up our own. The simplest way that seems to work is to have your form IDs start with 01. Then select a number (in hex) between 01 and FF for your own use to be the 2nd byte. Then use the remaining bytes to number your records. For example mine are 0188xxxx. 88 being the number I selected to identify my new records and xxxx being 0001, 0002, etc.

The difference between 00 and 01 ids:
The first two digits in the form ids are called the mod index. Everything in Skyrim.esm automatically has a mod index of 00. Additional esm/esp files will be assigned a mod index based on their load order. Since Update.esm loads after Skyrim.esm, it gets the mod index of 01. Plugins loaded after that will be 02, 03, 04, etc. Every 01 id and reference to a 01 id you include in your plugin will automatically have it's mod index changed based on what mod index that game assigns it. You'll only see this change in the game. It will not make changes to the plugin file itself. So as long as you give your new records a 01 id, you should be fine. Only use 00 ids to replace existing Skyrim.esm records or reference them.


Appendix B: CTDA Subrecords


CTDA subrecords specify conditions that must be met before the recipe will appear in the smithing menus. They are long and complex. Here's what I know so far.
Some of this I figured out from the CTDA_Field entry on UESP, but not everything matches up.

The CTDA subrecord is typically 32 bytes long.
00 00 00 00 00 00 80 3F C0 01 54 00 66 AD 03 00 00 00 00 00 00 00 00 00 00 00 00 00 FF FF FF FF

  • Operator and Flags
    This byte contains two properties. The first property is one operator.
    Possible values appear to be:
    • 00 - equal to
    • 20 - not equal to
    • 40 - greater than
    • 60 - greater than or equal to
    • 80 - less than
    • A0 - less than or equal to
    The second property is the flags, which are:
    • 01 - OR. Use this if use multiple CTDA subrecords and want to require either of their conditions to be met instead of both.
    • 02 - Run on target. By default the function is run on the player (such as player.HasPerk). I'm not sure what the target is when dealing with recipes.
    • 04 - Use global. Don't know what this does yet.
    So to complete this byte, add one operator and any of the flags together.
    For example 62 will use the "greater than or equal to" operator with the "run on target" flag enabled.
    83 will use the "less than" operator with the "OR" flag and "run on target" flag enabled.
    40 will use the "greater than" operator with no flags enabled.
  • Padding, does nothing apparently.
  • Value that the function will be compared to using the operator.
    The value is a float rather than an integer. Use this converter to convert your values.
  • Function used.
    You can find a list of functions here: http://mod.gib.me/sk....html#functions
    To get the value of a function to enter, take the function's id from the page, subtract 4096, and convert the result to hex.
  • More padding, but always seems to be 54 00.
  • Parameter 1, if required by the function.
  • Parameter 2, if required by the function.
  • More padding and a form id reference?
    This is another odd part. According to the wiki this part should be 4 bytes of padding, then 4 bytes for the reference id; 8 bytes total. But in all the CTDAs I've seen so far, this is 12 bytes long instead of 8 bytes. So I have no clue which part is the reference id, or if the last 4 bytes is something else completely.
Examples of CTDA subrecords I used in Arrowsmith

This CTDA subrecord checks if the player has the Steel Smithing Perk.
00 00 00 00 00 00 80 3F C0 01 54 00 0D B4 0C 00 00 00 00 00 00 00 00 00 00 00 00 00 FF FF FF FF
00 Checks if the result of the function equals 1.0 (00 00 80 3F)
C0 01 is the HasPerk function. It's id is 4544. Subtract 4096 and convert the result to hex and you get 01c0.
0D B4 0C 00 is the perk id (000cb40d) for Steel Smithing.

This CTDA subrecord checks if the player has the global value that determines if the player can smith Ancient Nord and Nord Hero gear at the Skyforge (unlocked via quests).
00 00 00 00 00 00 80 3F 4A 00 54 00 D1 46 0F 00 00 00 00 00 00 00 00 00 00 00 00 00 FF FF FF FF
00 Checks if the result of the function equals 1.0 (00 00 80 3F)
4A 00 is the GetGlobalValue function. It's id is 4170. Subtract 4096 and convert the result to hex and you get 004a.
D1 46 0F 00 is the global id (000f46d1) for SkyForgeSmithing.

This CTDA subrecord checks if the player has at least one Hagraven Feather in their inventory. The various leather recipes for the tanning rack use similar subrecords.
For example, the recipe that lets you make Leather out of a Fox Hide doesn't appear in the menu unless the player has at least one Fox Hide in their inventory. This prevents you from always seeing every single Leather recipe in the tanning rack menu.
60 00 00 00 00 00 80 3F 2F 00 54 00 66 AD 03 00 00 00 00 00 02 00 00 00 14 00 00 00 FF FF FF FF
60 Checks if the result of the function is greather than or equal to 1.0 (00 00 80 3F)
2F 00 is the GetItemCount function. It's id is 4143. Subtract 4096 and convert the result to hex and you get 002f.
66 AD 03 00 is the item id (0003ad66) for Hagraven Feathers.
This one has some additional stuff in the padding at the end, but I have no idea what it does.

Edited by Samutz, 07 February 2012 - 06:41 PM.


#2
ChairGraveyard

ChairGraveyard
  • Members
  • Adept
  • Joined: 10-November 11
  • 211 posts
Great tutorial! Can't wait to see more crafting mods. I haven't actually had a chance to use the Arrowsmithing in game yet, but I installed it as soon as I saw it. Awesome!

#3
Omnomnom25

Omnomnom25
  • Members
  • Pip
  • Curate
  • Joined: 10-November 11
  • 536 posts
  • Location:Cambridge, United Kingdom
Thanks for posting this here as well Samutz!

#4
Scion-of-Fenrir

Scion-of-Fenrir
  • Members
  • Acolyte
  • Joined: 14-August 11
  • 127 posts
  • Location:Brookings, SD, USA
Thank you, thank you, thank you! You have no idea how long I've been looking for one of these!

#5
Wild Ride

Wild Ride
  • Members
  • Novice
  • Joined: 15-November 11
  • 44 posts
Ahhh.....a bit of old school hackage.

Tips hat.

#6
Aridale

Aridale
  • Members
  • Novice
  • Joined: 21-February 02
  • 11 posts
I used this tutorial to make a mod. The game loads fine but when I use a forge theres no misc section! I have another mod that lets ya craft a misc item and with any combination of my mod and it I have no misc section. Is there somethin Im missin? is it tied to smithing skill?

#7
Samutz

Samutz
  • Members
  • Novice
  • Joined: 17-November 11
  • 41 posts
I've had several smithing mods enabled without any problem.

Does it work if you disable the other mod?

#8
Aridale

Aridale
  • Members
  • Novice
  • Joined: 21-February 02
  • 11 posts
it doesnt work at all. No combination of the mod I made with this tutorial and the lockpicksmith mod gives me a misc section at forges. Both on, Neither on, Mine off, lockpicksmith off, none of em.

#9
Samutz

Samutz
  • Members
  • Novice
  • Joined: 17-November 11
  • 41 posts
Oh, so the other one doesn't work either. Are you sure they're getting enabled? Check Data Files from the launcher or your %localappdata%\Skyrim\plugins.txt file.

#10
Aridale

Aridale
  • Members
  • Novice
  • Joined: 21-February 02
  • 11 posts
oh yeah their enabled lol this isnt my first rodeo =D

#11
Samutz

Samutz
  • Members
  • Novice
  • Joined: 17-November 11
  • 41 posts
Can you upload or send me yours so I can take a look at it?

#12
Aridale

Aridale
  • Members
  • Novice
  • Joined: 21-February 02
  • 11 posts
not currently Im at work. You can just look at lockpicksmith its almost exactly the same. It doesnt work for me either. I even looked at your mod to make sure mine was set up right and double checked everything 4-5 times

#13
Samutz

Samutz
  • Members
  • Novice
  • Joined: 17-November 11
  • 41 posts
I downloaded the Lockpicksmith from Nexus and the problem with it was that the CNAM was set to 05 00 00 00, which isn't an item. When I changed it to 0A 00 00 00 (the lockpick id) it worked fine. Also with my Arrowsmith mod enabled, so there didn't seem to be any conflict.

Edited by Samutz, 23 November 2011 - 01:58 PM.


#14
Aridale

Aridale
  • Members
  • Novice
  • Joined: 21-February 02
  • 11 posts
would it work with the wrong id and just crash? or would it not show a misc section? Either way it doesnt explain me not havin a misc section with my own mod which uses 0000000a

#15
Samutz

Samutz
  • Members
  • Novice
  • Joined: 17-November 11
  • 41 posts
If the id in CNAM isn't a valid item, then the game just won't show it. And the MISC section only appears if it has something to put there.
Although I do remember having some crashes at the forge when I was making Arrowsmith, but I can't remember what the cause was, but I think it was an incorrect id on one of the materials.
So double check the ids on all of the CNTOs and the BNAM too.

#16
Aridale

Aridale
  • Members
  • Novice
  • Joined: 21-February 02
  • 11 posts
Ill completely remake my mod from scratch tonight and see how it goes

#17
Plutoman

Plutoman
  • Members
  • PipPipPip
  • Diviner
  • Joined: 19-November 11
  • 2366 posts
(Optional) If you want to have a perk requirement for this recipe, create a new CTDA subrecord and enter the data: 00 00 00 00 00 00 80 3F C0 01 54 00 XX XX XX XX 00 00 00 00 00 00 00 00 00 00 00 00 FF FF FF FF where XX XX XX XX is the perk ID.
I don't know what the rest of the data is yet, just the perk ID.

I'm about 90% sure the 3F800000 code is the comparison value (in this case, 1), you can use others such as 96 to do a greater or equal to. The 005401C0 is the function it actually uses to compare. In this case, it's comparing against perk records, and it checks if the person has the perk.

Hope that helps. :)

(well, it doesn't necessarily help the coding, but it may explain some of it)

#18
Harkonian

Harkonian
  • Newbie
  • Layman
  • Joined: 23-November 11
  • 2 posts

I've received a lot of questions about how I made the Arrowsmith mod without the Creation Kit (CK). On top of that I don't have the time to fulfill everybody's requests and make every variation of the mod that every person wants.


Thanks for this! Really appreciate the time and effort you put into creating this tutorial.

One note, I was looking over your Arrowsmith mod while walking through the tutorial. In your TES4 record you have the record count set to 23 (35 in base10), but you only have 31 records. Bug, or am I missing something?


  • TES4
  • GRUP (AMMO)
  • GRUP (COBJ)
  • GRUP (WEAP)
  • GRUP (MISC)
  • +10 GRUP (AMMO) subrecords
  • +14 GRUP(COBJ) subrecords
  • +1 GRUP (WEAP)
  • +1 GRUP (MISC)

Edited by Harkonian, 23 November 2011 - 03:17 PM.


#19
Plutoman

Plutoman
  • Members
  • PipPipPip
  • Diviner
  • Joined: 19-November 11
  • 2366 posts
The TES4 record automatically counts the records.. so I'm assuming it's just something in there. :P

#20
Harkonian

Harkonian
  • Newbie
  • Layman
  • Joined: 23-November 11
  • 2 posts

The TES4 record automatically counts the records.. so I'm assuming it's just something in there. :P


Not according to the OP.

#21
Plutoman

Plutoman
  • Members
  • PipPipPip
  • Diviner
  • Joined: 19-November 11
  • 2366 posts
Oops, misread what was meant. Huh. Honestly, I've never had an issue with that arising. The mods I've done have never had that box changed. It's probably a miscount of some form or another.

#22
akbaa

akbaa
  • Members
  • Adept
  • Joined: 14-October 06
  • 232 posts
  • Location:I.S.S. Avenger NX-09
I just tried modifying a npc i married (Idgrod the Younger). While i managed to delete the entry for her "default equipment", her name is not displayed anymore. Instead it shows something strange.

Is it possible to fix this ?



About the default equipment, it seems as if every npc in game has a certain set of default equipment that gets restored every time. Once this entry (dotf) is deleted, i can give her anything i like and she wont revert to her default equipment :D

Edited by akbaa, 23 November 2011 - 03:56 PM.


#23
Plutoman

Plutoman
  • Members
  • PipPipPip
  • Diviner
  • Joined: 19-November 11
  • 2366 posts
When you replace a file, the FULL name originally links to a formID for the string, but is reset to be interpreted as an actual string. So change the name in the FULL column of the NPC to the NPC's name, and it should fix the problem.

#24
akbaa

akbaa
  • Members
  • Adept
  • Joined: 14-October 06
  • 232 posts
  • Location:I.S.S. Avenger NX-09
I did, but it doesnt exactly work..

While she is called Idgrod again, there will be part of the EDID string after her name.

Edited by akbaa, 23 November 2011 - 04:10 PM.


#25
Plutoman

Plutoman
  • Members
  • PipPipPip
  • Diviner
  • Joined: 19-November 11
  • 2366 posts
Not sure. I haven't done much with NPC's, as actual NPC's. Just creatures. I had a similar problem with Horses, I believe, but I had given up on the project for different reasons and I had assumed it was a simple fix. It's calling in some description from something as the wrong type of data. I'd have to take a more in-depth look, which prolly isn't going to happen right now. Hopefully Samutz or someone else knows the answer. :P

#26
akbaa

akbaa
  • Members
  • Adept
  • Joined: 14-October 06
  • 232 posts
  • Location:I.S.S. Avenger NX-09
Hopefully so..

Any idea what would happen if i simply changed the EDID to "Idgrod" instead of "IdgrodfTheYounger" ?

I got to admit, possibilities with this are quite nice : Changing her hairstyle, giving her "real" sandbox packages and so on...Not as good as creating a companion in the CK, but it will definitely suffice for now ;)
Reminds me a bit of how i modded Clover in Fallout 3 before the GECK was release ;)

#27
Plutoman

Plutoman
  • Members
  • PipPipPip
  • Diviner
  • Joined: 19-November 11
  • 2366 posts
It shouldn't change anything, but it may or may not fix it. Try it, it won't corrupt the game. The NPC is referenced through the formID, so as long as that's changed nothing should affect it.

If you can decipher anything in the AI packages, let me know. :P I've been trying to figure out the various flags in them. There's flags on the NPC's for various things that affect the AI, but a lot of it is unknown inside the package.

Edited by Plutoman, 23 November 2011 - 04:23 PM.


#28
Terra Nova

Terra Nova
  • Members
  • PipPipPipPipPip
  • Patriarch
  • Joined: 21-May 07
  • 11520 posts
Bookmarked...

#29
Samutz

Samutz
  • Members
  • Novice
  • Joined: 17-November 11
  • 41 posts

Thanks for this! Really appreciate the time and effort you put into creating this tutorial. One note, I was looking over your Arrowsmith mod while walking through the tutorial. In your TES4 record you have the record count set to 23 (35 in base10), but you only have 31 records. Bug, or am I missing something?

Yea, I noticed after I uploaded v3 of Arrowsmith that I forgot to change the record count, but didn't want to upload it again just to fix that when it doesn't seem to affect anything.
Looking at Update.esm. The record count is set to 64, but there's only 49 records. So I don't know. I would say set it just to be safe.

#30
Aridale

Aridale
  • Members
  • Novice
  • Joined: 21-February 02
  • 11 posts
I remade mine like I said I was goin to. It works now. I think the problem was it didnt have a MAST subrecord on the TES4 which isnt mentioned in your tut. =/

also... we cant add new recipes for the work bench?

Edited by Aridale, 23 November 2011 - 07:37 PM.



1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users