First and foremost, you will need DBEditor itself, the latest version can be found[/COLOR]
HERE.
Secondly, you will need Pack File Manager 1.12 (referred to as PFM 1.12 from here on out), the latest version of which may be found HERE[COLOR=Black].
Creating a New Unit and Modding an Existing One
Our goals for this tutorial:[/FONT]
1. Create a new Line Infantry unit, Swiss Line that will be a limited recruitment Line Infantry unit, recruitable only in Europe.
2.Mod the Ottomans Nizam I Cedit Infantry to be a larger unit with slightly weaker stats.
Step 1: Creating My_Mod.pack and the Necessary Tables
Firstly, open up DBEditor, then open the Navigator Bar and select the \units table.
Now go to File --> New units_tables Table and click on it.
Enter "My_units" as the Table name, and select the New pack file radio button, entering "My_Mod.pack" as the new .pack file name.
Click OK.
Now use the Navigator Bar to go to \unit_stats_land (6 tables up from \units).
File --> New unit_stats_land_tables Table.
Enter "My_unit_stats_land" as the new table name. This time, however, since My_Mod.pack has been created, make sure the Existing pack file radio button is selected, and select "My_Mod.pack" from the list below.
Click OK
Repeat for: \unit_to_unit_abilities_junctions, using "My_unit_to_unit_abilities_junctions" for the new table name.
\units_to_groupings_military_permissions; using "My_units_to_groupings_military_permissions" for the new table name.
\building_units_allowed; using "My_building_units_allowed" for the new table name.
Putting each in the Existing pack: "My_Mod.pack".
Step 2: Modding an Existing Unit
Now that My_Mod.pack has been created, and contains the necessary tables to do what we want, it is time to actually put something in those tables.
Let's start off with modding the Nizam I Cedit Infantry, since that is a simple operation involving only 1 of the newly created tables, and it will introduce the basic concepts that are needed for later.
Navigate to \units_stats_land, not \My_unit_stats_land. Scroll down until you find "nizam_I_cedit_infantry", it will be in the first column which is highlighted in yellow. Now, click on the cell-looking-thing next to the Unit cell (one of the buttons boxed in RED in the below picture), this will select the entire row.
Once done, go to Edit --> Copy.
Navigate to the BOLD \My_units_stat_land table. It will be empty. Highlight the row with the asterisk (*) the same way we selected the "nizam_I_cedit_infantry" row in the other table. Then, go to Edit --> Paste.
Once done your \My_unit_stats_land table should look like this:
Now Save, don't worry about the "12_lber_howitzer" entry, it will remain on screen, but will not save. You can delete the row if you wish by selecting the row and hitting the <Delete> key. Once saved, the new line will no longer be highlighted in GREEN.
Now to mod the unit proper, since the whole Ottoman philosophy is generally "quantity before quality", we are going to change the number in the "Size" column from 160 to 200. Now to offset the upset balance of a bigger unit, we should change their stats. Scroll over until you see the "Accuracy" column, let's reduce this from 40 to 35. The "Reloading Skill" column should be right next door, let's change it from 35 to 25. Finally let's find the "Morale" column and reduce it from 9 to 8.
You'll notice how after you modify a cell and then select another cell, the previous cell will highlight RED, a cool feature indicating a cell has be changed from it's original value.
Once everything we care to mod has be modded, Save.
Congratulations! You have now created a simple mod, at this point you can close DBEditor and load up My_Mod.pack if you wish to see your changes in action! 
Step 3: Creating a New Unit
Now that the Nizam's have modded, let's get on to the Swiss Line. Remember all those other tables we created? Well now it's time to fill them.
Since DBEditor takes a relational approach to displaying and editing information, we first need to create an entry in \My_units. Navigate to \units (NOT \My_units) and find the "euro_line_infantry" row, select and copy it to the \My_units table like we did for the Nizam's in \My_unit_stats_land. Your \My_units table should now look something like this:
Save, and let's get down to business. The first step is to create a new Unit_ID, let's go with "swiss_line", next we'll modify the Screen_Name to "Swiss Mercenaries". Category and Class are fine, fiddle with Costs and Turns_to_Build if you want. The next thing we want to do is give them a new Recruitment Icon, scroll over to the "unknown5" column, change the entry from and "euro_line_infantry" to "Euro_Superior_Line_Infantry", this will give them the same Recruitment Icon as the Coldstream Guards, and make spotting them in the Recruitment roster easier. Finally, lets limit their recruitment to 3 regiments per faction, scroll over to the "Unit_Limit" column and change the entry from 0 to 3.
Save the Table!
Next up will be to create an entry in \My_unit_stats_land, navigate to \unit_stats_land (again NOT \My_unit_stats_land), find the "euro_line_infantry" row and copy it over to \My_unit_stats_land. Here's where we begin to see the genius of DBEditor. Once pasted and saved, notice how the "Unit" column is not directly editable, instead we see an arrow on the right side of the cell that opens up a drop-down menu of every unique Unit_ID in every \units table (including the one we created).
Aside on Drop-Down Menus
Click the arrow, then scroll the drop-down menu to the bottom to find our Unit_ID entry, "swiss_line", click on it, and the entry in the "Unit" column will change to "swiss_line". Now let's fiddle with the units stats. Since this is a semi-elite unit, lets increase their "Size" from 160 to 200, also lets give them a different model, say the Republican Guard model, so change the "Model Name" column entry from "euroline" to "euro_republican_guard". We should increase their "Accuracy" from 40 to 45, and their "Reloading Skill" from 25 to 35. Since the Swiss are the stereotypical Pike users let's give them an advantage in melee as well. Say "Melee Skill" from 6 to 10, "Charge Bonus" from 9 to 11, and "Defense Skill" from 10 to 12. Finally, lets change the "Training" column entry from "trained" to "well_trained" (this will give us a more disciplined formation) and the "Morale" column entry from 7 to 10.
Your \My_unit_stats_land table should now look something like:
Save the Table!
A Quick Aside on the Aggregate Tables
Now that the unit exists, it is time to grant it some abilities. Navigate over to the \unit_to_unit_abilities_junctions table (again NOT \My_unit_to_unit_abilities_junctions), find the "euro_line_infantry" rows, select them all (by selecting the first row, then holding the <SHIFT> key and selecting the last row) then copy and paste them into \My_unit_to_unit_abilities_junctions (don't worry that when you paste you only have the one asterisked line selected, DBEditor will automatically create all 5 lines for you). Using the drop-down menus in the "Unit_IDRef" column, set all the new entries from "euro_line_infantry" to "swiss_line" (Remember, our entry is at the very bottom of the list). Once finished your \My_unit_to_unit_abilities_junctions should look like:
Save the table!
Our new Swiss unit is really taking shape, it now exists and has abilities, next up is to set which faction groups will be able to recruit our new unit. Navigate to the \My_units_to_groupings_military_permissions table (yes OUR table NOT the CA one). It's time we graduated from crawling to walking, so we are going to mod this table without Copy and Paste. The first thing to do is open up the "Unit_IDRef" drop-down menu on the asterisked line, and locate "swiss_line" at the bottom, select the entry. Instantly a new row will be created in the table above the asterisked line with "swiss_line" as the "Unit_IDRef" column entry.
Now we should edit the group, since our Swiss Infantry unit is meant to be European only, the first group entry should be the Austria group (containing Austria, their version of rebels, Hungary, Bavaria, Westphalia, and maybe others, look at the \factions table, Military Group Column to find out which faction belongs to which group), so open the "Military Group" drop-down menu and select "austria_group". Now that we know how to create new rows on our own, go ahead and create additional entries for "france_group",
"great_britain_group",
"prussia_group",
"russia_poland_group",
"spain_group",
"sweden_denmark_group",
"united_provinces_group", and
"venice_group".
This will allow all European factions, even minor ones, to recruit our unit. Once done, the table should look like this:
Save the Table!
So, now we have our unit, it exists, has abilities, and can be selected in custom battles by the faction groups we assigned it to. We are nearly done! Only 2 more tasks to go, making our unit buildable in the campaign, and putting it in localisation.loc so it has a screen name and doesn't crash battles
.
Seeing as making the unit buildable is also done in the DBEditor, we'll navigate over to the last table we added: \My_building_units_allowed. Just like in the last table (\My_units_to_groupings_military_permissions), open up the "Unit" column (the second column) drop-down menu and select "swiss_line" at the bottom, creating a new line. This time around, we have 2 columns without drop-down menus, "Experience" and "Unknown", but when the new line is created DBEditor automatically fills them with a default value. This doesn't always happen, since not every entry in a row needs a value, but DBEditor is smart enough to know which is which. Anyway, back to modding. Now that we have a new line, we need to set the "Building_IDRef" to a building that we want to create our unit, since our unit is better than a standard Line Infantry unit, we should limit the Barracks that can recruit our unit to higher level ones than normal, let's say, Military Academy and above. So we are going to need 6 lines with "swiss_line" in the Unit column, one each for the "Building_IDRef" values: "military_academy",
"army_board",
"army_staff_college",
"prest_france_arc_de_triomphe",
"prest_poland_akademia", and
"prest_prussia_brandenburg_gate"
The Unique barracks are because we do not want the Prussian, French, and Polish (or anyone who has conquered them
) to not be able to produce our unit once the unique barracks are built. Once all that has been entered, your \My_building_units_allowed should like like so:
Save the Table! And we are done with DBEditor!
Step 4: Giving Our Unit a Screen Name
Well, let's take a breather, shall we? So, so far we've created a new unit, made it selectable and made it buildable. So what else is there to do? Well, if you go ahead and load the mod, and load up the custom battle Army screen, you'll see our unit (with the Coldstream Guard Icon) in the middle of the Infantry line-up, however, it doesn't seem to have a name. Like so:
So, how exactly do we give our unit a Screen Name (and keep our unit from crashing the game!)? 
We need to open up "patch_en.pack" in PFM 1.12. The first thing we should do upon loading it is to do a Save As... "My_Mod_en.pack". This ensures we do not modify or corrupt a necessary game patch. We are only interested in text\localisation.loc, so feel free to delete the font folder, and ui.loc in the file structure window on the left of the program AFTER saving as a new pack file (otherwise you modify a CA file and kill your game). Select localisation.loc, the .loc editor will open it up on the right side of the program. Usually it opens it up in a messy order, so go ahead and click on the bar at the top labeled Well, this is where Pack File Manager 1.12 comes in. Since we have done everything needed in DBEditor, let's go ahead and close the program. Now, we need to load up PFM 1.12. "Tag" to sort the list so we can find what we need. Once sorted find the entry "units_on_screen_name_euro_line_infantry", once found select the whole row just like in DBEditor, and up at the top click the "Clone Current Row" button. Generally it adds the entry at the end of the table (which is why your view automatically went there), but since we did a sort, it is instead back where "units_on_screen_name_euro_line_infantry" was. So, scroll back up until you find it. There will be 2, so pick whichever entry you wish and change "units_on_screen_name_euro_line_infantry" to "units_on_screen_name_swiss_line". Hit enter, and the entry will be re-sorted into the list, so, go track that sucker down ("units_on_screen_name_swiss_line") and modify the second column's entry from "Line Infantry" to "Swiss Mercenaries" (sounds cooler than Swiss Line Infantry).
Once the entry is done, use the left window to select the 'text' folder, wait a second and localisation.loc will change to Itallic Red, indicating it has been changed, now go to
Choose a Pack Action --> Change Pack Type --> Movie.
Save, and you are done!
Now load up My_Mod.pack again (no need to load My_Mod_en.pack, Movie .pack files are loaded by the game automatically) and viola! We have a working unit!
Congratulations, you now know the basics of both using the DBEditor and new PFM in conjunction, and the basics of modding!
Credits:
LtChambers - DBEditor
LtChambers - Pack File Manager
LtChambers - Mod Manager
juniroxors - Sample Mod Pack
HellFell - for the unit creating breakthrough
The Phenom - for various unit creating tutorials
MrThib - adding textures to custom units
warmachine - unit texturing info
waronmars - unit texturing info
Tharros - AOR unit tutorial
Torque - for the original Adding a New Unit complete guide.