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 150 200 250 ... 264 265 266 267 268 ... 300 350 400 407 · «PREV / NEXT»
bloodsucker
bloodsucker


Legendary Hero
posted August 28, 2015 06:00 AM
Edited by bloodsucker at 04:16, 29 Aug 2015.

Well, I modified the first object and made three more.
They work ok but the tips get mixed. I still don't understand that code very well, but I thought !!CM0 would exit in any case that is not the respective object...

---
Private School

ZVSE

!?OB139/1&1000;
!!HE-1:N?y1;
!!HEy1:B0/?z11;

!!HE-1:P?y2/?y3/?y4;

!!SN:W^Hero_%Y1_PrivateSchool_%Y2_%Y3_%Y4^/?y5;

!!IF:Wy1;
!!IF&y5=99:M^Thanks for your visit, is always good for business to have old students here.^;
!!FU&y5=99:E;

!!IF:M1^Here %Z11 can learn half of what he would from visiting a Library and pay 10000 gold and 5 of mithril for it.^;
!!IF:Q1^But we have no other pre-requisites, are you interested?^;
!!FU&-1:E;

!!OW:R-1/6/?y6;
!!OW:R-1/7/?y7;

!!IF&y6<10000:M^You don't have enouch money, we charge 10000 for frequency.^;
!!FU&y6<10000:E;
!!IF&y7<5:M^You don't have enouch mithril, we charge 5 for frequency.^;
!!FU&y7<5:E;

!!OW:R-1/6/d-10000;
!!OW:R-1/7/d-5;
!!IF:M^Congratulations, you are now a private school graduate.^;

!!HE-1:Fd1/d1/d1/d1;

!!SN:W^Hero_%Y1_PrivateSchool_%Y2_%Y3_%Y4^/99; set this school to visited for this hero


!?CM0;
!!CM:P?y2/?y3/?y4;
!!OBy2/y3/y4:T?y6 U?y7;
!!FU&y6<>139/y7<>1:E;
!!OW:A-1/?y1;
!!SN:W^Hero_%Y1_PrivateSchool_%Y2_%Y3_%Y4^/?y5;
!!VRz1&y1<0:S^There is no active hero^;
!!IF&y1<0:Q1/-1/-1/4^%Z1^;
!!CM&y1<0:R0;
!!FU&y1<0:E;
!!IF:Wy1;
!!VRz1&y5=99:S^Already visited^;
!!VRz1&y5<99:S^Not visited^;
!!IF:Q1/-1/-1/4^%Z1^;
!!CM:R0;
---
Shaolin Temple

ZVSE

!?OB139/2&1000;
!!HE-1:N?y1;
!!HEy1:B0/?z11;

!!HE-1:P?y2/?y3/?y4;

!!SN:W^Hero_%Y1_ShaolinTemple_%Y2_%Y3_%Y4^/?y5;

!!IF:Wy1;
!!IF&y5=99:M^The monks are pleased to see you again, they have nothing to teach you but can always tell you some jokes.^;
!!FU&y5=99:E;

!!IF:Q1^You have found a shaolin temple. You can meditate with them but will take some time, are you interested?^;
!!FU&-1:E;

!!HE-1:W?y6;

!!IF&y6<2000:M^You don't have enouch time to meditate today. Maybe another day.^;
!!FU&y6<2000:E;

!!VRv1:S0 R3;
!!VRv2:S0 R3;
!!IF&v2=0/v1=0:S1;

!!HE-1:Fd0/d0/dv1/dv2;

!!HE-1:Wd-2000;

!!IF:M1^You have learned a lot about mind blowing techniques.^;
*!IF:M1^Your power has improved by %V1 and your knowledge has improved by %V2.^;

!!IF:Q1/33/v1/34/v2/1^Your power has improved by %V1 and your knowledge has improved by %V2.^;

!!SN:W^Hero_%Y1_ShaolinTemple_%Y2_%Y3_%Y4^/99; set this school to visited for this hero


!?CM0;
!!CM:P?y2/?y3/?y4;
!!OBy2/y3/y4:T?y6 U?y7;
!!FU&y6<>139/y7<>2:E;
!!OW:A-1/?y1;
!!SN:W^Hero_%Y1_ShaolinTemple_%Y2_%Y3_%Y4^/?y5;
!!VRz1&y1<0:S^There is no active hero^;
!!IF&y1<0:Q1/-1/-1/4^%Z1^;
!!CM&y1<0:R0;
!!FU&y1<0:E;
!!IF:Wy1;
!!VRz1&y5=99:S^Already visited^;
!!VRz1&y5<99:S^Not visited^;
!!IF:Q1/-1/-1/4^%Z1^;
!!CM:R0;
----------

Buddhist Monk

ZVSE

!?OB139/3&1000;
!!HE-1:N?y1;
!!HEy1:B0/?z11;

!!HE-1:P?y2/?y3/?y4;

!!SN:W^Hero_%Y1_BuddhistMonk_%Y2_%Y3_%Y4^/?y5;

!!IF:Wy1;
!!IF&y5=99:M^The monk asks you for sake, you have none but you share a bottle of wine with him.^;
!!HE-1&y5=99:Wd-100;
!!FU&y5=99:E;

!!IF:Q1^You found a buddhist monk. You can meditate with him but will take some time, are you interested?^;
!!FU&-1:E;

!!HE-1:W?y6;

!!IF&y6<2000:M^You don't have enouch time to meditate today. Maybe another day.^;
!!FU&y6<2000:E;

!!VRv1:S1 R2;
!!VRv2:S1 R2;

!!HE-1:Fd0/d0/dv1/dv2;

!!HE-1:Wd-1500;

!!IF:M1^You have learned more mind blowing techniques.^;
!!IF:Q1/33/v1/34/v2/1^Your power has improved by %V1 and your knowledge has improved by %V2.^;

!!SN:W^Hero_%Y1_BuddhistMonk_%Y2_%Y3_%Y4^/99; set this school to visited for this hero


!?CM0;
!!CM:P?y2/?y3/?y4;
!!OBy2/y3/y4:T?y6 U?y7;
!!FU&y6<>139/y7<>3:E;
!!OW:A-1/?y1;
!!SN:W^Hero_%Y1_BuddhistMonk_%Y2_%Y3_%Y4^/?y5;
!!VRz1&y1<0:S^There is no active hero^;
!!IF&y1<0:Q1/-1/-1/4^%Z1^;
!!CM&y1<0:R0;
!!FU&y1<0:E;
!!IF:Wy1;
!!VRz1&y5=99:S^Already visited^;
!!VRz1&y5<99:S^Not visited^;
!!IF:Q1/-1/-1/4^%Z1^;
!!CM:R0;
-----------
Dream Teacher

ZVSE

!#SN:W^Hero_%Y1_NumberTeachersVisited^/0;

!?OB139/4&1000;
!!HE-1:N?y1;
!!HEy1:B0/?z11;

!!HE-1:P?y2/?y3/?y4;

!!SN:W^Hero_%Y1_DreamTeacher_%Y2_%Y3_%Y4^/?y5;
!!SN:W^Hero_%Y1_NumberTeachersVisited^/?y6;

!!IF:Wy1;
!!IF&y5=99:M^You try to meditate but you only get flashbacks from the last time you have been here.^;
!!HE-1&y5=99:W0;
!!FU&y5=99:E;

!!HE-1:W?y7;
!!IF&y7<2000:M^You don't have enouch time to meditate today. Maybe another day.^;
!!FU&y7<2000:E;

!!VRy6:Sy6+1;

!!VRv1:Sy6*500;

!!HE-1:Y9/v1/666/1;

!!IF:M^You have found a space to meditate on yourself, from this day on you will receive an extra %V1 of experience every day.^;
!!HE-1:W0;

!!SN:W^Hero_%Y1_DreamTeacher_%Y2_%Y3_%Y4^/99; set this school to visited for this hero
!!SN:W^Hero_%Y1_NumberTeachersVisited^/y6;

!?CM0;
!!CM:P?y2/?y3/?y4;
!!OBy2/y3/y4:T?y6 U?y7;
!!FU&y6<>139/y7<>4:E;
!!OW:A-1/?y1;
!!SN:W^Hero_%Y1_DreamTeacher_%Y2_%Y3_%Y4^/?y5;
!!VRz1&y1<0:S^There is no active hero^;
!!IF&y1<0:Q1/-1/-1/4^%Z1^;
!!CM&y1<0:R0;
!!FU&y1<0:E;
!!IF:Wy1;
!!VRz1&y5=99:S^Already visited^;
!!VRz1&y5<99:S^Not visited^;
!!IF:Q1/-1/-1/4^%Z1^;
!!CM:R0;



P.S. Since the CM0 is not part of each objects routine, wouln't it be better to make another file and treat them all together? I already have more then 10 objects working, except for the tips.

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


Admirable
Omnipresent Hero
Wog refugee
posted August 28, 2015 05:19 PM
Edited by Salamandre at 17:34, 28 Aug 2015.

Fantastic code Hawaiing, thanks. Had the surprise to see 10 consecutive attacks too.


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


Legendary Hero
posted August 29, 2015 06:30 AM
Edited by bloodsucker at 15:25, 29 Aug 2015.

Is there an undocumented property of object that makes them behave like scholars and treasure chests, disappearing after use?

I was thinking to use some objects from New Objects and NPC that look like people to create super scholars that give things like: secondary skills above eight, sphinx blessings, artifacts, etc...
Could also be used as triggers for custom battles. But I wonder if I will have to delete every single one of them separatly or there is another way.

* Found a way, I make them treasure chests of an empty type, then script the type to have multiple options. That way they will have different looks and actions, you can't know if you're going to find a bunch of resources, a new secondary skill or the fight of a lifetime.
---

I went a little further on this one. I got some errors when I tested it with Second Henchmen creature present, didn't checked yet with commanders but I bet will do the same.
I have to find a way to exclude entities that are not regular creatures from the flags check and I'm not seing how to do it.

* They don't, already fought a battle and the only one who didn't had the attack and deffense bonus was the Second Henchman. Not sure what is happening to the Fire Immunity and I believe it has some problems.
1. I'm not sure but !!BA1 happens after the battlefield is closed, so I think the restore part can't work like this.
2. Even if it is possible to catch a moment after the battle is finnished and before the battlefield is closed, if some slots are dead the second scan will not catch all the monsters in the same positions.

----
ZVSE

!?OB139/10&1000;
!!HE-1:N?y1;
!!HE-1:P?y2/?y3/?y4;

!!SN:W^ForgeOfVulcan^/?y5;

!!IF:Wy1;
!!IF&y5=99:M^Hey, I'm done for the next millennium. Don't you know I married to Aphrodite? The girl has needs...^;
!!FU&y5=99:E;

!!IF:M^You found the mythical Forge of Vulcan. After a few hours of talking you convince the god himself to freely improve your weaponry.^;
!!IF:Q1^But he needs 20 mithril, 20.000 of gold, 50 of ore and 30 of each precious resources just to use as working materials, are you interested?^;
!!FU&-1:E;

!!OW:R-1/1/?y6;
!!OW:R-1/2/?y7;
!!OW:R-1/3/?y8;
!!OW:R-1/4/?y9;
!!OW:R-1/5/?y10;
!!OW:R-1/6/?y11;
!!OW:R-1/7/?y12;

!!IF&y6<50:M^You don't have enouch mercury, I need 30 for my work.^;
!!FU&y6<50:E;
!!IF&y7<30:M^You don't have enouch ore, I need 50 for my work.^;
!!FU&y7<30:E;
!!IF&y8<30:M^You don't have enouch sulfur, I need 30 for my work.^;
!!FU&y8<30:E;
!!IF&y9<30:M^You don't have enouch crystal, I need 30 for my work.^;
!!FU&y9<30:E;
!!IF&y10<30:M^You don't have enouch gems, I need 30 for my work.^;
!!FU&y10<30:E;
!!IF&y11<20000:M^You don't have enouch gold, I need 20000 for my work.^;
!!FU&y11<20000:E;
!!IF&y12<20:M^You don't have enouch mithril, I need 20 for my work.^;
!!FU&y12<20:E;

!!OW:R-1/1/d-30;
!!OW:R-1/2/d-50;
!!OW:R-1/3/d-30;
!!OW:R-1/4/d-30;
!!OW:R-1/5/d-30;
!!OW:R-1/6/d-20000;
!!OW:R-1/7/d-20;

!!IF:N31/12/32/12;
!!IF:N^You were blessed with the god's favor. All your creatures will have 12 more of attack and deffense and Immunity to Fire when in battle.^;

!!SN:W^ForgeOfVulcan^/99; set Forge to visited
!!SN:W^Hero_%Y1_ForgeOfVulcan^/99;  set this hero as the one who visit it.

!?CM0;
!!CM:P?y2/?y3/?y4;
!!OBy2/y3/y4:T?y6 U?y7;
!!FU&y6<>139/y7<>10:E;
!!SN:W^ForgeOfVulcan^/?y5;
!!VRz1&y5=99:S^Already visited^;
!!VRz1&y5<99:S^Not visited^;
!!IF:Q1/-1/-1/4^%Z1^;
!!CM:R0;

!?FU39247110;
!!BMx16:Ad12; +12 attack
!!BMx16:Dd12; +12 deffense

!!BMx16:F?i; [read flags]
!!SN:W^Monster_%X16_Forge^/i;
!!VRi:|16384;   immunity to fire
!!BMx16:F/i;

!?FU39247111;
!!SN:W^Monster_%X16_Forge^/?i;
!!BMx16:F/i;

!?BF&1000;
!!BA:H0/?y1;
!!BA:H1/?y2;
!!IF:Wy1;
!!SN:W^Hero_%Y1_ForgeOfVulcan^/?y3;
!!DO39247110/0/20/1&y3=99:P;
!!IF&y2>-1:Wy2;
!!DO39247110/21/41/1&y3=99/y2>-1:P;

!?BA1&1000;
!!BA:H0/?y1;
!!BA:H1/?y2;
!!IF:Wy1;
!!SN:W^Hero_%Y1_ForgeOfVulcan^/?y3;
!!DO39247111/0/20/1&y3=99:P;
!!IF&y2>-1:Wy2;
!!DO39247111/21/41/1&y3=99/y2>-1:P;

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


Adventuring Hero
posted August 29, 2015 09:41 AM

Salamandre said:
Fantastic code Hawaiing, thanks. Had the surprise to see 10 consecutive attacks too.



So,you may like extra_shoot too.

ZVSE
*Extra <metee attack> or <shoot> for stack.
*need <erm_hooker.era>
*<SN:W^007.AttackA.Times^> flag holds the attack times.
*<SN:W^007.ShootA.Times^> flag holds the shoot times(not for 149#Tower)(and 146# is different from other shooters)
********************PUT YOUR CODE HERE******************************
!?BG0;[example]
!!SN:W^007.AttackA.Times^/0;[reset flag](or reset it at BG1)
!!SN:W^007.ShootA.Times^/0;[reset flag](or reset it at BG1)

!!BG:A?y1 N?y2 E?y3;
!!BMy2:T?y4;
!!if&y1=6:;
!!SN&y4=132:W^007.AttackA.Times^/2;[AzureDragon has 2 extra_attack_times]
!!en:;
!!if&y1=7:;
!!SN&y4=196:W^007.ShootA.Times^/2;[Dracolich has 2 extra_shoot_times]
!!en:;
********************HOOK_CODE******************************
!?BA0&1000;
!!SN:L^EraPlugins\erm_hooker.era^/?y1 Ay1/^SetHook^/?y2;
!!SN:Ey2/1/7381311/101310; [hook at <after metee_attack>]
!!SN:Ey2/1/4456346/101311; [hook at <after shoot>]
!?BA1&1000;
!!SN:L^EraPlugins\erm_hooker.era^/?y1 Ay1/^UnsetHook^/?y2;
!!SN:Ey2/1/7381311;
!!SN:Ey2/1/4456346;

!?FU101310;[extra_metee_attack]
!!SN:X?y1/1;[edi]
!!SN:W^007.AttackA.Times^/?y30;
!!SN:W^007.AttackA.Times^/0;
!!FU&y30<1:E;
!!UN:Cy1/4/?y10;[y10=A_STACK]
!!VRy2:Sy1+8;
!!UN:Cy2/4/?y3; [y3=ebp]
!!VRy4:Sy3+8; [ebp+8]
!!UN:Cy4/4/?y5; y5=[ebp+08]
!!VRy6:Sy1+4;
!!UN:Cy6/4/?y20;[y20=D_STACK]10#
!!VRy11:Sy10+52; 11#
!!VRy12:Sy10+76;
!!VRy13:Sy10+656;
!!VRy14:Sy10+688;
!!VRy15:Sy10+704;
!!VRy21:Sy20+52;
!!VRy22:Sy20+76;
!!UN:Cy11/4/?y31; 18#
!!UN:Cy12/4/?y32;
!!UN:Cy13/4/?y33;
!!UN:Cy14/4/?y34;
!!UN:Cy15/4/?y35;
!!UN:Cy21/4/?y41;
!!UN:Cy22/4/?y42;
!!FU|y31<0/y32<1/y41<0/y42<1/y33>0/y34>0/y35>0:E;
!!SN:E4461360/2/y10/y20/y5;
!!VRy30:-1;
!!SN&y30>0:G18;

!?FU101311;[extra_shoot]
!!SN:X?y1/1;[edi]
!!SN:W^007.ShootA.Times^/?y30;
!!SN:W^007.ShootA.Times^/0;
!!FU&y30<1:E;
!!VRy2:Sy1+4; esi
!!UN:Cy2/4/?y10;[A_STACK]
!!VRy3:Sy1+16; ebx
!!UN:Cy3/4/?y20;[D_STACK]
!!VRy11:Sy10+52;[8#]
!!VRy12:Sy10+76;
!!VRy13:Sy10+656;
!!VRy14:Sy10+688;
!!VRy15:Sy10+704;
!!VRy16:Sy10+216;
!!VRy21:Sy20+52;
!!VRy22:Sy20+76;
!!UN:Cy11/4/?y31;[BM:T]16#
!!UN:Cy12/4/?y32;[BM:N]
!!UN:Cy13/4/?y33;[BM:G62]
!!UN:Cy14/4/?y34;[BM:G70]
!!UN:Cy15/4/?y35;[BM:G74]
!!UN:Cy16/4/?y36;[BM:U3]
!!UN:Cy21/4/?y41;[BM:T]
!!UN:Cy22/4/?y42;[BM:N]
!!FU|y31<0/y32<1/y41<0/y42<1/y33>0/y34>0/y35>0/y36<1:E;
!!SN:E4453920/2/y10/y20;
!!VRy30:-1;
!!SN&y30>0:G16;

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


Admirable
Omnipresent Hero
Wog refugee
posted August 29, 2015 11:48 AM

Thanks
____________
Era II mods and utilities

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


Legendary Hero
posted August 29, 2015 03:35 PM

This may seam to trivial but the fact is I tried a bunch of options without success...

I'm running this at the start of the game. It turns Monere in to a Offense or Logistics specialist.

!!IF:Q1/20/69/20/9/10^Start with Offense or Logistics specialist?^;

!!if&v1=1:;
  !!HE132:X0/22;
!!en:;
!!if&v1=2:;
  !!HE132:X0/2;
!!en:;

---
Once again, it does what I want but it doesn't look how I wanted. I would prefer if the images came without the meaningless text.

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


Admirable
Omnipresent Hero
Wog refugee
posted August 29, 2015 03:57 PM

You have to be creative within the erm boundaries. So far we cannot change secondary skills descriptions with erm (only in text files) but we CAN change artifacts descriptions.

!?PI;
!!VRz1:S^Offense Specialist^;
!!VRz2:S^Logistic Specialist^;
!!UN:A12/9/z1 A12/10/z1;  [change titan gladius description]
!!UN:A98/9/z2 A98/10/z2;   [change boots of speed description]
!!IF:Q1/8/12/8/98/10^Start with Offense or Logistics specialist?^;
!!if&v1=1:;
 !!HE132:X0/22;
!!en:;
!!if&v1=2:;
 !!HE132:X0/2;
!!en:;
!!UN:A12/9/0 A12/10/0;
!!UN:A98/9/0 A98/10/0; [restore both artifacts descriptions]

Such examples can be found by thousands in erm maps, fnord, mines etc.
____________
Era II mods and utilities

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


Admirable
Omnipresent Hero
Wog refugee
posted August 29, 2015 03:59 PM

Also if/en commands are there for reducing number of lines, not increasing:

You use 6 lines.
!!if&v1=1:;
!!HE132:X0/22;
!!en:;
!!if&v1=2:;
!!HE132:X0/2;
!!en:;

I use 2, same effect.
!!HE132&v1=1:X0/22;
!!HE132&v1=2:X0/2;
____________
Era II mods and utilities

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


Legendary Hero
posted August 29, 2015 04:06 PM
Edited by bloodsucker at 16:15, 29 Aug 2015.

Salamandre said:
So far we cannot change secondary skills descriptions with erm...

Such examples can be found by thousands in erm maps, fnord, mines etc.


Thanks. It was a matter of perspective, I always assumed the limitation was from my understanding, that I was the making an error. So I tried everything to correct my mistake but never tought about work around the problem cause I suposed there should be no problem at all, I was the one creating it.

Salamandre said:
I use 2, same effect.
!!HE132&v1=1:X0/22;
!!HE132&v1=2:X0/2;


I had notice it right now, too. When I wrote those lines I was completly rusty and the only thing I was thinking to code was that, to play a game without using Gundula.

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


Supreme Hero
Work at Magic Dimmension
posted August 30, 2015 12:36 PM
Edited by majaczek at 13:35, 30 Aug 2015.

thanks all helping

this is first part of my script

Quote:

ZVSE
_WARNING_#1=IMPORTANT! This file is not in a plain text format. NEVER use any editor except ERM_S for making any kind of changes!
ERMS_PoweredBy=ERM Scripter v. 2004.10.5.945
ERMS_ScriptDate=30.8(August).2015

[disable one elemental type limit]
ZVSE
!?BG0;
!!BG:A?y1 Q?y2 S?y3;
!!SN:W^BG.A^/y1 W^BG.Q^/y2 W^BG.S^/y3;

!?BG1;
!!SN:W^BG.A^/?y1 W^BG.Q^/?y2 W^BG.S^/?y3;
!!FU|y1<>1/y3<66/y3>69:E;[Hero cast SumnElm]
!!UN:C6919200/4/?y10;
!!VRy11:Sy2 *4+y10+78504;
!!UN:Cy11/4/-1;

=============================================================================

[Reset Summon Elemental spell]
!?BG0;
!!UN:C5906498/1/114; 0x72 Fire Elemental
!!UN:C5906519/1/113; 0x71 Earth Elemental
!!UN:C5906540/1/115; 0x73 Water Elemental
!!UN:C5906561/1/112; 0x70 Air Elemental

=============================================================================




Now I try Myself to add lines for special summons

EDIT:

Quote:

ZVSE
_WARNING_#1=IMPORTANT! This file is not in a plain text format. NEVER use any editor except ERM_S for making any kind of changes!
ERMS_PoweredBy=ERM Scripter v. 2004.10.5.945
ERMS_ScriptDate=30.8(August).2015

[disable one elemental type limit]
ZVSE
!?BG0;
!!BG:A?y1 Q?y2 S?y3;
!!SN:W^BG.A^/y1 W^BG.Q^/y2 W^BG.S^/y3;

!?BG1;
!!SN:W^BG.A^/?y1 W^BG.Q^/?y2 W^BG.S^/?y3;
!!FU|y1<>1/y3<66/y3>69:E;[Hero cast SumnElm]
!!UN:C6919200/4/?y10;
!!VRy11:Sy2 *4+y10+78504;
!!UN:Cy11/4/-1;

=============================================================================

[Reset Summon Elemental spell]
!?BG0;
!!UN:C5906498/1/114; 0x72 Fire Elemental
!!UN:C5906519/1/113; 0x71 Earth Elemental
!!UN:C5906540/1/115; 0x73 Water Elemental
!!UN:C5906561/1/112; 0x70 Air Elemental

=============================================================================

[Air Magic]
!?BG0;
!!BG:Q?y1;   Get Current side
!!BHy1:N?y2; Get Current Hero
!!FU&y2<0:E; Exit if no Hero

!!HEy2:S15/?y3; Air Magic Level into y3
!!UN&y3=2:C5906561/1/127; 0x70 Air Elemental -> Storm Elementals
!!UN&y3=3:C5906561/1/208; 0x70 Air Elemental -> Hurricane Elementals



it works for Storm Elementals but doesn't work for Hurricane Elementals (new creature from Amethyst) :|

EDIT: It doesn't work for any creature number > 127
Quote:

ZVSE
_WARNING_#1=IMPORTANT! This file is not in a plain text format. NEVER use any editor except ERM_S for making any kind of changes!
ERMS_PoweredBy=ERM Scripter v. 2004.10.5.945
ERMS_ScriptDate=30.8(August).2015

[disable one elemental type limit]
ZVSE
!?BG0;
!!BG:A?y1 Q?y2 S?y3;
!!SN:W^BG.A^/y1 W^BG.Q^/y2 W^BG.S^/y3;

!?BG1;
!!SN:W^BG.A^/?y1 W^BG.Q^/?y2 W^BG.S^/?y3;
!!FU|y1<>1/y3<66/y3>69:E;[Hero cast SumnElm]
!!UN:C6919200/4/?y10;
!!VRy11:Sy2 *4+y10+78504;
!!UN:Cy11/4/-1;

=============================================================================

[Reset Summon Elemental spell]
!?BG0;
!!UN:C5906498/1/114; 0x72 Fire Elemental
!!UN:C5906519/1/113; 0x71 Earth Elemental
!!UN:C5906540/1/115; 0x73 Water Elemental
!!UN:C5906561/1/112; 0x70 Air Elemental

=============================================================================

[Air Magic]
!?BG0;
!!BG:Q?y1;   Get Current side
!!BHy1:N?y2; Get Current Hero
!!FU&y2<0:E; Exit if no Hero

!!HEy2:S15/?y3; Air Magic Level into y3
!!UN&y3=2:C5906561/1/127; 0x70 Air Elemental -> Storm Elementals
!_!UN&y3=3:C5906561/1/208; 0x70 Air Elemental -> Hurricane Elementals [don't work]
!!UN&y3=3:C5906561/1/127; 0x70 Air Elemental -> Storm Elementals [temporary]


=============================================================================

[Fire Magic]
!?BG0;
!!BG:Q?y1;   Get Current side
!!BHy1:N?y2; Get Current Hero
!!FU&y2<0:E; Exit if no Hero

!!HEy2:S14/?y3; Fire Magic Level into y3
!!UN&y3=2:C5906498/1/129; 0x72 Fire Elemental -> Energy Elemental
!!UN&y3=3:C5906498/1/129; 0x72 Fire Elemental -> Energy Elemental

=============================================================================

[Earth Magic]
!?BG0;
!!BG:Q?y1;   Get Current side
!!BHy1:N?y2; Get Current Hero
!!FU&y2<0:E; Exit if no Hero

!!HEy2:S17/?y3; Earth Magic Level into y3
!!UN&y3=2:C5906519/1/125; 0x71 Earth Elemental -> Magma Elementals
!!UN&y3=3:C5906519/1/125; 0x71 Earth Elemental -> Magma Elementals

=============================================================================

[Water Magic]
!?BG0;
!!BG:Q?y1;   Get Current side
!!BHy1:N?y2; Get Current Hero
!!FU&y2<0:E; Exit if no Hero

!!HEy2:S16/?y3; Water Magic Level into y3
!!UN&y3=2:C5906540/1/123; 0x73 Water Elemental -> Ice Elementals
!!UN&y3=3:C5906540/1/123; 0x73 Water Elemental -> Ice Elementals

=============================================================================

[Necromancy]
!?BG0;
!!BG:Q?y1;   Get Current side
!!BHy1:N?y2; Get Current Hero
!!FU&y2<0:E; Exit if no Hero

!!HEy2:S12/?y3; Necromancy Level into y3
!!UN&y3>0:C5906498/1/159; 0x72 Fire Elemental   -> Ghosts
!!UN&y3>0:C5906519/1/159; 0x71 Earth Elemental  -> Ghosts
!!UN&y3>0:C5906540/1/159; 0x73 Water Elemental  -> Ghosts
!!UN&y3>0:C5906561/1/159; 0x70 Air Elemental    -> Ghosts


=============================================================================




Could OxFea, Salamandre, Hawaiing or anybody prepare a fix?
It seems that H3 Code threats is as Signed Char, and it would help to change that code to threat it as Unsigned Char, but code seems to be too complex for me to find adress of the commands myself

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


Admirable
Omnipresent Hero
Wog refugee
posted August 30, 2015 01:43 PM

Too many UN:C for my level. Only OxFea of Hawaiing can help here.
____________
Era II mods and utilities

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


Supreme Hero
Work at Magic Dimmension
posted August 30, 2015 03:07 PM
Edited by majaczek at 16:10, 30 Aug 2015.

Salamandre said:
!#UN:C5906519/1/61;
!#UN:C5906561/1/37;
!#UN:C5906498/1/52;
!#UN:C5906540/1/12;


it works

majaczek said:
!#UN:C5906519/1/130;
!#UN:C5906561/1/132;
!#UN:C5906498/1/133;
!#UN:C5906540/1/159;

it crashes soon after summon

now is there enough small number of UN:C to understand?
my guess is that is code interpreting it as signed char instead of unsigned char and crashes soon on negative number

could you help me now?

EDIT: it seems there is not enough memory place in instructions to prepare unsigned push, the original contains 8bit signed constant push opcode (6A) and one byte constant. any signed constant push command is more than 1 byte opcode :(... it perhaps need a hook or some dirty workaround?


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


Legendary Hero
posted August 30, 2015 05:17 PM
Edited by bloodsucker at 18:12, 30 Aug 2015.

@SalamandrePlease, when you have the time look at my Forge of Vulcan script.

I believe the scan has problems and I'm starting to understand enouch of Hawaing code to make it work but not if I'm making the scan all wrong and suddenly there are creatures with their attributes changed that are not the right one's.

----

ZVSE

!?OB139/10&1000;
!!HE-1:N?y1;
!!HE-1:P?y2/?y3/?y4;

!!SN:W^ForgeOfVulcan^/?y5;

!!IF:Wy1;
!!IF&y5=99:M^Hey, I'm done for the next millennium. Don't you know I married to Aphrodite? The girl has needs...^;
!!FU&y5=99:E;

!!IF:M^You found the mythical Forge of Vulcan. After a few hours of talking you convince the god himself to freely improve your weaponry.^;
!!IF:Q1^But he needs 20 mithril, 20.000 of gold, 50 of ore and 30 of each precious resources just to use as working materials, are you interested?^;
!!FU&-1:E;

!!OW:R-1/1/?y6;
!!OW:R-1/2/?y7;
!!OW:R-1/3/?y8;
!!OW:R-1/4/?y9;
!!OW:R-1/5/?y10;
!!OW:R-1/6/?y11;
!!OW:R-1/7/?y12;

!!IF&y6<50:M^You don't have enouch mercury, I need 30 for my work.^;
!!FU&y6<50:E;
!!IF&y7<30:M^You don't have enouch ore, I need 50 for my work.^;
!!FU&y7<30:E;
!!IF&y8<30:M^You don't have enouch sulfur, I need 30 for my work.^;
!!FU&y8<30:E;
!!IF&y9<30:M^You don't have enouch crystal, I need 30 for my work.^;
!!FU&y9<30:E;
!!IF&y10<30:M^You don't have enouch gems, I need 30 for my work.^;
!!FU&y10<30:E;
!!IF&y11<20000:M^You don't have enouch gold, I need 20000 for my work.^;
!!FU&y11<20000:E;
!!IF&y12<20:M^You don't have enouch mithril, I need 20 for my work.^;
!!FU&y12<20:E;

!!OW:R-1/1/d-30;
!!OW:R-1/2/d-50;
!!OW:R-1/3/d-30;
!!OW:R-1/4/d-30;
!!OW:R-1/5/d-30;
!!OW:R-1/6/d-20000;
!!OW:R-1/7/d-20;

!!IF:N31/12/32/12;
!!IF:N^You were blessed with the god's favor. All your creatures will have 12 more of attack and deffense when in battle.^;

!!SN:W^ForgeOfVulcan^/99; set Forge to visited
!!SN:W^Hero_%Y1_ForgeOfVulcan^/99;  set this hero as the one who visit it.

!?CM0;
!!CM:P?y2/?y3/?y4;
!!OBy2/y3/y4:T?y6 U?y7;
!!FU&y6<>139/y7<>10:E;
!!SN:W^ForgeOfVulcan^/?y5;
!!VRz1&y5=99:S^Forge of Vulcan (visited)^;
!!VRz1&y5<99:S^Forge of Vulcan (not visited)^;
!!IF:Q1/-1/-1/4^%Z1^;
!!CM:R0;

!?FU39247110;
!!BMx16:Ad12; +12 attack
!!BMx16:Dd12; +12 deffense

!!BMx16:F?i; [read flags]
!!SN:W^Monster_%X16_Forge^/i;
!!VRi:|16384;   immunity to fire
!!BMx16:F/i;

!?FU39247111;
!!SN:W^Monster_%X16_Forge^/?i;
!!BMx16:F/i;

!?BF&1000;
!!BA:H0/?y1;
!!BA:H1/?y2;
!!IF:Wy1;
!!SN:W^Hero_%Y1_ForgeOfVulcan^/?y3;
!!DO39247110/0/20/1&y3=99:P;
!!IF&y2>-1:Wy2;
!!DO39247110/21/41/1&y3=99/y2>-1:P;

!?BA1&1000;
!!BA:H0/?y1;
!!BA:H1/?y2;
!!IF:Wy1;
!!SN:W^Hero_%Y1_ForgeOfVulcan^/?y3;
!!DO39247111/0/20/1&y3=99:P;
!!IF&y2>-1:Wy2;
!!DO39247111/21/41/1&y3=99/y2>-1:P;

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


Admirable
Omnipresent Hero
Wog refugee
posted August 30, 2015 05:23 PM

I don't understand that script. Can you just write actions, readable and concise?


1) Want this
2) Then this
3) then that
etc

So I can see what's about.

Henchmen is a different script, to affect it you must go in its script.
____________
Era II mods and utilities

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


Legendary Hero
posted August 30, 2015 06:05 PM

Salamandre said:
Henchmen is a different script, to affect it you must go in its script.


Nah, my only problem with henchmen and commander is that if I'm counting creatures in the battlefield they are included, so read his flagged habilities and add bits will provoke problems.

I asked you this first in a PM, remember?
I still don't know exactly what I want for these banks, I want them to be unique to each map and one visit only. They should make the hero who visit them really special. I was thinking of relating them to greek mythology.
I want to use the 'Change your battlefield' code if you don't mind. That would be the reward for visiting Athena.
Mercury will add three to the speed of your creatures.
For Diana I want the extra attacks routine but just for shooters.
I'm not sure if I use Ares for the extra melee and Jupiter for both or Jupiter for both and make Ares give all creatures First Strike and ignores no retaliation, instead.  

For this one what I want is:
1. Is a one visit only object.
2. Flags hero
3. In battlefield loops trough this hero's army and gives 12 attack and deffense and Immunity to Fire to all creatures.

After battle all creatures are restored to normal.

I'm ok with this one as it is (presuming that it works) but I'm open to sugestions to other beneficts of god intervention. (Not the kind you find on Other Side of the Monitor, please).

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


Admirable
Omnipresent Hero
Wog refugee
posted August 30, 2015 06:15 PM
Edited by Salamandre at 18:22, 30 Aug 2015.

1-2
!?OB[...]&1000;
!!OB998:P?y1/?y2/?y3; get coordinates
!!HE-1:N?y4; get hero ID
!!SN:W^Blood_Hero_%Y4_%Y1_%Y2_%Y3^/99; flag hero, now every time you ask this sn: w var, it will answer 99.

3:
!!DO12345/0/20/1:P; process left side battlefield (right side would be 21-41)
!?FU12345;
!!BMx16:T?y1;
!!FU&y1<0:E; exit if not valid stack
!!BMx16:Ad12 Dd12; add 12 attack/def
!!BMx16:F?k;
!!VRk:|16384;
!!BMx16:Fk; add fire immunity flag

____________
Era II mods and utilities

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


Adventuring Hero
posted August 30, 2015 06:27 PM
Edited by Hawaiing at 18:28, 30 Aug 2015.

majaczek said:

EDIT: it seems there is not enough memory place in instructions to prepare unsigned push, the original contains 8bit signed constant push opcode (6A) and one byte constant. any signed constant push command is more than 1 byte opcode :(... it perhaps need a hook or some dirty workaround?



my code for you.hope it help.(dirty maybe)
PS:HE:S level is not the true battle spell level(like Magic Clouds Land.)

ZVSE
!?BG0;
!!BG:A?y1 H?y2 S?y3 Q?y4;
!!FU|y1<>1/y2<0/y3<66/y3>69:E;
!!UN:C5909376/4/522067228;[reset old hard code]
!!UN:C6919200/4/?y10;
!!VRy13:Sx1*4+21452+y10;
!!UN:Cy13/4/?y14;
!!VRy15:Sy10+21440;
!!UN:Cy15/4/?y16;
!!SN:E5133040/2/y14/y3/y16;
!!VRy17:Sv1;[skillLevel]
!!VRy17&y17<0:S0;
!!VRy17&y17>3:S3;
!!HEy2:S12/?y12;
!!if&y12>0:;
 !!UN:C5909376/4/623191333;[disable summon spell and rewrite it]
 !!FU123456&y3=66:Py4/66/159;
 !!FU123456&y3=67:Py4/67/159;
 !!FU123456&y3=68:Py4/68/159;
 !!FU123456&y3=69:Py4/69/159;
 !!FU:E;
!!en:;
!!if&y17>1:;
 !!UN:C5909376/4/623191333;
 !!if&y3=66:; Fire Magic
 !!FU123456&y17=2:Py4/66/129;
 !!FU123456&y17=3:Py4/66/129;
 !!FU:E;
 !!en:;
 !!if&y3=67:; Air Magic
 !!FU123456&y17=2:Py4/67/127;
 !!FU123456&y17=3:Py4/67/208;
 !!FU:E;
 !!en:;
 !!if&y3=68:; Water Magic
 !!FU123456&y17=2:Py4/68/123;
 !!FU123456&y17=3:Py4/68/123;
 !!FU:E;
 !!en:;
 !!if&y3=69:; Earth Magic
 !!FU123456&y17=2:Py4/69/125;
 !!FU123456&y17=3:Py4/69/125;
 !!FU:E;
 !!en:;
!!en:;

!?FU123456;[summon creature]
*x1=0-1,x2=spellNUM(66-67,for Effect),x3=creature_type
!!UN:C6919200/4/?y10;[pCombatManager]
!!VRy11:Sx1*4+21460+y10;
!!UN:Cy11/4/?y12;[spellPower]
!!VRy13:Sx1*4+21452+y10;
!!UN:Cy13/4/?y14;[hero]
!!VRy15:Sy10+21440;
!!UN:Cy15/4/?y16;
!!SN:E5133040/2/y14/x2/y16;
!!VRy17:Sv1;[skillLevel]
!!VRy17&y17<0:S0;
!!VRy17&y17>3:S3;
!!SN:E5927824/2/y10/x2/x3/y12/y17;
!!VRy18:Sx1*4+78504+y10;
!!UN:Cy18/4/-1;[disable one elemental type limit]



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


Legendary Hero
posted August 30, 2015 06:31 PM

Salamandre said:
!!BMx16:T?y1;
!!FU&y1<0:E; exit if not valid stack



In fact, all I needed was that. But I forgot a 4.

4. After battle all creatures are restored to normal.
And this is where the problems begin, I think.

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


Admirable
Omnipresent Hero
Wog refugee
posted August 30, 2015 06:33 PM

They are not restored because they never changed. There is no connection between battle stacks (BM) and map monsters (MA), the codes are different. You don't need to restore.
____________
Era II mods and utilities

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


Legendary Hero
posted August 30, 2015 06:50 PM

Didn't knew that, I tought I was affecting !!MA too. It's much simpler this way.
In this case, can I use !!BA, !!BM in !!LE to create battles against impossible creatures without restore their values after? Much interesting.

 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 150 200 250 ... 264 265 266 267 268 ... 300 350 400 407 · «PREV / NEXT»
Post New Poll    Post New Topic    Post New Reply

Page compiled in 0.2945 seconds