The 3rd Age

Helm's Deep Last Hope

Helm's Deep Last Hope

The ultimate map mod

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 boni, CommandPoint limits and BuildingSpots. The default regions are defined in data\ini\campaigns\common\livingworldregions.inc. The Region blocks contain quite a lot of stuff (mostly for visual effects). The following fields can be set within a Region block:
- ArmyBonus: the number of additional command points this region will grant its owner on the living world
- ResoureBonus: the percentage of additional gathered resources in any RTS battle
- LegendaryBonus: the number of additional spellbook points in any RTS battle
- AttackBonus: the percentage of additional attack strength in an AutoResolveBattle (this obviously affects the attack strength of hero armies but I am not sure whether this only applies in offensive battles or in defensive battles too, as in garrison armies that deal more damage...)
- DefenseBonus: similar to AttackBonus but for defense.
- ExperienceBonus: the percentage of additional experience units gain in a AutoResolveBattle.
- CPLimit: the command point limit for any garrison army in this region (though I believe the AI sometimes accidently ignores this value :-/ ).
- AllyCPLimit: the command point limit for each ally garrison army.
- CreateAutoFort: if this field is set to Yes the region will always have a fort in AutoResolveBattle (but not in RTS).

Default every region has two BuildingSpots except for regions with a special fort (Erebor, Dol Guldur, Helm's Deep, Isengard, Minas Morgul, Minas Tirith) which only have one. A BuildingSpot defines the coordinates on the whole world where the player can build one of the four livingworld buildings in this region: Resource, Fortress, Barracks, Armory. If you add any more BuildingSpots to a region take care the coordinates are within the region (it would look rather strange if a barracks which belongs to Rivendell appears in Mordor :)
Additional to the number of buildings being restricted by the number of BuildingSpots you can explicitly set a limit for the different kind of buildings:

              
Code

RestrictBuildings
    Buildings = Fortress
    NumberAllowed = 0
End

RestrictBuildings
    Buildings = Barracks
    NumberAllowed = 2
End


These two blocks will restrict the number of barracks to 2 and forbids the building of a fortress completly in the Region they are defined in.
I have not yet worked with ConnectsTo since it probably would require changing the .map file by creating wotr entrance points on the map.
In addition to all single Regions data\ini\campaigns\common\livingworldregions.inc also contains concurrent regions such as Arnor, Eriador, etc.

              
Code

ConcurrentRegionBonus
    Territory = LW:TerritoryArnor
    EffectName = Arnor
    Regions = Arnor Buckland Ettenmoors Rivendell The_Shire Tower_Hills
    ArmyBonus = 0
    ResourceBonus = 0
    LegendaryBonus = 0
    AttackBonus = 0
    DefenseBonus = 0
    ExperienceBonus = 20
    UnifiedEvaEvent = WorldUnifyArnor ; Played when local player gains all the regions in this territory
    LostEvaEvent = WorldLostArnor ; Played when local player had all the regions in this territory but lost one
    LookAtCenter = X:-1121 Y:2072
    LookAtHeading = 0
    LookAtZoom = 0.55
End


All the fields in this block should be either selfexplanatory or already described above.

If you don't want to change the regions for all scenarios you may write your own include file. In this case however you will need to define another LivingWorldRegionCampaign in data\ini\campaigns\riskcampaign.ini and use it in the scenario (but more on that later):

              
Code

LivingWorldRegionCampaign AnotherCampaign
    ;// Visual stuff
    RegionConqueredSound = Gui_RegionConquered
    RegionEffectsManagerName = WotRRegionEffects
    ArmyPlacementPos = X:-0 Y:0            ; 10 o'clock offset
    ArmyPlacementPos = X:0 Y:0            ; 2 o'clock offset

    ;// Strings
    RegionBonusArmy            = LW:RegionBonusArmy_Good
    RegionBonusResource        = LW:RegionBonusResource
    RegionBonusLegendary        = LW:RegionLegendaryBonus

    ;// Army Size Command Point Caps
    HeroOnlyArmyCommandPoints = 0
    SmallArmyCommandPoints = 120
    MediumArmyCommandPoints    = 240

    ;// Hero army retreat
    ArmyRetreatRounds    = 25
    
    ;// Including the regions
    #include "Common\OtherLivingWorldRegions.inc"
End


There are a few interesting fields in there:
- HeroOnlyArmyCommandPoints: If the command points of all units in a hero army (including the heros commandpoints) are less or equal to this value the hero will only have no pip above its banner at all (Since a hero army will always contain the hero this should never be the case).
- Small-/MediumArmyCommandPoints: If the command points of all units in any (garrison or hero) army are less or equal to these values the army will have one/two pips above its banner. If the value is even higher than MediumArmyCommandPoints it will have three pips.
- ArmyRetreatRounds: This is the number of AutoResolve rounds an enemy army may execute on a retreating army (though the default value of 25 seems a bit high to me).
To use your custom regions just change the path of the include command.

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

 
22:14:14