Limitations and Tricks to a map.ini file
Although there are many benefits to using a map.ini file, there are some limations for it. Below is a list of things you can't do with a map.ini file.
1. I found out that if you want to change anything in an existing upgrade, you must make a new one and name it something else. This can be a real pain for big map.ini files since you have to change all the units affected by the upgrade also :( I did find, however, that you do not need to change the names of special abilities for the game to read the changes made in it.
2. You can't change the name of commandbuttons. If you try to make your own with a unique name, the button images will not show in-game no matter what. So what you have to do is go through the commandbutton.ini, find one with the button image you want, and change everything else (except the name) for it. This can be annoying at times.
3. You can't edit projectile type weapons. If you try to, the damage will change correctly but the projectile will not show up in-game. All you can do with projectile weapons is change the range of them. Make sure you don't change the name of the weapon though or you'll get the projectile error. Melee weapons are not affected by any of this.
4. To change a commandset, you must make a new one and name it something different.
5. You can't create new objects. You must use an existing object from the game. You can, however, change almost everything with the object and give it a new model, etc...
6. You can't change the 'RequiredExperience' and 'ExperienceAward' part for the Experience Levels. What this means is that you can't change the amount it takes for a unit or hero to gain a level. You can however, add new upgrades in it.
7. You can't add any new art into the game except for fx. You are allowed to make your own custom fx and swap textures for a unit but nothing else.
8. With larger map.ini files, the order you put your code in does matter. So if you are having trouble with the game not reading the code you want, try changing the order in which your file is arranged.
9. Out-Of-Sync errors are sometimes major problems with map.ini files. If you play Online, whenever you finish playing a map with a custom map.ini file, you must restart the game to clean it out.
1 - true
2 - true, but i found a way to change the image shown on existing commandbuttons (its my little contribution to the mapping society X), but i keep it secret)
3 - there is actually a way to increase the damage dealt by ranged weapons
4 - true
5 - you actually can. I almost always make new ones to prevent bugs and to be able to use others for other purposes. Also if you create ChildObjects, you will be able to change/add behaviors without all that AddModule --behavior stuff--- End or ReplaceModule.
6 - you can but it will sometimes result in gamedat crash (if you get past some values of exp), so better don't mess with it without a good reason. Also if the difference between required exp for levels is too small (like for ex level 1 = 40 , lvl2 = 50), the experience bar for the unit will sometimes glitch and show like its the max level.
7 - yes, but you can check out all the unused art chunks left in the game, some of them can be useful
8 - i have trouble with this ; i have a map that haves an 100kb map.ini and it always goes OoS after a few minutes :/ - i suspect its the order of the code causing oos (even though i never experienced the same issue)
9 - ^^ :(
;----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Now my list:
1 - The AISpecialPowerUpdate behavior, when used for stances, makes no effect in a map.ini, but works if in a mod
2 - You can't get rid of MISSING on DisplayName if you want a new name, the game wont read it from map.str
3 - You can't change the build cost or time for heroes, but you can change their revive cost/time.
4 - The game will crash if you try to edit AudioEvents
5 - If you try to make a new ranged weapon, nothing will happen
6 - If you want new spellbook powers with a proper requirments system (so you cant buy 25pp if u havent bought first the 15pp one), you are forced to create new sciences (same as with upgrades)
7 - You can't make the AI build a certain unit or hero just through coding (your problem^^) in map.ini
8 - The RequiredUpgradeNames and ForbiddenUpgradeNames for weapon nuggets won't work in a map.ini
9 - You can't create new ENUMS or DAMAGE TYPES (not even in a mod)
and there are more, but can't recall them now
@About your problem, I can warranty that you can change horde size in map.ini. Could you please post your code?
Also some tips:
*If you get game.dat crash while loading map or doing a specific action (ex clicking on a commandbutton), check the special powers for typos, these ones usually make those nasty errors (along with experiencelevels).
*It's best to create new weapons/armors instead of editing existing ones, but if you are forced to keep them (especially for the ones with RequiredUpgradeNames stuff, such as CAH weapon), here's a tip: the existing nuggets in original ini will be there, if you add new ones they will just be extra damage ( so for example if you wanna keep poison attack for CAH, but increase his base damage, just give him a little extra damage nugget). You can also use ClearNuggets (inside the weapon) to clear existing nuggets of damage.
Edited by -SilverBane-, 24 May 2015 - 02:49 PM.