Jump to content


Photo

Adding Heroes


  • Please log in to reply
12 replies to this topic

#1 CNCM_BLITZ

CNCM_BLITZ

    Captain of the Flying Dutchman

  • Members
  • 113 posts
  • Projects:Forgetting RA2 and learning BfME
  •  Amateur Modder

Posted 15 October 2007 - 03:25 PM

I read GTO's tutorial on this and coded Haldir. I followed his directions and even found a thing or two that should have been donebut wasnt in the article. But when I test the game, there is no Haldir purchasable from the Rohan Citadel. I didnt miss a thing I am sure.

It might have something to do with playertemplate.ini which exists in INI.BIG/DATA/INI AND INI.BIG/DATA/INI/DEFAULT. I never figured out why there are 2 versions of some ini files.

Edited by CNCM_BLITZ, 15 October 2007 - 03:26 PM.


#2 King of Universe

King of Universe

    It is in our most dire needs, that we do our greatest deeds...

  • Hosted
  • 878 posts
  • Location:Norway
  • Projects:Hero Mod

Posted 15 October 2007 - 04:18 PM

You should use the one in data\ini


And you could post your codes, for us to look at :)

Edited by King of Universe, 15 October 2007 - 04:20 PM.

Posted Image


Frodo: I wish the Ring had never come to me... I wish none of this had happened...
Gandalf: So do all who live to see such times, but that is not for them to decide. All you have to decide, is what to do with the time that is given to you...

Click me

#3 CNCM_BLITZ

CNCM_BLITZ

    Captain of the Flying Dutchman

  • Members
  • 113 posts
  • Projects:Forgetting RA2 and learning BfME
  •  Amateur Modder

Posted 15 October 2007 - 04:34 PM

Well thanks. I actually already am using the DATA/INI version but I just wanted to be sure.

Here is the coding for Haldir. Haldir is essentially going to be a clone of Faramir in style and powers, so I used Faramir to make him. I havent done any artwork yet, I am just trying to get him working ingame.

The portrait work and object name:
Object RohanHaldir
; *** ART Parameters ***

   ; SelectPortrait for Heros is portrait behind skill buttons. HP = HeroPortrait.
	SelectPortrait = HPHaldir
	
   ; ButtonImage for Heros is button image on Hero Select UI to select hero. HI = HeroIcon or HeroImage.
	ButtonImage = HIHaldir

The obvious behaviour work:
; ***DESIGN parameters ***
	Side = Rohan
	EditorSorting = UNIT
	ThreatLevel = 4.0
	ThingClass = CHARACTER_UNIT
  BuildCost = FARAMIR_BUILDCOST				
  BuildTime = FARAMIR_BUILDTIME				
	TransportSlotCount = 1

	DisplayMeleeDamage = FARAMIR_DAMAGE
	DisplayRangedDamage = FARAMIR_BOW_DAMAGE

	WeaponSet
		Conditions = None 
		Weapon = PRIMARY	FaramirBow
		AutoChooseSources = PRIMARY FROM_PLAYER FROM_SCRIPT FROM_AI
	End	
	WeaponSet
		Conditions			= MOUNTED
		Weapon				= PRIMARY	FaramirSword
	End
	WeaponSet
		Conditions = WEAPONSET_TOGGLE_1	;CLOSE_RANGE CONTESTING_BUILDING
		Weapon = PRIMARY	FaramirSword
		AutoChooseSources = PRIMARY FROM_PLAYER FROM_SCRIPT FROM_AI
	End
	
	ArmorSet
		Conditions	  = None
		Armor		   = HeroArmor
		DamageFX		= NormalDamageFX
	End
	

	VisionRange = VISION_HERO_RANGED
	ShroudClearingRange = SHROUD_CLEAR_RANGED_HERO

	BountyValue = GONDOR_BOROMIR_BOUNTY_VALUE
	DisplayName = OBJECT:RohanHaldir
	RecruitText = CONTROLBAR:RohanHaldirRecruit
	ReviveText	= CONTROLBAR:RohanHaldirRevive
	Hotkey		= CONTROLBAR:RohanHaldirHotkey
	CrusherLevel = 0		;Can I crush anything?
	MountedCrusherLevel = 1	;Crush level when mounted.
	CrushableLevel = 2		;What am I?:		0 = for infantry, 1 = for trees, 2 = cavalry/heroes
	MountedCrushableLevel = 2;Crusable level when mounted.

	CrushKnockback = 40
	CrushZFactor = 1.0

	CommandSet = RohanHaldirCommandSet
	CommandPoints = 0

I have also added him in PlayerTemplate.ini to rohan, Given him a commandset, and used the Experiencelevels coding in GTO's article. I also gave him all necessary strings in my LOTR.STR file. That is all.

#4 King of Universe

King of Universe

    It is in our most dire needs, that we do our greatest deeds...

  • Hosted
  • 878 posts
  • Location:Norway
  • Projects:Hero Mod

Posted 15 October 2007 - 04:49 PM

Did you try building another hero first? I don't think there's enough places in the commandset of the fortress, so Haldir should "take over" a spot if another hero is created. If that doesn't work, post ALL of your codes :) You could add the hero's ini as an attachement :p

Edited by King of Universe, 15 October 2007 - 04:50 PM.

Posted Image


Frodo: I wish the Ring had never come to me... I wish none of this had happened...
Gandalf: So do all who live to see such times, but that is not for them to decide. All you have to decide, is what to do with the time that is given to you...

Click me

#5 halbarad

halbarad

    lone wanderer

  • Project Team
  • 466 posts
  • Projects:RA, tinkering...
  •  random guy

Posted 15 October 2007 - 07:09 PM

check you spelt his name correctly as well in playertemplate.ini exactly how it is in the object file, i know it sounds stupid but ive done it soo many times...
Now for Wrath, Now for Ruin, and for a Red Dawn...

#6 CNCM_BLITZ

CNCM_BLITZ

    Captain of the Flying Dutchman

  • Members
  • 113 posts
  • Projects:Forgetting RA2 and learning BfME
  •  Amateur Modder

Posted 15 October 2007 - 08:29 PM

I tried both ideas. Niether work. The GoldenHall has room for one more hero. I looked into the commandset. Anyhow the commandset only works for reviving fallen heroes, it doesnt seem to have anything to do with recruitment the first time.

And yes, Haldir's name is spelt correct.

I dont see any point in uploading Haldir.ini because all the changes I made are already listed. I checked them twice and there is NO typos or anything unlisted. Why dont you read GTO's tutorial and see if it doesnt cover something important. If worst comes to worse, I will upload ALL the coding.

#7 Phil

Phil

    Force Majeure

  • Network Leaders
  • 7,976 posts
  • Location:Switzerland
  • Projects:Revora, C&C:Online
  •  Thought Police
  • Division:Revora
  • Job:Network Leader
  • Donated
  • Association

Posted 15 October 2007 - 08:43 PM

Try adding him at the beginning of the list in playertemplate.ini, just to make sure it really isn't a slot problem. There are many commandsets for the citadel-like buildings, might be that you checked the wrong one by accident.
Next, make sure you didn't edit the KindOf in any way and also make sure the ButtonImage you referenced actually exists.

In theory, only changing the Object's name should already enable him when added to the list of buildable heroes...

revorapresident.jpg
My Political Compass

Sieben Elefanten hatte Herr Dschin
Und da war dann noch der achte.
Sieben waren wild und der achte war zahm
Und der achte war's, der sie bewachte.


#8 halbarad

halbarad

    lone wanderer

  • Project Team
  • 466 posts
  • Projects:RA, tinkering...
  •  random guy

Posted 16 October 2007 - 10:49 AM

you didnt show the behaviors, or didnt you change them.

the golden hall is not rohans citadel i dont think

the buttons may be called revival buttons but they build the heros as well.
Now for Wrath, Now for Ruin, and for a Red Dawn...

#9 DreadStorm

DreadStorm
  • Members
  • 5 posts

Posted 11 November 2007 - 08:58 PM

Did you add the information for the FXList? This is what I had to do when I added Hama:

[codebox];---------------------------------------------

FXList FX_HamaInitialSpawn
Sound
Name = GenericRespawn1
End
Sound
Name = HamaVoiceSalute
End
ParticleSystem
Name = ResurrectionCenter
Offset = X:0.0 Y:0.0 Z:5.0
OrientToObject = Yes
End
ParticleSystem
Name = ResurrectionLightShaft
Offset = X:0.0 Y:0.0 Z:0.0
OrientToObject = Yes
End
ParticleSystem
Name = ResurrectionVortex
Offset = X:0.0 Y:0.0 Z:5.0
OrientToObject = Yes
End
ParticleSystem
Name = ResurrectionWave
Offset = X:0.0 Y:0.0 Z:5.0
OrientToObject = Yes
End
End

;-------------------------------------

FXList FX_HamaRespawn
Sound
Name = GenericRespawn1
End
Sound
Name = HamaVoiceRespawn
End
ParticleSystem
Name = ResurrectionCenter
Offset = X:0.0 Y:0.0 Z:5.0
OrientToObject = Yes
End
ParticleSystem
Name = ResurrectionLightShaft
Offset = X:0.0 Y:0.0 Z:0.0
OrientToObject = Yes
End
ParticleSystem
Name = ResurrectionVortex
Offset = X:0.0 Y:0.0 Z:5.0
OrientToObject = Yes
End
ParticleSystem
Name = ResurrectionWave
Offset = X:0.0 Y:0.0 Z:5.0
OrientToObject = Yes
End
End

; ----------------------------------------------
FXList FX_HamaDieToRespawn
ParticleSystem
Name = GandalfSwordHitSpark
Offset = X:12.0 Y:0.0 Z:8.0
OrientToObject = Yes
End
ParticleSystem
Name = GandalfSwordHitFlash
Offset = X:12.0 Y:0.0 Z:8.0
OrientToObject = Yes
End
EvaEvent
EvaEventOwner = HamaDie
EvaEventAlly = None
;EvaEventEnemy = EnemyTheodenDie
End
End

;---------------------------------------------[/codebox]

After I added this, he showed up at the citadel.

#10 CNCM_BLITZ

CNCM_BLITZ

    Captain of the Flying Dutchman

  • Members
  • 113 posts
  • Projects:Forgetting RA2 and learning BfME
  •  Amateur Modder

Posted 12 November 2007 - 03:01 AM

No need. I am using all of faramir's coding for now. He is essentially a copy of faramir with the mounting ability removed. That is the only real difference.

Seeing as how I am getting nowhere with this, why not let someone post their own version of a faramir clone and compare notes?

#11 Guess Who

Guess Who

    title available

  • Project Team
  • 969 posts
  • Location:Australia, Sydney
  • Projects:Wars of The East, Project Siege
  •  2d Artist, Modeller, Skinner, Binder, Basic Coder, Learning Animating, mapping, fx coding.

Posted 13 November 2007 - 03:43 AM

Does it use a model and skin you made, if so make sure asset.dat is their, post the whole ini file for haldir and we may be able to help you a bit more.
Posted Image Posted Image
My current projects: Wars of The East, Project Siege
--------------------------------------
99% Fat Free.

#12 Pixel

Pixel

  • Hosted
  • 2,451 posts
  • Location:London, UK

Posted 13 November 2007 - 06:42 PM

Hi,
You sure you are running the -mod command correctly? Another way to let us help you is by posting up your big file.

Does it use a model and skin you made, if so make sure asset.dat is their, post the whole ini file for haldir and we may be able to help you a bit more.

That wouldnt make his button not appear at the Citadel, As even if he has added new artwork, If the Asset.dat was not working the button would just show pink. Wich, He is not even getting.

#13 CNCM_BLITZ

CNCM_BLITZ

    Captain of the Flying Dutchman

  • Members
  • 113 posts
  • Projects:Forgetting RA2 and learning BfME
  •  Amateur Modder

Posted 14 November 2007 - 05:03 AM

I havent made any new art yet. I am using Faramir's art. So thats not a problem. I am gonna remake Haldir and see if it works then. THEN I will give a ful copy of my work if it fails.




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users