Jump to content


A_B

Member Since 11 Jan 2009
Offline Last Active Jan 13 2009 08:06 AM

Topics I've Started

Changing barrack's command set

11 January 2009 - 09:27 AM

Hi,
This is my first post on this forum, I am modding since a couple of weeks now and starting to get the basics.

My goal is to mod maps only, by only using the map.ini file as I do not like the idea of editing the entire game and having to change the ini.dat every time I want to change mod

I am currently working on a cat & mouse, this is the basic idea for those that don't know the concept:



PLAYER_1: MOUSE
has a porter that can build towers fortress and walls to protect himself from the cat.
The mouse has to survive until the timer runs out to win.

PLAYER_2: CAT
the cat has some buildings from which he can rapidly produce a variety of units to hunt the mouse.
He wins if he can kill the mouse before the timer expires




Now, I want the Cat to have a barracks that can create a variety of units, including the IsengardBerserker The problem is that this unit requires "Upgrade_IsengardUrukPitLevel2", which I have successfully granted to the barracks, so this worked. Then I wanted to add the mirkwood archers from the elven barracks, which require elven barracks lvl2. So I tried applying this upgrade to the GondorBarracks but it seemed to override the isengardurukpitlevel2 upgrade, so now i could only create the archers and not the berserker.

I could create any faction's level1 units since they don't require anything


My next solution was to remove the requirments by editing the commandbutton.ini file (throught the map.ini file) and i tried this:
CommandButton Command_ConstructIsengardBerserker
	Command				= UNIT_BUILD
	Object				= IsengardBeserker
	Options				= NEED_UPGRADE CANCELABLE
	NeededUpgrade		= None
	TextLabel			= CONTROLBAR:ConstructIsengardBerserker
	ButtonImage			= BIBerserker
	ButtonBorderType	= BUILD 
	DescriptLabel		= CONTROLBAR:ToolTipBuildIsengardBerserker
	Radial				= Yes
	InPalantir	   		= Yes
	ShowProductionCount	= Yes	 
End

CommandSet NewGondorBarracksCommandSet
  1 = Command_ConstructIsengardFighterHorde
  2 = Command_ConstructGondorTowerShieldGuardHorde
  3 = Command_ConstructIsengardBerserker
  4 = Command_ConstructElvenMirkwoodArcherHorde
End

Object GondorBarracks
  CommandSet = NewGondorBarracksCommandSet
End
(The main thin her is the NeededUpgrade = None line in the CommandButton part)

But I can't get this to work.
So my question: How could this be done?

Thanks
Alex