The 3rd Age

Battle for the Galaxy

Battle for the Galaxy

Battle for the Galaxy seeks to change the land of Middle-earth into the vast Star Wars Galaxy.

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

Finding a list of CAH subobjects

Tutorial for Battle for Middle-earth II BFME 2, Battle for Middle-earth II: Rise of the Witch-king ROTWK

No Avatar

Illuvatar

Category: Code
Level: Beginner
Created: Thursday June 10, 2010 - 6:30
Updated: Thursday June 10, 2010 - 6:44
Views: 5230
Summary: Have no idea where to find a list of the CAH subobjects? Problem solved!

Rating

Staff says

3.0

Members say

-

Average

3.0/5.0

1 vote

Note: Some of this might be very obvious to you who have discovered this already. This is just for those who don't know about it.


Ok, I don't know about you, but I have recently been very frustrated about getting the names of CAH subobjects right. No one on any websites seemed to know a list of them.

However, I recently stumbled upon a file located in data/ini/object/createahero called createaheroweaponupgrades.inc. This file contains a list of "upgrades" CAHs get when they get a weapon. A typical block in the file might look something like this:
              
Code
Behavior = SubObjectsUpgrade WizardSword_Upgrade7
    TriggeredBy             = Upgrade_CHW07
    ShowSubObjects         = WizardStaff01
    HideSubObjectsOnRemove = Yes
    FadeTimeInSeconds = 0.0
End

Notice this line:
              
Code
ShowSubObjects         = WizardStaff01

This is the same line you use when you are editing the visible subobjects on your heroes containing CAH subobjects. And the name after that field is the name of that specific subobject. Voila! You now have a complete list of CAH subobjects in createaheroweaponupgrades.inc!

A typical section of the file would look like this (this being the wizard staff section):
              
Code
//-------------------------------------------------------------
// Wizard Staff    1 Weapon upgrade.
//-------------------------------------------------------------
WeaponSet
    Conditions             = WEAPONSET_CREATE_A_HERO_WS_07        //CLOSE_RANGE     CONTESTING_BUILDING
    Weapon                 = PRIMARY CreateAHeroBasicMeleeWeapon
    AutoChooseSources     = PRIMARY FROM_PLAYER FROM_SCRIPT FROM_AI
End
Behavior = WeaponSetUpgrade Create_A_Hero_Weapon7
    TriggeredBy             = Upgrade_CHW07
    WeaponCondition         = WEAPONSET_CREATE_A_HERO_WS_07
End
Behavior = SubObjectsUpgrade WizardSword_Upgrade7
    TriggeredBy             = Upgrade_CHW07
    ShowSubObjects         = WizardStaff01
    HideSubObjectsOnRemove = Yes
    FadeTimeInSeconds = 0.0
End
Behavior = SubObjectsUpgrade WizardSwordFX01_Upgrade7
    TriggeredBy             = Upgrade_CHW07
    ShowSubObjects         = WizStaff01_FX01
    HideSubObjectsOnRemove = Yes
    FadeTimeInSeconds = 0.0
End
Behavior = SubObjectsUpgrade WizardSwordFX02_Upgrade7
    TriggeredBy             = Upgrade_CHW07
    ShowSubObjects         = WizStaff01_FX2
    HideSubObjectsOnRemove = Yes
    FadeTimeInSeconds = 0.0
End
Behavior = SubObjectsUpgrade WizardSwordFX03_Upgrade7
    TriggeredBy             = Upgrade_CHW07
    ShowSubObjects         = WizStaff01_FX3
    HideSubObjectsOnRemove = Yes
    FadeTimeInSeconds = 0.0
End
Behavior = SubObjectsUpgrade WizardSwordFX04_Upgrade7
    TriggeredBy             = Upgrade_CHW07
    ShowSubObjects         = WizStaff01_FX4
    HideSubObjectsOnRemove = Yes
    FadeTimeInSeconds = 0.0
End

There you have it, short and simple. Happy modding!

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

 
14:09:01