<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/">
	<channel>
		<title><![CDATA[Wake of Gods Forum | Форум Во Имя Богов - ЭРА / ERA]]></title>
		<link>http://wforum.heroes35.net/</link>
		<description><![CDATA[Wake of Gods Forum | Форум Во Имя Богов - http://wforum.heroes35.net]]></description>
		<pubDate>Fri, 15 May 2026 05:09:56 +0000</pubDate>
		<generator>MyBB</generator>
		<item>
			<title><![CDATA[Как в ЭРА Плюс получить здание улучшающее существ]]></title>
			<link>http://wforum.heroes35.net/showthread.php?tid=7419</link>
			<pubDate>Fri, 13 Mar 2026 13:39:02 +0000</pubDate>
			<guid isPermaLink="false">http://wforum.heroes35.net/showthread.php?tid=7419</guid>
			<description><![CDATA[Добрый день всем Героям!<br />
<br />
Товарищи, помогите советом пожалуйста. Сразу скажу, я в модах героев не разбираюсь и поэтому прошу сильно не ругаться, и по возможности доходчиво объяснить.<br />
<br />
Итак: Ребёнок увидел картинки героев с новыми существами (Серафимы, королевские алебардщики, Атланты) и давай меня напрягать всё это ему сделать. В процессе поисков дошли до того, что есть мод ЭРА. Скачал его: ERA PLUS v.3.6.4.0.39263.703<br />
<br />
Итак поставил скачанный мод, как и указывалось в инструкции в новую, пустую директорию, запускаем, а там новые расы, города, а вот новых существ в старых городах - нет. Т.е. в замке как были копейщики и алебардщики, так они и есть, а как их улучшить до королевских алебардщиков - непонятно. <br />
<br />
Весь интернет уже перечитали, в конец запутались. Прошу на профильном форуме, вас - знатоков, помочь моему чаду.<br />
<br />
Подскажите пожалуйста, как получить желаемое.<br />
<br />
Спасибо!]]></description>
			<content:encoded><![CDATA[Добрый день всем Героям!<br />
<br />
Товарищи, помогите советом пожалуйста. Сразу скажу, я в модах героев не разбираюсь и поэтому прошу сильно не ругаться, и по возможности доходчиво объяснить.<br />
<br />
Итак: Ребёнок увидел картинки героев с новыми существами (Серафимы, королевские алебардщики, Атланты) и давай меня напрягать всё это ему сделать. В процессе поисков дошли до того, что есть мод ЭРА. Скачал его: ERA PLUS v.3.6.4.0.39263.703<br />
<br />
Итак поставил скачанный мод, как и указывалось в инструкции в новую, пустую директорию, запускаем, а там новые расы, города, а вот новых существ в старых городах - нет. Т.е. в замке как были копейщики и алебардщики, так они и есть, а как их улучшить до королевских алебардщиков - непонятно. <br />
<br />
Весь интернет уже перечитали, в конец запутались. Прошу на профильном форуме, вас - знатоков, помочь моему чаду.<br />
<br />
Подскажите пожалуйста, как получить желаемое.<br />
<br />
Спасибо!]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Перевод игры на PNG]]></title>
			<link>http://wforum.heroes35.net/showthread.php?tid=6001</link>
			<pubDate>Fri, 30 Apr 2021 17:19:31 +0000</pubDate>
			<guid isPermaLink="false">http://wforum.heroes35.net/showthread.php?tid=6001</guid>
			<description><![CDATA[Общая тема для обсуждения всех моментов, связанных с использованием PNG картинок в игре.]]></description>
			<content:encoded><![CDATA[Общая тема для обсуждения всех моментов, связанных с использованием PNG картинок в игре.]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Режим совместимости Эры 3 со скриптами Era 2.46f]]></title>
			<link>http://wforum.heroes35.net/showthread.php?tid=5898</link>
			<pubDate>Sat, 09 Jan 2021 11:33:01 +0000</pubDate>
			<guid isPermaLink="false">http://wforum.heroes35.net/showthread.php?tid=5898</guid>
			<description><![CDATA[Предлагается ввести для ЕРМ 1 скриптов по умолчанию на уровне триггеров и команд режим совместимости с Era 2.46F для поддержки и быстрого переноса старых модов.<br />
<br />
Для этого предлагаю писать здесь те изменения Эры 3, которые повлияли на выполнение старых скриптов негативно. Что-то можно будет выполнять по-старому, что-то не делать, а с чем-то смириться.<br />
<br />
-) f..t переменные были глобальными.<br />
<br />
-) Отрицательные y-переменные сохранялись при вызове не !!FU1..FU29999 триггера и восстанавливались после.<br />
<br />
-) Не переданные x-переменные не обнуляются в FU:P/DO:P, а сохраняют предыдущие значения.<br />
<br />
-) Не переданные z- переменные не устанавливаются в пустую строку в FU:P/DO:P, а сохраняют предыдущие значения.<br />
<br />
-) В DO:P на каждой итерации цикла поддерживался синтаксис<br />
<br />
?&#36; - x-переменная устанавливалась в индекс переменной возврата.<br />
?v600 устанавливало x-переменную в 600 на каждой итерации цикла.<br />
<br />
=&#36; - x-переменная на каждой итерации цикла устанавливалась в значение &#36;, вычисленное заново.<br />
<br />
Что ещё не даёт нам пользоваться картами Валеры или модами Алгора?]]></description>
			<content:encoded><![CDATA[Предлагается ввести для ЕРМ 1 скриптов по умолчанию на уровне триггеров и команд режим совместимости с Era 2.46F для поддержки и быстрого переноса старых модов.<br />
<br />
Для этого предлагаю писать здесь те изменения Эры 3, которые повлияли на выполнение старых скриптов негативно. Что-то можно будет выполнять по-старому, что-то не делать, а с чем-то смириться.<br />
<br />
-) f..t переменные были глобальными.<br />
<br />
-) Отрицательные y-переменные сохранялись при вызове не !!FU1..FU29999 триггера и восстанавливались после.<br />
<br />
-) Не переданные x-переменные не обнуляются в FU:P/DO:P, а сохраняют предыдущие значения.<br />
<br />
-) Не переданные z- переменные не устанавливаются в пустую строку в FU:P/DO:P, а сохраняют предыдущие значения.<br />
<br />
-) В DO:P на каждой итерации цикла поддерживался синтаксис<br />
<br />
?&#36; - x-переменная устанавливалась в индекс переменной возврата.<br />
?v600 устанавливало x-переменную в 600 на каждой итерации цикла.<br />
<br />
=&#36; - x-переменная на каждой итерации цикла устанавливалась в значение &#36;, вычисленное заново.<br />
<br />
Что ещё не даёт нам пользоваться картами Валеры или модами Алгора?]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Era 2.9.15 Голосуем за исправления]]></title>
			<link>http://wforum.heroes35.net/showthread.php?tid=5822</link>
			<pubDate>Sun, 01 Nov 2020 14:01:03 +0000</pubDate>
			<guid isPermaLink="false">http://wforum.heroes35.net/showthread.php?tid=5822</guid>
			<description><![CDATA[Какие исправления из более поздних версий наиболее всотребованы для Эры 2.9.14?<br />
<br />
1) SN:O.<br />
2) Инициализация нулями аргументов функций по умолчанию.]]></description>
			<content:encoded><![CDATA[Какие исправления из более поздних версий наиболее всотребованы для Эры 2.9.14?<br />
<br />
1) SN:O.<br />
2) Инициализация нулями аргументов функций по умолчанию.]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Era Erm Framework]]></title>
			<link>http://wforum.heroes35.net/showthread.php?tid=5816</link>
			<pubDate>Fri, 23 Oct 2020 20:32:21 +0000</pubDate>
			<guid isPermaLink="false">http://wforum.heroes35.net/showthread.php?tid=5816</guid>
			<description><![CDATA[Обновление: <a href="https://dropmefiles.com/ExWs8" target="_blank">https://dropmefiles.com/ExWs8</a><br />
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>[+&#93; Added new constants to "Era Erm Framework" mod:<br />
&nbsp;&nbsp;- ARG_SYNTAX_GET, ARG_SYNTAX_SET, ARG_SYNTAX_ADD for FU:S argument syntax types.<br />
<br />
[+&#93; Added new events to "Era Erm Framework" mod:<br />
<br />
&nbsp;&nbsp;- "OnAfterBattleSetup", occuring right after "OnBeforeBattle" and "OnBeforeBattleUniversal" events.<br />
&nbsp;&nbsp;New event allows to to be sure, that basic battle parameters (heroes, quick battle, coordinates) are set up.<br />
<br />
&nbsp;&nbsp;- "OnBeforeBattle" and&nbsp;&nbsp;&nbsp;&nbsp;"OnBeforeBattleUniversal" events were improved, storing most of prebattle parameters in global variables.<br />
&nbsp;&nbsp;i^battle_isQuick^:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (TRUE) if quick battle is enabled, (FALSE) otherwise<br />
&nbsp;&nbsp;i^battle_x^:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Battle x-coordinate<br />
&nbsp;&nbsp;i^battle_y^:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Battle y-coordinate<br />
&nbsp;&nbsp;i^battle_z^:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Battle z-coordinate<br />
&nbsp;&nbsp;i^battle_owner_0^:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Left side owner or (NO_OWNER)<br />
&nbsp;&nbsp;i^battle_owner_1^:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Right side owner or (NO_OWNER)<br />
&nbsp;&nbsp;i^battle_hero_0^:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Left side hero or (NO_HERO)<br />
&nbsp;&nbsp;i^battle_hero_1^:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Right side hero or (NO_HERO). Any negative value is normalized into (NO_HERO)<br />
&nbsp;&nbsp;i^battle_ai_0^:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(TRUE) if left side is controlled by AI, (FALSE) otherwise.<br />
&nbsp;&nbsp;i^battle_ai_1^:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(TRUE) if right side is controlled by AI, (FALSE) otherwise.<br />
&nbsp;&nbsp;i^battle_human_0^:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (TRUE) if left side is controlled by human, (FALSE) otherwise.<br />
&nbsp;&nbsp;i^battle_human_1^:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (TRUE) if right side is controlled by human, (FALSE) otherwise.<br />
&nbsp;&nbsp;i^battle_remote_0^:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(TRUE) if left side is controlled by remote human, (FALSE) otherwise.<br />
&nbsp;&nbsp;i^battle_remote_1^:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(TRUE) if right side is controlled by remote human, (FALSE) otherwise.<br />
&nbsp;&nbsp;i^battle_local_0^:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (TRUE) if left side is controlled by local human or AI, (FALSE) otherwise.<br />
&nbsp;&nbsp;i^battle_local_1^:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (TRUE) if right side is controlled by local human or AI, (FALSE) otherwise.<br />
&nbsp;&nbsp;i^battle_localHuman_0^:&nbsp;&nbsp;(TRUE) if left side is controlled by local human, (FALSE) otherwise.<br />
&nbsp;&nbsp;i^battle_localHuman_1^:&nbsp;&nbsp;(TRUE) if right side is controlled by local human, (FALSE) otherwise.<br />
&nbsp;&nbsp;i^battle_hasHuman^:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(TRUE) if least one side is controlled by human, (FALSE) otherwise.<br />
&nbsp;&nbsp;i^battle_humanOnly^:&nbsp;&nbsp;&nbsp;&nbsp; (TRUE) if all sides are controlled by humans, (FALSE) otherwise.<br />
&nbsp;&nbsp;i^battle_aiOnly^:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(TRUE) if all sides are controlled by AI, (FALSE) otherwise.<br />
&nbsp;&nbsp;i^battle_isVisible^:&nbsp;&nbsp;&nbsp;&nbsp; (TRUE) if at least one side is human and quick battle is off, (FALSE) otherwise.<br />
&nbsp;&nbsp;i^battle_isNetwork^:&nbsp;&nbsp;&nbsp;&nbsp; (TRUE) if it's network human vs human battle, (FALSE) otherwise.<br />
&nbsp;&nbsp;i^battle_type^:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Battle type bit mask: a collection of BATTLE_TYPE_FLAG_XXX constants.<br />
<br />
[+&#93; The following improvements were introduced in "Era Erm Framework" mod:<br />
&nbsp;&nbsp;<br />
&nbsp;&nbsp;- i^battle_round^ keeps current valid round (same as in OnBattleRound event) and can be used throughout battle triggers<br />
&nbsp;&nbsp;and in OnBattleRound condition like !?FU(OnBattleRound)&amp;i^battle_round^=0 instead of v997.<br />
<br />
[+&#93; Added the following functions to "Era Erm Framework" mod:<br />
<br />
&nbsp;&nbsp;!?FU(NewIntArray);<br />
&nbsp;&nbsp;; Creates and returns trigger local array of integers.<br />
&nbsp;&nbsp;; Alternative function arguments:<br />
&nbsp;&nbsp;;&nbsp;&nbsp;(?result)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; The result array will have 0 items.<br />
&nbsp;&nbsp;;&nbsp;&nbsp;(size)/(?result)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The result array will have (size) items with 0 value.<br />
&nbsp;&nbsp;;&nbsp;&nbsp;(size)/(fillValue)/(?result)&nbsp;&nbsp;The result array will have (size) items will (fillValue) value<br />
&nbsp;&nbsp;;&nbsp;&nbsp;You may optionally specify (storageType) parameter after (?result) argument with value like M_STORED or M_TEMP.<br />
&nbsp;&nbsp;<br />
&nbsp;&nbsp;!?FU(NewStrArray);<br />
&nbsp;&nbsp;; Creates and returns trigger local array of strings.<br />
&nbsp;&nbsp;; Alternative function arguments:<br />
&nbsp;&nbsp;;&nbsp;&nbsp;(?result)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; The result array will have 0 items.<br />
&nbsp;&nbsp;;&nbsp;&nbsp;(size)/(?result)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The result array will have (size) items with ^^ value.<br />
&nbsp;&nbsp;;&nbsp;&nbsp;(size)/(fillValue)/(?result)&nbsp;&nbsp;The result array will have (size) items will (fillValue) value<br />
&nbsp;&nbsp;;&nbsp;&nbsp;You may optionally specify (storageType) parameter after (?result) argument with value like M_STORED or M_TEMP.</code></div></div>
]]></description>
			<content:encoded><![CDATA[Обновление: <a href="https://dropmefiles.com/ExWs8" target="_blank">https://dropmefiles.com/ExWs8</a><br />
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>[+] Added new constants to "Era Erm Framework" mod:<br />
&nbsp;&nbsp;- ARG_SYNTAX_GET, ARG_SYNTAX_SET, ARG_SYNTAX_ADD for FU:S argument syntax types.<br />
<br />
[+] Added new events to "Era Erm Framework" mod:<br />
<br />
&nbsp;&nbsp;- "OnAfterBattleSetup", occuring right after "OnBeforeBattle" and "OnBeforeBattleUniversal" events.<br />
&nbsp;&nbsp;New event allows to to be sure, that basic battle parameters (heroes, quick battle, coordinates) are set up.<br />
<br />
&nbsp;&nbsp;- "OnBeforeBattle" and&nbsp;&nbsp;&nbsp;&nbsp;"OnBeforeBattleUniversal" events were improved, storing most of prebattle parameters in global variables.<br />
&nbsp;&nbsp;i^battle_isQuick^:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (TRUE) if quick battle is enabled, (FALSE) otherwise<br />
&nbsp;&nbsp;i^battle_x^:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Battle x-coordinate<br />
&nbsp;&nbsp;i^battle_y^:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Battle y-coordinate<br />
&nbsp;&nbsp;i^battle_z^:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Battle z-coordinate<br />
&nbsp;&nbsp;i^battle_owner_0^:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Left side owner or (NO_OWNER)<br />
&nbsp;&nbsp;i^battle_owner_1^:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Right side owner or (NO_OWNER)<br />
&nbsp;&nbsp;i^battle_hero_0^:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Left side hero or (NO_HERO)<br />
&nbsp;&nbsp;i^battle_hero_1^:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Right side hero or (NO_HERO). Any negative value is normalized into (NO_HERO)<br />
&nbsp;&nbsp;i^battle_ai_0^:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(TRUE) if left side is controlled by AI, (FALSE) otherwise.<br />
&nbsp;&nbsp;i^battle_ai_1^:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(TRUE) if right side is controlled by AI, (FALSE) otherwise.<br />
&nbsp;&nbsp;i^battle_human_0^:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (TRUE) if left side is controlled by human, (FALSE) otherwise.<br />
&nbsp;&nbsp;i^battle_human_1^:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (TRUE) if right side is controlled by human, (FALSE) otherwise.<br />
&nbsp;&nbsp;i^battle_remote_0^:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(TRUE) if left side is controlled by remote human, (FALSE) otherwise.<br />
&nbsp;&nbsp;i^battle_remote_1^:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(TRUE) if right side is controlled by remote human, (FALSE) otherwise.<br />
&nbsp;&nbsp;i^battle_local_0^:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (TRUE) if left side is controlled by local human or AI, (FALSE) otherwise.<br />
&nbsp;&nbsp;i^battle_local_1^:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (TRUE) if right side is controlled by local human or AI, (FALSE) otherwise.<br />
&nbsp;&nbsp;i^battle_localHuman_0^:&nbsp;&nbsp;(TRUE) if left side is controlled by local human, (FALSE) otherwise.<br />
&nbsp;&nbsp;i^battle_localHuman_1^:&nbsp;&nbsp;(TRUE) if right side is controlled by local human, (FALSE) otherwise.<br />
&nbsp;&nbsp;i^battle_hasHuman^:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(TRUE) if least one side is controlled by human, (FALSE) otherwise.<br />
&nbsp;&nbsp;i^battle_humanOnly^:&nbsp;&nbsp;&nbsp;&nbsp; (TRUE) if all sides are controlled by humans, (FALSE) otherwise.<br />
&nbsp;&nbsp;i^battle_aiOnly^:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(TRUE) if all sides are controlled by AI, (FALSE) otherwise.<br />
&nbsp;&nbsp;i^battle_isVisible^:&nbsp;&nbsp;&nbsp;&nbsp; (TRUE) if at least one side is human and quick battle is off, (FALSE) otherwise.<br />
&nbsp;&nbsp;i^battle_isNetwork^:&nbsp;&nbsp;&nbsp;&nbsp; (TRUE) if it's network human vs human battle, (FALSE) otherwise.<br />
&nbsp;&nbsp;i^battle_type^:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Battle type bit mask: a collection of BATTLE_TYPE_FLAG_XXX constants.<br />
<br />
[+] The following improvements were introduced in "Era Erm Framework" mod:<br />
&nbsp;&nbsp;<br />
&nbsp;&nbsp;- i^battle_round^ keeps current valid round (same as in OnBattleRound event) and can be used throughout battle triggers<br />
&nbsp;&nbsp;and in OnBattleRound condition like !?FU(OnBattleRound)&amp;i^battle_round^=0 instead of v997.<br />
<br />
[+] Added the following functions to "Era Erm Framework" mod:<br />
<br />
&nbsp;&nbsp;!?FU(NewIntArray);<br />
&nbsp;&nbsp;; Creates and returns trigger local array of integers.<br />
&nbsp;&nbsp;; Alternative function arguments:<br />
&nbsp;&nbsp;;&nbsp;&nbsp;(?result)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; The result array will have 0 items.<br />
&nbsp;&nbsp;;&nbsp;&nbsp;(size)/(?result)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The result array will have (size) items with 0 value.<br />
&nbsp;&nbsp;;&nbsp;&nbsp;(size)/(fillValue)/(?result)&nbsp;&nbsp;The result array will have (size) items will (fillValue) value<br />
&nbsp;&nbsp;;&nbsp;&nbsp;You may optionally specify (storageType) parameter after (?result) argument with value like M_STORED or M_TEMP.<br />
&nbsp;&nbsp;<br />
&nbsp;&nbsp;!?FU(NewStrArray);<br />
&nbsp;&nbsp;; Creates and returns trigger local array of strings.<br />
&nbsp;&nbsp;; Alternative function arguments:<br />
&nbsp;&nbsp;;&nbsp;&nbsp;(?result)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; The result array will have 0 items.<br />
&nbsp;&nbsp;;&nbsp;&nbsp;(size)/(?result)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The result array will have (size) items with ^^ value.<br />
&nbsp;&nbsp;;&nbsp;&nbsp;(size)/(fillValue)/(?result)&nbsp;&nbsp;The result array will have (size) items will (fillValue) value<br />
&nbsp;&nbsp;;&nbsp;&nbsp;You may optionally specify (storageType) parameter after (?result) argument with value like M_STORED or M_TEMP.</code></div></div>
]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Русификатор для ERA III]]></title>
			<link>http://wforum.heroes35.net/showthread.php?tid=5680</link>
			<pubDate>Tue, 07 Jul 2020 18:26:21 +0000</pubDate>
			<guid isPermaLink="false">http://wforum.heroes35.net/showthread.php?tid=5680</guid>
			<description><![CDATA[<div style="text-align: center;"><img src="https://c.radikal.ru/c36/2007/f5/8b0bdae278f5.png" border="0" alt="Image: 8b0bdae278f5.png" style='max-width: 800px; height: auto;' onclick='Bers.ScaleImg(this);'/></div>
<br />
Вашему вниманию предлагается русификатор для ERA III.<br />
<br />
Русификатор может быть установлен как на русскую, так и на английскую версию героев и полностью русифицирует игру.<br />
<br />
Текстовики я брал из предыдущего русификатора, всё остальное - из русского издания Complete.<br />
Upd: текстовые ресурсы в значительной степени переработаны, исправлено множество ошибок и неточностей.<br />
<br />
<span style="color: green;"><span style="font-weight: bold;">Upd</span></span>: Lite версия русификатора больше не поддерживается.<br />
<br />
<span style="color: #0000CD;"><span style="font-weight: bold;">Ссылки:</span></span><br />
<a href="https://yadi.sk/d/Z7H-sFwijsNWSw" target="_blank">WoG Rus Full.exe</a> (Яндекс-Диск, 18 МБ, дата последнего обновления 02.07.2022)<br />
<br />
Установка: распаковать в папку с игрой, соглашаясь на замену файлов.<br />
<br />
<span style="color: #0000CD;"><span style="font-weight: bold;">Дополнительно:</span></span><br />
<br />
Русифицированные карты из Полного собрания: <a href="https://disk.yandex.ru/d/K9yQasruXu_qJQ" target="_blank">maps.zip</a><br />
<br />
Совместимость: на данный момент совместим с актуальной версией Эры 3.9 (и выше, если ничего не сломается).<br />
<br />
<span style="text-decoration: underline;">Важно</span>: Рекомендуется ставить Эру и русификатор на Complete версию героев (от Буки или от GOG).<br />
В случае установки на SoD не гарантируется нормальная работа кампаний RoE и AB.<br />
Также не гарантируется корректная работа Эры и русификатора на различных репаках.<br />
<br />
Если вы заметили какие-то косяки - обязательно кидайте репорты в эту тему.]]></description>
			<content:encoded><![CDATA[<div style="text-align: center;"><img src="https://c.radikal.ru/c36/2007/f5/8b0bdae278f5.png" border="0" alt="Image: 8b0bdae278f5.png" style='max-width: 800px; height: auto;' onclick='Bers.ScaleImg(this);'/></div>
<br />
Вашему вниманию предлагается русификатор для ERA III.<br />
<br />
Русификатор может быть установлен как на русскую, так и на английскую версию героев и полностью русифицирует игру.<br />
<br />
Текстовики я брал из предыдущего русификатора, всё остальное - из русского издания Complete.<br />
Upd: текстовые ресурсы в значительной степени переработаны, исправлено множество ошибок и неточностей.<br />
<br />
<span style="color: green;"><span style="font-weight: bold;">Upd</span></span>: Lite версия русификатора больше не поддерживается.<br />
<br />
<span style="color: #0000CD;"><span style="font-weight: bold;">Ссылки:</span></span><br />
<a href="https://yadi.sk/d/Z7H-sFwijsNWSw" target="_blank">WoG Rus Full.exe</a> (Яндекс-Диск, 18 МБ, дата последнего обновления 02.07.2022)<br />
<br />
Установка: распаковать в папку с игрой, соглашаясь на замену файлов.<br />
<br />
<span style="color: #0000CD;"><span style="font-weight: bold;">Дополнительно:</span></span><br />
<br />
Русифицированные карты из Полного собрания: <a href="https://disk.yandex.ru/d/K9yQasruXu_qJQ" target="_blank">maps.zip</a><br />
<br />
Совместимость: на данный момент совместим с актуальной версией Эры 3.9 (и выше, если ничего не сломается).<br />
<br />
<span style="text-decoration: underline;">Важно</span>: Рекомендуется ставить Эру и русификатор на Complete версию героев (от Буки или от GOG).<br />
В случае установки на SoD не гарантируется нормальная работа кампаний RoE и AB.<br />
Также не гарантируется корректная работа Эры и русификатора на различных репаках.<br />
<br />
Если вы заметили какие-то косяки - обязательно кидайте репорты в эту тему.]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[ERA III]]></title>
			<link>http://wforum.heroes35.net/showthread.php?tid=5624</link>
			<pubDate>Sun, 31 May 2020 23:53:06 +0000</pubDate>
			<guid isPermaLink="false">http://wforum.heroes35.net/showthread.php?tid=5624</guid>
			<description><![CDATA[<div style="text-align: center;"><span style="font-size: large;"><span style="color: #FF0000;"><span style="font-weight: bold;">ERA 3</span></span></span></div>
<br />
<div style="text-align: center;"><img src="https://i.ibb.co/kyxHFRW/era3-poster2.jpg" border="0" alt="Image: era3-poster2.jpg" style='max-width: 800px; height: auto;' onclick='Bers.ScaleImg(this);'/></div>
<br />
<img src="https://vk.com/emoji/e/e29aa1.png" border="0" alt="Image: e29aa1.png" style='max-width: 800px; height: auto;' onclick='Bers.ScaleImg(this);'/> <span style="color: #7e0e0e;"><span style="font-weight: bold;">Вышла новая мажорная версия HoMM 3 ERA</span></span><br />
Текущая версия: <span style="color: #FF0000;"><span style="font-weight: bold;">3.0.0</span></span> (альфа 0)<br />
<br />
<img src="https://vk.com/emoji/e/f09f9383.png" border="0" alt="Image: f09f9383.png" style='max-width: 800px; height: auto;' onclick='Bers.ScaleImg(this);'/> Что нового ?<br />
<br />
<img src="https://vk.com/emoji/e/e2ad90.png" border="0" alt="Image: e2ad90.png" style='max-width: 800px; height: auto;' onclick='Bers.ScaleImg(this);'/> Опциональный режим ERM 2.0: именованные константы, локальные переменные и функции на стадии прекомпиляции. На ЕРМ становится возможным писать понятный код с малым числом комментариев.<br />
<img src="https://vk.com/emoji/e/e2ad90.png" border="0" alt="Image: e2ad90.png" style='max-width: 800px; height: auto;' onclick='Bers.ScaleImg(this);'/> Переписан движок ЕРМ: множество исправлений наследия прошлого, универсальный синтаксис, удобная работа со строками, исправление багов, расширение и добавление команд и многое другое.<br />
<img src="https://vk.com/emoji/e/e2ad90.png" border="0" alt="Image: e2ad90.png" style='max-width: 800px; height: auto;' onclick='Bers.ScaleImg(this);'/> Добавлена стандартная библиотека ЭРЫ на ERM: 1 расширенное событие и тысячи предопределённых констант.<br />
<img src="https://vk.com/emoji/e/e2ad90.png" border="0" alt="Image: e2ad90.png" style='max-width: 800px; height: auto;' onclick='Bers.ScaleImg(this);'/> ЭРА становится полноценным ядром для мододелов всех мастей: больше нет навязанных модов, анимации, большинства графических изменений, нового интерфейса, заменённых кампаний и музыки и т.д. Установив ЭРУ вы получаете рабочий скелет со всеми инструментами для создания уникальной сборки под ваши вкусы и желания. Базовый комплект новых монстров/объектов из WoG 3.58 остаётся в качестве ресурсов и включаемых/выключаемых игровых механик.<br />
<br />
<img src="https://vk.com/emoji/e/e29884.png" border="0" alt="Image: e29884.png" style='max-width: 800px; height: auto;' onclick='Bers.ScaleImg(this);'/> Скачать: <a href="https://mods.hmm35.ru/Era%203.X.exe" target="_blank">https://mods.hmm35.ru/Era%203.X.exe</a><br />
<br />
История изменений на русском (автоперевод): <a href="https://mods.hmm35.ru/Era%20III%20changelog%20rus.txt" target="_blank">https://mods.hmm35.ru/Era%20III%20changelog%20rus.txt</a><br />
<div class="notranslate"><div class="spoiler_header">История изменений: <a href="javascript:void(0);" onclick="javascript:if(parentNode.parentNode.getElementsByTagName('div')[1&#93;.style.display=='block'){parentNode.parentNode.getElementsByTagName('div')[1&#93;.style.display='none';this.innerHTML='(Click to View)';}else {parentNode.parentNode.getElementsByTagName('div')[1&#93;.style.display='block';this.innerHTML='(Click to Hide)';}">(Click to View)</a></div><div class="spoiler_body" style="display: none; border: 1px dotted #0F5C8E;"><div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>Version 3.0.0 (06/2020)<br />
------------------------<br />
[+&#93; Introduced advanced ERM precompilation mode, called ERM 2.0 and activated via "ZVSE2" first line signature.<br />
&nbsp;&nbsp;Main features:<br />
&nbsp;&nbsp;&nbsp;&nbsp;- Named local variables to write human readable code instead of cryptic one.<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Example: !!HE-1:C0/0/?(monType:y)/?(monNum:y) instead of !!HE-1:C0/0/?y23/?y24;<br />
&nbsp;&nbsp;&nbsp;&nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp;- Global named constants instead of magic numbers to write self-explaining code:<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Example: !?FU(OnKeyPressed)&amp;x1=(KEY_1) instead of !?FU(OnKeyPressed)&amp;x1=49; what is 49???<br />
&nbsp;&nbsp;&nbsp;&nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp;- Strict distinguishing naming for functions, local variables and constants. No way to mix up.<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Example: thisIsVariable, THIS_IS_CONSTANT, ThisIsFunction and era_ThisIsFunctionAgain.<br />
<br />
&nbsp;&nbsp;==== Named global constants ====<br />
&nbsp;&nbsp;Constant is named value, that is defined once and never changes. Like 13 (Archangel monster type).<br />
&nbsp;&nbsp;Constant can be used anywere, where numbers can be used. Era currently supports only integer numeric<br />
&nbsp;&nbsp;constants, written in all capitals: (MON_ARCHANGEL), (OBJ_MINE), (PLAYER_RED).<br />
&nbsp;&nbsp;Allowed characters are: [A-Z0-9_&#93;.<br />
&nbsp;&nbsp;To define a constant use the following instruction !#DC(CONSTANT_NAME) = 777; where 777 is arbitrary number.<br />
&nbsp;&nbsp;Examples:<br />
&nbsp;&nbsp;!#DC(PLAYER_BLUE)&nbsp;&nbsp;&nbsp;&nbsp; = 1;<br />
&nbsp;&nbsp;!#DC(SKILL_FIRST_AID) = 27;<br />
<br />
&nbsp;&nbsp;To use a constant simply write its name in parentheses:<br />
&nbsp;&nbsp;!!OW:R(CURRENT_PLAYER)/(RES_GOLD)/d1000; give 1000 gold to current player<br />
<br />
&nbsp;&nbsp;will be compiled to<br />
<br />
&nbsp;&nbsp;!!OW:R-1/6/d1000; give 1000 gold to current player<br />
<br />
&nbsp;&nbsp;--- Naming ---<br />
&nbsp;&nbsp;Scripts writers must use unique prefix before constant names to prevent names collisions. Any constants without prefix<br />
&nbsp;&nbsp;may be added to ERA in the future and break your script.<br />
&nbsp;&nbsp;Example:<br />
&nbsp;&nbsp;; for mod Battle Heroes let's use prefix "BH_"<br />
&nbsp;&nbsp;!#DC(BH_ART_RING_OF_POWER) = 160;<br />
&nbsp;&nbsp;<br />
&nbsp;&nbsp;!#DC(BH_CLASS_WARRIOR) = 1;<br />
&nbsp;&nbsp;!#DC(BH_CLASS_MAGE)&nbsp;&nbsp;&nbsp;&nbsp;= 2;<br />
&nbsp;&nbsp;!#DC(BH_CLASS_RANGER)&nbsp;&nbsp;= 3;<br />
<br />
&nbsp;&nbsp;--- Globality ---<br />
&nbsp;&nbsp;Constants are global. It means, that one script can use constants of another script. To ensure, that your constants<br />
&nbsp;&nbsp;are always loaded before other scripts, place them in the script with high priority (ex. "1000 - phoenix consts.erm").<br />
&nbsp;&nbsp;<br />
&nbsp;&nbsp;--- Standard constants ---<br />
&nbsp;&nbsp;ERA provides file "1000 - era consts.erm" with many predefined constants, covering most values, mentioned in ERM help.<br />
&nbsp;&nbsp;Look through it before defining your own constant for secondary skill, monster or player color.<br />
<br />
<br />
&nbsp;&nbsp;==== Named local variables ====<br />
&nbsp;&nbsp;Each ERM trigger (!?XX before next !?XX) can now declare and use own named local variables, allocated from<br />
&nbsp;&nbsp;x1..x16, y1..y100, z-1..z-10, e1..e100 sets.<br />
&nbsp;&nbsp;Named variables are replaced with regular variables during scripts compilation and do not influence the performance at all.<br />
&nbsp;&nbsp;Example: (day) may be compiled to y5;<br />
<br />
&nbsp;&nbsp;--- Naming ---<br />
&nbsp;&nbsp;Names of variables must be in so called "camelCase" and contain only [a-zA-Z0-9&#93; characters. They must be wrapped<br />
&nbsp;&nbsp;in parantheses the same way, as function names are wrapped.<br />
&nbsp;&nbsp;Example of valid variables: (hero), (monNum), (isAutocombatMode), (specialObject7).<br />
<br />
&nbsp;&nbsp;--- Declaration ---<br />
&nbsp;&nbsp;Variables must be declared on the first usage: i.e their type (x, y, z, e, v) and array length (for arrays) must be specified.<br />
&nbsp;&nbsp;If you write '[some number&#93;' after variable name, variable will become an array (sequence of variables) with specified length.<br />
&nbsp;&nbsp;If you write ':e' after variable name or array length, it will mean, that variable type is "e" (floating point numbers).<br />
<br />
&nbsp;&nbsp;Examples:<br />
&nbsp;&nbsp;!!HE-1:N?(hero:y); give some y-variable name "hero" and write current hero ID to it<br />
&nbsp;&nbsp;!#VA(arts[4&#93;:y);&nbsp;&nbsp; allocate 4 y-variables with sequential indexes and name the array "arts"<br />
<br />
&nbsp;&nbsp;!#VA instruction is pseudo-command, that is dropped from final compiled code and that can be used to hold variables declarations.<br />
&nbsp;&nbsp;Example:<br />
&nbsp;&nbsp;!?FU(acm_Sum);<br />
&nbsp;&nbsp;; The function calculates sum of two numbers<br />
&nbsp;&nbsp;!#VA(first:x) (second:x) (result:x); [bind "first" to x1, "second" to x2, "result" to x3&#93;<br />
&nbsp;&nbsp;!!VR(result):S(first) +(second);&nbsp;&nbsp;&nbsp;&nbsp; [calculate result&#93;<br />
<br />
&nbsp;&nbsp;--- Usage ---<br />
&nbsp;&nbsp;It's allowed to specify the same type and array length for variables in every variable usage place, but it's not necessary.<br />
&nbsp;&nbsp;After you declared variable, there is no more any need to write its type/length.<br />
&nbsp;&nbsp;Example:<br />
&nbsp;&nbsp;!!HE-1:N?(hero:y);<br />
&nbsp;&nbsp;!!HE(hero):K1; kill hero with ID in (hero) variable.<br />
<br />
&nbsp;&nbsp;will be compiled to something like that:<br />
&nbsp;&nbsp;!!HE-1:N?y5;<br />
&nbsp;&nbsp;!!HEy5:K1;<br />
<br />
&nbsp;&nbsp;--- Arrays ---<br />
&nbsp;&nbsp;If you need not a single variable, but sequence of variables, for instance to hold [x, y, l&#93; coordinates of objects,<br />
&nbsp;&nbsp;then you need an array. Specify array length in square brackets right after variable name during declaration.<br />
&nbsp;&nbsp;!#VA(coords[3&#93;:y); allocate 3 y-variables named 'coords'<br />
<br />
&nbsp;&nbsp;Items or elements of arrays are zero-indexed and can be accessed by direct index.<br />
&nbsp;&nbsp;For 3-items array possible indexes are 0, 1, 2.<br />
&nbsp;&nbsp;Example:<br />
&nbsp;&nbsp;!!CM:P?(coords[0&#93;)/?(coords[1&#93;)/?(coords[2&#93;);<br />
<br />
&nbsp;&nbsp;will be compiled to something like that:<br />
&nbsp;&nbsp;!!CM:P?y50/?y51/?y52;<br />
<br />
&nbsp;&nbsp;If you don't specify array index, the first array element will be used. It means that<br />
&nbsp;&nbsp;(test) and (test[0&#93;) have the same sense. Regular variables are considered arrays of length 1.<br />
<br />
&nbsp;&nbsp;--- Negative array indexes ---<br />
&nbsp;&nbsp;Negative array index means n-th item from the end. -1 will point to the last item, -2 to the one before the last one and so on.<br />
&nbsp;&nbsp;Example:<br />
&nbsp;&nbsp;; allocate array of 10 y-variables and assign the last one value 2000<br />
&nbsp;&nbsp;!#VA(array[10&#93;:y);<br />
&nbsp;&nbsp;!!VR(array[-1&#93;):S2000;<br />
<br />
&nbsp;&nbsp;will be compiled to something like that:<br />
&nbsp;&nbsp;; allocate y1..y10<br />
&nbsp;&nbsp;!!VRy10:S2000;<br />
<br />
&nbsp;&nbsp;--- Releasing local variables ---<br />
&nbsp;&nbsp;If you don't need large variable array anymore, but want to declare another big array, then free the previous one.<br />
&nbsp;&nbsp;Syntax: !#VA(-variableName); will forget about specified variableName, allowing to reuse indexes, allocated for that variable.<br />
<br />
&nbsp;&nbsp;Example:<br />
&nbsp;&nbsp;!#VA(myArts[100&#93;:y); allocate y1..y100 to hold artifact IDs<br />
&nbsp;&nbsp;...;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; use them<br />
&nbsp;&nbsp;!#VA(-myArts);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; release 'myArts' name and y1..y100 indexes.<br />
&nbsp;&nbsp;!#VA(coords[3&#93;:y);&nbsp;&nbsp; allocate y1..y3 as 'coords' variable<br />
<br />
&nbsp;&nbsp;--- Getting variable address (real index) ---<br />
&nbsp;&nbsp;It's often necessary to get real index of variable or even array element. When you want to output "2" instead of<br />
&nbsp;&nbsp;y2, use address operator '@'.<br />
&nbsp;&nbsp;<br />
&nbsp;&nbsp;Example:<br />
&nbsp;&nbsp;; Initialize array with 3 artifacts<br />
&nbsp;&nbsp;!#VA(arts[3&#93;:y);<br />
&nbsp;&nbsp;!!VR(arts):C(ART_SKULL_HELMET)/(ART_HELM_OF_CHAOS)/(ART_DEAD_MANS_BOOTS);<br />
<br />
&nbsp;&nbsp;; Select one artifact randomly<br />
&nbsp;&nbsp;; same as R0/0/2, generates random number in 0..2 range and assigns it to artPtr variable.<br />
&nbsp;&nbsp;!!VR(artPtr:y):R0/(@arts)/(@arts[-1&#93;);<br />
&nbsp;&nbsp;<br />
&nbsp;&nbsp;; Give artifact to hero<br />
&nbsp;&nbsp;!!HE-1:Ay(artPtr);<br />
<br />
&nbsp;&nbsp;will be compiled to something like that:<br />
&nbsp;&nbsp;<br />
&nbsp;&nbsp;!!VRy1:C20/21/56;<br />
&nbsp;&nbsp;!!VRy4:R0/0/2;<br />
&nbsp;&nbsp;!!HE-1:Ayy4;<br />
<br />
&nbsp;&nbsp;Address operator "@" compiles to real (final) variable index. For instance, for array "test[10&#93;:y" mapped to y50..y59<br />
&nbsp;&nbsp;(@test[1&#93;) will compile to "51".<br />
<br />
&nbsp;&nbsp;Example of declaring array of 10 y-variables and initializing all of them with -1.<br />
&nbsp;&nbsp;!#VA(monTypes[10&#93;:y);<br />
<br />
&nbsp;&nbsp;!!re i/(@monTypes)/(@monTypes[-1&#93;):; repeat from i = first array index to i = last array index<br />
&nbsp;&nbsp;&nbsp;&nbsp;!!VRyi:S-1; set -1 for current array item<br />
&nbsp;&nbsp;!!en:;<br />
<br />
&nbsp;&nbsp;In other programming languages variables, holding other variables addresses/indexes are usually called "pointers"<br />
&nbsp;&nbsp;and abbreviated as "ptr" or "Ptr". We will rewrite the previous example with named variable in place of quick "i" var<br />
&nbsp;&nbsp;just for learning purposes.<br />
<br />
&nbsp;&nbsp;!!re (monTypePtr:y)/(@monTypes)/(@monTypes[-1&#93;):; repeat from (monTypePtr) = first array index to (monTypePtr) = last array index<br />
&nbsp;&nbsp;&nbsp;&nbsp;!!VRy(monTypePtr):S-1; set -1 for current array item<br />
&nbsp;&nbsp;!!en:;<br />
<br />
&nbsp;&nbsp;--- Naming function arguments ---<br />
&nbsp;&nbsp;Indexes for named local variables are allocated starting from the smallest possible value.<br />
&nbsp;&nbsp;It means, that we can name even function arguments if we declare them in the same order, as arguments will be passed.<br />
&nbsp;&nbsp;Example:<br />
<br />
&nbsp;&nbsp;!?FU(BH_GetHeroSecSkill);<br />
&nbsp;&nbsp;!#VA(hero:x) (skill:x) (result:x); now hero = x1, skill = x2, result = x3<br />
&nbsp;&nbsp;!!HE(hero):S(skill)/?(result);<br />
<br />
&nbsp;&nbsp;!?FU(...); some event<br />
&nbsp;&nbsp;!!FU(BH_GetHeroSecSkill)/(HERO_XERON)/(SKILL_FIRST_AID)/?(xeronFirstAidLevel:y); so what's the level of First Aid skill Xeron has? )<br />
<br />
&nbsp;&nbsp;--- Redeclaration ---<br />
&nbsp;&nbsp;If you need to declare variable in both branches of if-then block, specify type/length in both of them.<br />
<br />
&nbsp;&nbsp;!!if&amp;(day)&gt;90:;<br />
&nbsp;&nbsp;&nbsp;&nbsp;!!VR(price:y):S(day) *100;<br />
&nbsp;&nbsp;&nbsp;&nbsp;...<br />
&nbsp;&nbsp;!!el:;<br />
&nbsp;&nbsp;&nbsp;&nbsp;!!VR(price:y):S(day) *(difficultyLevel) +300;<br />
&nbsp;&nbsp;&nbsp;&nbsp;...<br />
&nbsp;&nbsp;!!en:; <br />
<br />
&nbsp;&nbsp;--- Reusing same name in other trigger ---<br />
&nbsp;&nbsp;Variable names are local to nearest trigger only. New trigger starts with no declared variables.<br />
&nbsp;&nbsp;Example:<br />
<br />
&nbsp;&nbsp;!?FU(OnHeroScreenMouseClick);<br />
&nbsp;&nbsp;!!CM:F?(flags:y); flags = y1<br />
<br />
&nbsp;&nbsp;!?FU(OnHeroScreenMouseClick);<br />
&nbsp;&nbsp;!#VA(flags[23&#93;:e); flags is array, binded to e1..e23<br />
<br />
&nbsp;&nbsp;--- Interpolation ---<br />
&nbsp;&nbsp;To substitute local variables in string literals use %(varName) syntax. Example:<br />
&nbsp;&nbsp;!!VR(price:y):S600;<br />
&nbsp;&nbsp;!!VR(heroName:z):S^Robin Hood^;<br />
&nbsp;&nbsp;!!IF:Q2/^Would you like to hire %(heroName) for %(price) gold only?^;<br />
<br />
&nbsp;&nbsp;%y(varName) syntax is also supported and compiles to something like %yy5.<br />
<br />
<br />
&nbsp;&nbsp;==== Named functions ====<br />
&nbsp;&nbsp;Function names must consist of [A-Za-z0-9_&#93; characters only, start with letter and contain at least<br />
&nbsp;&nbsp;single lower case letter (a-z).<br />
&nbsp;&nbsp;There are two allowed naming methods:<br />
&nbsp;&nbsp;1) Start function with capital letter. (CalcHeroArmyPower), (ShowUpgradeDialog).<br />
&nbsp;&nbsp;ERA reserves right to declare prefixless functions, starting with "On" for events. This method is not<br />
&nbsp;&nbsp;recommended, due to possible names collisions in different mods. Two mods may declare functions<br />
&nbsp;&nbsp;will the same names and thus produce hard to debug bugs.<br />
<br />
&nbsp;&nbsp;2) Start function with any case unique prefix with '_' character. Prefix is usually mod abbreviation.<br />
&nbsp;&nbsp;For instance, for "Dwellings Extended" mod the following functions are used:<br />
&nbsp;&nbsp;!?FU(dex_SetDwellingSlotByTownType);<br />
&nbsp;&nbsp;!?FU(dex_DwellingPopulation);<br />
&nbsp;&nbsp;...<br />
<br />
&nbsp;&nbsp;--- Generating new events ---<br />
&nbsp;&nbsp;You can call function, even if it has no handlers. For instance, in Upgrade All Creatures mod you<br />
&nbsp;&nbsp;want to allow other scripts to be able to notify, what monster can be upgraded to in particular town.<br />
&nbsp;&nbsp;Just call not existing function like !!FU(auc_OnDetermineMonsterUpgrade):P... in your script with all<br />
&nbsp;&nbsp;necessary parameters and other scripts will be able to write new event handlers like:<br />
<br />
&nbsp;&nbsp;!?FU(auc_OnDetermineMonsterUpgrade);<br />
&nbsp;&nbsp;...<br />
<br />
&nbsp;&nbsp;--- Passing function as handlers or callbacks ---<br />
&nbsp;&nbsp;You can use function as ordinary constant, compiled to number. You can assign it to variable or pass to<br />
&nbsp;&nbsp;another function.<br />
&nbsp;&nbsp;!!VR(spellHandler:y):S(newmagic_DesintegrationSpellHandler);<br />
&nbsp;&nbsp;!!FU(spellHandler):P;<br />
<br />
&nbsp;&nbsp;will compile to something like that<br />
<br />
&nbsp;&nbsp;!!VRy20:S95003;<br />
&nbsp;&nbsp;!!FUy20:P;<br />
<br />
[+&#93; Added 1000 era - stdlib.erm script, which will contain safe for all extra ERM functionality.<br />
&nbsp;&nbsp;&nbsp;&nbsp;Currently !?FU(OnEvenyDay) event is enhanced. Its handlers will receive 5 parameters:<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;!?FU(OnEveryDay);<br />
&nbsp;&nbsp;&nbsp;&nbsp;!#VA(day:x1) (weekDay:x) (once:x) (owner:x) (isAi:x);<br />
&nbsp;&nbsp;&nbsp;&nbsp;!!IF:M^%(day) %(weekDay) %(once) %(owner) %(isAi)^;<br />
<br />
[+&#93; Added 1000 era - consts.erm script with lots of constants to be used in ERM 2.0 scripts.<br />
&nbsp;&nbsp;&nbsp;&nbsp;ERM Editor, based on Sublime Text, supports constants autocompletion.<br />
&nbsp;&nbsp;&nbsp;&nbsp;Remember, that constants without mod name prefix are reserved for ERA.<br />
&nbsp;&nbsp;&nbsp;&nbsp;Prefer BH_GOLD_PER_VICTORY to GOLD_PER_VICTORY for Battle Heroes mod, for instance.<br />
<br />
[+&#93; Floating point variables (e-variables) are passed to ERM commands as raw 4 bytes value,<br />
&nbsp;&nbsp;&nbsp;&nbsp;treated by most commands as integer, which may cause many bugs, unless you know, what you are doing.<br />
&nbsp;&nbsp;&nbsp;&nbsp;The exception is !!VR:S command, allowing transparent conversion integer-float. To copy float value,<br />
&nbsp;&nbsp;&nbsp;&nbsp;stored in raw format in integer variable to e-variable and vice versa use !!VR:C command. It acts same<br />
&nbsp;&nbsp;&nbsp;&nbsp;as VR:S, but without data conversion.<br />
<br />
[+&#93; New command !!VR&#36;1:S#2/#3. Convert float to integer using specific rounding mode.<br />
&nbsp;&nbsp;&nbsp;&nbsp;&#36;1 - integer variable.<br />
&nbsp;&nbsp;&nbsp;&nbsp;#2 - float variable<br />
&nbsp;&nbsp;&nbsp;&nbsp;#3 - rounding mode:<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt; 0 for floor operation (round towards negative infinity),<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0 for normal round (round half away from zero),<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&gt; 0 for ceil operation (round towards positive infinity).<br />
<br />
[+&#93; !!VR: +/-/*/:/% convert both arguments to float if any is float before calculation and convert back<br />
&nbsp;&nbsp;&nbsp;&nbsp;to base var type on return.<br />
&nbsp;&nbsp;&nbsp;&nbsp;Thus<br />
&nbsp;&nbsp;&nbsp;&nbsp;!!VR(koef:e):S25 :10; koef = 2.5<br />
&nbsp;&nbsp;&nbsp;&nbsp;!!VR(gold:y):S2 *koef; gold = 5, not 4<br />
<br />
[+&#93; New command !!VR&#36;1:~#2<br />
&nbsp;&nbsp;&nbsp;&nbsp;Unsets bits #2 in &#36;1 integer variable.<br />
&nbsp;&nbsp;&nbsp;&nbsp;Example:<br />
&nbsp;&nbsp;&nbsp;&nbsp;!!VR(flags):~17; unset bits/flags 1 + 16 from (flags) variable.<br />
&nbsp;&nbsp; <br />
[+&#93; New command !!VR&#36;1:Z#2. Creates trigger local temporary z-variable with given contents and assigns its index to integer variable.<br />
&nbsp;&nbsp;&nbsp;&nbsp;&#36;1 - integer variable.<br />
&nbsp;&nbsp;&nbsp;&nbsp;#2 - any string.<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;The command can be used to create temporal z-variables to change, for example, artifact description,<br />
&nbsp;&nbsp;&nbsp;&nbsp;show message and restore description.<br />
<br />
[+&#93; ^....^ literal in any ERM command is interpolated and replaced by temporal z-variable index before receiver<br />
&nbsp;&nbsp;&nbsp;&nbsp;execution. This z-variable is released right after receiver is executed.<br />
&nbsp;&nbsp;&nbsp;&nbsp;Don't use string literals in WoG 3.58 hint/description setting commands, because such descriptions have short life time.<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;From now it's possible to pass strings to functions.<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;!?FU(ES_Ask);<br />
&nbsp;&nbsp;&nbsp;&nbsp;; Shows question dialog with caption. Returns boolean (1 on success and 0 on failure).<br />
&nbsp;&nbsp;&nbsp;&nbsp;!#VA(captionPtr:x) (questionPtr:x) (result:x);<br />
&nbsp;&nbsp;&nbsp;&nbsp;!!IF:Q1/^{%z(captionPtr)}<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;%z(questionPtr)^;<br />
&nbsp;&nbsp;&nbsp;&nbsp;!!VR(result):S0;<br />
&nbsp;&nbsp;&nbsp;&nbsp;!!VR(result)&amp;1:S1;<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;!?OB(OBJ_TOWN)/(ANY_OBJ);<br />
&nbsp;&nbsp;&nbsp;&nbsp;!!FU(ES_Ask):P^Sphinx asks you:^/^Do you really want to die, fighting my guards?^/?(answer:y);<br />
&nbsp;&nbsp;&nbsp;&nbsp;!!HE(CURRENT_HERO)&amp;(answer)=1:K1; let him die )))<br />
<br />
[+&#93; Only regular ERT variables are interpolated automatically.<br />
&nbsp;&nbsp;&nbsp;&nbsp;Regular z-variables and temporal ert variables are not interpolated in receivers.<br />
&nbsp;&nbsp;&nbsp;&nbsp;It means, that !!VRz2:S^%%y5^; z2 is now really "%y5"<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;Previously interpolation would be performed again and again recursively, converting %y5 into y5 value like 0.<br />
&nbsp;&nbsp;&nbsp;&nbsp;and even later using z2 in any command would run interpolation again.<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;!!IF:M1/z2; will display "%y5", not y5 value.<br />
<br />
[+&#93; New VR&#36;1:R/T syntax: 0/min/max - generates random value in given range and assignes it to &#36;1 integer variable.<br />
[+&#93; VR:R/T now both support syntaxes with 1/2/3 arguments.<br />
[+&#93; VR:T uses Mersenne Twister qualitive generator, but it's not synchronized in multiplayer.<br />
[+&#93; VR:M1. -1 as length means "till string end".<br />
<br />
[+&#93; VR:M2 does not store token index in global variable anymore. Token index, that was ignored earlier, works now as expected.<br />
&nbsp;&nbsp; Token delimiters are [#1..#31, ' ', ',', '.'&#93;. Don't use for huge text, because performance is O(n^2), where n is tokens number.<br />
<br />
[+&#93; VR:M3 Base/radix is enforced to be in 2..16 range.<br />
<br />
[+&#93; ERM interpolation (expanding variables starting with % in string literals ^...^ and ERT strings) was fully rewritten.<br />
&nbsp;&nbsp;&nbsp;&nbsp;Upper case registry for old ERM variables is supported, but deprecated.<br />
&nbsp;&nbsp;&nbsp;&nbsp;%X1 is good, but %x1 is better.<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;All new s^...^, i^...^ and named local variables are supported.<br />
&nbsp;&nbsp;&nbsp;&nbsp;Indirect references is supported.<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;%s(named global variable)<br />
&nbsp;&nbsp;&nbsp;&nbsp;%i(named global variable)<br />
&nbsp;&nbsp;&nbsp;&nbsp;%xy7<br />
&nbsp;&nbsp;&nbsp;&nbsp;%zi^named global variable^<br />
&nbsp;&nbsp;&nbsp;&nbsp;%z(namedLocalVar)<br />
&nbsp;&nbsp;&nbsp;&nbsp;%(namedLocalVar)<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;Quick vars are supported:<br />
&nbsp;&nbsp;&nbsp;&nbsp;%i %g %k<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;Interpolation of %Vf...t meaning is changed to real v-indexing<br />
&nbsp;&nbsp;&nbsp;&nbsp;%vi means v-var with i-index.<br />
&nbsp;&nbsp;&nbsp;&nbsp;%f means quick 'f' var.<br />
&nbsp;&nbsp;&nbsp;&nbsp;%i means quick 'i' var.<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;%F5 means flag 5<br />
&nbsp;&nbsp;&nbsp;&nbsp;%Fx16 means flag with x16 index<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;Function IDs and constants can be interpolated in the same way, as named local variables:<br />
&nbsp;&nbsp;&nbsp;&nbsp;%(CONST_NAME), %(era_FuncName), %(money), %y(moneyPtr)<br />
<br />
[+&#93; IF:M# now works with any string<br />
[+&#93; IF:N1/# now works with any string, not z1 only.<br />
[+&#93; IF:N# now works with any string.<br />
[+&#93; BA:B now can work with any string and integer.<br />
<br />
[+&#93; Call SN:F^GenerateDebugInfo^ to generate Debug directory contents, the same way as F11 does.<br />
<br />
[+&#93; Exported "NameTrigger" function (void NameTrigger(int TriggerId, const char* Name)), allowing plugins to<br />
&nbsp;&nbsp;&nbsp;&nbsp;give name to any ERM trigger, which can be used in ERM like !?FU(OnYourNewEvent).<br />
<br />
[+&#93; Updated "wog native dialogs" plugin by igrik. From now it's possible to select item in message dialogs<br />
&nbsp;&nbsp;&nbsp;&nbsp;using mouse double click.<br />
<br />
[+&#93; s^...^, ^...^, i^...^ can now be freely used in conditions.<br />
<br />
[+&#93; New d-modifiers (d~, d%, d|, d&amp;, d&lt;&lt;, d&gt;&gt;) work with all receivers.<br />
<br />
[+&#93; Rewritten ert-strings storage implementation. Removed limit on 50000 strings. Increased add/delete operations<br />
&nbsp;&nbsp;&nbsp;&nbsp;performance (from linear search to binary tree search). Savegames format was changed.<br />
<br />
[+&#93; Added VR:C alternative for SN:M arrays. New command !!SN:U#1/#2/&#36;3...up to &#36;21 allows to set/check/get/modify<br />
&nbsp;&nbsp;&nbsp;&nbsp;many items of dynamical array.<br />
&nbsp;&nbsp;&nbsp;&nbsp;#1 - SN:M array ID.<br />
&nbsp;&nbsp;&nbsp;&nbsp;#2 - starting index<br />
&nbsp;&nbsp;&nbsp;&nbsp;&#36;3... - items at starting index, starting index + 1, starting index + 2, etc.<br />
<br />
[+&#93; Added new command !!VR:R0/#min/#max, generating random value in specified range and assigning its to variable.<br />
&nbsp;&nbsp;&nbsp;&nbsp;Example: !!VRy1:R0/100/300; set y1 to random value in 100..300 range<br />
<br />
[*&#93; The following exported functions now return 4-bytes LONGBOOL value, 0 for false, -1 (0xFFFFFFFF) for true.<br />
&nbsp;&nbsp;&nbsp;&nbsp;"ReadStrFromIni", "WriteStrToIni", "SaveIni", "PatchExists", "PluginExists", "Ask".<br />
<br />
[+&#93; Added "1000 - era consts.erm" script to WoG mod with standard Era constants, including players,<br />
&nbsp;&nbsp;&nbsp;&nbsp;player bits, heroes, resources, objects, monsters, artifacts, spells. The file contents may be corrected<br />
&nbsp;&nbsp;&nbsp;&nbsp;and widened in the future. All constants were registered in Erm Editor, based on Sublime Text.<br />
<br />
[+&#93; Added "1000 - era stdlib.erm" script with universal ERM functions and events. Currently "OnEveryDay"<br />
&nbsp;&nbsp;&nbsp;&nbsp;event is enhanced with the following x-arguments: day, week day, once(0..1), owner (color), isAi (0..1).<br />
<br />
[*&#93; Fixed WoG bug with tactics detection on the very first round. Do not use BU:R in !?BR or !?FU(OnCombatRound) for zero round,<br />
&nbsp;&nbsp;&nbsp;&nbsp;because a few structures are not initialized at this moment and random crash may occur. First round code was moved after<br />
&nbsp;&nbsp;&nbsp;&nbsp;combat theme initialization and tactics popup message appearance.<br />
<br />
[+&#93; All *.ers files are loaded without name/quantity constraints. Previously only script00.ers..script99.ers were processed.<br />
<br />
[+&#93; HE:P command behavior was fixed. Teleport function with sound is called only if any coordinate<br />
&nbsp;&nbsp;&nbsp;&nbsp;was really changed. Advanced d-modifiers are supported for the first three parameters.<br />
<br />
[+&#93; HE:C0 command was rewritten.<br />
&nbsp;&nbsp;&nbsp;&nbsp;-1 and -2 values for creature type are not treated as "upgrade"/"degrade" anymore. Command supports any d-modifiers now.<br />
&nbsp;&nbsp;&nbsp;&nbsp;Exp. modifier parameter is now SET-only. Previosly !!HE:C0/0/?y1/?y2/d5000/2 would not increase slot experience.<br />
&nbsp;&nbsp;&nbsp;&nbsp;In fact, any GET syntax used to make ERM engine ignore stack experience at all. This bug was fixed.<br />
&nbsp;&nbsp;&nbsp;&nbsp;Creature Type &lt; 0 or Number &lt;= 0 will be normalized to Type -1, Number 0 automatically.<br />
&nbsp;&nbsp;&nbsp;&nbsp;Note, that in all cases the returned stack experience value is the one before applying any changes.<br />
<br />
[+&#93; Rewritten HE:X command to accept any number of parameters and understand any d-modifiers.<br />
&nbsp;&nbsp;&nbsp;&nbsp;Example: !!HE-1:X0/27 Xd1; become master of gold dragons<br />
<br />
[+&#93; Introduces many new d-modifiers for all ERM commands, except for GE:E/N, LE:E/N.<br />
&nbsp;&nbsp;&nbsp;&nbsp;d+# - integer addition<br />
&nbsp;&nbsp;&nbsp;&nbsp;d-# - integer substraction<br />
&nbsp;&nbsp;&nbsp;&nbsp;d*# - integer multiplication<br />
&nbsp;&nbsp;&nbsp;&nbsp;d:# - integer division<br />
&nbsp;&nbsp;&nbsp;&nbsp;d|# sets bits from # (bitwise OR operation)<br />
&nbsp;&nbsp;&nbsp;&nbsp;d&amp; leaves only # bits, if any (bitwise AND operation)<br />
&nbsp;&nbsp;&nbsp;&nbsp;d~ unsets bits, specified in #. d~17 unsets bits 1 and 16<br />
&nbsp;&nbsp;&nbsp;&nbsp;d%# calculates division modulo. 10%4 = 2, for instance.<br />
&nbsp;&nbsp;&nbsp;&nbsp;d&lt;&lt;# shifts original value bits to the left by # positions (bitwise logical shift left).<br />
&nbsp;&nbsp;&nbsp;&nbsp;d&gt;&gt;# shifts original value bits to the right by # positions (bitwise logical shift right.<br />
<br />
[+&#93; Function parameters (FU:P, DO:P), which were passed using GET-syntax, are now initialized with<br />
&nbsp;&nbsp;&nbsp;&nbsp;original variable value. The behavior is similar to pass-by-reference in other programming languages.<br />
&nbsp;&nbsp;&nbsp;&nbsp;Example:<br />
&nbsp;&nbsp;&nbsp;&nbsp;!?FU(Add3):;<br />
&nbsp;&nbsp;&nbsp;&nbsp;; (value:x)<br />
&nbsp;&nbsp;&nbsp;&nbsp;!!VR(value:x):+3;<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;!?CM0;<br />
&nbsp;&nbsp;&nbsp;&nbsp;!!VR(numHeads:y):S10;<br />
&nbsp;&nbsp;&nbsp;&nbsp;!!FU(Add3):P?(numHeads:y); 10 is passed to function as the first argument, 13 is result<br />
<br />
[+&#93; Enhanced !!RD:I with new named parameters syntax.<br />
&nbsp;&nbsp;&nbsp;&nbsp;!!RD:I^parameter name^/?&#36;parameter_value;<br />
&nbsp;&nbsp;&nbsp;&nbsp;============================== Featured parameters: ==============================<br />
&nbsp;&nbsp;&nbsp;&nbsp;^dlgId^&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- Unique recruit dialog ID. Used to distinguish between nested dialogs (yep, it's possible). Reusable.<br />
&nbsp;&nbsp;&nbsp;&nbsp;^townId^&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; - ID of town, for which dialog is opened or -1.<br />
&nbsp;&nbsp;&nbsp;&nbsp;^dwellingId^&nbsp;&nbsp; - ID of town dwelling, for which dialog is opened or -1. 0..6 non upgraded, 7..13 for upgraded.<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Horde buildings (+X population) are treated as dwellings, they influence.<br />
&nbsp;&nbsp;&nbsp;&nbsp;^slot^&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; - Active logical slot index.<br />
&nbsp;&nbsp;&nbsp;&nbsp;^cost^&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; - Cost of single monster in current slot in gold.<br />
&nbsp;&nbsp;&nbsp;&nbsp;^resource^&nbsp;&nbsp;&nbsp;&nbsp; - Special resource for monster in current slot.<br />
&nbsp;&nbsp;&nbsp;&nbsp;^resourceCost^ - Cost of single monster in current slot in special resource.<br />
&nbsp;&nbsp;&nbsp;&nbsp;^quantity^&nbsp;&nbsp;&nbsp;&nbsp; - Number of monsters, currently selected for recruitment.<br />
&nbsp;&nbsp;&nbsp;&nbsp;^maxQuantity^&nbsp;&nbsp;- Maximal number of monsters, the player can afford.<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;Example:<br />
&nbsp;&nbsp;&nbsp;&nbsp;!?FU(OnRecruitDlgMouseClick);<br />
&nbsp;&nbsp;&nbsp;&nbsp;!!RD:I^dlgId^/?(dlgId:y) I^townId^/?(townId:y) I^dwellingId^/?(dwellingId:y) I^slot^/?(slot:y) I^cost^/?(cost:y);<br />
&nbsp;&nbsp;&nbsp;&nbsp;!!RD:I^resource^/?(resource:y) I^resourceCost^/?(resourceCost:y) I^quantity^/?(quantity:y) I^maxQuantity^/?(maxQuantity:y);<br />
&nbsp;&nbsp;&nbsp;&nbsp;!!IF:M^(dlgId:y) (townId:y) (dwellingId:y) (slot:y) (cost:y) (resource:y) (resourceCost:y) (quantity:y) (maxQuantity:y)^;<br />
<br />
[+&#93; Enhanced !!UN:C command. It supports all d-modifiers now. New syntax with offset from address is available:<br />
&nbsp;&nbsp;&nbsp;&nbsp;!!UN:C#addr/#offset/#size/&#36;value;<br />
&nbsp;&nbsp;&nbsp;&nbsp;Era always calls GetRealAddr for #addr, thus !!UN:C supports all extended/relocated game structures.<br />
<br />
[+&#93; WoG interface and WoG campaigns were extracted to appropriate standalone mods. ERA is now mostly Vanilla game with<br />
&nbsp;&nbsp;&nbsp;&nbsp;enhanced ERM engine and other modding capabilities.<br />
<br />
[+&#93; Added !!BM:Z?&#36;addr command to get battle stack structure address.<br />
[+&#93; Added !!HE:Z?&#36;addr command to get hero structure address.<br />
[+&#93; Introduced ERM 2.0 support for scripts, beginning with 'ZVSE2'.<br />
[+&#93; Doubled stack size for h3era.exe executable to allow trigger depth level up to 150, but better avoid such depth.<br />
<br />
[+&#93; WoG Campaign editor loads resources from hmm35wog.pac and uses virtual file system. No more Campaign Fix required.<br />
[+&#93; Added extended resources redirection support with wav/bik/smk files, including missing resources redirection.<br />
<br />
[+&#93; Added new plugins events "OnAfterLoadLods", occured right after lods/pacs are loaded and "OnAfterLoadMedia", occured<br />
&nbsp;&nbsp;&nbsp;&nbsp;when lod/pacs/snd/vids are loaded.<br />
<br />
[*&#93; ERA is recommended to be installed over Heroes 3 Complete only. Removed resources, which are already present in Complete lods.<br />
<br />
[-&#93; Restored functionality of Data&#92;Redirections&#92;Missing&#92;*.json files, which are used to setup redirections<br />
&nbsp;&nbsp;&nbsp;&nbsp;for missing resources only.<br />
<br />
[+&#93; ERM quick vars (f..t) are now local to triggers. Use them safely.<br />
<br />
[+&#93; Update ERM Editor.<br />
[+&#93; Rewritten core of ERM engine. Greatly improved old macro support (&#36;macronam&#36;). Just for perfection.<br />
<br />
[+&#93; Extracted WoG campaigns into standalone mod, which was removed from Era installer package.<br />
<br />
[+&#93; "remove exe protection.bin" was applied to h3era.exe and removed as patch.<br />
<br />
[+&#93; Many resources and features were extracted from WoG mod into separate mods: Animated Object Flags, Animated Trees,<br />
&nbsp;&nbsp;&nbsp;&nbsp;No Prebattle Music, Secondary Skills Scrolling, Quick Savings, Fast Battle Animation, Improved Battle Decorations,<br />
&nbsp;&nbsp;&nbsp;&nbsp;WoG Interface, WoG Campaigns, Yona.<br />
<br />
[+&#93; Added new event "OnDetermineMonInfoDlgUpgrade", occured, when game determines wether to show upgrade button<br />
&nbsp;&nbsp;&nbsp;&nbsp;in monster info dialog. Parameters: MonType, UpgradedType or -1, Town ID or -1, Hero ID or -1.<br />
&nbsp;&nbsp;&nbsp;&nbsp;-1 for UpgradedType means no upgrade button (because of wrong town type or appropriate building being not built, or monster having no upgrade).<br />
&nbsp;&nbsp;&nbsp;&nbsp;You can change this value to allow universal Jelu-like behavior or any upgrade system.<br />
&nbsp;&nbsp;&nbsp;&nbsp;Example:<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;ZVSE2<br />
&nbsp;&nbsp;&nbsp;&nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp;!?FU(OnDetermineMonInfoDlgUpgrade);<br />
&nbsp;&nbsp;&nbsp;&nbsp;!#VA(monType:x) (upgType:x) (town:x) (hero:x);<br />
&nbsp;&nbsp;&nbsp;&nbsp;!!VR(upgType):S(MON_GOLD_DRAGON); allow upgrade anything into Gold Dragons<br />
<br />
[+&#93; SN/RD/MP receivers now support indexed parameters like vy6 or zi^myIndex^.<br />
<br />
[+&#93; SN:D may be used now in battle, being equal to BU:R.<br />
<br />
[+&#93; Added support for trigger local dynamical arrays. !!SN:M-1/#/#/-1 will allocate new dynamical array<br />
&nbsp;&nbsp;&nbsp;&nbsp;with ID, that will be automatically released after current trigger is exited. Thus no<br />
&nbsp;&nbsp;&nbsp;&nbsp;corresponding !!SN:M# is necessary to release this temporary array. It can be used, for instance,<br />
&nbsp;&nbsp;&nbsp;&nbsp;for large calculations or to pass string arguments to function.<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;Example:<br />
&nbsp;&nbsp;&nbsp;&nbsp;!?FU(OnAdventureMapRightMouseClick);<br />
&nbsp;&nbsp;&nbsp;&nbsp;!!SN:M-1/4/1/-1;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[allocate 4 strings array (-1 = auto ID, 4 = 4 items, 1 = of string type, -1 = local to current trigger)&#93;<br />
&nbsp;&nbsp;&nbsp;&nbsp;!!VR(dlgStrings:y):Sv1; [save array ID&#93;<br />
&nbsp;&nbsp;&nbsp;&nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp;; Setup strings<br />
&nbsp;&nbsp;&nbsp;&nbsp;!!SN:M(dlgStrings)/0/^Select commander bonus:^;<br />
&nbsp;&nbsp;&nbsp;&nbsp;!!SN:M(dlgStrings)/1/^1) Attack^;<br />
&nbsp;&nbsp;&nbsp;&nbsp;!!SN:M(dlgStrings)/2/^2) Speed^;<br />
&nbsp;&nbsp;&nbsp;&nbsp;!!SN:M(dlgStrings)/3/^3) Health^;<br />
&nbsp;&nbsp;&nbsp;&nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp;!!FU(PM_ShowDialog):P(dlgStrings); [pass 4 string to dialog showing function&#93;<br />
&nbsp;&nbsp;&nbsp;&nbsp;; here array with (dlgStrings) ID will be automatically freed, same as SN:M(dlgStrings);<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;!?FU(PM_ShowDialog);<br />
&nbsp;&nbsp;&nbsp;&nbsp;; (dlgStrings:x) - dynamical array of 4 strings<br />
&nbsp;&nbsp;&nbsp;&nbsp;; (items[3&#93;:z)<br />
&nbsp;&nbsp;&nbsp;&nbsp;!!SN:M(dlgStrings)/0/?(caption:z);<br />
&nbsp;&nbsp;&nbsp;&nbsp;!!SN:M(dlgStrings)/1/?(items[0&#93;);<br />
&nbsp;&nbsp;&nbsp;&nbsp;!!SN:M(dlgStrings)/2/?(items[1&#93;);<br />
&nbsp;&nbsp;&nbsp;&nbsp;!!SN:M(dlgStrings)/3/?(items[2&#93;);<br />
&nbsp;&nbsp;&nbsp;&nbsp;!!IF:M^{(caption)}<br />
&nbsp;&nbsp;&nbsp;&nbsp;(items[0&#93;)<br />
&nbsp;&nbsp;&nbsp;&nbsp;(items[1&#93;)<br />
&nbsp;&nbsp;&nbsp;&nbsp;(items[2&#93;)^;<br />
<br />
[-&#93; Fixed memory leakage in SN:M dynamical arrays deallocation and a few other places.</code></div></div>
</div></div>]]></description>
			<content:encoded><![CDATA[<div style="text-align: center;"><span style="font-size: large;"><span style="color: #FF0000;"><span style="font-weight: bold;">ERA 3</span></span></span></div>
<br />
<div style="text-align: center;"><img src="https://i.ibb.co/kyxHFRW/era3-poster2.jpg" border="0" alt="Image: era3-poster2.jpg" style='max-width: 800px; height: auto;' onclick='Bers.ScaleImg(this);'/></div>
<br />
<img src="https://vk.com/emoji/e/e29aa1.png" border="0" alt="Image: e29aa1.png" style='max-width: 800px; height: auto;' onclick='Bers.ScaleImg(this);'/> <span style="color: #7e0e0e;"><span style="font-weight: bold;">Вышла новая мажорная версия HoMM 3 ERA</span></span><br />
Текущая версия: <span style="color: #FF0000;"><span style="font-weight: bold;">3.0.0</span></span> (альфа 0)<br />
<br />
<img src="https://vk.com/emoji/e/f09f9383.png" border="0" alt="Image: f09f9383.png" style='max-width: 800px; height: auto;' onclick='Bers.ScaleImg(this);'/> Что нового ?<br />
<br />
<img src="https://vk.com/emoji/e/e2ad90.png" border="0" alt="Image: e2ad90.png" style='max-width: 800px; height: auto;' onclick='Bers.ScaleImg(this);'/> Опциональный режим ERM 2.0: именованные константы, локальные переменные и функции на стадии прекомпиляции. На ЕРМ становится возможным писать понятный код с малым числом комментариев.<br />
<img src="https://vk.com/emoji/e/e2ad90.png" border="0" alt="Image: e2ad90.png" style='max-width: 800px; height: auto;' onclick='Bers.ScaleImg(this);'/> Переписан движок ЕРМ: множество исправлений наследия прошлого, универсальный синтаксис, удобная работа со строками, исправление багов, расширение и добавление команд и многое другое.<br />
<img src="https://vk.com/emoji/e/e2ad90.png" border="0" alt="Image: e2ad90.png" style='max-width: 800px; height: auto;' onclick='Bers.ScaleImg(this);'/> Добавлена стандартная библиотека ЭРЫ на ERM: 1 расширенное событие и тысячи предопределённых констант.<br />
<img src="https://vk.com/emoji/e/e2ad90.png" border="0" alt="Image: e2ad90.png" style='max-width: 800px; height: auto;' onclick='Bers.ScaleImg(this);'/> ЭРА становится полноценным ядром для мододелов всех мастей: больше нет навязанных модов, анимации, большинства графических изменений, нового интерфейса, заменённых кампаний и музыки и т.д. Установив ЭРУ вы получаете рабочий скелет со всеми инструментами для создания уникальной сборки под ваши вкусы и желания. Базовый комплект новых монстров/объектов из WoG 3.58 остаётся в качестве ресурсов и включаемых/выключаемых игровых механик.<br />
<br />
<img src="https://vk.com/emoji/e/e29884.png" border="0" alt="Image: e29884.png" style='max-width: 800px; height: auto;' onclick='Bers.ScaleImg(this);'/> Скачать: <a href="https://mods.hmm35.ru/Era%203.X.exe" target="_blank">https://mods.hmm35.ru/Era%203.X.exe</a><br />
<br />
История изменений на русском (автоперевод): <a href="https://mods.hmm35.ru/Era%20III%20changelog%20rus.txt" target="_blank">https://mods.hmm35.ru/Era%20III%20changelog%20rus.txt</a><br />
<div class="notranslate"><div class="spoiler_header">История изменений: <a href="javascript:void(0);" onclick="javascript:if(parentNode.parentNode.getElementsByTagName('div')[1].style.display=='block'){parentNode.parentNode.getElementsByTagName('div')[1].style.display='none';this.innerHTML='(Click to View)';}else {parentNode.parentNode.getElementsByTagName('div')[1].style.display='block';this.innerHTML='(Click to Hide)';}">(Click to View)</a></div><div class="spoiler_body" style="display: none; border: 1px dotted #0F5C8E;"><div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>Version 3.0.0 (06/2020)<br />
------------------------<br />
[+] Introduced advanced ERM precompilation mode, called ERM 2.0 and activated via "ZVSE2" first line signature.<br />
&nbsp;&nbsp;Main features:<br />
&nbsp;&nbsp;&nbsp;&nbsp;- Named local variables to write human readable code instead of cryptic one.<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Example: !!HE-1:C0/0/?(monType:y)/?(monNum:y) instead of !!HE-1:C0/0/?y23/?y24;<br />
&nbsp;&nbsp;&nbsp;&nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp;- Global named constants instead of magic numbers to write self-explaining code:<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Example: !?FU(OnKeyPressed)&amp;x1=(KEY_1) instead of !?FU(OnKeyPressed)&amp;x1=49; what is 49???<br />
&nbsp;&nbsp;&nbsp;&nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp;- Strict distinguishing naming for functions, local variables and constants. No way to mix up.<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Example: thisIsVariable, THIS_IS_CONSTANT, ThisIsFunction and era_ThisIsFunctionAgain.<br />
<br />
&nbsp;&nbsp;==== Named global constants ====<br />
&nbsp;&nbsp;Constant is named value, that is defined once and never changes. Like 13 (Archangel monster type).<br />
&nbsp;&nbsp;Constant can be used anywere, where numbers can be used. Era currently supports only integer numeric<br />
&nbsp;&nbsp;constants, written in all capitals: (MON_ARCHANGEL), (OBJ_MINE), (PLAYER_RED).<br />
&nbsp;&nbsp;Allowed characters are: [A-Z0-9_].<br />
&nbsp;&nbsp;To define a constant use the following instruction !#DC(CONSTANT_NAME) = 777; where 777 is arbitrary number.<br />
&nbsp;&nbsp;Examples:<br />
&nbsp;&nbsp;!#DC(PLAYER_BLUE)&nbsp;&nbsp;&nbsp;&nbsp; = 1;<br />
&nbsp;&nbsp;!#DC(SKILL_FIRST_AID) = 27;<br />
<br />
&nbsp;&nbsp;To use a constant simply write its name in parentheses:<br />
&nbsp;&nbsp;!!OW:R(CURRENT_PLAYER)/(RES_GOLD)/d1000; give 1000 gold to current player<br />
<br />
&nbsp;&nbsp;will be compiled to<br />
<br />
&nbsp;&nbsp;!!OW:R-1/6/d1000; give 1000 gold to current player<br />
<br />
&nbsp;&nbsp;--- Naming ---<br />
&nbsp;&nbsp;Scripts writers must use unique prefix before constant names to prevent names collisions. Any constants without prefix<br />
&nbsp;&nbsp;may be added to ERA in the future and break your script.<br />
&nbsp;&nbsp;Example:<br />
&nbsp;&nbsp;; for mod Battle Heroes let's use prefix "BH_"<br />
&nbsp;&nbsp;!#DC(BH_ART_RING_OF_POWER) = 160;<br />
&nbsp;&nbsp;<br />
&nbsp;&nbsp;!#DC(BH_CLASS_WARRIOR) = 1;<br />
&nbsp;&nbsp;!#DC(BH_CLASS_MAGE)&nbsp;&nbsp;&nbsp;&nbsp;= 2;<br />
&nbsp;&nbsp;!#DC(BH_CLASS_RANGER)&nbsp;&nbsp;= 3;<br />
<br />
&nbsp;&nbsp;--- Globality ---<br />
&nbsp;&nbsp;Constants are global. It means, that one script can use constants of another script. To ensure, that your constants<br />
&nbsp;&nbsp;are always loaded before other scripts, place them in the script with high priority (ex. "1000 - phoenix consts.erm").<br />
&nbsp;&nbsp;<br />
&nbsp;&nbsp;--- Standard constants ---<br />
&nbsp;&nbsp;ERA provides file "1000 - era consts.erm" with many predefined constants, covering most values, mentioned in ERM help.<br />
&nbsp;&nbsp;Look through it before defining your own constant for secondary skill, monster or player color.<br />
<br />
<br />
&nbsp;&nbsp;==== Named local variables ====<br />
&nbsp;&nbsp;Each ERM trigger (!?XX before next !?XX) can now declare and use own named local variables, allocated from<br />
&nbsp;&nbsp;x1..x16, y1..y100, z-1..z-10, e1..e100 sets.<br />
&nbsp;&nbsp;Named variables are replaced with regular variables during scripts compilation and do not influence the performance at all.<br />
&nbsp;&nbsp;Example: (day) may be compiled to y5;<br />
<br />
&nbsp;&nbsp;--- Naming ---<br />
&nbsp;&nbsp;Names of variables must be in so called "camelCase" and contain only [a-zA-Z0-9] characters. They must be wrapped<br />
&nbsp;&nbsp;in parantheses the same way, as function names are wrapped.<br />
&nbsp;&nbsp;Example of valid variables: (hero), (monNum), (isAutocombatMode), (specialObject7).<br />
<br />
&nbsp;&nbsp;--- Declaration ---<br />
&nbsp;&nbsp;Variables must be declared on the first usage: i.e their type (x, y, z, e, v) and array length (for arrays) must be specified.<br />
&nbsp;&nbsp;If you write '[some number]' after variable name, variable will become an array (sequence of variables) with specified length.<br />
&nbsp;&nbsp;If you write ':e' after variable name or array length, it will mean, that variable type is "e" (floating point numbers).<br />
<br />
&nbsp;&nbsp;Examples:<br />
&nbsp;&nbsp;!!HE-1:N?(hero:y); give some y-variable name "hero" and write current hero ID to it<br />
&nbsp;&nbsp;!#VA(arts[4]:y);&nbsp;&nbsp; allocate 4 y-variables with sequential indexes and name the array "arts"<br />
<br />
&nbsp;&nbsp;!#VA instruction is pseudo-command, that is dropped from final compiled code and that can be used to hold variables declarations.<br />
&nbsp;&nbsp;Example:<br />
&nbsp;&nbsp;!?FU(acm_Sum);<br />
&nbsp;&nbsp;; The function calculates sum of two numbers<br />
&nbsp;&nbsp;!#VA(first:x) (second:x) (result:x); [bind "first" to x1, "second" to x2, "result" to x3]<br />
&nbsp;&nbsp;!!VR(result):S(first) +(second);&nbsp;&nbsp;&nbsp;&nbsp; [calculate result]<br />
<br />
&nbsp;&nbsp;--- Usage ---<br />
&nbsp;&nbsp;It's allowed to specify the same type and array length for variables in every variable usage place, but it's not necessary.<br />
&nbsp;&nbsp;After you declared variable, there is no more any need to write its type/length.<br />
&nbsp;&nbsp;Example:<br />
&nbsp;&nbsp;!!HE-1:N?(hero:y);<br />
&nbsp;&nbsp;!!HE(hero):K1; kill hero with ID in (hero) variable.<br />
<br />
&nbsp;&nbsp;will be compiled to something like that:<br />
&nbsp;&nbsp;!!HE-1:N?y5;<br />
&nbsp;&nbsp;!!HEy5:K1;<br />
<br />
&nbsp;&nbsp;--- Arrays ---<br />
&nbsp;&nbsp;If you need not a single variable, but sequence of variables, for instance to hold [x, y, l] coordinates of objects,<br />
&nbsp;&nbsp;then you need an array. Specify array length in square brackets right after variable name during declaration.<br />
&nbsp;&nbsp;!#VA(coords[3]:y); allocate 3 y-variables named 'coords'<br />
<br />
&nbsp;&nbsp;Items or elements of arrays are zero-indexed and can be accessed by direct index.<br />
&nbsp;&nbsp;For 3-items array possible indexes are 0, 1, 2.<br />
&nbsp;&nbsp;Example:<br />
&nbsp;&nbsp;!!CM:P?(coords[0])/?(coords[1])/?(coords[2]);<br />
<br />
&nbsp;&nbsp;will be compiled to something like that:<br />
&nbsp;&nbsp;!!CM:P?y50/?y51/?y52;<br />
<br />
&nbsp;&nbsp;If you don't specify array index, the first array element will be used. It means that<br />
&nbsp;&nbsp;(test) and (test[0]) have the same sense. Regular variables are considered arrays of length 1.<br />
<br />
&nbsp;&nbsp;--- Negative array indexes ---<br />
&nbsp;&nbsp;Negative array index means n-th item from the end. -1 will point to the last item, -2 to the one before the last one and so on.<br />
&nbsp;&nbsp;Example:<br />
&nbsp;&nbsp;; allocate array of 10 y-variables and assign the last one value 2000<br />
&nbsp;&nbsp;!#VA(array[10]:y);<br />
&nbsp;&nbsp;!!VR(array[-1]):S2000;<br />
<br />
&nbsp;&nbsp;will be compiled to something like that:<br />
&nbsp;&nbsp;; allocate y1..y10<br />
&nbsp;&nbsp;!!VRy10:S2000;<br />
<br />
&nbsp;&nbsp;--- Releasing local variables ---<br />
&nbsp;&nbsp;If you don't need large variable array anymore, but want to declare another big array, then free the previous one.<br />
&nbsp;&nbsp;Syntax: !#VA(-variableName); will forget about specified variableName, allowing to reuse indexes, allocated for that variable.<br />
<br />
&nbsp;&nbsp;Example:<br />
&nbsp;&nbsp;!#VA(myArts[100]:y); allocate y1..y100 to hold artifact IDs<br />
&nbsp;&nbsp;...;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; use them<br />
&nbsp;&nbsp;!#VA(-myArts);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; release 'myArts' name and y1..y100 indexes.<br />
&nbsp;&nbsp;!#VA(coords[3]:y);&nbsp;&nbsp; allocate y1..y3 as 'coords' variable<br />
<br />
&nbsp;&nbsp;--- Getting variable address (real index) ---<br />
&nbsp;&nbsp;It's often necessary to get real index of variable or even array element. When you want to output "2" instead of<br />
&nbsp;&nbsp;y2, use address operator '@'.<br />
&nbsp;&nbsp;<br />
&nbsp;&nbsp;Example:<br />
&nbsp;&nbsp;; Initialize array with 3 artifacts<br />
&nbsp;&nbsp;!#VA(arts[3]:y);<br />
&nbsp;&nbsp;!!VR(arts):C(ART_SKULL_HELMET)/(ART_HELM_OF_CHAOS)/(ART_DEAD_MANS_BOOTS);<br />
<br />
&nbsp;&nbsp;; Select one artifact randomly<br />
&nbsp;&nbsp;; same as R0/0/2, generates random number in 0..2 range and assigns it to artPtr variable.<br />
&nbsp;&nbsp;!!VR(artPtr:y):R0/(@arts)/(@arts[-1]);<br />
&nbsp;&nbsp;<br />
&nbsp;&nbsp;; Give artifact to hero<br />
&nbsp;&nbsp;!!HE-1:Ay(artPtr);<br />
<br />
&nbsp;&nbsp;will be compiled to something like that:<br />
&nbsp;&nbsp;<br />
&nbsp;&nbsp;!!VRy1:C20/21/56;<br />
&nbsp;&nbsp;!!VRy4:R0/0/2;<br />
&nbsp;&nbsp;!!HE-1:Ayy4;<br />
<br />
&nbsp;&nbsp;Address operator "@" compiles to real (final) variable index. For instance, for array "test[10]:y" mapped to y50..y59<br />
&nbsp;&nbsp;(@test[1]) will compile to "51".<br />
<br />
&nbsp;&nbsp;Example of declaring array of 10 y-variables and initializing all of them with -1.<br />
&nbsp;&nbsp;!#VA(monTypes[10]:y);<br />
<br />
&nbsp;&nbsp;!!re i/(@monTypes)/(@monTypes[-1]):; repeat from i = first array index to i = last array index<br />
&nbsp;&nbsp;&nbsp;&nbsp;!!VRyi:S-1; set -1 for current array item<br />
&nbsp;&nbsp;!!en:;<br />
<br />
&nbsp;&nbsp;In other programming languages variables, holding other variables addresses/indexes are usually called "pointers"<br />
&nbsp;&nbsp;and abbreviated as "ptr" or "Ptr". We will rewrite the previous example with named variable in place of quick "i" var<br />
&nbsp;&nbsp;just for learning purposes.<br />
<br />
&nbsp;&nbsp;!!re (monTypePtr:y)/(@monTypes)/(@monTypes[-1]):; repeat from (monTypePtr) = first array index to (monTypePtr) = last array index<br />
&nbsp;&nbsp;&nbsp;&nbsp;!!VRy(monTypePtr):S-1; set -1 for current array item<br />
&nbsp;&nbsp;!!en:;<br />
<br />
&nbsp;&nbsp;--- Naming function arguments ---<br />
&nbsp;&nbsp;Indexes for named local variables are allocated starting from the smallest possible value.<br />
&nbsp;&nbsp;It means, that we can name even function arguments if we declare them in the same order, as arguments will be passed.<br />
&nbsp;&nbsp;Example:<br />
<br />
&nbsp;&nbsp;!?FU(BH_GetHeroSecSkill);<br />
&nbsp;&nbsp;!#VA(hero:x) (skill:x) (result:x); now hero = x1, skill = x2, result = x3<br />
&nbsp;&nbsp;!!HE(hero):S(skill)/?(result);<br />
<br />
&nbsp;&nbsp;!?FU(...); some event<br />
&nbsp;&nbsp;!!FU(BH_GetHeroSecSkill)/(HERO_XERON)/(SKILL_FIRST_AID)/?(xeronFirstAidLevel:y); so what's the level of First Aid skill Xeron has? )<br />
<br />
&nbsp;&nbsp;--- Redeclaration ---<br />
&nbsp;&nbsp;If you need to declare variable in both branches of if-then block, specify type/length in both of them.<br />
<br />
&nbsp;&nbsp;!!if&amp;(day)&gt;90:;<br />
&nbsp;&nbsp;&nbsp;&nbsp;!!VR(price:y):S(day) *100;<br />
&nbsp;&nbsp;&nbsp;&nbsp;...<br />
&nbsp;&nbsp;!!el:;<br />
&nbsp;&nbsp;&nbsp;&nbsp;!!VR(price:y):S(day) *(difficultyLevel) +300;<br />
&nbsp;&nbsp;&nbsp;&nbsp;...<br />
&nbsp;&nbsp;!!en:; <br />
<br />
&nbsp;&nbsp;--- Reusing same name in other trigger ---<br />
&nbsp;&nbsp;Variable names are local to nearest trigger only. New trigger starts with no declared variables.<br />
&nbsp;&nbsp;Example:<br />
<br />
&nbsp;&nbsp;!?FU(OnHeroScreenMouseClick);<br />
&nbsp;&nbsp;!!CM:F?(flags:y); flags = y1<br />
<br />
&nbsp;&nbsp;!?FU(OnHeroScreenMouseClick);<br />
&nbsp;&nbsp;!#VA(flags[23]:e); flags is array, binded to e1..e23<br />
<br />
&nbsp;&nbsp;--- Interpolation ---<br />
&nbsp;&nbsp;To substitute local variables in string literals use %(varName) syntax. Example:<br />
&nbsp;&nbsp;!!VR(price:y):S600;<br />
&nbsp;&nbsp;!!VR(heroName:z):S^Robin Hood^;<br />
&nbsp;&nbsp;!!IF:Q2/^Would you like to hire %(heroName) for %(price) gold only?^;<br />
<br />
&nbsp;&nbsp;%y(varName) syntax is also supported and compiles to something like %yy5.<br />
<br />
<br />
&nbsp;&nbsp;==== Named functions ====<br />
&nbsp;&nbsp;Function names must consist of [A-Za-z0-9_] characters only, start with letter and contain at least<br />
&nbsp;&nbsp;single lower case letter (a-z).<br />
&nbsp;&nbsp;There are two allowed naming methods:<br />
&nbsp;&nbsp;1) Start function with capital letter. (CalcHeroArmyPower), (ShowUpgradeDialog).<br />
&nbsp;&nbsp;ERA reserves right to declare prefixless functions, starting with "On" for events. This method is not<br />
&nbsp;&nbsp;recommended, due to possible names collisions in different mods. Two mods may declare functions<br />
&nbsp;&nbsp;will the same names and thus produce hard to debug bugs.<br />
<br />
&nbsp;&nbsp;2) Start function with any case unique prefix with '_' character. Prefix is usually mod abbreviation.<br />
&nbsp;&nbsp;For instance, for "Dwellings Extended" mod the following functions are used:<br />
&nbsp;&nbsp;!?FU(dex_SetDwellingSlotByTownType);<br />
&nbsp;&nbsp;!?FU(dex_DwellingPopulation);<br />
&nbsp;&nbsp;...<br />
<br />
&nbsp;&nbsp;--- Generating new events ---<br />
&nbsp;&nbsp;You can call function, even if it has no handlers. For instance, in Upgrade All Creatures mod you<br />
&nbsp;&nbsp;want to allow other scripts to be able to notify, what monster can be upgraded to in particular town.<br />
&nbsp;&nbsp;Just call not existing function like !!FU(auc_OnDetermineMonsterUpgrade):P... in your script with all<br />
&nbsp;&nbsp;necessary parameters and other scripts will be able to write new event handlers like:<br />
<br />
&nbsp;&nbsp;!?FU(auc_OnDetermineMonsterUpgrade);<br />
&nbsp;&nbsp;...<br />
<br />
&nbsp;&nbsp;--- Passing function as handlers or callbacks ---<br />
&nbsp;&nbsp;You can use function as ordinary constant, compiled to number. You can assign it to variable or pass to<br />
&nbsp;&nbsp;another function.<br />
&nbsp;&nbsp;!!VR(spellHandler:y):S(newmagic_DesintegrationSpellHandler);<br />
&nbsp;&nbsp;!!FU(spellHandler):P;<br />
<br />
&nbsp;&nbsp;will compile to something like that<br />
<br />
&nbsp;&nbsp;!!VRy20:S95003;<br />
&nbsp;&nbsp;!!FUy20:P;<br />
<br />
[+] Added 1000 era - stdlib.erm script, which will contain safe for all extra ERM functionality.<br />
&nbsp;&nbsp;&nbsp;&nbsp;Currently !?FU(OnEvenyDay) event is enhanced. Its handlers will receive 5 parameters:<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;!?FU(OnEveryDay);<br />
&nbsp;&nbsp;&nbsp;&nbsp;!#VA(day:x1) (weekDay:x) (once:x) (owner:x) (isAi:x);<br />
&nbsp;&nbsp;&nbsp;&nbsp;!!IF:M^%(day) %(weekDay) %(once) %(owner) %(isAi)^;<br />
<br />
[+] Added 1000 era - consts.erm script with lots of constants to be used in ERM 2.0 scripts.<br />
&nbsp;&nbsp;&nbsp;&nbsp;ERM Editor, based on Sublime Text, supports constants autocompletion.<br />
&nbsp;&nbsp;&nbsp;&nbsp;Remember, that constants without mod name prefix are reserved for ERA.<br />
&nbsp;&nbsp;&nbsp;&nbsp;Prefer BH_GOLD_PER_VICTORY to GOLD_PER_VICTORY for Battle Heroes mod, for instance.<br />
<br />
[+] Floating point variables (e-variables) are passed to ERM commands as raw 4 bytes value,<br />
&nbsp;&nbsp;&nbsp;&nbsp;treated by most commands as integer, which may cause many bugs, unless you know, what you are doing.<br />
&nbsp;&nbsp;&nbsp;&nbsp;The exception is !!VR:S command, allowing transparent conversion integer-float. To copy float value,<br />
&nbsp;&nbsp;&nbsp;&nbsp;stored in raw format in integer variable to e-variable and vice versa use !!VR:C command. It acts same<br />
&nbsp;&nbsp;&nbsp;&nbsp;as VR:S, but without data conversion.<br />
<br />
[+] New command !!VR&#36;1:S#2/#3. Convert float to integer using specific rounding mode.<br />
&nbsp;&nbsp;&nbsp;&nbsp;&#36;1 - integer variable.<br />
&nbsp;&nbsp;&nbsp;&nbsp;#2 - float variable<br />
&nbsp;&nbsp;&nbsp;&nbsp;#3 - rounding mode:<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt; 0 for floor operation (round towards negative infinity),<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0 for normal round (round half away from zero),<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&gt; 0 for ceil operation (round towards positive infinity).<br />
<br />
[+] !!VR: +/-/*/:/% convert both arguments to float if any is float before calculation and convert back<br />
&nbsp;&nbsp;&nbsp;&nbsp;to base var type on return.<br />
&nbsp;&nbsp;&nbsp;&nbsp;Thus<br />
&nbsp;&nbsp;&nbsp;&nbsp;!!VR(koef:e):S25 :10; koef = 2.5<br />
&nbsp;&nbsp;&nbsp;&nbsp;!!VR(gold:y):S2 *koef; gold = 5, not 4<br />
<br />
[+] New command !!VR&#36;1:~#2<br />
&nbsp;&nbsp;&nbsp;&nbsp;Unsets bits #2 in &#36;1 integer variable.<br />
&nbsp;&nbsp;&nbsp;&nbsp;Example:<br />
&nbsp;&nbsp;&nbsp;&nbsp;!!VR(flags):~17; unset bits/flags 1 + 16 from (flags) variable.<br />
&nbsp;&nbsp; <br />
[+] New command !!VR&#36;1:Z#2. Creates trigger local temporary z-variable with given contents and assigns its index to integer variable.<br />
&nbsp;&nbsp;&nbsp;&nbsp;&#36;1 - integer variable.<br />
&nbsp;&nbsp;&nbsp;&nbsp;#2 - any string.<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;The command can be used to create temporal z-variables to change, for example, artifact description,<br />
&nbsp;&nbsp;&nbsp;&nbsp;show message and restore description.<br />
<br />
[+] ^....^ literal in any ERM command is interpolated and replaced by temporal z-variable index before receiver<br />
&nbsp;&nbsp;&nbsp;&nbsp;execution. This z-variable is released right after receiver is executed.<br />
&nbsp;&nbsp;&nbsp;&nbsp;Don't use string literals in WoG 3.58 hint/description setting commands, because such descriptions have short life time.<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;From now it's possible to pass strings to functions.<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;!?FU(ES_Ask);<br />
&nbsp;&nbsp;&nbsp;&nbsp;; Shows question dialog with caption. Returns boolean (1 on success and 0 on failure).<br />
&nbsp;&nbsp;&nbsp;&nbsp;!#VA(captionPtr:x) (questionPtr:x) (result:x);<br />
&nbsp;&nbsp;&nbsp;&nbsp;!!IF:Q1/^{%z(captionPtr)}<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;%z(questionPtr)^;<br />
&nbsp;&nbsp;&nbsp;&nbsp;!!VR(result):S0;<br />
&nbsp;&nbsp;&nbsp;&nbsp;!!VR(result)&amp;1:S1;<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;!?OB(OBJ_TOWN)/(ANY_OBJ);<br />
&nbsp;&nbsp;&nbsp;&nbsp;!!FU(ES_Ask):P^Sphinx asks you:^/^Do you really want to die, fighting my guards?^/?(answer:y);<br />
&nbsp;&nbsp;&nbsp;&nbsp;!!HE(CURRENT_HERO)&amp;(answer)=1:K1; let him die )))<br />
<br />
[+] Only regular ERT variables are interpolated automatically.<br />
&nbsp;&nbsp;&nbsp;&nbsp;Regular z-variables and temporal ert variables are not interpolated in receivers.<br />
&nbsp;&nbsp;&nbsp;&nbsp;It means, that !!VRz2:S^%%y5^; z2 is now really "%y5"<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;Previously interpolation would be performed again and again recursively, converting %y5 into y5 value like 0.<br />
&nbsp;&nbsp;&nbsp;&nbsp;and even later using z2 in any command would run interpolation again.<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;!!IF:M1/z2; will display "%y5", not y5 value.<br />
<br />
[+] New VR&#36;1:R/T syntax: 0/min/max - generates random value in given range and assignes it to &#36;1 integer variable.<br />
[+] VR:R/T now both support syntaxes with 1/2/3 arguments.<br />
[+] VR:T uses Mersenne Twister qualitive generator, but it's not synchronized in multiplayer.<br />
[+] VR:M1. -1 as length means "till string end".<br />
<br />
[+] VR:M2 does not store token index in global variable anymore. Token index, that was ignored earlier, works now as expected.<br />
&nbsp;&nbsp; Token delimiters are [#1..#31, ' ', ',', '.']. Don't use for huge text, because performance is O(n^2), where n is tokens number.<br />
<br />
[+] VR:M3 Base/radix is enforced to be in 2..16 range.<br />
<br />
[+] ERM interpolation (expanding variables starting with % in string literals ^...^ and ERT strings) was fully rewritten.<br />
&nbsp;&nbsp;&nbsp;&nbsp;Upper case registry for old ERM variables is supported, but deprecated.<br />
&nbsp;&nbsp;&nbsp;&nbsp;%X1 is good, but %x1 is better.<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;All new s^...^, i^...^ and named local variables are supported.<br />
&nbsp;&nbsp;&nbsp;&nbsp;Indirect references is supported.<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;%s(named global variable)<br />
&nbsp;&nbsp;&nbsp;&nbsp;%i(named global variable)<br />
&nbsp;&nbsp;&nbsp;&nbsp;%xy7<br />
&nbsp;&nbsp;&nbsp;&nbsp;%zi^named global variable^<br />
&nbsp;&nbsp;&nbsp;&nbsp;%z(namedLocalVar)<br />
&nbsp;&nbsp;&nbsp;&nbsp;%(namedLocalVar)<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;Quick vars are supported:<br />
&nbsp;&nbsp;&nbsp;&nbsp;%i %g %k<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;Interpolation of %Vf...t meaning is changed to real v-indexing<br />
&nbsp;&nbsp;&nbsp;&nbsp;%vi means v-var with i-index.<br />
&nbsp;&nbsp;&nbsp;&nbsp;%f means quick 'f' var.<br />
&nbsp;&nbsp;&nbsp;&nbsp;%i means quick 'i' var.<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;%F5 means flag 5<br />
&nbsp;&nbsp;&nbsp;&nbsp;%Fx16 means flag with x16 index<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;Function IDs and constants can be interpolated in the same way, as named local variables:<br />
&nbsp;&nbsp;&nbsp;&nbsp;%(CONST_NAME), %(era_FuncName), %(money), %y(moneyPtr)<br />
<br />
[+] IF:M# now works with any string<br />
[+] IF:N1/# now works with any string, not z1 only.<br />
[+] IF:N# now works with any string.<br />
[+] BA:B now can work with any string and integer.<br />
<br />
[+] Call SN:F^GenerateDebugInfo^ to generate Debug directory contents, the same way as F11 does.<br />
<br />
[+] Exported "NameTrigger" function (void NameTrigger(int TriggerId, const char* Name)), allowing plugins to<br />
&nbsp;&nbsp;&nbsp;&nbsp;give name to any ERM trigger, which can be used in ERM like !?FU(OnYourNewEvent).<br />
<br />
[+] Updated "wog native dialogs" plugin by igrik. From now it's possible to select item in message dialogs<br />
&nbsp;&nbsp;&nbsp;&nbsp;using mouse double click.<br />
<br />
[+] s^...^, ^...^, i^...^ can now be freely used in conditions.<br />
<br />
[+] New d-modifiers (d~, d%, d|, d&amp;, d&lt;&lt;, d&gt;&gt;) work with all receivers.<br />
<br />
[+] Rewritten ert-strings storage implementation. Removed limit on 50000 strings. Increased add/delete operations<br />
&nbsp;&nbsp;&nbsp;&nbsp;performance (from linear search to binary tree search). Savegames format was changed.<br />
<br />
[+] Added VR:C alternative for SN:M arrays. New command !!SN:U#1/#2/&#36;3...up to &#36;21 allows to set/check/get/modify<br />
&nbsp;&nbsp;&nbsp;&nbsp;many items of dynamical array.<br />
&nbsp;&nbsp;&nbsp;&nbsp;#1 - SN:M array ID.<br />
&nbsp;&nbsp;&nbsp;&nbsp;#2 - starting index<br />
&nbsp;&nbsp;&nbsp;&nbsp;&#36;3... - items at starting index, starting index + 1, starting index + 2, etc.<br />
<br />
[+] Added new command !!VR:R0/#min/#max, generating random value in specified range and assigning its to variable.<br />
&nbsp;&nbsp;&nbsp;&nbsp;Example: !!VRy1:R0/100/300; set y1 to random value in 100..300 range<br />
<br />
[*] The following exported functions now return 4-bytes LONGBOOL value, 0 for false, -1 (0xFFFFFFFF) for true.<br />
&nbsp;&nbsp;&nbsp;&nbsp;"ReadStrFromIni", "WriteStrToIni", "SaveIni", "PatchExists", "PluginExists", "Ask".<br />
<br />
[+] Added "1000 - era consts.erm" script to WoG mod with standard Era constants, including players,<br />
&nbsp;&nbsp;&nbsp;&nbsp;player bits, heroes, resources, objects, monsters, artifacts, spells. The file contents may be corrected<br />
&nbsp;&nbsp;&nbsp;&nbsp;and widened in the future. All constants were registered in Erm Editor, based on Sublime Text.<br />
<br />
[+] Added "1000 - era stdlib.erm" script with universal ERM functions and events. Currently "OnEveryDay"<br />
&nbsp;&nbsp;&nbsp;&nbsp;event is enhanced with the following x-arguments: day, week day, once(0..1), owner (color), isAi (0..1).<br />
<br />
[*] Fixed WoG bug with tactics detection on the very first round. Do not use BU:R in !?BR or !?FU(OnCombatRound) for zero round,<br />
&nbsp;&nbsp;&nbsp;&nbsp;because a few structures are not initialized at this moment and random crash may occur. First round code was moved after<br />
&nbsp;&nbsp;&nbsp;&nbsp;combat theme initialization and tactics popup message appearance.<br />
<br />
[+] All *.ers files are loaded without name/quantity constraints. Previously only script00.ers..script99.ers were processed.<br />
<br />
[+] HE:P command behavior was fixed. Teleport function with sound is called only if any coordinate<br />
&nbsp;&nbsp;&nbsp;&nbsp;was really changed. Advanced d-modifiers are supported for the first three parameters.<br />
<br />
[+] HE:C0 command was rewritten.<br />
&nbsp;&nbsp;&nbsp;&nbsp;-1 and -2 values for creature type are not treated as "upgrade"/"degrade" anymore. Command supports any d-modifiers now.<br />
&nbsp;&nbsp;&nbsp;&nbsp;Exp. modifier parameter is now SET-only. Previosly !!HE:C0/0/?y1/?y2/d5000/2 would not increase slot experience.<br />
&nbsp;&nbsp;&nbsp;&nbsp;In fact, any GET syntax used to make ERM engine ignore stack experience at all. This bug was fixed.<br />
&nbsp;&nbsp;&nbsp;&nbsp;Creature Type &lt; 0 or Number &lt;= 0 will be normalized to Type -1, Number 0 automatically.<br />
&nbsp;&nbsp;&nbsp;&nbsp;Note, that in all cases the returned stack experience value is the one before applying any changes.<br />
<br />
[+] Rewritten HE:X command to accept any number of parameters and understand any d-modifiers.<br />
&nbsp;&nbsp;&nbsp;&nbsp;Example: !!HE-1:X0/27 Xd1; become master of gold dragons<br />
<br />
[+] Introduces many new d-modifiers for all ERM commands, except for GE:E/N, LE:E/N.<br />
&nbsp;&nbsp;&nbsp;&nbsp;d+# - integer addition<br />
&nbsp;&nbsp;&nbsp;&nbsp;d-# - integer substraction<br />
&nbsp;&nbsp;&nbsp;&nbsp;d*# - integer multiplication<br />
&nbsp;&nbsp;&nbsp;&nbsp;d:# - integer division<br />
&nbsp;&nbsp;&nbsp;&nbsp;d|# sets bits from # (bitwise OR operation)<br />
&nbsp;&nbsp;&nbsp;&nbsp;d&amp; leaves only # bits, if any (bitwise AND operation)<br />
&nbsp;&nbsp;&nbsp;&nbsp;d~ unsets bits, specified in #. d~17 unsets bits 1 and 16<br />
&nbsp;&nbsp;&nbsp;&nbsp;d%# calculates division modulo. 10%4 = 2, for instance.<br />
&nbsp;&nbsp;&nbsp;&nbsp;d&lt;&lt;# shifts original value bits to the left by # positions (bitwise logical shift left).<br />
&nbsp;&nbsp;&nbsp;&nbsp;d&gt;&gt;# shifts original value bits to the right by # positions (bitwise logical shift right.<br />
<br />
[+] Function parameters (FU:P, DO:P), which were passed using GET-syntax, are now initialized with<br />
&nbsp;&nbsp;&nbsp;&nbsp;original variable value. The behavior is similar to pass-by-reference in other programming languages.<br />
&nbsp;&nbsp;&nbsp;&nbsp;Example:<br />
&nbsp;&nbsp;&nbsp;&nbsp;!?FU(Add3):;<br />
&nbsp;&nbsp;&nbsp;&nbsp;; (value:x)<br />
&nbsp;&nbsp;&nbsp;&nbsp;!!VR(value:x):+3;<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;!?CM0;<br />
&nbsp;&nbsp;&nbsp;&nbsp;!!VR(numHeads:y):S10;<br />
&nbsp;&nbsp;&nbsp;&nbsp;!!FU(Add3):P?(numHeads:y); 10 is passed to function as the first argument, 13 is result<br />
<br />
[+] Enhanced !!RD:I with new named parameters syntax.<br />
&nbsp;&nbsp;&nbsp;&nbsp;!!RD:I^parameter name^/?&#36;parameter_value;<br />
&nbsp;&nbsp;&nbsp;&nbsp;============================== Featured parameters: ==============================<br />
&nbsp;&nbsp;&nbsp;&nbsp;^dlgId^&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- Unique recruit dialog ID. Used to distinguish between nested dialogs (yep, it's possible). Reusable.<br />
&nbsp;&nbsp;&nbsp;&nbsp;^townId^&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; - ID of town, for which dialog is opened or -1.<br />
&nbsp;&nbsp;&nbsp;&nbsp;^dwellingId^&nbsp;&nbsp; - ID of town dwelling, for which dialog is opened or -1. 0..6 non upgraded, 7..13 for upgraded.<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Horde buildings (+X population) are treated as dwellings, they influence.<br />
&nbsp;&nbsp;&nbsp;&nbsp;^slot^&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; - Active logical slot index.<br />
&nbsp;&nbsp;&nbsp;&nbsp;^cost^&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; - Cost of single monster in current slot in gold.<br />
&nbsp;&nbsp;&nbsp;&nbsp;^resource^&nbsp;&nbsp;&nbsp;&nbsp; - Special resource for monster in current slot.<br />
&nbsp;&nbsp;&nbsp;&nbsp;^resourceCost^ - Cost of single monster in current slot in special resource.<br />
&nbsp;&nbsp;&nbsp;&nbsp;^quantity^&nbsp;&nbsp;&nbsp;&nbsp; - Number of monsters, currently selected for recruitment.<br />
&nbsp;&nbsp;&nbsp;&nbsp;^maxQuantity^&nbsp;&nbsp;- Maximal number of monsters, the player can afford.<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;Example:<br />
&nbsp;&nbsp;&nbsp;&nbsp;!?FU(OnRecruitDlgMouseClick);<br />
&nbsp;&nbsp;&nbsp;&nbsp;!!RD:I^dlgId^/?(dlgId:y) I^townId^/?(townId:y) I^dwellingId^/?(dwellingId:y) I^slot^/?(slot:y) I^cost^/?(cost:y);<br />
&nbsp;&nbsp;&nbsp;&nbsp;!!RD:I^resource^/?(resource:y) I^resourceCost^/?(resourceCost:y) I^quantity^/?(quantity:y) I^maxQuantity^/?(maxQuantity:y);<br />
&nbsp;&nbsp;&nbsp;&nbsp;!!IF:M^(dlgId:y) (townId:y) (dwellingId:y) (slot:y) (cost:y) (resource:y) (resourceCost:y) (quantity:y) (maxQuantity:y)^;<br />
<br />
[+] Enhanced !!UN:C command. It supports all d-modifiers now. New syntax with offset from address is available:<br />
&nbsp;&nbsp;&nbsp;&nbsp;!!UN:C#addr/#offset/#size/&#36;value;<br />
&nbsp;&nbsp;&nbsp;&nbsp;Era always calls GetRealAddr for #addr, thus !!UN:C supports all extended/relocated game structures.<br />
<br />
[+] WoG interface and WoG campaigns were extracted to appropriate standalone mods. ERA is now mostly Vanilla game with<br />
&nbsp;&nbsp;&nbsp;&nbsp;enhanced ERM engine and other modding capabilities.<br />
<br />
[+] Added !!BM:Z?&#36;addr command to get battle stack structure address.<br />
[+] Added !!HE:Z?&#36;addr command to get hero structure address.<br />
[+] Introduced ERM 2.0 support for scripts, beginning with 'ZVSE2'.<br />
[+] Doubled stack size for h3era.exe executable to allow trigger depth level up to 150, but better avoid such depth.<br />
<br />
[+] WoG Campaign editor loads resources from hmm35wog.pac and uses virtual file system. No more Campaign Fix required.<br />
[+] Added extended resources redirection support with wav/bik/smk files, including missing resources redirection.<br />
<br />
[+] Added new plugins events "OnAfterLoadLods", occured right after lods/pacs are loaded and "OnAfterLoadMedia", occured<br />
&nbsp;&nbsp;&nbsp;&nbsp;when lod/pacs/snd/vids are loaded.<br />
<br />
[*] ERA is recommended to be installed over Heroes 3 Complete only. Removed resources, which are already present in Complete lods.<br />
<br />
[-] Restored functionality of Data&#92;Redirections&#92;Missing&#92;*.json files, which are used to setup redirections<br />
&nbsp;&nbsp;&nbsp;&nbsp;for missing resources only.<br />
<br />
[+] ERM quick vars (f..t) are now local to triggers. Use them safely.<br />
<br />
[+] Update ERM Editor.<br />
[+] Rewritten core of ERM engine. Greatly improved old macro support (&#36;macronam&#36;). Just for perfection.<br />
<br />
[+] Extracted WoG campaigns into standalone mod, which was removed from Era installer package.<br />
<br />
[+] "remove exe protection.bin" was applied to h3era.exe and removed as patch.<br />
<br />
[+] Many resources and features were extracted from WoG mod into separate mods: Animated Object Flags, Animated Trees,<br />
&nbsp;&nbsp;&nbsp;&nbsp;No Prebattle Music, Secondary Skills Scrolling, Quick Savings, Fast Battle Animation, Improved Battle Decorations,<br />
&nbsp;&nbsp;&nbsp;&nbsp;WoG Interface, WoG Campaigns, Yona.<br />
<br />
[+] Added new event "OnDetermineMonInfoDlgUpgrade", occured, when game determines wether to show upgrade button<br />
&nbsp;&nbsp;&nbsp;&nbsp;in monster info dialog. Parameters: MonType, UpgradedType or -1, Town ID or -1, Hero ID or -1.<br />
&nbsp;&nbsp;&nbsp;&nbsp;-1 for UpgradedType means no upgrade button (because of wrong town type or appropriate building being not built, or monster having no upgrade).<br />
&nbsp;&nbsp;&nbsp;&nbsp;You can change this value to allow universal Jelu-like behavior or any upgrade system.<br />
&nbsp;&nbsp;&nbsp;&nbsp;Example:<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;ZVSE2<br />
&nbsp;&nbsp;&nbsp;&nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp;!?FU(OnDetermineMonInfoDlgUpgrade);<br />
&nbsp;&nbsp;&nbsp;&nbsp;!#VA(monType:x) (upgType:x) (town:x) (hero:x);<br />
&nbsp;&nbsp;&nbsp;&nbsp;!!VR(upgType):S(MON_GOLD_DRAGON); allow upgrade anything into Gold Dragons<br />
<br />
[+] SN/RD/MP receivers now support indexed parameters like vy6 or zi^myIndex^.<br />
<br />
[+] SN:D may be used now in battle, being equal to BU:R.<br />
<br />
[+] Added support for trigger local dynamical arrays. !!SN:M-1/#/#/-1 will allocate new dynamical array<br />
&nbsp;&nbsp;&nbsp;&nbsp;with ID, that will be automatically released after current trigger is exited. Thus no<br />
&nbsp;&nbsp;&nbsp;&nbsp;corresponding !!SN:M# is necessary to release this temporary array. It can be used, for instance,<br />
&nbsp;&nbsp;&nbsp;&nbsp;for large calculations or to pass string arguments to function.<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;Example:<br />
&nbsp;&nbsp;&nbsp;&nbsp;!?FU(OnAdventureMapRightMouseClick);<br />
&nbsp;&nbsp;&nbsp;&nbsp;!!SN:M-1/4/1/-1;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[allocate 4 strings array (-1 = auto ID, 4 = 4 items, 1 = of string type, -1 = local to current trigger)]<br />
&nbsp;&nbsp;&nbsp;&nbsp;!!VR(dlgStrings:y):Sv1; [save array ID]<br />
&nbsp;&nbsp;&nbsp;&nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp;; Setup strings<br />
&nbsp;&nbsp;&nbsp;&nbsp;!!SN:M(dlgStrings)/0/^Select commander bonus:^;<br />
&nbsp;&nbsp;&nbsp;&nbsp;!!SN:M(dlgStrings)/1/^1) Attack^;<br />
&nbsp;&nbsp;&nbsp;&nbsp;!!SN:M(dlgStrings)/2/^2) Speed^;<br />
&nbsp;&nbsp;&nbsp;&nbsp;!!SN:M(dlgStrings)/3/^3) Health^;<br />
&nbsp;&nbsp;&nbsp;&nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp;!!FU(PM_ShowDialog):P(dlgStrings); [pass 4 string to dialog showing function]<br />
&nbsp;&nbsp;&nbsp;&nbsp;; here array with (dlgStrings) ID will be automatically freed, same as SN:M(dlgStrings);<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;!?FU(PM_ShowDialog);<br />
&nbsp;&nbsp;&nbsp;&nbsp;; (dlgStrings:x) - dynamical array of 4 strings<br />
&nbsp;&nbsp;&nbsp;&nbsp;; (items[3]:z)<br />
&nbsp;&nbsp;&nbsp;&nbsp;!!SN:M(dlgStrings)/0/?(caption:z);<br />
&nbsp;&nbsp;&nbsp;&nbsp;!!SN:M(dlgStrings)/1/?(items[0]);<br />
&nbsp;&nbsp;&nbsp;&nbsp;!!SN:M(dlgStrings)/2/?(items[1]);<br />
&nbsp;&nbsp;&nbsp;&nbsp;!!SN:M(dlgStrings)/3/?(items[2]);<br />
&nbsp;&nbsp;&nbsp;&nbsp;!!IF:M^{(caption)}<br />
&nbsp;&nbsp;&nbsp;&nbsp;(items[0])<br />
&nbsp;&nbsp;&nbsp;&nbsp;(items[1])<br />
&nbsp;&nbsp;&nbsp;&nbsp;(items[2])^;<br />
<br />
[-] Fixed memory leakage in SN:M dynamical arrays deallocation and a few other places.</code></div></div>
</div></div>]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[ERA III. Новые версии]]></title>
			<link>http://wforum.heroes35.net/showthread.php?tid=5830</link>
			<pubDate>Sun, 31 May 2020 23:53:06 +0000</pubDate>
			<guid isPermaLink="false">http://wforum.heroes35.net/showthread.php?tid=5830</guid>
			<description><![CDATA[<span style="font-size: large;"><div style="text-align: center;"><span style="color: #FF0000;"><span style="font-weight: bold;">ERA 3</span></span></div></span><br />
<div style="text-align: center;"><img src="https://i.ibb.co/kyxHFRW/era3-poster2.jpg" border="0" alt="Image: era3-poster2.jpg" style='max-width: 800px; height: auto;' onclick='Bers.ScaleImg(this);'/></div>
<br />
<img src="https://vk.com/emoji/e/e29aa1.png" border="0" alt="Image: e29aa1.png" style='max-width: 800px; height: auto;' onclick='Bers.ScaleImg(this);'/> <span style="color: #7e0e0e;"><span style="font-weight: bold;">Вышла новая мажорная версия HoMM 3 ERA</span></span><br />
Текущая версия: <span style="color: #FF0000;"><span style="font-weight: bold;">3.0.0</span></span> (альфа 0)<br />
<br />
<img src="https://vk.com/emoji/e/f09f9383.png" border="0" alt="Image: f09f9383.png" style='max-width: 800px; height: auto;' onclick='Bers.ScaleImg(this);'/> Что нового ?<br />
<br />
<img src="https://vk.com/emoji/e/e2ad90.png" border="0" alt="Image: e2ad90.png" style='max-width: 800px; height: auto;' onclick='Bers.ScaleImg(this);'/> Опциональный режим ERM 2.0: именованные константы, локальные переменные и функции на стадии прекомпиляции. На ЕРМ становится возможным писать понятный код с малым числом комментариев.<br />
<img src="https://vk.com/emoji/e/e2ad90.png" border="0" alt="Image: e2ad90.png" style='max-width: 800px; height: auto;' onclick='Bers.ScaleImg(this);'/> Переписан движок ЕРМ: множество исправлений наследия прошлого, универсальный синтаксис, удобная работа со строками, исправление багов, расширение и добавление команд и многое другое.<br />
<img src="https://vk.com/emoji/e/e2ad90.png" border="0" alt="Image: e2ad90.png" style='max-width: 800px; height: auto;' onclick='Bers.ScaleImg(this);'/> Добавлена стандартная библиотека ЭРЫ на ERM: 1 расширенное событие и тысячи предопределённых констант.<br />
<img src="https://vk.com/emoji/e/e2ad90.png" border="0" alt="Image: e2ad90.png" style='max-width: 800px; height: auto;' onclick='Bers.ScaleImg(this);'/> ЭРА становится полноценным ядром для мододелов всех мастей: больше нет навязанных модов, анимации, большинства графических изменений, нового интерфейса, заменённых кампаний и музыки и т.д. Установив ЭРУ вы получаете рабочий скелет со всеми инструментами для создания уникальной сборки под ваши вкусы и желания. Базовый комплект новых монстров/объектов из WoG 3.58 остаётся в качестве ресурсов и включаемых/выключаемых игровых механик.<br />
<br />
<img src="https://vk.com/emoji/e/e29884.png" border="0" alt="Image: e29884.png" style='max-width: 800px; height: auto;' onclick='Bers.ScaleImg(this);'/> Скачать основной установщик: <a href="https://mods.hmm35.ru/Era%203.X.exe" target="_blank">https://mods.hmm35.ru/Era%203.X.exe</a><br />
<img src="https://vk.com/emoji/e/e29884.png" border="0" alt="Image: e29884.png" style='max-width: 800px; height: auto;' onclick='Bers.ScaleImg(this);'/> Скачать минорное обновление (может устаревать, только для создателей сборок): <a href="https://mods.hmm35.ru/Era%20Update.exe" target="_blank">https://mods.hmm35.ru/Era%20Update.exe</a><br />
<br />
<div class="notranslate"><div class="spoiler_header">История изменений: <a href="javascript:void(0);" onclick="javascript:if(parentNode.parentNode.getElementsByTagName('div')[1&#93;.style.display=='block'){parentNode.parentNode.getElementsByTagName('div')[1&#93;.style.display='none';this.innerHTML='(Click to View)';}else {parentNode.parentNode.getElementsByTagName('div')[1&#93;.style.display='block';this.innerHTML='(Click to Hide)';}">(Click to View)</a></div><div class="spoiler_body" style="display: none; border: 1px dotted #0F5C8E;"><div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>Version 3.0.0 (06/2020)<br />
------------------------<br />
[+&#93; Introduced advanced ERM precompilation mode, called ERM 2.0 and activated via "ZVSE2" first line signature.<br />
&nbsp;&nbsp;Main features:<br />
&nbsp;&nbsp;&nbsp;&nbsp;- Named local variables to write human readable code instead of cryptic one.<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Example: !!HE-1:C0/0/?(monType:y)/?(monNum:y) instead of !!HE-1:C0/0/?y23/?y24;<br />
&nbsp;&nbsp;&nbsp;&nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp;- Global named constants instead of magic numbers to write self-explaining code:<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Example: !?FU(OnKeyPressed)&amp;x1=(KEY_1) instead of !?FU(OnKeyPressed)&amp;x1=49; what is 49???<br />
&nbsp;&nbsp;&nbsp;&nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp;- Strict distinguishing naming for functions, local variables and constants. No way to mix up.<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Example: thisIsVariable, THIS_IS_CONSTANT, ThisIsFunction and era_ThisIsFunctionAgain.<br />
<br />
&nbsp;&nbsp;==== Named global constants ====<br />
&nbsp;&nbsp;Constant is named value, that is defined once and never changes. Like 13 (Archangel monster type).<br />
&nbsp;&nbsp;Constant can be used anywere, where numbers can be used. Era currently supports only integer numeric<br />
&nbsp;&nbsp;constants, written in all capitals: (MON_ARCHANGEL), (OBJ_MINE), (PLAYER_RED).<br />
&nbsp;&nbsp;Allowed characters are: [A-Z0-9_&#93;.<br />
&nbsp;&nbsp;To define a constant use the following instruction !#DC(CONSTANT_NAME) = 777; where 777 is arbitrary number.<br />
&nbsp;&nbsp;Examples:<br />
&nbsp;&nbsp;!#DC(PLAYER_BLUE)&nbsp;&nbsp;&nbsp;&nbsp; = 1;<br />
&nbsp;&nbsp;!#DC(SKILL_FIRST_AID) = 27;<br />
<br />
&nbsp;&nbsp;To use a constant simply write its name in parentheses:<br />
&nbsp;&nbsp;!!OW:R(CURRENT_PLAYER)/(RES_GOLD)/d1000; give 1000 gold to current player<br />
<br />
&nbsp;&nbsp;will be compiled to<br />
<br />
&nbsp;&nbsp;!!OW:R-1/6/d1000; give 1000 gold to current player<br />
<br />
&nbsp;&nbsp;--- Naming ---<br />
&nbsp;&nbsp;Scripts writers must use unique prefix before constant names to prevent names collisions. Any constants without prefix<br />
&nbsp;&nbsp;may be added to ERA in the future and break your script.<br />
&nbsp;&nbsp;Example:<br />
&nbsp;&nbsp;; for mod Battle Heroes let's use prefix "BH_"<br />
&nbsp;&nbsp;!#DC(BH_ART_RING_OF_POWER) = 160;<br />
&nbsp;&nbsp;<br />
&nbsp;&nbsp;!#DC(BH_CLASS_WARRIOR) = 1;<br />
&nbsp;&nbsp;!#DC(BH_CLASS_MAGE)&nbsp;&nbsp;&nbsp;&nbsp;= 2;<br />
&nbsp;&nbsp;!#DC(BH_CLASS_RANGER)&nbsp;&nbsp;= 3;<br />
<br />
&nbsp;&nbsp;--- Globality ---<br />
&nbsp;&nbsp;Constants are global. It means, that one script can use constants of another script. To ensure, that your constants<br />
&nbsp;&nbsp;are always loaded before other scripts, place them in the script with high priority (ex. "1000 - phoenix consts.erm").<br />
&nbsp;&nbsp;<br />
&nbsp;&nbsp;--- Standard constants ---<br />
&nbsp;&nbsp;ERA provides file "1000 - era consts.erm" with many predefined constants, covering most values, mentioned in ERM help.<br />
&nbsp;&nbsp;Look through it before defining your own constant for secondary skill, monster or player color.<br />
<br />
<br />
&nbsp;&nbsp;==== Named local variables ====<br />
&nbsp;&nbsp;Each ERM trigger (!?XX before next !?XX) can now declare and use own named local variables, allocated from<br />
&nbsp;&nbsp;x1..x16, y1..y100, z-1..z-10, e1..e100 sets.<br />
&nbsp;&nbsp;Named variables are replaced with regular variables during scripts compilation and do not influence the performance at all.<br />
&nbsp;&nbsp;Example: (day) may be compiled to y5;<br />
<br />
&nbsp;&nbsp;--- Naming ---<br />
&nbsp;&nbsp;Names of variables must be in so called "camelCase" and contain only [a-zA-Z0-9&#93; characters. They must be wrapped<br />
&nbsp;&nbsp;in parantheses the same way, as function names are wrapped.<br />
&nbsp;&nbsp;Example of valid variables: (hero), (monNum), (isAutocombatMode), (specialObject7).<br />
<br />
&nbsp;&nbsp;--- Declaration ---<br />
&nbsp;&nbsp;Variables must be declared on the first usage: i.e their type (x, y, z, e, v) and array length (for arrays) must be specified.<br />
&nbsp;&nbsp;If you write '[some number&#93;' after variable name, variable will become an array (sequence of variables) with specified length.<br />
&nbsp;&nbsp;If you write ':e' after variable name or array length, it will mean, that variable type is "e" (floating point numbers).<br />
<br />
&nbsp;&nbsp;Examples:<br />
&nbsp;&nbsp;!!HE-1:N?(hero:y); give some y-variable name "hero" and write current hero ID to it<br />
&nbsp;&nbsp;!#VA(arts[4&#93;:y);&nbsp;&nbsp; allocate 4 y-variables with sequential indexes and name the array "arts"<br />
<br />
&nbsp;&nbsp;!#VA instruction is pseudo-command, that is dropped from final compiled code and that can be used to hold variables declarations.<br />
&nbsp;&nbsp;Example:<br />
&nbsp;&nbsp;!?FU(acm_Sum);<br />
&nbsp;&nbsp;; The function calculates sum of two numbers<br />
&nbsp;&nbsp;!#VA(first:x) (second:x) (result:x); [bind "first" to x1, "second" to x2, "result" to x3&#93;<br />
&nbsp;&nbsp;!!VR(result):S(first) +(second);&nbsp;&nbsp;&nbsp;&nbsp; [calculate result&#93;<br />
<br />
&nbsp;&nbsp;--- Usage ---<br />
&nbsp;&nbsp;It's allowed to specify the same type and array length for variables in every variable usage place, but it's not necessary.<br />
&nbsp;&nbsp;After you declared variable, there is no more any need to write its type/length.<br />
&nbsp;&nbsp;Example:<br />
&nbsp;&nbsp;!!HE-1:N?(hero:y);<br />
&nbsp;&nbsp;!!HE(hero):K1; kill hero with ID in (hero) variable.<br />
<br />
&nbsp;&nbsp;will be compiled to something like that:<br />
&nbsp;&nbsp;!!HE-1:N?y5;<br />
&nbsp;&nbsp;!!HEy5:K1;<br />
<br />
&nbsp;&nbsp;--- Arrays ---<br />
&nbsp;&nbsp;If you need not a single variable, but sequence of variables, for instance to hold [x, y, l&#93; coordinates of objects,<br />
&nbsp;&nbsp;then you need an array. Specify array length in square brackets right after variable name during declaration.<br />
&nbsp;&nbsp;!#VA(coords[3&#93;:y); allocate 3 y-variables named 'coords'<br />
<br />
&nbsp;&nbsp;Items or elements of arrays are zero-indexed and can be accessed by direct index.<br />
&nbsp;&nbsp;For 3-items array possible indexes are 0, 1, 2.<br />
&nbsp;&nbsp;Example:<br />
&nbsp;&nbsp;!!CM:P?(coords[0&#93;)/?(coords[1&#93;)/?(coords[2&#93;);<br />
<br />
&nbsp;&nbsp;will be compiled to something like that:<br />
&nbsp;&nbsp;!!CM:P?y50/?y51/?y52;<br />
<br />
&nbsp;&nbsp;If you don't specify array index, the first array element will be used. It means that<br />
&nbsp;&nbsp;(test) and (test[0&#93;) have the same sense. Regular variables are considered arrays of length 1.<br />
<br />
&nbsp;&nbsp;--- Negative array indexes ---<br />
&nbsp;&nbsp;Negative array index means n-th item from the end. -1 will point to the last item, -2 to the one before the last one and so on.<br />
&nbsp;&nbsp;Example:<br />
&nbsp;&nbsp;; allocate array of 10 y-variables and assign the last one value 2000<br />
&nbsp;&nbsp;!#VA(array[10&#93;:y);<br />
&nbsp;&nbsp;!!VR(array[-1&#93;):S2000;<br />
<br />
&nbsp;&nbsp;will be compiled to something like that:<br />
&nbsp;&nbsp;; allocate y1..y10<br />
&nbsp;&nbsp;!!VRy10:S2000;<br />
<br />
&nbsp;&nbsp;--- Releasing local variables ---<br />
&nbsp;&nbsp;If you don't need large variable array anymore, but want to declare another big array, then free the previous one.<br />
&nbsp;&nbsp;Syntax: !#VA(-variableName); will forget about specified variableName, allowing to reuse indexes, allocated for that variable.<br />
<br />
&nbsp;&nbsp;Example:<br />
&nbsp;&nbsp;!#VA(myArts[100&#93;:y); allocate y1..y100 to hold artifact IDs<br />
&nbsp;&nbsp;...;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; use them<br />
&nbsp;&nbsp;!#VA(-myArts);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; release 'myArts' name and y1..y100 indexes.<br />
&nbsp;&nbsp;!#VA(coords[3&#93;:y);&nbsp;&nbsp; allocate y1..y3 as 'coords' variable<br />
<br />
&nbsp;&nbsp;--- Getting variable address (real index) ---<br />
&nbsp;&nbsp;It's often necessary to get real index of variable or even array element. When you want to output "2" instead of<br />
&nbsp;&nbsp;y2, use address operator '@'.<br />
&nbsp;&nbsp;<br />
&nbsp;&nbsp;Example:<br />
&nbsp;&nbsp;; Initialize array with 3 artifacts<br />
&nbsp;&nbsp;!#VA(arts[3&#93;:y);<br />
&nbsp;&nbsp;!!VR(arts):C(ART_SKULL_HELMET)/(ART_HELM_OF_CHAOS)/(ART_DEAD_MANS_BOOTS);<br />
<br />
&nbsp;&nbsp;; Select one artifact randomly<br />
&nbsp;&nbsp;; same as R0/0/2, generates random number in 0..2 range and assigns it to artPtr variable.<br />
&nbsp;&nbsp;!!VR(artPtr:y):R0/(@arts)/(@arts[-1&#93;);<br />
&nbsp;&nbsp;<br />
&nbsp;&nbsp;; Give artifact to hero<br />
&nbsp;&nbsp;!!HE-1:Ay(artPtr);<br />
<br />
&nbsp;&nbsp;will be compiled to something like that:<br />
&nbsp;&nbsp;<br />
&nbsp;&nbsp;!!VRy1:C20/21/56;<br />
&nbsp;&nbsp;!!VRy4:R0/0/2;<br />
&nbsp;&nbsp;!!HE-1:Ayy4;<br />
<br />
&nbsp;&nbsp;Address operator "@" compiles to real (final) variable index. For instance, for array "test[10&#93;:y" mapped to y50..y59<br />
&nbsp;&nbsp;(@test[1&#93;) will compile to "51".<br />
<br />
&nbsp;&nbsp;Example of declaring array of 10 y-variables and initializing all of them with -1.<br />
&nbsp;&nbsp;!#VA(monTypes[10&#93;:y);<br />
<br />
&nbsp;&nbsp;!!re i/(@monTypes)/(@monTypes[-1&#93;):; repeat from i = first array index to i = last array index<br />
&nbsp;&nbsp;&nbsp;&nbsp;!!VRyi:S-1; set -1 for current array item<br />
&nbsp;&nbsp;!!en:;<br />
<br />
&nbsp;&nbsp;In other programming languages variables, holding other variables addresses/indexes are usually called "pointers"<br />
&nbsp;&nbsp;and abbreviated as "ptr" or "Ptr". We will rewrite the previous example with named variable in place of quick "i" var<br />
&nbsp;&nbsp;just for learning purposes.<br />
<br />
&nbsp;&nbsp;!!re (monTypePtr:y)/(@monTypes)/(@monTypes[-1&#93;):; repeat from (monTypePtr) = first array index to (monTypePtr) = last array index<br />
&nbsp;&nbsp;&nbsp;&nbsp;!!VRy(monTypePtr):S-1; set -1 for current array item<br />
&nbsp;&nbsp;!!en:;<br />
<br />
&nbsp;&nbsp;--- Naming function arguments ---<br />
&nbsp;&nbsp;Indexes for named local variables are allocated starting from the smallest possible value.<br />
&nbsp;&nbsp;It means, that we can name even function arguments if we declare them in the same order, as arguments will be passed.<br />
&nbsp;&nbsp;Example:<br />
<br />
&nbsp;&nbsp;!?FU(BH_GetHeroSecSkill);<br />
&nbsp;&nbsp;!#VA(hero:x) (skill:x) (result:x); now hero = x1, skill = x2, result = x3<br />
&nbsp;&nbsp;!!HE(hero):S(skill)/?(result);<br />
<br />
&nbsp;&nbsp;!?FU(...); some event<br />
&nbsp;&nbsp;!!FU(BH_GetHeroSecSkill)/(HERO_XERON)/(SKILL_FIRST_AID)/?(xeronFirstAidLevel:y); so what's the level of First Aid skill Xeron has? )<br />
<br />
&nbsp;&nbsp;--- Redeclaration ---<br />
&nbsp;&nbsp;If you need to declare variable in both branches of if-then block, specify type/length in both of them.<br />
<br />
&nbsp;&nbsp;!!if&amp;(day)&gt;90:;<br />
&nbsp;&nbsp;&nbsp;&nbsp;!!VR(price:y):S(day) *100;<br />
&nbsp;&nbsp;&nbsp;&nbsp;...<br />
&nbsp;&nbsp;!!el:;<br />
&nbsp;&nbsp;&nbsp;&nbsp;!!VR(price:y):S(day) *(difficultyLevel) +300;<br />
&nbsp;&nbsp;&nbsp;&nbsp;...<br />
&nbsp;&nbsp;!!en:; <br />
<br />
&nbsp;&nbsp;--- Reusing same name in other trigger ---<br />
&nbsp;&nbsp;Variable names are local to nearest trigger only. New trigger starts with no declared variables.<br />
&nbsp;&nbsp;Example:<br />
<br />
&nbsp;&nbsp;!?FU(OnHeroScreenMouseClick);<br />
&nbsp;&nbsp;!!CM:F?(flags:y); flags = y1<br />
<br />
&nbsp;&nbsp;!?FU(OnHeroScreenMouseClick);<br />
&nbsp;&nbsp;!#VA(flags[23&#93;:e); flags is array, binded to e1..e23<br />
<br />
&nbsp;&nbsp;--- Interpolation ---<br />
&nbsp;&nbsp;To substitute local variables in string literals use %(varName) syntax. Example:<br />
&nbsp;&nbsp;!!VR(price:y):S600;<br />
&nbsp;&nbsp;!!VR(heroName:z):S^Robin Hood^;<br />
&nbsp;&nbsp;!!IF:Q2/^Would you like to hire %(heroName) for %(price) gold only?^;<br />
<br />
&nbsp;&nbsp;%y(varName) syntax is also supported and compiles to something like %yy5.<br />
<br />
<br />
&nbsp;&nbsp;==== Named functions ====<br />
&nbsp;&nbsp;Function names must consist of [A-Za-z0-9_&#93; characters only, start with letter and contain at least<br />
&nbsp;&nbsp;single lower case letter (a-z).<br />
&nbsp;&nbsp;There are two allowed naming methods:<br />
&nbsp;&nbsp;1) Start function with capital letter. (CalcHeroArmyPower), (ShowUpgradeDialog).<br />
&nbsp;&nbsp;ERA reserves right to declare prefixless functions, starting with "On" for events. This method is not<br />
&nbsp;&nbsp;recommended, due to possible names collisions in different mods. Two mods may declare functions<br />
&nbsp;&nbsp;will the same names and thus produce hard to debug bugs.<br />
<br />
&nbsp;&nbsp;2) Start function with any case unique prefix with '_' character. Prefix is usually mod abbreviation.<br />
&nbsp;&nbsp;For instance, for "Dwellings Extended" mod the following functions are used:<br />
&nbsp;&nbsp;!?FU(dex_SetDwellingSlotByTownType);<br />
&nbsp;&nbsp;!?FU(dex_DwellingPopulation);<br />
&nbsp;&nbsp;...<br />
<br />
&nbsp;&nbsp;--- Generating new events ---<br />
&nbsp;&nbsp;You can call function, even if it has no handlers. For instance, in Upgrade All Creatures mod you<br />
&nbsp;&nbsp;want to allow other scripts to be able to notify, what monster can be upgraded to in particular town.<br />
&nbsp;&nbsp;Just call not existing function like !!FU(auc_OnDetermineMonsterUpgrade):P... in your script with all<br />
&nbsp;&nbsp;necessary parameters and other scripts will be able to write new event handlers like:<br />
<br />
&nbsp;&nbsp;!?FU(auc_OnDetermineMonsterUpgrade);<br />
&nbsp;&nbsp;...<br />
<br />
&nbsp;&nbsp;--- Passing function as handlers or callbacks ---<br />
&nbsp;&nbsp;You can use function as ordinary constant, compiled to number. You can assign it to variable or pass to<br />
&nbsp;&nbsp;another function.<br />
&nbsp;&nbsp;!!VR(spellHandler:y):S(newmagic_DesintegrationSpellHandler);<br />
&nbsp;&nbsp;!!FU(spellHandler):P;<br />
<br />
&nbsp;&nbsp;will compile to something like that<br />
<br />
&nbsp;&nbsp;!!VRy20:S95003;<br />
&nbsp;&nbsp;!!FUy20:P;<br />
<br />
[+&#93; Added 1000 era - stdlib.erm script, which will contain safe for all extra ERM functionality.<br />
&nbsp;&nbsp;&nbsp;&nbsp;Currently !?FU(OnEvenyDay) event is enhanced. Its handlers will receive 5 parameters:<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;!?FU(OnEveryDay);<br />
&nbsp;&nbsp;&nbsp;&nbsp;!#VA(day:x1) (weekDay:x) (once:x) (owner:x) (isAi:x);<br />
&nbsp;&nbsp;&nbsp;&nbsp;!!IF:M^%(day) %(weekDay) %(once) %(owner) %(isAi)^;<br />
<br />
[+&#93; Added 1000 era - consts.erm script with lots of constants to be used in ERM 2.0 scripts.<br />
&nbsp;&nbsp;&nbsp;&nbsp;ERM Editor, based on Sublime Text, supports constants autocompletion.<br />
&nbsp;&nbsp;&nbsp;&nbsp;Remember, that constants without mod name prefix are reserved for ERA.<br />
&nbsp;&nbsp;&nbsp;&nbsp;Prefer BH_GOLD_PER_VICTORY to GOLD_PER_VICTORY for Battle Heroes mod, for instance.<br />
<br />
[+&#93; Floating point variables (e-variables) are passed to ERM commands as raw 4 bytes value,<br />
&nbsp;&nbsp;&nbsp;&nbsp;treated by most commands as integer, which may cause many bugs, unless you know, what you are doing.<br />
&nbsp;&nbsp;&nbsp;&nbsp;The exception is !!VR:S command, allowing transparent conversion integer-float. To copy float value,<br />
&nbsp;&nbsp;&nbsp;&nbsp;stored in raw format in integer variable to e-variable and vice versa use !!VR:C command. It acts same<br />
&nbsp;&nbsp;&nbsp;&nbsp;as VR:S, but without data conversion.<br />
<br />
[+&#93; New command !!VR&#36;1:S#2/#3. Convert float to integer using specific rounding mode.<br />
&nbsp;&nbsp;&nbsp;&nbsp;&#36;1 - integer variable.<br />
&nbsp;&nbsp;&nbsp;&nbsp;#2 - float variable<br />
&nbsp;&nbsp;&nbsp;&nbsp;#3 - rounding mode:<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt; 0 for floor operation (round towards negative infinity),<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0 for normal round (round half away from zero),<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&gt; 0 for ceil operation (round towards positive infinity).<br />
<br />
[+&#93; !!VR: +/-/*/:/% convert both arguments to float if any is float before calculation and convert back<br />
&nbsp;&nbsp;&nbsp;&nbsp;to base var type on return.<br />
&nbsp;&nbsp;&nbsp;&nbsp;Thus<br />
&nbsp;&nbsp;&nbsp;&nbsp;!!VR(koef:e):S25 :10; koef = 2.5<br />
&nbsp;&nbsp;&nbsp;&nbsp;!!VR(gold:y):S2 *koef; gold = 5, not 4<br />
<br />
[+&#93; New command !!VR&#36;1:~#2<br />
&nbsp;&nbsp;&nbsp;&nbsp;Unsets bits #2 in &#36;1 integer variable.<br />
&nbsp;&nbsp;&nbsp;&nbsp;Example:<br />
&nbsp;&nbsp;&nbsp;&nbsp;!!VR(flags):~17; unset bits/flags 1 + 16 from (flags) variable.<br />
&nbsp;&nbsp; <br />
[+&#93; New command !!VR&#36;1:Z#2. Creates trigger local temporary z-variable with given contents and assigns its index to integer variable.<br />
&nbsp;&nbsp;&nbsp;&nbsp;&#36;1 - integer variable.<br />
&nbsp;&nbsp;&nbsp;&nbsp;#2 - any string.<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;The command can be used to create temporal z-variables to change, for example, artifact description,<br />
&nbsp;&nbsp;&nbsp;&nbsp;show message and restore description.<br />
<br />
[+&#93; ^....^ literal in any ERM command is interpolated and replaced by temporal z-variable index before receiver<br />
&nbsp;&nbsp;&nbsp;&nbsp;execution. This z-variable is released right after receiver is executed.<br />
&nbsp;&nbsp;&nbsp;&nbsp;Don't use string literals in WoG 3.58 hint/description setting commands, because such descriptions have short life time.<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;From now it's possible to pass strings to functions.<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;!?FU(ES_Ask);<br />
&nbsp;&nbsp;&nbsp;&nbsp;; Shows question dialog with caption. Returns boolean (1 on success and 0 on failure).<br />
&nbsp;&nbsp;&nbsp;&nbsp;!#VA(captionPtr:x) (questionPtr:x) (result:x);<br />
&nbsp;&nbsp;&nbsp;&nbsp;!!IF:Q1/^{%z(captionPtr)}<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;%z(questionPtr)^;<br />
&nbsp;&nbsp;&nbsp;&nbsp;!!VR(result):S0;<br />
&nbsp;&nbsp;&nbsp;&nbsp;!!VR(result)&amp;1:S1;<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;!?OB(OBJ_TOWN)/(ANY_OBJ);<br />
&nbsp;&nbsp;&nbsp;&nbsp;!!FU(ES_Ask):P^Sphinx asks you:^/^Do you really want to die, fighting my guards?^/?(answer:y);<br />
&nbsp;&nbsp;&nbsp;&nbsp;!!HE(CURRENT_HERO)&amp;(answer)=1:K1; let him die )))<br />
<br />
[+&#93; Only regular ERT variables are interpolated automatically.<br />
&nbsp;&nbsp;&nbsp;&nbsp;Regular z-variables and temporal ert variables are not interpolated in receivers.<br />
&nbsp;&nbsp;&nbsp;&nbsp;It means, that !!VRz2:S^%%y5^; z2 is now really "%y5"<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;Previously interpolation would be performed again and again recursively, converting %y5 into y5 value like 0.<br />
&nbsp;&nbsp;&nbsp;&nbsp;and even later using z2 in any command would run interpolation again.<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;!!IF:M1/z2; will display "%y5", not y5 value.<br />
<br />
[+&#93; New VR&#36;1:R/T syntax: 0/min/max - generates random value in given range and assignes it to &#36;1 integer variable.<br />
[+&#93; VR:R/T now both support syntaxes with 1/2/3 arguments.<br />
[+&#93; VR:T uses Mersenne Twister qualitive generator, but it's not synchronized in multiplayer.<br />
[+&#93; VR:M1. -1 as length means "till string end".<br />
<br />
[+&#93; VR:M2 does not store token index in global variable anymore. Token index, that was ignored earlier, works now as expected.<br />
&nbsp;&nbsp; Token delimiters are [#1..#31, ' ', ',', '.'&#93;. Don't use for huge text, because performance is O(n^2), where n is tokens number.<br />
<br />
[+&#93; VR:M3 Base/radix is enforced to be in 2..16 range.<br />
<br />
[+&#93; ERM interpolation (expanding variables starting with % in string literals ^...^ and ERT strings) was fully rewritten.<br />
&nbsp;&nbsp;&nbsp;&nbsp;Upper case registry for old ERM variables is supported, but deprecated.<br />
&nbsp;&nbsp;&nbsp;&nbsp;%X1 is good, but %x1 is better.<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;All new s^...^, i^...^ and named local variables are supported.<br />
&nbsp;&nbsp;&nbsp;&nbsp;Indirect references is supported.<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;%s(named global variable)<br />
&nbsp;&nbsp;&nbsp;&nbsp;%i(named global variable)<br />
&nbsp;&nbsp;&nbsp;&nbsp;%xy7<br />
&nbsp;&nbsp;&nbsp;&nbsp;%zi^named global variable^<br />
&nbsp;&nbsp;&nbsp;&nbsp;%z(namedLocalVar)<br />
&nbsp;&nbsp;&nbsp;&nbsp;%(namedLocalVar)<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;Quick vars are supported:<br />
&nbsp;&nbsp;&nbsp;&nbsp;%i %g %k<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;Interpolation of %Vf...t meaning is changed to real v-indexing<br />
&nbsp;&nbsp;&nbsp;&nbsp;%vi means v-var with i-index.<br />
&nbsp;&nbsp;&nbsp;&nbsp;%f means quick 'f' var.<br />
&nbsp;&nbsp;&nbsp;&nbsp;%i means quick 'i' var.<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;%F5 means flag 5<br />
&nbsp;&nbsp;&nbsp;&nbsp;%Fx16 means flag with x16 index<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;Function IDs and constants can be interpolated in the same way, as named local variables:<br />
&nbsp;&nbsp;&nbsp;&nbsp;%(CONST_NAME), %(era_FuncName), %(money), %y(moneyPtr)<br />
<br />
[+&#93; IF:M# now works with any string<br />
[+&#93; IF:N1/# now works with any string, not z1 only.<br />
[+&#93; IF:N# now works with any string.<br />
[+&#93; BA:B now can work with any string and integer.<br />
<br />
[+&#93; Call SN:F^GenerateDebugInfo^ to generate Debug directory contents, the same way as F11 does.<br />
<br />
[+&#93; Exported "NameTrigger" function (void NameTrigger(int TriggerId, const char* Name)), allowing plugins to<br />
&nbsp;&nbsp;&nbsp;&nbsp;give name to any ERM trigger, which can be used in ERM like !?FU(OnYourNewEvent).<br />
<br />
[+&#93; Updated "wog native dialogs" plugin by igrik. From now it's possible to select item in message dialogs<br />
&nbsp;&nbsp;&nbsp;&nbsp;using mouse double click.<br />
<br />
[+&#93; s^...^, ^...^, i^...^ can now be freely used in conditions.<br />
<br />
[+&#93; New d-modifiers (d~, d%, d|, d&amp;, d&lt;&lt;, d&gt;&gt;) work with all receivers.<br />
<br />
[+&#93; Rewritten ert-strings storage implementation. Removed limit on 50000 strings. Increased add/delete operations<br />
&nbsp;&nbsp;&nbsp;&nbsp;performance (from linear search to binary tree search). Savegames format was changed.<br />
<br />
[+&#93; Added VR:C alternative for SN:M arrays. New command !!SN:U#1/#2/&#36;3...up to &#36;21 allows to set/check/get/modify<br />
&nbsp;&nbsp;&nbsp;&nbsp;many items of dynamical array.<br />
&nbsp;&nbsp;&nbsp;&nbsp;#1 - SN:M array ID.<br />
&nbsp;&nbsp;&nbsp;&nbsp;#2 - starting index<br />
&nbsp;&nbsp;&nbsp;&nbsp;&#36;3... - items at starting index, starting index + 1, starting index + 2, etc.<br />
<br />
[+&#93; Added new command !!VR:R0/#min/#max, generating random value in specified range and assigning its to variable.<br />
&nbsp;&nbsp;&nbsp;&nbsp;Example: !!VRy1:R0/100/300; set y1 to random value in 100..300 range<br />
<br />
[*&#93; The following exported functions now return 4-bytes LONGBOOL value, 0 for false, -1 (0xFFFFFFFF) for true.<br />
&nbsp;&nbsp;&nbsp;&nbsp;"ReadStrFromIni", "WriteStrToIni", "SaveIni", "PatchExists", "PluginExists", "Ask".<br />
<br />
[+&#93; Added "1000 - era consts.erm" script to WoG mod with standard Era constants, including players,<br />
&nbsp;&nbsp;&nbsp;&nbsp;player bits, heroes, resources, objects, monsters, artifacts, spells. The file contents may be corrected<br />
&nbsp;&nbsp;&nbsp;&nbsp;and widened in the future. All constants were registered in Erm Editor, based on Sublime Text.<br />
<br />
[+&#93; Added "1000 - era stdlib.erm" script with universal ERM functions and events. Currently "OnEveryDay"<br />
&nbsp;&nbsp;&nbsp;&nbsp;event is enhanced with the following x-arguments: day, week day, once(0..1), owner (color), isAi (0..1).<br />
<br />
[*&#93; Fixed WoG bug with tactics detection on the very first round. Do not use BU:R in !?BR or !?FU(OnCombatRound) for zero round,<br />
&nbsp;&nbsp;&nbsp;&nbsp;because a few structures are not initialized at this moment and random crash may occur. First round code was moved after<br />
&nbsp;&nbsp;&nbsp;&nbsp;combat theme initialization and tactics popup message appearance.<br />
<br />
[+&#93; All *.ers files are loaded without name/quantity constraints. Previously only script00.ers..script99.ers were processed.<br />
<br />
[+&#93; HE:P command behavior was fixed. Teleport function with sound is called only if any coordinate<br />
&nbsp;&nbsp;&nbsp;&nbsp;was really changed. Advanced d-modifiers are supported for the first three parameters.<br />
<br />
[+&#93; HE:C0 command was rewritten.<br />
&nbsp;&nbsp;&nbsp;&nbsp;-1 and -2 values for creature type are not treated as "upgrade"/"degrade" anymore. Command supports any d-modifiers now.<br />
&nbsp;&nbsp;&nbsp;&nbsp;Exp. modifier parameter is now SET-only. Previosly !!HE:C0/0/?y1/?y2/d5000/2 would not increase slot experience.<br />
&nbsp;&nbsp;&nbsp;&nbsp;In fact, any GET syntax used to make ERM engine ignore stack experience at all. This bug was fixed.<br />
&nbsp;&nbsp;&nbsp;&nbsp;Creature Type &lt; 0 or Number &lt;= 0 will be normalized to Type -1, Number 0 automatically.<br />
&nbsp;&nbsp;&nbsp;&nbsp;Note, that in all cases the returned stack experience value is the one before applying any changes.<br />
<br />
[+&#93; Rewritten HE:X command to accept any number of parameters and understand any d-modifiers.<br />
&nbsp;&nbsp;&nbsp;&nbsp;Example: !!HE-1:X0/27 Xd1; become master of gold dragons<br />
<br />
[+&#93; Introduces many new d-modifiers for all ERM commands, except for GE:E/N, LE:E/N.<br />
&nbsp;&nbsp;&nbsp;&nbsp;d+# - integer addition<br />
&nbsp;&nbsp;&nbsp;&nbsp;d-# - integer substraction<br />
&nbsp;&nbsp;&nbsp;&nbsp;d*# - integer multiplication<br />
&nbsp;&nbsp;&nbsp;&nbsp;d:# - integer division<br />
&nbsp;&nbsp;&nbsp;&nbsp;d|# sets bits from # (bitwise OR operation)<br />
&nbsp;&nbsp;&nbsp;&nbsp;d&amp; leaves only # bits, if any (bitwise AND operation)<br />
&nbsp;&nbsp;&nbsp;&nbsp;d~ unsets bits, specified in #. d~17 unsets bits 1 and 16<br />
&nbsp;&nbsp;&nbsp;&nbsp;d%# calculates division modulo. 10%4 = 2, for instance.<br />
&nbsp;&nbsp;&nbsp;&nbsp;d&lt;&lt;# shifts original value bits to the left by # positions (bitwise logical shift left).<br />
&nbsp;&nbsp;&nbsp;&nbsp;d&gt;&gt;# shifts original value bits to the right by # positions (bitwise logical shift right.<br />
<br />
[+&#93; Function parameters (FU:P, DO:P), which were passed using GET-syntax, are now initialized with<br />
&nbsp;&nbsp;&nbsp;&nbsp;original variable value. The behavior is similar to pass-by-reference in other programming languages.<br />
&nbsp;&nbsp;&nbsp;&nbsp;Example:<br />
&nbsp;&nbsp;&nbsp;&nbsp;!?FU(Add3):;<br />
&nbsp;&nbsp;&nbsp;&nbsp;; (value:x)<br />
&nbsp;&nbsp;&nbsp;&nbsp;!!VR(value:x):+3;<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;!?CM0;<br />
&nbsp;&nbsp;&nbsp;&nbsp;!!VR(numHeads:y):S10;<br />
&nbsp;&nbsp;&nbsp;&nbsp;!!FU(Add3):P?(numHeads:y); 10 is passed to function as the first argument, 13 is result<br />
<br />
[+&#93; Enhanced !!RD:I with new named parameters syntax.<br />
&nbsp;&nbsp;&nbsp;&nbsp;!!RD:I^parameter name^/?&#36;parameter_value;<br />
&nbsp;&nbsp;&nbsp;&nbsp;============================== Featured parameters: ==============================<br />
&nbsp;&nbsp;&nbsp;&nbsp;^dlgId^&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- Unique recruit dialog ID. Used to distinguish between nested dialogs (yep, it's possible). Reusable.<br />
&nbsp;&nbsp;&nbsp;&nbsp;^townId^&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; - ID of town, for which dialog is opened or -1.<br />
&nbsp;&nbsp;&nbsp;&nbsp;^dwellingId^&nbsp;&nbsp; - ID of town dwelling, for which dialog is opened or -1. 0..6 non upgraded, 7..13 for upgraded.<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Horde buildings (+X population) are treated as dwellings, they influence.<br />
&nbsp;&nbsp;&nbsp;&nbsp;^slot^&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; - Active logical slot index.<br />
&nbsp;&nbsp;&nbsp;&nbsp;^cost^&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; - Cost of single monster in current slot in gold.<br />
&nbsp;&nbsp;&nbsp;&nbsp;^resource^&nbsp;&nbsp;&nbsp;&nbsp; - Special resource for monster in current slot.<br />
&nbsp;&nbsp;&nbsp;&nbsp;^resourceCost^ - Cost of single monster in current slot in special resource.<br />
&nbsp;&nbsp;&nbsp;&nbsp;^quantity^&nbsp;&nbsp;&nbsp;&nbsp; - Number of monsters, currently selected for recruitment.<br />
&nbsp;&nbsp;&nbsp;&nbsp;^maxQuantity^&nbsp;&nbsp;- Maximal number of monsters, the player can afford.<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;Example:<br />
&nbsp;&nbsp;&nbsp;&nbsp;!?FU(OnRecruitDlgMouseClick);<br />
&nbsp;&nbsp;&nbsp;&nbsp;!!RD:I^dlgId^/?(dlgId:y) I^townId^/?(townId:y) I^dwellingId^/?(dwellingId:y) I^slot^/?(slot:y) I^cost^/?(cost:y);<br />
&nbsp;&nbsp;&nbsp;&nbsp;!!RD:I^resource^/?(resource:y) I^resourceCost^/?(resourceCost:y) I^quantity^/?(quantity:y) I^maxQuantity^/?(maxQuantity:y);<br />
&nbsp;&nbsp;&nbsp;&nbsp;!!IF:M^(dlgId:y) (townId:y) (dwellingId:y) (slot:y) (cost:y) (resource:y) (resourceCost:y) (quantity:y) (maxQuantity:y)^;<br />
<br />
[+&#93; Enhanced !!UN:C command. It supports all d-modifiers now. New syntax with offset from address is available:<br />
&nbsp;&nbsp;&nbsp;&nbsp;!!UN:C#addr/#offset/#size/&#36;value;<br />
&nbsp;&nbsp;&nbsp;&nbsp;Era always calls GetRealAddr for #addr, thus !!UN:C supports all extended/relocated game structures.<br />
<br />
[+&#93; WoG interface and WoG campaigns were extracted to appropriate standalone mods. ERA is now mostly Vanilla game with<br />
&nbsp;&nbsp;&nbsp;&nbsp;enhanced ERM engine and other modding capabilities.<br />
<br />
[+&#93; Added !!BM:Z?&#36;addr command to get battle stack structure address.<br />
[+&#93; Added !!HE:Z?&#36;addr command to get hero structure address.<br />
[+&#93; Introduced ERM 2.0 support for scripts, beginning with 'ZVSE2'.<br />
[+&#93; Doubled stack size for h3era.exe executable to allow trigger depth level up to 150, but better avoid such depth.<br />
<br />
[+&#93; WoG Campaign editor loads resources from hmm35wog.pac and uses virtual file system. No more Campaign Fix required.<br />
[+&#93; Added extended resources redirection support with wav/bik/smk files, including missing resources redirection.<br />
<br />
[+&#93; Added new plugins events "OnAfterLoadLods", occured right after lods/pacs are loaded and "OnAfterLoadMedia", occured<br />
&nbsp;&nbsp;&nbsp;&nbsp;when lod/pacs/snd/vids are loaded.<br />
<br />
[*&#93; ERA is recommended to be installed over Heroes 3 Complete only. Removed resources, which are already present in Complete lods.<br />
<br />
[-&#93; Restored functionality of Data&#92;Redirections&#92;Missing&#92;*.json files, which are used to setup redirections<br />
&nbsp;&nbsp;&nbsp;&nbsp;for missing resources only.<br />
<br />
[+&#93; ERM quick vars (f..t) are now local to triggers. Use them safely.<br />
<br />
[+&#93; Update ERM Editor.<br />
[+&#93; Rewritten core of ERM engine. Greatly improved old macro support (&#36;macronam&#36;). Just for perfection.<br />
<br />
[+&#93; Extracted WoG campaigns into standalone mod, which was removed from Era installer package.<br />
<br />
[+&#93; "remove exe protection.bin" was applied to h3era.exe and removed as patch.<br />
<br />
[+&#93; Many resources and features were extracted from WoG mod into separate mods: Animated Object Flags, Animated Trees,<br />
&nbsp;&nbsp;&nbsp;&nbsp;No Prebattle Music, Secondary Skills Scrolling, Quick Savings, Fast Battle Animation, Improved Battle Decorations,<br />
&nbsp;&nbsp;&nbsp;&nbsp;WoG Interface, WoG Campaigns, Yona.<br />
<br />
[+&#93; Added new event "OnDetermineMonInfoDlgUpgrade", occured, when game determines wether to show upgrade button<br />
&nbsp;&nbsp;&nbsp;&nbsp;in monster info dialog. Parameters: MonType, UpgradedType or -1, Town ID or -1, Hero ID or -1.<br />
&nbsp;&nbsp;&nbsp;&nbsp;-1 for UpgradedType means no upgrade button (because of wrong town type or appropriate building being not built, or monster having no upgrade).<br />
&nbsp;&nbsp;&nbsp;&nbsp;You can change this value to allow universal Jelu-like behavior or any upgrade system.<br />
&nbsp;&nbsp;&nbsp;&nbsp;Example:<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;ZVSE2<br />
&nbsp;&nbsp;&nbsp;&nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp;!?FU(OnDetermineMonInfoDlgUpgrade);<br />
&nbsp;&nbsp;&nbsp;&nbsp;!#VA(monType:x) (upgType:x) (town:x) (hero:x);<br />
&nbsp;&nbsp;&nbsp;&nbsp;!!VR(upgType):S(MON_GOLD_DRAGON); allow upgrade anything into Gold Dragons<br />
<br />
[+&#93; SN/RD/MP receivers now support indexed parameters like vy6 or zi^myIndex^.<br />
<br />
[+&#93; SN:D may be used now in battle, being equal to BU:R.<br />
<br />
[+&#93; Added support for trigger local dynamical arrays. !!SN:M-1/#/#/-1 will allocate new dynamical array<br />
&nbsp;&nbsp;&nbsp;&nbsp;with ID, that will be automatically released after current trigger is exited. Thus no<br />
&nbsp;&nbsp;&nbsp;&nbsp;corresponding !!SN:M# is necessary to release this temporary array. It can be used, for instance,<br />
&nbsp;&nbsp;&nbsp;&nbsp;for large calculations or to pass string arguments to function.<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;Example:<br />
&nbsp;&nbsp;&nbsp;&nbsp;!?FU(OnAdventureMapRightMouseClick);<br />
&nbsp;&nbsp;&nbsp;&nbsp;!!SN:M-1/4/1/-1;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[allocate 4 strings array (-1 = auto ID, 4 = 4 items, 1 = of string type, -1 = local to current trigger)&#93;<br />
&nbsp;&nbsp;&nbsp;&nbsp;!!VR(dlgStrings:y):Sv1; [save array ID&#93;<br />
&nbsp;&nbsp;&nbsp;&nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp;; Setup strings<br />
&nbsp;&nbsp;&nbsp;&nbsp;!!SN:M(dlgStrings)/0/^Select commander bonus:^;<br />
&nbsp;&nbsp;&nbsp;&nbsp;!!SN:M(dlgStrings)/1/^1) Attack^;<br />
&nbsp;&nbsp;&nbsp;&nbsp;!!SN:M(dlgStrings)/2/^2) Speed^;<br />
&nbsp;&nbsp;&nbsp;&nbsp;!!SN:M(dlgStrings)/3/^3) Health^;<br />
&nbsp;&nbsp;&nbsp;&nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp;!!FU(PM_ShowDialog):P(dlgStrings); [pass 4 string to dialog showing function&#93;<br />
&nbsp;&nbsp;&nbsp;&nbsp;; here array with (dlgStrings) ID will be automatically freed, same as SN:M(dlgStrings);<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;!?FU(PM_ShowDialog);<br />
&nbsp;&nbsp;&nbsp;&nbsp;; (dlgStrings:x) - dynamical array of 4 strings<br />
&nbsp;&nbsp;&nbsp;&nbsp;; (items[3&#93;:z)<br />
&nbsp;&nbsp;&nbsp;&nbsp;!!SN:M(dlgStrings)/0/?(caption:z);<br />
&nbsp;&nbsp;&nbsp;&nbsp;!!SN:M(dlgStrings)/1/?(items[0&#93;);<br />
&nbsp;&nbsp;&nbsp;&nbsp;!!SN:M(dlgStrings)/2/?(items[1&#93;);<br />
&nbsp;&nbsp;&nbsp;&nbsp;!!SN:M(dlgStrings)/3/?(items[2&#93;);<br />
&nbsp;&nbsp;&nbsp;&nbsp;!!IF:M^{(caption)}<br />
&nbsp;&nbsp;&nbsp;&nbsp;(items[0&#93;)<br />
&nbsp;&nbsp;&nbsp;&nbsp;(items[1&#93;)<br />
&nbsp;&nbsp;&nbsp;&nbsp;(items[2&#93;)^;<br />
<br />
[-&#93; Fixed memory leakage in SN:M dynamical arrays deallocation and a few other places.</code></div></div>
</div></div>]]></description>
			<content:encoded><![CDATA[<span style="font-size: large;"><div style="text-align: center;"><span style="color: #FF0000;"><span style="font-weight: bold;">ERA 3</span></span></div></span><br />
<div style="text-align: center;"><img src="https://i.ibb.co/kyxHFRW/era3-poster2.jpg" border="0" alt="Image: era3-poster2.jpg" style='max-width: 800px; height: auto;' onclick='Bers.ScaleImg(this);'/></div>
<br />
<img src="https://vk.com/emoji/e/e29aa1.png" border="0" alt="Image: e29aa1.png" style='max-width: 800px; height: auto;' onclick='Bers.ScaleImg(this);'/> <span style="color: #7e0e0e;"><span style="font-weight: bold;">Вышла новая мажорная версия HoMM 3 ERA</span></span><br />
Текущая версия: <span style="color: #FF0000;"><span style="font-weight: bold;">3.0.0</span></span> (альфа 0)<br />
<br />
<img src="https://vk.com/emoji/e/f09f9383.png" border="0" alt="Image: f09f9383.png" style='max-width: 800px; height: auto;' onclick='Bers.ScaleImg(this);'/> Что нового ?<br />
<br />
<img src="https://vk.com/emoji/e/e2ad90.png" border="0" alt="Image: e2ad90.png" style='max-width: 800px; height: auto;' onclick='Bers.ScaleImg(this);'/> Опциональный режим ERM 2.0: именованные константы, локальные переменные и функции на стадии прекомпиляции. На ЕРМ становится возможным писать понятный код с малым числом комментариев.<br />
<img src="https://vk.com/emoji/e/e2ad90.png" border="0" alt="Image: e2ad90.png" style='max-width: 800px; height: auto;' onclick='Bers.ScaleImg(this);'/> Переписан движок ЕРМ: множество исправлений наследия прошлого, универсальный синтаксис, удобная работа со строками, исправление багов, расширение и добавление команд и многое другое.<br />
<img src="https://vk.com/emoji/e/e2ad90.png" border="0" alt="Image: e2ad90.png" style='max-width: 800px; height: auto;' onclick='Bers.ScaleImg(this);'/> Добавлена стандартная библиотека ЭРЫ на ERM: 1 расширенное событие и тысячи предопределённых констант.<br />
<img src="https://vk.com/emoji/e/e2ad90.png" border="0" alt="Image: e2ad90.png" style='max-width: 800px; height: auto;' onclick='Bers.ScaleImg(this);'/> ЭРА становится полноценным ядром для мододелов всех мастей: больше нет навязанных модов, анимации, большинства графических изменений, нового интерфейса, заменённых кампаний и музыки и т.д. Установив ЭРУ вы получаете рабочий скелет со всеми инструментами для создания уникальной сборки под ваши вкусы и желания. Базовый комплект новых монстров/объектов из WoG 3.58 остаётся в качестве ресурсов и включаемых/выключаемых игровых механик.<br />
<br />
<img src="https://vk.com/emoji/e/e29884.png" border="0" alt="Image: e29884.png" style='max-width: 800px; height: auto;' onclick='Bers.ScaleImg(this);'/> Скачать основной установщик: <a href="https://mods.hmm35.ru/Era%203.X.exe" target="_blank">https://mods.hmm35.ru/Era%203.X.exe</a><br />
<img src="https://vk.com/emoji/e/e29884.png" border="0" alt="Image: e29884.png" style='max-width: 800px; height: auto;' onclick='Bers.ScaleImg(this);'/> Скачать минорное обновление (может устаревать, только для создателей сборок): <a href="https://mods.hmm35.ru/Era%20Update.exe" target="_blank">https://mods.hmm35.ru/Era%20Update.exe</a><br />
<br />
<div class="notranslate"><div class="spoiler_header">История изменений: <a href="javascript:void(0);" onclick="javascript:if(parentNode.parentNode.getElementsByTagName('div')[1].style.display=='block'){parentNode.parentNode.getElementsByTagName('div')[1].style.display='none';this.innerHTML='(Click to View)';}else {parentNode.parentNode.getElementsByTagName('div')[1].style.display='block';this.innerHTML='(Click to Hide)';}">(Click to View)</a></div><div class="spoiler_body" style="display: none; border: 1px dotted #0F5C8E;"><div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>Version 3.0.0 (06/2020)<br />
------------------------<br />
[+] Introduced advanced ERM precompilation mode, called ERM 2.0 and activated via "ZVSE2" first line signature.<br />
&nbsp;&nbsp;Main features:<br />
&nbsp;&nbsp;&nbsp;&nbsp;- Named local variables to write human readable code instead of cryptic one.<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Example: !!HE-1:C0/0/?(monType:y)/?(monNum:y) instead of !!HE-1:C0/0/?y23/?y24;<br />
&nbsp;&nbsp;&nbsp;&nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp;- Global named constants instead of magic numbers to write self-explaining code:<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Example: !?FU(OnKeyPressed)&amp;x1=(KEY_1) instead of !?FU(OnKeyPressed)&amp;x1=49; what is 49???<br />
&nbsp;&nbsp;&nbsp;&nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp;- Strict distinguishing naming for functions, local variables and constants. No way to mix up.<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Example: thisIsVariable, THIS_IS_CONSTANT, ThisIsFunction and era_ThisIsFunctionAgain.<br />
<br />
&nbsp;&nbsp;==== Named global constants ====<br />
&nbsp;&nbsp;Constant is named value, that is defined once and never changes. Like 13 (Archangel monster type).<br />
&nbsp;&nbsp;Constant can be used anywere, where numbers can be used. Era currently supports only integer numeric<br />
&nbsp;&nbsp;constants, written in all capitals: (MON_ARCHANGEL), (OBJ_MINE), (PLAYER_RED).<br />
&nbsp;&nbsp;Allowed characters are: [A-Z0-9_].<br />
&nbsp;&nbsp;To define a constant use the following instruction !#DC(CONSTANT_NAME) = 777; where 777 is arbitrary number.<br />
&nbsp;&nbsp;Examples:<br />
&nbsp;&nbsp;!#DC(PLAYER_BLUE)&nbsp;&nbsp;&nbsp;&nbsp; = 1;<br />
&nbsp;&nbsp;!#DC(SKILL_FIRST_AID) = 27;<br />
<br />
&nbsp;&nbsp;To use a constant simply write its name in parentheses:<br />
&nbsp;&nbsp;!!OW:R(CURRENT_PLAYER)/(RES_GOLD)/d1000; give 1000 gold to current player<br />
<br />
&nbsp;&nbsp;will be compiled to<br />
<br />
&nbsp;&nbsp;!!OW:R-1/6/d1000; give 1000 gold to current player<br />
<br />
&nbsp;&nbsp;--- Naming ---<br />
&nbsp;&nbsp;Scripts writers must use unique prefix before constant names to prevent names collisions. Any constants without prefix<br />
&nbsp;&nbsp;may be added to ERA in the future and break your script.<br />
&nbsp;&nbsp;Example:<br />
&nbsp;&nbsp;; for mod Battle Heroes let's use prefix "BH_"<br />
&nbsp;&nbsp;!#DC(BH_ART_RING_OF_POWER) = 160;<br />
&nbsp;&nbsp;<br />
&nbsp;&nbsp;!#DC(BH_CLASS_WARRIOR) = 1;<br />
&nbsp;&nbsp;!#DC(BH_CLASS_MAGE)&nbsp;&nbsp;&nbsp;&nbsp;= 2;<br />
&nbsp;&nbsp;!#DC(BH_CLASS_RANGER)&nbsp;&nbsp;= 3;<br />
<br />
&nbsp;&nbsp;--- Globality ---<br />
&nbsp;&nbsp;Constants are global. It means, that one script can use constants of another script. To ensure, that your constants<br />
&nbsp;&nbsp;are always loaded before other scripts, place them in the script with high priority (ex. "1000 - phoenix consts.erm").<br />
&nbsp;&nbsp;<br />
&nbsp;&nbsp;--- Standard constants ---<br />
&nbsp;&nbsp;ERA provides file "1000 - era consts.erm" with many predefined constants, covering most values, mentioned in ERM help.<br />
&nbsp;&nbsp;Look through it before defining your own constant for secondary skill, monster or player color.<br />
<br />
<br />
&nbsp;&nbsp;==== Named local variables ====<br />
&nbsp;&nbsp;Each ERM trigger (!?XX before next !?XX) can now declare and use own named local variables, allocated from<br />
&nbsp;&nbsp;x1..x16, y1..y100, z-1..z-10, e1..e100 sets.<br />
&nbsp;&nbsp;Named variables are replaced with regular variables during scripts compilation and do not influence the performance at all.<br />
&nbsp;&nbsp;Example: (day) may be compiled to y5;<br />
<br />
&nbsp;&nbsp;--- Naming ---<br />
&nbsp;&nbsp;Names of variables must be in so called "camelCase" and contain only [a-zA-Z0-9] characters. They must be wrapped<br />
&nbsp;&nbsp;in parantheses the same way, as function names are wrapped.<br />
&nbsp;&nbsp;Example of valid variables: (hero), (monNum), (isAutocombatMode), (specialObject7).<br />
<br />
&nbsp;&nbsp;--- Declaration ---<br />
&nbsp;&nbsp;Variables must be declared on the first usage: i.e their type (x, y, z, e, v) and array length (for arrays) must be specified.<br />
&nbsp;&nbsp;If you write '[some number]' after variable name, variable will become an array (sequence of variables) with specified length.<br />
&nbsp;&nbsp;If you write ':e' after variable name or array length, it will mean, that variable type is "e" (floating point numbers).<br />
<br />
&nbsp;&nbsp;Examples:<br />
&nbsp;&nbsp;!!HE-1:N?(hero:y); give some y-variable name "hero" and write current hero ID to it<br />
&nbsp;&nbsp;!#VA(arts[4]:y);&nbsp;&nbsp; allocate 4 y-variables with sequential indexes and name the array "arts"<br />
<br />
&nbsp;&nbsp;!#VA instruction is pseudo-command, that is dropped from final compiled code and that can be used to hold variables declarations.<br />
&nbsp;&nbsp;Example:<br />
&nbsp;&nbsp;!?FU(acm_Sum);<br />
&nbsp;&nbsp;; The function calculates sum of two numbers<br />
&nbsp;&nbsp;!#VA(first:x) (second:x) (result:x); [bind "first" to x1, "second" to x2, "result" to x3]<br />
&nbsp;&nbsp;!!VR(result):S(first) +(second);&nbsp;&nbsp;&nbsp;&nbsp; [calculate result]<br />
<br />
&nbsp;&nbsp;--- Usage ---<br />
&nbsp;&nbsp;It's allowed to specify the same type and array length for variables in every variable usage place, but it's not necessary.<br />
&nbsp;&nbsp;After you declared variable, there is no more any need to write its type/length.<br />
&nbsp;&nbsp;Example:<br />
&nbsp;&nbsp;!!HE-1:N?(hero:y);<br />
&nbsp;&nbsp;!!HE(hero):K1; kill hero with ID in (hero) variable.<br />
<br />
&nbsp;&nbsp;will be compiled to something like that:<br />
&nbsp;&nbsp;!!HE-1:N?y5;<br />
&nbsp;&nbsp;!!HEy5:K1;<br />
<br />
&nbsp;&nbsp;--- Arrays ---<br />
&nbsp;&nbsp;If you need not a single variable, but sequence of variables, for instance to hold [x, y, l] coordinates of objects,<br />
&nbsp;&nbsp;then you need an array. Specify array length in square brackets right after variable name during declaration.<br />
&nbsp;&nbsp;!#VA(coords[3]:y); allocate 3 y-variables named 'coords'<br />
<br />
&nbsp;&nbsp;Items or elements of arrays are zero-indexed and can be accessed by direct index.<br />
&nbsp;&nbsp;For 3-items array possible indexes are 0, 1, 2.<br />
&nbsp;&nbsp;Example:<br />
&nbsp;&nbsp;!!CM:P?(coords[0])/?(coords[1])/?(coords[2]);<br />
<br />
&nbsp;&nbsp;will be compiled to something like that:<br />
&nbsp;&nbsp;!!CM:P?y50/?y51/?y52;<br />
<br />
&nbsp;&nbsp;If you don't specify array index, the first array element will be used. It means that<br />
&nbsp;&nbsp;(test) and (test[0]) have the same sense. Regular variables are considered arrays of length 1.<br />
<br />
&nbsp;&nbsp;--- Negative array indexes ---<br />
&nbsp;&nbsp;Negative array index means n-th item from the end. -1 will point to the last item, -2 to the one before the last one and so on.<br />
&nbsp;&nbsp;Example:<br />
&nbsp;&nbsp;; allocate array of 10 y-variables and assign the last one value 2000<br />
&nbsp;&nbsp;!#VA(array[10]:y);<br />
&nbsp;&nbsp;!!VR(array[-1]):S2000;<br />
<br />
&nbsp;&nbsp;will be compiled to something like that:<br />
&nbsp;&nbsp;; allocate y1..y10<br />
&nbsp;&nbsp;!!VRy10:S2000;<br />
<br />
&nbsp;&nbsp;--- Releasing local variables ---<br />
&nbsp;&nbsp;If you don't need large variable array anymore, but want to declare another big array, then free the previous one.<br />
&nbsp;&nbsp;Syntax: !#VA(-variableName); will forget about specified variableName, allowing to reuse indexes, allocated for that variable.<br />
<br />
&nbsp;&nbsp;Example:<br />
&nbsp;&nbsp;!#VA(myArts[100]:y); allocate y1..y100 to hold artifact IDs<br />
&nbsp;&nbsp;...;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; use them<br />
&nbsp;&nbsp;!#VA(-myArts);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; release 'myArts' name and y1..y100 indexes.<br />
&nbsp;&nbsp;!#VA(coords[3]:y);&nbsp;&nbsp; allocate y1..y3 as 'coords' variable<br />
<br />
&nbsp;&nbsp;--- Getting variable address (real index) ---<br />
&nbsp;&nbsp;It's often necessary to get real index of variable or even array element. When you want to output "2" instead of<br />
&nbsp;&nbsp;y2, use address operator '@'.<br />
&nbsp;&nbsp;<br />
&nbsp;&nbsp;Example:<br />
&nbsp;&nbsp;; Initialize array with 3 artifacts<br />
&nbsp;&nbsp;!#VA(arts[3]:y);<br />
&nbsp;&nbsp;!!VR(arts):C(ART_SKULL_HELMET)/(ART_HELM_OF_CHAOS)/(ART_DEAD_MANS_BOOTS);<br />
<br />
&nbsp;&nbsp;; Select one artifact randomly<br />
&nbsp;&nbsp;; same as R0/0/2, generates random number in 0..2 range and assigns it to artPtr variable.<br />
&nbsp;&nbsp;!!VR(artPtr:y):R0/(@arts)/(@arts[-1]);<br />
&nbsp;&nbsp;<br />
&nbsp;&nbsp;; Give artifact to hero<br />
&nbsp;&nbsp;!!HE-1:Ay(artPtr);<br />
<br />
&nbsp;&nbsp;will be compiled to something like that:<br />
&nbsp;&nbsp;<br />
&nbsp;&nbsp;!!VRy1:C20/21/56;<br />
&nbsp;&nbsp;!!VRy4:R0/0/2;<br />
&nbsp;&nbsp;!!HE-1:Ayy4;<br />
<br />
&nbsp;&nbsp;Address operator "@" compiles to real (final) variable index. For instance, for array "test[10]:y" mapped to y50..y59<br />
&nbsp;&nbsp;(@test[1]) will compile to "51".<br />
<br />
&nbsp;&nbsp;Example of declaring array of 10 y-variables and initializing all of them with -1.<br />
&nbsp;&nbsp;!#VA(monTypes[10]:y);<br />
<br />
&nbsp;&nbsp;!!re i/(@monTypes)/(@monTypes[-1]):; repeat from i = first array index to i = last array index<br />
&nbsp;&nbsp;&nbsp;&nbsp;!!VRyi:S-1; set -1 for current array item<br />
&nbsp;&nbsp;!!en:;<br />
<br />
&nbsp;&nbsp;In other programming languages variables, holding other variables addresses/indexes are usually called "pointers"<br />
&nbsp;&nbsp;and abbreviated as "ptr" or "Ptr". We will rewrite the previous example with named variable in place of quick "i" var<br />
&nbsp;&nbsp;just for learning purposes.<br />
<br />
&nbsp;&nbsp;!!re (monTypePtr:y)/(@monTypes)/(@monTypes[-1]):; repeat from (monTypePtr) = first array index to (monTypePtr) = last array index<br />
&nbsp;&nbsp;&nbsp;&nbsp;!!VRy(monTypePtr):S-1; set -1 for current array item<br />
&nbsp;&nbsp;!!en:;<br />
<br />
&nbsp;&nbsp;--- Naming function arguments ---<br />
&nbsp;&nbsp;Indexes for named local variables are allocated starting from the smallest possible value.<br />
&nbsp;&nbsp;It means, that we can name even function arguments if we declare them in the same order, as arguments will be passed.<br />
&nbsp;&nbsp;Example:<br />
<br />
&nbsp;&nbsp;!?FU(BH_GetHeroSecSkill);<br />
&nbsp;&nbsp;!#VA(hero:x) (skill:x) (result:x); now hero = x1, skill = x2, result = x3<br />
&nbsp;&nbsp;!!HE(hero):S(skill)/?(result);<br />
<br />
&nbsp;&nbsp;!?FU(...); some event<br />
&nbsp;&nbsp;!!FU(BH_GetHeroSecSkill)/(HERO_XERON)/(SKILL_FIRST_AID)/?(xeronFirstAidLevel:y); so what's the level of First Aid skill Xeron has? )<br />
<br />
&nbsp;&nbsp;--- Redeclaration ---<br />
&nbsp;&nbsp;If you need to declare variable in both branches of if-then block, specify type/length in both of them.<br />
<br />
&nbsp;&nbsp;!!if&amp;(day)&gt;90:;<br />
&nbsp;&nbsp;&nbsp;&nbsp;!!VR(price:y):S(day) *100;<br />
&nbsp;&nbsp;&nbsp;&nbsp;...<br />
&nbsp;&nbsp;!!el:;<br />
&nbsp;&nbsp;&nbsp;&nbsp;!!VR(price:y):S(day) *(difficultyLevel) +300;<br />
&nbsp;&nbsp;&nbsp;&nbsp;...<br />
&nbsp;&nbsp;!!en:; <br />
<br />
&nbsp;&nbsp;--- Reusing same name in other trigger ---<br />
&nbsp;&nbsp;Variable names are local to nearest trigger only. New trigger starts with no declared variables.<br />
&nbsp;&nbsp;Example:<br />
<br />
&nbsp;&nbsp;!?FU(OnHeroScreenMouseClick);<br />
&nbsp;&nbsp;!!CM:F?(flags:y); flags = y1<br />
<br />
&nbsp;&nbsp;!?FU(OnHeroScreenMouseClick);<br />
&nbsp;&nbsp;!#VA(flags[23]:e); flags is array, binded to e1..e23<br />
<br />
&nbsp;&nbsp;--- Interpolation ---<br />
&nbsp;&nbsp;To substitute local variables in string literals use %(varName) syntax. Example:<br />
&nbsp;&nbsp;!!VR(price:y):S600;<br />
&nbsp;&nbsp;!!VR(heroName:z):S^Robin Hood^;<br />
&nbsp;&nbsp;!!IF:Q2/^Would you like to hire %(heroName) for %(price) gold only?^;<br />
<br />
&nbsp;&nbsp;%y(varName) syntax is also supported and compiles to something like %yy5.<br />
<br />
<br />
&nbsp;&nbsp;==== Named functions ====<br />
&nbsp;&nbsp;Function names must consist of [A-Za-z0-9_] characters only, start with letter and contain at least<br />
&nbsp;&nbsp;single lower case letter (a-z).<br />
&nbsp;&nbsp;There are two allowed naming methods:<br />
&nbsp;&nbsp;1) Start function with capital letter. (CalcHeroArmyPower), (ShowUpgradeDialog).<br />
&nbsp;&nbsp;ERA reserves right to declare prefixless functions, starting with "On" for events. This method is not<br />
&nbsp;&nbsp;recommended, due to possible names collisions in different mods. Two mods may declare functions<br />
&nbsp;&nbsp;will the same names and thus produce hard to debug bugs.<br />
<br />
&nbsp;&nbsp;2) Start function with any case unique prefix with '_' character. Prefix is usually mod abbreviation.<br />
&nbsp;&nbsp;For instance, for "Dwellings Extended" mod the following functions are used:<br />
&nbsp;&nbsp;!?FU(dex_SetDwellingSlotByTownType);<br />
&nbsp;&nbsp;!?FU(dex_DwellingPopulation);<br />
&nbsp;&nbsp;...<br />
<br />
&nbsp;&nbsp;--- Generating new events ---<br />
&nbsp;&nbsp;You can call function, even if it has no handlers. For instance, in Upgrade All Creatures mod you<br />
&nbsp;&nbsp;want to allow other scripts to be able to notify, what monster can be upgraded to in particular town.<br />
&nbsp;&nbsp;Just call not existing function like !!FU(auc_OnDetermineMonsterUpgrade):P... in your script with all<br />
&nbsp;&nbsp;necessary parameters and other scripts will be able to write new event handlers like:<br />
<br />
&nbsp;&nbsp;!?FU(auc_OnDetermineMonsterUpgrade);<br />
&nbsp;&nbsp;...<br />
<br />
&nbsp;&nbsp;--- Passing function as handlers or callbacks ---<br />
&nbsp;&nbsp;You can use function as ordinary constant, compiled to number. You can assign it to variable or pass to<br />
&nbsp;&nbsp;another function.<br />
&nbsp;&nbsp;!!VR(spellHandler:y):S(newmagic_DesintegrationSpellHandler);<br />
&nbsp;&nbsp;!!FU(spellHandler):P;<br />
<br />
&nbsp;&nbsp;will compile to something like that<br />
<br />
&nbsp;&nbsp;!!VRy20:S95003;<br />
&nbsp;&nbsp;!!FUy20:P;<br />
<br />
[+] Added 1000 era - stdlib.erm script, which will contain safe for all extra ERM functionality.<br />
&nbsp;&nbsp;&nbsp;&nbsp;Currently !?FU(OnEvenyDay) event is enhanced. Its handlers will receive 5 parameters:<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;!?FU(OnEveryDay);<br />
&nbsp;&nbsp;&nbsp;&nbsp;!#VA(day:x1) (weekDay:x) (once:x) (owner:x) (isAi:x);<br />
&nbsp;&nbsp;&nbsp;&nbsp;!!IF:M^%(day) %(weekDay) %(once) %(owner) %(isAi)^;<br />
<br />
[+] Added 1000 era - consts.erm script with lots of constants to be used in ERM 2.0 scripts.<br />
&nbsp;&nbsp;&nbsp;&nbsp;ERM Editor, based on Sublime Text, supports constants autocompletion.<br />
&nbsp;&nbsp;&nbsp;&nbsp;Remember, that constants without mod name prefix are reserved for ERA.<br />
&nbsp;&nbsp;&nbsp;&nbsp;Prefer BH_GOLD_PER_VICTORY to GOLD_PER_VICTORY for Battle Heroes mod, for instance.<br />
<br />
[+] Floating point variables (e-variables) are passed to ERM commands as raw 4 bytes value,<br />
&nbsp;&nbsp;&nbsp;&nbsp;treated by most commands as integer, which may cause many bugs, unless you know, what you are doing.<br />
&nbsp;&nbsp;&nbsp;&nbsp;The exception is !!VR:S command, allowing transparent conversion integer-float. To copy float value,<br />
&nbsp;&nbsp;&nbsp;&nbsp;stored in raw format in integer variable to e-variable and vice versa use !!VR:C command. It acts same<br />
&nbsp;&nbsp;&nbsp;&nbsp;as VR:S, but without data conversion.<br />
<br />
[+] New command !!VR&#36;1:S#2/#3. Convert float to integer using specific rounding mode.<br />
&nbsp;&nbsp;&nbsp;&nbsp;&#36;1 - integer variable.<br />
&nbsp;&nbsp;&nbsp;&nbsp;#2 - float variable<br />
&nbsp;&nbsp;&nbsp;&nbsp;#3 - rounding mode:<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt; 0 for floor operation (round towards negative infinity),<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0 for normal round (round half away from zero),<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&gt; 0 for ceil operation (round towards positive infinity).<br />
<br />
[+] !!VR: +/-/*/:/% convert both arguments to float if any is float before calculation and convert back<br />
&nbsp;&nbsp;&nbsp;&nbsp;to base var type on return.<br />
&nbsp;&nbsp;&nbsp;&nbsp;Thus<br />
&nbsp;&nbsp;&nbsp;&nbsp;!!VR(koef:e):S25 :10; koef = 2.5<br />
&nbsp;&nbsp;&nbsp;&nbsp;!!VR(gold:y):S2 *koef; gold = 5, not 4<br />
<br />
[+] New command !!VR&#36;1:~#2<br />
&nbsp;&nbsp;&nbsp;&nbsp;Unsets bits #2 in &#36;1 integer variable.<br />
&nbsp;&nbsp;&nbsp;&nbsp;Example:<br />
&nbsp;&nbsp;&nbsp;&nbsp;!!VR(flags):~17; unset bits/flags 1 + 16 from (flags) variable.<br />
&nbsp;&nbsp; <br />
[+] New command !!VR&#36;1:Z#2. Creates trigger local temporary z-variable with given contents and assigns its index to integer variable.<br />
&nbsp;&nbsp;&nbsp;&nbsp;&#36;1 - integer variable.<br />
&nbsp;&nbsp;&nbsp;&nbsp;#2 - any string.<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;The command can be used to create temporal z-variables to change, for example, artifact description,<br />
&nbsp;&nbsp;&nbsp;&nbsp;show message and restore description.<br />
<br />
[+] ^....^ literal in any ERM command is interpolated and replaced by temporal z-variable index before receiver<br />
&nbsp;&nbsp;&nbsp;&nbsp;execution. This z-variable is released right after receiver is executed.<br />
&nbsp;&nbsp;&nbsp;&nbsp;Don't use string literals in WoG 3.58 hint/description setting commands, because such descriptions have short life time.<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;From now it's possible to pass strings to functions.<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;!?FU(ES_Ask);<br />
&nbsp;&nbsp;&nbsp;&nbsp;; Shows question dialog with caption. Returns boolean (1 on success and 0 on failure).<br />
&nbsp;&nbsp;&nbsp;&nbsp;!#VA(captionPtr:x) (questionPtr:x) (result:x);<br />
&nbsp;&nbsp;&nbsp;&nbsp;!!IF:Q1/^{%z(captionPtr)}<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;%z(questionPtr)^;<br />
&nbsp;&nbsp;&nbsp;&nbsp;!!VR(result):S0;<br />
&nbsp;&nbsp;&nbsp;&nbsp;!!VR(result)&amp;1:S1;<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;!?OB(OBJ_TOWN)/(ANY_OBJ);<br />
&nbsp;&nbsp;&nbsp;&nbsp;!!FU(ES_Ask):P^Sphinx asks you:^/^Do you really want to die, fighting my guards?^/?(answer:y);<br />
&nbsp;&nbsp;&nbsp;&nbsp;!!HE(CURRENT_HERO)&amp;(answer)=1:K1; let him die )))<br />
<br />
[+] Only regular ERT variables are interpolated automatically.<br />
&nbsp;&nbsp;&nbsp;&nbsp;Regular z-variables and temporal ert variables are not interpolated in receivers.<br />
&nbsp;&nbsp;&nbsp;&nbsp;It means, that !!VRz2:S^%%y5^; z2 is now really "%y5"<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;Previously interpolation would be performed again and again recursively, converting %y5 into y5 value like 0.<br />
&nbsp;&nbsp;&nbsp;&nbsp;and even later using z2 in any command would run interpolation again.<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;!!IF:M1/z2; will display "%y5", not y5 value.<br />
<br />
[+] New VR&#36;1:R/T syntax: 0/min/max - generates random value in given range and assignes it to &#36;1 integer variable.<br />
[+] VR:R/T now both support syntaxes with 1/2/3 arguments.<br />
[+] VR:T uses Mersenne Twister qualitive generator, but it's not synchronized in multiplayer.<br />
[+] VR:M1. -1 as length means "till string end".<br />
<br />
[+] VR:M2 does not store token index in global variable anymore. Token index, that was ignored earlier, works now as expected.<br />
&nbsp;&nbsp; Token delimiters are [#1..#31, ' ', ',', '.']. Don't use for huge text, because performance is O(n^2), where n is tokens number.<br />
<br />
[+] VR:M3 Base/radix is enforced to be in 2..16 range.<br />
<br />
[+] ERM interpolation (expanding variables starting with % in string literals ^...^ and ERT strings) was fully rewritten.<br />
&nbsp;&nbsp;&nbsp;&nbsp;Upper case registry for old ERM variables is supported, but deprecated.<br />
&nbsp;&nbsp;&nbsp;&nbsp;%X1 is good, but %x1 is better.<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;All new s^...^, i^...^ and named local variables are supported.<br />
&nbsp;&nbsp;&nbsp;&nbsp;Indirect references is supported.<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;%s(named global variable)<br />
&nbsp;&nbsp;&nbsp;&nbsp;%i(named global variable)<br />
&nbsp;&nbsp;&nbsp;&nbsp;%xy7<br />
&nbsp;&nbsp;&nbsp;&nbsp;%zi^named global variable^<br />
&nbsp;&nbsp;&nbsp;&nbsp;%z(namedLocalVar)<br />
&nbsp;&nbsp;&nbsp;&nbsp;%(namedLocalVar)<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;Quick vars are supported:<br />
&nbsp;&nbsp;&nbsp;&nbsp;%i %g %k<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;Interpolation of %Vf...t meaning is changed to real v-indexing<br />
&nbsp;&nbsp;&nbsp;&nbsp;%vi means v-var with i-index.<br />
&nbsp;&nbsp;&nbsp;&nbsp;%f means quick 'f' var.<br />
&nbsp;&nbsp;&nbsp;&nbsp;%i means quick 'i' var.<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;%F5 means flag 5<br />
&nbsp;&nbsp;&nbsp;&nbsp;%Fx16 means flag with x16 index<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;Function IDs and constants can be interpolated in the same way, as named local variables:<br />
&nbsp;&nbsp;&nbsp;&nbsp;%(CONST_NAME), %(era_FuncName), %(money), %y(moneyPtr)<br />
<br />
[+] IF:M# now works with any string<br />
[+] IF:N1/# now works with any string, not z1 only.<br />
[+] IF:N# now works with any string.<br />
[+] BA:B now can work with any string and integer.<br />
<br />
[+] Call SN:F^GenerateDebugInfo^ to generate Debug directory contents, the same way as F11 does.<br />
<br />
[+] Exported "NameTrigger" function (void NameTrigger(int TriggerId, const char* Name)), allowing plugins to<br />
&nbsp;&nbsp;&nbsp;&nbsp;give name to any ERM trigger, which can be used in ERM like !?FU(OnYourNewEvent).<br />
<br />
[+] Updated "wog native dialogs" plugin by igrik. From now it's possible to select item in message dialogs<br />
&nbsp;&nbsp;&nbsp;&nbsp;using mouse double click.<br />
<br />
[+] s^...^, ^...^, i^...^ can now be freely used in conditions.<br />
<br />
[+] New d-modifiers (d~, d%, d|, d&amp;, d&lt;&lt;, d&gt;&gt;) work with all receivers.<br />
<br />
[+] Rewritten ert-strings storage implementation. Removed limit on 50000 strings. Increased add/delete operations<br />
&nbsp;&nbsp;&nbsp;&nbsp;performance (from linear search to binary tree search). Savegames format was changed.<br />
<br />
[+] Added VR:C alternative for SN:M arrays. New command !!SN:U#1/#2/&#36;3...up to &#36;21 allows to set/check/get/modify<br />
&nbsp;&nbsp;&nbsp;&nbsp;many items of dynamical array.<br />
&nbsp;&nbsp;&nbsp;&nbsp;#1 - SN:M array ID.<br />
&nbsp;&nbsp;&nbsp;&nbsp;#2 - starting index<br />
&nbsp;&nbsp;&nbsp;&nbsp;&#36;3... - items at starting index, starting index + 1, starting index + 2, etc.<br />
<br />
[+] Added new command !!VR:R0/#min/#max, generating random value in specified range and assigning its to variable.<br />
&nbsp;&nbsp;&nbsp;&nbsp;Example: !!VRy1:R0/100/300; set y1 to random value in 100..300 range<br />
<br />
[*] The following exported functions now return 4-bytes LONGBOOL value, 0 for false, -1 (0xFFFFFFFF) for true.<br />
&nbsp;&nbsp;&nbsp;&nbsp;"ReadStrFromIni", "WriteStrToIni", "SaveIni", "PatchExists", "PluginExists", "Ask".<br />
<br />
[+] Added "1000 - era consts.erm" script to WoG mod with standard Era constants, including players,<br />
&nbsp;&nbsp;&nbsp;&nbsp;player bits, heroes, resources, objects, monsters, artifacts, spells. The file contents may be corrected<br />
&nbsp;&nbsp;&nbsp;&nbsp;and widened in the future. All constants were registered in Erm Editor, based on Sublime Text.<br />
<br />
[+] Added "1000 - era stdlib.erm" script with universal ERM functions and events. Currently "OnEveryDay"<br />
&nbsp;&nbsp;&nbsp;&nbsp;event is enhanced with the following x-arguments: day, week day, once(0..1), owner (color), isAi (0..1).<br />
<br />
[*] Fixed WoG bug with tactics detection on the very first round. Do not use BU:R in !?BR or !?FU(OnCombatRound) for zero round,<br />
&nbsp;&nbsp;&nbsp;&nbsp;because a few structures are not initialized at this moment and random crash may occur. First round code was moved after<br />
&nbsp;&nbsp;&nbsp;&nbsp;combat theme initialization and tactics popup message appearance.<br />
<br />
[+] All *.ers files are loaded without name/quantity constraints. Previously only script00.ers..script99.ers were processed.<br />
<br />
[+] HE:P command behavior was fixed. Teleport function with sound is called only if any coordinate<br />
&nbsp;&nbsp;&nbsp;&nbsp;was really changed. Advanced d-modifiers are supported for the first three parameters.<br />
<br />
[+] HE:C0 command was rewritten.<br />
&nbsp;&nbsp;&nbsp;&nbsp;-1 and -2 values for creature type are not treated as "upgrade"/"degrade" anymore. Command supports any d-modifiers now.<br />
&nbsp;&nbsp;&nbsp;&nbsp;Exp. modifier parameter is now SET-only. Previosly !!HE:C0/0/?y1/?y2/d5000/2 would not increase slot experience.<br />
&nbsp;&nbsp;&nbsp;&nbsp;In fact, any GET syntax used to make ERM engine ignore stack experience at all. This bug was fixed.<br />
&nbsp;&nbsp;&nbsp;&nbsp;Creature Type &lt; 0 or Number &lt;= 0 will be normalized to Type -1, Number 0 automatically.<br />
&nbsp;&nbsp;&nbsp;&nbsp;Note, that in all cases the returned stack experience value is the one before applying any changes.<br />
<br />
[+] Rewritten HE:X command to accept any number of parameters and understand any d-modifiers.<br />
&nbsp;&nbsp;&nbsp;&nbsp;Example: !!HE-1:X0/27 Xd1; become master of gold dragons<br />
<br />
[+] Introduces many new d-modifiers for all ERM commands, except for GE:E/N, LE:E/N.<br />
&nbsp;&nbsp;&nbsp;&nbsp;d+# - integer addition<br />
&nbsp;&nbsp;&nbsp;&nbsp;d-# - integer substraction<br />
&nbsp;&nbsp;&nbsp;&nbsp;d*# - integer multiplication<br />
&nbsp;&nbsp;&nbsp;&nbsp;d:# - integer division<br />
&nbsp;&nbsp;&nbsp;&nbsp;d|# sets bits from # (bitwise OR operation)<br />
&nbsp;&nbsp;&nbsp;&nbsp;d&amp; leaves only # bits, if any (bitwise AND operation)<br />
&nbsp;&nbsp;&nbsp;&nbsp;d~ unsets bits, specified in #. d~17 unsets bits 1 and 16<br />
&nbsp;&nbsp;&nbsp;&nbsp;d%# calculates division modulo. 10%4 = 2, for instance.<br />
&nbsp;&nbsp;&nbsp;&nbsp;d&lt;&lt;# shifts original value bits to the left by # positions (bitwise logical shift left).<br />
&nbsp;&nbsp;&nbsp;&nbsp;d&gt;&gt;# shifts original value bits to the right by # positions (bitwise logical shift right.<br />
<br />
[+] Function parameters (FU:P, DO:P), which were passed using GET-syntax, are now initialized with<br />
&nbsp;&nbsp;&nbsp;&nbsp;original variable value. The behavior is similar to pass-by-reference in other programming languages.<br />
&nbsp;&nbsp;&nbsp;&nbsp;Example:<br />
&nbsp;&nbsp;&nbsp;&nbsp;!?FU(Add3):;<br />
&nbsp;&nbsp;&nbsp;&nbsp;; (value:x)<br />
&nbsp;&nbsp;&nbsp;&nbsp;!!VR(value:x):+3;<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;!?CM0;<br />
&nbsp;&nbsp;&nbsp;&nbsp;!!VR(numHeads:y):S10;<br />
&nbsp;&nbsp;&nbsp;&nbsp;!!FU(Add3):P?(numHeads:y); 10 is passed to function as the first argument, 13 is result<br />
<br />
[+] Enhanced !!RD:I with new named parameters syntax.<br />
&nbsp;&nbsp;&nbsp;&nbsp;!!RD:I^parameter name^/?&#36;parameter_value;<br />
&nbsp;&nbsp;&nbsp;&nbsp;============================== Featured parameters: ==============================<br />
&nbsp;&nbsp;&nbsp;&nbsp;^dlgId^&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- Unique recruit dialog ID. Used to distinguish between nested dialogs (yep, it's possible). Reusable.<br />
&nbsp;&nbsp;&nbsp;&nbsp;^townId^&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; - ID of town, for which dialog is opened or -1.<br />
&nbsp;&nbsp;&nbsp;&nbsp;^dwellingId^&nbsp;&nbsp; - ID of town dwelling, for which dialog is opened or -1. 0..6 non upgraded, 7..13 for upgraded.<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Horde buildings (+X population) are treated as dwellings, they influence.<br />
&nbsp;&nbsp;&nbsp;&nbsp;^slot^&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; - Active logical slot index.<br />
&nbsp;&nbsp;&nbsp;&nbsp;^cost^&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; - Cost of single monster in current slot in gold.<br />
&nbsp;&nbsp;&nbsp;&nbsp;^resource^&nbsp;&nbsp;&nbsp;&nbsp; - Special resource for monster in current slot.<br />
&nbsp;&nbsp;&nbsp;&nbsp;^resourceCost^ - Cost of single monster in current slot in special resource.<br />
&nbsp;&nbsp;&nbsp;&nbsp;^quantity^&nbsp;&nbsp;&nbsp;&nbsp; - Number of monsters, currently selected for recruitment.<br />
&nbsp;&nbsp;&nbsp;&nbsp;^maxQuantity^&nbsp;&nbsp;- Maximal number of monsters, the player can afford.<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;Example:<br />
&nbsp;&nbsp;&nbsp;&nbsp;!?FU(OnRecruitDlgMouseClick);<br />
&nbsp;&nbsp;&nbsp;&nbsp;!!RD:I^dlgId^/?(dlgId:y) I^townId^/?(townId:y) I^dwellingId^/?(dwellingId:y) I^slot^/?(slot:y) I^cost^/?(cost:y);<br />
&nbsp;&nbsp;&nbsp;&nbsp;!!RD:I^resource^/?(resource:y) I^resourceCost^/?(resourceCost:y) I^quantity^/?(quantity:y) I^maxQuantity^/?(maxQuantity:y);<br />
&nbsp;&nbsp;&nbsp;&nbsp;!!IF:M^(dlgId:y) (townId:y) (dwellingId:y) (slot:y) (cost:y) (resource:y) (resourceCost:y) (quantity:y) (maxQuantity:y)^;<br />
<br />
[+] Enhanced !!UN:C command. It supports all d-modifiers now. New syntax with offset from address is available:<br />
&nbsp;&nbsp;&nbsp;&nbsp;!!UN:C#addr/#offset/#size/&#36;value;<br />
&nbsp;&nbsp;&nbsp;&nbsp;Era always calls GetRealAddr for #addr, thus !!UN:C supports all extended/relocated game structures.<br />
<br />
[+] WoG interface and WoG campaigns were extracted to appropriate standalone mods. ERA is now mostly Vanilla game with<br />
&nbsp;&nbsp;&nbsp;&nbsp;enhanced ERM engine and other modding capabilities.<br />
<br />
[+] Added !!BM:Z?&#36;addr command to get battle stack structure address.<br />
[+] Added !!HE:Z?&#36;addr command to get hero structure address.<br />
[+] Introduced ERM 2.0 support for scripts, beginning with 'ZVSE2'.<br />
[+] Doubled stack size for h3era.exe executable to allow trigger depth level up to 150, but better avoid such depth.<br />
<br />
[+] WoG Campaign editor loads resources from hmm35wog.pac and uses virtual file system. No more Campaign Fix required.<br />
[+] Added extended resources redirection support with wav/bik/smk files, including missing resources redirection.<br />
<br />
[+] Added new plugins events "OnAfterLoadLods", occured right after lods/pacs are loaded and "OnAfterLoadMedia", occured<br />
&nbsp;&nbsp;&nbsp;&nbsp;when lod/pacs/snd/vids are loaded.<br />
<br />
[*] ERA is recommended to be installed over Heroes 3 Complete only. Removed resources, which are already present in Complete lods.<br />
<br />
[-] Restored functionality of Data&#92;Redirections&#92;Missing&#92;*.json files, which are used to setup redirections<br />
&nbsp;&nbsp;&nbsp;&nbsp;for missing resources only.<br />
<br />
[+] ERM quick vars (f..t) are now local to triggers. Use them safely.<br />
<br />
[+] Update ERM Editor.<br />
[+] Rewritten core of ERM engine. Greatly improved old macro support (&#36;macronam&#36;). Just for perfection.<br />
<br />
[+] Extracted WoG campaigns into standalone mod, which was removed from Era installer package.<br />
<br />
[+] "remove exe protection.bin" was applied to h3era.exe and removed as patch.<br />
<br />
[+] Many resources and features were extracted from WoG mod into separate mods: Animated Object Flags, Animated Trees,<br />
&nbsp;&nbsp;&nbsp;&nbsp;No Prebattle Music, Secondary Skills Scrolling, Quick Savings, Fast Battle Animation, Improved Battle Decorations,<br />
&nbsp;&nbsp;&nbsp;&nbsp;WoG Interface, WoG Campaigns, Yona.<br />
<br />
[+] Added new event "OnDetermineMonInfoDlgUpgrade", occured, when game determines wether to show upgrade button<br />
&nbsp;&nbsp;&nbsp;&nbsp;in monster info dialog. Parameters: MonType, UpgradedType or -1, Town ID or -1, Hero ID or -1.<br />
&nbsp;&nbsp;&nbsp;&nbsp;-1 for UpgradedType means no upgrade button (because of wrong town type or appropriate building being not built, or monster having no upgrade).<br />
&nbsp;&nbsp;&nbsp;&nbsp;You can change this value to allow universal Jelu-like behavior or any upgrade system.<br />
&nbsp;&nbsp;&nbsp;&nbsp;Example:<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;ZVSE2<br />
&nbsp;&nbsp;&nbsp;&nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp;!?FU(OnDetermineMonInfoDlgUpgrade);<br />
&nbsp;&nbsp;&nbsp;&nbsp;!#VA(monType:x) (upgType:x) (town:x) (hero:x);<br />
&nbsp;&nbsp;&nbsp;&nbsp;!!VR(upgType):S(MON_GOLD_DRAGON); allow upgrade anything into Gold Dragons<br />
<br />
[+] SN/RD/MP receivers now support indexed parameters like vy6 or zi^myIndex^.<br />
<br />
[+] SN:D may be used now in battle, being equal to BU:R.<br />
<br />
[+] Added support for trigger local dynamical arrays. !!SN:M-1/#/#/-1 will allocate new dynamical array<br />
&nbsp;&nbsp;&nbsp;&nbsp;with ID, that will be automatically released after current trigger is exited. Thus no<br />
&nbsp;&nbsp;&nbsp;&nbsp;corresponding !!SN:M# is necessary to release this temporary array. It can be used, for instance,<br />
&nbsp;&nbsp;&nbsp;&nbsp;for large calculations or to pass string arguments to function.<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;Example:<br />
&nbsp;&nbsp;&nbsp;&nbsp;!?FU(OnAdventureMapRightMouseClick);<br />
&nbsp;&nbsp;&nbsp;&nbsp;!!SN:M-1/4/1/-1;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[allocate 4 strings array (-1 = auto ID, 4 = 4 items, 1 = of string type, -1 = local to current trigger)]<br />
&nbsp;&nbsp;&nbsp;&nbsp;!!VR(dlgStrings:y):Sv1; [save array ID]<br />
&nbsp;&nbsp;&nbsp;&nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp;; Setup strings<br />
&nbsp;&nbsp;&nbsp;&nbsp;!!SN:M(dlgStrings)/0/^Select commander bonus:^;<br />
&nbsp;&nbsp;&nbsp;&nbsp;!!SN:M(dlgStrings)/1/^1) Attack^;<br />
&nbsp;&nbsp;&nbsp;&nbsp;!!SN:M(dlgStrings)/2/^2) Speed^;<br />
&nbsp;&nbsp;&nbsp;&nbsp;!!SN:M(dlgStrings)/3/^3) Health^;<br />
&nbsp;&nbsp;&nbsp;&nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp;!!FU(PM_ShowDialog):P(dlgStrings); [pass 4 string to dialog showing function]<br />
&nbsp;&nbsp;&nbsp;&nbsp;; here array with (dlgStrings) ID will be automatically freed, same as SN:M(dlgStrings);<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;!?FU(PM_ShowDialog);<br />
&nbsp;&nbsp;&nbsp;&nbsp;; (dlgStrings:x) - dynamical array of 4 strings<br />
&nbsp;&nbsp;&nbsp;&nbsp;; (items[3]:z)<br />
&nbsp;&nbsp;&nbsp;&nbsp;!!SN:M(dlgStrings)/0/?(caption:z);<br />
&nbsp;&nbsp;&nbsp;&nbsp;!!SN:M(dlgStrings)/1/?(items[0]);<br />
&nbsp;&nbsp;&nbsp;&nbsp;!!SN:M(dlgStrings)/2/?(items[1]);<br />
&nbsp;&nbsp;&nbsp;&nbsp;!!SN:M(dlgStrings)/3/?(items[2]);<br />
&nbsp;&nbsp;&nbsp;&nbsp;!!IF:M^{(caption)}<br />
&nbsp;&nbsp;&nbsp;&nbsp;(items[0])<br />
&nbsp;&nbsp;&nbsp;&nbsp;(items[1])<br />
&nbsp;&nbsp;&nbsp;&nbsp;(items[2])^;<br />
<br />
[-] Fixed memory leakage in SN:M dynamical arrays deallocation and a few other places.</code></div></div>
</div></div>]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Добавляем несовместимостей с WoG]]></title>
			<link>http://wforum.heroes35.net/showthread.php?tid=5495</link>
			<pubDate>Fri, 28 Feb 2020 12:33:38 +0000</pubDate>
			<guid isPermaLink="false">http://wforum.heroes35.net/showthread.php?tid=5495</guid>
			<description><![CDATA[<span style="font-weight: bold;">1. HE:C0/#2/&#36;3/&#36;4</span><br />
Сейчас параметр &#36;3 обрабатывается не указанным в справке магическим образом.<br />
-1 с игнорированием «d» — значит апгрейд по принципу «ближайшее нечётное число» <br />
-2 с игнорирование «d» — дегрейд по принципу «ближайшее чётное число»<br />
Наличие «d» приводило к тому, что параметр не обрабатывался вообще (!)<br />
<br />
Но если число &lt;= 0, то принудительно Тип = -1, Число = 0.<br />
<br />
<span style="text-decoration: underline;">Решение:</span><br />
Магические константы -1/-2 имеет естественное значение.<br />
Если тип &lt;= 0 или Число &lt;= 0, то принудительно Тип = -1, Число = 0.<br />
Апгрейд/дегрейд должны определяться скриптово через специальные функции и таблицы, а не примитивно не универсально.<br />
<br />
<span style="font-weight: bold;">2. GE/CE E, N ресиверы.</span><br />
d# работает как d|, то есть установкой флагов.<br />
<br />
В справке есть, но не универсально. !!BM:F так не работает.<br />
<br />
<span style="text-decoration: underline;">Решение:</span><br />
Модификаторы d, d-+*:%|~ работают универсально.<br />
<br />
<span style="font-weight: bold;">3. HE:P</span><br />
Если хоть один GET-параметр, то все SET параметры игнорируются.<br />
Видимо, из-за пропаганды использования «d» как пропуска параметра.<br />
<br />
Параметр "d" используется только как «добавить».<br />
<br />
Если герой не свой и флаг = 0, то он перемещается через сокрытие, изменение координат, показ. Если свой и флаг = 0, то координаты меняются без обновления.<br />
<br />
<span style="text-decoration: underline;">Решение:</span><br />
Строго следовать значению четвёртого параметра-флага. Разрешить смешанный set/get синтаксис.]]></description>
			<content:encoded><![CDATA[<span style="font-weight: bold;">1. HE:C0/#2/&#36;3/&#36;4</span><br />
Сейчас параметр &#36;3 обрабатывается не указанным в справке магическим образом.<br />
-1 с игнорированием «d» — значит апгрейд по принципу «ближайшее нечётное число» <br />
-2 с игнорирование «d» — дегрейд по принципу «ближайшее чётное число»<br />
Наличие «d» приводило к тому, что параметр не обрабатывался вообще (!)<br />
<br />
Но если число &lt;= 0, то принудительно Тип = -1, Число = 0.<br />
<br />
<span style="text-decoration: underline;">Решение:</span><br />
Магические константы -1/-2 имеет естественное значение.<br />
Если тип &lt;= 0 или Число &lt;= 0, то принудительно Тип = -1, Число = 0.<br />
Апгрейд/дегрейд должны определяться скриптово через специальные функции и таблицы, а не примитивно не универсально.<br />
<br />
<span style="font-weight: bold;">2. GE/CE E, N ресиверы.</span><br />
d# работает как d|, то есть установкой флагов.<br />
<br />
В справке есть, но не универсально. !!BM:F так не работает.<br />
<br />
<span style="text-decoration: underline;">Решение:</span><br />
Модификаторы d, d-+*:%|~ работают универсально.<br />
<br />
<span style="font-weight: bold;">3. HE:P</span><br />
Если хоть один GET-параметр, то все SET параметры игнорируются.<br />
Видимо, из-за пропаганды использования «d» как пропуска параметра.<br />
<br />
Параметр "d" используется только как «добавить».<br />
<br />
Если герой не свой и флаг = 0, то он перемещается через сокрытие, изменение координат, показ. Если свой и флаг = 0, то координаты меняются без обновления.<br />
<br />
<span style="text-decoration: underline;">Решение:</span><br />
Строго следовать значению четвёртого параметра-флага. Разрешить смешанный set/get синтаксис.]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Мод "WoG Scripts"]]></title>
			<link>http://wforum.heroes35.net/showthread.php?tid=5479</link>
			<pubDate>Tue, 18 Feb 2020 22:31:04 +0000</pubDate>
			<guid isPermaLink="false">http://wforum.heroes35.net/showthread.php?tid=5479</guid>
			<description><![CDATA[Скачать:<br />
<a href="https://github.com/igrikRS/WoG-Scripts/raw/master/Release/WoG_Scripts.exe" target="_blank"><span style="font-weight: bold;">WoG Scripts</span></a><br />
<a href="https://github.com/igrikRS/WoG-Scripts/raw/master/Release/WoG_Scripts_Rus.exe" target="_blank"><span style="font-weight: bold;">WoG Scripts Rus</span></a><br />
<br />
Ссылка на <a href="https://github.com/igrikRS/WoG-Scripts" target="_blank"><span style="font-weight: bold;">Репозиторий</span></a><br />
<br />
<div id="user_table"><table class="tborder" cellspacing="1" cellpadding="4" border="0" style="clear: both;">
<tbody>
<tr class="trow1" valign="top">
<th class="thead" colspan="3" >
<div style="text-align: center;">Высвободившиеся переменные для стороннего использования</div>
</th>

</tr>
<tr class="trow2" valign="top">
<th class="thead" colspan="" >
z-vars
</th>
<td colspan="">
z1-150 <span style="color: #666666;"><span style="font-style: italic;">использовать только как временные переменные</span></span>, <br />
z270-279, z310-311, z318-319, z390-391, z410-z428, z500-z679, z710-721, z726-z728, z732-744, z747-752, z793-z798, z904-z907, z920-z937
</td>
<td colspan="">
<div style="text-align: center;"><span style="color: #909090;"><span style="font-size: x-small;"><span style="font-style: italic;">заметки/комментарии</span></span></span></div>
</td>

</tr>
<tr class="trow1" valign="top">
<th class="thead" colspan="" >
v-vars
</th>
<td colspan="">
v425-v427 <span style="color: #666666;">←<span style="font-style: italic;">37wog... .erm</span></span><br />
v2400-v2408 <span style="color: #666666;">←<span style="font-style: italic;">17wog... .erm</span></span><br />
v3300<span style="color: purple;">**</span>, v3301-v3302, v3310-v3312 <span style="color: #666666;">←<span style="font-style: italic;">53wog... .erm</span></span><br />
v7177 <span style="color: #666666;">←<span style="font-style: italic;">27wog... .erm</span></span><br />
v8033, v8035-v8043 <span style="color: #666666;">←<span style="font-style: italic;">25wog... .erm</span></span><br />

</td>
<td colspan="">
 <div class="notranslate"><div class="spoiler_header"><span style="color: purple;">**</span> <a href="javascript:void(0);" onclick="javascript:if(parentNode.parentNode.getElementsByTagName('div')[1&#93;.style.display=='block'){parentNode.parentNode.getElementsByTagName('div')[1&#93;.style.display='none';this.innerHTML='(Click to View)';}else {parentNode.parentNode.getElementsByTagName('div')[1&#93;.style.display='block';this.innerHTML='(Click to Hide)';}">(Click to View)</a></div><div class="spoiler_body" style="display: none; border: 1px dotted #0F5C8E;"><span style="font-size: x-small;">v3300 инициализируется,<br />
но нигде более<br />
не используется</span></div></div>
</td>

</tr>
<tr class="trow2" valign="top">
<th class="thead" colspan="" >
w-vars
</th>
<td colspan="">

</td>
<td colspan="">
 
</td>

</tr>
<tr class="trow1" valign="top">
<th class="thead" colspan="" >
Флаги
</th>
<td colspan="">
41..43  <span style="color: #666666;">←<span style="font-style: italic;">17wog... .erm</span></span>
</td>
<td colspan="">
 
</td>

</tr>
<tr class="trow2" valign="top">
<th class="thead" colspan="" >
Таймеры
</th>
<td colspan="">
TM38  <span style="color: #666666;">←<span style="font-style: italic;">34wog... .erm</span></span>
</td>
<td colspan="">
 
</td>

</tr>
<tr class="trow1" valign="top">
<th class="thead" colspan="" >
FU_номера
</th>
<td colspan="">
FU10..11 <span style="color: #666666;">←<span style="font-style: italic;">68wog... .erm</span></span><br />
FU12..16 <span style="color: #666666;">←<span style="font-style: italic;">18wog... .erm</span></span><br />
FU17, 19, 34..36 <span style="color: #666666;">←<span style="font-style: italic;">3wog... .erm</span></span><br />
FU31..33 <span style="color: #666666;">←<span style="font-style: italic;">19wog... .erm</span></span><br />
FU62 <span style="color: #666666;">←<span style="font-style: italic;">10wog... .erm</span></span><br />
FU463..481 <span style="color: #666666;">←<span style="font-style: italic;">20wog... .erm</span></span><br />
FU651, 654..657, 662..665 <span style="color: #666666;">←<span style="font-style: italic;">75wog... .erm</span></span><br />
FU800..802, 810..816 <span style="color: #666666;">←<span style="font-style: italic;">61wog... .erm</span></span><br />
FU809, 839 <span style="color: #666666;">←<span style="font-style: italic;">37wog... .erm</span></span><br />
FU1872..1876  <span style="color: #666666;">←<span style="font-style: italic;">17wog... .erm</span></span><br />
FU3300..3302  <span style="color: #666666;">←<span style="font-style: italic;">53wog... .erm</span></span><br />
FU7070..7074 <span style="color: #666666;">←<span style="font-style: italic;">27wog... .erm</span></span><br />
FU8150..8164, 8230..8231  <span style="color: #666666;">←<span style="font-style: italic;">43wog... .erm</span></span><br />
FU20001..20003 <span style="color: #666666;">←<span style="font-style: italic;">25wog... .erm</span></span>
</td>
<td colspan="">
 
</td>

</tr>
<tr class="trow2" valign="top">
<th class="thead" colspan="" >
wog_опции
</th>
<td colspan="">

</td>
<td colspan="">
 
</td>

</tr>
<br />

</tbody>
</table>
</div>]]></description>
			<content:encoded><![CDATA[Скачать:<br />
<a href="https://github.com/igrikRS/WoG-Scripts/raw/master/Release/WoG_Scripts.exe" target="_blank"><span style="font-weight: bold;">WoG Scripts</span></a><br />
<a href="https://github.com/igrikRS/WoG-Scripts/raw/master/Release/WoG_Scripts_Rus.exe" target="_blank"><span style="font-weight: bold;">WoG Scripts Rus</span></a><br />
<br />
Ссылка на <a href="https://github.com/igrikRS/WoG-Scripts" target="_blank"><span style="font-weight: bold;">Репозиторий</span></a><br />
<br />
<div id="user_table"><table class="tborder" cellspacing="1" cellpadding="4" border="0" style="clear: both;">
<tbody>
<tr class="trow1" valign="top">
<th class="thead" colspan="3" >
<div style="text-align: center;">Высвободившиеся переменные для стороннего использования</div>
</th>

</tr>
<tr class="trow2" valign="top">
<th class="thead" colspan="" >
z-vars
</th>
<td colspan="">
z1-150 <span style="color: #666666;"><span style="font-style: italic;">использовать только как временные переменные</span></span>, <br />
z270-279, z310-311, z318-319, z390-391, z410-z428, z500-z679, z710-721, z726-z728, z732-744, z747-752, z793-z798, z904-z907, z920-z937
</td>
<td colspan="">
<div style="text-align: center;"><span style="color: #909090;"><span style="font-size: x-small;"><span style="font-style: italic;">заметки/комментарии</span></span></span></div>
</td>

</tr>
<tr class="trow1" valign="top">
<th class="thead" colspan="" >
v-vars
</th>
<td colspan="">
v425-v427 <span style="color: #666666;">←<span style="font-style: italic;">37wog... .erm</span></span><br />
v2400-v2408 <span style="color: #666666;">←<span style="font-style: italic;">17wog... .erm</span></span><br />
v3300<span style="color: purple;">**</span>, v3301-v3302, v3310-v3312 <span style="color: #666666;">←<span style="font-style: italic;">53wog... .erm</span></span><br />
v7177 <span style="color: #666666;">←<span style="font-style: italic;">27wog... .erm</span></span><br />
v8033, v8035-v8043 <span style="color: #666666;">←<span style="font-style: italic;">25wog... .erm</span></span><br />

</td>
<td colspan="">
 <div class="notranslate"><div class="spoiler_header"><span style="color: purple;">**</span> <a href="javascript:void(0);" onclick="javascript:if(parentNode.parentNode.getElementsByTagName('div')[1].style.display=='block'){parentNode.parentNode.getElementsByTagName('div')[1].style.display='none';this.innerHTML='(Click to View)';}else {parentNode.parentNode.getElementsByTagName('div')[1].style.display='block';this.innerHTML='(Click to Hide)';}">(Click to View)</a></div><div class="spoiler_body" style="display: none; border: 1px dotted #0F5C8E;"><span style="font-size: x-small;">v3300 инициализируется,<br />
но нигде более<br />
не используется</span></div></div>
</td>

</tr>
<tr class="trow2" valign="top">
<th class="thead" colspan="" >
w-vars
</th>
<td colspan="">

</td>
<td colspan="">
 
</td>

</tr>
<tr class="trow1" valign="top">
<th class="thead" colspan="" >
Флаги
</th>
<td colspan="">
41..43  <span style="color: #666666;">←<span style="font-style: italic;">17wog... .erm</span></span>
</td>
<td colspan="">
 
</td>

</tr>
<tr class="trow2" valign="top">
<th class="thead" colspan="" >
Таймеры
</th>
<td colspan="">
TM38  <span style="color: #666666;">←<span style="font-style: italic;">34wog... .erm</span></span>
</td>
<td colspan="">
 
</td>

</tr>
<tr class="trow1" valign="top">
<th class="thead" colspan="" >
FU_номера
</th>
<td colspan="">
FU10..11 <span style="color: #666666;">←<span style="font-style: italic;">68wog... .erm</span></span><br />
FU12..16 <span style="color: #666666;">←<span style="font-style: italic;">18wog... .erm</span></span><br />
FU17, 19, 34..36 <span style="color: #666666;">←<span style="font-style: italic;">3wog... .erm</span></span><br />
FU31..33 <span style="color: #666666;">←<span style="font-style: italic;">19wog... .erm</span></span><br />
FU62 <span style="color: #666666;">←<span style="font-style: italic;">10wog... .erm</span></span><br />
FU463..481 <span style="color: #666666;">←<span style="font-style: italic;">20wog... .erm</span></span><br />
FU651, 654..657, 662..665 <span style="color: #666666;">←<span style="font-style: italic;">75wog... .erm</span></span><br />
FU800..802, 810..816 <span style="color: #666666;">←<span style="font-style: italic;">61wog... .erm</span></span><br />
FU809, 839 <span style="color: #666666;">←<span style="font-style: italic;">37wog... .erm</span></span><br />
FU1872..1876  <span style="color: #666666;">←<span style="font-style: italic;">17wog... .erm</span></span><br />
FU3300..3302  <span style="color: #666666;">←<span style="font-style: italic;">53wog... .erm</span></span><br />
FU7070..7074 <span style="color: #666666;">←<span style="font-style: italic;">27wog... .erm</span></span><br />
FU8150..8164, 8230..8231  <span style="color: #666666;">←<span style="font-style: italic;">43wog... .erm</span></span><br />
FU20001..20003 <span style="color: #666666;">←<span style="font-style: italic;">25wog... .erm</span></span>
</td>
<td colspan="">
 
</td>

</tr>
<tr class="trow2" valign="top">
<th class="thead" colspan="" >
wog_опции
</th>
<td colspan="">

</td>
<td colspan="">
 
</td>

</tr>
<br />

</tbody>
</table>
</div>]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Создание скриптов с поддержкой мультиязычности]]></title>
			<link>http://wforum.heroes35.net/showthread.php?tid=5476</link>
			<pubDate>Sun, 16 Feb 2020 17:49:01 +0000</pubDate>
			<guid isPermaLink="false">http://wforum.heroes35.net/showthread.php?tid=5476</guid>
			<description><![CDATA[<div><div class="spoiler_header">Spoiler <a href="javascript:void(0);" onclick="javascript:if(parentNode.parentNode.getElementsByTagName('div')[1&#93;.style.display=='block'){parentNode.parentNode.getElementsByTagName('div')[1&#93;.style.display='none';this.innerHTML='(Click to View)';}else {parentNode.parentNode.getElementsByTagName('div')[1&#93;.style.display='block';this.innerHTML='(Click to Hide)';}">(Click to View)</a></div><div class="spoiler_body" style="display: none; border: 1px dotted #0F5C8E;"><span style="font-weight: bold;">Bes</span> <img src="http://wforum.heroes35.net/images/smilies/read.gif" style="vertical-align: middle;" border="0" alt="Read" title="Read" /> // Для потомков: история появления json в ERA берёт начало <a href="http://wforum.heroes35.net/showthread.php?pid=98646#pid98646" target="_blank">с этого момента</a></div></div><hr />
<br />
<br />
1. Формат ERT устарел и не рекомендуется к применению.<br />
<br />
2. В папке мода создаётся файл Lang\*.json, например Lang\имя мода.json.<br />
<br />
3. Файл имеет следующий формат в кодировке UTF-8:<br />
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>{<br />
&nbsp;&nbsp;"ключ 1-го уровня": {<br />
&nbsp;&nbsp;&nbsp;&nbsp;"ключ 2-го уровня": {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"ключ 3-го уровня": "значение",<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"ключ 3-го уровня": "значение"<br />
&nbsp;&nbsp;&nbsp;&nbsp;}<br />
&nbsp;&nbsp;}<br />
}</code></div></div>
<br />
4. Вложенность и количество уровней определяется объёмом текста в моде и личным решением автора мода. Минимальным и достаточным вариантом выступают 1 уровень группировки с аббревиатурой мода и один уровень для каждого конкретного переводимого текста.<br />
<br />
Пример для мода Battle Heroes:<br />
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>{<br />
&nbsp;&nbsp;"bh": {<br />
&nbsp;&nbsp;&nbsp;&nbsp;"skill_diplomacy": "Дипломатия",<br />
&nbsp;&nbsp;&nbsp;&nbsp;"tournament_win_message": "Вы победили в турнире!"<br />
&nbsp;&nbsp;}<br />
}</code></div></div>
<br />
5. В текстах перевода могут быть подстановочные параметры (placeholders), которые в момент перевода должны быть заменены на числа/строки. Такие параметры заключаются между символами "@"..."@".<br />
<br />
Пример:<br />
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>{<br />
&nbsp;&nbsp;"bh": {<br />
&nbsp;&nbsp;&nbsp;&nbsp;"exp_gain_msg": "Вы получили @exp@ опыта"<br />
&nbsp;&nbsp;}<br />
}</code></div></div>
<br />
6. Получить перевод из ЕРМ можно через <span style="font-weight: bold;">SN:T</span><span style="color: blue;">&#36;1</span>/?<span style="color: blue;">&#36;2</span>/[<span style="color: blue;">#3</span>/<span style="color: blue;">#4</span>...&#93;;<br />
<span style="color: blue;">&#36;1</span> - составной ключ перевода, где ключи разных уровней разделяются точками. Пример: ^bh.exp_gain_msg^<br />
<br />
?<span style="color: blue;">&#36;2</span> - в какую строку поместить перевод<br />
<span style="color: blue;">#3</span> - название очередного параметра<br />
<span style="color: blue;">#4</span> - значение очередного параметра<br />
<br />
Пример:<br />
<div style="background-color: #fff"><script type="erm" id="erm0">!!SN:T^bh.exp_gain_msg^/?z2/^exp^/v600;</script></div>
Предполагается, что в v600 хранится опыт, полученный героем.<br />
Поддерживается до 7-и пар параметр-значение в ЕРМ и неограниченное число в плагинах/Lua.]]></description>
			<content:encoded><![CDATA[<div><div class="spoiler_header">Spoiler <a href="javascript:void(0);" onclick="javascript:if(parentNode.parentNode.getElementsByTagName('div')[1].style.display=='block'){parentNode.parentNode.getElementsByTagName('div')[1].style.display='none';this.innerHTML='(Click to View)';}else {parentNode.parentNode.getElementsByTagName('div')[1].style.display='block';this.innerHTML='(Click to Hide)';}">(Click to View)</a></div><div class="spoiler_body" style="display: none; border: 1px dotted #0F5C8E;"><span style="font-weight: bold;">Bes</span> <img src="http://wforum.heroes35.net/images/smilies/read.gif" style="vertical-align: middle;" border="0" alt="Read" title="Read" /> // Для потомков: история появления json в ERA берёт начало <a href="http://wforum.heroes35.net/showthread.php?pid=98646#pid98646" target="_blank">с этого момента</a></div></div><hr />
<br />
<br />
1. Формат ERT устарел и не рекомендуется к применению.<br />
<br />
2. В папке мода создаётся файл Lang\*.json, например Lang\имя мода.json.<br />
<br />
3. Файл имеет следующий формат в кодировке UTF-8:<br />
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>{<br />
&nbsp;&nbsp;"ключ 1-го уровня": {<br />
&nbsp;&nbsp;&nbsp;&nbsp;"ключ 2-го уровня": {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"ключ 3-го уровня": "значение",<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"ключ 3-го уровня": "значение"<br />
&nbsp;&nbsp;&nbsp;&nbsp;}<br />
&nbsp;&nbsp;}<br />
}</code></div></div>
<br />
4. Вложенность и количество уровней определяется объёмом текста в моде и личным решением автора мода. Минимальным и достаточным вариантом выступают 1 уровень группировки с аббревиатурой мода и один уровень для каждого конкретного переводимого текста.<br />
<br />
Пример для мода Battle Heroes:<br />
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>{<br />
&nbsp;&nbsp;"bh": {<br />
&nbsp;&nbsp;&nbsp;&nbsp;"skill_diplomacy": "Дипломатия",<br />
&nbsp;&nbsp;&nbsp;&nbsp;"tournament_win_message": "Вы победили в турнире!"<br />
&nbsp;&nbsp;}<br />
}</code></div></div>
<br />
5. В текстах перевода могут быть подстановочные параметры (placeholders), которые в момент перевода должны быть заменены на числа/строки. Такие параметры заключаются между символами "@"..."@".<br />
<br />
Пример:<br />
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>{<br />
&nbsp;&nbsp;"bh": {<br />
&nbsp;&nbsp;&nbsp;&nbsp;"exp_gain_msg": "Вы получили @exp@ опыта"<br />
&nbsp;&nbsp;}<br />
}</code></div></div>
<br />
6. Получить перевод из ЕРМ можно через <span style="font-weight: bold;">SN:T</span><span style="color: blue;">&#36;1</span>/?<span style="color: blue;">&#36;2</span>/[<span style="color: blue;">#3</span>/<span style="color: blue;">#4</span>...];<br />
<span style="color: blue;">&#36;1</span> - составной ключ перевода, где ключи разных уровней разделяются точками. Пример: ^bh.exp_gain_msg^<br />
<br />
?<span style="color: blue;">&#36;2</span> - в какую строку поместить перевод<br />
<span style="color: blue;">#3</span> - название очередного параметра<br />
<span style="color: blue;">#4</span> - значение очередного параметра<br />
<br />
Пример:<br />
<div style="background-color: #fff"><script type="erm" id="erm0">!!SN:T^bh.exp_gain_msg^/?z2/^exp^/v600;</script></div>
Предполагается, что в v600 хранится опыт, полученный героем.<br />
Поддерживается до 7-и пар параметр-значение в ЕРМ и неограниченное число в плагинах/Lua.]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Список ЕРМ триггеров и именованных событий]]></title>
			<link>http://wforum.heroes35.net/showthread.php?tid=5462</link>
			<pubDate>Fri, 14 Feb 2020 00:16:05 +0000</pubDate>
			<guid isPermaLink="false">http://wforum.heroes35.net/showthread.php?tid=5462</guid>
			<description><![CDATA[<span style="color: #FF0000;"><span style="font-weight: bold;">Список ЕРМ триггеров и именованных событий</span></span><br />
<div><div class="spoiler_header">Spoiler <a href="javascript:void(0);" onclick="javascript:if(parentNode.parentNode.getElementsByTagName('div')[1&#93;.style.display=='block'){parentNode.parentNode.getElementsByTagName('div')[1&#93;.style.display='none';this.innerHTML='(Click to View)';}else {parentNode.parentNode.getElementsByTagName('div')[1&#93;.style.display='block';this.innerHTML='(Click to Hide)';}">(Click to View)</a></div><div class="spoiler_body" style="display: none; border: 1px dotted #0F5C8E;">
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>BA0&nbsp;&nbsp; OnBeforeBattle<br />
BA1&nbsp;&nbsp; OnAfterBattle<br />
BR&nbsp;&nbsp;&nbsp;&nbsp;OnBattleRound<br />
BG0&nbsp;&nbsp; OnBeforeBattleAction<br />
BG1&nbsp;&nbsp; OnAfterBattleAction<br />
MW0&nbsp;&nbsp; OnWanderingMonsterReach<br />
MW1&nbsp;&nbsp; OnWanderingMonsterDeath<br />
MR0&nbsp;&nbsp; OnMagicBasicResistance<br />
MR1&nbsp;&nbsp; OnMagicCorrectedResistance<br />
MR2&nbsp;&nbsp; OnDwarfMagicResistance<br />
CM0&nbsp;&nbsp; OnAdventureMapRightMouseClick<br />
CM1&nbsp;&nbsp; OnTownMouseClick<br />
CM2&nbsp;&nbsp; OnHeroScreenMouseClick<br />
CM3&nbsp;&nbsp; OnHeroesMeetScreenMouseClick<br />
CM4&nbsp;&nbsp; OnBattleScreenMouseClick<br />
CM5&nbsp;&nbsp; OnAdventureMapLeftMouseClick<br />
AE0&nbsp;&nbsp; OnUnequipArt<br />
AE1&nbsp;&nbsp; OnEquipArt<br />
MM0&nbsp;&nbsp; OnBattleMouseHint<br />
MM1&nbsp;&nbsp; OnTownMouseHint<br />
MP&nbsp;&nbsp;&nbsp;&nbsp;OnMp3MusicChange<br />
SN&nbsp;&nbsp;&nbsp;&nbsp;OnSoundPlay<br />
MG0&nbsp;&nbsp; OnBeforeAdventureMagic<br />
MG1&nbsp;&nbsp; OnAfterAdventureMagic<br />
TH0&nbsp;&nbsp; OnEnterTownHall<br />
TH1&nbsp;&nbsp; OnLeaveTownHall<br />
IP0&nbsp;&nbsp; OnBeforeBattleBeforeDataSend<br />
IP1&nbsp;&nbsp; OnBeforeBattleAfterDataReceived<br />
IP2&nbsp;&nbsp; OnAfterBattleBeforeDataSend<br />
IP3&nbsp;&nbsp; OnAfterBattleAfterDataReceived<br />
CO0&nbsp;&nbsp; OnOpenCommanderWindow<br />
CO1&nbsp;&nbsp; OnCloseCommanderWindow<br />
CO2&nbsp;&nbsp; OnAfterCommanderBuy<br />
CO3&nbsp;&nbsp; OnAfterCommanderResurrect<br />
BA50&nbsp;&nbsp;OnBeforeBattleForThisPcDefender<br />
BA51&nbsp;&nbsp;OnAfterBattleForThisPcDefender<br />
BA52&nbsp;&nbsp;OnBeforeBattleUniversal<br />
BA53&nbsp;&nbsp;OnAfterBattleUniversal<br />
GM0&nbsp;&nbsp; OnAfterLoadGame<br />
GM1&nbsp;&nbsp; OnBeforeSaveGame<br />
PI&nbsp;&nbsp;&nbsp;&nbsp;OnAfterErmInstructions<br />
DL&nbsp;&nbsp;&nbsp;&nbsp;OnCustomDialogEvent<br />
HM&nbsp;&nbsp;&nbsp;&nbsp;OnHeroMove<br />
HL&nbsp;&nbsp;&nbsp;&nbsp;OnHeroGainLevel<br />
BF&nbsp;&nbsp;&nbsp;&nbsp;OnSetupBattlefield<br />
MF1&nbsp;&nbsp; OnMonsterPhysicalDamage<br />
TL0&nbsp;&nbsp; OnEverySecond<br />
TL1&nbsp;&nbsp; OnEvery2Seconds<br />
TL2&nbsp;&nbsp; OnEvery5Seconds<br />
TL3&nbsp;&nbsp; OnEvery10Seconds<br />
TL4&nbsp;&nbsp; OnEveryMinute<br />
<br />
FU77001&nbsp;&nbsp;OnSavegameWrite<br />
FU77002&nbsp;&nbsp;OnSavegameRead<br />
FU77003&nbsp;&nbsp;OnKeyPressed<br />
FU77004&nbsp;&nbsp;OnOpenHeroScreen<br />
FU77005&nbsp;&nbsp;OnCloseHeroScreen<br />
FU77006&nbsp;&nbsp;OnBattleStackObtainsTurn<br />
FU77007&nbsp;&nbsp;OnBattleRegeneratePhase<br />
FU77008&nbsp;&nbsp;OnAfterSaveGame<br />
FU77010&nbsp;&nbsp;OnBeforeHeroInteraction<br />
FU77011&nbsp;&nbsp;OnAfterHeroInteraction<br />
FU77012&nbsp;&nbsp;OnStackToStackDamage<br />
FU77013&nbsp;&nbsp;OnAICalcStackAttackEffect<br />
FU77014&nbsp;&nbsp;OnChat<br />
FU77015&nbsp;&nbsp;OnGameEnter<br />
FU77016&nbsp;&nbsp;OnGameLeave<br />
FU77017&nbsp;&nbsp;OnRemoteEvent<br />
FU77018&nbsp;&nbsp;OnEveryDay<br />
FU77019&nbsp;&nbsp;OnBeforeBattlefieldVisible<br />
FU77020&nbsp;&nbsp;OnBattlefieldVisible<br />
FU77021&nbsp;&nbsp;OnAfterTacticsPhase<br />
FU77022&nbsp;&nbsp;OnCombatRound<br />
FU77023&nbsp;&nbsp;OnOpenRecruitDlg<br />
FU77024&nbsp;&nbsp;OnCloseRecruitDlg<br />
FU77025&nbsp;&nbsp;OnRecruitDlgMouseClick<br />
FU77026&nbsp;&nbsp;OnTownHallMouseClick<br />
FU77027&nbsp;&nbsp;OnKingdomOverviewMouseClick<br />
FU77028&nbsp;&nbsp;OnRecruitDlgRecalc<br />
FU77029&nbsp;&nbsp;OnRecruitDlgAction<br />
FU77030&nbsp;&nbsp;OnLoadHeroScreen<br />
FU77031&nbsp;&nbsp;OnBuildTownBuilding<br />
FU77032&nbsp;&nbsp;OnOpenTownScreen<br />
FU77033&nbsp;&nbsp;OnCloseTownScreen<br />
FU77034&nbsp;&nbsp;OnSwitchTownScreen<br />
FU77035&nbsp;&nbsp;OnPreTownScreen<br />
FU77036&nbsp;&nbsp;OnPostTownScreen<br />
FU77037&nbsp;&nbsp;OnPreHeroScreen<br />
FU77038&nbsp;&nbsp;OnPostHeroScreen<br />
<br />
Только для плагинов/Lua:<br />
<br />
N - number/ID<br />
<br />
FU1..FU29999&nbsp;&nbsp;OnErmFunction N<br />
TM1..TM100&nbsp;&nbsp;&nbsp;&nbsp;OnErmTimer N<br />
HE0..HE198&nbsp;&nbsp;&nbsp;&nbsp;OnHeroInteraction N<br />
HM0..HM198&nbsp;&nbsp;&nbsp;&nbsp;OnHeroMove N<br />
HL-1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;OnHeroGainLevel<br />
HL0..HL198&nbsp;&nbsp;&nbsp;&nbsp;OnHeroGainLevel N<br />
<br />
LE&nbsp;&nbsp;OnLocalEvent X/Y/Z<br />
OB&nbsp;&nbsp;OnAfterVisitObject X/Y/Z<br />
OB&nbsp;&nbsp;OnAfterVisitObject Type/Subtype<br />
OB&nbsp;&nbsp;OnBeforeVisitObject X/Y/Z<br />
OB&nbsp;&nbsp;OnBeforeVisitObject Type/Subtype</code></div></div>
</div></div>]]></description>
			<content:encoded><![CDATA[<span style="color: #FF0000;"><span style="font-weight: bold;">Список ЕРМ триггеров и именованных событий</span></span><br />
<div><div class="spoiler_header">Spoiler <a href="javascript:void(0);" onclick="javascript:if(parentNode.parentNode.getElementsByTagName('div')[1].style.display=='block'){parentNode.parentNode.getElementsByTagName('div')[1].style.display='none';this.innerHTML='(Click to View)';}else {parentNode.parentNode.getElementsByTagName('div')[1].style.display='block';this.innerHTML='(Click to Hide)';}">(Click to View)</a></div><div class="spoiler_body" style="display: none; border: 1px dotted #0F5C8E;">
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>BA0&nbsp;&nbsp; OnBeforeBattle<br />
BA1&nbsp;&nbsp; OnAfterBattle<br />
BR&nbsp;&nbsp;&nbsp;&nbsp;OnBattleRound<br />
BG0&nbsp;&nbsp; OnBeforeBattleAction<br />
BG1&nbsp;&nbsp; OnAfterBattleAction<br />
MW0&nbsp;&nbsp; OnWanderingMonsterReach<br />
MW1&nbsp;&nbsp; OnWanderingMonsterDeath<br />
MR0&nbsp;&nbsp; OnMagicBasicResistance<br />
MR1&nbsp;&nbsp; OnMagicCorrectedResistance<br />
MR2&nbsp;&nbsp; OnDwarfMagicResistance<br />
CM0&nbsp;&nbsp; OnAdventureMapRightMouseClick<br />
CM1&nbsp;&nbsp; OnTownMouseClick<br />
CM2&nbsp;&nbsp; OnHeroScreenMouseClick<br />
CM3&nbsp;&nbsp; OnHeroesMeetScreenMouseClick<br />
CM4&nbsp;&nbsp; OnBattleScreenMouseClick<br />
CM5&nbsp;&nbsp; OnAdventureMapLeftMouseClick<br />
AE0&nbsp;&nbsp; OnUnequipArt<br />
AE1&nbsp;&nbsp; OnEquipArt<br />
MM0&nbsp;&nbsp; OnBattleMouseHint<br />
MM1&nbsp;&nbsp; OnTownMouseHint<br />
MP&nbsp;&nbsp;&nbsp;&nbsp;OnMp3MusicChange<br />
SN&nbsp;&nbsp;&nbsp;&nbsp;OnSoundPlay<br />
MG0&nbsp;&nbsp; OnBeforeAdventureMagic<br />
MG1&nbsp;&nbsp; OnAfterAdventureMagic<br />
TH0&nbsp;&nbsp; OnEnterTownHall<br />
TH1&nbsp;&nbsp; OnLeaveTownHall<br />
IP0&nbsp;&nbsp; OnBeforeBattleBeforeDataSend<br />
IP1&nbsp;&nbsp; OnBeforeBattleAfterDataReceived<br />
IP2&nbsp;&nbsp; OnAfterBattleBeforeDataSend<br />
IP3&nbsp;&nbsp; OnAfterBattleAfterDataReceived<br />
CO0&nbsp;&nbsp; OnOpenCommanderWindow<br />
CO1&nbsp;&nbsp; OnCloseCommanderWindow<br />
CO2&nbsp;&nbsp; OnAfterCommanderBuy<br />
CO3&nbsp;&nbsp; OnAfterCommanderResurrect<br />
BA50&nbsp;&nbsp;OnBeforeBattleForThisPcDefender<br />
BA51&nbsp;&nbsp;OnAfterBattleForThisPcDefender<br />
BA52&nbsp;&nbsp;OnBeforeBattleUniversal<br />
BA53&nbsp;&nbsp;OnAfterBattleUniversal<br />
GM0&nbsp;&nbsp; OnAfterLoadGame<br />
GM1&nbsp;&nbsp; OnBeforeSaveGame<br />
PI&nbsp;&nbsp;&nbsp;&nbsp;OnAfterErmInstructions<br />
DL&nbsp;&nbsp;&nbsp;&nbsp;OnCustomDialogEvent<br />
HM&nbsp;&nbsp;&nbsp;&nbsp;OnHeroMove<br />
HL&nbsp;&nbsp;&nbsp;&nbsp;OnHeroGainLevel<br />
BF&nbsp;&nbsp;&nbsp;&nbsp;OnSetupBattlefield<br />
MF1&nbsp;&nbsp; OnMonsterPhysicalDamage<br />
TL0&nbsp;&nbsp; OnEverySecond<br />
TL1&nbsp;&nbsp; OnEvery2Seconds<br />
TL2&nbsp;&nbsp; OnEvery5Seconds<br />
TL3&nbsp;&nbsp; OnEvery10Seconds<br />
TL4&nbsp;&nbsp; OnEveryMinute<br />
<br />
FU77001&nbsp;&nbsp;OnSavegameWrite<br />
FU77002&nbsp;&nbsp;OnSavegameRead<br />
FU77003&nbsp;&nbsp;OnKeyPressed<br />
FU77004&nbsp;&nbsp;OnOpenHeroScreen<br />
FU77005&nbsp;&nbsp;OnCloseHeroScreen<br />
FU77006&nbsp;&nbsp;OnBattleStackObtainsTurn<br />
FU77007&nbsp;&nbsp;OnBattleRegeneratePhase<br />
FU77008&nbsp;&nbsp;OnAfterSaveGame<br />
FU77010&nbsp;&nbsp;OnBeforeHeroInteraction<br />
FU77011&nbsp;&nbsp;OnAfterHeroInteraction<br />
FU77012&nbsp;&nbsp;OnStackToStackDamage<br />
FU77013&nbsp;&nbsp;OnAICalcStackAttackEffect<br />
FU77014&nbsp;&nbsp;OnChat<br />
FU77015&nbsp;&nbsp;OnGameEnter<br />
FU77016&nbsp;&nbsp;OnGameLeave<br />
FU77017&nbsp;&nbsp;OnRemoteEvent<br />
FU77018&nbsp;&nbsp;OnEveryDay<br />
FU77019&nbsp;&nbsp;OnBeforeBattlefieldVisible<br />
FU77020&nbsp;&nbsp;OnBattlefieldVisible<br />
FU77021&nbsp;&nbsp;OnAfterTacticsPhase<br />
FU77022&nbsp;&nbsp;OnCombatRound<br />
FU77023&nbsp;&nbsp;OnOpenRecruitDlg<br />
FU77024&nbsp;&nbsp;OnCloseRecruitDlg<br />
FU77025&nbsp;&nbsp;OnRecruitDlgMouseClick<br />
FU77026&nbsp;&nbsp;OnTownHallMouseClick<br />
FU77027&nbsp;&nbsp;OnKingdomOverviewMouseClick<br />
FU77028&nbsp;&nbsp;OnRecruitDlgRecalc<br />
FU77029&nbsp;&nbsp;OnRecruitDlgAction<br />
FU77030&nbsp;&nbsp;OnLoadHeroScreen<br />
FU77031&nbsp;&nbsp;OnBuildTownBuilding<br />
FU77032&nbsp;&nbsp;OnOpenTownScreen<br />
FU77033&nbsp;&nbsp;OnCloseTownScreen<br />
FU77034&nbsp;&nbsp;OnSwitchTownScreen<br />
FU77035&nbsp;&nbsp;OnPreTownScreen<br />
FU77036&nbsp;&nbsp;OnPostTownScreen<br />
FU77037&nbsp;&nbsp;OnPreHeroScreen<br />
FU77038&nbsp;&nbsp;OnPostHeroScreen<br />
<br />
Только для плагинов/Lua:<br />
<br />
N - number/ID<br />
<br />
FU1..FU29999&nbsp;&nbsp;OnErmFunction N<br />
TM1..TM100&nbsp;&nbsp;&nbsp;&nbsp;OnErmTimer N<br />
HE0..HE198&nbsp;&nbsp;&nbsp;&nbsp;OnHeroInteraction N<br />
HM0..HM198&nbsp;&nbsp;&nbsp;&nbsp;OnHeroMove N<br />
HL-1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;OnHeroGainLevel<br />
HL0..HL198&nbsp;&nbsp;&nbsp;&nbsp;OnHeroGainLevel N<br />
<br />
LE&nbsp;&nbsp;OnLocalEvent X/Y/Z<br />
OB&nbsp;&nbsp;OnAfterVisitObject X/Y/Z<br />
OB&nbsp;&nbsp;OnAfterVisitObject Type/Subtype<br />
OB&nbsp;&nbsp;OnBeforeVisitObject X/Y/Z<br />
OB&nbsp;&nbsp;OnBeforeVisitObject Type/Subtype</code></div></div>
</div></div>]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Новый ERM редактор]]></title>
			<link>http://wforum.heroes35.net/showthread.php?tid=5429</link>
			<pubDate>Wed, 15 Jan 2020 21:17:45 +0000</pubDate>
			<guid isPermaLink="false">http://wforum.heroes35.net/showthread.php?tid=5429</guid>
			<description><![CDATA[<span style="font-size: medium;"><span style="color: #FF0000;"><span style="font-weight: bold;">Новый Редактор ЕРМ</span></span></span><br />
<br />
<img src="https://img.hmm35.ru/erm-editor/promo1.gif" border="0" alt="Image: promo1.gif" style='max-width: 800px; height: auto;' onclick='Bers.ScaleImg(this);'/><br />
<br />
На базе прекрасного и крайне функционального редактора <a href="https://www.sublimetext.com/" target="_blank">Sublime Text</a> был разработан ЕРМ редактор.<br />
(Крайне рекомендуется ознакомиться с сайтом разработчика редактора, где в виде gif-анимацией иллюстрируются многие возможности программного продукта)<br />
<br />
<span style="font-weight: bold;"><span style="color: #006400;">Основные особенности:</span></span><br />
-) Поддержка множественных курсоров/выделений позволяет редактировать большое число мест документа одновременно.<br />
-) Встроенная система Python-плагинов и менеджер пакетов.<br />
-) Визуальная мини-карта документа, панель с файловым деревом.<br />
-) Возможность организации файлов в проекты, поиска по сотням файлов одновременно.<br />
-) Быстрый нечёткий поиск по идентификаторам, объявлениям, файлам.<br />
Переход к объявлениям функций.<br />
-) Мощная поддержка автодополнения на основе любых слов, встречающихся в открытых файлах.<br />
-) Сессии, автосохранение сессий, разделение рабочего окна на подокна.<br />
-) Поиск и замена по регулярным выражением и многое другое.<br />
<br />
<span style="color: #C71585;"><span style="font-weight: bold;">Особенности поддержки ЕРМ:</span></span><br />
-) Полная подсветка синтаксиса, включая интерполированные переменные (%Y2), имена функций и меток, макросы и др.<br />
-) Быстрый ввод триггеров по "_xx" + ENTER и "on" + ENTER.<br />
-) Быстрый ввод ресиверов по "xx" + ENTER, например "UN" =&gt; "!!UN:".<br />
-) Автодополнение названий событий Эры.<br />
-) Всплывающая подсказка для перехода к объявлению функции при наведении на имя функции. Не работает для функций с точками в названии, но работает выделение имени + F12.<br />
-) Поддержка сниппетов "if", "ife" для быстрого ввода условий, "exi", "exif", "exifo" для быстрого ввода условий выхода из триггера.<br />
-) Сниппет "for" для быстрой записи циклов со счётчиком.<br />
-) Быстрый переход по именованным триггерам по CTRL+R.<br />
-) Быстрый переход по открытым файлам и файлам проекта по CTRL+P.<br />
-) Быстрый переход на любую строку по CTRL+G.<br />
-) И другое…<br />
<br />
Редактор будет распространяться в составе установщика Эры.<br />
Купить лицензию для отключения напоминаний о регистрации можно на сайте разработчика.<br />
<br />
<span style="font-weight: bold;">Скачать</span>: <a href="https://yadi.sk/d/tp1ClUzFV7YpRA" target="_blank">https://yadi.sk/d/tp1ClUzFV7YpRA</a> (14 МБ)<br />
<span style="font-weight: bold;">Скачать только файлы поддержки ЕРМ для Sublime Text</span>: <a href="https://yadi.sk/d/kBVOWIXg3y4vsg" target="_blank">https://yadi.sk/d/kBVOWIXg3y4vsg</a> (7 КБ)]]></description>
			<content:encoded><![CDATA[<span style="font-size: medium;"><span style="color: #FF0000;"><span style="font-weight: bold;">Новый Редактор ЕРМ</span></span></span><br />
<br />
<img src="https://img.hmm35.ru/erm-editor/promo1.gif" border="0" alt="Image: promo1.gif" style='max-width: 800px; height: auto;' onclick='Bers.ScaleImg(this);'/><br />
<br />
На базе прекрасного и крайне функционального редактора <a href="https://www.sublimetext.com/" target="_blank">Sublime Text</a> был разработан ЕРМ редактор.<br />
(Крайне рекомендуется ознакомиться с сайтом разработчика редактора, где в виде gif-анимацией иллюстрируются многие возможности программного продукта)<br />
<br />
<span style="font-weight: bold;"><span style="color: #006400;">Основные особенности:</span></span><br />
-) Поддержка множественных курсоров/выделений позволяет редактировать большое число мест документа одновременно.<br />
-) Встроенная система Python-плагинов и менеджер пакетов.<br />
-) Визуальная мини-карта документа, панель с файловым деревом.<br />
-) Возможность организации файлов в проекты, поиска по сотням файлов одновременно.<br />
-) Быстрый нечёткий поиск по идентификаторам, объявлениям, файлам.<br />
Переход к объявлениям функций.<br />
-) Мощная поддержка автодополнения на основе любых слов, встречающихся в открытых файлах.<br />
-) Сессии, автосохранение сессий, разделение рабочего окна на подокна.<br />
-) Поиск и замена по регулярным выражением и многое другое.<br />
<br />
<span style="color: #C71585;"><span style="font-weight: bold;">Особенности поддержки ЕРМ:</span></span><br />
-) Полная подсветка синтаксиса, включая интерполированные переменные (%Y2), имена функций и меток, макросы и др.<br />
-) Быстрый ввод триггеров по "_xx" + ENTER и "on" + ENTER.<br />
-) Быстрый ввод ресиверов по "xx" + ENTER, например "UN" =&gt; "!!UN:".<br />
-) Автодополнение названий событий Эры.<br />
-) Всплывающая подсказка для перехода к объявлению функции при наведении на имя функции. Не работает для функций с точками в названии, но работает выделение имени + F12.<br />
-) Поддержка сниппетов "if", "ife" для быстрого ввода условий, "exi", "exif", "exifo" для быстрого ввода условий выхода из триггера.<br />
-) Сниппет "for" для быстрой записи циклов со счётчиком.<br />
-) Быстрый переход по именованным триггерам по CTRL+R.<br />
-) Быстрый переход по открытым файлам и файлам проекта по CTRL+P.<br />
-) Быстрый переход на любую строку по CTRL+G.<br />
-) И другое…<br />
<br />
Редактор будет распространяться в составе установщика Эры.<br />
Купить лицензию для отключения напоминаний о регистрации можно на сайте разработчика.<br />
<br />
<span style="font-weight: bold;">Скачать</span>: <a href="https://yadi.sk/d/tp1ClUzFV7YpRA" target="_blank">https://yadi.sk/d/tp1ClUzFV7YpRA</a> (14 МБ)<br />
<span style="font-weight: bold;">Скачать только файлы поддержки ЕРМ для Sublime Text</span>: <a href="https://yadi.sk/d/kBVOWIXg3y4vsg" target="_blank">https://yadi.sk/d/kBVOWIXg3y4vsg</a> (7 КБ)]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Новая реализация виртуальной файловой системы]]></title>
			<link>http://wforum.heroes35.net/showthread.php?tid=5296</link>
			<pubDate>Wed, 08 May 2019 20:27:54 +0000</pubDate>
			<guid isPermaLink="false">http://wforum.heroes35.net/showthread.php?tid=5296</guid>
			<description><![CDATA[Доброго времени суток, дорогие друзья!<br />
Спасибо вам всем огромное за всё, что вы делали и делаете <img src="http://wforum.heroes35.net/images/smilies/119.gif" style="vertical-align: middle;" border="0" alt="119" title="119" /><br />
<br />
У меня просьба к пользователям операционных систем Windows XP/Vista/7/8/10, Linux скачать архив, распаковать в любую папку (для Linux с желательно латинскими путями) и запустить файл VfsTest.exe, а в нём нажать на зелёную кнопку. Интересует версия ОС и прошли ли тесты.<br />
<br />
Данная операция прогонит все написанные мною тесты новой реализации виртуальной файловой системы, которую, в случае успеха, я буду распространять свободно в качестве DLL. Она работает на самом низком уровне (NTDLL.DLL), поддерживает Юникод и огромное количество API, писалась с учётом Wine. С помощью библиотеки можно спроецировать содержимое множество одних папок на любые другие, как сейчас работает Эра, только с полным предварительным кэшированием спроецированных папок для скорости работы и поддержкой многозадачности.<br />
<br />
<a href="http://rgho.st/8qsfHTNZY" target="_blank">Ну и где же ссылка на скачивание?</a>]]></description>
			<content:encoded><![CDATA[Доброго времени суток, дорогие друзья!<br />
Спасибо вам всем огромное за всё, что вы делали и делаете <img src="http://wforum.heroes35.net/images/smilies/119.gif" style="vertical-align: middle;" border="0" alt="119" title="119" /><br />
<br />
У меня просьба к пользователям операционных систем Windows XP/Vista/7/8/10, Linux скачать архив, распаковать в любую папку (для Linux с желательно латинскими путями) и запустить файл VfsTest.exe, а в нём нажать на зелёную кнопку. Интересует версия ОС и прошли ли тесты.<br />
<br />
Данная операция прогонит все написанные мною тесты новой реализации виртуальной файловой системы, которую, в случае успеха, я буду распространять свободно в качестве DLL. Она работает на самом низком уровне (NTDLL.DLL), поддерживает Юникод и огромное количество API, писалась с учётом Wine. С помощью библиотеки можно спроецировать содержимое множество одних папок на любые другие, как сейчас работает Эра, только с полным предварительным кэшированием спроецированных папок для скорости работы и поддержкой многозадачности.<br />
<br />
<a href="http://rgho.st/8qsfHTNZY" target="_blank">Ну и где же ссылка на скачивание?</a>]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Era 2.461 RUS 2018]]></title>
			<link>http://wforum.heroes35.net/showthread.php?tid=5207</link>
			<pubDate>Mon, 20 Aug 2018 03:14:11 +0000</pubDate>
			<guid isPermaLink="false">http://wforum.heroes35.net/showthread.php?tid=5207</guid>
			<description><![CDATA[Пытаюсь запилить актуальную версию установщика - Era 2.46, чтобы её можно было кидать новичкам.<br />
<br />
В состав входит:<br />
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>Era 2.461<br />
Era 2.46 Rus<br />
No HotA maps<br />
ERA scripts Rus 1.30<br />
Typhon (по умолчанию отключён)<br />
Обновлённый patcher_x86.dll из актуальной версии HD mod<br />
Установщик актуальной версии HD mod</code></div></div>
<br />
<span style="font-weight: bold;">Скачать</span>: <a href="https://drive.google.com/open?id=1Ddl57wzMABmQdz_lQIMOWLkv3uzX5u8W" target="_blank">тут</a> (128Мб)<br />
<span style="text-decoration: underline;">Установка</span>: Отрыть файл и следовать указаниям установщика<br />
<br />
Прошу попробовать установить и отписать о проблемах. Из известных мне, при работе installmod несколько раз появляется UAC<br />
Также прошу написать, что ещё необходимо включить в данный установщик.]]></description>
			<content:encoded><![CDATA[Пытаюсь запилить актуальную версию установщика - Era 2.46, чтобы её можно было кидать новичкам.<br />
<br />
В состав входит:<br />
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>Era 2.461<br />
Era 2.46 Rus<br />
No HotA maps<br />
ERA scripts Rus 1.30<br />
Typhon (по умолчанию отключён)<br />
Обновлённый patcher_x86.dll из актуальной версии HD mod<br />
Установщик актуальной версии HD mod</code></div></div>
<br />
<span style="font-weight: bold;">Скачать</span>: <a href="https://drive.google.com/open?id=1Ddl57wzMABmQdz_lQIMOWLkv3uzX5u8W" target="_blank">тут</a> (128Мб)<br />
<span style="text-decoration: underline;">Установка</span>: Отрыть файл и следовать указаниям установщика<br />
<br />
Прошу попробовать установить и отписать о проблемах. Из известных мне, при работе installmod несколько раз появляется UAC<br />
Также прошу написать, что ещё необходимо включить в данный установщик.]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[ERM => Lua FAQ]]></title>
			<link>http://wforum.heroes35.net/showthread.php?tid=5171</link>
			<pubDate>Fri, 05 Jan 2018 10:46:09 +0000</pubDate>
			<guid isPermaLink="false">http://wforum.heroes35.net/showthread.php?tid=5171</guid>
			<description><![CDATA[<span style="font-weight: bold;"><span style="color: #0000CD;">Чтение данных по адресу</span></span><br />
<div style="background-color: #fff"><script type="erm" id="erm0">!!UN:C[адрес&#93;/[размер=1,2,4&#93;/?[переменная&#93;;</script></div>
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>local mem = require('era.mem')<br />
<br />
local byte&nbsp;&nbsp; = mem.u8(адрес)&nbsp;&nbsp;-- 1 байт&nbsp;&nbsp; 0..255<br />
local sbyte&nbsp;&nbsp;= mem.i8(адрес)&nbsp;&nbsp;-- 1 байт&nbsp;&nbsp; -128..127<br />
local word&nbsp;&nbsp; = mem.u16(адрес) -- 2 байта&nbsp;&nbsp;0..65535<br />
local sword&nbsp;&nbsp;= mem.i16(адрес) -- 2 байта&nbsp;&nbsp;-32768..32767<br />
local dword&nbsp;&nbsp;= mem.u32(адрес) -- 4 байта&nbsp;&nbsp;0..4294967295<br />
local sdword = mem.i32(адрес) -- 4 байта&nbsp;&nbsp;-2147483648..2147483647</code></div></div>
<br />
<span style="font-weight: bold;"><span style="color: #0000CD;">Запись данных по адресу</span></span><br />
<div style="background-color: #fff"><script type="erm" id="erm1">!!UN:C[адрес&#93;/[размер=1,2,4&#93;/[значение&#93;;</script></div>
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>mem.u8(адрес, значение)&nbsp;&nbsp;-- 1 байт&nbsp;&nbsp; 0..255<br />
mem.i8(адрес, значение)&nbsp;&nbsp;-- 1 байт&nbsp;&nbsp; -128..127<br />
mem.u16(адрес, значение) -- 2 байта&nbsp;&nbsp;0..65535<br />
mem.i16(адрес, значение) -- 2 байта&nbsp;&nbsp;-32768..32767<br />
mem.u32(адрес, значение) -- 4 байта&nbsp;&nbsp;0..4294967295<br />
mem.i32(адрес, значение) -- 4 байта&nbsp;&nbsp;-2147483648..2147483647</code></div></div>
]]></description>
			<content:encoded><![CDATA[<span style="font-weight: bold;"><span style="color: #0000CD;">Чтение данных по адресу</span></span><br />
<div style="background-color: #fff"><script type="erm" id="erm0">!!UN:C[адрес]/[размер=1,2,4]/?[переменная];</script></div>
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>local mem = require('era.mem')<br />
<br />
local byte&nbsp;&nbsp; = mem.u8(адрес)&nbsp;&nbsp;-- 1 байт&nbsp;&nbsp; 0..255<br />
local sbyte&nbsp;&nbsp;= mem.i8(адрес)&nbsp;&nbsp;-- 1 байт&nbsp;&nbsp; -128..127<br />
local word&nbsp;&nbsp; = mem.u16(адрес) -- 2 байта&nbsp;&nbsp;0..65535<br />
local sword&nbsp;&nbsp;= mem.i16(адрес) -- 2 байта&nbsp;&nbsp;-32768..32767<br />
local dword&nbsp;&nbsp;= mem.u32(адрес) -- 4 байта&nbsp;&nbsp;0..4294967295<br />
local sdword = mem.i32(адрес) -- 4 байта&nbsp;&nbsp;-2147483648..2147483647</code></div></div>
<br />
<span style="font-weight: bold;"><span style="color: #0000CD;">Запись данных по адресу</span></span><br />
<div style="background-color: #fff"><script type="erm" id="erm1">!!UN:C[адрес]/[размер=1,2,4]/[значение];</script></div>
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>mem.u8(адрес, значение)&nbsp;&nbsp;-- 1 байт&nbsp;&nbsp; 0..255<br />
mem.i8(адрес, значение)&nbsp;&nbsp;-- 1 байт&nbsp;&nbsp; -128..127<br />
mem.u16(адрес, значение) -- 2 байта&nbsp;&nbsp;0..65535<br />
mem.i16(адрес, значение) -- 2 байта&nbsp;&nbsp;-32768..32767<br />
mem.u32(адрес, значение) -- 4 байта&nbsp;&nbsp;0..4294967295<br />
mem.i32(адрес, значение) -- 4 байта&nbsp;&nbsp;-2147483648..2147483647</code></div></div>
]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Lua. Руководства]]></title>
			<link>http://wforum.heroes35.net/showthread.php?tid=5170</link>
			<pubDate>Thu, 04 Jan 2018 23:39:21 +0000</pubDate>
			<guid isPermaLink="false">http://wforum.heroes35.net/showthread.php?tid=5170</guid>
			<description><![CDATA[Скрипты Lua располагаются в папке Data\Scripts или "Имя мода\Data\Scripts" и имеют расширение *.lua.<br />
<br />
Библиотечные скрипты располагаются в подпапке libs и libs\[имя библиотеки&#93;, например: libs\era\*.lua.<br />
Библиотечные скрипты подключаются через require "имя" или require "имя подпапки в libs.имя файла без расширения". Пример: require "era.mem" для libs\era\mem.lua<br />
<br />
Скрипты бывают системными и обычными. Системные загружаются только один раз при событии <span style="text-decoration: underline;">OnBeforeWoG</span> (до создания окна и выполнения кода инициализации WoG) и работают всю игру, как привычные плагины. Обычные скрипты работают схоже с ЕРМ скриптами.<br />
<br />
Системные скрипты имеют двойное расширение *.sys.lua и загружаются в алфавитном порядке. Первым загружается скрипт _core_.sys.lua, поскольку его имя начинается с подчёркивания.<br />
<br />
<span style="color: #000080;">Пример</span><br />
Data\Scripts\test.sys.lua<br />
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>print("Работает!")</code></div></div>
<br />
Глобальная функция <span style="text-decoration: underline;">print</span> использует системные диалоги (MessageBox) для отображения сообщений, пока не будет создано игровое окно. После чего функция отображает сообщения в виде внутриигровых окошек аналогично команде ЕРМ IF:M. Помимо этого, функция позволяет выводить в отладочном виде содержимое любых переменных (таблиц, cdata, логических и т.д.), что делает её безопасным и удобным средством для отладки. Если передать функции более одного аргумента, аргументы будут объединены пробелом.]]></description>
			<content:encoded><![CDATA[Скрипты Lua располагаются в папке Data\Scripts или "Имя мода\Data\Scripts" и имеют расширение *.lua.<br />
<br />
Библиотечные скрипты располагаются в подпапке libs и libs\[имя библиотеки], например: libs\era\*.lua.<br />
Библиотечные скрипты подключаются через require "имя" или require "имя подпапки в libs.имя файла без расширения". Пример: require "era.mem" для libs\era\mem.lua<br />
<br />
Скрипты бывают системными и обычными. Системные загружаются только один раз при событии <span style="text-decoration: underline;">OnBeforeWoG</span> (до создания окна и выполнения кода инициализации WoG) и работают всю игру, как привычные плагины. Обычные скрипты работают схоже с ЕРМ скриптами.<br />
<br />
Системные скрипты имеют двойное расширение *.sys.lua и загружаются в алфавитном порядке. Первым загружается скрипт _core_.sys.lua, поскольку его имя начинается с подчёркивания.<br />
<br />
<span style="color: #000080;">Пример</span><br />
Data\Scripts\test.sys.lua<br />
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>print("Работает!")</code></div></div>
<br />
Глобальная функция <span style="text-decoration: underline;">print</span> использует системные диалоги (MessageBox) для отображения сообщений, пока не будет создано игровое окно. После чего функция отображает сообщения в виде внутриигровых окошек аналогично команде ЕРМ IF:M. Помимо этого, функция позволяет выводить в отладочном виде содержимое любых переменных (таблиц, cdata, логических и т.д.), что делает её безопасным и удобным средством для отладки. Если передать функции более одного аргумента, аргументы будут объединены пробелом.]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Нужна ли в Эре поддержка Windows XP?]]></title>
			<link>http://wforum.heroes35.net/showthread.php?tid=5163</link>
			<pubDate>Tue, 28 Nov 2017 16:39:30 +0000</pubDate>
			<guid isPermaLink="false">http://wforum.heroes35.net/showthread.php?tid=5163</guid>
			<description><![CDATA[Голосуем. В XP нет части интересных системных функций, её не поддерживает PHP 5.5+, на неё не идут обновления и практически никто на ней не тестирует.<br />
/Но ExaGear-подобным симуляторам от этого только плюс.]]></description>
			<content:encoded><![CDATA[Голосуем. В XP нет части интересных системных функций, её не поддерживает PHP 5.5+, на неё не идут обновления и практически никто на ней не тестирует.<br />
/Но ExaGear-подобным симуляторам от этого только плюс.]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Соавторы Эры]]></title>
			<link>http://wforum.heroes35.net/showthread.php?tid=5161</link>
			<pubDate>Mon, 27 Nov 2017 15:37:03 +0000</pubDate>
			<guid isPermaLink="false">http://wforum.heroes35.net/showthread.php?tid=5161</guid>
			<description><![CDATA[Просьба писать сюда списком людей, чей труд хоть сколько-нибудь использован в сборке/тестировании/разработки Эры, включая модули/DLL и UN:C хаки. Хочу выводить их список в инсталляторе, но боюсь указать не всех, так что пишите тех, кто приходит на ум.]]></description>
			<content:encoded><![CDATA[Просьба писать сюда списком людей, чей труд хоть сколько-нибудь использован в сборке/тестировании/разработки Эры, включая модули/DLL и UN:C хаки. Хочу выводить их список в инсталляторе, но боюсь указать не всех, так что пишите тех, кто приходит на ум.]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Сообщения антивирусов о вирусах]]></title>
			<link>http://wforum.heroes35.net/showthread.php?tid=5824</link>
			<pubDate>Fri, 08 Jul 2016 16:55:32 +0000</pubDate>
			<guid isPermaLink="false">http://wforum.heroes35.net/showthread.php?tid=5824</guid>
			<description><![CDATA[Конечно не хочу жаловаться, но при скачивание установщика, пишет: "заблокировано антивирусом". Правда это исправляется при удалении из карантина, но всё равно возвращается в карантин. А можно ли как-то в исключения кинуть?]]></description>
			<content:encoded><![CDATA[Конечно не хочу жаловаться, но при скачивание установщика, пишет: "заблокировано антивирусом". Правда это исправляется при удалении из карантина, но всё равно возвращается в карантин. А можно ли как-то в исключения кинуть?]]></content:encoded>
		</item>
	</channel>
</rss>