A Modding Tutorial by Dee Jay
This Tutorial will tell you everything you need to know about how to make your own mod; I’ve tried to make this simple, short, resourceful and with lots of pictures for a beginner modder. Im assuming that you have already read my "Making a Simple Mod" tutorial for this one.
Creating Your Own Unit
Now, the first thing were going to do is extract the DB files that we need from patch4.pack in the Napoleon data folder. Extract the following into the "Mod" folder on your desktop;
building_units_allowed
uniforms_to_faction_colours
uniforms
unit_stats_land
unit_to_unit_abilities
units
unit_to_exclusive_faction_permission
All of these are needed to create your own unit. Now, were going to create a French "Middle Guard" unit for an example. So after extracting all those files to the folder, you can create a new mod.pack with them and save it (just like we did in my "Making a Simple Mod" tutorial) over your old "Mod.pack" file.
So were going to go to the "unit_to_exclusive_faction_permission" table, find and then clone the row for Inf_Elite_French_Old_Guard
And then replace the "Old" in the first column with "Middle". DONE
Next is the Units table, find the Inf_Elite_French_Old_Guard, and click COPY ROW while your clicked on that row
Then click ADD ROW and go up to the new row (it automaticaly goes to the top, I think)
Click on it, and then click PASTE ROW, and replace the "Old" with "Middle". DONE
Now for the unit_to_unit_abilities table, find the Old Guard rows again (there are about 5 this time) and then clone each row and replace the "Old" in each row with "Middle". DONE
For unit_stats_land table, were going to find the Old Guard row again, copy it, add a new row, find the new row, click on it, and paste over it. Then replace the "Old" with "Middle" again, just like in the units table. DONE
For the uniforms table, find this row: France_Inf_Elite_French_Old_Guard; clone it, and then replace all the "Old" in the 3 columns with "Middle". DONE
For the uniforms_to_faction_colours table, clone the France_Inf_Elite_French_Old_Guard row and replace the "Old" with "Middle" again. DONE
Finally, for building_units_allowed, we just want to do the same thing clone and then rename it. and DONE
After you have done all that, we are going to save it.
Now were going to get all the varient.models files and the unit cards and icons that we need for the unit. So extract all of those files from your new saved mod to the "Mod" folder on your desktop (say yes to over write the old files)
And then open the data.pack file again with the PFM. go to UI > units > icons and find the unit card for the Young Guard (because they look closes to the Middle Guard), its called france_inf_elite_french_young_guard_icon.tga
Then extract that file to your "Mod" folder on your desktop
Then go to UI > units > info and find the Young Guard info pic and extract that one too.
Now were going into the varientmodels.pack in the Napoleon data folder
So go to varientmodels > units, now find all the files that begin with france_inf_elite_french_old_guard
and extract them to your Mod folder. So now create a new Mod.pack using your "Mod" folder (the same way in my first tutorial) and save it over your old Mod.pack. Now replace all the "old" with "middle" in the varientmodels
and all the "young" with "middle" in the unit cards
and save it again.
Adding a New Units Name
Now, last of all we need to create the name for our new Middle Guard unit, so open that pack file you made in my "Changing and Adding a Units Name" tutorial called "Mod_Names.pack"
Open the localisation.loc file
click on the "Tag" tab to put all the entries in order
Then go find the units_on_screen_name_Inf_Elite_French_Young_Guard entry
Clone it, then replace the the "Young" in the first and second column with "Middle"
Then save it, and your all done.
Now, just test it to see if it works, if it does thats great, so now if you want you can just fiddle around with your new unts stats and cost and all that, I would suggest just putting the cost and stats half-way between the Old and Young Guard.
Now if ou’de like to continue strait onto my next Tutorial “Changing Unit Parts” which is when we make your new Middle Guard unit look more like the Middle Guard.
Hope you liked this tutorial and learnt some good stuff, Cheers DJ