The 3rd Age

BFME II: Deluxe Edition

BFME II: Deluxe Edition

Fixing problems with BFME 2 and giving it more depth.

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

Custom WotR Scenarios

Tutorial for Battle for Middle-earth II BFME 2

No Avatar

ASimpleModder

Category: Code
Level: Intermediate
Created: Tuesday February 14, 2012 - 17:06
Updated: Tuesday February 14, 2012 - 17:32
Views: 7824
Summary: Creating your own War of the Ring campaign scenarios

Rating

Staff says

3.5

Members say

4.0

Average

3.7/5.0

3 votes

Page 1 2 3 4 5
This page will show you how to change the number and type of units you have at the start of a WotR campaign.

First we need to tell the game what kind of armies there are for each faction in data\ini\campaigns\common\livingworldstartingunits.inc. You will see several entries of LivingWorldPlayerArmy blocks, e.g.

              
Code

LivingWorldPlayerArmy
    Name = BoromirPlayerArmy
    DisplayNameTag = LWA:MenHeroArmy    
    ArmyEntry
        ThingTemplate = GondorBoromir
        Quantity = 1
    End
End

LivingWorldPlayerArmy
    Name = MenOfTheWest_StartingArmy
    DisplayNameTag = LWA:MenOfTheWestGarrison
    ArmyEntry
        ThingTemplate = GondorArcherHorde
        Quantity = 1
    End
    ArmyEntry
        ThingTemplate = GondorFighterHorde
        Quantity = 1
    End
    ArmyEntry
        ThingTemplate = GondorKnightHorde
        Quantity = 1
    End
End


You may recognize them as the default starting units you had in every WotR campaign until now.
- The Name field is the name used for reference in the SpawnArmies (see further down).
- DisplayName is the name displayed when you hover the mouse over an army.
- An ArmyEntry specifies one unit (or rather banner since all units on the living world are displayed as banners) in this army.
- ThingTemplate specifies what unit to use
- Quantity is the number of battalions this banner.
Therefore if you want to create an army consisting of for example two separate GondorRanger battlions:

              
Code

LivingWorldPlayerArmy
    Name = MenOfTheWest_EliteArchers
    DisplayNameTag = LWA:MenOfTheWest
    ArmyEntry
        ThingTemplate = GondorRangerHorde
        Quantity = 1
    End
    ArmyEntry
        ThingTemplate = GondorRangerHorde
        Quantity = 1
    End
End


You may ask now what the difference between 2 separate ArmyEntries and one ArmyEntry with a Quantity of 2 is: 2 separate ArmyEntries will create two banners on the living world which can be commanded separately. One ArmyEntry with a Quantity of 2 however will create only one banner on the living world but 2 battalions in RTS.

As far as I can see you may add your entries to data\ini\campaigns\common\livingworldbuildableunits.inc instead (have not actually tried it but should make no difference).

Now that we have specified what kind of and how many units there are in an army we need to tell the game to spawn them and also which units for which faction. For this we need to alter data\ini\campaigns\common\livingworlddefaultarmies.inc. To spawn the ranger army we defined in livingworldstartingunits.inc we need to add another SpawnArmy block:

              
Code

SpawnArmy
    ScriptingName = EliteArchers
    SpawnForTemplates = PlayerMen
    PlayerArmy = MenOfTheWest_EliteArchers
    Icon = MoWArmyIcon
End


- The ScriptingName may be used to spawn this army explicitly in a region but more on that later...
- SpawnForTemplates specifies which faction to spawn this unit for. All players with this faction will recieve this unit at the start of a WotR campaign.
- PlayerArmy tells the game which PlayerArmy to spawn. In this example we use the name of the LivingWorldPlayerArmy we defined above.
- Icon speficies the style of the banner on the living world.

Adding a SpawnArmy like the one above will result in every player of the specified faction starting with this army in addition to all the other SpawnArmies in all WotR scenarios. If you don't want to use this SpawnArmy in every scenario you can add SpawnAtActStart = No to the SpawnArmy block. Armies that don't spawn at the start of the act have to be spawned explicitly in a scenario (more on that later).
There are SpawnArmy blocks for the hero leaders too but how to add new hero armies is not a part of this tutorial. Spawning minor heroes (not army leaders) as a garrison army (for the difference between garrison army and hero army see the ingame WotR tutorial) however works just like any other SpawnArmy (you don't even have to add any LivingWorldPlayerArmy since they are already defined in data\ini\campaigns\common\livingworldbuildableunits.inc):

              
Code

SpawnArmy
    ScriptingName = MinorHero1
    SpawnForTemplates = PlayerMen
    PlayerArmy = FaramirArmy
    Icon = MoWArmyIcon
End

Comments

Display order: Newest first

Unknown - Saturday February 25, 2012 - 8:36

This is a good tutorial :)
A lot of people forget about WotR XD

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

 
21:12:29