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 ... 133 134 135 136 137 ... 150 200 250 300 350 400 407 · «PREV / NEXT»
ShizueKaryan
ShizueKaryan


Adventuring Hero
Outcast Fire Witch
posted February 13, 2012 10:38 AM

Quote:
Quote:

You might try using the Water Elemental instead of the Air Elemental, so that you are not substituting a 2-hex creature for a one-hex creature, but that is just a guess.

I tried, and unfortunatelly it still crash the game .
____________
My HoMM3 Maps
Sorry for my bad English.

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


Responsible
Supreme Hero
posted February 13, 2012 02:53 PM
Edited by JimV at 15:33, 13 Feb 2012.

I reproduced your result in WoG 3.58f, both for the substitution of a Supreme Arch Angel for a Water Elemental, and for the replacement of a Fire Elemental with an Energy Elemental.  In both cases I got a series of messages about missing sound files, e.g., "(null)move.82M", "(null)wnce.82M", etc., followed by a crash.

I guess you will have to do it the old-fashioned way, with an ERM script which uses the !?BG0 trigger, checks for the action "Hero casts spell" (!!BG:A?) and the right spell number (!!BG:S?), and then changes the Summon Water Elemental spell to a cancel (!!BG:A0;) after using BU:S to summon the appropriate number of Supreme Arch Angels to an empty hex on the casting side's home row (and subtracting the appropriate number of spell points from the casting Hero).

P.S. and set BH:M1 so the Hero can't cast another spell that round.

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

Tavern Dweller
posted February 14, 2012 10:56 AM

Hi,
i'm making a map and i wish the AI to equip some artifact, like the Vial of the Dragonblood, but the AI has very low priority and prefer other artifact most of the time, even if i make him start with that. There is a way to force him to equip it? Or to increase the AI artifact value?

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


Responsible
Supreme Hero
posted February 14, 2012 03:04 PM

Yes, this is done, for example, in the map "Ice Arrow", available at maps4heroes, by Doc SuMann.  The villain, Hell Zealot, is equipped automatically with several artifacts at the start of any battle in which he is a participant (check attacking and defending Heroes under BA0 trigger with BA:H receiver, check which artifacts he already has equipped and remove and equip artifacts if necessary with the HE:A receivers).  I think the name of the Timed Event for this script is "HZ Battles", or something like that.

Also, in "The Dragon Slaughter", available in another thread at this site, several Heroes are equipped with the Shackles of War at the start of a battle so there can be no retreat.

You will need the updated ERM Help manual, linked to previously on this thread, or available as part of the Era 2 download, to look up artifact numbers and receiver formats.  The ERM Help also contains tutorials on how to write and use ERM scripts.

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

Tavern Dweller
posted February 15, 2012 11:50 AM

Hi JimV, i'm Tryphone.. i have double account sorry for this confusion.

Thank you for the info you given, i'll get that map and fetch the script.

On the other hand, i have rewritten the script for level 8 creature accumulation, now creature growth is based on the number of castles of that race which the dwelling owner has. If it's neutral the growth is 1.
And creatures are added on the start of each week, so you could check with right click how many creatures each dwelling each.

If it's of forum interest, i will translate comments to english, reorganize so it becomes publish-able and post it.

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


Responsible
Supreme Hero
posted February 15, 2012 02:48 PM

I thought I had seen a Wandering Hero around here somewhere, but wasn't sure.  It sounds like you did good work on that script.  If you have the time and the interest, a new (separate) post describing what you did and how you did it might be useful to people who are thinking of learning ERM.  Besides which, you might learn more in the process.  I have found (in engineering) that teaching something to others forces one to understand it thoroughly.

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


Responsible
Supreme Hero
posted February 17, 2012 08:40 PM

Is there a way to make a creature summon a number of another type of creature each turn? I mean the same way the "Summon clones" (through creature stack experience) works but instead of Clones to have actual creatures.
____________
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 February 17, 2012 08:45 PM

Pikeman summons pikeman

!!EA0:B6/1/117/0/10/20/25/30/40/50/70/75/80/85/100; percentages

Single Summon 117
Multiple Summon 85
____________
Era II mods and utilities

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


Responsible
Supreme Hero
posted February 18, 2012 11:35 PM
Edited by Hero_of_Light at 23:35, 18 Feb 2012.

Thanks it works!

I also edited the hero summoning command from halfling mod. It works OK but still it has problems when i add the artifact erm commands you suggested. If you have time can you look at my script? If it's not that much problem that is.

As you suggested i made a list of the triggers and variables i use. Hope it helps (and that i got them all).

The script starts like this:

!?TM2&$day$=1/$once$=1; // only once at day 1
!!UN:P67/?y-1; [check if script is enabled: y-1]
!!FU6104&y-1=1:P; // do conversion if script is enabled  

Then on line 0086 i use the the shootinc script you put together. It uses !?FU6000;

After that there's line 0222 that has a function !?FU6104; to start the script changing the towns' lineups.

I also used the variables z500-699 and z999-950 to add descriptions for creatures and heroes.

Then on line 2673 starts the script that changes the dwellings for Conflux (that's pretty much the same as it was original). i see it uses the variables y1 to y9.

On line 2873 there are functions that change the heroes' starting creatures: !?FU6100; !?FU6101;!?FU6107; !?FU6108; !?FU6109;

On line 2922 there's !?FU6106; and a bunch of variables mentioned (that's also as it was in the original script).

On line 3027 there's the halfling mod: It uses FU26201-FU26202
!?PI;
!#TM1:S1/999/1/255; [Triggers for every color every day]  
** [Weekly Day 1 Timer]
!?TM1; [Daily Timer is trigger]
!#UN:P67/?v5993;   [Check is the script is enabled, otherwise exit]
!!FU&v5993<>1:E;

On line 3115 there are some ERA commands that OxFea gave me. They use the triggers: !?PI; and !?GM0;  

On line 3196 there is the script that allows third slots in town's dwellings. I copied it 9 times for every town (it works though). It uses:
!#TM21:S8/999/7/1; //1st day timer  (that's nine times there)
and functions 88888 and !?FU25665; up to !?FU25682;

On line 4054 there's a script solitaire gave me about changing the Werewolves' def and sounds. It uses again this trigger:
!#TM1:S1/999/1/255; create timed event that occurs to everyone and everyday.  
!?TM1;

On line 4136 there's the creature bank script you gave me. You told me that having this trigger:
!#TM2:S1/1/1/255; Once
!?TM2;
Again in the script that would be a problem but that doesn't happen so.

On line 4159 theres the heroes summoning script that starts with !?BF; trigger and uses the y-3 to y-7 variables. It works ok.

Lastly, on line 4223 there's that sea creatures speed bonus script you gave me and on line 4243 the artifact script. They both use !?BA0; trigger i don't know if that's the problem.

I realize it is much to work with but if you could make the artifact script work i would really appreciate it. Again without the artifact part the script works without any problems.
____________
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 February 18, 2012 11:44 PM
Edited by Salamandre at 23:46, 18 Feb 2012.

Give me a few days please, working on TEW updates, then I finish your script, should not be difficult. Post your whole script again.
____________
Era II mods and utilities

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


Responsible
Supreme Hero
posted February 18, 2012 11:51 PM
Edited by Hero_of_Light at 23:54, 18 Feb 2012.

It's on the link in my previous post. HERE it is again.

I know you are busy right now with your new map and i thank you for all the trouble... I will wait your response.
____________
Not idly do the leaves of Lorien fall.

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


Adventuring Hero
Outcast Fire Witch
posted February 19, 2012 03:04 AM
Edited by ShizueKaryan at 03:07, 19 Feb 2012.

@JimV

!?BG0;
!!BG:A1;
!!BG:69;
!!BG:A0;
!!BU:S150/20/156/0/-1/0;

I write script to summon SSA follow your suggestion, and....crash!
I'm not good at making script, so please write the complete script for me. Thanks.

Edit: and what script to edit damage of spell?
____________
My HoMM3 Maps
Sorry for my bad English.

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


Responsible
Supreme Hero
posted February 19, 2012 04:47 AM

The script will have one complicated issue:  finding empty battlefield hexes to place the creature on, which work for both sides in any type of battle (e.g., siege, Creature Bank).  Other than that it is not difficult, but you must read ERM Help and practice with commands.

Often when I write a script based on what I think someone else wants, it turns out that I had a different concept, or the method I chose seems awkward to the specifier, or they had other scripts which use the same variables, flags, or functions, so that after hours, days, or even months of work in one case, neither of us is satisfied.  So I am very reluctant to take on new jobs of that sort.  I think it is much better that people learn ERM so they can write their own scripts, exactly as they envision them (or if they have to make compromises they will understand why and not complain).  I would prefer to serve only as a consultant.

The first problem I see with your script, speaking as a consultant, is that you seem to have confused "getting" with "setting".  For example, your command:

!!BG:A1;

is a "set" command.  It ignores whatever action the stack was going to do (you did not "get" this information), and sets the action to 1 - Hero casts a spell.  You are trying (the computer thinks) to force the Hero to cast a spell, but you have not designated a spell number anywhere.  I think what you meant to do was something like this:

!!BG:A?v1; get the action number in v1
!!FU&v1<>1:E; exit if the action is not "Hero casts a spell"

If you read the ERM help tutorials, they will explain this, and much more.  I know it is difficult to read in a foreign language, but unfortunately English is the only language I can write in myself, so you might as well read the original.  (ERM Help is where I learned 99% of what I know about ERM.)

One more tip:  start simply and add complexities later.  That is, start by selecting a battle hex which will work for battles with neutral creatures which are on the Adventure Map only.  When that works, then consider Hero-Hero battles, and sieges and Creature Bank battles.

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


Admirable
Omnipresent Hero
Wog refugee
posted February 19, 2012 04:52 AM

I don't think finding empty hex is an issue. I am playing with that dragon heart all the time, and the dragons it summons are ALWAYS over my creatures when in banks. And no problems except visual mess.
____________
Era II mods and utilities

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


Responsible
Supreme Hero
posted February 19, 2012 05:12 AM

A good script would not do that, because it can cause crashes, for example when it turns one of your creatures invisible due to overlapping it and an enemy creature tries to go through it on its way to attack something else.  This also happens with double-hex clones.  Some people are used to living with such crashes and don't mind them, but they have given WoG a bad name to others, who do mind them.  Personally, I would like to make WoG games crash-free, so I eliminate crashes wherever I can.

But of course people are free to write their own scripts however they want.  I only give my opinions of how I would write them.  Probably I will stop doing that soon, as I am mostly repeating myself.  But imagine a world in which WoG games crashed less often than SoD games, because that is a possible world.  (Maybe VCMI will do that very thing.)

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


Admirable
Omnipresent Hero
Wog refugee
posted February 19, 2012 05:18 AM

Of course, I was in doubt that his crash comes from bad placement only. It will crash later if specific actions, but placing two creatures one on other is not giving crash at battle start. Seeing the quality of script, I guess the problem is other.
____________
Era II mods and utilities

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


Responsible
Supreme Hero
posted February 20, 2012 01:38 PM

@Salamandre
I think i made the script work. I also edited the artifact script and added the magic artifact as well (the one that transforms Attack and Defense into Knowledge and Power). I only need one command that i can't find:

What is the command to change the artifact slot that a hero equips it to? I want to make the blank helm 161 to be equiped on the right hand.
____________
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 February 20, 2012 02:23 PM

UN:A161/2/4

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


Responsible
Supreme Hero
posted February 20, 2012 03:32 PM
Edited by Hero_of_Light at 16:12, 20 Feb 2012.

***EDIT***
Thanks it works. It needs !# (rather than !!) to work i didn't realize.

I would also like to know the scripts that make an artifact cast a spell on your troops or the enemy's troops at the start of the turn. I know that scripts like that already exist in original WOG but i can't find them so if anyone knows how to do it please share.

For instance i want to make an artifact (shield 163) to grand Magic Mirror to your troops.

On the other hand i want to make artifact 164 cast the basilisk's or medusas' stone gaze to the opponent's troops.

If someone knows how to do those things, please share.

@Salamandre

I made the script work with the hero summoning script by just changing the trigger. Instead of BA0 i used BF trigger and all the battlefield triggered scripts work together fine. I also got rid of the script checking part it wasn't really necessary afterall. Here are all of the scripts:

***This one appears 9 times***
!?BF; [Battlefield setup trigger]
!!BH0:N?y-3; [Attacking hero: y-1]
!!BH1:N?y-4; [Defending hero: y-2]
!!FU&y-3<>135/y-4<>135:E; [Exit if neither is the hero **Tristan**]
!!HE135:E?y-5/?y-6/1; [Hero Level: y-4]
!!VRy-6::7; [the formula: y-4]
!!FU&y-6<1:E; [Exit if zero]
!!VRy-7&y-3=122:S0; [Set y-7 to 0 if attacker is the hero]
!!VRy-7&y-4=135:S1; [Set y-7 to 1 if defender is the hero]
!!BU&y-7=0:S152/y-6/38/y-7/-1/1; [Summon creatures]
!!BU&y-7=1:S152/y-6/46/y-7/-1/1; [Summon creatures]


***Sea creatures bonus***
!?BA0;
!!BA:P?y1/?y2/?y3;
!!TRy1/y2/y3:T?y4/d/d/d/d/d/d/d;
!!FU&y4<>8:E; exit if not water
!!IF:V50/1;

!?BR&50;
!!DO100/0/41/1:P;
!!IF:V50/0;

!?FU100;
!!BMx16:T?y1;
!!FU&y1<>21/y1<>121/y1<>123/y1<>151/y1<>167/y1<>170/y1<>171:E; exit if not water creatures
!!BMx16:Sd1; increase speed by 1

***Artifacts

**scepter of Might
!?BF; [Battlefield setup trigger]
!!BH0:N?y-1; [Attacking hero: y-1]
!!BH1:N?y-2; [Defending hero: y-2]
!!HEy-1:A2/162/d/?y2;  [check for artifact]
!!HEy-2&y-2>-1:A2/162/d/?y4;  [check for artifact]
!!FU&y2<1/y4<1:E;
!!if&y2>0:;
!!IF:Wy-1;
!!VRw3:S99;
!!FU333:Py-1;
!!en:;
!!if&y4>0:;
!!IF:Wy-2;
!!VRw3:S99;
!!FU333:Py-2;
!!en:;

!?FU333;
;x1=Hero ID
!!HEx1:F?v110/?v111/?v112/?v113; Get stats
!!VRv114:Cv110/v111/v112/v113;
!!VRv110:+v112;
!!VRv111:+v113;
!!VRv112:-v112;
!!VRv113:-v113;
!!HEx1:Fv110/v111/v112/v113;

!?BA1&1000;
!!HE-1:O?y1;
!!FU&y1<0:E;
!!IF:W-1;
!!FU&w3<>99:E;
!!HE-1:Fv114/v115/v116/v117;
!!VRw3:S0;

**Wand of Magic
!#UN:A161/2/4; wielded in the hand
!?BF; [Battlefield setup trigger]
!!BH0:N?y-1; [Attacking hero: y-1]
!!BH1:N?y-2; [Defending hero: y-2]
!!HEy-1:A2/161/d/?y2;  [check for artifact]
!!HEy-2&y-2>-1:A2/161/d/?y4;  [check for artifact]
!!FU&y2<1/y4<1:E;
!!if&y2>0:;
!!IF:Wy-1;
!!VRw3:S99;
!!FU334:Py-1;
!!en:;
!!if&y4>0:;
!!IF:Wy-2;
!!VRw3:S99;
!!FU334:Py-2;
!!en:;

!?FU334;
;x1=Hero ID
!!HEx1:F?v110/?v111/?v112/?v113; Get stats
!!VRv114:Cv110/v111/v112/v113;
!!VRv112:+v110;
!!VRv113:+v111;
!!VRv110:-v110;
!!VRv111:-v111;
!!HEx1:Fv110/v111/v112/v113;

!?BA1&1000;
!!HE-1:O?y1;
!!FU&y1<0:E;
!!IF:W-1;
!!FU&w3<>99:E;
!!HE-1:Fv114/v115/v116/v117;
!!VRw3:S0;

As you might see i didn't change the script you gave me around it only needed a diferent BF trigger. It does have a small bug though. After a battle is won (with a hero wielding the artifact) and if the hero gains a level, the attack-defense-power or knowledge bonus will not apply. Hero will have the stats he had before the battle starts (as if he didn't level up). I'm guessing that the end of battle part needs to be changed a bit. I'll try and work this out but if you have an idea on how to fix it please post.
____________
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 February 20, 2012 04:27 PM

Tomorrow, promise! Working on TEW update right now, shall be ready this evening.

 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 ... 133 134 135 136 137 ... 150 200 250 300 350 400 407 · «PREV / NEXT»
Post New Poll    Post New Topic    Post New Reply

Page compiled in 0.5997 seconds