The 3rd Age

The Wars of Arda

The Wars of Arda

A huge expansion for RotWK, adding multiple eras, numerous new factions and a full campaign.

Button for The 3rd AgeButton for The Dwarf HoldsButton for The Elven AllianceButton for Helm's Deep Last HopeButton for GothmogtheOrcButton for BFME+Button for The Four AgesButton for HDR HeadquartersButton for Middle Earth CenterButton for Project Perfect Mod

Become an affiliate!

   

Quick Lists

Top Rated Popular New Updated Last Comments Users

Register and log in to move these advertisements down

Adding Morthond Bowmen into a mod

Avatar of robnkarla

robnkarla

Category: Code
Level: Intermediate
Created: Monday July 2, 2007 - 11:35
Updated: Saturday June 27, 2009 - 18:26
Views: 18295
Summary: Guide from start to finish on creating a mod that adds a single unit into the game

Rating

Staff says

4.7

Members say

4.4

Average

4.5/5.0

23 votes

Page 1 2 3 4 5 6 7 8 9 10
Creating the Asset.dat file

When it comes to adding models into the game you will need to add the files into the asset.dat file in order for the game to recognize them. If you do not do this step, then no matter what you do you will not be able to view the units in game.

If the object is not in the asset.dat file then the unit will be invisiable. If the texture(s) is not in the file, the model will be a purplish color.

That being said, there are two ways that I know of where you can add your "assets" into the file.

1) Try to add them into the asset.dat file that the game uses. (I think this is a very bad way to do this. Unless you absolutely must have the models in worldbuilder, I do not like touching the file.)

2) Create your mod using the -mod command.

********* Explanation of -mod command *********

If you do not know what the -mod command is, here is a brief explanation. When you click on the shortcut for the game you are actually telling windows to run the following command:
"C:\Program Files\Electronic Arts\The Lord of the Rings, The Rise of the Witch-king\lotrbfme2ep1.exe"

This may differ depending on where you installed the game, but the shortcut is just telling windows where to find the game. Many .exe accept different parameters or commands. If you right click on the shortcut and change it to:
"C:\Program Files\Electronic Arts\The Lord of the Rings, The Rise of the Witch-king\lotrbfme2ep1.exe" -win

This will open up the game in a separate window instead of fullscreen. The mod command is similar, instead of -win you add -mod. Along with this you will need to tell the game what to load, usually a .big file. For this article I'll be creating it using a MorthondBowman.big file. And we'll get into this later in the article.

The reason why you would use this tactic to add the asset.dat information is so that you can create an asset.dat file that is an add-on to the one provided in the game. You only have to include the items that are new.

************* End of Explanation *************

So in order to do this we are going to use the assetcachebuilder provided by EA in their SDK. You can use the following steps to create your file.

1) Create a folder somewhere on one of your hard drives. (This will be used to build the mod)

2) Locate the AssetCacheBuilder.exe from the SDK and place a copy of it in your new folder. (I personally just have a copy of the executable with each mod that I create. It's just easier for me)

3) Create a new folder named art

4) Create a new folder in art named w3d

5) Create a new folder in art named compiledtextures. (This is for BFME2 and RotWK. BFME1 uses different names)

6) Download the Morthlond.rar file from Nertea's Downloads

7) In the w3d folder, create another folder named gu and place the gumorthond_skn.w3d in that folder. For each file you will place it in a subfolder with the first two letter of the file name

8) In the compiledtextures folder, create a folder named gu as well, and place the gufiefweap2.tga, gumorthond2.tga, and gumothond2ha.tga files in that folder.

9) Now do a similar thing for the fiefdom banner carriers .rar file.
- create a gd folder in the w3d for the gdabnft_skn.w3d and the gdabnrmt_skn.w3d
- add the gu w3d files to the gu folder
- add the gu texture files to the gu folder

10) The last items that you will need are your 2d art. (Button images and the select portraits.) There are tutorials out there already that go into depth on how to create these items so I won't here though I did include my standard .psd templates. Just once the art is complete, place them in their own folder. Where you place them is up to you. For my mod, I named a lot of art rjxxxxxx.dds and placed them all in an rj folder. Or you can place them with the UP folder or anywhere as long as they are in a subfolder in the compiledtextures folder. We'll be doing the .ini coding later to add them in game.


11) When running the assetcachbuilder it still uses the BFME1 layout, so you have 2 choices - rename the folders for the textures every single time, or create a .bat file that will do it for you. (I choose the second choice.

12) In your main folder where the assetcachebuilder.exe is contained, create a new .txt document. Name it whatever you'd like, but instead of the extension being .txt change it to .bat. (myassets.bat for example)

13) Right click on it and edit the txt file to say:
              
Code

@move art\compiledtextures art\textures
@assetcachebuilder.exe
@move art\textures art\compiledtextures
@pause


14) Once edited, double click the .bat file. A command prompt (DOS style) window will show up listing all of the files added to the asset.dat file. When finished click a button to continue.

15) Once the .exe has run, you will have an asset.dat file ready for you to use! There is also an error file for you to check to make sure there is nothing horribly wrong, but use it more for trouble-shooting as it will be filled with missing skl errors. Unless you have made a change to one of the skeleton files, you do not need to include these as well.

So now we have the asset.dat file for the mod!

Next page: File Layout, mod organization

Links / Downloads

 HitsAdded
Sample Finished Mod2873July 2, 2007 - 21:22
Morthond Bowman model & Texture5438July 2, 2007 - 11:36

Comments

Display order: Newest first | Page: 1, 2

modboy451 - Friday December 3, 2010 - 13:04

you could be a little for clear on where to place the .tga and.w3d files(maybe add spme space inbetween lines) otherwise It was a great tutorial!

--------

http://forums.revora.net/index.php?showtopic=80461
im having trouble like kingeragon007 was,
model not appearing!

BigBrainiac - Monday October 25, 2010 - 16:27

This is a good, well written article.

Following this extremely slowly and not just copying what it says (the first time) helps a great deal.

If your unit doesn't appear, you are probably doing something wrong in the asset.dat (like not putting the texture or model in it).

Rob38 (Team Chamber Member) - Monday September 6, 2010 - 18:53

Some of the material such as the AI and WOTR mode will not work for BfME1. Most of the general information though should be applicable to BfME1 modders.

Souske22 - Monday September 6, 2010 - 17:58

Ok rather stupid question buuut I was wondering would this Tutorial also work for BFME1 to replace models? Asking so I dont kinda waste time reading this and following the steps to replace regular gondor soldiers with Numenorian Models.

--------

whao well first off disregard the replace part, small typo on my end so I dont get posts saying I'm asking the wrong question, second sorry for the 5 times repost my browser had a refresh spaz

acidRain - Wednesday June 23, 2010 - 7:33

Hmm...well, I followed all the instructions - to the letter - and my model's still invisible. If it helps, I attempted xxxMr. Xxxx's Aragorn bow/sword model. I'm no novice to coding, but modeling and skinning absolutely baffles me.

{AE}Manveru - Tuesday September 1, 2009 - 12:08

@Kingeragon007, did you compile your asset.dat properly? And add it into the .big file?

@Centurion, that's normal. Happens to me every time I run assetcachebuilder. The program should still work anyway. Just ignore it unless it's not creating your asset.dat.

*Kingeragon007* - Saturday August 9, 2008 - 20:17

hey im new around here,
i just copied your finsihed sample mod and i added the Pelargir Spearmen too it. I did everything the same way but changed it to be the Pelargir Spearmen but when i play ROTWK the spearmen are invisable. and i put the .w3d files and the .tga in the asset file. Can someone please tell me what i did wrong or how to fix this.
Thanks,
Kingeragon007

Tar-Palantir - Tuesday May 6, 2008 - 18:36

@ lycan, Robnkarla's using RoTWK, you're probably using BFME I or BFME II so the locomotors have diferent names, I suggest you check some other file to see what they're called.

Centurion - Monday March 24, 2008 - 22:46

I keep getting this message:
!debug.io flat add
======================================================================
You are using an older version of the DBGHELP.DLL library.
Please update to the newest available version in order to
get reliable stack and symbol information.

Hint: The DLL got loaded as:
C:\WINDOWS\system32\DBGHELP.DLL

How can i fix this?

lycan - Monday October 1, 2007 - 12:45

i did everything,
when i loaded up BFME2 it said

error Foot Speed _MED error thing wtf why is it like this

Go to top

 

"One site to rule them all, one site to find them,
one site to host them all, and on the network bind them."

 
18:09:25