The 3rd Age

Realms of the Elf-Lords

Realms of the Elf-Lords

Realms of the Elf-Lords is a mod for The Rise of the Witch-King, by Lord Firkraag.

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: 18290
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
Commandbuttons, Commandsets, images, and other ancillary files

We'll be working with a number of files in this section, but first we will start with the portraits:

1) Create a blank .ini file in the \data\ini\mappedimages\aptimages\ folder and name it sf_units.ini. I usually like to create my own .ini for all of my new images - rj_units.ini.

2) Now, the following code can be added and used as long as you used the standard EA size for images. (64X64 for button images and the upper-left 192X192 of a 256X256 image for the portraits) Add the following code to your file:
              
Code

MappedImage MorthondBowmanButtonImage
Texture = bimorthondbowman.tga
TextureWidth = 64
TextureHeight = 64
Coords = Left:0 Top:0 Right:64 Bottom:64
Status = NONE
End

MappedImage UPMorthondBowman
Texture = upmorthondbowmen.tga
TextureWidth = 256
TextureHeight = 256
Coords = Left:0 Top:0 Right:192 Bottom:192
Status = NONE
End


3) Replace bimorthondbowman.tga with the name of your button image that you saved in the second page.

4) Replace upmorthondbowmen.tga with the name of your portrait image that you saves in the second page.

Now your images are ready to be used in game and we will add them to the objects.

5) Open the morthondbowman.ini file in \data\ini\object\goodfaction\unit\men\.

6) Add MorthondBowmanButtonImage for ButtonImage at the top. Add UPMorthondBowman to the SelectPortrait.

7) Open the southernfiefdom hordes file and do the same.

Now we will work on creating the commandbutton in order to build the new unit:

1) Open the \data\ini\commandbutton.ini file and look for the Command_ConstructGondorRangerHorde commandbutton.

2) Select the entire block and paste it at the bottom of the file.

3) Change the name of the commandbutton to Command_ConstructMorthondBowmanHorde.

4) Change the object = GondorRangerHorde to:
              
Code

Object = MorthondBowmanHorde


5) We are going to make the Bowmen a powerful late-game unit, so change the neededupgrade from Upgrade_GondorArcheryRangeLevel2 to Upgrade_GondorArcheryRangeLevel3.

6) Change the button image to MorthondBowmanButtonImage

The commandbutton is ready. We will do all of the strings at once. I like to do that so I get more symetry for all of the strings.

Next we add the new commandbutton to the archery range commandset.

1) Open commandset.ini and look for the GondorArcheryCommandSet

2) Add a line afer the Command_ConstructGondorRangerHorde and add the new command button. Redo the numbering of the commandbuttons within the set so each is unique.

3) Do the same thing for the following to ensure that they are buildable at every level of the archery range:
GondorArcheryCommandSetLevel2
GondorArcheryCommandSetLevel3

4) For RotWK2.01 the final commandsets will look like:
              
Code

CommandSet GondorArcheryCommandSet
    1 = Command_ConstructGondorArcherHorde
    2 = Command_ConstructGondorRangerHorde
    3 = Command_ConstructMorthondBowmanHorde
    4 = Command_PurchaseTechnologyGondorFireArrows
    5 = Command_PurchaseUpgradeGondorArcheryRangeLevel2
    6 = Command_Sell
End

CommandSet GondorArcheryCommandSetLevel2
    1 = Command_ConstructGondorArcherHorde
    2 = Command_ConstructGondorRangerHorde
    3 = Command_ConstructMorthondBowmanHorde
    4 = Command_PurchaseTechnologyGondorFireArrows
    5 = Command_PurchaseUpgradeGondorArcheryRangeLevel3
    6 = Command_Sell
End

CommandSet GondorArcheryCommandSetLevel3
    1 = Command_ConstructGondorArcherHorde
    2 = Command_ConstructGondorRangerHorde
    3 = Command_ConstructMorthondBowmanHorde
    4 = Command_PurchaseTechnologyGondorFireArrows
    6 = Command_Sell
End


At this point, you can build the big file and play the unit in-game. But you will notice a very serious problem. The units cannot level up and you never can get a banner carrer.

1) Open up experiencelevels.ini from the \data\ini\ folder.

2) At the end of the GOOD_ELITE filter definition add the MorthondBowmanHorde, MorthondBowman, & SouthernFiefdomInfantryBanner.

This will add them to the elite level-up experience track and they will be able to gain level 2 and banner carriers.

Next Page: AI

Links / Downloads

 HitsAdded
Sample Finished Mod2872July 2, 2007 - 21:22
Morthond Bowman model & Texture5437July 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."

 
8:25:37