The 3rd Age

The Rhovanion Alliance

The Rhovanion Alliance

A most anticipated mod that adds 4 new factions as well as editing the old ones

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

How to make any building make units

Tutorial for Battle for Middle-earth BFME, Battle for Middle-earth II BFME 2

Avatar of BigBrainiac

BigBrainiac

Category: Code
Level: Beginner
Created: Saturday September 11, 2010 - 14:46
Updated: Sunday September 19, 2010 - 19:45
Views: 10181
Summary: Guide to make any building have the ability to build units

Rating

Staff says

4.0

Members say

4.3

Average

4.3/5.0

4 votes

This is a guide that tells how to make any building able to build units.
BACK-STORY: I was reading the forums once when I noticed that Nazgul, a modding icon, was having trouble adding dwarven miners to the build-able units of the mine. His problem was that he didn't know about the "QueueProductionExitUpdate ModuleTag_Exit" code. It makes it that your building can create units at a certain spot around it.

Now for the steps to make the dwarven mine have the ability to make some unit. (I will use guardians)

STEP ONE: Open object/goodfaction/structure/farminterface.ini
This is the object that the Rohan and Gondor factions use as their base.
Go to line #292-296 and copy the entire block:

              
Code
    Behavior = QueueProductionExitUpdate ModuleTag_Exit
        UnitCreatePoint = X: 20.0 Y:0.0 Z:0.0
        NaturalRallyPoint = X:-60.0 Y:0.0 Z:0.0
        ExitDelay = 350
    End


STEP TWO:Open "object/goodfaction/structure/dwarven/dwarvenmineshaft.ini"
Paste the "Behavior = Queue..." block of code at line between the "TunnelContain" and the "BuildingBehavior" Behaviors. It should look like this:

              
Code
    Behavior = TunnelContain ModuleTag_Contain
        ObjectStatusOfContained            = UNSELECTABLE ENCLOSED
        ContainMax         = 5
        DamagePercentToUnits         = 0%
        PassengerFilter                = ANY +INFANTRY +BANNER +CAVALRY -MONSTER -SUMMONED -COMBO_HORDE
        AllowEnemiesInside            = No
        AllowAlliesInside            = No
        AllowNeutralInside            = No
        AllowOwnPlayerInsideOverride        = Yes
        NumberOfExitPaths         = 1    // Defaults to 1. Set 0 to not use ExitStart/ExitEnd, set higher than 1 to use            ExitStart01-nn/ExitEnd01-nn
        PassengerBonePrefix         = PassengerBone:ARROW_ KindOf:INFANTRY
        EntryPosition                = X:0.0 Y:0.0 Z:0.0
        EntryOffset                = X:80.0 Y:0.0 Z:0.0
        ExitOffset                = X:100.0 Y:0.0 Z:0.0
        EnterSound                = RuinedTowerEnterSound
        KillPassengersOnDeath            = No
        ShowPips                = No
        ExitDelay                = 0
    End

    Behavior = QueueProductionExitUpdate ModuleTag_Exit
        UnitCreatePoint = X: 20.0 Y:0.0 Z:0.0
        NaturalRallyPoint = X:-60.0 Y:0.0 Z:0.0
        ExitDelay = 350
    End
    
    Behavior = BuildingBehavior BuildingModuleTag


STEP THREE: Change the "UniCreatePoint" to have the "X:" value of 0.0 and the "NaturalRallyPoint" "X:" value to 100.0.
It would look like:

              
Code
    Behavior = QueueProductionExitUpdate ModuleTag_Exit
        UnitCreatePoint = X: 0.0 Y:0.0 Z:0.0
        NaturalRallyPoint = X:100.0 Y:0.0 Z:0.0
        ExitDelay = 350
    End




STEP FOUR: Change the DwarvenMineShaftCommandSet to look like this (if you want to build guardians on it):

              
Code
CommandSet DwarvenMineShaftCommandSet
1 = Command_ExitGarrison
2 = Command_ExitGarrison
3 = Command_ExitGarrison
4 = Command_ExitGarrison
5 = Command_ExitGarrison
6 = Command_Sell
7 = Command_ConstructDwarvenGuardianHorde
End



Now go in-game and test out the guardian building feature... It SHOULD work (it worked for me)

Happy Modding,
BigBrainiac




If you have any questions, comment on this article.

Comments

Display order: Newest first

clank234 - Monday November 15, 2010 - 13:21

It works except 1 thing, the guardians cant be upgraded and they they come as 10 single units.
Keep up the gd work ;)

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."

 
12:11:32