Jump to content


Photo

Copying hero powers between mods?

abilities hero special powers

  • Please log in to reply
42 replies to this topic

#1 ThorinOakenshield2

ThorinOakenshield2
  • Members
  • 205 posts
  • Location:London, Great Britain

Posted 16 October 2015 - 01:54 PM

Hi all.
First off, I don't know if I should post this here, so sorry if I have to post it somewhere else.
Today I decided to go back and try again to implement fully Agandaur in BFME2: Rise of the Witchking from BOTTA mod into the Edain mod. I had already got the models into the game, but I decided to try to copy his special abilities from BOTTA to Edain; however, I don't have a clue how to do that, and I didn't find any good tutorials. I tried to do it without tutorials but it ends up with errors in WB and ingame.
Does anyone here know how to do this? If yes, can you explain me how? Or link me to a tutorial? :)
Thanks in advance.

Edited by ThorinOakenshield2, 16 October 2015 - 01:56 PM.


#2 Mathijs

Mathijs

    Post-modern Shaman

  • Network Leaders
  • 13,756 posts
  • Projects:Age of the Ring
  • Division:Revora
  • Job:Leader

Posted 16 October 2015 - 03:27 PM

Moved to BFME2/RotWK modding.


No fuel left for the pilgrims


#3 TheCrazyDwarf

TheCrazyDwarf
  • Members
  • 6 posts

Posted 16 October 2015 - 03:48 PM

http://www.the3rdage...item-90?addview
This should give you a basic understanding about what needs to be done in converting a power for another hero :).


bannernew.jpg


#4 ThorinOakenshield2

ThorinOakenshield2
  • Members
  • 205 posts
  • Location:London, Great Britain

Posted 16 October 2015 - 04:11 PM

Thanks, I will try it, but does it work for transferring powers between mods? Because I think Agandaur's powers from BOTTA were not in the vanilla game.

Edited by ThorinOakenshield2, 16 October 2015 - 04:12 PM.


#5 TheCrazyDwarf

TheCrazyDwarf
  • Members
  • 6 posts

Posted 16 October 2015 - 04:21 PM

You can always track down everything in the code and look for changes that don't use vanilla setup. Post the code here maybe someone can help with that.


bannernew.jpg


#6 ThorinOakenshield2

ThorinOakenshield2
  • Members
  • 205 posts
  • Location:London, Great Britain

Posted 16 October 2015 - 04:36 PM

Right now I don't have access to my computer (it's being repaired cus it broke down, again :( ), after two-three days I'll post the code.

#7 ThorinOakenshield2

ThorinOakenshield2
  • Members
  • 205 posts
  • Location:London, Great Britain

Posted 19 October 2015 - 01:09 PM

These are the commandbutton.ini and commandset.ini file from the BOTTA mod.

Attached File  commandbutton.ini   1.19MB   138 downloads

Attached File  commandset.ini   417.58KB   115 downloads

Here is the experiencelevels.ini:

http://www.mediafire...iencelevels.ini

Here is the specialpower.ini:

http://www.mediafire...pecialpower.ini

And here is Agandaur's ini from BOTTA:

http://www.mediafire...bg/agandaur.ini

As far as I know, these are the needed files for me to copy Agandaur's powers from BOTTA to Edain; but I may be wrong.

Anyway, how can I transfer his powers using these files, or am I missing a file?


Edited by ThorinOakenshield2, 19 October 2015 - 01:23 PM.


#8 Titan Cronus

Titan Cronus

    Do unto Others...

  • Members
  • 693 posts
  • Location:Ireland
  • Projects:The Battle of the Pelennor Fields Mod.

Posted 20 October 2015 - 03:05 PM

I'm not sure about either of the mods as have played neither but I can tell you about special powers.

 

For a special power you need the special power code from in the heroes file (there are two parts, the special power code and the AI code to actually use the code) and it might look something like this:

;;//---------------------
;; This is Aragorn's Blade Master and goes somewhere at the bottom of his file
;;//----------------------
	Behavior = UnpauseSpecialPowerUpgrade ModuleTag_AragornBladeMasterEnabler
		SpecialPowerTemplate 	= SpecialAbilityAragornBladeMaster
		TriggeredBy 		= Upgrade_AragornBladeMaster
	End

  	Behavior = SpecialPowerModule ModuleTag_AragornBladeMasterStarter
		SpecialPowerTemplate    = SpecialAbilityAragornBladeMaster
		StartsPaused		= Yes
	End

	Behavior = HeroModeSpecialAbilityUpdate ModuleTag_AragornBladeMasterUpdate
		SpecialPowerTemplate    = SpecialAbilityAragornBladeMaster
		HeroAttributeModifier	= AragornBladeMaster
		HeroEffectDuration	= 30000
		UnpackTime              = 1 ; insant unpack
		TriggerSound		= AragornBladeMaster
	End

;;//--------
;; This is the code for the AI to use the special power. It goes right at the bottom of his file, just above the geometry code.
;;//--------
	
	Behavior = AISpecialPowerUpdate AragornBladeMasterAI
		CommandButtonName = Command_SpecialAbilityBladeMaster
		SpecialPowerAIType = AI_SPECIAL_POWER_BASIC_SELF_BUFF
	End

You can copy code like this in from another mod and it should work. Problems to look out for are things like the upgrade used to trigger it might not be in your mod or the specialpowertemplate might not be in your mod either. You just replace the upgrade with the relevant upgrade in the hero's experience file and for the specialpowertemplate, just find it in the original mod (in the specialpowers.ini) and copy it across into your mod. Or, if there is another specialpower that you know of in your mod that acts in the same way, use that specialpowertemplate instead. That's it for special powers code in the a hero's file.

 

Next, you'll need a command button for it. Again, you should be ok to copy it across from the other mod. Problems to look out for are things like the art for the button not being in your mod. If its not, just replace it with art from another command button or add your own. Also, the button information (TextLable and DescriptLable) might not be in your mod so you'll either have to copy it into yours or use some from another button with similar information. If you want to copy it across, you need to find it in lotr.str located in data/ and copy it across into the same file in your mod.

 

Then you need to add the command button name into the hero's commandset.

 

 

I think that's everything. Good luck.


Battle of the Pelennor Fields

Made by 1 guy, has 13 Factions, 75+ Heroes, 150+ different units and 200+ Special abilities.

 

http://www.moddb.com...pelennor-fields


#9 ThorinOakenshield2

ThorinOakenshield2
  • Members
  • 205 posts
  • Location:London, Great Britain

Posted 20 October 2015 - 03:57 PM

^^Thank you for the detailed explanation, I'll give it a try and write here when I have done it to say whether it worked or not :)

Edited by ThorinOakenshield2, 20 October 2015 - 03:58 PM.


#10 Titan Cronus

Titan Cronus

    Do unto Others...

  • Members
  • 693 posts
  • Location:Ireland
  • Projects:The Battle of the Pelennor Fields Mod.

Posted 21 October 2015 - 12:35 AM

No worries man.

 

I just remembered some other things about the special power code found in the hero's file that you might need. Some of the special powers might have unique weapons, attribute modifiers or OCLs that you might need to copy across too.

	;------- ISTARI WEAPON --------------------------------------------------------------------------------
	Behavior = UnpauseSpecialPowerUpgrade ModuleTag_IstariLightEnabler
		SpecialPowerTemplate = SpecialAbilityIstariLight
		TriggeredBy = Upgrade_GandalfIstariLight
	End
	Behavior = SpecialPowerModule ModuleTag_IstariLightPower                      
		SpecialPowerTemplate		= SpecialAbilityIstariLight
		UpdateModuleStartsAttack	= Yes
		StartsPaused			= Yes
		InitiateSound			= GandalfVoiceAttackIstariLight	;this plays when he targets, not when he fires
	End

	Behavior = WeaponFireSpecialAbilityUpdate ModuleTag_IstariLightUpdate
		SpecialPowerTemplate    = SpecialAbilityIstariLight
		SkipContinue			= Yes
		UnpackTime              = 2000 
 		PreparationTime         = 1  
 		PersistentPrepTime      = 2000
 		PackTime                = 500
		AwardXPForTriggering    = 0
		StartAbilityRange		= GANDALF_PHASER_CAST_RANGE ; Note: This has to be smaller than the weapon range or it'll never succeed
		ApproachRequiresLOS		= Yes		
		SpecialWeapon			= GandalfStaffWeapon
		MustFinishAbility		= Yes
		WhichSpecialWeapon		= 3
		BusyForDuration			= 2500
	End

For example, in Gandalf's Istari Light special power, it uses a weapon (GandalfStaffWeapon). If one of the special powers you're copying across has unique weapons, you'll need to find them in the mod in the weapon .ini and copy them into your mod. The same goes for attribute modifiers and OCLs, find them in the mod you copying from and copy them into your mod. An OCL in a block of code that spawns something into the game, something like a unit, structure or even a effect of some kind.

 

Below if a special power that uses an OCL and they can be found in the objectcreationlist .ini file in the /data/ini/ folder.

	Behavior = UnpauseSpecialPowerUpgrade ModuleTag_AragornOathbreakersEnabler
		SpecialPowerTemplate 	= SuperweaponSpawnOathbreakers
		TriggeredBy 		= Upgrade_AragornOathbreakers
	End

	Behavior = OCLSpecialPower ModuleTag_OCLSpecialPower
		SpecialPowerTemplate	= SuperweaponSpawnOathbreakers
		OCL			= OCL_GondorArmyofTheDeadEggSmall
		CreateLocation		= CREATE_AT_LOCATION
		StartsPaused		= Yes
		SetModelCondition	= ModelConditionState:USER_1
		SetModelConditionTime	= 8.1
	End

Attribute modifiers (like leadership buffs) can be found in the attributemodifier .ini file in the data/ini/ folder.

 

 

 

Good luck man.


Battle of the Pelennor Fields

Made by 1 guy, has 13 Factions, 75+ Heroes, 150+ different units and 200+ Special abilities.

 

http://www.moddb.com...pelennor-fields


#11 ThorinOakenshield2

ThorinOakenshield2
  • Members
  • 205 posts
  • Location:London, Great Britain

Posted 21 October 2015 - 12:04 PM

Ok, I copied the Agandaur parts from the commandset.ini, attributemodifier.ini, commandbutton.ini, lotr.str, experiencelevels.ini and Specialpower.ini from BOTTA mod into the respective files in Edain mod, and I placed his ini file in the .big file of the mod. The result is still crashing.
Have I done something wrong? Or missed something?

Edited by ThorinOakenshield2, 21 October 2015 - 12:06 PM.


#12 Kwen

Kwen

    Vileartist

  • T3A Staff
  • 4,865 posts
  • Location:Korea I wish
  • Projects:It'sa secreeet
  •  T3A's First N00b
  • Division:BFME
  • Job:T3A Expert
  • Donated

Posted 21 October 2015 - 12:53 PM

Show a picture of the crash.

                           https://www.twitch.tv/vileartist - Yes shameless self-promotion

          ----------------------------------------------------------------------------------------------------------------------

                            "Old modders never die, they just fade away" ~ Hostile


#13 ThorinOakenshield2

ThorinOakenshield2
  • Members
  • 205 posts
  • Location:London, Great Britain

Posted 21 October 2015 - 01:47 PM

http://www.mediafire...vbx9s/Crash.jpg



#14 Kwen

Kwen

    Vileartist

  • T3A Staff
  • 4,865 posts
  • Location:Korea I wish
  • Projects:It'sa secreeet
  •  T3A's First N00b
  • Division:BFME
  • Job:T3A Expert
  • Donated

Posted 21 October 2015 - 03:36 PM

Imgur

 

Do you get this crash when you're starting the game or if you try to use the ability?


Edited by Kwen, 21 October 2015 - 03:37 PM.

                           https://www.twitch.tv/vileartist - Yes shameless self-promotion

          ----------------------------------------------------------------------------------------------------------------------

                            "Old modders never die, they just fade away" ~ Hostile


#15 ThorinOakenshield2

ThorinOakenshield2
  • Members
  • 205 posts
  • Location:London, Great Britain

Posted 21 October 2015 - 03:59 PM

I do get a crash when I start the game; but your link doesn't show a crash?

#16 Kwen

Kwen

    Vileartist

  • T3A Staff
  • 4,865 posts
  • Location:Korea I wish
  • Projects:It'sa secreeet
  •  T3A's First N00b
  • Division:BFME
  • Job:T3A Expert
  • Donated

Posted 21 October 2015 - 06:53 PM

My link was sarcasm, if you are going to post a picture just upload it to an image site like imgur and use [img] tags in your post. It's really annoying to go through media fire to download a jpg just to look at a picture lol.

I meant "this" in reference to your crash.

If you get a crash at startup then you're missing something. Double triple check that everything the power references exists in the code.

Edited by Kwen, 21 October 2015 - 06:54 PM.

                           https://www.twitch.tv/vileartist - Yes shameless self-promotion

          ----------------------------------------------------------------------------------------------------------------------

                            "Old modders never die, they just fade away" ~ Hostile


#17 Titan Cronus

Titan Cronus

    Do unto Others...

  • Members
  • 693 posts
  • Location:Ireland
  • Projects:The Battle of the Pelennor Fields Mod.

Posted 21 October 2015 - 09:48 PM

Ok, I'm not sure what's happening there. Go through the special power code in the hero's file and make sure he has nothing else unique that you have to add (if you want to post your code, we can see if we spot anything). Did you check all the upgrades for example? Also, check that the AI code (AISpecialPowerUpdate code block) is referencing the correct commandbotton.

 

Another thing to check is the experience levels code, make sure there's nothing unique linked to the gamedata .ini. Look at all the upgrades and stuff. For upgrades, check in the upgrades file to see if they are in your mod and in not either copy them across or use an upgrade from anoth hero's experience levels (if you change the upgrade, make sure to change it in the special power code in the hero's file too).

Look at the RequiredExperience and ExperienceAward code lines, they references to lines of code in the gamedata .ini so make sure they are not unique and if so, copy them across. Keep an eye out in all the rest of your code for other lines of code like that, that make reference to the gamedata. Check them all and make sure every one is in the gamedata file.

;----------------------	ARAGORN	-------------------------------------

ExperienceLevel	AragornLevelMP1
	TargetNames					=	ARAGORN	
	RequiredExperience				=	1
	ExperienceAward					=	ARAGORN_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	

ExperienceLevel	AragornLevelMP2
	TargetNames					=	ARAGORN	
	RequiredExperience				=	ARAGORN_LVL2_EXP_NEEDED
	ExperienceAward					=	ARAGORN_LVL2_EXP_AWARD 
	LevelUpFx					=	FX:GandalfLevelUp1FX
	;LevelUpOCL					=	OCL_GandalfLevelUp1OCL
	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

Also, have you added the hero to the desired faction in the playertemplate .ini and to the same faction in skirmishaidata .ini (found in data/ini/default/ folder). Oh, another thing, check that there are no new FX or FXParticalsystems in the heroe's file.

 

BTW, this may be a stupid question but is the hero using a new/unique art, skin, animations and/or modle? If so, they will need adding to the asset.dat. EDIT: Never mind, I re-read your OP and saw that you have the model sorted. Did you have the hero working perfectly in game before you started adding the special power code stuff?


Edited by Titan Cronus, 21 October 2015 - 09:52 PM.

Battle of the Pelennor Fields

Made by 1 guy, has 13 Factions, 75+ Heroes, 150+ different units and 200+ Special abilities.

 

http://www.moddb.com...pelennor-fields


#18 ThorinOakenshield2

ThorinOakenshield2
  • Members
  • 205 posts
  • Location:London, Great Britain

Posted 22 October 2015 - 06:08 AM

^^Yeah, I had added the model and hero ui etc. and he worked in game; he used the Special powers of the Witchking and his voice, but I'm not sure if Agandaur managed to use the Witchking's powers properly. So I decided to copy in his powers from BOTTA, and them the problems began.
I have uploaded the files regarding Agandaur from BOTTA, so you can download and see them a few posts above.
Although, I haven't checked about anything related to the AI code blocks or gamedata.ini, so I'll check out that and see if there is something different.

Edited by ThorinOakenshield2, 22 October 2015 - 06:10 AM.


#19 Titan Cronus

Titan Cronus

    Do unto Others...

  • Members
  • 693 posts
  • Location:Ireland
  • Projects:The Battle of the Pelennor Fields Mod.

Posted 22 October 2015 - 07:58 AM

You had the hero in the game without it crashing. :) That's all I wanted to know. It means we can narrow the problem down to the new special power related code you added. Like I said, if you don't get a solution soon, post the code and I'll have a look at it all. :thumbsuphappy:

 

 

ADDED: Just looking through some special power code, does any of them call for any sounds? Or, the command buttons might also use some sounds. Check that they are not calling for sounds from his mod that are not in your mod.


Edited by Titan Cronus, 22 October 2015 - 08:04 AM.

Battle of the Pelennor Fields

Made by 1 guy, has 13 Factions, 75+ Heroes, 150+ different units and 200+ Special abilities.

 

http://www.moddb.com...pelennor-fields


#20 ThorinOakenshield2

ThorinOakenshield2
  • Members
  • 205 posts
  • Location:London, Great Britain

Posted 22 October 2015 - 08:44 AM

Ok I'll check for sounds too and post here :).




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users