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 ]
New Server | HOMM1: info forum | HOMM2: info forum | HOMM3: info forum | HOMM4: info forum | HOMM5: info 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 356 pages long: 1 2 3 4 5 ... 70 140 210 280 350 ... 352 353 354 355 356 · «PREV / NEXT»
Salamandre
Salamandre


Admirable
Omnipresent Hero
Wog refugee
posted August 19, 2018 01:40 PM
Edited by Salamandre at 13:42, 19 Aug 2018.

To prevent script going crazy when 2 of same artifacts are equipped do this:

!?FU47833&1000;                                                                 [Count Set Pieces Fkt]

!!HEx1:A2/79/?y30/?y10;                [Orb of Firmament]
!!HEx1:A2/80/?y31/?y11;                [Orb of Silt]
!!HEx1:A2/81/?y32/?y12;                [Orb of Tempestous fire]
!!HEx1:A2/82/?y33/?y13;                [Orb of Driving rain]

!!VRy21&y10=1/y30<2:+1; add as condition if 2 artifacts are equipped (y30<2)
!!VRy21&y11=1/y31<2:+1;
!!VRy21&y12=1/y32<2:+1;
!!VRy21&y13=1/y33<2:+1;

Then do same check when unequipping, probably need to change function.
____________
Era II mods and utilities

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


Promising
Known Hero
posted August 19, 2018 03:31 PM
Edited by RerryR at 15:38, 19 Aug 2018.

@Sal thanks for your help, while your idea was not sufficient it gave me motivation again to grind through until I found a way

Okay so after wasting like 10hours of scripting time I found a solution to the problem. Here is a function that can calculate the number of equipped artifacts which allows to create something like self-made artifact sets for h3 (or lets say one way to do it, i'am sure there are others). Also taking into account double equipped items ^^.  


*---------------------------------*
*The 4 Orbs Set Example*
!?AE1|v998=79/v998=80/v998=81/v998=82; Equip Artifact Trigger

!!HE-1:A2/79/?y30/?y10;  
!!HE-1&v998=79/y10=1:A-79;*Delete double equipped items

!!HE-1:A2/80/?y31/?y11;
!!HE-1&v998=80/y11=1:A-80;

!!HE-1:A2/81/?y32/?y12;
!!HE-1&v998=81/y12=1:A-81;

!!HE-1:A2/82/?y33/?y13;
!!HE-1&v998=82/y13=1:A-82;

!!FU47833:P-1/?y90/?y91/?y92;[Call count Set Pieces function]                                                  
!!VRy91:+1;

!!HE-1&y91=3/v998=79/y10=1/y30=1:Fd0/d0/d0/d-3; *fixes
!!HE-1&y91=4/v998=79/y10=1/y30=1:Fd0/d0/d-5/d0;
!!HE-1&y91=4/v998=79/y10=1/y30=2:Fd0/d0/d-5/d0;
!!HE-1&y91=3/v998=80/y11=1/y31=1:Fd0/d0/d0/d-3;
!!HE-1&y91=4/v998=80/y11=1/y31=1:Fd0/d0/d-5/d0;
!!HE-1&y91=4/v998=80/y11=1/y31=2:Fd0/d0/d-5/d0;
!!HE-1&y91=3/v998=81/y12=1/y32=1:Fd0/d0/d0/d-3;
!!HE-1&y91=4/v998=81/y12=1/y32=1:Fd0/d0/d-5/d0;
!!HE-1&y91=4/v998=81/y12=1/y32=2:Fd0/d0/d-5/d0;
!!HE-1&y91=3/v998=82/y13=1/y33=1:Fd0/d0/d0/d-3;
!!HE-1&y91=4/v998=82/y13=1/y33=1:Fd0/d0/d-5/d0;
!!HE-1&y91=4/v998=82/y13=1/y33=2:Fd0/d0/d-5/d0;

!!HE-1&y91=3:Fd0/d0/d0/d3; *When 3 pieces equiped + 3 Knowledge
!!HE-1&y91=4:Fd0/d0/d5/d0; *When 4 pieces equiped + 5 SpellPower

!!HE-1&v998=79/y10=1:A79; *Put Deleted double equipped items in BP
!!HE-1&v998=80/y11=1:A80;
!!HE-1&v998=81/y12=1:A81;
!!HE-1&v998=82/y13=1:A82;


!?AE0|v998=79/v998=80/v998=81/v998=82;Unequip Artifact Trigger

!!FU47833:P-1/?y90/?y91/?y92;
!!VRy91:-1;

!!HE-1&y91=2:Fd0/d0/d0/d-3;
!!HE-1&y91=3:Fd0/d0/d-5/d0;


*****************************************************
!?FU47833&1000; Count Function                                                                


!!HEx1:A2/79/?y31/?y10;        [Check Orb of Firmament]
!!HEx1:A2/80/?y32/?y11;        [Orb of Silt]
!!HEx1:A2/81/?y33/?y12;        [Orb of Tempestous fire]
!!HEx1:A2/82/?y34/?y13;        [Orb of Driving rain]

!!VRy21&y10=1:+1; *Addup
!!VRy21&y11=1:+1;
!!VRy21&y12=1:+1;
!!VRy21&y13=1:+1;

!!VRx3:Sy21;  *Return number in x3     [x3 Elementel Set]
*---------------------------------*


Now that that's out of the way, time for the fun part.
Anyone some ideas/suggestions for good set bonuses? Preferably granting bonus to magic/spells/wizard class?

I currently have 5 Sets partly done

The Dragon Set
The Elemental Set (consisting of the 4 orbs)
The Magic Set (consisting of the 4 books)
The Wizards Courage (consisting of the 4 arts. which give moral)
The Wizards Fortune (consisting of the 4 arts. which give luck)
Something with Undead theme?

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


Admirable
Omnipresent Hero
Wog refugee
posted August 19, 2018 03:50 PM

RerryR said:


is it possible with ERM to prevent the hero from equipping the same artifact twice? it makes no sense anyway.


Yeah sorry, I understood your question as equipping same artifact two times during the game, not equipping simultaneously two of the same artifact. Hence my solution which was of no help.  

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

Tavern Dweller
posted August 21, 2018 11:47 AM
Edited by DarkAtom at 11:50, 21 Aug 2018.

Salamandre said:
DarkAtom said:

Basically, HD mod is really buggy and pretty much unplayable with ERA, at least for me, I don't know why, the game also lags a lot.



For me it works 100% and so far it IS compatible with Era, technically speaking. Try to change values in heroes3.ini, set CPUpatch and/or UseOnlyOneCpuCore to another value.


Thanks! Now it works (athough the problem was with the stretch filter).

Also, does anybody know the answer to this?
DarkAtom said:

2. Is there any way of getting the maximum spell points for a hero? This question may seem dumb (it is knowledge*10 + intelligence bonus), but for some reason the game calculates the Intelligence specialty percentage in a weird way and it gives a different result than my math does.

____________
"If you get scared of doing what's right you might as well lay down and die" - Wulfstan, Heroes of Might and Magic V: Hammers of Fate

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


Promising
Known Hero
posted August 21, 2018 02:50 PM

DarkAtom said:

2. Is there any way of getting the maximum spell points for a hero? This question may seem dumb (it is knowledge*10 + intelligence bonus), but for some reason the game calculates the Intelligence specialty percentage in a weird way and it gives a different result than my math does.



Show us how you calculate the max spell points for Intelligence specialty, maybe it's wrong.

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

Tavern Dweller
posted September 03, 2018 09:26 PM

RerryR said:
DarkAtom said:

2. Is there any way of getting the maximum spell points for a hero? This question may seem dumb (it is knowledge*10 + intelligence bonus), but for some reason the game calculates the Intelligence specialty percentage in a weird way and it gives a different result than my math does.



Show us how you calculate the max spell points for Intelligence specialty, maybe it's wrong.


The way I calculate it is:
Take S = Knowledge * 10

If no Intelligence Specialty is present:
S + S * B / 100 (where B is the percentage number of the Intelligence Skill: 0 for none, 25 for basic, 50 for advanced and 100 for expert)

If Intelligence Skill is present:
Take X = S + S * B / 100
X + X * 5 / 100 * L (where L is the level of the hero)

I also tried other variations like taking the specialty percentage from the base spell points (K * 10) instead of the intelligence boosted spell points. Also tried to take the percentage of the specialty from the intelligence bonus only (S * B / 100). When I got rational results, I tried rounding them up, after that down, and after that to whichever is the closest. Sometimes I got the answer right, but then I tried the same formula with one Knowledge higher and it didn't work.

Sorry for answering so late, I didn't have time to look on HC these days.
____________
"If you get scared of doing what's right you might as well lay down and die" - Wulfstan, Heroes of Might and Magic V: Hammers of Fate

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


Promising
Known Hero
posted September 09, 2018 01:32 AM

@ Dark Atom
interestingly enough I didn't see your answer aswell, as its not shown on the main page. Anyway i will take a look tomorrow.


Now i also have a question.
I want to make Magic Mirror a mass spell but it didn't work. I thought it should be possible by setting the right flag.

I tried to set those two flags:

!#VRi:S0;
!#SS36:F?i;
!#VRi:|64;  0x00000040 - has mass version at expert level                                                            
!#SS36:Fi;

!#SS36:F?i;
!#VRi:|2048;  0x00000800 - friendly and has mass version                                                            
!#SS36:Fi;

either it doesn't work this way or I did something else wrong.

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


Admirable
Omnipresent Hero
Wog refugee
posted September 09, 2018 07:04 AM

RerryR said:

!#SS36:F?i;
!!VRi:&-17; [remove single target flag]
!#VRi:|64;  0x00000040 - has mass version at expert level                                                            
!#SS36:Fi;

____________
Era II mods and utilities

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


Promising
Known Hero
posted September 09, 2018 09:52 AM

Salamandre said:
RerryR said:

!#SS36:F?i;
!!VRi:&-17; [remove single target flag]
!#VRi:|64;  0x00000040 - has mass version at expert level                                                            
!#SS36:Fi;



Thank you Sir!

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


Hired Hero
posted September 21, 2018 05:35 AM

Hello everybody!

   I'm new to new to ERM scripting and I have several questions, please be so kind and help me out.

   1. Where can I find the "exclusive" teaching documents of the ERM syntax!?
   2. There is a Magic University in Conflux town, is it possible to change it to other skills to be learned!?
   3. Is it possible to change the town recruits to "random"!? I want a town which all have different creatures of the same level in every new game, is it possible!?
   4. I download a lot of VCMI mods (New towns, creatures, heroes, etc.), but when I open WOG, NOTHING is added! It worked fine with VCMI, but I want to play it in WOG! Please teach me how to import it to WOG! Much appreciated!
   5. Is it possible to change a hero's "Specialty"!?

   Thank you VERY much for your help!
   Much appreciated!!!

Sincerely,
PiggyChu620

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

Tavern Dweller
posted September 29, 2018 09:29 PM
Edited by DarkAtom at 17:31, 30 Sep 2018.

piggychu620 said:
Hello everybody!

   I'm new to new to ERM scripting and I have several questions, please be so kind and help me out.

   1. Where can I find the "exclusive" teaching documents of the ERM syntax!?
   2. There is a Magic University in Conflux town, is it possible to change it to other skills to be learned!?
   3. Is it possible to change the town recruits to "random"!? I want a town which all have different creatures of the same level in every new game, is it possible!?
   4. I download a lot of VCMI mods (New towns, creatures, heroes, etc.), but when I open WOG, NOTHING is added! It worked fine with VCMI, but I want to play it in WOG! Please teach me how to import it to WOG! Much appreciated!
   5. Is it possible to change a hero's "Specialty"!?

   Thank you VERY much for your help!
   Much appreciated!!!

Sincerely,
PiggyChu620



1. The erm documentation is right in your ERA II folder, in the help subdirectory. However, finding the correct html to open can be difficult (it is index.html if I am not totally mistaken), so you can also open it in the ERA Start Menu (which is placed on the desktop when you install ERA).

2. I don't know how to do that, but it might be possible.

3. It is totally possible, however it is a pretty long script. Unfortunately, I don't have enough time to write it here now.

4. I never used VCMI so I can't help you here.

5. Yes, there are ERM commands that deal with just that.
This will set Orrin's specialty to Town Portal:

!!HE0:X3/9; (change the effect of specialty)
!!UN:G2/0/1/325; (set small specialty picture)
!!VRz734:S^Orrin is a boss at Town Portal^;
!!UN:G2/0/2/734; (set specialty descrption)
!!UN:G2/0/3/325 (set big specialty picture)
** Note: I picked a random z-var, but you should make sure it doesn't conflict with other scripts

I never tested this, so there may be mistakes, but I hope you got the idea. Use HE:X and UN:G2 to do it.
____________
"If you get scared of doing what's right you might as well lay down and die" - Wulfstan, Heroes of Might and Magic V: Hammers of Fate

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


Admirable
Omnipresent Hero
Wog refugee
posted September 30, 2018 05:35 PM

Town portal. From tons of appropriate spells, you picked town portal as specialty

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

Tavern Dweller
posted September 30, 2018 06:06 PM

Salamandre said:
Town portal. From tons of appropriate spells, you picked town portal as specialty


Oops! I just picked a good spell without thinking that the specialty will not affect it in any way. Btw, is there a specialty pic for Lightning Bolt?
____________
"If you get scared of doing what's right you might as well lay down and die" - Wulfstan, Heroes of Might and Magic V: Hammers of Fate

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


Promising
Supreme Hero
posted November 17, 2018 06:47 PM
Edited by Hero_of_Light at 19:36, 17 Nov 2018.

Is there a way to make a town's dwelling to give a random creature each week?

I want to make the Wolf Pen in Stronghold (the unupgraded one) sell a random 2nd level upgraded creature between the good and Neutral (meaning, Marksman, Battle Dwarf, Gargoyles, Wolf Riders and Lizardmen).

This will be a universal command, applying on all Strongholds. Before the week starts, all Strongholds will get the same random 2nd level creature (in the non-upgraded slot). The upgraded slot will work normally.

Is that possible?

I am able to work with random creatures but they are all the one after the other and I don't know how to make it specific. Can someone help me?

!#TM91:S1/999/7/255; [timer 91, every week]

!?TM91;
!!VRy1:S10 R5; [creatures]     ***Stronghold new
!!UN:T6/1/0/y1; [random]     ***Stronghold new

____________
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 November 17, 2018 11:52 PM

ZVSE

!#TM91:S1/999/7/255; [timer 91, every week]

!?TM91&1000;
!!VRv3:C3/17/31/87/101; creatures ID to pick from
!!VRy1:S3R4;
!!UN:T6/1/0/vy1;

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


Promising
Supreme Hero
posted November 18, 2018 01:02 AM

Thanks, it worked

Do you think it possible to have it make random for both regular and upgraded version of the dwelling? But have a check so that the same creature cannot be placed twice, meaning:

!#TM91:S1/999/7/255; [timer 91, every week]

!?TM91&1000;
!!VRv3:C3/17/31/87/101; creatures ID to pick from
!!VRy1:S3R4;
!!UN:T6/1/0/vy1;
<--------- check what value vy1 has and give another valid one
!!UN:T6/1/1/vy1;

Do you think that can be done?
____________
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 November 18, 2018 10:09 AM
Edited by Salamandre at 10:17, 18 Nov 2018.

ZVSE

!#TM91:S1/999/7/255; [timer 91, every week]

!?TM91&1000;  #1
!!VRv3:C3/17/31/87/101; creatures ID to pick from   #2
!!VRy1:S3R4;     #3
!!UN:T6/1/0/vy1;   #4
!!VRy2:S3R4;      #5
!!SN&y2=y1:G5;  return to #5 until y1<>y2
!!UN:T6/1/1/vy2;

If you add any line to this script before SN:G, increase its value G5 from #5 to number of lines added (check erm help for details)

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


Promising
Supreme Hero
posted November 18, 2018 10:45 AM

It doesn't work as planned.

In day one of each week, one of the slots is set back to the original (wolf riders and not raiders that are on the list) and then on day two, the script kicks in but there was a time where you got the same creature twice.

I think I found a solution. What If I removed the Lizard Warrior out of the formula and have it appear ONLY when y1=y2. This way it will be always random and they can't be the same. Can you help me with the missing command?

!?TM91&1000;  
!!VRv3:C3/17/31/87; creatures ID <------ I removed creature 101
!!VRy1:S3R3;     #3
!!UN:T6/1/0/vy1;   #4
!!VRy2:S3R3;      #5
<--------------------Here add a check, if y2=y1 set y2 to 101
!!UN:T6/1/1/vy2;

____________
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 November 18, 2018 10:56 AM

My script works if added as I wrote it. If you add it to another timer or if there are any other lines before, it will not work, as SN:G command asks for precise number of lines to count. I tested it and is okay.

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


Promising
Supreme Hero
posted November 18, 2018 11:04 AM

I think you're right, I didn't add the 1000 in the timer. What does it do exactly?
____________
Not idly do the leaves of Lorien fall.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Jump To: « Prev Thread . . . Next Thread » This Popular Thread is 356 pages long: 1 2 3 4 5 ... 70 140 210 280 350 ... 352 353 354 355 356 · «PREV / NEXT»
Post New Poll    Post New Topic    Post New Reply

Page compiled in 0.1564 seconds