Era II
Mods concept.
Mod is a set of
files and folders, including graphics, audio, video, scripts, plugins, patches and custom
files. Era introduces "Mods" folder where each folder is called a mod and treated as game root directory. It means that
files and folders in mods should be arranged in the same way as in the root directory.
Original: Data
Mod way: Mods\My Mod\Data
Mod contents.
The contents of mods are not supposed to be modified at run-time. All
files which are subjects to be modified at run-time (like settings, logs, temporary
files) should be placed in real game folders during installation. Several mods can exist in Mods folder at the same time providing they are compatible. Every mod can have unlimited number of in-game resources (snd/vid/pac archives in Data) which will be automatically loaded.
Priorities.
If any mod has
file with the same name as in original game, the
file from mod is used instead of original one. If several mods have
file with the same name, then mod with the highest priority is used. To assign a priority to mod, add a number to the beginning of its name, separated from the text by space(s). The higher number is, the higher the priority is. Example: "100 MyMod". If no priority is specified, it's assumed to be 0. In case of equal priority, the creation time of mods folders is checked and the newest folder is preferred during
file search. This mechanism guarantees that mods installed later will have priority over older ones.
Register mod hint.
To register mod as the newest one executes "Tools\installmod.exe" with mod folder name as the only argument.
WoG Mod.
WoG is now distributed as regular mod and thus does not change any game resources. Most of WoG resources are located in "Data\hmm35wog.pac". All WoG dialogs read directly this archive and ignore other mods. The only not recommended way to fix it is to import new data inhmm35wog.pac. WoG contains fixed first aid tent def which ensures no game freezing.
Additional optional modifications:
- Fast battle animation. To disable it delete file "Data\cranim.txt".
- No pre-battle music. To disable it delete file "Data\wog - noprebattle music.snd".
- Animated Heroes 3 objects. To disable it delete file "Data\wog -animated objects.pac".
- Animated trees. To disable it delete file "Data\wog - animatedtrees.pac".
- Battle decorations. To disable it delete file "Data\wog - battledecorations.pac".
Yona Mod.
Yona is an open-source mod written in pure Delphi using Era SDK. Its ideology is total optionality ("Data\Yona\settings.ini"), native support of all new features by game, AI and multiplayer code. It's pretty compatible with other mods, does not store anything in saves and does not modify ERM scripts. To delete the mod, delete "Mods\Yona" folder.
Features:
New battle log hint in heroes' style describing possible kill count, average values, fatality values and new abilities used in attack.
New abilities:
- Pikeman / Halberdier ignores cavalry bonus and inflicts 200% damage to cavalry:
- Cavaliers
- Champions
- Centaurs
- Captains Centaurs
- Unicorns
- Battle Unicorns
- Black Knights
- Death Knights
- Nomads
- Sylvan centaurs
- Hell Steeds
- Nightmares
- Cavaliers / Champions get 20% damage bonus per hex instead of the original 5%. Bonus accumulates with other bonuses like attack modifier, offense skill and so on.
- Swordsmen / Crusaders ignore 50% of physical damage in a state of defense.
- Damage of Orcs / Orc-chieftains (throwing axes) depends quadratically on the distance to the target.
Formula: Base damage * (19 - distance) ^ 2 / 100.
Changes.
Portability.
The game became fully portable. All game settings are stored in "heroes3.ini"
file. Default CD scanning mechanism is turned off. Era automatically loads
files ".\Heroes3\Data\heroes3.vid" and ".\Heroes3\Data\heroes3.snd" if any. If "LoadCD" option in "heroes3.ini" is set to 1, Era scans all CD drives seeking for "Heroes3" folder. If above mentioned snd/vid archives are not found in the game folder, Era will try to load them from CD, providing the "LoadCD" option is on.
Debug mode.
To enable debug mode set option "Debug" to 1. The
file "eralog.txt" will be automatically recreated at game start.
Multiplayer.
- A network game can take place at one PC between two game copies (in different folders) if they have different "Unique System ID" in "heroes3.ini". To generate the ID, just erase the whole settings line and run the game.
- External IP address detection mechanism was improved. The first non-local address is moved in the first position of the list returned by gethostbyname function.
Editors.
Original editors (h3maped.exe and h3ccmped.exe) work fine. WoG editors (h3wmaped.exe and h3wcmped.exe) may require special fix. WoG map editor correctly opens maps and loads mods. It also applies all memory patches and loads dlls from EraEditor folder. Extended editor functionality provided by GrayFace editor patch requires resources to be located in h3sprite.lod and h3bitmap.lod. WoG campaign editor does not support mods. To enable MapEdPatch functionality for new WoG objects and to enable WoG campaign editor mapmaker can run "Tools\FixEditor\Fix Editor.bat". This will import all crucial data inh3sprite.lod and h3bitmap.lod.
Help.
All documentation, changelogs, updated ERM and Era manuals can be found in the "Help" folder.
Tweaks.
- Windows 7 compatibility when running without "XP compatibility" option.
- No WoG installer anymore.
- Sped up calling all wog dialogs, several times lower HDD load.
- Optimized WoG dialogs HDD and CPU load. "reduce cpu load.bin" patch was removed and HD-mod "Berserker's CPU patch" option should be turned off.
- Writing ini files using ERM or Era functions now always result in sorted list of sections and keys in file.
- Random maps generation in game/editor is no longer dependent on garbage snd/vid/lod files from Armageddon Blade.
- Game does not require native lods in "Data" folder if necessary resources are found in other pacs.
- Added synchronized creature sounds by GrayFace.
- Script 98 (quick and smart savings) was rewritten, now supports option in WoG menu, does not conflict with chat and is variables-safe.
- All tools were moved to Tools folder, included new standard ones:
lodexport, lodimport, objector.exe, repman.exe, resman.exe, installmod.exe.
- Updated API and sources.
- F11 now extracts scripts from memory to "Data\ExtractedScripts" folder instead of "Data\s\ExtractedScripts".
- Removed duplicated WoG initialization code.
- Fixed Era 1.9 PO/Memory bugs which led to invalid saved games' data and size.
- Fixed Era 1.9 bug when plugins and patches with ".off" extension were loaded anyway.
Technical details.
Virtual File System ("Mods" folder support).
The following
file system functions working with names are supported:
- CreateFileA
- GetFileAttributesA
- FindFirstFileA
- FindNextFileA
- FindClose
- LoadLibraryA
- DeleteFileA
- CreateDirectoryA
- RemoveDirectoryA
- GetPrivateProfileStringA
- LoadCursorFromFileA
- PlaySoundA
- GetCurrentDirectoryA
- SetCurrentDirectoryA
New event "OnStackToStackDamage"(!?FU77012).
Arguments:
- Attacker stack (0..41) or -1
- Defender stack (0..41) or -1
- Final damage (DONT CHANGE!)
- Final damage (CHANGEABLE)
- Basic damage
- Damage bonus
- Is distant? (if not 0 or 1 then garbage)
- Distance (only for theoretical attacks)
- Is theoretical? (means hint or AI calculation)
The event occurs when one stack attacks/shoots at another one.
New event "OnAICalcStackAttackEffect" (!?FU77013).
Arguments:
- Attacker stack (0..41)
- Defender stack (0..41)
- Effect value (CHANGEABLE)
- Effect value (DONT CHANGE)
New event "OnChat" (!?FU77014).
The first argument determines event type and the rest arguments:
- 0 (Enter chat)
- 1 (Input)
- Input string
- Action: 0 (clear box), 1 (close box) or 2 (default)
- 2 (Leave chat)
Miscellaneous.
- Added "ApiHook" function. It finds out patch size automatically in comparison with "Hook" function.
- Both ApiHook and Hook functions return new address of overwritten code in the BRIDGE mode.
- v1 keeps Era dll handle when *.era plugin is being loaded.
- Era automatically calls DisableThreadLibraryCalls for all loaded *.era plugins.
- ExecErmCmd does not kill the game on error.
- Event "OnNameColors" was renamed to "OnAfterCreateWindow"