The 3rd Age

The Horse Lords

The Horse Lords

A mod intended to enhance The Rise of the Witch King and add a new 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: 17014
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
Horde Creation:

Here we will create the horde object for the bowmen

1) Rename the menhordes.ini file that you copied to the southernfiefdom horde folder to southernfiefdomhordes.ini.

2) Open the folder and look for:
              
Code

Object GondorRangerHorde


3) Delete everything above that line.

4) Go to the end of the object (In RotWK 2.01 look for GondorRangerInnHorde) Delete everything after the rangerhorde object.

5) Rename GondorRangerHorde to MorthondBowmanHorde.

6) Look for the HordeContain behavior within the GondorRangerHorde object. Within the behavior there are a couple of lines that we are going to change:
              
Code

InitialPayload = GondorRanger 12

and
              
Code

// Banner Carrier info        
BannerCarriersAllowed    = GondorInfantryBanner
BannerCarrierPosition    = UnitType:GondorRanger    Pos:X:40.0 Y:0.0

and
              
Code

RankInfo = RankNumber:1 UnitType:GondorRanger Position:X:0 Y:12    Position:X:0 Y:-12    Position:X:0 Y:-36    Position:X:0 Y:36    Position:X:0 Y:-60     Position:X:0 Y:60

RankInfo = RankNumber:2 UnitType:GondorRanger Position:X:20 Y:12    Position:X:15 Y:-12    Position:X:20 Y:-36    Position:X:20 Y:36    Position:X:20 Y:-60    Position:X:20 Y:60



7) Change the initial payload to MorthondBowman 12

8) Change the GondorInfantryBanner to SouthernFiefdomInfantryBanner

9) Change the UnitType:GondorRanger underneath the banner carrier to UnitType:MorthondBowman

10) Change the UnitType:GonorRanger in the rank information to UnitType:MorthondBowman

Now for the horde level changes that we made to the individual unit:

1) Look up the commandpoints in the file and change the total to 80. (8X10 units = 80)

2) Look up the buildcost and buildtime and change them to: 600/25. They will be more expensive than rangers but they will build quicker.

3) To add heavy armor as a possible upgrade for the horde, add the following code next to the fire arrows upgrade:
              
Code

Behavior = StatusBitsUpgrade ModuleTag_ProductionLegality2
    TriggeredBy = Upgrade_GondorHeavyArmor
End


4) Also change the upgrades available on the living map in WotR. Add "Upgrade_GondorHeavyArmor" to the "WorldMapArmoryUpgradesAllowed" line entry.

5) Similar to the Unit we are removing the longshot from the horde. Remove the following code:
              
Code

Behavior = OCLSpecialPower ModuleTag_ArrowVolleyEvil

SpecialPowerTemplate = SpecialAbilityMenLongShot
OCL = OCL_LongShotAbility
CreateLocation = CREATE_AT_LOCATION
UpdateModuleStartsAttack = No

;// Need to set a model condition (unused by the horde anyway) in order to
;// freeze the horde for the duration of the spell
SetModelCondition = ModelConditionState:USER_1
SetModelConditionTime = 5.0
DisableDuringAnimDuration = Yes

End

Behavior = WeaponFireSpecialAbilityUpdate ModuleTag_FireballUpdate

SpecialPowerTemplate = SpecialAbilityMenLongShot
PackTime = 5000
MustFinishAbility = Yes
SpecialWeapon = MenLongShotWeapon
NeedLivingTargets = No
;PackSound = LongshotRangerCall
;UnpackSound = LongshotRangerCall
;PrepSoundLoop = LongshotRangerCall
TriggerSound = RangerVoiceLongShot
ApproachRequiresLOS = No

End


6) Change the locomotor speed of the horde to match the gondor archers-same as the unit. Change the value to NORMAL_FOOT_MED_HORDE_SPEED.

Change the horde size:
I'll walk you through how to change the horde size from 12 to 10 to give you an idea of how to make these changes.

1) Find the hordecontain behavior

2) In here change the intialpayload to:
              
Code

InitialPayload = MorthondBowman 10


3) Change the slots to 10 as well.

4) Next change:
              
Code

RankInfo = RankNumber:1 UnitType:MorthondBowman Position:X:0 Y:12 Position:X:0 Y:-12 Position:X:0 Y:-36 Position:X:0 Y:36 Position:X:0 Y:-60 Position:X:0 Y:60

RankInfo = RankNumber:2 UnitType:MorthondBowman Position:X:20 Y:12 Position:X:15 Y:-12 Position:X:20 Y:-36 Position:X:20 Y:36 Position:X:20 Y:-60 Position:X:20 Y:60



To

              
Code

RankInfo = RankNumber:1 UnitType:MorthondBowman Position:X:0 Y:0 Position:X:0 Y:24 Position:X:0 Y:-24 Position:X:0 Y:48 Position:X:0 Y:-48

RankInfo = RankNumber:2 UnitType:MorthondBowman Position:X:20 Y:0 Position:X:15 Y:24 Position:X:20 Y:-24 Position:X:20 Y:48 Position:X:20 Y:-48


Basically the idea is to change the x:y coordinates. Look at the before and then work out what the coordinates would be if the y was center on 0 and change accordingly.

The last item that we are going to do with the horde is create the commandset so you will be able to purchase heavy armor and not use longshot:

1) Find the commandset entry in the horde file. It should be listed as GondorRangerHordeCommandSet

2) Next open up the commandset.ini file in the \data\ini\ folder

3) From here copy and paste the commandset at the bottom of the file.

4) Rename the new commandset to "MorthondBowmanHordeCommandSet "

5) Remove the longshot ability and add the heavyarmor commandbuton for Gondor. The final commandset should look like:
              
Code

CommandSet MorthondBowmanHordeCommandSet
    1 = Command_ToggleStance
    2 = Command_ArcherBombard
    3 = Command_PurchaseUpgradeGondorHeavyArmor
    4 = Command_PurchaseUpgradeGondorFireArrows
    5 = Command_PurchaseUpgradeGondorBasicTraining
    12 = Command_CaptureBuilding
    13 = Command_AttackMove
    14 = Command_Stop
    16 = Command_SetStanceBattle
    17 = Command_SetStanceAggressive
    18 = Command_SetStanceHoldGround
End


Now that we have a Morthond Bowman horde that we will be able to use.

Next Page:Commandbuttons, Commandsets, images, and other ancillary files

Links / Downloads

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

 
10:21:29