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 ... 148 149 150 151 152 ... 200 250 300 350 400 407 · «PREV / NEXT»
Hero_Of_Light
Hero_Of_Light


Responsible
Supreme Hero
posted June 25, 2012 05:05 PM
Edited by Hero_Of_Light at 15:15, 28 Jun 2012.

Can someone point me to the right direction with this script?

I want the Altar of Thought of every Conflux to have the creatures growth reduced every monday by 1 (only if Castle is built). Here's what I got:  

!?TM21;  //every monday
!!UN:U98/8/?i; //same search as above
!!FU&i=0:E;
!!DO25682/1/i/1:P;

!?FU25682;
!!UN:U98/8/x16/1;

!!CA1:T?y-1 B3/9;
!!FU&y-1<>8|-1:E; //checks for town type and dwelling status
!!CA1&y-1=8/1:M1/5/d/d-1; //set Azure and Faerie

I'm pretty sure I'm using the reduction part wrong. Does anyone know how to fix this please?
____________
Not idly do the leaves of Lorien fall.

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


Honorable
Supreme Hero
posted June 28, 2012 04:06 PM
Edited by Bersy at 16:53, 28 Jun 2012.

!?TM2&$weekday$=1/$once$=1;
!!UN:U98/8/?y1; y1 - number of Conflux towns
!!FU&y1=0:E; exit if nothing found
!!VRy2:S0; reset counter
!!VRv2:C-1/0/0; clear search vars
!!UN:U98/8/-1/2; #4 find next town in v2..v4
!!CA2:B3/9; check its Castle building
!!if&1:; if built
 !!CA2:B3/35; check level 6 building
 !!CA2&1:M1/5/d-1/d B3/42; subtract 1 from level6 creatures
 !!CA2&1:M1/5/d/d-1; subtract 1 from level6 upgraded creatures
!!en:;
!!VRy2:+1; increase counter
!!SN&y2<y1:G4; repeat if not all towns processed


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


Responsible
Supreme Hero
posted June 28, 2012 04:40 PM

It doesn't work. It starts with a lot of ERM problem windows writing "insufficient paramaters".
____________
Not idly do the leaves of Lorien fall.

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


Honorable
Supreme Hero
posted June 28, 2012 04:53 PM

UN:C => UN:U, fixed, sorry.

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


Responsible
Supreme Hero
posted June 28, 2012 05:04 PM
Edited by Hero_Of_Light at 17:04, 28 Jun 2012.

I think I found a way myself (using the right subtraction commands you gave me):

!?TM21;  //every monday

!!UN:U98/8/?i; //same search as above
!!FU&i=0:E;
!!DO25682/1/i/1:P;

!?FU25682;
!!UN:U98/8/x16/1;


** Faerie Dragons reduce growth
!!CA1:T?y-1 B3/35;
!!FU&y-1<>8|-1:E; //checks for town type and dwelling status
!!CA1:T?y-1 B3/9;
!!FU&y-1<>8|-1:E; //checks for town type and dwelling status
!!CA1&y-1=8/1:M1/5/d-1/d; subtract 1 from level6 creatures

** Azure Dragons reduce growth  
!!CA1:T?y-1 B3/42;
!!FU&y-1<>8|-1:E; //checks for town type and dwelling status
!!CA1:T?y-1 B3/9;
!!FU&y-1<>8|-1:E; //checks for town type and dwelling status
!!CA1&y-1=8/1:M1/5/d/d-1; subtract 1 from level6 creatures

Seems to work. Anyway, I'll keep your suggestion in mind too. Thanks for the help!
____________
Not idly do the leaves of Lorien fall.

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


Honorable
Supreme Hero
posted June 28, 2012 05:25 PM

Welcome, but check for town in your script is odd (you already search for 98/8) and the search is very slow.

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


Responsible
Supreme Hero
posted June 30, 2012 03:47 PM

Ultimately it doesn't work if not all the buildings are built. There must to be something wrong with the building checking part. But I don't know how I can make it check for the building and Castle in the same time. Here's the whole script:

!?TM21;  //every monday
!!UN:U98/8/?i; //same search as above
!!FU&i=0:E;
!!DO25682/1/i/1:P;

!?FU25682;
!!UN:U98/8/x16/1;


!!CA1:T?y-1 B3/40;
!!FU&y-1<>8|-1:E; //checks for town type and dwelling status
!!CA1&y-1=8/1:M1/3/d/?i; //get current number of standard creatures
!!CA1&y-1=8/1:D3/2/113/i; //set our creatures' number accordingly
!!CA1&y-1=8/1:D3/3/115/i; //set our creatures' number accordingly

!!CA1:T?y-1 B3/43;
!!FU&y-1<>8|-1:E; //checks for town type and dwelling status
!!CA1&y-1=8/1:M1/6/d/?i; //get current number of standard creatures
!!CA1&y-1=8/1:D6/2/158/i; //set our creatures' number accordingly


** Faerie Dragons reduce growth
!!CA2:B3/9; check its Castle building
!!if&1:; if built
!!CA1:T?y-1 B3/35;
!!FU&y-1<>8|-1:E; //checks for town type and dwelling status
!!CA1&y-1=8/1:M1/5/d-1/d; subtract 1 from level6 creatures

** Azure Dragons reduce growth
!!CA2:B3/9; check its Castle building
!!if&1:; if built
!!CA1:T?y-1 B3/42;
!!FU&y-1<>8|-1:E; //checks for town type and dwelling status
!!CA1&y-1=8/1:M1/5/d/d-1; subtract 1 from level6 creatures

This is part of the third slots script. I thought that adding the reduction of the growth here (that already sets the growth each monday) would be appropriate. However, I am doing something wrong with the building checks. This only works when all the buildings are built. If someone knows how to deal with this please help.
____________
Not idly do the leaves of Lorien fall.

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


Honorable
Supreme Hero
posted June 30, 2012 04:22 PM

Every !!if should have appropriate !!en:;

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


Responsible
Supreme Hero
posted June 30, 2012 05:06 PM
Edited by Hero_of_Light at 18:33, 30 Jun 2012.

***EDIT***

I changed the trigger (from your script) to TM21 and it seems to work now... I'll run some test but I think I got it now.

BTW, I got another problem now:P

I've been using your script that changes the creature sounds around:

**WOG creature sounds
!?FU3000;
!!UN:Ux1/-1/-1/1;
!!CAv1/v2/v3:T?y1 O?y2;
!!FU&v2000<>y2:E;
!!FU&y1<>6:E;
!!CAv1/v2/v3:B3/22;
!!FU&-1:E;
!!VRv2001:+1;
!!VRv2002:+100;

!?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;  **Darkness -> Goblin
!#FU54321:P150/122;   ***Supreme -> crusaders
!#FU54321:P152/12;  **Lord of Thunder -> Angel
!#FU54321:P164/53;   ***Fire Messenger -> Efreet Sultans
!#FU54321:P167/70;  **Water Messengers -> Troglodyte
!#FU54321:P169/34;   ***War Zealot -> Mage
!#FU54321:P171/35;   ***Lava Sharpshooter -> Mage
!#FU54321:P170/9;   ***Arctic Sharpshooter -> Zealot
!#FU54321:P173/16;  **Santa Gremlin -> Dwarf
!#FU54321:P195/52;   ***Hell Steeds -> Efreet

And while it works well in the first place, the creatures don't have the apropriate sounds when the game is loaded. When you load the game the sounds are set back to the original ones. Apparently it needs a load game trigger somewhere I don't know... Can you fix this?
____________
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 30, 2012 06:57 PM

!?GM0;
!!FU54321:P155/84;  **Darkness -> Goblin
!!FU54321:P150/122;   ***Supreme -> crusaders
!!FU54321:P152/12;  **Lord of Thunder -> Angel
!!FU54321:P164/53;   ***Fire Messenger -> Efreet Sultans
!!FU54321:P167/70;  **Water Messengers -> Troglodyte
!!FU54321:P169/34;   ***War Zealot -> Mage
!!FU54321:P171/35;   ***Lava Sharpshooter -> Mage
!!FU54321:P170/9;   ***Arctic Sharpshooter -> Zealot
!!FU54321:P173/16;  **Santa Gremlin -> Dwarf
!!FU54321:P195/52;   ***Hell Steeds -> Efreet

You already have such trigger in your script, just add those functions.

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


Responsible
Supreme Hero
posted June 30, 2012 07:05 PM
Edited by Hero_of_Light at 18:51, 01 Jul 2012.

**EDIT**

I have a huge problem with the script that allows third (and forth) hiring slots in towns' buildings. Here's a sample of the script:

**Castle**

!#TM21:S8/999/7/1; //1st day timer

//already existing dwellings

!?PI;
!!UN:U98/0/?i; //searching for all castles
!!FU&i=0:E;
!!DO25665/1/i/1:P;

!?FU25665; //searching for all castles
!!UN:U98/0/x16/1;
!!CA1:T?y-1 B3/19; //if upgraded Training ground is built
!!CA1&y-1=0/1:D2/2/165/1; //set our creatures' number accordingly
!!CA1:T?y-1 B3/43; //if upgraded Portal of Glory is built
!!CA1&y-1=0/1:M1/6/d/?i; //get current number of standard creatures
!!CA1&y-1=0/1:D6/2/169/i; //set our creatures' number accordingly


//newly built dwellings

!?TH0; //on entering City hall
!!IF:V598/0; //set flag 598 to false
!!CA-1:T?y-1 B3/19; //check whether Training ground is built
!!IF&-1:V598/1; //if no, set 598 to true

!?TH1&598; //on leaving City hall + 598 is true
!!CA-1:T?y-1 B3/19; //check whether Training ground has just been built
!!CA-1&y-1=0/1:D2/2/165/1; //set our creatures' number accordingly


!?TH0; //on entering City hall
!!IF:V599/0; //set flag 599 to false
!!CA-1:T?y-2 B3/43; //check whether Portal of Glory is built
!!IF&-1:V599/1; //if no, set 599 to true

!?TH1&599; //on leaving City hall + 599 is true
!!CA-1:T?y-2 B3/43; //check whether Portal of Glory has just been built
!!CA-1&y-2=0/1:M1/6/d/?i; //get current number of standard creatures
!!CA-1&y-2=0/1:D6/2/169/i; //set our creatures' number accordingly


//growth

!?TM21;  //every monday
!!UN:U98/0/?i; //same search as above
!!FU&i=0:E;
!!DO25666/1/i/1:P;

!?FU25666;
!!UN:U98/0/x16/1;
!!CA1:T?y-1 B3/19;
!!FU&y-1<>0|-1:E; //checks for town type and dwelling status
!!CA1&y-1=0/1:D2/2/165/1; //set our creatures' number accordingly
!!CA1:T?y-1 B3/43;
!!FU&y-1<>0|-1:E; //checks for town type and dwelling status
!!CA1&y-1=0/1:M1/6/d/?i; //get current number of standard creatures
!!CA1&y-1=0/1:D6/2/169/i; //set our creatures' number accordingly



!?CM1; //every click in a city
!!CA-1:T?y-2 B3/43;
!!FU&y-2<>0|-1:E; //check for town type and dwelling status
!!CA-1:M1/6/d/?i; //get number of standard creatures available
!!CA-1:D6/2/169/?j; //get number of our creatures available
!!CA-1&j<i:M1/6/d/j; //if number of ours is less, we assume they have been hired
!!CA-1&i<j:D6/2/169/i; //vice versa


!?FU88888;
!!CA-1:T?y-2 B3/43;
!!FU&y-2<>0|-1:E; //check for town type and dwelling status
!!CA-1:M1/6/d/?i; //get number of standard creatures available
!!CA-1:D6/2/169/?j; //get number of our creatures available
!!CA-1&j<i:M1/6/d/j; //if number of ours is less, we assume they have been hired
!!CA-1&i<j:D6/2/169/i; //vice versa

This is script is copied and pasted for all the towns, I just posted Castle to show you how it is: Now this script gives the following:

It gives one extra creature in Griffin Bastion each week
It gives a third slot in Portal of Glory.

THE PROBLEM

This script works fine when all the buildings are already built. It also works fine IF the upgraded buildings are built in the right order. However, If I upgrade Portal of Glory BEFORE I upgrade the Griffin Bastion then there's problems with it. Either the third slots don't appear at all, or the creature growth is messed up.

I know that the problem lies with the building checking. The script checks whether the buildings are built and so if the buildings aren't built with the order the script checks them then there's problem. So the solution lies right there, I need a way to have each building check run sepparetely and don't have the script exit if one of them isn't built or not.

I don't know If I am understandable but I sincerely need your help in this so please If anyone knows how to fix this please post.
____________
Not idly do the leaves of Lorien fall.

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

Tavern Dweller
posted July 01, 2012 08:33 PM

How can I change the war machine (in blacksmith) to another monster/ghost like completely destroyed town?

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


Promising
Famous Hero
of infamy
posted July 01, 2012 08:39 PM

When I change a monster's speed using BM:S I can make it so they can go anywhere (speed 50) on the battlefield. However, the shaded region of where they can walk to remains their old speed before it was altered, even though their new speed allows them to walk anywhere. The problem is only with the shaded region, and BU:R seems to do nothing to help.

Where is appropriate to redraw to make this change or how can I edit it so the shaded region is correct? I've tried redraw in BG0 BG1 CM4 and BR but nothing.

Script:
!?BG1&1000;
!!BG:N?y1;
!!BMy1:F?i;
!!VRi:&2;
!!VRv853&i>0:Sy1;
!!BMy1&i>0:Sd50;
!!VRv854&i>0:S1337;

!?BG1&1000/v854=1337;
!!BG:N?y2;
!!FU&y2=v853:E;
!!BMv853:S?y1;
!!BMv853&y1>50:Sd-50;
!!VRv854:S0;

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


Admirable
Omnipresent Hero
Wog refugee
posted July 01, 2012 09:30 PM
Edited by Salamandre at 22:17, 01 Jul 2012.

Try this:


!?FU77007;
!!VRv853:C0/0;
!!SN:X?y1; y1 — stack number
!!BMy1:F?i;
!!VRi:&2;
!!BMy1&i>0:Sd50;
!!VRv853&i>0:Sy1;
!!VRv854&i>0:S99;


!?BG0&1000/v854=99;
!!BMv853:Sd-50;


@Edit: never mind, works only visual, not effective :P
I recall Bersy posted a solution for this. It was:

;redraw grid after speed was changed
!!UN:C6919200/4/?y2;
!!SN:E4797616/2/y2/0/1;
!!BU:R;

But: as I see your script gives speed to flying creatures. Why not use in BH trigger at battle start, and forget about BG? It will solve a lot of problems, notably the wait button.

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


Responsible
Supreme Hero
posted July 01, 2012 11:55 PM
Edited by Hero_of_Light at 23:55, 01 Jul 2012.

I tried to include this !!if thing on the start of the script:

!#TM21:S8/999/7/1; //1st day timer

//already existing dwellings

!?PI;
!!UN:U98/0/?i; //searching for all castles
!!FU&i=0:E;
!!DO25665/1/i/1:P;

!?FU25665; //searching for all castles
!!UN:U98/0/x16/1;
!!FU&y-1<>0|-1:E; //checks for town type
!!if1:; if Castle
!!CA2: B3/19; //if upgraded Training ground is built
!!CA2:D2/2/165/1; //set our creatures' number accordingly
!!en:;
!!CA2:B3/43; //if upgraded Portal of Glory is built
!!CA2:M1/6/d/?i; //get current number of standard creatures
!!CA2:D6/2/169/i; //set our creatures' number accordingly
!!en:;

But apparently I am using it wrong. I need to make the script check for buildings SEPARATELY. That means that even if it doesn't find building 19 it will still check for 43 in this case. Can someone point me to the right direction here?
____________
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 July 02, 2012 12:01 AM

Please upload an ERM file with the complete towns growth script, and also plugin, if there is one needed.

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


Responsible
Supreme Hero
posted July 02, 2012 12:11 AM

Here is the link. It uses the battery plugin from MoP for third slots. When you open it search for "slots" so that you can find the section of the script in question.

I'll state my problem again so that you understand better what this needs.

When all the buildings in a town are already built then there's no problems at all (that's why I didn't realize this on previous tests). Some buildings have a third (and maybe fourth) slot and in some cases the third slot gives a fixed number of creatures.

This works ok when you build the buildings in the "correct" order as well. For instance, in Castle, if you build upgraded Griffins BEFORE the upgraded Portal of Glory then each third slot works ok. That's because the CHECK for griffin is BEFORE the check of Portal of Glory in the script.

However, if you upgrade portal of Glory first, then the script malfunctions (because the first check for upgraded griffins fails).

So I need this edited so that the checks work separately. I hope you know how and thank you for your interest
____________
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 July 02, 2012 02:30 AM

I have no idea how this script works. I replaced 11 wog - neutral town.erm with your script but game will not run. Apparently it depends on other changes, please upload the whole data/s (only scripts, no pcx), and on wikisend, thanks.

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


Promising
Famous Hero
of infamy
posted July 02, 2012 05:30 AM

Quote:
Why not use in BH trigger at battle start, and forget about BG? It will solve a lot of problems, notably the wait button.


This is for the H2 mod so first off, there is no wait button but the main goal was to give flying creatures full movement without having them go first in battle, like initiative. So it can't be battle start based, but creature turn based. Works 100% AFAIK, if anyone wants initiative instead of speed (for fliers here):

!?BG0&1000;      current stack global
!!BG:N?v853;

!?BG1&1000;      add flier full speed
!!BG:N?y1;
!!BMy1:F?i S?y2;
!!VRi:&2;
!!BMy1&y2<50/i>0:Sd50;

!!UN:C6919200/4/?y2;    fix shadow
!!SN:E4797616/2/y2/0/1;
!!BU:R;

!?BG1&1000;   restore speed
!!BG:N?y2;
!!FU&v853=y2:E;
!!BMv853:S?y1;
!!BMv853&y1>50:Sd-50;
!!BMv853:S?y1;
!!BMv853&y1>50:Sd-50;
!!VRv854:S0;

!?BR;   make sure didn't end on a flier
!!FU&v997<1:E;
!!BMv853:S?y1;
!!BMv853&y1>50:Sd-50;

!?BR;  for the very first turn
!!FU&v997<>0:E;
!!VRv4000:S0;
!!BM0:S?v4001;
!!DO1222/1/41/1;

!!BMv4000:F?i;
!!VRi:&2;
!!FU&i<1:E;
!!BMv4000&i>0:Sd50;
!!VRv853:Sv4000;
!!VRv854:S1337;

!?FU1222; find the fastest monster
!!BMx16:S?y1;
!!VRv4000&y1>v4001:Sx16;
!!VRv4001&y1>v4001:Sy1;

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


Admirable
Omnipresent Hero
Wog refugee
posted July 02, 2012 06:17 AM

What if slow was cast?

 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 ... 148 149 150 151 152 ... 200 250 300 350 400 407 · «PREV / NEXT»
Post New Poll    Post New Topic    Post New Reply

Page compiled in 0.1884 seconds