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 ... 107 108 109 110 111 ... 150 200 250 300 350 400 407 · «PREV / NEXT»
JimV
JimV


Responsible
Supreme Hero
posted October 24, 2011 06:39 PM

In the 3.58f ERM Help, the last note under the !?BA trigger says:

Note:You may use indirect reference to heroes (copies of info):
!!HE-10:... apply changes to the copy of attacker hero info.
!!HE-20:... apply changes to the copy of defender hero info.

I have used this successfully in a couple scripts.  This note seems to have been removed from the 3.59/Era ERM Help.  Thanks, Solitaire345, for restoring this information.

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


Promising
Famous Hero
posted October 24, 2011 07:48 PM

Indeed I first thought that this functionality is too useful to be hidden and searched in the triggers page, but didn't find anything.
By the way, did You make some additions to your version of ERM help? I wasn't following the thread very actively so it might be that I missed some update.
____________

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


Responsible
Supreme Hero
posted October 24, 2011 08:09 PM
Edited by Hero_of_Light at 20:21, 24 Oct 2011.

First of all, thank you very much solitaire345!!
Excellent work indeed.

Secondly, i want to share an idea i've been having some days now about the werewolves and solitaire was kind enough to make it work.

As you might know the werewolves have the abbility to transform the attacked stack into werewolves and had berserk on full moon. I for one (and that's only my opinion mind you) liked the concept (it was true to the werewolf mythology) but thought it didn't work well on the game. The change to transform was way to big (20% and 40% on full moon) and the bererk would mean that you had a bomb near your troops on full moon. FMPOV the werewolves were creatures to be avoided (whether you had them in your army or you were facing them on battle) and so i made them interchangeable with the Cerberi (and always chose Cerberi).

Eventually, OxFea gave me the ERA GOODIES (as i call them) commants to disable those abbilities. Now the werewolves were blank. So, i had to come up with new abbilities and this is how it will work.

The werewolves creatures on days that there isn't a full moon are humans (i named them Lycans, i may make it Lycanthrope in the future). That's actually how the myth goes anyway. They have low stats and Cerberi are way better and to be prefered:



I gave them a percentage of regenerating since the beast inside them helps them heal (infected though they may be). I also made them have hatred damage to Vampires (haven't you seen the Underworld movies? They're not that great but the concept was nice).

When there's full moon the human formed Lycans become Werewolves. They change as much in appearance as in abbilities (note the day in the next image):



That's also compatible with the Werwolf myth. On full moon the humans that are bitten by wolves are transformed. They also gain strenght of course. I changed the attributes and made them equal to the Vampire Lords ones. Note how much stronger the Werewolves become in this next image. In addition, they gain the double strike abbility and disease when in Werewolf form. This will actually work nice on my mod, since it adds more to the whole interchangeable creatures strategy. You can use Cerberi all the time but when there's full moon, you can exchange them for Werewolves that are much stronger. When the full moon is over, you can change back to cerberi.  



I don't really like those defs and will definetly change or edit the, in the future. I didn't like the original WOG def that much either and so if i find a cool werewolf def i will definetly use it. I saw in the HotA thread that Alex-Ander had made a great one but i don't think it likely to obtain it... ever.

So anyways, this is the script that makes all these things i described possible. Again, Solitaire did all the work. I merely edited the abbilities section. I do have some pointers to add though. First of all this doesn't change the original Lycanthropy abbilities of the original werewolves so if you want to keep them you can use it all the same. Secondly, note that when you give a monster flag abbility when in werewolf form (for instance i gave them two squares instead of one) that will be likely to make the creatures malfunction. So i added some crutial monster flag removal commands when on human form. Thirdly, in order for this work you will have to add a def for when the creature has its human form. I named it CWEREW.def and placed it in H3Sprite.lod but you can name it anyway you want (just change the name of the appropriate command as well).

ZVSE
**Script for changing werewolf's def and sound on full moon. ERA 1.9 or higher

!#TM1:S1/999/1/255; create timed event that occurs to everyone and everyday.

!?TM1;
!!VRy2:Sc; Get current game day
!!VRy2:%28; Get day of month
!!VRz1:S^CWEREW.def^; Human form def
!!VRz2:S^PIKE^; Human form sound
**Human form attributes
**Creature name
!!VRz603:S^Lycan^;
!!UN:G1/194/0/603; [Set description]
!!VRz639:S^Lycans^;
!!UN:G1/194/1/639; [Set description]
**clear Experience attributes
!!EA194:B0/0/////////////;
!!EA194:B1/0/////////////;
!!EA194:B2/0/////////////;
!!EA194:B3/0/////////////;
!!EA194:B4/0/////////////;
!!EA194:B5/0/////////////;
!!EA194:B6/0/////////////;
!!EA194:B7/0/////////////;
!!EA194:B8/0/////////////;
!!EA194:B9/0/////////////;
!!EA194:B10/0/////////////;
!!EA194:B11/0/////////////;
!!EA194:B12/0/////////////;
***set new abilities***
!!EA194:B0/1/114/50/20/20/20/20/20/20/20/20/20/20/20; //regeneration
!!EA194:B1/1/104/62/5/5/5/5/5/5/5/5/5/5/5; //hatred
!!EA194:B2/1/104/63/5/5/5/5/5/5/5/5/5/5/5; //hatred
!!MA:L194/2; //set monster level
!!MA:G194/6; [Growth]
!!MA:A194/8; [attack]
!!MA:D194/8; [defense]
!!MA:M194/3; [min dmg]
!!MA:E194/4; [max dmg]
!!MA:C194/6/250; [cost Gold]
!!MA:P194/20;   Health
!!MA:S194/6;   Speed
**clear some monster flags when transforming back
!!MA:X194/?v300;
!!VRj:Sv300 &1*-1 +v300;
!!MA:X194/j;
!!MA:X194/?v300;
!!VRj:Sv300 &2*-1 +v300;
!!MA:X194/j;
!!MA:X194/?v300;
!!VRj:Sv300 &4*-1 +v300;
!!MA:X194/j;
!!MA:X194/?v300;
!!VRj:Sv300 &8*-1 +v300;
!!MA:X194/j;
!!if&y2=>14/y2<=16:; If full moon
!!VRz1:S^ZM194Z.DEF^; Wolf form
!!VRz2:S^HGWR^; Wolf sound (the default wolf's sound is actually the one used by monk so i made it use the Wolf Raider one)
***wolf attributes
**clear Experience attributes
!!EA194:B0/0/////////////;
!!EA194:B1/0/////////////;
!!EA194:B2/0/////////////;
!!EA194:B3/0/////////////;
!!EA194:B4/0/////////////;
!!EA194:B5/0/////////////;
!!EA194:B6/0/////////////;
!!EA194:B7/0/////////////;
!!EA194:B8/0/////////////;
!!EA194:B9/0/////////////;
!!EA194:B10/0/////////////;
!!EA194:B11/0/////////////;
!!EA194:B12/0/////////////;
***set new abilities***
!!EA194:B0/1/114/50/20/20/20/20/20/20/20/20/20/20/20; //regeneration
!!EA194:B1/1/104/62/5/5/5/5/5/5/5/5/5/5/5; //hatred
!!EA194:B2/1/104/63/5/5/5/5/5/5/5/5/5/5/5; //hatred
!!EA194:B3/1/97/73/20/20/20/20/20/20/20/20/20/20/20; //disease
!!EA194:B4/1/102/68/1/1/1/1/1/1/1/1/1/1/1; //double strike
!!MA:L194/2; //set monster level 524288
!!MA:X194/?v300;
!!VRj:|1; **two spaces
!!VRv300:+j;
!!MA:X194/v300;
!!MA:G194/6; [Growth]
!!MA:A194/10; [attack]
!!MA:D194/10; [defense]
!!MA:M194/5; [min dmg]
!!MA:E194/8; [max dmg]
!!MA:C194/6/250; [cost Gold]
!!MA:P194/40;   Health
!!MA:S194/9;   Speed
!!VRz603:S^Werewolf^;
!!UN:G1/194/0/603; [Set description]
!!VRz639:S^Werewolves^;
!!UN:G1/194/1/639; [Set description]
!!en;
!!SN:K12/9597928/7894504/1; overwrite def name with z1
!!SN:K8/9598440/7894496/1; overwrite sound name with z2

____________
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 October 24, 2011 10:04 PM

Werewolves and wolves are different creatures. I know you don't like ripped animations, but this is a werewolf.

____________
Era II mods and utilities

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


Responsible
Supreme Hero
posted October 24, 2011 10:05 PM

@Solitaire345,

My last update post was on October 21, near the end of the previous page of this thread.  The notes for the UN6/1 command said that hired Commanders cost 100 gold, which I changed to 1000 gold (which is what I see on my system).  I also found some typos in the Tutorials, which I listed at the end of my revision notes README.

Just to pad out this post a little, I will describe the following analogy which occurred to me.  It seems to me that some (not all) of the questions I see here are like people going to a carpenter and asking if he can tell them how to make a fancy palace, like the ones they saw in their dreams.  The carpenter tries to tell them, first you must learn how to use a hammer and nails, then a saw, then a drill, and so on.

The ERM Help describes a lot of script tools and how to use them.  Like everything else, it takes a bit of time and practice to learn them.  Once they have been learned, you can build almost any kind of Palace of Dreams, to your own specifications (and you are usually the only person who knows exactly what kind of palace you want).

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


Promising
Famous Hero
posted October 26, 2011 09:26 PM

Indeed. I see such behaviour in a lot of situations around me.. Majority of people want to get the profit without any or just a litle of hard work (although I admit, sometimes I do the same..)

Back to ERM: I have fixed Format SI (Spell animations). Previously it listed only a part of spell animations and some numbers were wrong. I have also fixed wrong link in BM:V descripion (it led to Format AC, which was a partial duplicate of Format SI). Download

While writing this list I found several unused spell animations: one named sp13_.def isn't referenced anywhere in the exe file. It seems much more logical to me that "Death stare" spell would use this one instead of it's current animation, which seems like a special ability of ghosts.
Another def that isn't used in the code is C13SPF0.DEF - an animatio  similar to fireball, but a bit longer.

Also when is the animation "poof.def" used? I vaguely remember seeing it, but couldn't remember what spell used it and didn't have the time to test them all.

____________

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


Admirable
Omnipresent Hero
Wog refugee
posted October 26, 2011 10:21 PM

Well yes, but when you have no idea how is working, getting a script for free and which works well could be the trigger for further curiosity and personal investment. Although statistics show that one time lurkers asking for one script never continue the work.

Thanks for animations, there are a lot new I see. Would it be possible in the future to make a stand alone with all revised ERM help, not just updates? Just in case Bers finishes his 1.91 translation and may (if he wants to) include in the package.

Some examples using new code show the header command sightly moved to right. Is this intended or simply an accident?

Like in MR:

         !?FU29999; Get mon ID ;vx1 - stack (init=-1)
!!UN:C42147184/4/?y1;
____________
Era II mods and utilities

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


Promising
Famous Hero
posted October 26, 2011 10:28 PM

Would it be possible in the future to make a stand alone with all revised ERM help, not just updates?

I'll make one when I'll have some time.

Some examples using new code show the header command sightly moved to right. Is this intended or simply an accident?

Uhh. That one seems to have been caused by a <tab> character in the first line.

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


Admirable
Omnipresent Hero
Wog refugee
posted October 31, 2011 10:05 PM
Edited by Salamandre at 22:07, 31 Oct 2011.

Is there a safe way to get infos about a CB guards? This script gives errors once in 3-5 clicks, no idea why:

!?CM0;
!!CM:P?y1/?y2/?y3;
!!OBy1/y2/y3:T?y4 U?y5;
!!FU&y4<>16/y4<>84/y4<>24/y4<>85/y4<>25:E;  if not a CB, exit
!!CBy1/y2/y3:T?y6; check if taken
!!FU&y6=1:E; exit if taken
!!VRy7:Sy4; !!VRy8:Sy5; type&subtype
!!if&y7=16:;
!!if&y8=0:; cyclop stockpile
!!CBy1/y2/y3:G0/95/?y9;
!!VRy10:Sy9*5;
!!IF:Q1/21/95/4^ {Cyclops Stockpile}
Guarded by %Y10 Cyclops kings^;
!!CM:R0; disable next message
!!en:;
[...]
!!en:;


____________
Era II mods and utilities

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


Responsible
Supreme Hero
posted November 01, 2011 01:56 AM

I'll hazard a guess:  if you are also using SN triggers in the same map, especially one to monitor for keypresses, and one of them uses y1, y2, or y3, then the CB location values may be getting changed by an SN trigger between the times when you read them with CM and the time you try to apply them in the CB command.  This is because some of the SN commands (specifically the one which monitors keypresses) can interrupt other triggers which are in progress.  I mentioned this in my "ERA glitches" report (although it is a feature, rather than a glitch, provided you are aware of it).  The solution is to use unique y-numbers in the SN commands, such as y41 instead of y1, etc..

In any case, add an IF:M to print out the y-values just before the CB command and you will see what is happening.

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


Known Hero
posted November 01, 2011 02:27 AM

I was not going to publish this question, but i cannot do the idea that i have in mind

so my script is this

!?FU703;
!?BA0;
!!BA:H0/?v700; [get attacking hero's number]
!!BA:H1/?v701; [get defending hero's number]
!?BG0;
!!BG:A?y1;
!!FU&y1<>1:E; attack
!!BH0:C?y5/49/3/1;
!!FU&y5<>17:E;
!!HEv700:A2/50/0/?y6; Check for Crest of valor
!!FU&y6<>1:E;
!!IF:V70/1;
!!HEv700:Fd/d/10/d;   give more power to hero.
!!IF:V70/0:
!!HEv700&-70:Fd/d/d/d;

but what happens?

- the spell was not checked
- the spell was casted with the original spell power and not with 10.

but the idea is:

- battle begin
- Hero cast spell, if not exit
- Check if spell is lightning bolt, if not exit
- Check if hero have artifact 50, if not exit
- Change temporally spell power to 10
- light bolt is casted, but with a power of 10
- restore the original attributes of hero

thanks for the time




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


Responsible
Supreme Hero
posted November 01, 2011 04:20 AM
Edited by JimV at 04:37, 01 Nov 2011.

Quote:
...
!?BG0;
!!BG:A?y1;
!!FU&y1<>1:E; attack
!!BH0:C?y5/49/3/1;

This command will not work.  ERM Help (WoG 3.58f version) gives this description for the BH:C command:

C#1/#2/#3/#4; Cast a spell
  #1 - Spell number (See Format SP)
  #2 - Position to cast
  #3 - Hero Skill level (0...3)
  #4 - Check 4 Target Monster existing (alive)

As explained elsewhere in ERM Help, #-parameters can only be set, not gotten with ? ($-parameters can be set or gotten).

The command you want is at the end of the BG receiver help:

S$; Number of a Spell to Cast (See Format SP)
Comments:
If a monster casts a spell before an action (enchanter magic or Troll resurrection), it goes before trigger.
You can only get the spell number (BG:S?__) for a Hero cast (A=1). For a creature cast (A=10), the returned value is always -1.

That is, use !!BG:S?y5; to get the Hero's spell number.  (Note the spell number is a $-parameter).  You will also need BG:Q? to see which side is casting the spell.
Quote:

!!FU&y5<>17:E;
!!HEv700:A2/50/0/?y6; Check for Crest of valor


The HE:A3 help says:

A2/$1/$2/$3 - Calculate numbers of an artifact (get or check)
  $1 - Number of artifact. (see Format A1).
  $2 - Returns number of artifacts of the type hero has (get or check syntax)
  $3 - Returns the numbers of equipped artifacts of the type (get or check syntax)

This means parameters 2 and 3 should always be of the form ?(variable), e.g., ?y7/?y6;  With 0 for the $2 parameter you are trying to set (not get) the number of artifacts of type 50 which the Hero has to zero.  Probably Slava checks for this and does not allow it, so no harm was done, but why not follow the ERM Help instruction?
Quote:

!!FU&y6<>1:E;
!!IF:V70/1;


This statement sets flag 70 to 1, but before the flag is used it is set to zero again below, making the above command useless.
Quote:

!!HEv700:Fd/d/10/d;   give more power to hero.
!!IF:V70/0:
!!HEv700&-70:Fd/d/d/d;


As explained in ERM Help, "d" (with no number after it) means "add nothing", so the above three commands will always add 10 to Hero v700's spell power, then add  nothing to it (if the trigger has not been exited by one of the FU:E's previously).  If you want to restore the previous spell power, you need HE:Fd/d/d-10/d - however, if you do both within the same BG0 trigger, the Hero's spell power will be at its original value when the spell is cast.  The sequence should be:

!?BG0; before spell cast
Determine whether a Hero is casting a spell (BG:A?), whether the spell is Lightning (BG:S?), and which Hero is casting (BG:Q?).  If all conditions are correct and the Hero has the artifact equipped, set flag 70 to 1 and increase the Hero's SP by 10.

!?BG1&70; after spell cast
Decrease the same Hero's SP by 10 (you will have to have another permanent variable which is set under BG0 to tell which Hero it is - probably the BG:Q? value), and set flag 70 to zero.

I am not 100% sure that the change in Hero SP will take effect soon enough to be included in the spell damage (some changes only take effect during the next turn, not the current turn).  If not, there is an alternate way to do this using the !?MR1 trigger and MR receiver.  I believe I posted an example of this previously on this thread (several pages back).  But test this method first, and during testing, use IF:M commands to display all the variable and flag values (spell number, etc.) at the end of each trigger.  These will let you see what is happening.  Once the script is working you can remove them or convert them to comments.  Good luck.

P.S. Another way to do this would be (assuming all conditions are met), cancel the Hero's cast with BG:A0, cast the spell directly using BH:C after increasing the Hero's SP, then restore the original SP after the BH:C command.  There would be no need for flag 70 or BG1 using this method - but you should also disable further casting by the Hero in that round with BH:M1.

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


Admirable
Omnipresent Hero
Wog refugee
posted November 01, 2011 06:23 AM
Edited by Salamandre at 06:50, 01 Nov 2011.

Quote:
the CB location values may be getting changed by an SN trigger


It wasn't the case, but eventually I found the "bug": the mouse cursor trigger cyclops stockpile hint on x/y/z but also on x/y-1/z or x+1/y/z, while the cursor changes to arrow.


Problem solved by adding a check for yellow square. Obligatory for >1 cell objects.
____________
Era II mods and utilities

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


Known Hero
posted November 01, 2011 01:37 PM

Quote:


P.S. Another way to do this would be (assuming all conditions are met), cancel the Hero's cast with BG:A0, cast the spell directly using BH:C after increasing the Hero's SP, then restore the original SP after the BH:C command.  There would be no need for flag 70 or BG1 using this method - but you should also disable further casting by the Hero in that round with BH:M1.



i was done all the suggestions that you have made me, but unfortunately the hero casts a spell with original spell power, and not only in the turn, also the entire battle.. the MR receiver is well but my idea is try with resurrection spell.. Thanks anyway

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


Admirable
Omnipresent Hero
Wog refugee
posted November 01, 2011 02:15 PM

There are much easier ways, if you use ERA. Modify the spell power (SS:P) on human turn, it will accord to hero spell power as well. Advantages: the spell damage is correctly displayed, unlike in MR, and it works for all battles.
____________
Era II mods and utilities

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


Known Hero
posted November 01, 2011 03:08 PM

Quote:
There are much easier ways, if you use ERA. Modify the spell power (SS:P) on human turn, it will accord to hero spell power as well. Advantages: the spell damage is correctly displayed, unlike in MR, and it works for all battles.


SS:P? what receiver is this?, i don't see it . ( ERm Help 2.81)

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


Admirable
Omnipresent Hero
Wog refugee
posted November 01, 2011 03:22 PM

It is spell modifier, try this:

ZVSE

!?BA0;
!!SS17:P?v47; get LB initial power
!!VRv48:Sv47+10; LB modifier
!!BA:H0/?v700; [get attacking hero's number]
!!BA:H1/?v701; [get defending hero's number]
!!HEv700:A2/50/?y1/?v45;
!!HEv701:A2/50/?y1/?v46;

!?BG0;
!!BG:Q?y1;  get side
!!SS17&y1=0/v45=1:Pv48; increase LB if crest left side
!!SS17&y1=0/v45=0:Pv47; reset
!!SS17&y1=1/v46=1:Pv48; increase LB if crest right side
!!SS17&y1=1/v46=0:Pv47; reset

On the turn of crest of valor owner, lightning bolt will receive +10 power. Will reset on other player turn. If I recall right, the modified value does not show in book on your first unit turn, only starting with second. It may be a fix for that, did not work on.
____________
Era II mods and utilities

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


Known Hero
posted November 01, 2011 03:27 PM

Quote:
It is spell modifier, try this:

ZVSE

!?BA0;
!!SS17:P?v47; get LB initial power
!!VRv48:Sv47+10; LB modifier
!!BA:H0/?v700; [get attacking hero's number]
!!BA:H1/?v701; [get defending hero's number]
!!HEv700:A2/50/?y1/?v45;
!!HEv701:A2/50/?y1/?v46;

!?BG0;
!!BG:Q?y1;  get side
!!SS17&y1=0/v45=1:Pv48; increase LB if crest left side
!!SS17&y1=0/v45=0:Pv47; reset
!!SS17&y1=1/v46=1:Pv48; increase LB if crest right side
!!SS17&y1=1/v46=0:Pv47; reset

On the turn of crest of valor owner, lightning bolt will receive +10 power. Will reset on other player turn. If I recall right, the modified value does not show in book on your first unit turn, only starting with second. It may be a fix for that, did not work on.


thanks for the time but in my help the receiver is this one


SPELLS SUPPORT  (SP)
RECEIVER

The SP Receiver lets you change parameters of spells.

and you use SS... is wrong the help or the receiver is other ? :S

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


Admirable
Omnipresent Hero
Wog refugee
posted November 01, 2011 03:36 PM

SP is typo (SS), get the latest ERM help uploaded in this thread by Solitaire.
____________
Era II mods and utilities

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


Responsible
Supreme Hero
posted November 01, 2011 08:18 PM bonus applied by Cepheus on 02 Nov 2011.
Edited by JimV at 20:20, 01 Nov 2011.

In WoG 3.58f, this works in my tests:

ZVSE

* test 2 of mister_kalu's HC problem
* Change Hero's Power during battle via UN:C

!?BA0;
!!BA:H0/?v700; [get defending hero's number]
!!BA:H1/?v701; [get defending hero's number]
!!HEv700:A2/50/?y1/?v45;
!!HEv701&v701>-1:A2/50/?y1/?v46;
!!UN:C6919482/2/?v703;
!!VRv703:*65536+343028; side 0 Power (WoG 3.58f)
!!VRv704:Sv703+4; side 1 Power

!?BG0;
!!BG:Q?v702 A?v2 S?v3 D?v4;  get side, action, spell, target hex
!!FU|v2<>1/v3<>17:E; exit if not Hero casting LB
!!FU&v702=0/v45<1:E; exit if Hero doesn't have artifact
!!FU&v702=1/v46<1:E; exit if Hero doesn't have artifact
!!UN&v702=0:Cv703/4/d10;
!!UN&v702=1:Cv704/4/d10;
!!IF:V70/1;

!?BG1&70;
!!IF:V70/0;
!!UN&v702=0:Cv703/4/d-10;
!!UN&v702=1:Cv704/4/d-10;

It appears that once a battle has started (under !?BF and later), changing the Hero's Power has no effect on spell damage, which is determined based on the Power which the Hero had after !?BA0.  I know that the Hero's Spell Points can be changed in battle, so this was a surprise to me.  I haven't checked to see if it applies to Attack and Defense skill also.

Since changing the Hero's properties doesn't change spell damage, it follows that the Power for each side must be stored somewhere else in memory after BA0, so it became a question of finding out where these values are stored.  With some experimenting, I found the UN:C addresses used above, for side 0 (v703) and side 1 (v704).  (These addresses probably are different under Era - I haven't tested under Era.)

With the above script the Hero's shown Power does not change, but the spell damage is calculated with the new (+10) value and the amount of damage is displayed in the battle messages correctly.  However, if you right-click the Lighting Bolt icon in the Spell Book, it shows the damage due to the original Hero Power.  If this is a problem, then the Hero's Power must also be changed, since the right-click number is based on the Hero, not on the stored UN:C values - however, the BG0 trigger will not be executed until the player actually clicks on a spell target, so the only way to show the proper damage in the Spell Book is to check a flag, and if it is zero, cancel the spell (with a message like, "Oh wait, I see you have the Crest of Valor, let me adjust your Power, then please try again", then do the HE:fd/d/d10/d stuff, set the flag, and exit; whereas if the flag is 1, simply reset it to zero and exit.  That is probably a lot more trouble than correcting the Spell Book damage would be worth.

 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 ... 107 108 109 110 111 ... 150 200 250 300 350 400 407 · «PREV / NEXT»
Post New Poll    Post New Topic    Post New Reply

Page compiled in 0.7000 seconds