Heroes of Might and Magic Community
visiting hero! Register | Today's Posts | Games | Search! | FAQ/Rules | AvatarList | MemberList | Profile


Age of Heroes Headlines:  
5 Oct 2016: Heroes VII development comes to an end.. - read more
6 Aug 2016: Troubled Heroes VII Expansion Release - read more
26 Apr 2016: Heroes VII XPack - Trial by Fire - Coming out in June! - read more
17 Apr 2016: Global Alternative Creatures MOD for H7 after 1.8 Patch! - read more
7 Mar 2016: Romero launches a Piano Sonata Album Kickstarter! - read more
19 Feb 2016: Heroes 5.5 RC6, Heroes VII patch 1.7 are out! - read more
13 Jan 2016: Horn of the Abyss 1.4 Available for Download! - read more
17 Dec 2015: Heroes 5.5 update, 1.6 out for H7 - read more
23 Nov 2015: H7 1.4 & 1.5 patches Released - read more
31 Oct 2015: First H7 patches are out, End of DoC development - read more
5 Oct 2016: Heroes VII development comes to an end.. - read more
[X] Remove Ads
LOGIN:     Username:     Password:         [ Register ]
HOMM1: info forum | HOMM2: info forum | HOMM3: info mods forum | HOMM4: info CTG forum | HOMM5: info mods forum | MMH6: wiki forum | MMH7: wiki forum
Heroes Community > Heroes 3.5 - WoG and Beyond > Thread: ERA III
Thread: ERA III This thread is 14 pages long: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 · «PREV / NEXT»
Bersy
Bersy


Honorable
Supreme Hero
posted October 10, 2020 08:52 PM

Check DebugEra directory. Install Era over clean Heroes 3 Complete.
____________
Heroes 3 Era and everything for it. Releases folder for releases.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
myocytebd
myocytebd


Hired Hero
posted October 12, 2020 12:11 PM
Edited by myocytebd at 20:13, 12 Oct 2020.

Some question of ERM, that I cannot find in ERM-Help 2.81 or ERA2/3 change-logs.

1. IMO ERM is in need of a formal syntax for comments.
  The pesky rule of treat unrecognizable texts as comments is fundamentally flawed. If coder accidentally makes a syntax error, the parser may skips some of comments and parses the rest comments as code, leading to weird error message and useless error site.
  If there is an unambiguous token for comments is introduced, pesky parser errors are gone and more characters can be used in comments.
  (ERA preprocessing could treat formal comments as blank, and leaves the rest as-is.)

2. In ERM, how to:
2-A. Raise exception/assert.
2-B. Write log.
2-C. Backtrace/unwind.

3. Local array:
3-A. How to index named local array by variable?
Quote:
!!VR(tmp):C (inputAsInt[#i#]); -> Error for named or unnamed variable. OK for integer literal.
 Has to use:
!!VR(tmpi):S (@inputAsInt) +i;
!!VR(tmp):C x(tmpi);

^^^# is to make forum happy
3-B. !#DC() defined macros cannot be used in array size declaration?

4. How to move e-var around with bitwise accuracy? It seems that the only way is to make dummy FU() to copy args.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
cronex
cronex


Hired Hero
C# Coder
posted October 12, 2020 02:29 PM

Bersy said:
Check DebugEra directory. Install Era over clean Heroes 3 Complete.


I have. Installed it over a clean Heroes 3 GOG installation. Everything runs smooth without any errors, except that I cannot launch the game using the non-hd exe. (Reason why I bother is because I want the original resolution when im playing on my laptop, whilst I use the HD-launcher on my desktop.
____________
Treat others the way you want to
be treated.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Bersy
Bersy


Honorable
Supreme Hero
posted October 12, 2020 08:30 PM
Edited by Bersy at 20:31, 12 Oct 2020.

cronex, set your original resolution in HD launcher then.

myocytebd, use Tools/Sublime_Erm_Editor for working with erm files. It has fully featured syntax highlighting, autocompletion, snippets, etc.

ERM 2 engine is ready and is not subject for changing. Comments are started with ";" character.

2A. ERM has not exceptions. Use error codes/boolean results instead.
2B. IF:L for ingame log, otherwise you need to use WinApi !(SN:F^CreateFileA^ + !!SN:F^WriteFile^ or some custom dll with exact necessary functionality.

Don't forget, that calling SN:F^ShowErmError^ (latest unreleased Era) or SN:F^GenerateDebugInfo^ or pressing F11 generates Debug directory with erm tracing.erm file, containing large ERM tracing log.

3A.
!#VA(monNames[10]:z);

!!VR(randomInd:y):R0/0/9;
!!VR(monNamePtr:y):S(@monNames) +(randomInd);
!!VRy(monNamePtr):S^random value^;

So just calculate real var-index using (@array) +offset combination and then use indirect access via y(somePtr).

3B. No, constants are not expanded inside VA. But you can always use SN:M arrays for most purposes.

4. Right, you can pass it to function. And you can use !!VR:C, which does not perform integer-float conversion.

!!VR(int:y):C(float:e);

and vice verca.

!!VR(float:e):C(int:y);

More code examples can be found here: mixed neutrals mod draft

____________
Heroes 3 Era and everything for it. Releases folder for releases.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Bersy
Bersy


Honorable
Supreme Hero
posted October 19, 2020 12:25 PM

New dialogs are on approach in Era 3.1.
Up to 8 selectable pictures, preselected items, text alignment control, message type control (message, question, popup, picture selection, etc).
IF:N/IF:Q on steroids:

____________
Heroes 3 Era and everything for it. Releases folder for releases.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Bersy
Bersy


Honorable
Supreme Hero
posted October 19, 2020 06:26 PM
Edited by Bersy at 02:08, 20 Oct 2020.



A new HoMM 3 ERA version was released
Current version: 3.1.0

What's new?

Updated WoG native dialogs plugin by igrik: added support for dialogs with arbitrary text and BMP/JPG image (IF:B/P dialogs). Implemented dialog for viewing battle log by pressing "H" or LMB on the bottom panel in battle. Improved compatibility with majaczek plugins.
Updated question log dialog plugin by igrik for compatibility with improved game dialog engine.
Implemented support for complex dialogs with a choice of up to 8 images (buildings, resources, mana, monsters, etc.), the ability to preset the selected element, control text alignment and dialog type (message, question, tooltip, selection). Authors: igrik, Berserker.
Significantly expanded the ERM library in the form of a mod that comes with the Era: added a lot of constant identifiers (key codes, data types, WoG options, game limits, actions in battle, magic levels, artifact slots, and much more). Added several convenient events, such as "after scripts initialization" and "pressing key in a specific game screen", as well as more than a dozen auxiliary functions.
Improved the EPM 2 engine: using constants in sizes of local arrays, aliasing constants, casting types (integer - real), returning temporary arrays from functions, passing local strings to functions, shortened command syntaxes, convenient objects search on the map, etc.
About a dozen fixes and changes, including protection against overflow of creature experience, correct return of entry tiles for objects without hiding the heroes standing on them, the ability to choose the type of monster attack when playing in Hot-Sit mode, etc.

Download
Download WoG Scripts mod

Changelog:

Version 3.1.0 (10/2020)
------------------------
[+] Updated "wog native dialogs" plugin. Added support for IF:B/P dialogs and extended IF:Q/IF:N dialogs.
   Implemented advanced battle log dialog. To open it press "H" or click LMB on log bar in battle.
   Improved compatibility with majaczek's plugins. Credits: igrik.

[+] Updated "quest dialog" plugin. Provided compatibility with improved Heroes 3 dialogs. Credits: igrik.

[+] Implemented support for IF:Q with message type 7 (MSG_TYPE_CHOOSE_PIC) and 3-picture selection. The result is 1, 2, 3 or 0 for cancel.
   Prefer to use IF:N instead for better dialog control.

[+] Implemented extended complex dialogs support in ERM. Credits: igrik, Berserker.
   IF:N(msgType)/^text^[/?result/(textAlignment)/(preselectedPicId)].
   Display dialog with up to selectable 8 pictures.

   msgType           is one of MSG_TYPE_XXX constants (message, question, popup, picture selection with optional cancel button).
   textAlignment     is bit mask of TEXT_ALIGN_XXX flags. Both vertical and horisontal alignment are supported. -1 means "use default".
   preselectedPicId  is preselected picture index: 0-7 or -1 for none
   result            will contain -1 in most cases, (TRUE) or (FALSE) for questions, 0-7 (picture index) for picture selection and -1 for cancelled selection.

   Example:

   !?FU(OnAfterErmInstructions);
   !!IF:N(PIC_TYPE_SPELL)/(SPELL_TOWN_PORTAL)/(PIC_TYPE_RES_GOLD)/300/
         (PIC_TYPE_RES_WOOD)/5/(PIC_TYPE_RES_MERCURY)/10/(PIC_TYPE_RES_ORE)/15/
         (PIC_TYPE_RES_SULFUR)/20/(PIC_TYPE_RES_CRYSTAL)/25/(PIC_TYPE_MONEY)/5000;

   !!IF:N(MSG_TYPE_CHOOSE_PIC_OR_CANCEL)/^Take anything you need, bro!^/?(chosenItem:y)/(TEXT_ALIGN_LEFT);

   !!IF:M^%(chosenItem)^;

[+] IF:N and IF:Q dialogs with pictures now support special picture type flag: (PIC_TYPE_FLAG_DISPLAY_ZEROS).
   If it's set, zero quantities (resources, monsters, experience, etc) will be displayed like "0 Archangels" instead of "Archangels" or empty caption.

   Example:
   !!VR(picType:y):S(PIC_TYPE_EXPERIENCE) |(PIC_TYPE_FLAG_DISPLAY_ZEROS);
   !!VR(picSubtype:y):S0;
   !!IF:Q2/(picType)/(picSubtype)/(MSG_TYPE_QUESTION)/^Wanna nothing?^;

[+] Updated "Era Erm Framework" mod constants: data types, wog flags and options, town constants, game limits,
   magic levels, battle actions, hero artifact slots, dialog IDs, picture types, text alignment and many others.

[+] Added file "9999 era - key codes.erm" to "Era Erm Framework" with 150+ key codes constants.

[+] Added "OnAfterErmInited" event to "Era Erm Framework", occuring right in the end of !?PI / "OnAfterErmInstructions" event.
   The event allows to perform actions after most scripts initialized their variables and performed basic map/memory configuration.

[+] Added new events to "Era Erm Framework": "OnKeyPressed_AdvMap", "OnKeyPressed_Battle", "OnKeyPressed_HeroScreen",
   "OnKeyPressed_HeroMeetingScreen", "OnKeyPressed_Town", occuring right after "OnKeyPressed" events and taking two arguments:
   x1 - key code
   x2 - prevent default reaction (0 - no, 1 - yes).

   Example:
   !?FU(OnKeyPressed_Battle)&x1=(KEY_F1):;
   !#VA(key:x) (preventDefault:x);
   !!VR(preventDefault):S(TRUE);
   !!IF:M^Pressed F1 in battle!^;

[+] SN:F now supports 'user32.dll' functions.

[+] Added new functions to "Era Erm Framework".
 !?FU(Array_SortedUnique);
 ; Leaves only unique sorted integer items in the array.
 ; Calling on [15, 4, 3, 3, 1, 20, 15] list will rearrange and truncate list to the following:
 ; [1, 3, 4, 15, 20]
 !#VA(list:x); Array ID

 !?FU(Array_EnsureMinSize);
 ; Checks, if array has at least specified minimal size and increasing the size if not, filling new items
 ; with optional default value.
 !#VA(list:x);      Array ID.
 !#VA(minSize:x);   Minimal desired array size.
 !#VA(fillValue:x); Optional. Fill value for new items. Default: ^^ or 0.

 !?FU(ConstructBitMask);
 ; Accepts up to 15 bit/flag positions (0..31). Returns mask with corresponding bit flags set.
 ; Actually, given Xi arguments, returns Sum(2 ^ xi).
 ; For example, P0/3/7/?(mask:y) will give 2 ^ 0 + 2 ^ 3 + 2 ^ 7 = 1 + 8 + 128 = 137.
 !#VA(args:x);   ... Up to 15 bit/flag positions.
 !#VA(result:x); The last argument will contain the result mask.

 !?FU(DeconstructBitMask);
 ; Deconstructs bit mask into list of bit/flag positions (each with 0..31 value).
 ; For example, P137/(list) will fill the list with [0, 3, 7] values, because
 ; 2 ^ 0 + 2 ^ 3 + 2 ^ 7 = 1 + 8 + 128 = 137. It means, that bits 0, 3 and 7 are set.
 !#VA(mask:x); Bit mask.
 !#VA(list:x); Array ID to fill with bit/flag positions.

 !?FU(MonCountToFuzzyText);
 ; Converts monster quantity to human readable value range like "50-99" or "2K+".
 ; Returns result in s^result^
 !#VA(monNum:x);

 !?FU(DisableErrors);
 ; Disables ERM error messages and resets error option.

 !?FU(EnableErrors);
 ; Enables ERM error messages and returns last error flag (TRUE or FALSE).
 !#VA(result:x);

 !?FU(StrToUpper);
 ; Converts given string to upper case. Result is returned in s^result^.
 !#VA(strPtr:x);
 
 !?FU(StrToLower);
 ; Converts given string to lower case. Result is returned in s^result^.
 !#VA(strPtr:x);

 !?FU(GetStrAtAddr);
 ; Reads null terminated string at specified address into s^result^ variable.
 ; Null address (0) results in empty string.
 !#VA(strAddr:x);

[+] Added Era exported function ShowErmError (Error: pchar); stdcall;
   The function shows regular ERM error dialog and can be used for ERM scripts error reporting and debugging.

   Example:

   !!if|(baseFaction)<(NO_TOWN)/(baseFaction)>(MIX_MAX_POSSIBLE_FACTION_ID):;
     !!SN:F^ShowErmError^/^Invalid "baseFaction" argument: %(baseFaction)^;
     !!FU:E;
   !!en;

[+] Added possibility to extend lifetime of trigger-local SN:M array to parent scope. It's now possible to return
   trigger-local arrays to caller function without necessity to free that array afterwards. Thus automatical memory
   management is preserved.

   Example:
   ; Deep level function returns trigger-local array of 3 strings to another function, which in its case returns the same array
   ; to "OnAfterErmInstructions" trigger. The array will be freed after "OnAfterErmInstructions" execution block ends.

   !?FU(FuncB);
   !#VA(result:x);
   !!SN:M(M_AUTO_ID)/3/(M_STR)/(M_TRIGGER_LOCAL)/?(result);
   !!SN:V(result)/0/^one^/^two^/^three^;
   !!SN:F^ExtendArrayLifetime^/(result);

   !?FU(FuncA);
   !#VA(result:x);
   !!FU(FuncB):P?(result);
   !!SN:F^ExtendArrayLifetime^/(result);

   !?(OnAfterErmInstructions);
   !!FU(FuncA):P?(arr:y);
   !!FU(Array_Join):P(arr)/^ ^;
   !!IF:M^%s(result)^; Display "one two three"

   !?(OnAfterErmInstructions);
   ; here the (arr) array is already deleted

[+] Added support for local z-strings as function parameters. They will be converted to temporary read-only z-variable indexes.
   
   Example:
   !!VR(str:z):S^haVe A nIce day!^;
   !!FU(StrToUpper):P(str); here z-1 will be converted into something like "10000002" which is z10000002 index
   !!IF:M^%s(result)^; Display "HAVE A NICE DAY!"

[+] Added possibility to define ERM 2 constant aliases.
   Example:

   !#DC(PIC_TYPE_RES_FIRST) = (PIC_TYPE_RES_WOOD);
   !#DC(PIC_TYPE_RES_LAST)  = (PIC_TYPE_RES_MITHRIL);

   Now (PIC_TYPE_RES_FIRST) will have the same value as (PIC_TYPE_RES_WOOD) constant.

[+] Added possiblity to use constants in local array declarations. Previously array size could be number only.
   Now it's possible to specify constant name instead of number without parenthesis.

   Example:
   !#DC(MAX_DWELLING_ALT_CREATURES) = 4;

   !#VA(dwellingMonTypes[MAX_DWELLING_ALT_CREATURES]:y); Define array of 4 items to hold dwelling monster types

[+] Added support for e-variables in VR:C. !!VR(floats[3]:e):C0/0/0;
   Do not forget, that no integer-float conversion is performed in VR:C, all values are copied as is. The only safe constant
   for e-variables is 0.

[+] Improved TR:T to allow any number of arguments.

[+] Improved UN:U command. It does not raise error if no more objects are found, but sets x-coordinate to -1 instead. Thus no premature
   objects counting is required. A new syntax with 6 parameters was added to allow using arbitrary integer variables instead of v-variables.
   !!UN:U(objectType)/(objectSubtype)/(direction like -1/-2 or object index)/(x)/(y)/(z).

   Example:
   ; Let's traverse through all map monsters, doubling their quantity

   !#VA(x:y) (y:y) (z:y); define variables to store object coordinates
   !!VR(x):S-1;           setting x-coordinate to -1 will force to start search from scratch
   
   !!re i; endless loop
     !!UN:U(OBJ_MONSTER)/(ANY_OBJ)/-1/(x)/(y)/(z); find next monster, (x) = -1 on failure
     !!br&(x)<0:;                                  exit loop if nothing found
     !!MO(x)/(y)/(z):Gd*2;                         double monsters quantity
   !!en:;

[+] Heroes 3 "DisplayComplexDialog" function (4F7D20) was improved. The last argument "closeTimeoutMsec" was overloaded to "Opts".
   Opts is:
   16 bits for closeTimeoutMsec,
   4 bits for msgType (1 - ok, 2 - question, 4 - popup, etc), // 0 is treated as 1.
   4 bits for text alignment bit mask (0..15),
   8 bits for internal H3 usage, usually 0

   Thus it's became possible to display dialogs with up to 8 images and of any type (message, question, popup, picture selection).

[+] Added exported function FindNextObject (ObjType, ObjSubtype: integer; var x, y, z: integer; Direction: integer): integer; stdcall;
   It works the same as UN:U with fast search syntax, but does not raise error on no more objects, returns success flag and allows
   to use non-v variables to store coordinates. You won't need to count objects before searching for them anymore.

   Direction is -1 for FORWARD and -2 for BACKWARD.

   Example:
   ; Let's traverse through all map monsters, doubling their quantity

   !#VA(x:y) (y:y) (z:y); define variables to store object coordinates
   !!VR(x):S-1;           setting x-coordinate to -1 will force to start search from scratch
   
   !!re i; endless loop
     !!SN:F^FindNextObject^/(OBJ_MONSTER)/(ANY_OBJ)/?(x)/?(y)/?(z)/-1; find next monster, v1 is (TRUE) on success
     !!br&v1=(FALSE):;                                                 exit loop if nothing found
     !!MO(x)/(y)/(z):Gd*2;                                             double monsters quantity
   !!en:;

[*] Local named e-variables are allocated from index 2 to preserve e1 for functions result.

[*] x16 can now be allocated as local named variable. Previosly the following code would lead to error:
   !!VA(args[16]:x);

[*] SN:G is DEPRECATED and may be removed in future versions.

[-] Fixed SN:O. No more boat/hero hiding.
[-] Fixed HE receiver to support any ERM variable like !!HEi^heroId^.
[-] Fixed VR:C indexes checking, allowing to override protected memory by commands like VRy-99:C1/2/3;

[-] Fixed ERM 2 compiler part, responsible for local z-arrays indexes allocation.
   Previosly !#VA(names[3]:z) used to allocate array of [z-3, z-4, z-5] (decreasing indexes).
   Now the appropriate array will be [z-5, z-4, z-3] (increasing indexes). Thus it's possible to use
   safely index arithmetics like:

   !#VA(names[3]:z);
   !!VR(names[2]):S^Have a nice day!^;
   !!VRi:S2;                     i is array item logical index
   !!VR(itemPtr:y):S(@array) +i; itemPtr holds real z-index of array item
   !!IF:M^%z(itemPtr)^;          display i-th item value

[-] Fixed UN:C. It didn't accept negative size argument, while -1, -2 and -4 are valid sizes.
   Prefer to use (UNC_XXX) constants to specify valid data type.

[-] Fixed creature experience overflow after battle. Credits: igrik.

[-] Fixed check for multiplayer in attack type selection dialog, causing wrong
   "This feature does not work in Human vs Human network baced battle" message.

[!] Note, that SN:O does not work with global named variables.

[!] Note, that v1 must not be used to store anything non-temporal, because from Era 2.X it's changed in every SN:E/SN:F call.
   It's a dirty variable for fast result return. Use v2/v3/v4 instead.
____________
Heroes 3 Era and everything for it. Releases folder for releases.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
XEricSin
XEricSin


Famous Hero
posted October 21, 2020 06:18 AM

I am about to raise the problem of  !!HEi^heroId^, and there comes the era3.1. Hooray!


 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
myocytebd
myocytebd


Hired Hero
posted October 21, 2020 09:00 AM
Edited by myocytebd at 09:01, 21 Oct 2020.

Great work.
It would be better if there is an updated/aggregated doc.

Quote:
[+] Added possibility to extend lifetime of trigger-local SN:M array to parent scope. It's now possible to return
  trigger-local arrays to caller function without necessity to free that array afterwards. Thus automatical memory
  management is preserved.

I'm afraid auto-id is as useless as it used to be.
It makes code harder to read (less explicit than a named array), and more tedious to use than alloc/free (a pesky local id vs. normal global id).

This feature had better be in the form of "bind array lifecycle to local" and "unbind array lifecycle to local".

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Bersy
Bersy


Honorable
Supreme Hero
posted October 21, 2020 12:37 PM
Edited by Bersy at 12:40, 21 Oct 2020.

Quote:
I am about to raise the problem of  !!HEi^heroId^, and there comes the era3/1/ Hooray!

Gld to hear that :-)

myocytebd, thanks. Unfortunately I have time to for changelog only, making updated help would require too much time.

Quote:
I'm afraid auto-id is as useless as it used to be.
It makes code harder to read (less explicit than a named array), and more tedious to use than alloc/free (a pesky local id vs. normal global id).

This feature had better be in the form of "bind array lifecycle to local" and "unbind array lifecycle to local".


Seems like you didn't understand this functionality. M_AUTO_ID = -1 means, that new dynamical array will be allocated and unique ID will be assigned to it like -2, -3, -50, -100. Then you save this ID in local or global named variable and use.

; Allocate memory for TFactions and TFactionAllies tables.
!!SN:M(M_AUTO_ID)/0/(M_INT)/(M_STORED)/?i^mix_factions^;
!!SN:M(M_AUTO_ID)/0/(M_INT)/(M_STORED)/?i^mix_factionAllies^;
!!SN:M(M_AUTO_ID)/0/(M_INT)/(M_STORED)/?i^mix_monToFactionInd^;

...

!!SN:Vi^mix_factions^/... work with array

...

!!SN:M(M_AUTO_ID)/(MIX_NEUTRALS_STRUCT_SIZE)/(M_INT)/(M_TRIGGER_LOCAL)/?(neutrals:y);
!!FU(mix_ReadTileNeutrals):P(x)/(y)/(z)/(neutrals);
!#VA(monTypes[3]:y) (monNums[3]:y);
!!SN:V(neutrals)/0/?(monTypes[0])/?(monNums[0])/?(monTypes[1])/?(monNums[1])/?(monTypes[2])/?(monNums[2]);


Look at Mixed Neutrals mod

In fact, MAlloc or OpenFile always return new unique ID. But for reasons of compatibility with first implementation, I leave possibility to allocate arrays with fixed positive IDs. It's deprecated feature, that was introduced for Sagamosa mod.
____________
Heroes 3 Era and everything for it. Releases folder for releases.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Bersy
Bersy


Honorable
Supreme Hero
posted October 22, 2020 01:50 AM



A new HoMM 3 ERA version was released
Current version: 3.1.1

Summary: playable Santa gremlins, the latest plugins from igrik, a high-quality random number generator and an update to the EPM library.

Santa gremlins have become a playable monster. Normal weekly growth (16) instead of daily one, gift cancellation, ice arrow damage = 10 * number of Santas. Bottom line: a great third upgrade for master gremlins.
The installer includes the latest version of the game bug fix plugin from igrik. Latest changes: fixed crashes caused by incorrect placing of fire walls when attacking with hell steeds. Fixed bugs in already included plugins.
Added two new optional patches: prisons ban on random maps and single-slot combo artifacts.
The random number generator, which is sometimes quite annoying for players, has been replaced with the modern "Mersenne Twister" algorithm.
The EPM library has been updated with functions for copying and cloning arrays, hashing integers, getting a text description of neutrals quntity on the map, and a few other fixes.

Download
Download WoG Scripts mod

Changelog:

Version 3.1.1 (10/2020)
------------------------
[+] Included updated "game bug fixes extended" plugin with many crash/overflow/bug fixes. Game stability increased. Credits: Ben, igrik, RoseKavalier and others.
   Old "game bug fixes" plugin by RoseKavalier was removed.

[+] Added "no prisons on random maps.bin.off" and "one slot combo arts.bin.off" patches by igrik.
   The first one disables prison generation on random maps. The second one makes combo artifacts to occupy one slot without possibility of further disassembling.

[+] Santa Gremlins now become a regular unit with normal weekly growth (16 per week), without gifts and with the following Ice Bold spell power:
   (Number of santas - 1) / 2 + Random(0, 1) if number of santas is even.

   Table of santa gremlin quantity and final damage:
   1 - 10
   2 - 10 or 30
   3 - 30
   4 - 30 or 50
   5 - 50
   6 - 50 or 70
   etc.

[+] Replaced Heroes 3 pseudo random number generator with high quality Mersenne Twister generator.
   Native generator is still used for battle obstacles generation and in multiplayer battles, excluding Hot Seat.

[+] Added new functions to "Era Erm Framework" mod:

 !?FU(Array_Copy);
 ; Resizes destination array to match source array size and copies all source items into destination array.
 ; Both arrays must have the same items type.
 !#VA(srcArray:x); ID of array to copy items from (source).
 !#VA(dstArray:x); ID of array to copy items to (destination).
 
 !?FU(Array_Clone);
 ; Creates trigger local copy of array.
 !#VA(srcArray:x); ID of array to clone.
 !#VA(result:x);   ID of result trigger local array.

 !?FU(Tm32Encode);
 ; Fast and reversable int32 hashing. Link: https://stackoverflow.com/questions/664014/what-integer-hash-function-are-good-that-accepts-an-integer-hash-key
 !#VA(value:x) (result:x);
 
 !?FU(Tm32Decode);
 !#VA(value:x) (result:x);

[+] Updated the following functions of "Era Erm Framework" mod:

 !?FU(MonCountToFuzzyText);
 ; Converts monster quantity to stringish value range like "50-99" or "2K+" of maximum 7 characters length.
 ; Returns result in s^result^
 !#VA(monNum:x);
 !#VA(withDescription:x); ?boolean. If true, the result will be native H3 text like "A pack (10-19) of". Default: false.

 !?FU(DeconstructBitMask);
 ; Deconstructs bit mask into list of bit/flag positions (each with 0..31 value).
 ; For example, P137/(list) will fill the list with [0, 3, 7] values, because
 ; 2 ^ 0 + 2 ^ 3 + 2 ^ 7 = 1 + 8 + 128 = 137. It means, that bits 0, 3 and 7 are set.
 !#VA(mask:x);   Bit mask.
 !#VA(result:x); Will contain new trigger local array ID with bit/flag positions.

[*] Removed type checking from SN:M(array)/(itemIndex)/(value), allowing to use integer addresses to set string item values.

[-] Fixed crash in "quest log" plugin by igrik.
____________
Heroes 3 Era and everything for it. Releases folder for releases.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Ghost
Ghost


Undefeatable Hero
Therefore I am
posted October 22, 2020 08:43 AM

Thankee you fixed Santa Gremlins, what you hoped in ERA II thread, but inaccuracy, when you said 3.1.1 version, I downloaded 3.1.2, and icon says ERA II:



..and I tested my Homecoming map, but message came:



yes game continued, IDK what message affected the game, I haven't tested.

Ok I ponder on Santa Gremlins damage. Better than a Archangels. Damage should be 2, when 100 of Santa Gremlins do 200 damage Soon to test Santa Gremlins in my Homecoming map. Where the Gremlins can grow into a legion, and insane damage, right? I will test.

Ok thanks also WoG Team.
____________
Fight MWMs - stand teach

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Salamandre
Salamandre


Admirable
Omnipresent Hero
Wog refugee
posted October 22, 2020 11:17 AM

Open that script in erm editor and change v95008 to v9508, probably a typo. Then F12 if reload game.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Ghost
Ghost


Undefeatable Hero
Therefore I am
posted October 22, 2020 11:43 AM

I don't know how to use. The error message also came from the ERM editor. I tried to find and replace code, it didn't work. Ok I wait for a newer version.
____________
Fight MWMs - stand teach

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
RerryR
RerryR


Promising
Supreme Hero
Researching Magic
posted October 22, 2020 12:02 PM

Ghost said:
I don't know how to use. The error message also came from the ERM editor. I tried to find and replace code, it didn't work. Ok I wait for a newer version.


As Sal said, a v-Var above v9999 is not allowed, thus most likely the error/typo.
If you cant correct it (why?) you can also disable/delete the achievements.erm file or ERA Scripts mod.
The second option would be to update your ERA Scripts mod, I'm relatively certain that it has been corrected already.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Ghost
Ghost


Undefeatable Hero
Therefore I am
posted October 22, 2020 12:19 PM

Yeah good info, RerryR. I can't find achievements.erm. The first time I opened ERM, and the error message came, I tried to find !!UN:J2/?v95008;, but ERM didn't show the list/code, etc The best I wait for a newer version. Reasonable also to some noob. And I don't use a MOD, I only use a original WoG/ERA.

Thanks again!
____________
Fight MWMs - stand teach

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Bersy
Bersy


Honorable
Supreme Hero
posted October 22, 2020 12:36 PM

Ghost, thanks, I renamed generated label name on desktop.

You install Era 3 over existing Era 2 with old Era Scripts Eng mod, I suppose. Era 3 engine is much stricter to bugs and does not allow invalid indexes in variables. You should either disable error-triggoring script, or use Era Scripts Eng for Era 3 mod or install Era 3 over clean H3 Complete.
____________
Heroes 3 Era and everything for it. Releases folder for releases.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Ghost
Ghost


Undefeatable Hero
Therefore I am
posted October 22, 2020 01:12 PM

I can't find uninstall, I can't delete WoG/ERA3, computer said can't. Ok I can play without minimap, only problem I can't use wogeyeofsauron, for testing game. I wait for the next version.
____________
Fight MWMs - stand teach

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
XEricSin
XEricSin


Famous Hero
posted October 22, 2020 02:23 PM

"[*] SN:G is DEPRECATED and may be removed in future versions."

Please don't remove this if possible.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Bersy
Bersy


Honorable
Supreme Hero
posted October 22, 2020 09:02 PM

Ok. But I recommend to use structured constructions !!re, !!if, !!el&, !!el for new code instead.
____________
Heroes 3 Era and everything for it. Releases folder for releases.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Ghost
Ghost


Undefeatable Hero
Therefore I am
posted October 22, 2020 11:25 PM
Edited by Ghost at 00:01, 23 Oct 2020.

Hi Bersy! I managed to destroy H3complete and Wog/ERA. Yes the game works without error message. Thanks for the tip!

EDIT: XXL map isn't available. I downloaded Gameplay XXL, but error message. I wait for gaming build with XXL. Homecoming map can now pause.
____________
Fight MWMs - stand teach

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Jump To: « Prev Thread . . . Next Thread » This thread is 14 pages long: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 · «PREV / NEXT»
Post New Poll    Post New Topic    Post New Reply

Page compiled in 0.1412 seconds