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 ... 161 162 163 164 165 ... 200 250 300 350 400 407 · «PREV / NEXT»
JimV
JimV


Responsible
Supreme Hero
posted September 17, 2012 05:01 PM
Edited by JimV at 17:08, 17 Sep 2012.

I would have applied the bonuses under BF, because ERM Help says that BM (stack) commands should not be used until the first BR trigger (which occurs for round -1 before BF).  This implies to me that stack data has not been fully set up prior to BR(-1).

There are hundreds of ways to do things in ERM, so here is an alternate way to double properties, without a DO (although the use of a DO and indexed variables was impressive and is a technique which will be useful in many other cases):

!!BMx16:A?v9669 D?v9670 S?v9671;   check stats
!!BMx16:H?v9672 U1/?v9673 U2/?v9674;
!!BMx16:Adv9669 Ddv9670 Sdv9671;   double stats
!!BMx16:Hdv9672 U1/dv9673 U2/dv9674;

Note that this doubles (basic stat + bonus for terrain, Hero, etc.).

Note also, if you apply a change to a stack's EA:B properties during battle, since those properties include Attack, Defense, etc., the stats for that stack will be recalculated which may interfere with previous changes.

(I have encountered similar problems, enabling me to speak from experience.)

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


Admirable
Omnipresent Hero
Wog refugee
posted September 17, 2012 07:09 PM
Edited by Salamandre at 19:28, 17 Sep 2012.

Thanks, I used both BF and your double stats technique (I must be blind to not have seen such obvious thing) still the damage gets variable bonus from battle to battle (on reload). Is the only stat which is not correct.
____________
Era II mods and utilities

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


Responsible
Supreme Hero
posted September 17, 2012 07:38 PM
Edited by JimV at 19:45, 17 Sep 2012.

I did not expect the "d" technique to work better (just an alternate way of doing the same thing which is slightly less complicated), but I did expect using BF to be an improvement, because I have seen problems due to trying to alter stack properties under BA0 before.  Also I have seen problems with using EA:B changes in combination with BM changes, even under BF (the order is critical).

Nothing else that is obvious occurs to me.  I noticed that eight stacks are being checked, and I think that troop slots go into the first seven stacks, so I wonder if you are allowing for a Henchman which is a Crusader type.  (I think a Commander would be the next stack after all non-empty troop slots are assigned stack numbers.)  Whether seven or eight stacks are checked should also not have any effect on Crusaders (troops), but I just wonder what else might be going on in the map which might interfere with the script.

The Yona mod affects Crusaders, but I don't know enough about it to know if it could interfere (probably not).  I used a Crusader in "The King in Yellow" but did not notice Yona having any effect on the scripts (but it makes that game easier if you always Defend with the Crusader).

Without more data (or perhaps even with), my speculations are not apt to be fruitful.  In your place I would do some tests in which I displayed the Crusader properties at BF and each round (it can be done even under BR(-1) with a command which waits for an "Enter" keypress, using Bersy's EVME program to display the v-variables).  Probably you are doing this already.  I would test with and without Yona - well, you know the drill.

I am assuming that you are reloading and refighting the exact same battle, on the same terrain/map-square, in your tests.

P.S. Probably not relevant, but in case it is:  I have also seen problems when creatures are added to or substituted for the troops which a Hero has at the start of a battle.  It is possible for Heroes to get confused and have the stack properties be a mixture of the original and replacement creature properties - depending on how the replacements are done.

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


Admirable
Omnipresent Hero
Wog refugee
posted September 17, 2012 07:41 PM
Edited by Salamandre at 19:46, 17 Sep 2012.

Yes, I am not using any EA change for crusaders and all tests are processed on same tile and same experience level. I will try to test now by checking value before and after.

@Edit: I found the reason, I feel so sorry for the hassle. Hero has combo which randomly adds a bonus to the damage. Totally forgot about that one, was focused on ERM issue
____________
Era II mods and utilities

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


Supreme Hero
posted September 17, 2012 07:47 PM

This might be a dumb question, but is it possible to make it so that, for an example, Gargoyles can be upgraded (to Obsidian Gargoyles) in Castle, if the upgraded Archer Tower is built? I searched ERM help but couldn't find any help. It's been so long since I used ERM I basically know nothing
____________

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


Legendary Hero
walking to the library
posted September 17, 2012 07:52 PM

Universal creature upgrades-Wog menu option.
____________
"I heard the latest HD version disables playing Heroes. Please reconsider."-Salamandre

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


Responsible
Supreme Hero
posted September 17, 2012 08:08 PM
Edited by JimV at 20:15, 17 Sep 2012.

Also, look at UN:T in ERM Help.  Changing Town creatures is done in several WoG maps, such as "Alexander the Great", "The Dragon Slaughter", and "The Dragon Peaks Era Mod" (well, I guess that last one is not really a classic), so you could look at their scripts for examples.

What the heck, I'll add an example, from "Before the Rings III", since more than UN:T is involved (check the commands in ERM Help):

** "New Rampart Town" by JHV
** For map B.T.R.III The Black Towers
** Oct. 17, 2007

!#UN:T1/2/0/19; [level 2 no upg - Grand Elves]
!#UN:T1/2/1/137; [level 2    upg - Sharp Shooters]
!#UN:T1/4/0/23; [level 4 no upg - Dendroid Soldierss]
!#UN:T1/4/1/193; [level 4    upg - Sorceresses]
!#MA:U18/19U19/137; [upgrade Wood Elf to Grand Elf to Sharp Shooter]
!#MA:U22/23U23/193; [upgrade DG to DS to Sorceress]
** [these creatures count as being Rampart troops](for Morale):
!#MA:O137/1; Sharp Shooters
!#MA:O193/1; Sorceresses
** Growth Rates
!#MA:G19/7; [GE Grow rate]
!#MA:G137/7; [SS Grow rate]
!#MA:G23/3; [DS Grow rate]
!#MA:G193/3; [S Grow rate]
** Costs
!#MA:C137/6/250; [SS cost 250 gold]
!#MA:C193/6/450; [Sorceress cost 450]

P.S. - Oh, I misunderstood, thinking you wanted to change a Town's Creatures, not just upgrade them.  That is more complicated, but as master_learn mentioned, there already is a WoG script for that.  Probably it does things similar to the above script on the fly, then changes back to the defaults after the upgrade.

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


Promising
Famous Hero
of infamy
posted September 17, 2012 08:16 PM

Yes that is exactly what the script does

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


Supreme Hero
posted September 17, 2012 08:32 PM

Thanks to all, forgot about the universal upgrades

The script is perfect for my current project
____________

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


Famous Hero
posted September 23, 2012 12:25 AM

Iīm trying era 2 and I found the spell supports. However when I try the following.

ZVSE
!?PI;
!!IF:M^Post Instr^;
!!SS27:F0x00000040/0;

It crashes saying it cannot read memory.
Whatīs wrong?

Also Itīs possible to edit the cost of heroes?

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


Promising
Famous Hero
of infamy
posted September 23, 2012 01:07 AM

Correct:

!!SS27:F40;

I'm sure you can edit hero cost, don't recall where... one of the text files.

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

Tavern Dweller
posted September 23, 2012 01:15 AM

Finding week of month and day of week


The instructions in the manual don't work for me.


c stores the current day- it does not store month/week/day. Thus, the 4th day of month 2 week 3 is stored as 46, as it is the 46th day of the game. If you need the month or week of the map, you can find them this way (and store in v1):
Month: !!VRv1:Sc+27:28;
Week: !!VRv1:Sc+6:7;
Week of the month: !!VRv1:Sc+6:7%4+1;
Day of the week: !!VRv1:Sc%7+1;



That code didn't work for me. For week of the month and day of the week to work I needed to use:


!!VRy5:Sc+6:7+3%4+1;
!!VRy6:Sc+6%7+1;



Is this a typo in the manual or am I not understanding something?




____________

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


Famous Hero
posted September 23, 2012 08:47 AM

Quote:
Correct:

!!SS27:F40;

I'm sure you can edit hero cost, don't recall where... one of the text files.


Thanks, however all it does is making the spell not ycopy in spellboks.
My intention was to unflag it as a spell with mass effect at expert level , so at expert level it isnt a mass spell, but i failed to do so.

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


Admirable
Omnipresent Hero
Wog refugee
posted September 23, 2012 09:01 AM
Edited by Salamandre at 09:08, 23 Sep 2012.

ZVSE

;set shield to single target
!?PI;
!!SS27:F?y1;
!!VRy1:&-65;
!!VRy1:|16;
!!SS27:Fy1;

Quote:

!!SS27:F0x00000040/0;



lol
____________
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 September 23, 2012 10:46 PM
Edited by Hero_Of_Light at 23:01, 23 Sep 2012.

Is there a command to change a heroes' portraits in ERA 2? I tried these:

!!HE27:L2^HPL027DR.pcx^; [set portrait]
!!HE27:L1^HPS027DR.pcx^;

And didn't work. I placed them on Data folder as well (although they could be found in the H3bitmap.lod. Is the process changed in ERA?

**EDIT**

I found it on the ERM help. What I wanted is to have the pic overridden in the Shadow of Death campaigns but as I found out custom hero portraits in maps cannot be changed by ERM commands. That's why it didn't work.

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


Responsible
Supreme Hero
posted September 24, 2012 02:39 AM
Edited by JimV at 14:11, 24 Sep 2012.

Quote:
Week of the month: !!VRv1:Sc+6:7%4+1; --> !!VRy5:Sc+6:7+3%4+1;
Day of the week: !!VRv1:Sc%7+1; --> !!VRy6:Sc+6%7+1;



Your version looks correct to me (good work).  As you probably know, you can edit the manual with a text editor.

I have always made my own equations rather than looking them up in the manual, so I never noticed these errors.  I guess the same was true of the WoG Team.  I start by subtracting one from the number of days, so that days, weeks, and months start with zero instead of one.  Then if I will be displaying a result I add one at the end of the calculation.

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

Tavern Dweller
posted September 25, 2012 02:46 AM

Quote:
Quote:
Week of the month: !!VRv1:Sc+6:7%4+1; --> !!VRy5:Sc+6:7+3%4+1;
Day of the week: !!VRv1:Sc%7+1; --> !!VRy6:Sc+6%7+1;



Your version looks correct to me (good work).  As you probably know, you can edit the manual with a text editor.





Thanks. Was racking my brain for a while. Learned a bunch about how scripts work with the extracted scripts directory. For a while I was hitting F11 thinking it would update the scripts in the map but it was extracting the scripts from the map. "Why won't my edits take"...

Then I realized I should have been hitting F12.

____________

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


Admirable
Omnipresent Hero
Wog refugee
posted September 25, 2012 02:43 PM

I am playing a random map with 99% of wog options enabled, just to track bugs and I end very early with TONS of artefacts on my heroes. So I thought adding another option to artificer, so he could buy my artefacts for either mithril or gold. But I got a problem, here is the script:

In bold my addition

** questions of artificer **
!!IF&1000/v160=1:G1/4118/2048/z126001/z126034/z126035/z126036/z126037/z126047///////z126038;
!!IF&1000/v160=2:G1/4118/2048/z126002/z126034/z126035/z126036/z126037/z126047///////z126038;
!!IF&1000/v160=3:M1/z126012;

!!FU&v4118=2048:E;
!!IF&v4118=16:Q1/7/0/6/0/1^Pal! Buddy! Glad to see you! C'mon in, c'mon in! Step into the light where I can see you better! - I buy your useless junk and give you  {~Cyan} MITHRIL{~} or {~Gold}GOLD{~} for! What a deal! Let's see whatcha got...^;
!!FU177&v4118=16:P;
!?FU177;
!!IF:V1/0;
!!VRv44:S0;
!!DO8800/40/44/1:P;
!!IF&v44=5:M^You have no artefacts in your backpack, so unless there's something else you want to take off and show me, I guess we won't be doing business today. No hard feelings though - come back anytime!^;

!?FU8800;
!!VRy1:Sx16-21;
!!HE-1:A1/?y2/y1;
!!VRv44|y2<1/y2>1000:+1; increase v44 if no artefact found in backpack slot
!!FU|y2<1/y2>=1000:E;
!!HE-1:A2/y2/?y3/?y4;
!!UN:Ay2/1/?y5;
!!VRy6:Sy5; set gold
!!VRy5::1000+2; set mithril
!!IF:Q1/7/0/6/0/10^What you want today for, gold or mithril?^; v1=1 will be mithril, v1=2 will be gold, escape/cancel v1=0
!!FU&v1=0:E; I can't get the script exit here, it pops up previous question 4 times before it exits, although pressing escape/cancel it gives me a value of v1=0
!!if&v1=1:;
!!IF:Q1/8/y2/7/y5/1^I will offer for it...let's say, {%Y5} mithril^;
!!HE-1:A3/y2/1/d-1;
!!OW:R-1/7/dy5;
!!en:;
!!if&v1=2:;
!!IF:Q1/8/y2/6/y6/1^I will offer for it...let's say, {%Y6} Gold^;
!!HE-1:A3/y2/1/d-1;
!!OW:R-1/6/dy6;
!!en:;
!!IF:M^Bwahaha. Everything goes according to my plan. I mean, uh, thanks! Pleasure doing business!^;
!!FU177:P;


Can't find where it bugs...
____________
Era II mods and utilities

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


Honorable
Supreme Hero
posted September 25, 2012 04:21 PM

Don't use v1 after dialogs. And in general, global variables. Key event occurs often and v1 is not only used everywhere, but also serves as result of calling external functions in Era.

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


Admirable
Omnipresent Hero
Wog refugee
posted September 25, 2012 04:26 PM

I already considered that, and used other variables as well, yet I get the dialog several times before exit. I think it has to do with further dialogs, checking but no success until now...
____________
Era II mods and utilities

 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 ... 161 162 163 164 165 ... 200 250 300 350 400 407 · «PREV / NEXT»
Post New Poll    Post New Topic    Post New Reply

Page compiled in 0.5220 seconds