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: ERM help and discussion
Thread: ERM help and discussion This Popular Thread is 407 pages long: 1 50 100 ... 146 147 148 149 150 ... 200 250 300 350 400 407 · «PREV / NEXT»
gruziak97
gruziak97

Tavern Dweller
posted June 02, 2012 08:48 PM

Quote:

Quote:
But how can I use it to change another creatures? Witch numbers should I change?

No way with this script.


So how can I removed this ability master genies and efreet sultan?

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


Responsible
Supreme Hero
posted June 08, 2012 09:03 PM
Edited by Hero_of_Light at 21:17, 08 Jun 2012.

@Salamandre

I've been trying out the script you gave me that grands expert skills when some artifacts are equiped and I found a bug. For instance:

;168, gives  expert estates
!?AE1&v998=168;
!!HE-1:S13/?y1;
!!IF:W-1;
!!VRw7:Sy1;
!!HE-1:S13/3;

!?AE0&v998=168;
!!IF:W-1;
!!HE-1:S13/w7;

This script gives expert estates when artifact 168 is equiped. However, if the hero already had Estates then (when the artifact is unequiped) he or she loses the primary Estates skill (that he or she already had).

There should be a check in there in order to make sure that if the hero already has the skill, it won't be erased If the artifact is unequiped. Do you know how to do this?

**EDIT**

I found the problem. There's nothing wrong with the script it was just colliding variables.
____________
Not idly do the leaves of Lorien fall.

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


Undefeatable Hero
Therefore I am
posted June 10, 2012 01:37 AM

How does the ability to make a ghost? I want to be a Ghost Behemoth's ghost ability.
____________
Fight MWMs - stand teach

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


Undefeatable Hero
Therefore I am
posted June 13, 2012 02:27 AM

Ok how the Grail changed to eg blanket artifact? The player to dig in and find another artifact. How do I do? What is a script?
____________
Fight MWMs - stand teach

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


Admirable
Omnipresent Hero
Wog refugee
posted June 13, 2012 02:48 AM

So far there is no trigger for dig button, so not possible.

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


Promising
Famous Hero
feanor on DF2.ru
posted June 13, 2012 09:08 AM

Quote:
Ok how the Grail changed to eg blanket artifact? The player to dig in and find another artifact. How do I do? What is a script?


!!PI;
!!UN:C4255556/4/art_num;

!!GM0;
!!UN:C4255556/4/art_num;

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


Undefeatable Hero
Therefore I am
posted June 13, 2012 10:08 PM

Quote:
Quote:
Ok how the Grail changed to eg blanket artifact? The player to dig in and find another artifact. How do I do? What is a script?


!!PI;
!!UN:C4255556/4/art_num;

!!GM0;
!!UN:C4255556/4/art_num;


does not work
____________
Fight MWMs - stand teach

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


Responsible
Supreme Hero
posted June 14, 2012 12:40 AM
Edited by Hero_of_Light at 20:25, 14 Jun 2012.

A while ago Solitaire gave me a script that changed the sound of a particular creature (Werewolves No194). It was something like this:

!?TM1;
!!VRz2:S^HGWR^; Wolf sound (the default wolf's sound is actually the one used by monk)
!!SN:K8/9598440/7894496/1; overwrite sound name with z2

I would like to give Darkness Dragons (creature id 155) the sound of goblins. Does anyone know how to do this? Without messing with the 82M files I mean, by script as shown above. I suppose this is one of those ERA commands thing so I don't know how I can find the appropriate number to put there.
____________
Not idly do the leaves of Lorien fall.

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

Tavern Dweller
posted June 16, 2012 12:57 AM
Edited by Altair at 00:59, 16 Jun 2012.

1. When I select/cast a spell from the spell book on the battle screen
it produces some triggers such as MR2, but there no hero animation and no real spell cast (only test cretures magic resistance). After that "real" spell may cast (the trigger MR2 is called once again).
How can I simulate this (MR2 test cretures magic resistance) before "real" cast?

2. How can I refresh town screen after change def building on town screen (UN:C)?

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


Responsible
Supreme Hero
posted June 16, 2012 01:13 AM

Without knowing for sure what you want to do, I will guess that these commands from ERM Help might be useful:

1.!!BG:XXXX; During combat, you may check/set/get parameters on taken action

OPTIONS

A$; Type of an action:
  0 = Cancel Action (the stack can do a different action now but it may still be impossible to force it to do most actions through ERM).
  1 = Hero cast a spell (***)
  2 = Walk
  3 = Defend
  4 = Retreat from the battle
  5 = Surrender
  6 = Walk and Attack
  7 = Shoot
  8 = Wait
  9 = Catapult
10 = Monster casts a spell (i.e. Faerie Dragons)
i.e !!BG:A10; will make current stack cast a spell set with !!BG:S$;

D$; Destination position (magic to monster, walk or attack to)

E$; Get a destination monster stack (destination position is used).
-1 if no monster stack at that position

H$; Number of a hero owner (-1=no hero)

N$; Number of a stack (0...41)

Q?$;  Current attacking side (0=left or 1=right)
Check only!

S$; Number of a Spell to Cast (See Format SP)
Comments:
If a monster casts a spell before an action (enchanter magic or Troll resurrection), it goes before trigger.
You can only get the spell number (BG:S?__) for a Hero cast (A=1). For a creature cast (A=10), the returned value is always -1.

Note that the !?BG0 trigger will occur just before the action (e.g., Hero spell cast), and !?BG1 will occur after the action. Under either trigger, BG:A? S? will tell whether the action was a Hero spell cast and if so what the spell number was (and which Hero and side with H? and Q?).

2.!!UN:XXXX; Universal commands. These commands relate to changes on the heroes map.
...
!!UN:R4/#; Redraws town screen. #=1 for the view, #=2 for the Resource bar.

Comments:
This command must only be used while inside a town screen or it may crash the game. It is primarily of use if a new visiting or garrison hero is added to a town (with ERM while in the town screen), or if new troops are added to a visiting or garrison hero (again, with ERM while in the town screen).  



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


Promising
Famous Hero
of infamy
posted June 16, 2012 04:56 AM

Quote:
A while ago Solitaire gave me a script that changed the sound of a particular creature (Werewolves No194). It was something like this:

!?TM1;
!!VRz2:S^HGWR^; Wolf sound (the default wolf's sound is actually the one used by monk)
!!SN:K8/9598440/7894496/1; overwrite sound name with z2

I would like to give Darkness Dragons (creature id 155) the sound of goblins. Does anyone know how to do this? Without messing with the 82M files I mean, by script as shown above. I suppose this is one of those ERA commands thing so I don't know how I can find the appropriate number to put there.


This is the basic SN:K syntax with 4 parameters. I don't have a hex editor anymore but if you find one (or are REALLY needing this) just search for the known name of the sound you are looking for. Copy the code you used above, 9598440 should be the address of z2 (or easily find it appropriately) and then replace with the location of the sound address. Can't help you exactly without more info though. Do you want to replace all darkness dragon sounds with the corresponding goblin ones, or just attack or something?

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


Honorable
Supreme Hero
posted June 16, 2012 10:43 AM

struct _MonInfo_{
 long  Group;     // +0  0...8,-1 - neutral
 long  SubGroup;  // +4  0...6,-1 - not available (423D87, 42A0FC)
 char *ShortName; // +8  (4242B7)
 char *DefName;   // +C  подгр и настр поля в 43DA45
 Dword Flags;     // +10 (424354, 42C6C0)
 char *NameS;     // +14
 char *NameP;     // +18
 char *Spec;      // +1C
 long  CostRes[7];// +20 (42B73A)
 long  Fight;     // +3C
 long  AIvalue;   // +40
 long  Grow;      // +44 начальное количество монстров для найма
 long  HGrow;     // +48
 long  HitPoints; // +4C
 long  Speed;     // +50
 long  Attack;    // +54
 long  Defence;   // +58
 long  DamageL;   // +5C
 long  DamageH;   // +60
 long  NShots;    // +64
 long  HasSpell;  // +68 - сколько раз колдует
 long  AdvMapL;   // +6C
 long  AdvMapH;   // +70
};

ShortName is what we usually need. Sound names are generated using templates: "%sext2.82M  %sext1.82M  %sdfnd.82M  %skill.82M  %sattk.82M  %swnce.82M  %sshot.82M  %smove.82", where %s is short name.

Table of monsters is redirected. New address can be found here:
{0x47ADCE+3,DS (MonTable),4}

Seems that the size of MonInfo is 116.

!?FU@ChangeCreatureSound@;
; Arguments: Creature ID, z-index of new short name
!!UN:C4697553/4/?y1; y1 - MonInfo Table
!!VRy2:S116*x1+y1+8; y2 - address of sound pointer
!!VRy3:Sx2-1*512+9597928; y3 - address of z-var
!!UN:Cy2/4/y3;

Sorry, did not tested.

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

Tavern Dweller
posted June 16, 2012 11:15 AM

Quote:
Without knowing for sure what you want to do, I will guess that these commands from ERM Help might be useful:

1.!!BG:XXXX; During combat, you may check/set/get parameters on taken action

OPTIONS

A$; Type of an action:
  0 = Cancel Action (the stack can do a different action now but it may still be impossible to force it to do most actions through ERM).
  1 = Hero cast a spell (***)
  2 = Walk
  3 = Defend
  4 = Retreat from the battle
  5 = Surrender
  6 = Walk and Attack
  7 = Shoot
  8 = Wait
  9 = Catapult
10 = Monster casts a spell (i.e. Faerie Dragons)
i.e !!BG:A10; will make current stack cast a spell set with !!BG:S$;

D$; Destination position (magic to monster, walk or attack to)

E$; Get a destination monster stack (destination position is used).
-1 if no monster stack at that position

H$; Number of a hero owner (-1=no hero)

N$; Number of a stack (0...41)

Q?$;  Current attacking side (0=left or 1=right)
Check only!

S$; Number of a Spell to Cast (See Format SP)
Comments:
If a monster casts a spell before an action (enchanter magic or Troll resurrection), it goes before trigger.
You can only get the spell number (BG:S?__) for a Hero cast (A=1). For a creature cast (A=10), the returned value is always -1.

Note that the !?BG0 trigger will occur just before the action (e.g., Hero spell cast), and !?BG1 will occur after the action. Under either trigger, BG:A? S? will tell whether the action was a Hero spell cast and if so what the spell number was (and which Hero and side with H? and Q?).

2.!!UN:XXXX; Universal commands. These commands relate to changes on the heroes map.
...
!!UN:R4/#; Redraws town screen. #=1 for the view, #=2 for the Resource bar.

Comments:
This command must only be used while inside a town screen or it may crash the game. It is primarily of use if a new visiting or garrison hero is added to a town (with ERM while in the town screen), or if new troops are added to a visiting or garrison hero (again, with ERM while in the town screen).


I know these syntaxes, but it's not what I wanted.
1. I would like to be able to check the Magic Resistance with scripts even BEFORE casting the spell like "!?MR2; !!MR:F?" triger. But !?MR2 activated only once when I use BG:A/BM:C (MR2 is activated twice with a standard casting spells).

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


Responsible
Supreme Hero
posted June 16, 2012 11:51 AM

@Kegolo

The command Solitaire gave me (as it is posted in my previous post) changes all Werewolf sounds with pikemen ones. All of them not just walk or attack etc. That's what I would like for Darkness Dragons but I guess the highlighted parameters:

!?TM1;
!!VRz2:S^HGWR^; Wolf sound (the default wolf's sound is actually the one used by monk)
!!SN:K8/9598440/7894496/1; overwrite sound name with z2

Have to be edited with the ones for Darkness Dragons.

@Bersy

I don't understand what you're saying (some of the text is in Russian or something and it appears faulty in my screen). In any case I don't know how to use the command you gave me.



____________
Not idly do the leaves of Lorien fall.

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


Admirable
Omnipresent Hero
Wog refugee
posted June 16, 2012 12:19 PM

Quote:

1. I would like to be able to check the Magic Resistance with scripts even BEFORE casting the spell like "!?MR2; !!MR:F?" triger. But !?MR2 activated only once when I use BG:A/BM:C (MR2 is activated twice with a standard casting spells).



Altair, there is !?FU77007 in ERA which acts before BG, maybe this can help you? I used it to set up different values for all spells before human or AI creatures act, thing which did not work within BG, was too late. By default is used for controlling regeneration but can be used for various purposes.

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


Honorable
Supreme Hero
posted June 16, 2012 01:08 PM
Edited by Bersy at 13:09, 16 Jun 2012.

Hero_Of_Light, try this one (Era):

!?FU54321;
!!UN:C4697553/4/?y1; y1 - MonInfo Table
!!VRy2:S116*x2+y1+8; y2 - address of sound pointer
!!UN:Cy2/4/?y3;
!!VRy2:S116*x1+y1+8;
!!UN:Cy2/4/y3;

!#FU54321:P155/84;

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


Responsible
Supreme Hero
posted June 16, 2012 03:01 PM

Altair, I still am not sure I know what you want to do, but under BG0 you could determine the target stack number and use EA[-(Stack Number +1)]:B to give the stack Golem Magic Resistance of a specified level (0 to 100%). There are some logistical details involved but I won't waste space here discussing them since they might not pertain to what you actually want to do.

In my experience, there is almost always a way (perhaps complicated) to do something in ERM, but you have to use the tools ERM Help (+ Era Help, these days) gives you, not the tools you wish you had.

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


Responsible
Supreme Hero
posted June 16, 2012 03:38 PM
Edited by Hero_of_Light at 15:59, 16 Jun 2012.

@Bersy

It seems to work ok... Thanks a lot

I want to make this work for more creatures as well. All the WOG creatures are supported by the original Heroes III creatures' sounds and so you can't change them (without changing the original as well). For instance creatures 164 - 167 used to be the elemental messengers and all sounded like stone golems. I changed all four of these creatures into new ones and so their sounds don't fit no more.

I need this script to work for many different creatures and sounds... I tried this one:

!?FU54321;
!!UN:C4697553/4/?y1; y1 - MonInfo Table
!!VRy2:S116*x2+y1+8; y2 - address of sound pointer
!!UN:Cy2/4/?y3;
!!VRy2:S116*x1+y1+8;
!!UN:Cy2/4/y3;

!#FU54321:P155/84;
!#FU54321:P150/7;

I added the last line and I want to ask you If I did this right. If I add the last command as it is will it change other creatures as well? For instance this line makes Supreme Archangels sound like Crusaders. I tested it and it seems to work but I want to ask you anyway, did I use this correctly? I mean can I add the last command as many times as I want (without messing with the script's function)?

____________
Not idly do the leaves of Lorien fall.

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


Promising
Famous Hero
posted June 16, 2012 04:09 PM

Quote:
I tested it and it seems to work but I want to ask you anyway, did I use this correctly? I mean can I add the last command as many times as I want?


Yes and yes.
____________

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


Honorable
Supreme Hero
posted June 16, 2012 06:59 PM
Edited by Bersy at 19:02, 16 Jun 2012.

@Altair, I have solution for Era:

!?CM4;
!!UN:C6919200/4/?y1; y1 - TCombatMan
!!VRy2:S[stack number]*1352+21708+y1; y2 - combat monster
!!SN:E5931936/6/y1/[spell number]/0/y2/0/1/0;
!!IF:L^%E1^; displays the resistance of stack to spell: 0.0 .. 1.0

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Jump To: « Prev Thread . . . Next Thread » This Popular Thread is 407 pages long: 1 50 100 ... 146 147 148 149 150 ... 200 250 300 350 400 407 · «PREV / NEXT»
Post New Poll    Post New Topic    Post New Reply

Page compiled in 1.1441 seconds