Map.ini Tutorial PART 1 By Fingulfin Thanks to the T3A Community, and Special Thanks to 2PlayGames, who taught me almost everything I know about modding! Everything with a ^ was added by him. The Basics: A map ini is like an override file for your game's INI. While it has its limitations, it is still a very powerful tool! With it you can create very powerful maps, that will WoW! endless crowds of players. With map.ini you can: (* means check limitations) Create new heroes using ChildObjects* Edit SpellBooks Edit Hordes Create New particle Effects Edit buildcosts and times for units and buildings Edit commandSets Edit CommandButtons* You can use RemoveModule to remove existing modules (like timers)^ Create and Edit WeaponSets Create and Edit ArmorSets Change a Unit’s Texture Create and Edit STR Files A WHOLE lot more! Limitations: You cannot put in new models/Skins Not recommended to create totally new heroes, use ChildObjects You cannot create NEW commandButtons; you have to edit existing ones You cannot create NEW experience levels :’( You can't edit sounds^ If you edit an object in map.ini, it's ChildObjects don't get changed at the same time (that's because the engine actually clones the objects and then changes the clones)^ A few more, but still, you are very free! Lesson 1: Adding new abilities to Heroes For this lesson, you will learn how to add Word of Power to Saruman First off, we will be looking at Gandalf’s code to find the Behavior that makes word of power usable. It should look like this: Behavior = UnpauseSpecialPowerUpgrade ModuleTag_WordEnabler SpecialPowerTemplate = SpecialAbilityWordOfPower TriggeredBy = Upgrade_GandalfWordOfPower End Behavior = SpecialPowerModule ModuleTag_WordStarter SpecialPowerTemplate = SpecialAbilityWordOfPower UpdateModuleStartsAttack = Yes StartsPaused = Yes End Behavior = WeaponFireSpecialAbilityUpdate ModuleTag_WordWeaponFireUpdate SpecialPowerTemplate = SpecialAbilityWordOfPower WhichSpecialWeapon = 3 SkipContinue = Yes UnpackTime = 1700 PackTime = 1 FreezeAfterTriggerDuration = 2500; Hold AI for this long after we fire. AwardXPForTriggering = 0 StartAbilityRange = 80.0 SpecialWeapon = GandalfWordOfPower End Now we will do this: Object IsengardSaruman AddModule Behavior = UnpauseSpecialPowerUpgrade ModuleTag_WordEnabler SpecialPowerTemplate = SpecialAbilityWordOfPower TriggeredBy = Upgrade_GandalfWordOfPower End End AddModule Behavior = SpecialPowerModule ModuleTag_WordStarter SpecialPowerTemplate = SpecialAbilityWordOfPower UpdateModuleStartsAttack = Yes StartsPaused = Yes End End AddModule Behavior = WeaponFireSpecialAbilityUpdate ModuleTag_WordWeaponFireUpdate SpecialPowerTemplate = SpecialAbilityWordOfPower WhichSpecialWeapon = 3 SkipContinue = Yes UnpackTime = 1700 PackTime = 1 FreezeAfterTriggerDuration = 2500; Hold AI for this long after we fire. AwardXPForTriggering = 0 StartAbilityRange = 80.0 SpecialWeapon = GandalfWordOfPower End End End Do you see the Difference? For map.ini when adding a module to a unit, you must put the line “AddModule” Before each newly added module, to tell the INI that this is new. If you are a little more advanced, you can use an animation to make it look more convincing. The only downside to this is that you have to re-create the ENTIRE draw module for that… You would type in “ReplaceModule ModuleTag_DRAW Draw = W3DScriptedModelDraw ModuleTag_DRAW_New” Then the ENTIRE module, adding “;;; WORD OF POWER AnimationState = SPECIAL_WEAPON_THREE Animation AnimationName = IUSaruman_SKL.IUSaruman_TNTB AnimationMode = ONCE AnimationBlendTime = 5 End FXEvent = Frame:5 Name:FX_GandalfPreAttackBlast End ; --- Attacking Anims [Weapon_A] AnimationState = FIRING_OR_PREATTACK_A Animation = IUSaruman_ATKC AnimationName = IUSaruman_SKL.IUSaruman_ATKC AnimationMode = ONCE UseWeaponTiming = Yes End Animation = IUSaruman_ATKD AnimationName = IUSaruman_SKL.IUSaruman_ATKD AnimationMode = ONCE UseWeaponTiming = Yes End End” Somewhere in there. Notice we typed “ReplaceModule” Instead of “AddModule”. This is because we want to dispose of the old Module then insert a new one. Remember to RENAME the MODULE!!! I normally type in the module tag, then add “_Override”. However, seeing as module tag names don’t really matter, feel free to type in whatever! Now that we have the behaviors and the animations, we can edit the command Sets. It is Much easier editing commandsets than anything else, all we have to do is this: “CommandSet SarumanCommandSet 6 = Command_SpecialAbilityWordOfPower End It will add the word of power ability to our Saruman. In the Above behaviors, notice the UnpauseSpecialPowerUpgrade Module? it says that we need an upgrade for this power to work! If we want it available at level 1, we would DELETE this module, and in the module below it under the “Starts Paused” tab, we would type No instead of Yes. If we want it to be useable only at level 10, we would edit Saruman’s Experience Levels, Like this: “ExperienceLevel SarumanLevel10 Upgrades = Upgrade_GandalfWordOfPower End” Voila! A Saruman with word of power, and a nice anim to go with it! ***When working with units, if you create a new commandSet (Not only editing, totally NEW) then put the commandSet UNDER the unit code. It lets the computer parse it last, so everything runs smoothly!***