Jump to content


Photo

Let's Conquer CaH


  • Please log in to reply
14 replies to this topic

#1 Hostile

Hostile

    Benefitting Humanity Simply by Showing Up!

  • Veterans
  • 9,551 posts
  • Location:Washington DC
  •  T3A Founder
  • Division:Revora
  • Job:Global Administrator
  • Donated
  • Association

Posted 15 January 2007 - 06:09 PM

I don't mod BFME anymore but have been enjoying playing ROTWK. I'm frustrated by the limitations of the attributes and skill selections. So I'm gonna return to modding this game to figure out more about changing the CaH stuff.

I'd like to start with some basic findings that I'm sure alot of people here know.

Where to find the files in the INI BIG file under (oddly enough) createahero files. I'm gonna focus on the trolls because I think they kick ass at the moment. I started off by looking on how to increase the number of attribute points to spend. Well this was easy enough and found in createaherosystemologhai.

This sets up all the info for the trolls. There are three types of trolls: traditional trolls, snow trolls, and hill trolls. Each have there own little image so you can add more trolls.

Like maybe half trolls, homosexual trolls, and so on... Each of these sub trolls are sub catagorized. You can define a catagory, than define a subcatagory. This makes me wonder if I can add a new catagory like "Undead" or something, than subcatagorize that by Army of the Dead, Wight, Skeleton, Zombie and so on and so forth.

I see that the new catagory shows up as an icon in the main create a hero part when you click new here. There does seem to be more room to add more. I'll have to look into that.

CreateAHeroClass	
	NameTag			= CreateAHero:ClassName_OlogHai
	DescriptionTag		= CreateAHero:ClassDesc_OlogHai
	PowersDescTag		= CreateAHero:ClassPowersDesc_OlogHai
	UpgradeName			= Upgrade_CreateAHero_ClassOlogHai
	IconImage	   = CPTroll;Archetype_OlogHai

This first part of the catagory seems pretty straight forward. It defines the new class, adds the tool tips, and assigns an image to use when you're viewing the catagories in the CaH editing section.

Let's look at the first subcat, the generic troll.

SubClass	// Troll
		NameTag			  =	CreateAHero:SubClassName_Troll
		DescriptionTag	  =	CreateAHero:SubClassDesc_Troll
		IconImage		 = CPTroll
		ButtonImage	   = HICAHTroll
		//DefaultFaction			  = Mordor 
		UsableFactions			  = Isengard Mordor Wild Angmar
		SpendableAttributePoints		= 50
		// In UI it should be		  =  HICAHTroll_wotr

		UpgradeName			  =	Upgrade_CreateAHero_SubClass_0
		//-------------------------------
		// Awards common to all heros.
		#include "CreateAHeroSystemCommonStatsAndAwards.inc"
		// Class specific awards
		Awards = ScourgeOfMiddleEarth

NameTag			  =	CreateAHero:SubClassName_Troll
It appears this is simple syntax to define the name. Icon seems straight foward, this is the image where you choose which type of troll you want for your hero.

Buttonimage seems to be what you'd use when building the hero. Still all simple so far.

UsableFactions			  = Isengard Mordor Wild Angmar
This is a fun piece of code, defines who gets to use this hero.

SpendableAttributePoints		= 50
You can see I've already changed mine from 20 to 50. :dry: Also no point adding more than 50, there are only max 50 slots if you add up all the empty ones.

UpgradeName			  =	Upgrade_CreateAHero_SubClass_0
Appears to set some kinda starting point for CaH.

Here is where the most fun begins. Adding the hero bling bling.
// Weapons
		BlingUpgrades		  =	Upgrade_CHW12 Upgrade_CHW13 Upgrade_CHW14 Upgrade_CHW15 Upgrade_CHW29 Upgrade_CHW30
		//-------------------------------
		// Head	Gear
		BlingUpgrades = Upgrade_NoHelmet Upgrade_TRLL_CHH01 @Upgrade_TRLL_CHH02 Upgrade_TRLL_CHH03 Upgrade_TRLL_CHH08

I can only imagine the headgear for each unit is simply a model subobject. So you could essentially open up a model and add gandalfs hat so to speak, add a staff, if named properly and added to the model correctly, I can't see why it wouldn't work. :p

Bingo step one on making a troll wizard. :D

Attribute
			GroupName			= CreateAHero_ArmorAttribute
			MinValueUpgrade		= Upgrade_ArmorAttribute03
			MaxValueUpgrade		= Upgrade_ArmorAttribute17
			DefaultValueUpgrade	= Upgrade_ArmorAttribute09
		End
		
		Attribute
			GroupName			= CreateAHero_DamageMultAttribute
			MinValueUpgrade		= Upgrade_DamageMultAttribute13
			MaxValueUpgrade		= Upgrade_DamageMultAttribute20
			DefaultValueUpgrade	= Upgrade_DamageMultAttribute18
		End
Just because you gave your hero more attribute points to spend and the game accepted it. You still have a max limit that the game will let you use.

MaxValueUpgrade		= Upgrade_ArmorAttribute17
This level has to be changed in order for your hero to use the higher number of cheating attribute points you made. You need to change this to 20.

If you cheaters want to save yourself some time, you can set the default and the max to the same level to save yourself the time of having to click to increase the attributes to max. But that step is also kinda fun when you're cheating anyways. I'm just more about effecient cheating. ;)

That's about as much info as I got from the OlogHai file. So I had to dig alittle deeper...

This is where I ran inot some problems. I can see how and where all the model subojects are defined as each is considered an upgrade. But I can't seem to find where it defines what basic model to use for the subcatagories.

How does the game know to use the snow troll model when handeling the snow troll? Where is the connection between the CaH weapons and the subobjects? The upgrades appear to command the subobjects based on upgrades.

Upgrade Upgrade_CHW01	//' Dwarf Axe_01
	Type	= OBJECT
	GroupName = CreateAHero_Weapon
End

But it never mentions what the name of the subobject is? Unless it's hard coded by the group name perhaps? Than I'd assume all CaH must use the same naming scheme for the weapon subobjects.

If anyone here can add anything to this, I'd really appreciate it. I'll figure out more as the week progresses.

#2 Solinx

Solinx

    .

  • Undead
  • 3,101 posts
  • Location:The Netherlands
  • Projects:Real Life
  • Division:Revora
  • Job:Retired Leader / Manager

Posted 15 January 2007 - 06:57 PM

Like maybe half trolls, homosexual trolls, and so on... Each of these sub trolls are sub catagorized. You can define a catagory, than define a subcatagory. This makes me wonder if I can add a new catagory like "Undead" or something, than subcatagorize that by Army of the Dead, Wight, Skeleton, Zombie and so on and so forth.

You might want to read this guide:
BFME II Guide: How to add a new Create a Hero faction
It's both about adding a main class, aswell as a subclass.

If you want to convert normal hero powers to CaH powers:
BFME 2 Guide: Converting normal powers into Create A Hero Powers

For those who want to do the opposite:
BFME 2 Guide: Converting Create A Hero powers to normal powers

Mind you, both guides are limited to general information only, since there are many different sort of powers, many of which require just a small additional change specific to that power. If help is needed, just post in the forum and contact me, to be sure I notice the topic.

UsableFactions			  = Isengard Mordor Wild Angmar
This is a fun piece of code, defines who gets to use this hero.

Yes, the CaH isn't hard to work with once you figured it out. Just remember that with this piece of code, we can only set a limited range of factions. We can only use:
- Isengard
- Mordor
- Wild
- Angmar
- Arnor
- Elves
- Men
- Dwarves

Observer, neutral and civilian are also an option, but those will very likely mess up the game mechanics.
The reason that we can't enter any custom names is that this list is hardcoded in Game.dat. Several of us have tried to bring it to the attention of EA, but well, you can guess the result.
Edit: Note that both Arnor and Angmar are only available in the RotWK expansion.

This is where I ran inot some problems. I can see how and where all the model subojects are defined as each is considered an upgrade. But I can't seem to find where it defines what basic model to use for the subcatagories.

Take a look at ...\data\ini\object\createahero\createaheromodelconditionupgrades.inc :dry:

EDIT:
Ok, in the meanwhile I have been writing another guide on the CaH, this time about changing the attribute limits. It's a two part guide, the first is limited to the changes Hostile posted above, increasing the available points and increasing the standard limits to a max of 20. The second part is a theoretical guide on how to increase the range beyond 20.
BFME 2 Guide: Create a Hero Attributes

Solinx

Edited by Solinx, 21 January 2007 - 04:55 PM.

Posted Image

"An expert is a man who has made all the mistakes which can be made in a very narrow field." - Niels Bohr


#3 Lauri

Lauri

    Old man Lauri

  • Hosted
  • 10,436 posts
  • Location:Norway
  • Projects:The 4th Age
  •  The very worst T3A Team Chamber Member

Posted 15 January 2007 - 07:28 PM

arg, Hostile you bitch :dry: You just made me wanna make some CaHitty stuff :p

T4A_Logo_-_article.png

The 4th Age version 0.8 has been released: Link


#4 Hostile

Hostile

    Benefitting Humanity Simply by Showing Up!

  • Veterans
  • 9,551 posts
  • Location:Washington DC
  •  T3A Founder
  • Division:Revora
  • Job:Global Administrator
  • Donated
  • Association

Posted 15 January 2007 - 07:37 PM

Solinx that's the kinda stuff I needed. This thread could be useful to show everyone all this info in one place. I read the adding abilities but missed adding a new onw. Great work man, and that was back in march. :dry:

#5 Solinx

Solinx

    .

  • Undead
  • 3,101 posts
  • Location:The Netherlands
  • Projects:Real Life
  • Division:Revora
  • Job:Retired Leader / Manager

Posted 15 January 2007 - 07:52 PM

Thanks :dry:

You're making me want to finally continue on the complete CaH guide I had planned back then. Not starting before the end of next week though, study goes first. :p

Edit: ok, bringing the problems together:

MrRanck had this problem:

New powers are a bit more involved. Besides all the steps of creating a normal hero power (specialpower.ini, weapon.ini, upgrade.ini, etc.) the LOTR.str file needs to be edited to create CAH descriptions the GUI will recognize.

This is something I've actually hit a brick wall with myself. My first attempt was to create a Level 7 toggle for the corrupted man CAH (level 1 and 3 are currently available). For some odd reason, I can't get the right descriptions in LOTR.str, and the CAH menu puts the new power down at the bottom of the powers list, not after the Level 3 toggle.

I keep getting a "Missing: CAH:Command_CreateAHero_CM_ToggleWeapon_Level3_Name" error despite having

CAH:Command_CreateAHero_CM_ToggleWeapon_Level3_Name
"Great Toggle Weapon"
END

in my LOTR.str

Don't remember having problems with this. I'll try to look at it later today, no promises.

2nd Edit:
Both Makaveli and IthronAiwendil had a problem with changing the Disguise CaH power into a normal power, while both have converted other CaH powers before.
Perhaps this power is hardcoded, or perhaps it only needs a special bit of code, like the healing power and the stealth modules. Both of these have an additional piece of code in the main CaH ini.
Keyword: SpecialAbilityCreateAHeroDisguise
Edit: Solved by Cahik. The disguise also requires a special bit of code from the main ini, read on for the complete post of Cahik

Solinx

Edited by Solinx, 20 January 2007 - 11:54 PM.

Posted Image

"An expert is a man who has made all the mistakes which can be made in a very narrow field." - Niels Bohr


#6 Hostile

Hostile

    Benefitting Humanity Simply by Showing Up!

  • Veterans
  • 9,551 posts
  • Location:Washington DC
  •  T3A Founder
  • Division:Revora
  • Job:Global Administrator
  • Donated
  • Association

Posted 15 January 2007 - 10:05 PM

Well I modded the troll heroes to have a max level of 20 on everything with no min level. But I only gave them 60 points to play with. They make some decent uber heroes. I'll add my WIP here for others to have a few laughs at. Load the files and go build a troll hero.

Basically place the big file in my applications BFME: ROTWK folder and place the icon on your desktop. You should be able to click and play the mod. Nothing fancy, just some uber trolls for some laughs while I learn this CaH thing.

Fixed so Troll, snow trolls, and hill trolls have differant top limits. So to make each troll ubernique. :dry:

Attached Files



#7 cahik_

cahik_

    Sage engine ruler

  • Project Team
  • 1,896 posts
  • Location:Czech Republic
  • Projects:Rhovanion Alliance
  •  T3A Team Chamber Member and Crazy animator

Posted 20 January 2007 - 05:21 PM

i was just looking for some challenge today. in this topic i found one. that disgused thingy catch my attention. just half of a hour and i ended on that.
clicky you can see arwen disgused as orc. i will upload the codes sometimes later i am now off for two hours or so...

Posted Image

Posted Image
Posted Image


#8 IthronAiwendil

IthronAiwendil

    Retired modder

  • Hosted
  • 1,452 posts
  • Location:Finland
  • Projects:None
  •  Coder, skinner, modeler, art guy

Posted 20 January 2007 - 05:43 PM

Disguise... I would really want to know how that's done!

#9 cahik_

cahik_

    Sage engine ruler

  • Project Team
  • 1,896 posts
  • Location:Czech Republic
  • Projects:Rhovanion Alliance
  •  T3A Team Chamber Member and Crazy animator

Posted 20 January 2007 - 05:56 PM

you are lucky ... the only pub around has closed today. so i am back at my comp. :p

well here are the codes:

special power

SpecialPower SpecialAbilityCreateAHeroDisguise99
	Enum	 =	SPECIAL_DISGUISE_AS_VEHICLE
	ReloadTime	=	60000
	ObjectFilter  = ANY +INFANTRY +HERO -BIG_MONSTER -CREATE_A_HERO NOT_FLYING_UNITS
End

commandbutton

CommandButton Command_SpecialAbilityDisguise1
	Command			   = SPECIAL_POWER
	SpecialPower	   = SpecialAbilityCreateAHeroDisguise99
	Options			   = NEED_TARGET_ENEMY_OBJECT NEED_TARGET_ALLY_OBJECT NEED_TARGET_NEUTRAL_OBJECT CONTEXTMODE_COMMAND
	ButtonImage			 = SBGood_EagleAllies
	TextLabel			   = CONTROLBAR:ToggleSkirmishFormation
	DescriptLabel		   = CONTROLBAR:ToolTipToggleSkirmishFormation
	CursorName		   = Bombard
	ButtonBorderType   = ACTION
	InvalidCursorName	= GenericInvalid
	InPalantir		   = Yes
End

but the problem wasnt here. it was in units code i think.

units/hero code

Behavior = UnpauseSpecialPowerUpgrade ModuleTag_CreateAHeroDisguiseEnabler
	SpecialPowerTemplate		= SpecialAbilityCreateAHeroDisguise99
End
Behavior = SpecialPowerModule ModuleTag_CreateAHeroDisguiseStarter
	SpecialPowerTemplate		= SpecialAbilityCreateAHeroDisguise99
	UpdateModuleStartsAttack	= Yes
	StartsPaused				= no
End
Behavior = SpecialAbilityUpdate ModuleTag_CreateAHeroDisguiseUpdate
	SpecialPowerTemplate		= SpecialAbilityCreateAHeroDisguise99
	StartAbilityRange			= 1000000.0
	ApproachRequiresLOS			= No
End

these 3 behaviours are from createaheropowers.inc . i guess you put those in you units code, but it is not enough. since the disguse works similar to the stealth ability you need a special behaviour for that and it is locate in createahero.ini. this was probably the part you omit.

Behavior = StealthUpdate ModuleTag_CreateAHeroCMDisguiseStealthUpdate
		StealthDelay							= 1
		DisguisesAsTeam							= Yes
		RevealDistanceFromTarget				= 100.0f
		OrderIdleEnemiesToAttackMeUponReveal	= Yes
		InnateStealth							= Yes
		DisguiseTransitionTime					= 2000
		DisguiseRevealTransitionTime			= 1000 
End

thats all folks :lol:

now who Conquer CaH??? :ohmy:

Edited by cahik_, 20 January 2007 - 05:57 PM.

Posted Image

Posted Image
Posted Image


#10 Hostile

Hostile

    Benefitting Humanity Simply by Showing Up!

  • Veterans
  • 9,551 posts
  • Location:Washington DC
  •  T3A Founder
  • Division:Revora
  • Job:Global Administrator
  • Donated
  • Association

Posted 20 January 2007 - 06:31 PM

i was just looking for some challenge today. in this topic i found one. that disgused thingy catch my attention. just half of a hour and i ended on that.
clicky you can see arwen disgused as orc. i will upload the codes sometimes later i am now off for two hours or so...

That would be pretty useful against human players. But seeing you can't play online, it's kinda tough to use. I'm sure the computer sees right through it.

#11 cahik_

cahik_

    Sage engine ruler

  • Project Team
  • 1,896 posts
  • Location:Czech Republic
  • Projects:Rhovanion Alliance
  •  T3A Team Chamber Member and Crazy animator

Posted 20 January 2007 - 07:14 PM

look like so, but someone should try it carefully. i dont like playing the game too much so i am not going to test it in more than one game :lol:

Posted Image

Posted Image
Posted Image


#12 zimoo

zimoo

    Ecthelion of the Fountain

  • Project Team
  • 2,009 posts
  • Location:Devon, England
  • Projects:Lurking until the off topic begins...
  •  Guardian of the Books

Posted 20 January 2007 - 07:30 PM

From my own gaming experience I've found that stealth effects are pretty much useless against the AI. Elven cloak works, but that's about it.

The AI sees all, that's why if you open your gate on a fortress map like Minas Tirith they'll immediately send all their troops at you. That's why they automatically attack resource buildings on the other side of the map, and know exactly where to go.
Posted Image
Posted Image
Posted Image
Posted Image
Posted Image
Posted Image

Playing games? Ah, you'll never be a good modder if you get involved in actually playing them!


#13 cahik_

cahik_

    Sage engine ruler

  • Project Team
  • 1,896 posts
  • Location:Czech Republic
  • Projects:Rhovanion Alliance
  •  T3A Team Chamber Member and Crazy animator

Posted 20 January 2007 - 07:47 PM

The AI sees all, that's why if you open your gate on a fortress map like Minas Tirith they'll immediately send all their troops at you. That's why they automatically attack resource buildings on the other side of the map, and know exactly where to go.


Disguse isnt power that should give big advantage it should just confuse the enemy a bit.

Btw: AI sees all, but you have a brain :lol:

Posted Image

Posted Image
Posted Image


#14 Solinx

Solinx

    .

  • Undead
  • 3,101 posts
  • Location:The Netherlands
  • Projects:Real Life
  • Division:Revora
  • Job:Retired Leader / Manager

Posted 20 January 2007 - 08:37 PM

Nice job Cahik :)

I'll add it in my guide that the disguise also has a bit in createahero.ini

Edit:
Added to both my power switching guides. And I have also been writing another guide on the CaH, this time about changing the attribute limits. It's a two part guide, the first is limited to the changes Hostile posted above, increasing the available points and increasing the standard limits to a max of 20. The second part is a theoretical guide on how to increase the range beyond 20.
BFME 2 Guide: Create a Hero Attributes

Solinx

Edited by Solinx, 21 January 2007 - 04:56 PM.

Posted Image

"An expert is a man who has made all the mistakes which can be made in a very narrow field." - Niels Bohr


#15 Hostile

Hostile

    Benefitting Humanity Simply by Showing Up!

  • Veterans
  • 9,551 posts
  • Location:Washington DC
  •  T3A Founder
  • Division:Revora
  • Job:Global Administrator
  • Donated
  • Association

Posted 29 January 2007 - 10:13 PM

Theoretically, I see where you were going with that tutorial. Besides the graphics limits of the bar, there could be a much lower hard coded attribute max. That would be interesting to test if I had the time.

Nice work...




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users