Reply
 
Thread Tools
lions_56
Default Modding WOTR Mode / May 3rd, 2012, 02:19 PM Old   #1

lions_56's Avatar

Posts: 11
Join Date: May 2012
Greetings,

I am new to modding and would like to make a few changes to WOTR mode as follows;

Increase CP of individual territories on the world map
Increase the CP of each army to around 700 or so
Increase the CP in real time battles to around 2500
Replace one of the 4 hero lead armies with my created hero
I would also like to allow all factions to create elite units on the world map and move them around the world

any help would be appreciated, thank you.
  lions_56 is offline
TokyoBlade
Default May 10th, 2012, 08:03 AM Old   #2
My Custom Title

TokyoBlade's Avatar


Lord of the Old Realm 

Posts: 8,969
Join Date: Aug 2004
Quote:
Increase CP of individual territories on the world map
Go into livingworldregions.inc (open with notepad or something), which is found in data/ini/campaigns/common/. Look for CPLimit and change that number for each region to whatever you want.

Quote:
Increase the CP of each army to around 700 or so
Go into livingworldplayers.ini, which is found in data/ini. Look for StartingHeroCP and MaxHeroCP and change them both to 700.

Quote:
Increase the CP in real time battles to around 2500
Go into gamedata.ini, which is found in data/ini. Look for this code:

Code:
GoodCommandPointsMP2 = 100 1000        ; 2 players
  EvilCommandPointsMP2 = 100 1000

  GoodCommandPointsMP3 = 100 875        ; 3 players
  EvilCommandPointsMP3 = 100 875

  GoodCommandPointsMP4 = 100 750        ; 4 players
  EvilCommandPointsMP4 = 100 750

  GoodCommandPointsMP5 = 100 675        ; 5 players
  EvilCommandPointsMP5 = 100 675

  GoodCommandPointsMP6 = 100 625        ; 6 players
  EvilCommandPointsMP6 = 100 625

  GoodCommandPointsMP7 = 100 575        ; 7 players
  EvilCommandPointsMP7 = 100 575

  GoodCommandPointsMP8 = 100 500        ; 8 players
  EvilCommandPointsMP8 = 100 500
The first number is the base amount of CP and the second number is the maximum allowed (first number cannot be higher than the second, or it just defaults to the second number in game). If you want CP to always be 2500 just change all the numbers there to 2500.

Unfortunately, this affects all modes, not just WOTR. To my knowledge, there is no way to have seperate CP rules for real time battles in WOTR mode.

Quote:
Replace one of the 4 hero lead armies with my created hero
Well, this is a lot more complicated than the others. I'll use an example to demonstrate. In this example, I will be replacing Theoden with the created hero for the MOTW faction.

First, in livingworlddefaultarmies.inc, found in data/ini/campaigns/common/, I find Theoden's code:

Code:
SpawnArmy
    ScriptingName = HeroArmy2
    SpawnForTemplates = PlayerMen
    HeroTemplateName = RohanTheoden
    PlayerArmy = TheodenPlayerArmy
    Icon = HeroTheodenIcon
    Banner = BannerMen
End
and replace it with this:

Code:
SpawnArmy
    ScriptingName = HeroArmy2
    SpawnForTemplates = PlayerMen
    HeroTemplateName = CreateAHero
    PlayerArmy = MoW_CreateAHeroArmy
    Icon = MoWArmyIcon
    Banner = BannerMen
End
Next, I open both livingworldbuildableunits.inc and livingworldstartingunits.inc (both found in the same place as the previous one). I swap the Create a Hero code from livingworldbuildableunits.inc and the Theoden code from livingworldstartingunits.inc.

The Create a Hero code:

Code:
LivingWorldPlayerArmy
    Name = MoW_CreateAHeroArmy
    DisplayNameTag = LWA:MenOfTheWest
    ArmyEntry
        ThingTemplate = CreateAHero
        Quantity = 1
    End
End
The Theoden code:

Code:
LivingWorldPlayerArmy
    Name = TheodenPlayerArmy
    DisplayNameTag = LWA:MenHeroArmy
    ArmyEntry
        ThingTemplate = RohanTheoden
        Quantity = 1
    End
End
Now I start WOTR mode with my create a hero (with the MOTW faction). Remember the AI MOTW factions will also start with the create a hero.

If you're confused by any of this or need something explained better, let me know.

Quote:
I would also like to allow all factions to create elite units on the world map and move them around the world
Could you be more specific? What exactly are you after?
  TokyoBlade is offline
lions_56
Default May 19th, 2012, 10:44 PM Old   #3

lions_56's Avatar

Posts: 11
Join Date: May 2012
Thanks for the thorough reply. What I was asking about the elite units I wanted to make knights of dol amoroth and noldor warriors available to build on the world map as well as keeping them from real time battles.


Also do you know if it is possible to copy a hero's .ini and create a custom hero that way? I have tinkered with giving faramir blade master and things of the sort.
----- Automerged post -----
So I got the hero army into WOTR; now how do I get his banner to show his face rather than a garrison army banner? (Get his face on the banner)?

Last edited by lions_56: May 19th, 2012 at 11:15 PM. Reason: Automerged Doublepost
  lions_56 is offline
TokyoBlade
Default May 20th, 2012, 03:31 AM Old   #4
My Custom Title

TokyoBlade's Avatar


Lord of the Old Realm 

Posts: 8,969
Join Date: Aug 2004
Quote:
Thanks for the thorough reply. What I was asking about the elite units I wanted to make knights of dol amoroth and noldor warriors available to build on the world map as well as keeping them from real time battles.
Ah, I see. In theory, that should be possible. Unfortunately, I don't have Rise of the Witch King Expansion (just BFME2) so I can't really do this. However, I found the game's ini codes online and can see what you need to do.

livingworldbuildableunits.ini

Add this to men's section (at end of men, before Elves starts)

Code:
LivingWorldPlayerArmy
    Name = GondorDolAmrothArmy
    DisplayNameTag = LWA:MenOfTheWest
    ArmyEntry
        ThingTemplate = GondorKnightsofDolHorde
        Quantity = 1
    End
End
livingworldbuildings.ini

Go down to the men's barracks section (near the top). First line is

Code:
LivingWorldBuilding LWB_GondorBarracks
Further down, there is a list of all the recruitable units for the barracks. At the end of that list, add this:

Code:
ArmyToSpawn
            PlayerArmy = GondorDolAmrothArmy
            Icon = MoWArmyIcon
            IconSize = Small
            PalantirMovie = Palantir_509
            ConstructButtonImage = BGStables_KnightDolAmrothIcon
            ConstructButtonTitle = CONTROLBAR:LW_Unit_DolAmrothHorde
            ConstructButtonHelp = CONTROLBAR:LW_ToolTipBuild_DolAmrothHorde
            BuildTime = 2
        End
If you want them to be trained in just one turn, rather than two, simply change BuildTime to 1.

Finally, in lotr.str, add this somewhere (Personally, I prefer to put new .str code at the very end):

Code:
CONTROLBAR:LW_Unit_DolAmrothHorde
"Dol Amroth Battalion"
END

CONTROLBAR:LW_ToolTipBuild_DolAmrothHorde
"Unit Type: Elite Cavalry\nStrong vs. Archers\n"
END
Because I don't have Rise of the Witch-King, I cannot test this to make sure it works. It should work fine though. Please let me know if it doesn't!


Quote:
Also do you know if it is possible to copy a hero's .ini and create a custom hero that way? I have tinkered with giving faramir blade master and things of the sort.
It is indeed possible! Are you looking to create a completely new hero, or just edit existing heroes? If you tell me which one you're going for, I can show you the coding you need to do

Quote:
So I got the hero army into WOTR; now how do I get his banner to show his face rather than a garrison army banner? (Get his face on the banner)?
You'd have to put new graphics into the game to do that (and even then, every Create A Hero will have the exact same face, rather than a different one for each hero).

Last edited by TokyoBlade: May 20th, 2012 at 03:36 AM.
  TokyoBlade is offline
lions_56
Default May 20th, 2012, 05:54 PM Old   #5

lions_56's Avatar

Posts: 11
Join Date: May 2012
I was looking to create a hero similar to faramir with a few different abiliites. I do know how to use 6 abilities, I would like blademaster, toggle weapon, toggle mount, sniper ability (from Damrod of Arnor), Wounding shot, and Eomer's outlaw leadership.
  lions_56 is offline
lions_56
Default May 20th, 2012, 09:17 PM Old   #6

lions_56's Avatar

Posts: 11
Join Date: May 2012
I have run into a bit of a snag. When my create a hero army loses an auto resolve battle the game crashes. How do I fix this?
  lions_56 is offline
TokyoBlade
Default May 21st, 2012, 01:30 PM Old   #7
My Custom Title

TokyoBlade's Avatar


Lord of the Old Realm 

Posts: 8,969
Join Date: Aug 2004
Quote:
I have run into a bit of a snag. When my create a hero army loses an auto resolve battle the game crashes. How do I fix this?
That's strange; I'm not getting any crashes when I try. What error message are you getting exactly?

Quote:
I was looking to create a hero similar to faramir with a few different abiliites. I do know how to use 6 abilities, I would like blademaster, toggle weapon, toggle mount, sniper ability (from Damrod of Arnor), Wounding shot, and Eomer's outlaw leadership.
Alright, this will get very intense, but I'll try to explain it:

Coding needed:

commandset.ini - to set the commands for your new hero. For example:

Code:
CommandSet NewHeroCommandSet
    1    = Command_ToggleStance
    2    = Command_SpecialAbilityBladeMaster2
    3    = Command_ToggleFaramirWeapon2
    4    = Command_ToggleMounted
    5    = Command_SpecialAbilityWoundArrow
    6    = Command_RohanEomerOutlawLeadership
    12 = Command_CaptureBuilding
    13 = Command_AttackMove
    14 = Command_Stop
End
Slot 1 is always toggle stance for units. Anything after 6 don't show up on the palantir. So, if you want to make more room for another ability (like the Sniper Ability) then you'll need to move ToggleStange to 15 or something.

This is the command for Deadly Sniper: Command_SpecialAbilityDamrodDeadlySniper

I changed Command_ToggleFaramirWeapon and Command_SpecialAbilityBladeMaster to Command_ToggleFaramirWeapon2 and Command_SpecialAbilityBladeMaster2 for reason's I'll explain later.



experiencelevels.ini - To set the new hero's experience and what level he learns new skills. The easiest way to do this is to simply copy an existing hero's experience code and paste it at the end, then make your own changes. I used Faramir's code.

So, I end up with this for level 1:

Code:
ExperienceLevel    NewHeroLevel1
    TargetNames                        =    NewHero NewHeroCavalry
    RequiredExperience                =    1    
    ExperienceAward                    =    M_FARAMIR_LVL1_EXP_AWARD  
    Rank                            =    1
    SelectionDecal
        Texture                        =    decal_hero_good
        Style                        =    SHADOW_ALPHA_DECAL
        OpacityMin                    =    50%    
        OpacityMax                    =    100%
        MinRadius                    =    40
        MaxRadius                    =    200
        MaxSelectedUnits            =    40
    End    
End
TargetNames refers to the object this experience level affects (which we'll code later!)

So, continue to change all the other Faramir levels from FaramirLevel# to NewHeroLevel# and change the targetnames to NewHero NewHeroCavalry (requires two, because the new hero on foot and new hero on horse are considered different objects).

Remove all the Upgrades = code as well, since this hero has different abilities.

So, now you decide what level the hero learns each ability at, which is done with the Upgrades = line.

The codes for the abilities you want are:

Blademaster - Upgrade_AragornBladeMaster
Mount - Upgrade_FaramirKnightRangerToggle
Deadly Sniper - Upgrade_DamrodDeadlySniper
Wound Arrow - Upgrade_ObjectLevel2
Eomer Leadership - Upgrade_EomerOutlawLeader

For example, if I want Blademaster at level 2, I'd do this for the level 2 experience code:

Code:
ExperienceLevel    NewHeroLevel2
    TargetNames                        =    NewHero NewHeroCavalry
    RequiredExperience                =    M_FARAMIR_LVL2_EXP_NEEDED
    ExperienceAward                    =    M_FARAMIR_LVL2_EXP_AWARD  
    LevelUpFx                        =    FX:GandalfLevelUp1FX
    Rank                            =    2
    AttributeModifiers                =    HeroLevelUpDamage1
    Upgrades                        =    Upgrade_AragornBladeMaster
    SelectionDecal
        Texture                        =    decal_hero_good
        Style                        =    SHADOW_ALPHA_DECAL
        OpacityMin                    =    50%    
        OpacityMax                    =    100%
        MinRadius                    =    40
        MaxRadius                    =    200
        MaxSelectedUnits            =    40
    End    
End
If I want to get two abilities at the same level, just put a space between each one like this:

Code:
ExperienceLevel    NewHeroLevel2
    TargetNames                        =    NewHero NewHeroCavalry
    RequiredExperience                =    M_FARAMIR_LVL2_EXP_NEEDED
    ExperienceAward                    =    M_FARAMIR_LVL2_EXP_AWARD  
    LevelUpFx                        =    FX:GandalfLevelUp1FX
    Rank                            =    2
    AttributeModifiers                =    HeroLevelUpDamage1
    Upgrades                        =    Upgrade_AragornBladeMaster Upgrade_FaramirKnightRangerToggle
    SelectionDecal
        Texture                        =    decal_hero_good
        Style                        =    SHADOW_ALPHA_DECAL
        OpacityMin                    =    50%    
        OpacityMax                    =    100%
        MinRadius                    =    40
        MaxRadius                    =    200
        MaxSelectedUnits            =    40
    End    
End
playertemplate.ini - to put the new hero into a faction. If I want this hero to be in the Men faction, I'd find the code for the Men faction, look for BuildableHeroesMP and add NewHero to the end of that.

Code:
BuildableHeroesMP            = CreateAHero GondorBoromir RohanTheoden RohanEowyn GondorFaramir RohanEomer GondorAragornMP GondorGandalf NewHero; ;
You need to create a new .ini file for your new hero (in data - ini - object - goodfaction - units - men). Since we used Faramir as a base, copy ALL of the code from faramir.ini, paste it into a new notepad file, then save it as newhero.ini (change "Save as type:" from Text Documents to All Files)

Change the name of the object to NewHero, so it corresponds with the previous coding.

Code:
Object NewHero
Then all the way down at the bottom, change the Child Object's name

Code:
ChildObject NewHeroCavalry NewHero
(telling the game that "NewHeroCavalry" is a child object of "NewHero")

About half way down, there's a section for design parameters

Code:
Side = Men
    EditorSorting = UNIT
    ThreatLevel = M_FARAMIR_THREAT_LEVEL
    ThingClass = CHARACTER_UNIT
      BuildCost = M_FARAMIR_BUILDCOST                
      BuildTime = M_FARAMIR_BUILDTIME            
      ShockwaveResistance = M_SHOCKWAVE_RESISTANCE_STRONG    
    TransportSlotCount = M_TRANSPORTSLOTCOUNT_HERO
Stuff like M_FARAMIR_BUILDCOST is found in gamedata.ini. You can go into there and add some new lines if you want, like NEWHERO_BUILDCOST

Further down, look for CommandSet = GondorFaramirCommandSet and change it to

Code:
CommandSet = NewHeroCommandSet

Next for the ability codes.

Open up aragorn.ini and find his blademaster code.

Code:
Behavior = UnpauseSpecialPowerUpgrade ModuleTag_AragornBladeMasterEnabler
        SpecialPowerTemplate = SpecialAbilityAragornBladeMaster
        TriggeredBy = Upgrade_AragornBladeMaster
    End

      Behavior = SpecialPowerModule ModuleTag_AragornBladeMasterStarter                ; SpecialAbility is a SpecialPower, SpecialPower is anyting special
        SpecialPowerTemplate    = SpecialAbilityAragornBladeMaster
        StartsPaused            = Yes
    End

    Behavior = HeroModeSpecialAbilityUpdate ModuleTag_AragornBladeMasterUpdate   ; So the difference in SpecialAbility is that it takes timing from this Update, instead of simply firing.
        SpecialPowerTemplate    = SpecialAbilityAragornBladeMaster
        HeroAttributeModifier    = AragornBladeMaster
        HeroEffectDuration        = 30000 ; this should sync with the auto ability delay re-fire time in commandButtons.ini
        UnpackTime              = 1 ; insant unpack
        TriggerSound            = AragornBladeMaster
    End
Copy and paste that into newhero.ini, with the rest of the ability codes (perhaps after the wounding arrow code).

If you like, you can put in the AI code too (so the AI knows how to use it), but you don't have to. If you do, copy Aragorn's blademaster AI code

Code:
Behavior = AISpecialPowerUpdate AragornBladeMasterAI
        CommandButtonName = Command_SpecialAbilityBladeMaster
        SpecialPowerAIType = AI_SPECIAL_POWER_BASIC_SELF_BUFF
    End
and put it with the AI code from newhero.ini, which is after the ability code.

Now, to get the visual effects of blademaster, you need to add some animation code. First, take Aragorn's code and add WEAPONSET_TOGGLE_1 (faramir's sword state) :

Code:
ModelConditionState = WEAPONSET_HERO_MODE WEAPONSET_TOGGLE_1
            ParticleSysBone = BAT_RIBS BladeMaster FollowBone:Yes
        End
and put it with the newhero "Models" section near the top. Now, find the blademaster attack animation further down and copy it into the newhero animations, in the "attacking" section (before "moving").

Code:
AnimationState                = FIRING_OR_PREATTACK_A WEAPONSET_HERO_MODE ; Blademaster Mode
            StateName                = STATE_ready
            Animation                = ATKF
                AnimationName        = GUAragorn_SKL.GUAragorn_ATKF
                AnimationMode        = ONCE
                UseWeaponTiming        = Yes
            End
            Flags                    = RESTART_ANIM_WHEN_COMPLETE
            FXEvent    = Frame:25 Name: FX_BladeMasterHitOrient
            FXEvent    = Frame:45 Name: FX_BladeMasterHitOrient
        End
A few changes are needed.

The AnimationState needs to include the sword's weapon toggle - WEAPONSET_TOGGLE_1

StateName needs to be changed to STATE_Sword (to refer to our new hero's "Sword State" (when he is holding a sword, not a bow)).

AnimationName needs to be changed to Faramir's skeleton and animations (GUFaramir_SKL.GUFaramir_ATKF) - the "ATKF" refers to a specific attack animation, using Faramir's skeleton.

So, we end up with this:

Code:
AnimationState                = FIRING_OR_PREATTACK_A WEAPONSET_HERO_MODE WEAPONSET_TOGGLE_1 ; Blademaster Mode
            StateName                = STATE_Sword
            Animation                = ATKF
                AnimationName        = GUFaramir_SKL.GUFaramir_ATKF
                AnimationMode        = ONCE
                UseWeaponTiming        = Yes
            End
            Flags                    = RESTART_ANIM_WHEN_COMPLETE
            FXEvent    = Frame:25 Name: FX_BladeMasterHitOrient
            FXEvent    = Frame:45 Name: FX_BladeMasterHitOrient
        End
Next code needed is the sniper ability. Fine Damrod's code in obsolete.ini, copy the weaponset code for deadly sniper

Code:
WeaponSet
        Conditions        = WEAPONSET_HERO_MODE
        Weapon            = PRIMARY    DamrodBowDeadlySniper
        AutoChooseSources = PRIMARY FROM_PLAYER FROM_SCRIPT FROM_AI
    End
put it with the other weaponset codes in newhero.ini.

Go down to Damrod's abilities and copy the code for Deady Sniper over to the ability section of newhero.ini.


Last is Eomer's leadership, which is the easiest to bring over to the new hero. Open up Eomer's ini file and copy his leadership ability code over to newhero's ability section.



Next thing to do is put the code for the new Toggle Weapon and BladeMaster commands I put in the new hero's command set. Put the following code at the bottom of commandbutton.ini

Code:
CommandButton Command_ToggleFaramirWeapon2
    Command            =    TOGGLE_WEAPONSET
    Options            =    UNMOUNTED_ONLY TOGGLE_IMAGE_ON_WEAPONSET
    FlagsUsedForToggle    =    WEAPONSET_TOGGLE_1
    TextLabel               =    CONTROLBAR:ToggleFaramirWeapons
    ButtonImage             =    HSFaramirSword UCElven_Bow 
    ButtonBorderType        =    ACTION 
    DescriptLabel           =    CONTROLBAR:ToolTipToggleFaramirWeapons
    InPalantir        =    Yes
    DisableOnModelCondition = WEAPONSET_HERO_MODE
    
End
This is exactly the same as the original Farimir Toggle Weapon with just one small difference:

Code:
DisableOnModelCondition = WEAPONSET_HERO_MODE
When using blademaster or deadly sniper, you don't want to be able to switch weapon in the middle of it (doing so would switch hero modes: blademaster to deadly sniper (changing from sword to bow) or vice versa (bow to sword)). With this code, it prevents you from changing weapon while you are still in hero mode.

Code:
CommandButton Command_SpecialAbilityBladeMaster2
  Command                 = SPECIAL_POWER 
  SpecialPower            = SpecialAbilityAragornBladeMaster
  TextLabel               = CONTROLBAR:BladeMaster
  ButtonImage             = HSAragornBladeMaster
  ButtonBorderType        = ACTION 
  DescriptLabel           = CONTROLBAR:ToolTipBladeMaster
  InPalantir              = Yes
  AutoAbility              = Yes
  AutoDelay                  = 30.0 ; this should sync with the Aragorn's hero mode effect time
  PresetRange              = 50.0
  UnitSpecificSound       = AragornVoiceBladeMaster
  EnableOnModelCondition  = WEAPONSET_TOGGLE_1
End
This works in the same way, except with

Code:
EnableOnModelCondition  = WEAPONSET_TOGGLE_1
It can only be used while holding a sword.



Okay, there is one last thing.

Code:
DisplayName = OBJECT:GondorFaramir
    RecruitText = CONTROLBAR:GondorFaramirRecruit
    ReviveText    = CONTROLBAR:GondorFaramirRevive
    Hotkey        = CONTROLBAR:GondorFaramirHotkey
These all refer to things in lotr.str. You can add new text for your hero. For example:

Code:
OBJECT:NewHero
"New Hero"
END

CONTROLBAR:NewHeroRecruit
"Recruit the New Hero"
END

CONTROLBAR:NewHeroRevive
"Revive the fallen Hero, New Hero"
END

CONTROLBAR:NewHeroHotkey
"&New Hero"
END
The & symbol on CONTROLBAR:GondorFaramirHotkey refers to the hotkey - the hotkey is the letter that comes after the & symbol.





Well, that's finally it... If you have any problems or questions, let me know.

Last edited by TokyoBlade: May 21st, 2012 at 01:55 PM. Reason: I'm a fool
  TokyoBlade is offline
lions_56
Default May 21st, 2012, 02:57 PM Old   #8

lions_56's Avatar

Posts: 11
Join Date: May 2012
Thank you for your help. Will this replace Faramir or simply add the new hero? And one more question for now, how can I make Arnor playable in WOTR mode? Could I apply the same code to other custom factions?

Also are you familar with RJ Rotwk? I would like to add some of the features in his game to mine. Such as the Easterling and Rohan factions as well as the expanded WOTR living world map.
  lions_56 is offline
TokyoBlade
Default May 21st, 2012, 04:10 PM Old   #9
My Custom Title

TokyoBlade's Avatar


Lord of the Old Realm 

Posts: 8,969
Join Date: Aug 2004
Quote:
Thank you for your help. Will this replace Faramir or simply add the new hero?
It adds a new hero. Faramir is still in there.

Quote:
And one more question for now, how can I make Arnor playable in WOTR mode?
I just had a look at the ROTWK code and all the coding is already done for Arnor! It looks to me like they put arnor into WOTR mode, then decided to take them out later on.

For example, in livingworldplayers.ini

There's this

Code:
;LivingWorldPlayerTemplate PlayerArnor
followed by a load of code for the Arnor faction. I guess you could try going through all the livingworld ini files and removing the ; sign before each line (tedious, I know, but you have to get rid of them in order for the game to read the code).

I can't test it myself because I don't have the game.

Quote:
Could I apply the same code to other custom factions?
If you familiarise yourself with all the code in the livingworld ini files (just look through them to see what they did) you can end up putting your own factions into the game mode.

Quote:
Also are you familar with RJ Rotwk? I would like to add some of the features in his game to mine. Such as the Easterling and Rohan factions as well as the expanded WOTR living world map.
Heard of it, but never played it (I don't even have ROTWK, after all!)

Remember, if you plan on releasing your mod online, you should get permission from the RJ Rotwk creators to use their code.

But yeah, if you look at the modded ini files from RJ Rotwk and see what they did, you could then try putting it into your own mod.
  TokyoBlade is offline
lions_56
Default May 21st, 2012, 04:28 PM Old   #10

lions_56's Avatar

Posts: 11
Join Date: May 2012
Do you know how to make more than one created hero buildbable?

Last edited by lions_56: May 21st, 2012 at 05:44 PM.
  lions_56 is offline
TokyoBlade
Default May 22nd, 2012, 12:15 AM Old   #11
My Custom Title

TokyoBlade's Avatar


Lord of the Old Realm 

Posts: 8,969
Join Date: Aug 2004
Quote: Originally Posted by lions_56 View Post
Do you know how to make more than one created hero buildbable?
No, that's impossible to do.
  TokyoBlade is offline
lions_56
Default May 22nd, 2012, 08:07 PM Old   #12

lions_56's Avatar

Posts: 11
Join Date: May 2012
This is the error that causes the game to crash when my created hero army loses an auto resolve battle:

Runtime Error!

Program C:\PROGRA~2\ELECTR~1\THELOR~\game.dat

This application has requested the Runtime to terminate it in an unusual way.
Please contact the applications's support team for more information.

The game crashes when I try to select the hero army after he is defeated in an auto resolve battle.
  lions_56 is offline
TokyoBlade
Default May 23rd, 2012, 01:20 AM Old   #13
My Custom Title

TokyoBlade's Avatar


Lord of the Old Realm 

Posts: 8,969
Join Date: Aug 2004
Quote: Originally Posted by lions_56 View Post
This is the error that causes the game to crash when my created hero army loses an auto resolve battle:

Runtime Error!

Program C:\PROGRA~2\ELECTR~1\THELOR~\game.dat

This application has requested the Runtime to terminate it in an unusual way.
Please contact the applications's support team for more information.

The game crashes when I try to select the hero army after he is defeated in an auto resolve battle.

Ah, sorry about that; I forgot to put in one single line of code that prevents that from happening:

In livingworldautoresolvebody.ini, go to the create a hero section

Code:
AutoResolveBody AutoResolve_CreateAHeroBody
    HitpointsAtLevel = Hitpoints:CREATEAHERO_LVL1_HP Level:1
    HitpointsAtLevel = Hitpoints:CREATEAHERO_LVL2_HP Level:2
    HitpointsAtLevel = Hitpoints:CREATEAHERO_LVL3_HP Level:3
    HitpointsAtLevel = Hitpoints:CREATEAHERO_LVL4_HP Level:4
    HitpointsAtLevel = Hitpoints:CREATEAHERO_LVL5_HP Level:5
    HitpointsAtLevel = Hitpoints:CREATEAHERO_LVL6_HP Level:6
    HitpointsAtLevel = Hitpoints:CREATEAHERO_LVL7_HP Level:7
    HitpointsAtLevel = Hitpoints:CREATEAHERO_LVL8_HP Level:8
    HitpointsAtLevel = Hitpoints:CREATEAHERO_LVL9_HP Level:9
    HitpointsAtLevel = Hitpoints:CREATEAHERO_LVL10_HP Level:10
End
and simply add LeaveInArmySummary = Yes at the end, like this:

Code:
AutoResolveBody AutoResolve_CreateAHeroBody
    HitpointsAtLevel = Hitpoints:CREATEAHERO_LVL1_HP Level:1
    HitpointsAtLevel = Hitpoints:CREATEAHERO_LVL2_HP Level:2
    HitpointsAtLevel = Hitpoints:CREATEAHERO_LVL3_HP Level:3
    HitpointsAtLevel = Hitpoints:CREATEAHERO_LVL4_HP Level:4
    HitpointsAtLevel = Hitpoints:CREATEAHERO_LVL5_HP Level:5
    HitpointsAtLevel = Hitpoints:CREATEAHERO_LVL6_HP Level:6
    HitpointsAtLevel = Hitpoints:CREATEAHERO_LVL7_HP Level:7
    HitpointsAtLevel = Hitpoints:CREATEAHERO_LVL8_HP Level:8
    HitpointsAtLevel = Hitpoints:CREATEAHERO_LVL9_HP Level:9
    HitpointsAtLevel = Hitpoints:CREATEAHERO_LVL10_HP Level:10
    LeaveInArmySummary = Yes
End
With that line, it treats "Create a Hero" as an actual hero, rather than a unit that dies and you have to retrain. That's why it was crashing - The game thought the hero was dead, but the other coding puts in his army as a permanent hero, so when you clicked on his army, the game was looking for a hero that was no longer around.

Since this hero replaced Theoden, it would probably be a good idea to remove that line from Theoden's code.
  TokyoBlade is offline
lions_56
Default May 25th, 2012, 09:21 AM Old   #14

lions_56's Avatar

Posts: 11
Join Date: May 2012
Ok I want to the created hero for all factions as a hero army, my question is what part of this code needs to be altered for each faction?

SpawnArmy
ScriptingName = HeroArmy5
SpawnForTemplates = PlayerMen
HeroTemplateName = CreateAHero
PlayerArmy = MoW_CreateAHeroArmy
Icon = MoWArmyIcon
Banner = BannerMen
End


What do I do with MoW_CreateAHeroArmy for each faction?
  lions_56 is offline
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Hunt mode samoht The Lord of the Rings: Conquest 11 Jan 10th, 2009 10:27 AM
Modding zach The Lord of the Rings: Conquest 16 Jul 29th, 2008 04:20 PM
Is there a way to play wotr more then 2 players ? Very important GEEG Battle for Middle-earth Series 10 Jul 24th, 2008 10:54 AM
BFME Modding News Stealthsnake News and Announcements 3 Jul 17th, 2008 01:44 PM
Helm's deep and Minas Tirith on Skirmish mode? 12345 Battle for Middle-earth Series 4 Feb 21st, 2005 07:00 PM


All times are GMT -5. The time now is 06:12 AM.

Inactive Reminders By Icora Web Design