Jump to content


Photo

Adding ElvenWarriorHorde


  • Please log in to reply
9 replies to this topic

#1 Witch King

Witch King
  • Members
  • 38 posts

Posted 05 April 2012 - 09:31 PM

I try to add the elvan warriors from the inn (when you play MotW) to the elven faction(greenpasture).

When I build a green pasture, the elven wariiors are available from level 1, but I want them to be available from level 3

Here are the codes

******commandbutton.ini

CommandButton Command_ConstructRohanElvenWarriorHorde
	Command				= UNIT_BUILD
	Object				= RohanElvenWarriorHorde
	  NeededUpgrade		   = Upgrade_ElvenGreenPastureLevel3
	  NeededUpgradeAny		= Yes
	TextLabel			= CONTROLBAR:ConstructSindarWarriorHorde ; ;CONTROLBAR:ConstructElvenWarriorHorde
	ButtonImage			= BEElvenBarracks_LorienWarrior ;bt
	ButtonBorderType		= BUILD
	DescriptLabel			= CONTROLBAR:ToolTipBuildSindarWarriorHorde ; ;CONTROLBAR:ToolTipBuildElvenWarriorHorde
	Radial				= Yes
	InPalantir			   = Yes
	IsClickable			= Yes
	Options				= CANCELABLE ; ;NEED_UPGRADE
; ;	NeededUpgrade		= Upgrade_StructureLevel2
	ShowProductionCount	= Yes	  
End



*******************commandset.ini

CommandSet ElvenGreenPastureCommandSet
  1 = Command_ConstructElvenRivendellLancers
  2 = Command_ConstructRohanElvenWarriorHorde
  3 = Command_ConstructElvenGreenPastureLevel2
  6 = Command_Sell
End

CommandSet ElvenGreenPastureCommandSetLevel2
  1 = Command_ConstructElvenRivendellLancers
  2 = Command_ConstructRohanElvenWarriorHorde
  3 = Command_ConstructElvenGreenPastureLevel3
  6 = Command_Sell
End

CommandSet ElvenGreenPastureCommandSetLevel3
  1 = Command_ConstructElvenRivendellLancers
  2 = Command_ConstructRohanElvenWarriorHorde
  6 = Command_Sell
End


What I am doing wrong? Any ideas? I m begginer and don't know much about coding
===ΝΙΨΟΝΑΝΟΜΗΜΑΤΑΜΗΜΟΝΑΝΟΨΙΝ===

#2 Lauri

Lauri

    Old man Lauri

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

Posted 05 April 2012 - 10:00 PM

The NEED_UPGRADE in Options need to be visible (ie, no ; hiding it)

Here, this should do it.
CommandButton Command_ConstructRohanElvenWarriorHorde
		Command						 = UNIT_BUILD
		Object						  = RohanElvenWarriorHorde
		  NeededUpgrade			= Upgrade_ElvenGreenPastureLevel3
		  NeededUpgradeAny			  = Yes
		TextLabel					   = CONTROLBAR:ConstructSindarWarriorHorde ; ;CONTROLBAR:ConstructElvenWarriorHorde
		ButtonImage					 = BEElvenBarracks_LorienWarrior ;bt
		ButtonBorderType				= BUILD
		DescriptLabel				   = CONTROLBAR:ToolTipBuildSindarWarriorHorde ; ;CONTROLBAR:ToolTipBuildElvenWarriorHorde
		Radial						  = Yes
		InPalantir						 = Yes
		IsClickable					 = Yes
		Options						 = CANCELABLE NEED_UPGRADE
; ;	 NeededUpgrade		   = Upgrade_StructureLevel2
		ShowProductionCount	 = Yes	
End

Edited by Lauri, 05 April 2012 - 10:01 PM.

T4A_Logo_-_article.png

The 4th Age version 0.8 has been released: Link


#3 Witch King

Witch King
  • Members
  • 38 posts

Posted 05 April 2012 - 10:22 PM

Awesome, thank you very much, that worked! :)

Now I have to change these lame button images..

May I ask something else? What if I wanted to make the elven warriors to be available from the barracks, what would I have to do? I mean there are already six slots(warriors, archers, pikes, mirkwood & upgrade & destroy building), how could fit an other, seventh, slot for the elven warriors??
===ΝΙΨΟΝΑΝΟΜΗΜΑΤΑΜΗΜΟΝΑΝΟΨΙΝ===

#4 Lauri

Lauri

    Old man Lauri

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

Posted 05 April 2012 - 10:45 PM

Take it as number 7. It won't show up in the palantir at the lower left part of the screen, but it will still pop up when you click on the building. You could put it as number 6, but the Destroy button is located there, and that one will only be in the palantir, and won't pop up. So simply make it number 7 ;)

T4A_Logo_-_article.png

The 4th Age version 0.8 has been released: Link


#5 Witch King

Witch King
  • Members
  • 38 posts

Posted 05 April 2012 - 11:00 PM

okkk, I understand

It would be better to have them build from the barracks, don't you think?..
Emmm, sorry one last favor. How do I change button images with existing ones? I found some suitables button images of elven warriors in the files, texture02 & textures03. How can I replace them with one of those?

Anyway thanks again and sorry for troubling you
===ΝΙΨΟΝΑΝΟΜΗΜΑΤΑΜΗΜΟΝΑΝΟΨΙΝ===

#6 Lauri

Lauri

    Old man Lauri

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

Posted 05 April 2012 - 11:07 PM

You'll have to find the names of the buttons. They're probably in one of the files here:
data\ini\mappedimages\aptimages\

Just search for the name of the texture you found in these files (check in unitportraits.ini first), and see if there's any matches.

Can't help much besides that I'm afraid.

T4A_Logo_-_article.png

The 4th Age version 0.8 has been released: Link


#7 Witch King

Witch King
  • Members
  • 38 posts

Posted 05 April 2012 - 11:38 PM

no luck in the data\ini\mappedimages\aptimages\ files..

if I figure it out, I will post it,

Thanks again :)
===ΝΙΨΟΝΑΝΟΜΗΜΑΤΑΜΗΜΟΝΑΝΟΨΙΝ===

#8 Witch King

Witch King
  • Members
  • 38 posts

Posted 14 April 2012 - 12:18 AM

ok, so I did again, and now I can't build them, they appear black

Posted Image

and the code
CommandSet ERElvenBarracksCommandSet
  1 = Command_ConstructElvenLorienWarriorHorde
  2 = Command_ConstructElvenLorienArcherHorde
  3 = Command_ConstructElvenMithlondSentryHorde
  4 = Command_ConstructElvenMirkwoodArcherHorde
  5 = Command_ConstructRohanElvenWarriorHorde
  6 = Command_PurchaseUpgradeElvenBarracksLevel2
  7 = Command_Sell
End
CommandSet ElvenBarracksCommandSetLevel2
  1 = Command_ConstructElvenLorienWarriorHorde
  2 = Command_ConstructElvenLorienArcherHorde
  3 = Command_ConstructElvenMithlondSentryHorde
  4 = Command_ConstructElvenMirkwoodArcherHorde
  5 = Command_ConstructRohanElvenWarriorHorde
  6 = Command_PurchaseUpgradeElvenBarracksLevel3
  7 = Command_Sell
End
CommandSet ElvenBarracksCommandSetLevel3
  1 = Command_ConstructElvenLorienWarriorHorde
  2 = Command_ConstructElvenLorienArcherHorde
  3 = Command_ConstructElvenMithlondSentryHorde
  4 = Command_ConstructElvenMirkwoodArcherHorde
  5 = Command_ConstructRohanElvenWarriorHorde
  6 = Command_Sell

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

#9 Lauri

Lauri

    Old man Lauri

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

Posted 14 April 2012 - 11:16 AM

Are you sure that the Upgrade_ElvenGreenPastureLevel3 is the correct one needed?

Also, try removing NeededUpgradeAny = Yes from the commandbutton. I didn't notice it before now, and I haven't seen that ever before... so, might be the one causing problems :p

T4A_Logo_-_article.png

The 4th Age version 0.8 has been released: Link


#10 Witch King

Witch King
  • Members
  • 38 posts

Posted 14 April 2012 - 11:38 AM

problem fixed. I made the stupid-green pasture mistake

Edit: Now I am going fix the armor-blade upgrages, I think they are in the gamedata.ini

Edited by Witch King, 14 April 2012 - 11:40 AM.

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




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users