The 3rd Age

Immersive Middle-earth (v. 1.4)

Immersive Middle-earth (v. 1.4)

An attempt to make the original BFME1 more personable

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: 7603
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
Page 5
Now finally it will all come together in a LivingWorldCampaign. You may just copy one of the other wotrscenario .inc files and change it to your liking. Let's take a look at the LivingWorldCampaign block:

              
Code

LivingWorldCampaign SomeWOTRScenario
    IsEvilCampaign = No
    IsScriptedCampaign = No

    ;////////////// RTS Settings /////////////
    #include "..\Common\LivingWorldDefaultRTSSettings.inc"

    Scenario
        ...
    End

    Act One
        ...
    End
End


As you can see this scenario includes the default RTS settings but you may instead include your own file (see page 3) or just enter the fields right here.
I must confess I am not exactly sure what the IsEvilCampaign does. IsScriptedCampaign is apparently used in the ingame WotR tutorial and probably enables script commands (have not looked into it yet...). The Scenario sub block contains about all the important information of a scenario:

              
Code

Scenario
        DisplayName         = LWScenario:WOTRSomeScenario
        DisplayDescription     = LWScenario:WOTRSomeScenarioDescription
        DisplayGameType         = LWScenario:WOTRSomeGameType
        DisplayObjectives     = LWScenario:WOTRSomeObjectives
        DisplayFiction         = LWScenario:WOTRSomeScenarioFiction
        DisplayVictoriousText    = LWScenario:WOTRSomeEliminationWin
        DisplayDefeatedText    = LWScenario:WOTRSomeEliminationLose

        RegionCampaign = DefaultCampaign
        MaxPlayers = 6
        
        DisallowStartInRegions = ...
        DefaultStartSpots = ...
        DisableRegions = ...

        PlayerDefeatCondition
            Teams = 1 2
            LoseIfCapitalLost = No
            NumControlledRegionsLessOrEqualTo = 0
        End
        TeamDefeatCondition
            Teams = 1 2
            NumControlledRegionsLessOrEqualTo = 0
        End
        TeamVictoryCondition
            Teams = 1 2
            ControlledRegions = ...
            ControlledRegionsHeldForTurns = 0
            NumControlledRegionsGreaterOrEqualTo = 38
        End

        ;// OwnershipSets
        OwnershipSet
            ...
        End
    End


The Display fields specify the strings to be displayed in the WotR menu. If you're thorough and don't like reading 'MISSING:' ingame you can add your own names and descriptions in data\lotr.str.
Remember the LivingWorldRegionCampaign on the previous page? With RegionCampaign you can specify which one to use. The rest of the fields (DisallowStartInRegions, DefaultStartSpots, DisableRegions) should be selfexplanatory. If you don't want to specify these values you can simply omit these fields.
You can define one PlayerDefeatCondition/TeamDefeatCondition for all teams or one for each. The same goes for TeamVictoryCondition. For the conditions of victory you can specify the regions which have to be controlled (e.g. the "Struggle for Strongholds" scenario) and how long you have to hold them to win and how many regions (or any combination of these conditions that make sense).
(On a side note: NumControlledRegionsLessOrEqualTo = -1 in a PlayerDefeatCondition is possible and will prevent any players with no territories from losing. If they lose there last territory they will have to seek refuge with an ally. I call this type of game Roaming Armies :).
Now let's take a look at an OwnershipSet block. OwnershipSets can be used to start the game with regions (other than the starting regions) already claimed by players, explicitly spawning starting armies and buildings:

              
Code

OwnershipSet
    Regions = Minas_Tirith Osgiliath Gondor
    StartRegion = Minas_Tirith

    SpawnArmies
        Armies = EliteArchers MinorHero1
        Region = Osgiliath
    End
    SpawnArmies
        Armies = HeroArmy1
        Region = Gondor
    End
    SpawnBuildings
        Buildings = LW_ARMORY
        Region = Minas_Tirith
    End
    SpawnBuildings
        Buildings = LW_BARRACKS LW_ARMORY
        Region = Osgiliath
    End
    SpawnBuildings
        Buildings = LW_FARM LW_BARRACKS
        Region = Gondor
    End
End


Again these code lines do exactly what they say: Which Regions belong to the player who starts in StartRegion. Any SpawnArmies we defined on Page 2 may be spawned in a region. The four types of buildings LW_ARMORY, LW_BARRACKS, LW_FORT and LW_FARM can be spawned in a region. You may spawn any SpawnArmy you have defined in all owned regions or non at all. If you do use OwnershipSets it's better to synchronize the StartRegions with the DefaultStartSpots in the Scenario block and disallow all the other regions as starting positions.
Therefore if the player has facton Men and starts in Minas_Tirith he will own Osgiliath and Gondor as well and have buildings in all these regions. His HeroArmy1 (Aragorn) will start in Gondor. The other two HeroArmies will start in the StartRegion. Furthermore the player will already have two Ranger battalions and the minor hero Faramir in Osgiliath.

Back to the Scenario block right into the sub block Act One.

              
Code

Act One
    ;///////////////// Armies ////////////////
    #include "..\Common\LivingWorldDefaultArmies.inc"

    ;//////////////// VISUAL FLUFF ////////////////
    EyeTowerPoints
        LookPoint = X:436 Y:687 ; Rohan
        LookPoint = X:481 Y:287
        LookPoint = X:1179 Y:461
        LookPoint = X:947 Y:917
        LookPoint = X:172 Y:573 ; Isengard
        LookPoint = X:160 Y:560 ; Isengard
        LookPoint = X:175 Y:557 ; Isengard
        LookPoint = X:171 Y:348 ; Helm's Deep
        LookPoint = X:257 Y:535 ; Helm's Deep
        LookPoint = X:120 Y:350 ; Helm's Deep
        LookPoint = X:157 Y:420 ; Helm's Deep
    End
End


This block finally includes the default SpawnArmies and some visual stuff. If any of the default SpawnArmies are already spawned within an OwnershipSet in the starting region they will not be created again there. HeroArmies will only be spawned once (if not within an OwnershipSet then by default in the starting region).

If all is done just add an include command for your file to the list in data\ini\campaigns\riskcampaign.ini.

This finally concludes this tutorial. If you have anything to say or any corrections to offer please feel free to comment.

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:31:25