Jump to content


Photo

Witch King's powers?


  • Please log in to reply
6 replies to this topic

#1 Witch King

Witch King
  • Members
  • 38 posts

Posted 16 November 2007 - 11:03 PM

Hi everyone!!

I found this picture http://flameofudun.t...witchking1.jpeg and I was wondering how is possible to replace the Witch King's powers with these on the photo?

Using the finalBig I found at Textures2, art\compliledtextures\he\heroui_054.dds the images of these powers and I was wondering if there is a way to replace the existing ones with those.

Could someone be kind and patient enough to guide me how to do that? :blink:

I really have no idea about modding. I read some tutorial but they didn't help much. The only things I can do is change cost of units, damage etc... too simple things, so any help would be appreciated.

Edit: this is for Battle for Middle Earth II

Edited by Witch King, 16 November 2007 - 11:06 PM.

===ΝΙΨΟΝΑΝΟΜΗΜΑΤΑΜΗΜΟΝΑΝΟΨΙΝ===

#2 Losing Solace

Losing Solace
  • Members
  • 31 posts
  • Location:Around.
  • Projects:BFME II WoTR Expansion
  •  None T_T

Posted 16 November 2007 - 11:08 PM

The link does open for me... And why not try backing up the file you want to replace, and replacing it... If it's an image file wont it just be accessed once the game goes to look for it and it has the same name as the one before... But otherwise I don't know... Never hurts to try, if you back it up first :blink:
Posted Image
Newb modders unite! <_<

#3 Witch King

Witch King
  • Members
  • 38 posts

Posted 16 November 2007 - 11:40 PM

The link does open for me... And why not try backing up the file you want to replace, and replacing it... If it's an image file wont it just be accessed once the game goes to look for it and it has the same name as the one before... But otherwise I don't know... Never hurts to try, if you back it up first :blink:


I am not sure if you mean that, but I checked the data\in\mappedimages\antimages\heroui.ini and I saw that the images of the Witch King used in the game are actually the ones I look for. It says:
''Texture HeroUI_054.tga'' which is the image I want to replace, but in the game they are different.

Am I searching in the wrong file? I really get confused with these things. :(
===ΝΙΨΟΝΑΝΟΜΗΜΑΤΑΜΗΜΟΝΑΝΟΨΙΝ===

#4 Witch King

Witch King
  • Members
  • 38 posts

Posted 18 November 2007 - 10:54 PM

At last! I managed to change the Witch King's images of the skill buttons!! Nothing special but I am a beginner :p

I need something else now... some questions:
* How can I make the sword of the Witch King a default weapon and not the mace?(also make the mace disappear)
* If the above happens, then, how can I make at a specific level, switch between the sword and the mace?(when I switch the mace it would appear as in the ordinary game)
*And how can I add an other power in the last empty skill button but be an earlier level than the Hour of the WK, level 7 for example?
And generally how can I make powers to be awarded to other levels than the original?

Thanks in advance for anyone who will try to help :rolleyes:
===ΝΙΨΟΝΑΝΟΜΗΜΑΤΑΜΗΜΟΝΑΝΟΨΙΝ===

#5 Solinx

Solinx

    .

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

Posted 26 November 2007 - 03:05 PM

Congratz on solving your first problem :)

Hmm... I only have ini files from patch 1.03 at hand, but I think I should be able to help you a bit. :thumbsupsmiley:

Im starting with your last question. The others I may edit in or post later.

* And how can I add an other power in the last empty skill button but be an earlier level than the Hour of the WK, level 7 for example?
And generally how can I make powers to be awarded to other levels than the original?

I'm going to use the level 6 Screech power of the WK as an example to answer this question.
I'm getting carried away, but I figured as a starting modder you wouldn't mind the extra info :thumbsupsmiley:

So, we're starting at a piece of code from data\ini\experiencelevels.ini:
ExperienceLevel	WitchKingLevel6
	TargetNames						=	WITCHKING
	RequiredExperience				=	WITCHKING_LVL6_EXP_NEEDED
	ExperienceAward					=	WITCHKING_LVL6_EXP_AWARD 
	AttributeModifiers				=	HeroLevelUpDamage5	
	Rank							=	6
	LevelUpFx						=	FX:GandalfLevelUp1FX
	Upgrades						=	Upgrade_Screech
	
	SelectionDecal
		Texture						=	decal_hero_good
		Style						=	SHADOW_ALPHA_DECAL
		OpacityMin					=	50%
		OpacityMax					=	100%
		MinRadius					=	40
		MaxRadius					=	200	
		MaxSelectedUnits			=	40
	End	
End
This codeblock is used to state the events that happen when the WK reaches level 6.
Relevant to your questions is the Upgrade line, which points to and awards the "Upgrade_Screech" upgrade to the WK.

To add another power which the WK is to get at level 7, go to the WithKingLevel7 block. You will find that block doesn't have an Upgrades line yet. You can add one and state the upgrade which is linked to the level 7 power you gave to the level 7 WK.

To change the levels at which powers are awarded, you simply need to look for the block where the power is awarded and either remove the upgrade name from the list of upgrades if multiple upgrades are awarded at the same level, or remove the entire line if it's the only one. The next step is to enter the upgrade in the code block of the level you want the power to be given. Add the complete Upgrades line if it isn't already present.

Note: The TargetNames line refers to lists of objects which are defined at the top of the experiencelevels file, not to individual objects.
Note: If ; or // is placed before a line, the game will ignore the line. You probably already know this, but that assumption has taken it's victims before.

Now the above action isn't the complete story to give a new ability to a hero...
I've assumed you have an ability in the hero's ini file, got it linked to an upgrade, specialpower, commandbutton and have the commandbutton linked to the commandset of the hero.


If you don't have all that done already, read on for some more basic info on how to set up a new ability...

Before you start working with abilities it is important to know that each button, upgrade, commandset, etc. needs to have an unique name. You can use behavior names multiple times in a mod, as long as you use them only once per object.

In the experience file we worked with upgrades, so I'll continue from there.
All upgrades for normal objects are listed in data\ini\upgrade.ini:
Upgrade Upgrade_Screech
  Type				= OBJECT
End
As you see, there hardly is any code. This code is mainly used to simply tell the game the upgrade exists. The Type line states that when the upgrade is awarded, it only applies to the object getting the award. The alternative input is PLAYER, which means the upgrade is applied to all objects in the game.

Good, but that still doesn't tell us what an upgrade does...
The effects of an upgrade are defined in the object ini's. Objects being either units, hordes, buildings, heroes, etc. One upgrade can have multiple effects inside one object, and the same upgrade may have completly different effects with other objects.

Since there is a limit to the number of upgrades, it can be useful to use those properties.

Now here is the example of the Screech upgrade, which of course can be found in data\ini\object\evilfaction\units\mordor\witchking.ini:
;---------SCREECH------------------------------------------------------------------------
	Behavior = UnpauseSpecialPowerUpgrade ModuleTag_ScreechUnPause
		SpecialPowerTemplate		= SpecialAbilityScreech
		TriggeredBy					= Upgrade_Screech
		ObeyRechageOnTrigger		= Yes
	End
	Behavior = SpecialPowerModule ModuleTag_Screech					  
		SpecialPowerTemplate		= SpecialAbilityScreech
		UpdateModuleStartsAttack	= Yes
		StartsPaused				= Yes
	End
	Behavior = SpecialAbilityUpdate ModuleTag_ScreechUpdate  
		SpecialPowerTemplate		= SpecialAbilityScreech
		UnpackTime					= 0  
		TriggerSound				= WitchKingScreechMS
		Instant						= Yes
		EffectRange					= 180
	End
	Behavior = AutoAbilityBehavior ModuleTag_AutoAbilityBehavior
	End
The Screech ability is a dormant power. In the middle behavior modules, the StartsPaused line is set to Yes, which means certain (a) condition(s) need to be fullfilled before it becomes available to the player.

This requirement is listed in the TriggeredBy line of the first module. When the WK is rewarded with the Upgrade_Screech upgrade, which happens at level 6, the power is enabled for the first time.

Some of the specifics of the ability are listed in the other two behaviors. These behaviors can differ greatly depending on the sort of power involved. This is also why I won't go into explaining the workings of abilities. This small guide is only to explain how a generic ability needs to be linked to certain files in order to get it available ingame.

The central code that links these behaviors is the SpecialPowerTemplate, SpecialAbilityScreech.

These templates can be found in data\ini\specialpowers.ini:
SpecialPower SpecialAbilityScreech
  Enum			  = SPECIAL_SCREECH
  ReloadTime		= 180000; in milliseconds
End
The Screech template is the simpelest form of template, stating only it's Enum and reloadtime. If you scroll through the file you'll see some templates trigger sounds or set limits to abilities.

When working with abilities, it is crucial to heed the warning from EA, which can be found at the top of the file:

; Please note that the Enum must one-for-one correspond with the power within a unit. Too many
; places in the code have accidentally crossed the distinction of instance and type, such
; that units can't handle having two powers of the same type.

With "type", they refer to the Enum present in each specialpower template. Simply said, an object can't be linked to two templates with the same Enum, or the game won't start. Or if it does start, an error will pop up while playing, which is worse, since then you get no indication of what caused the error.

Like the behaviors inside the object ini file, the commandbutton is linked by the specialpowertemplate. Here is the Screech power button from data\ini\commandbutton.ini:
CommandButton Command_SpecialAbilityScreech
  Command				 = SPECIAL_POWER 
  SpecialPower			= SpecialAbilityScreech
  TextLabel			   = CONTROLBAR:Screech
  ButtonImage			 = HSNazgulScreech
  ButtonBorderType		= ACTION 
  DescriptLabel		   = CONTROLBAR:TooltipScreech
  InPalantir			  = Yes
  AutoAbility			  = Yes
  PresetRange			  = 150
End
Most things here are pretty obvious, but I'll go over them anyway. :thumbsupsmiley:

The first line states the name of the button.
- The Command line states the type of command, with abilities this generally is SPECIAL_POWER. Look at other buttons to get an idea what other types there are.
- The SpecialPower is of course our link.
- ButtonImage is the button visible in the ability menu. Note: Using custom images involves asset.dat
- ButtonBorderType... hmm... can't recall the effects of this one. Pretty much everything is Action, so keep it at that :xcahik_:
- InPalantir, setting this to yes means it shows up in the palantir... surprising really...
- AutoAbility, setting this to yes allows you to let the AI decide when to use the ability.
- PresetRange... hmm... not often used I'd say, my guess is that it could have something to do with autoability... If you're really interested, you'll have to ask someone else about this ;)

Concerning the labels... the labelnames refer to an entry of the same name in a file called lotr.str... at least I think that was the str file is named. (I don't have the file at hand.) The structure of the file is really easy and you shouldn't have any problems on that part. What you do need to keep in mind is which lotr.str you decide to edit. The original file is located at English.BIG, but with each patch the file got updated, so you need to unpack and edit the lotr.str you find in the language BIG that came with the latest patch.

Last step is linking the button to the unit's commandset. Here is the WK's commandset from data\ini\commandset.ini:
CommandSet MordorWitchKingCommandSet
	1 	= Command_ToggleStance
	2 	= Command_WitchKingToggleMounted
	3 	= Command_WitchKingDreadVisage
	4 	= Command_SpecialAbilityScreechWitchKing
	5 	= Command_HourOfTheWitchKing
	12 	= Command_CaptureBuilding	
	13 	= Command_AttackMove
	14 	= Command_Stop
End
The link here is simply the name of the button. If you want to add a level 7 ability, and you have the button ready, you can put it between the Screech and HotWK ability by moving the HotWK command to number 6 and putting the new abilty at number 5.
The result would be something like this:
CommandSet MordorWitchKingCommandSet
	1 	= Command_ToggleStance
	2 	= Command_WitchKingToggleMounted
	3 	= Command_WitchKingDreadVisage
	4 	= Command_SpecialAbilityScreechWitchKing
		5	   = Command_NEW_LEVEL_7_ABILITY
	6 	= Command_HourOfTheWitchKing
	12 	= Command_CaptureBuilding	
	13 	= Command_AttackMove
	14 	= Command_Stop
End
That should be it.

You should note that the WK uses more than one object and therefor has two ini files. One for the on foot form, and one for the fellbeast form. If you want him to have your new ability in both conditions, you will need to make sure you edit both files and also that you edit all his commandsets.

Hope it helped, and like I said, Ill see if I edit the answers to the other questions in here.

Solinx
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 Witch King

Witch King
  • Members
  • 38 posts

Posted 26 November 2007 - 09:07 PM

Great help!!!!!Really really thankful for your help!!! :thumbsupsmiley:
I have read tutorials about the subject but because of my lack of knowledge on coding, I didn't understand much. Your detailed explanation is amazing!! :)

Thanks again!
===ΝΙΨΟΝΑΝΟΜΗΜΑΤΑΜΗΜΟΝΑΝΟΨΙΝ===

#7 Guest_Guest_*

Guest_Guest_*
  • Guests

Posted 14 March 2008 - 12:49 AM

Can anyone tell me how to add new images to the game.Esspecially for the witchking's abilities..I opened the file called ini.big with the editor and i found the ini/images/heroes..
Now i found the ability the hour of the witchking(its image sux..whatever)and its name.Now what should i do to add a new button image?




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users