Jump to content


Photo

[RotWK] Need (urgent) help, please


  • Please log in to reply
26 replies to this topic

#1 Puzzler33

Puzzler33
  • Members
  • 226 posts

Posted 05 August 2009 - 03:43 PM

So when you do tower wars on BfME II, RotWK, you spawn a (sub)team and you make them go (without attacking) to the end of the path.

I have recently found out about what teams actually are and how they are different to players :p (I didn't know there was more to team than Team 'Player_1', which seemed pretty much the same as Player 'Player_1').

Anyway what I have at the moment is a team called Wave 1 in PlyrCreeps, the properties of which are as follows:
***************
[Wave 1] ....................... Maximum [1]
Owner: [PlyrCreeps]
Home Position: [Sea Spawn A]
Destination: [<none>]
AI Type: [<none>]
Production:-------------------------------------------------
Condition: [<none>]
[<unticked>] Execute associate actions
Priority: [0] ......... Success Priority [0]
Build for [1] Secs. ............ Failure Priority Decrease: [0]
------------------------------------------------------------
Min: Max: Unit Type:
[5] . [5] . [ElvenTransportShip]

(All the rest are blank)

Recruitment Options:----------------------------------------
[<unticked>] Automatically reinforce whenever possible
[<ticked>] Team members are AI recruitable
------------------------------------------------------------
(No team description)
***************
In the other tabs, the only one I have changed is 'Initial Team Behaviour', which is set to Passive.

The scripting relating to the wave is as follows:

IF:
'rest1' has expired.
THEN:
Start building team Team 'PlyrCreeps/Wave 1'
Have Team 'PlyrCreeps/Wave 1' follow Waypoint Path 'Sea Path A', as a team is FALSE , in formation is FALSE


What I want is for 5 elven transport ships to spawn, outside the border, at the waypoint 'Sea Spawn A', then for the units to follow the waypoint path 'Sea Path A', which follows the path of a river, until it ends up at the other side of the map, off border.

What I have at the moment is evidense that the script is being executed (Notification on the wave) but when I moved the waypoint within the border, it became apparent that no transport ships were spawning at all.

I have tried to change some details to the script, trying different ways of making the team spawn, not telling it where to go but giving the team a (UnitRef) destination in its properties, but nothing seems to work.

Please tell me what I am doing wrong! :ermm:

P.S. And in case it's not obvious, I am not spawning a unit, calling it something and telling it to move along the path for each unit in every wave. This is the more advanced way of using teams (which I barely know about), so please don't suggest tailoring to each unit individually in case that's what anyone's thinking.

Edited by Puzzler33, 06 August 2009 - 09:12 PM.

Posted Image

#2 Puzzler33

Puzzler33
  • Members
  • 226 posts

Posted 05 August 2009 - 04:01 PM

(Edited into previous post).

Edited by Puzzler33, 06 August 2009 - 09:13 PM.

Posted Image

#3 Puzzler33

Puzzler33
  • Members
  • 226 posts

Posted 06 August 2009 - 07:11 PM

I am now also looking to include a map.ini file.

I've tried a few times to code it properly, but there are so many names for the same objects and quite a lot of visually identical objects that it is really hard. I'm not sure to what extent I need to include coding.

Do I need to code in everything I want to change, including their aspects, meaning everything about them?

Or

Do I need to code in only what I want to change?



For example, if I want to have a blacksmith have fire arrows available to purchase at level 3, do I need to code something which says that fire arrows are purchased at the blacksmith at level 3 and something at the blacksmith saying the same thing - would I need to have this on all levels of the commandset thing or just the 3rd?



It would be fantastic if someone were to read what I want below and to do it for me.

That might be asking too much, so it would also be great if someone were to read what I want below and explain what I need to do.

I would just really like some help as to how I can achieve the desired changes to gameplay, as specified below:



STRUCTURES THAT PORTERS CAN BUILD:



(EDIT: I have now found out all the names through more examination of other .ini files, and this is what I have, but there is a problem! For Men (I haven't tested the other races), there is been no effect after making the following script. Maybe there is a problem with it being MenPorter, when I might want GondorPorter or something, or perhaps this is affecting the wrong aspect of the game (I want it to change what the builder can build according to the build list bar along the right-hand side of the screen),


CODE

CommandSet MenPorterCommandSet
1 = Command_PorterConstructMenSentryTower
2 = Command_PorterConstructMenStatue
3 = Command_PorterConstructMenArcheryRange
4 = Command_PorterConstructMenWorkshop
5 = Command_PorterConstructMenBlacksmith
End

CommandSet ElvenPorterCommandSet
1 = Command_ConstructElvenWatchTower
2 = Command_ConstructElvenStatue
3 = Command_ConstructElvenBarracks
4 = Command_ConstructElvenEntMoot
5 = Command_ConstructEregionForge
End

CommandSet DwarvenPorterCommandSet
1 = Command_ConstructDwarvenSentryTower
2 = Command_ConstructDwarvenStatue
3 = Command_ConstructDwarvenArcheryRange
4 = Command_ConstructDwarvenForgeWorks
End

CommandSet IsengardPorterCommandSet
1 = Command_PorterConstructIsengardBattleTower
2 = Command_PorterConstructIsengardUrukPit
3 = Command_ConstructIsengardTavern
4 = Command_PorterConstructIsengardSiegeWorks
5 = Command_PorterConstructIsengardArmory
End

CommandSet MordorPorterCommandSet
1 = Command_PorterconstructMordorBattleTower
2 = Command_PorterConstructMordorOrcPit
3 = Command_PorterConstructMordorHaradrimPalace
4 = Command_PorterConstructMordorTrollCage
5 = Command_PorterConstructMordorSiegeWorks
End

CommandSet WildPorterCommandSet
1 = Command_PorterConstructWildSentryTower
2 = Command_PorterConstructWildCave
3 = Command_PorterConstructWildFissure
4 = Command_PorterConstructWildTreasureTrove
End

CommandSet AngmarPorterCommandSet
1 = Command_ConstructAngmarSentryTower
2 = Command_ConstructAngmarBarracks
3 = Command_ConstructAngmarHallofTwilight
4 = Command_ConstructAngmarForgeWorks
End

Object MenPorter
CommandSet = MenPorterCommandSet
End

Object ElvenPorter
CommandSet = ElvenPorterCommandSet
End

Object DwarvenPorter
CommandSet = DwarvenPorterCommandSet
End

Object IsengardPorter
CommandSet = IsengardPorterCommandSet
End

Object MordorPorter
CommandSet = MordorPorterCommandSet
End

Object WildPorter
CommandSet = WildPorterCommandSet
End

Object AngmarPorter
CommandSet = AngmarPorterCommandSet
End



-------



MEN SENTRY TOWER, MEN STATUE & MEN WORKSHOP:

Unchanged from normal game.



MEN ARCHERY RANGE:

Level 1: GonderArcherHorde

Upgrade to level 2

Level 2: +GonderRangerHorde

Upgrade to level 3 (200 resources)

Level 3: NO FIRE ARROWS UPGRADE



This is what I thought I would need:



CommandSet ArcherOverride

1 = Command_ConstructGondorArcherHorde

2 = Command_PurchaseUpgradeGondorArcheryRangeLevel2

End

CommandSet GondorArcheryCommandSetLevel2Override

1 = Command_ConstructGondorArcherHorde

2 = Command_ConstructGondorRangerHorde

3 = Command_PurchaseUpgradeGondorArcheryRangeLevel3

End

CommandSet GondorArcheryCommandSetLevel3Override

1 = Command_ConstructGondorArcherHorde

2 = Command_ConstructGondorRangerHorde

End

Object GondorArcherRange

CommandSet = ArcherOverride

End



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



MEN BLACKSMITH (Forge works / Forge / whatever it is):

Level 1: Upgrade to level 2 (100 resources)

Level 2: Banner carrier (800 resources)

Upgrade to level 3

Level 3: Fire arrows

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



ELVEN SENTRY TOWER, ELVEN STATUE & ENT MOOT:

Unchanged from normal game.



ELVEN BARRACKS:

Level 1: LorienArcherHorde

Upgrade to level 2

Level 2: +MirkwoodArcherHorde

Upgrade to level 3

Level 3: +NoldorWarriorHorde



EREGION FORGE:

Level 1: Upgrade to level 2 (100 resources)

Level 2: Banner carrier (800 resources)

Upgrade to level 3

Level 3: Silverthorn arrows



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



DWARVEN SENTRY TOWER & DWARVEN STATUE:

Unchanged from normal game.



DWARVEN ARCHERY RANGE:



Level 1: Dwarven axe throwers

Upgrade to level 2

Level 2: Men of Dale

Upgrade to level 3 (200 resources)

Level 3: NO FIRE ARROWS



DWARVEN FORGE WORKS (/siege works):



Level 1: Battle Wagon*

Upgrade to level 2

Level 2: Catapult

Banner Carrier upgrade

Upgrade to level 3

Level 3: Fire arrows



*Battle wagon has normal abilities, EXCEPT for the hearth.



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



ISENGARD BATTLE TOWER:

Unchanged.



ISENGARD URUK PIT:



Level 1: Uruk crossbowmen

Upgrade to level 2

Level 2: Beserker

Upgrade to level 3 (cost 100)

Level 3: (No extra units, only faster build speed)



ISENGARD TAVERN:



Level 1: Wildmen axe throwers

Upgrade to level 2 (200 resources)

Level 2: Upgrade to level 3 (250 resources)

Level 3: (No extra options)



ISENGARD SIEGE WORKS:



Level 1: Upgrade to level 2

Level 2: Ballista

Upgrade to level 3 (500 resources)

Level 3: Mine (800 resources)



ISENGARD ARMO(U)RY:



Level 1: Upgrade to level 2 (100 resources)

Level 2: Banner Carrier (800 resources)

Upgrade to level 3

Level 3: Fire arrows



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



MORDOR BATTLE TOWER:



Cost 280 resources



MORDOR ORC PIT:



Level 1: Orc archers

Upgrade to level 2 (150 resources)

Level 2: Upgrade to level 3 (300 resources)

Level 3: Banner carriers (800 resources)



MORDOR HARADRIM PALACE:



Level 1: Upgrade to level 2

Level 2: Haradrim archers

Upgrade to level 3

Level 3: Fire arrows



MORDOR TROLL CAGE:



Level 1: Cave troll

Upgrade to level 2 (300 resources)

Level 2: Drummer troll

Upgrade to level 3 (150 resources)

Level 3: (No extra units)



MORDOR SIEGE WORKS:



Level 1: Upgrade to level 2

Level 2: Catapult

Upgrade to level 3 (150 resources)

Level 3: (No extra units)



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



WILD SENTRY TOWER:

No changes.



GOBLIN CAVE:



Level 1: Goblin archers

Upgrade to level 2

Level 2: Upgrade to level 3

Level 3: (No extra units)



GOBLIN FISSURE:



Level 1: Cave troll

Upgrade to level 2 (150 resources)

Level 2: Upgrade to level 3 (300 resources)

Level 3: Mountain giant



WILD TREASURE TROVE:



Level 1: Upgrade to level 2 (100 resources)

Level 2: Banner carriers (800 resources)

Upgrade to level 3

Level 3: Fire arrows



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



ANGMAR SENTRY TOWER:

No changes.



ANGMAR BARRACKS:



Level 1: Thrall Master*

Upgrade to level 2

Level 2: Upgrade to level 3

Level 3: Dark rangers



*Thrall Master has only 1 option once built to summon Rhudar axe slingers



ANGMAR HALL OF TWILIGHT:



Unchanged from normal gameplay except I would like the sorcerers to cost 700 resources.



ANGMAR FORGE WORKS:



Level 1: Catapult

Upgrade to level 2 (100 resources)

Level 2: Banner carriers (800 resources)

Upgrade to level 3

Level 3: Ice arrows

Ice shot (for catapult)

Edited by Rob38, 07 August 2009 - 02:13 AM.

Posted Image

#4 Rob38

Rob38

    Believer of Hope

  • Hosted
  • 3,567 posts
  • Location:USA
  • Projects:Helm's Deep Last Hope
  •  One who is not afraid of new challenges

Posted 07 August 2009 - 02:12 AM

For the porter commandsets, make sure you name them something different than the original version and properly reference it in the object. For example:

CommandSet MenPorterCommandSet_OVERRRIDE
1 = Command_PorterConstructMenSentryTower
2 = Command_PorterConstructMenStatue
3 = Command_PorterConstructMenArcheryRange
4 = Command_PorterConstructMenWorkshop
5 = Command_PorterConstructMenBlacksmith
End

Object MenPorter
CommandSet = MenPorterCommandSet_OVERRRIDE
End

For structures, make sure to change the commandset behaviors also. So for example, you have:

CommandSet ArcherOverride
1 = Command_ConstructGondorArcherHorde
2 = Command_PurchaseUpgradeGondorArcheryRangeLevel2

End

CommandSet GondorArcheryCommandSetLevel2Override
1 = Command_ConstructGondorArcherHorde
2 = Command_ConstructGondorRangerHorde
3 = Command_PurchaseUpgradeGondorArcheryRangeLevel3

End

CommandSet GondorArcheryCommandSetLevel3Override
1 = Command_ConstructGondorArcherHorde
2 = Command_ConstructGondorRangerHorde

End

Object GondorArcherRange
CommandSet = ArcherOverride

End

Add this to the object code:

Object GondorArcherRange
CommandSet = ArcherOverride

ReplaceModule ModueTag_ArcheryRangeLevel2CommandSet
	Behavior = CommandSetUpgrade ModueTag_ArcheryRangeLevel2CommandSetNEW
		TriggeredBy			= Upgrade_GondorArcheryRangeLevel2
		ConflictsWith		= Upgrade_GondorArcheryRangeLevel3
		CommandSet			= GondorArcheryCommandSetLevel2Override
	End   
End

ReplaceModule ModueTag_ArcheryRangeLevel3CommandSet
	Behavior = CommandSetUpgrade ModueTag_ArcheryRangeLevel3CommandSetNEW
		TriggeredBy			= Upgrade_GondorArcheryRangeLevel3		
		CommandSet			= GondorArcheryCommandSetLevel3Override
	End   
End

End

signature_group1.gif

 

16821.png


#5 Puzzler33

Puzzler33
  • Members
  • 226 posts

Posted 07 August 2009 - 10:07 AM

Thanks a lot. The only slight problem being that it looks like the archery range only make gondor archers when it's at level 1. By adding the rangers into level 1, do they naturally stay exclusive to level 2/3 archery ranges, or do I have to code in that they require level 2 archery range?
The porter thing works perfectly. ^_^
Does anyone know if using the teams tool to direct entire waves works? I think all the tower wars maps I have looked at direct the waves by their individual units.
Posted Image

#6 Puzzler33

Puzzler33
  • Members
  • 226 posts

Posted 07 August 2009 - 02:34 PM

(Taken out previous problems)

I am now going to include a map.ini file, but I don't know how to change what each structure can do at each level. This mainly means I'm not sure how to bump banner carriers up to level 2 on forge works/siege works buildings.

-------
MEN BLACKSMITH (Forge works / Forge / whatever it is):

Level 1: Upgrade to level 2 (100 resources)
Level 2: Banner carrier (800 resources)
Upgrade to level 3
Level 3: Fire arrows
--------------------------------------------
EREGION FORGE:

Level 1: Upgrade to level 2 (100 resources)
Level 2: Banner carrier (800 resources)
Upgrade to level 3
Level 3: Silverthorn arrows
--------------------------------------------
DWARVEN ARCHERY RANGE:

Level 1: Dwarven axe throwers
Upgrade to level 2
Level 2: Men of Dale
Upgrade to level 3 (200 resources
Level 3: NO FIRE ARROWS

DWARVEN FORGE WORKS (/siege works):

Level 1: Battle Wagon*
Upgrade to level 2
Level 2: Catapult
Banner Carrier upgrade
Upgrade to level 3
Level 3: Fire arrows

*Battle wagon has normal abilities, EXCEPT for the hearth.
-------------------------------------------------------
ISENGARD ARMO(U)RY:

Level 1: Upgrade to level 2 (100 resources)
Level 2: Banner Carrier (800 resources)
Upgrade to level 3
Level 3: Fire arrows
--------------------------------------------------
WILD TREASURE TROVE:

Level 1: Upgrade to level 2 (100 resources)
Level 2: Banner carriers (800 resources)
Upgrade to level 3
Level 3: Fire arrows
-----------------------------------------------
ANGMAR THRALL MASTER:

1 option once built to summon Rhudar axe slingers

ANGMAR FORGE WORKS:

Level 1: Catapult
Upgrade to level 2 (100 resources)
Level 2: Banner carriers (800 resources)
Upgrade to level 3
Level 3: Ice arrows
Ice shot (for catapult)
Posted Image

#7 Puzzler33

Puzzler33
  • Members
  • 226 posts

Posted 07 August 2009 - 08:52 PM

Ok. It is having problems interpreting this:

Object DwarvenArcheryRange
CommandSet = DwarvenArcheryRangeOverride

ReplaceModule ModueTag_DwarvenArcheryRangeLevel2CommandSet
	Behavior = CommandSetUpgrade ModueTag_DwarvenArcheryRangeLevel2CommandSetNEW
		TriggeredBy			= Upgrade_DwarvenArcheryRangeLevel2
		ConflictsWith		= Upgrade_DwarvenArcheryRangeLevel3
		CommandSet			= DwarvenArcheryCommandSetLevel2Override
	End   
End

ReplaceModule ModueTag_DwarvenArcheryRangeLevel3CommandSet
	Behavior = CommandSetUpgrade ModueTag_DwarvenArcheryRangeLevel3CommandSetNEW
		TriggeredBy			= Upgrade_DwarvenArcheryRangeLevel3		
		CommandSet			= DwarvenArcheryCommandSetLevel3Override
	End   
End

End

- I've taken the GondorArcherRange stuff and changed it all into DwarvenArcheryRange, but it's clearly not working. I would like to know where I get this code from to change it into what I want and basically how to override buildings' upgrade buttons to apply the changes I've put on their different levels.

The problem here is with the coding used to try and override the upgrade levels.
Posted Image

#8 Rob38

Rob38

    Believer of Hope

  • Hosted
  • 3,567 posts
  • Location:USA
  • Projects:Helm's Deep Last Hope
  •  One who is not afraid of new challenges

Posted 08 August 2009 - 01:42 AM

Here is a good starter tutorial for map.ini users. :p

http://www.the3rdage.net/item-215

As for the DwarvenArcheryRange code, do you get an error or does the game not recognize the changes?

signature_group1.gif

 

16821.png


#9 Puzzler33

Puzzler33
  • Members
  • 226 posts

Posted 08 August 2009 - 09:12 AM

It crashes the game and makes references to the first thing it doesn't understand about the ini file, in this case it's the start of the code above.

Thanks for your link :p – the only .ini tutorial I've really seen is one which is about modding rather than making map.ini files

(Edit)

I've fixed the problem with the DwarvenArcheryRange, by changing ModueTag to ModuleTag. It's just strange that it's different for Men.

So now I would like to know how to change the cost of upgrades to structures. For example, how can I make the level 2 upgrade to Angmar's Hall of Twilight cost 750 resources?

Edited by Puzzler33, 08 August 2009 - 01:41 PM.

Posted Image

#10 Rob38

Rob38

    Believer of Hope

  • Hosted
  • 3,567 posts
  • Location:USA
  • Projects:Helm's Deep Last Hope
  •  One who is not afraid of new challenges

Posted 08 August 2009 - 09:17 PM

So now I would like to know how to change the cost of upgrades to structures. For example, how can I make the level 2 upgrade to Angmar's Hall of Twilight cost 750 resources?


For upgrades in a map.ini file, you must make a new one for the game to read it. This is unfortunate as you have to change lots of code. So go to upgrade.ini and look for the upgrade. Should look like this:

Upgrade Upgrade_AngmarHallofTwilightLevel2
	Type			= OBJECT
	BuildCost		= ANGMAR_HALLOFTWILIGHT_LVL2_UPGRADE_COST
	BuildTime		= ANGMAR_HALLOFTWILIGHT_LVL2_UPGRADE_TIME
	DisplayName		= UPGRADE:AngmarHallofTwilightLevel2
	ResearchCompleteEvaEvent	= ArcheryRangeUpgraded
End

Now, in your map.ini, make a new upgrade with the following things:

Upgrade Upgrade_AngmarHallofTwilightLevel2_NEW
	Type			= OBJECT
	BuildCost		= 750
	BuildTime		= ANGMAR_HALLOFTWILIGHT_LVL2_UPGRADE_TIME
	DisplayName		= UPGRADE:AngmarHallofTwilightLevel2
	ResearchCompleteEvaEvent	= ArcheryRangeUpgraded
End

Your upgrade is now complete but we now need to change the button that purchases the upgrade. Go to commandbutton.ini and find this:

CommandButton Command_Upgrade_AngmarHallofTwilightLevel2
   Command		   = OBJECT_UPGRADE
   Upgrade		   = Upgrade_AngmarHallofTwilightLevel2
   Options		   = CANCELABLE
   TextLabel		 = CONTROLBAR:ConstructAngmarHallofTwilight2Upgrade
   ButtonImage	   = UCCommon_UpgradeStructureNew
   ButtonBorderType  = UPGRADE
   DescriptLabel	 = CONTROLBAR:ToolTipBuildAngmarHallofTwilightLevel2Upgrade
   Radial			= Yes
   InPalantir		= Yes
End

Now change it so that is has your new upgrade:

CommandButton Command_Upgrade_AngmarHallofTwilightLevel2
   Command		   = OBJECT_UPGRADE
   Upgrade		   = Upgrade_AngmarHallofTwilightLevel2_NEW
   Options		   = CANCELABLE
   TextLabel		 = CONTROLBAR:ConstructAngmarHallofTwilight2Upgrade
   ButtonImage	   = UCCommon_UpgradeStructureNew
   ButtonBorderType  = UPGRADE
   DescriptLabel	 = CONTROLBAR:ToolTipBuildAngmarHallofTwilightLevel2Upgrade
   Radial			= Yes
   InPalantir		= Yes
End

Next, you have to edit experience levels for the structure. In experiencelevels.ini, find this:

ExperienceLevel	AngmarHallofTwilightLevel2
	TargetNames				= AngmarHallofTwilight
	RequiredExperience			= ANGMAR_HALLOFTWILIGHT_LVL2_EXP_NEEDED
	ExperienceAward				= ANGMAR_HALLOFTWILIGHT_LVL2_EXP_AWARD
	Rank					= 2
	AttributeModifiers			= GondorBarracksHitPointModLvl2 GondorBarracksBuildSpeedModLvl2
	Upgrades				= Upgrade_AngmarHallofTwilightLevel2
	LevelUpFx				= FX:GenericBuildingUpgrade
End

Change the upgrade to this:

ExperienceLevel	AngmarHallofTwilightLevel2
	TargetNames				= AngmarHallofTwilight
	RequiredExperience			= ANGMAR_HALLOFTWILIGHT_LVL2_EXP_NEEDED
	ExperienceAward				= ANGMAR_HALLOFTWILIGHT_LVL2_EXP_AWARD
	Rank					= 2
	AttributeModifiers			= GondorBarracksHitPointModLvl2 GondorBarracksBuildSpeedModLvl2
	Upgrades				= Upgrade_AngmarHallofTwilightLevel2_NEW
	LevelUpFx				= FX:GenericBuildingUpgrade
End

Finally, we have to edit the actual building object. Inangmarhalloftwilight.ini, there are several behaviors that are affected by the level two upgrade:

Behavior = StatusBitsUpgrade ModuleTag_Veterancy_Particles_Two
 			TriggeredBy		= Upgrade_AngmarHallofTwilightLevel2
 			CustomAnimAndDuration   = AnimState:USER_4 AnimTime:0
	End

Behavior = SubObjectsUpgrade ModuleTag_ShowWalls;v1
		TriggeredBy		= Upgrade_AngmarHallofTwilightLevel2
		ShowSubObjects	= V1
		HideSubObjects	= V2 Top_1 Rocks_1 RuneGlowV2 V2_RuneGlow V2Glow_1 V2Glow_2 V2Glow_3 V2Glow_4 
	End

Behavior = CommandSetUpgrade ModueTag_StableLevel2CommandSet
		TriggeredBy			= Upgrade_AngmarHallofTwilightLevel2
		ConflictsWith		= Upgrade_AngmarHallofTwilightLevel3
		CommandSet			= AngmarHallofTwilightCommandSetLevel2
	End   

Behavior = LevelUpUpgrade ModuleTag_StableLevel2
		TriggeredBy	= Upgrade_AngmarHallofTwilightLevel2	  
		LevelsToGain   = 1
		LevelCap	   = 3
	End

Behavior = DoCommandUpgrade ModuleTag_UpgradeWellOfSouls
		TriggeredBy = Upgrade_AngmarHallofTwilightLevel2
		GetUpgradeCommandButtonName = Command_PurchaseTechnologyAngmarWellOfSouls
	End

You now change all of them:

ReplaceModule ModuleTag_Veterancy_Particles_Two
	Behavior = StatusBitsUpgrade ModuleTag_Veterancy_Particles_Two_NEW
 			TriggeredBy		= Upgrade_AngmarHallofTwilightLevel2_NEW
 			CustomAnimAndDuration   = AnimState:USER_4 AnimTime:0
	End
End

ReplaceModule ModuleTag_ShowWalls 
	Behavior = SubObjectsUpgrade ModuleTag_ShowWalls_NEW;v1
		TriggeredBy		= Upgrade_AngmarHallofTwilightLevel2_NEW
		ShowSubObjects	= V1
		HideSubObjects	= V2 Top_1 Rocks_1 RuneGlowV2 V2_RuneGlow V2Glow_1 V2Glow_2 V2Glow_3 V2Glow_4 
	End
End

ReplaceModule ModueTag_StableLevel2CommandSet
	Behavior = CommandSetUpgrade ModueTag_StableLevel2CommandSet_NEW
		TriggeredBy			= Upgrade_AngmarHallofTwilightLevel2_NEW
		ConflictsWith		= Upgrade_AngmarHallofTwilightLevel3
		CommandSet			= AngmarHallofTwilightCommandSetLevel2
	End  
End

ReplaceModule ModuleTag_StableLevel2
	Behavior = LevelUpUpgrade ModuleTag_StableLevel2_NEW
		TriggeredBy	= Upgrade_AngmarHallofTwilightLevel2_New
		LevelsToGain   = 1
		LevelCap	   = 3
	End
End

ReplaceModule ModuleTag_UpgradeWellOfSouls
	Behavior = DoCommandUpgrade ModuleTag_UpgradeWellOfSouls_NEW
		TriggeredBy = Upgrade_AngmarHallofTwilightLevel2_NEW
		GetUpgradeCommandButtonName = Command_PurchaseTechnologyAngmarWellOfSouls
	End
End

That should do it.

signature_group1.gif

 

16821.png


#11 Puzzler33

Puzzler33
  • Members
  • 226 posts

Posted 20 August 2009 - 03:56 PM

Game crash:

Unknown block 'ReplaceModule'.

Error parsing INI block 'ReplaceModule' in file 'c:\documents and settings (etc.) \map.ini'.
5 addresses:
(unknown)(0): game.dat+239838 Debug::PostStaticInit+3390
(unknown)(0): game.dat+2334561 StringBase<char>::~StringBase<char>+250781
(unknown)(0): game.dat+11454 operator<<<char>+2702
(unknown)(0): game.dat+6541831 Xfer::operator==+119943
(unknown)(0): kernel32.dll+94311 RegisterWaitForInputIdle+73
Posted Image

#12 m@tt

m@tt

    #######

  • Project Team
  • 4,056 posts
  • Location:England
  • Projects:The Dwarf Holds
  •  T3A Chamber Member

Posted 20 August 2009 - 05:10 PM

From Rob38's, post:

ReplaceModule ModueTag_StableLevel2CommandSet
Behavior = CommandSetUpgrade ModueTag_StableLevel2CommandSet_NEW
TriggeredBy = Upgrade_AngmarHallofTwilightLevel2_NEW
ConflictsWith = Upgrade_AngmarHallofTwilightLevel3
CommandSet = AngmarHallofTwilightCommandSetLevel2
End
End


It should be ModuleTag_ not ModueTag_

Well I think that might solve the error :blink:
Posted Image

#13 Puzzler33

Puzzler33
  • Members
  • 226 posts

Posted 20 August 2009 - 05:18 PM

It still crashes with that error. For whatever reason it does not give a line number so I'm not sure which ReplaceModule it has a problem with.

It is now this,
ReplaceModule ModuleTag_StableLevel2CommandSet
	Behavior = CommandSetUpgrade ModuleTag_StableLevel2CommandSet_NEW
		TriggeredBy			= Upgrade_AngmarHallofTwilightLevel2_NEW
		ConflictsWith		= Upgrade_AngmarHallofTwilightLevel3
		CommandSet			= AngmarHallofTwilightCommandSetLevel2
	End  
End

- but the error still occurs.
Posted Image

#14 Rob38

Rob38

    Believer of Hope

  • Hosted
  • 3,567 posts
  • Location:USA
  • Projects:Helm's Deep Last Hope
  •  One who is not afraid of new challenges

Posted 20 August 2009 - 08:37 PM

It should be ModuleTag_ not ModueTag_

Well I think that might solve the error :good:


No, it was a silly typo by EA. :p So that's not the problem. :blink:

The error sounds like you forgot an "End" somewhere. Post your entire map.ini file.

signature_group1.gif

 

16821.png


#15 Puzzler33

Puzzler33
  • Members
  • 226 posts

Posted 21 August 2009 - 02:02 PM

Using logic and placing Ends in different places, I have worked out that the error is caused by this bit of code:

ReplaceModule ModuleTag_Veterancy_Particles_Two
	Behavior = StatusBitsUpgrade ModuleTag_Veterancy_Particles_Two_NEW
			TriggeredBy		= Upgrade_AngmarHallofTwilightLevel2_NEW
			CustomAnimAndDuration   = AnimState:USER_4 AnimTime:0
	End
End

It doesn't seem to be due to a missing end, but if you want to check, the surrounding code is:

ExperienceLevel	AngmarHallofTwilightLevel2
	TargetNames				= AngmarHallofTwilight
	RequiredExperience			= ANGMAR_HALLOFTWILIGHT_LVL2_EXP_NEEDED
	ExperienceAward				= ANGMAR_HALLOFTWILIGHT_LVL2_EXP_AWARD
	Rank					= 2
	AttributeModifiers			= GondorBarracksHitPointModLvl2 GondorBarracksBuildSpeedModLvl2
	Upgrades				= Upgrade_AngmarHallofTwilightLevel2_NEW
	LevelUpFx				= FX:GenericBuildingUpgrade
End

ReplaceModule ModuleTag_Veterancy_Particles_Two
	Behavior = StatusBitsUpgrade ModuleTag_Veterancy_Particles_Two_NEW
			TriggeredBy		= Upgrade_AngmarHallofTwilightLevel2_NEW
			CustomAnimAndDuration   = AnimState:USER_4 AnimTime:0
	End
End

ReplaceModule ModuleTag_ShowWalls 
	Behavior = SubObjectsUpgrade ModuleTag_ShowWalls_NEW;v1
		TriggeredBy		= Upgrade_AngmarHallofTwilightLevel2_NEW
		ShowSubObjects	= V1
		HideSubObjects	= V2 Top_1 Rocks_1 RuneGlowV2 V2_RuneGlow V2Glow_1 V2Glow_2 V2Glow_3 V2Glow_4 
	End
End

I think the problem is that the command to replace the module "ModuleTag_Veterancy_Particles_Two" doesn't work because that isn't a module or you can't replace it or something like that. I have no idea what to do to have the desired effect of this bit of code, which is to take this:

Behavior = StatusBitsUpgrade ModuleTag_Veterancy_Particles_Two
			TriggeredBy		= Upgrade_AngmarHallofTwilightLevel2
			CustomAnimAndDuration   = AnimState:USER_4 AnimTime:0
	End
and change it to suit the new building, without the error that
ReplaceModule ModuleTag_Veterancy_Particles_Two
	Behavior = StatusBitsUpgrade ModuleTag_Veterancy_Particles_Two_NEW
			TriggeredBy		= Upgrade_AngmarHallofTwilightLevel2_NEW
			CustomAnimAndDuration   = AnimState:USER_4 AnimTime:0
	End
End
creates.
Posted Image

#16 Rob38

Rob38

    Believer of Hope

  • Hosted
  • 3,567 posts
  • Location:USA
  • Projects:Helm's Deep Last Hope
  •  One who is not afraid of new challenges

Posted 21 August 2009 - 07:09 PM

Where is your object name? You should have:


ExperienceLevel	AngmarHallofTwilightLevel2
	TargetNames				= AngmarHallofTwilight
	RequiredExperience			= ANGMAR_HALLOFTWILIGHT_LVL2_EXP_NEEDED
	ExperienceAward				= ANGMAR_HALLOFTWILIGHT_LVL2_EXP_AWARD
	Rank					= 2
	AttributeModifiers			= GondorBarracksHitPointModLvl2 GondorBarracksBuildSpeedModLvl2
	Upgrades				= Upgrade_AngmarHallofTwilightLevel2_NEW
	LevelUpFx				= FX:GenericBuildingUpgrade
End

Object WHATEVER THE NAME IS

ReplaceModule ModuleTag_Veterancy_Particles_Two
	Behavior = StatusBitsUpgrade ModuleTag_Veterancy_Particles_Two_NEW
			TriggeredBy		= Upgrade_AngmarHallofTwilightLevel2_NEW
			CustomAnimAndDuration   = AnimState:USER_4 AnimTime:0
	End
End

ReplaceModule ModuleTag_ShowWalls 
	Behavior = SubObjectsUpgrade ModuleTag_ShowWalls_NEW;v1
		TriggeredBy		= Upgrade_AngmarHallofTwilightLevel2_NEW
		ShowSubObjects	= V1
		HideSubObjects	= V2 Top_1 Rocks_1 RuneGlowV2 V2_RuneGlow V2Glow_1 V2Glow_2 V2Glow_3 V2Glow_4 
	End
End

End

signature_group1.gif

 

16821.png


#17 Puzzler33

Puzzler33
  • Members
  • 226 posts

Posted 22 August 2009 - 12:25 PM

Object AngmarHallofTwilight
CommandSet = AngmarHallofTwilightOverride

End

CommandSet AngmarHallofTwilightOverride
	  1 = Command_ConstructAngmarNecromancerHorde
	  2 = Command_PurchaseTechnologyAngmarSoulFreeze 
	  3 = Command_PurchaseTechnologyAngmarWellOfSouls
	  4 = Command_PurchaseTechnologyAngmarCorpseRain
	  5 = Command_Upgrade_AngmarHallofTwilightLevel2
	  6 = Command_Sell
End

Upgrade Upgrade_AngmarHallofTwilightLevel2_NEW
	Type			= OBJECT
	BuildCost		= 750
	BuildTime		= ANGMAR_HALLOFTWILIGHT_LVL2_UPGRADE_TIME
	DisplayName		= UPGRADE:AngmarHallofTwilightLevel2
	ResearchCompleteEvaEvent	= ArcheryRangeUpgraded
End

CommandButton Command_Upgrade_AngmarHallofTwilightLevel2
   Command		   = OBJECT_UPGRADE
   Upgrade		   = Upgrade_AngmarHallofTwilightLevel2_NEW
   Options		   = CANCELABLE
   TextLabel		 = CONTROLBAR:ConstructAngmarHallofTwilight2Upgrade
   ButtonImage	   = UCCommon_UpgradeStructureNew
   ButtonBorderType  = UPGRADE
   DescriptLabel	 = CONTROLBAR:ToolTipBuildAngmarHallofTwilightLevel2Upgrade
   Radial			= Yes
   InPalantir		= Yes
End

ExperienceLevel	AngmarHallofTwilightLevel2
	TargetNames				= AngmarHallofTwilight
	RequiredExperience			= ANGMAR_HALLOFTWILIGHT_LVL2_EXP_NEEDED
	ExperienceAward				= ANGMAR_HALLOFTWILIGHT_LVL2_EXP_AWARD
	Rank					= 2
	AttributeModifiers			= GondorBarracksHitPointModLvl2 GondorBarracksBuildSpeedModLvl2
	Upgrades				= Upgrade_AngmarHallofTwilightLevel2_NEW
	LevelUpFx				= FX:GenericBuildingUpgrade
End

Object AngmarHallofTwilight

ReplaceModule ModuleTag_Veterancy_Particles_Two
	Behavior = StatusBitsUpgrade ModuleTag_Veterancy_Particles_Two_NEW
			TriggeredBy		= Upgrade_AngmarHallofTwilightLevel2_NEW
			CustomAnimAndDuration   = AnimState:USER_4 AnimTime:0
	End
End

ReplaceModule ModuleTag_ShowWalls 
	Behavior = SubObjectsUpgrade ModuleTag_ShowWalls_NEW;v1
		TriggeredBy		= Upgrade_AngmarHallofTwilightLevel2_NEW
		ShowSubObjects	= V1
		HideSubObjects	= V2 Top_1 Rocks_1 RuneGlowV2 V2_RuneGlow V2Glow_1 V2Glow_2 V2Glow_3 V2Glow_4 
	End
End

ReplaceModule ModueTag_StableLevel2CommandSet
	Behavior = CommandSetUpgrade ModueTag_StableLevel2CommandSet_NEW
		TriggeredBy			= Upgrade_AngmarHallofTwilightLevel2_NEW
		ConflictsWith		= Upgrade_AngmarHallofTwilightLevel3
		CommandSet			= AngmarHallofTwilightCommandSetLevel2
	End  
End

ReplaceModule ModuleTag_StableLevel2
	Behavior = LevelUpUpgrade ModuleTag_StableLevel2_NEW
		TriggeredBy	= Upgrade_AngmarHallofTwilightLevel2_NEW
		LevelsToGain   = 1
		LevelCap	   = 3
	End
End

ReplaceModule ModuleTag_UpgradeWellOfSouls
	Behavior = DoCommandUpgrade ModuleTag_UpgradeWellOfSouls_NEW
		TriggeredBy = Upgrade_AngmarHallofTwilightLevel2_NEW
		GetUpgradeCommandButtonName = Command_PurchaseTechnologyAngmarWellOfSouls
	End
End

End

That is what I have at the moment, but once you've bought the Hall of Twilight, it says the level 2 upgrade is unavailable (unit cannot recieve this upgrade) and it costs 500. I was considering altering the upgrade costs for almost all the buildings that are available (basically a barracks, a forge (if available), a siege works and another building (eg. Hall of Twilight, if available)), but now I'm thinking it would be much easier if I only altered the investment costs for purchasing the building and leaving the upgrade costs as default.

You don't need to correct the above code, but I do still have some problems:

- I can't get my waves to spawn as a team. I will keep trying to group waves into teams so I can spawn and move them as one, but if after a while I still cannot, I will have to resort to tending to individual units/hordes.

- I would like to make a dwarven mine unable to produce resources whatsoever, so its only use is to transport people.


I am going to try and solve these problems myself while waiting for a response :shiftee2:.

Edited by Puzzler33, 23 August 2009 - 08:36 PM.

Posted Image

#18 Rob38

Rob38

    Believer of Hope

  • Hosted
  • 3,567 posts
  • Location:USA
  • Projects:Helm's Deep Last Hope
  •  One who is not afraid of new challenges

Posted 22 August 2009 - 08:50 PM

Try reorganizing the order of the map.ini file:
Upgrade Upgrade_AngmarHallofTwilightLevel2_NEW
	Type			= OBJECT
	BuildCost		= 750
	BuildTime		= ANGMAR_HALLOFTWILIGHT_LVL2_UPGRADE_TIME
	DisplayName		= UPGRADE:AngmarHallofTwilightLevel2
	ResearchCompleteEvaEvent	= ArcheryRangeUpgraded
End

CommandButton Command_Upgrade_AngmarHallofTwilightLevel2
   Command		   = OBJECT_UPGRADE
   Upgrade		   = Upgrade_AngmarHallofTwilightLevel2_NEW
   Options		   = CANCELABLE
   TextLabel		 = CONTROLBAR:ConstructAngmarHallofTwilight2Upgrade
   ButtonImage	   = UCCommon_UpgradeStructureNew
   ButtonBorderType  = UPGRADE
   DescriptLabel	 = CONTROLBAR:ToolTipBuildAngmarHallofTwilightLevel2Upgrade
   Radial			= Yes
   InPalantir		= Yes
End

CommandSet AngmarHallofTwilightOverride
	  1 = Command_ConstructAngmarNecromancerHorde
	  2 = Command_PurchaseTechnologyAngmarSoulFreeze 
	  3 = Command_PurchaseTechnologyAngmarWellOfSouls
	  4 = Command_PurchaseTechnologyAngmarCorpseRain
	  5 = Command_Upgrade_AngmarHallofTwilightLevel2
	  6 = Command_Sell
End

ExperienceLevel	AngmarHallofTwilightLevel2
	TargetNames				= AngmarHallofTwilight
	RequiredExperience			= ANGMAR_HALLOFTWILIGHT_LVL2_EXP_NEEDED
	ExperienceAward				= ANGMAR_HALLOFTWILIGHT_LVL2_EXP_AWARD
	Rank					= 2
	AttributeModifiers			= GondorBarracksHitPointModLvl2 GondorBarracksBuildSpeedModLvl2
	Upgrades				= Upgrade_AngmarHallofTwilightLevel2_NEW
	LevelUpFx				= FX:GenericBuildingUpgrade
End

Object AngmarHallofTwilight

CommandSet = AngmarHallofTwilightOverride

ReplaceModule ModuleTag_Veterancy_Particles_Two
	Behavior = StatusBitsUpgrade ModuleTag_Veterancy_Particles_Two_NEW
			TriggeredBy		= Upgrade_AngmarHallofTwilightLevel2_NEW
			CustomAnimAndDuration   = AnimState:USER_4 AnimTime:0
	End
End

ReplaceModule ModuleTag_ShowWalls 
	Behavior = SubObjectsUpgrade ModuleTag_ShowWalls_NEW;v1
		TriggeredBy		= Upgrade_AngmarHallofTwilightLevel2_NEW
		ShowSubObjects	= V1
		HideSubObjects	= V2 Top_1 Rocks_1 RuneGlowV2 V2_RuneGlow V2Glow_1 V2Glow_2 V2Glow_3 V2Glow_4 
	End
End

ReplaceModule ModueTag_StableLevel2CommandSet
	Behavior = CommandSetUpgrade ModueTag_StableLevel2CommandSet_NEW
		TriggeredBy			= Upgrade_AngmarHallofTwilightLevel2_NEW
		ConflictsWith		= Upgrade_AngmarHallofTwilightLevel3
		CommandSet			= AngmarHallofTwilightCommandSetLevel2
	End  
End

ReplaceModule ModuleTag_StableLevel2
	Behavior = LevelUpUpgrade ModuleTag_StableLevel2_NEW
		TriggeredBy	= Upgrade_AngmarHallofTwilightLevel2_NEW
		LevelsToGain   = 1
		LevelCap	   = 3
	End
End

ReplaceModule ModuleTag_UpgradeWellOfSouls
	Behavior = DoCommandUpgrade ModuleTag_UpgradeWellOfSouls_NEW
		TriggeredBy = Upgrade_AngmarHallofTwilightLevel2_NEW
		GetUpgradeCommandButtonName = Command_PurchaseTechnologyAngmarWellOfSouls
	End
End

End

I'll look at your other questions later.

signature_group1.gif

 

16821.png


#19 Puzzler33

Puzzler33
  • Members
  • 226 posts

Posted 23 August 2009 - 05:04 PM

Ok... thank you, :xd: the Hall of Twilight works fine now (the only thing being that Well of Souls isn't purchased automatically at level 2, but that isn't very important anyway).

There is another thing... I want to disallow all players from building an Elven (Small) Wall Hub Expansion (coming from an Elven Fortress) but I can't find the object anywhere so I can't as of yet ban it. Anyone know where it is?

Edited by Puzzler33, 23 August 2009 - 05:26 PM.

Posted Image

#20 Rob38

Rob38

    Believer of Hope

  • Hosted
  • 3,567 posts
  • Location:USA
  • Projects:Helm's Deep Last Hope
  •  One who is not afraid of new challenges

Posted 24 August 2009 - 03:53 AM

Making dwarven mine unable to produce resources
ChildObject DwarvenMineShaft MineShaft_Interface

RemoveModule ModuleTag_MoneyProduction

End

Removing Elven Wall Hub from fortress

CommandSet ElvenFortressExpansionPadCornerCommandSet_NEW
 	1 = Command_ConstructElvenWatchtowerExpansion
	2 = Command_ConstructElvenVigilantEntExpansion
	3 = Command_ConstructElvenFloodgateExpansion
;;;;;;;;;4 = Command_ConstructElvenCastleWallHubExpansion;;;;;;;;;;;;;;;
End

Object ElvenFortressExpansionPadCorner	
CommandSet = ElvenFortressExpansionPadCornerCommandSet_NEW
End

signature_group1.gif

 

16821.png





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users