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 ... 196 197 198 199 200 ... 250 300 350 400 407 · «PREV / NEXT»
Salamandre
Salamandre


Admirable
Omnipresent Hero
Wog refugee
posted March 27, 2013 05:13 PM

What does not work? I see 3 choices in test, wolf riders as third.
____________
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 March 27, 2013 05:19 PM

What I was trying to do is to have the goblins upgrade to Hobgoblins and these into Wolf Raiders without the universal upgrade script on. It works fine on my mod yes but ONLY because the universal upgrades is a prerequisite. I wanted to fix this and allow the third upgrade without this script.

Changing the town lineup when you click in the town hall is not the solution because no upgrade takes place there. I realized this now and that's why I told you never mind, it was a silly idea anyway.

The trigger must be set to when you click on the creature (in order to get a third upgrade). I don't know, I may think of another way.
____________
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 March 27, 2013 05:22 PM

Well you confused receivers, there is no CA:T for set creatures upgrades, but UN:T. Replace CA:T0/etc by UN&1:T[...]
____________
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 March 27, 2013 05:27 PM

Still, this won't have the result I am after. Thanks anyway.
____________
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 March 27, 2013 05:35 PM

Quote:
The trigger must be set to when you click on the creature (in order to get a third upgrade).


Yes, this is the way universal upgrades work. Get town type in CM trigger, get slot clicked, get creature in that slot, set special upgrade.


____________
Era II mods and utilities

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


Hired Hero
posted March 27, 2013 09:54 PM
Edited by Caagr98 at 21:56, 27 Mar 2013.

How do you find out those UN:C addresses? The ones I want to know are why Succubuses can only steal neutral stacks and Astral Spirits can only dismiss heroes' troops, and the amounts of troops they steal. But the most important thing is how I can find them by myself.

EDIT: Oh, and does anyone know how the AI decides what stack to attack?
And what happened to the HLL discussed at the five first pages?

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


Supreme Hero
Work at Magic Dimmension
posted March 29, 2013 11:15 AM

Would this script work?
Quote:

ZVSE

//Astromancy (Navigation) Bonus
!?BG0;
!!BG:A?y-99;
!!FU&y-99<>1:E; //hero cast a spell
!!BG:Q?y-1;
!!BHy-1:N?y-2;
!!HEy-2:S5/?y-3; //Astromancy (Navigation)
!!VRy-3:+1;
!!HEy-2:F?y-7/?y-8/?y-9/?y-10;
!!VRy-4:Sy-9 *y-3;
//Begin of spellpower routine
!!SS17y-4; //lighting bolt
!!SS19y-4; //chain lighting
!!SS23y-4; //meteor shower
!!SS26y-4; //armagedon
//END of spellpower routine



I don't know how to test it properly

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


Admirable
Omnipresent Hero
Wog refugee
posted March 29, 2013 12:10 PM
Edited by Salamandre at 13:04, 29 Mar 2013.

The problem is that once you set a spell new power, it will stay like that, and any hero casting it afterwards will have same value. In tew4 I used special era function !FU77007 which control trolls regeneration, for example, to pass different power for spells from AI to human and vice-versa. Because that function occurs before BG and is more safe, also allows to GET RIGHT damage hint when looking into spell book. Withing BG trigger you will not get special damage hint.

I would do it this way to be sure it works:
!?FU77007; set spells before BG so it displays ok in magic book
!!SN:X?y1/?y2/1;
!!BHy2:N?y3; check owner hero
!!HEy3:S5/?y-3; //Astromancy (Navigation)
!!if&y-3>0:; if has skill
!!SS17:P?v123;
!!SS19:P?v234;
[etc, store original power for all spells]
!!VRy-3:+1;
!!HEy3:Fd/d/?y-9/d;
!!VRy-4:Sy-9 *y-3;
//Begin of spellpower routine
!!SS17:Py-4; //lighting bolt
!!SS19:Py-4; //chain lighting
!!SS23:Py-4; //meteor shower
!!SS26:Py-4; //armagedon
[You will have bad surprises here, as those spells have originally bigger power than what your script will give if hero has little spell ower, check first original values and create new algorithm, lightning bolt has power of 25, if hero has spell power of 5, it will get power of 15 (Sy-9 *y-3;), so the original power must be part of the algorithm]
!!en:;

!?BG1;[restore spells power after movement/spell/whatever]
!!SS17:Pv123;
!!SS19:Pv234;
[etc]

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


Supreme Hero
Work at Magic Dimmension
posted March 29, 2013 01:03 PM
Edited by majaczek at 13:13, 29 Mar 2013.

okay here is fixed script (it would be a part of Knightmare heroes)
Quote:
ZVSE

//Astromancy (Navigation) Bonus
!?FU77007; set spells before BG so it displays ok in magic book
!!SN:X?y1/?y98/?y99;
!!BMy1:I?y2;
!!BHy2:N?y3; check owner hero
!!HEy3:S5/?y7; //Astromancy (Navigation)
!!VRy7:+1;

//Begin remembering spellpower
!!SS17?y17; !!SN:W^Astromancy.SS17^/y17;
!!SS19?y19; !!SN:W^Astromancy.SS19^/y19;
!!SS23?y23; !!SN:W^Astromancy.SS23^/y23;
!!SS26?y26; !!SN:W^Astromancy.SS26^/y26;
//End remembering spellpower

//Begin of spellpower routine
!!VRy17:*y7; !!SS17y17; //lighting bolt
!!VRy19:*y7; !!SS19y19; //chain lighting
!!VRy23:*y7; !!SS23y23; //meteor shower
!!VRy26:*y7; !!SS26y26; //armagedon
//END of spellpower routine

!?BG1;[restore spells power after movement/spell/whatever]
!!SN:W^Astromancy.SS17^/?y-17;   !!SS17y-17; //lighting bolt
!!SN:W^Astromancy.SS19^/?y-19;   !!SS19y-19; //chain lighting
!!SN:W^Astromancy.SS23^/?y-23;   !!SS23y-23; //meteor shower
!!SN:W^Astromancy.SS26^/?y-26;   !!SS26y-26; //armagedon


any malfunctions in my script? also i missed exit point deliberately because no skill is skill level 0, yeah?

EDIT: new version of script, fixed problem with hero number

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


Admirable
Omnipresent Hero
Wog refugee
posted March 29, 2013 01:06 PM
Edited by Salamandre at 13:12, 29 Mar 2013.

Use the red icon to get rid of smiles, it hurts eyes

My very noob knowledge in math still says that any number multiplied by zero = 0. Thus your modified spells power will drop to zero. That's why I added condition to skill to have it, exit if zero.

@Edit: ah ok, you add 1 to y7, sorry, didn't notice the first time. Looks good, now test phase.
____________
Era II mods and utilities

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


Admirable
Omnipresent Hero
Wog refugee
posted March 29, 2013 01:32 PM

In fact this is what I used to get the hero number:

!!SN:X?y1/?y2/1;
!!VRy2:Sy1:21;
!!BHy2:N?y3; [Hero ID = y3]
____________
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 March 30, 2013 07:37 PM

sorry script is bugged, it for some reason don't reset properly.
lighting bolt gives 28k damage and counting... could be this connected with that i have enchanters? anyway full version of the script...

Quote:
ZVSE

//Astromancy (Navigation) Bonus
!?FU77007; set spells before BG so it displays ok in magic book
!!SN:X?y1/?y98/?y99;
!!BMy1:I?y2;
!!BHy2:N?y3; check owner hero
!!HEy3:S5/?y7; //Astromancy (Navigation)
!!VRy7:*50 +100;

!!HEy3:E?y71/?y72 X?y73/?y74/?y75/?y76/?y77/?y78/?y79;  y71, y75-y79 are dummies
!!VRy70:S5 *y72; 5% per level
!!VRy7&y73=0/y74=5:+25 +y70; 25% bonus + above for specialist

//Begin remembering spellpower
!!SS17:P?y17; !!SN:W^Astromancy.SS17:P^/y17;
!!SS19:P?y19; !!SN:W^Astromancy.SS19:P^/y19;
!!SS23:P?y23; !!SN:W^Astromancy.SS23:P^/y23;
!!SS26:P?y26; !!SN:W^Astromancy.SS26:P^/y26;
//End remembering spellpower

//Begin of spellpower routine
!!VRy17:*y7:100; !!SS17:Py17; //lighting bolt
!!VRy19:*y7:100; !!SS19:Py19; //chain lighting
!!VRy23:*y7:100; !!SS23:Py23; //meteor shower
!!VRy26:*y7:100; !!SS26:Py26; //armagedon
//END of spellpower routine


//Life Magic (Luck) Bonus
!?FU77007; set spells before BG so it displays ok in magic book
!!SN:X?y1/?y98/?y99;
!!BMy1:I?y2;
!!BHy2:N?y3; check owner hero
!!HEy3:S9/?y7; //Life Magic (Luck)
!!VRy7:*50 +100;


!!HEy3:E?y71/?y72 X?y73/?y74/?y75/?y76/?y77/?y78/?y79;  y71, y75-y79 are dummies
!!VRy70:S5 *y72; 5% per level
!!VRy7&y73=0/y74=9:+25 +y70; 25% bonus + above for specialist

//Begin remembering spellpower
!!SS37:P?y37; !!SN:W^Life_Magic.SS37:P^/y37;
!!SS38:P?y38; !!SN:W^Life_Magic.SS38:P^/y38;
!!SS39:P?y39; !!SN:W^Life_Magic.SS39:P^/y39;
!!SS40:P?y40; !!SN:W^Life_Magic.SS40:P^/y40;
//End remembering spellpower

//Begin of spellpower routine
!!VRy37:*y7:100; !!SS37:Py37; //cure
!!VRy38:*y7:100; !!SS38:Py38; //Ressurection
!!VRy39:*y7:100; !!SS39:Py39; //Animate dead
!!VRy40:*y7:100; !!SS40:Py40; //Sacrifice
//END of spellpower routine



!?BG1;[restore spells power after movement/spell/whatever]
!!SN:W^Astromancy.SS17:P^/?y-17;   !!SS17:Py-17; //lighting bolt
!!SN:W^Astromancy.SS19:P^/?y-19;   !!SS19:Py-19; //chain lighting
!!SN:W^Astromancy.SS23:P^/?y-23;   !!SS23:Py-23; //meteor shower
!!SN:W^Astromancy.SS26:P^/?y-26;   !!SS26:Py-26; //armagedon
!!SN:W^Life_Magic.SS37:P^/?y-37;   !!SS37:Py-37; //cure
!!SN:W^Life_Magic.SS38:P^/?y-38;   !!SS38:Py-38; //Ressurection
!!SN:W^Life_Magic.SS39:P^/?y-39;   !!SS39:Py-39; //Animate dead
!!SN:W^Life_Magic.SS40:P^/?y-40;   !!SS40:Py-40; //Sacrifice


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


Admirable
Omnipresent Hero
Wog refugee
posted March 30, 2013 08:17 PM
Edited by Salamandre at 20:42, 30 Mar 2013.

I see, it is done every round. The best way I think is to store all spells value at starting game, then reset after every special battle.

!?BA0&1000; [set new power ONCE per battle]
[check hero astromancy skill and set a flag xx if have]
[check hero stats]
!!FU&-xx:E;
//Begin of spellpower routine
!!VRy17:*y7:100; !!SS17:Py17; //lighting bolt
!!VRy19:*y7:100; !!SS19:Py19; //chain lighting
!!VRy23:*y7:100; !!SS23:Py23; //meteor shower
!!VRy26:*y7:100; !!SS26:Py26; //armagedon
//END of spellpower routine


!?BA1&1000/xx;
!!IF:Vxx/0; reset flag so does not occur next battle automatically
[...reset spells power to original]

You should add two additional functions in FU77007, one setting spells to original, the other setting them to bonus. Check hero skill and set the correct function inside. This is how I did it in TEW -user permanent variables as I don't expect to be compatible with other mods-:

!?PI;
;store regular spell power
;AIR
!!SS17:P?v5000; Lightning
!!SS19:P?v5001; Chain
!!SS25:P?v5002; Destroy undead
!!SS60:P?v5003; hypnotize
!!VRv6000:C2/0; counterstrike/precision
[...]

Then in battle:
!?FU77007; set spells
!!SN:X?y1/?y2/1;
!!VRv4008:Sy1;
!!VRy2:Sy1:21;
!!BHy2:N?y3;
!!FU22000&y3<=31:P; human turn, set new power [here is condition, up to you to do the correct checks, mine was hero ID]
!!FU22001&y3>31:P; AI's turn, casts at original value


!?FU22000; Set spells values for human (here spells were upgradable, you don't need really, set them to the power of your algorithm which is set in BA0 section)
!!SS26:Pv5029; armageddon
!!SS17:Pv5015; Lightning new power
[...]

!?FU22001; return values for AI turn (here you can use variables from PI section)
!!SS13:P10; fire wall
!!SS14:E3/4; earthquake
!!SS15:P10; magic arrow
[...]

____________
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 March 31, 2013 11:33 AM

It finally works :P
Quote:
ZVSE

!?PI; //Astromancy
//Begin remembering spellpower
!!SS17:P?y17; !!SN:W^Astromancy.SS17:P^/y17;
!!SS19:P?y19; !!SN:W^Astromancy.SS19:P^/y19;
!!SS23:P?y23; !!SN:W^Astromancy.SS23:P^/y23;
!!SS26:P?y26; !!SN:W^Astromancy.SS26:P^/y26;
//End remembering spellpower

//Astromancy (Navigation) Bonus
!?FU77007;  restore spells power
!!SN:W^Astromancy.SS17:P^/?y17;   !!SS17:Py17; //lighting bolt
!!SN:W^Astromancy.SS19:P^/?y19;   !!SS19:Py19; //chain lighting
!!SN:W^Astromancy.SS23:P^/?y23;   !!SS23:Py23; //meteor shower
!!SN:W^Astromancy.SS26:P^/?y26;   !!SS26:Py26; //armagedon

!?FU77007; set spells before BG so it displays ok in magic book
!!SN:X?y1/?y98/?y99;
!!BMy1:I?y2;
!!BHy2:N?y3; check owner hero
!!FU&y3<0:E; //exit if no hero

!!HEy3:S5/?y7; //Astromancy (Navigation)
!!VRy7:*50 +100;

!!HEy3:E?y71/?y72 X?y73/?y74/?y75/?y76/?y77/?y78/?y79;  y71, y75-y79 are dummies
!!VRy70:S5 *y72; 5% per level
!!VRy7&y73=0/y74=5:+25 +y70; 25% bonus + above for specialist

!!SN:W^Astromancy.SS17:P^/?y17; //lighting bolt
!!SN:W^Astromancy.SS19:P^/?y19; //chain lighting
!!SN:W^Astromancy.SS23:P^/?y23; //meteor shower
!!SN:W^Astromancy.SS26:P^/?y26; //armagedon


//Begin of spellpower routine
!!VRy17:*y7:100; !!SS17:Py17; //lighting bolt
!!VRy19:*y7:100; !!SS19:Py19; //chain lighting
!!VRy23:*y7:100; !!SS23:Py23; //meteor shower
!!VRy26:*y7:100; !!SS26:Py26; //armagedon
//END of spellpower routine

--------------------------------------------------------------------------------

!?PI; Life Magic
//Begin remembering spellpower
!!SS37:P?y37; !!SN:W^Life_Magic.SS37:P^/y37;
!!SS38:P?y38; !!SN:W^Life_Magic.SS38:P^/y38;
!!SS39:P?y39; !!SN:W^Life_Magic.SS39:P^/y39;
!!SS40:P?y40; !!SN:W^Life_Magic.SS40:P^/y40;
//End remembering spellpower

!?FU77007;   restore spells power
!!SN:W^Life_Magic.SS37:P^/?y37;   !!SS37:Py37; //cure
!!SN:W^Life_Magic.SS38:P^/?y38;   !!SS38:Py38; //Ressurection
!!SN:W^Life_Magic.SS39:P^/?y39;   !!SS39:Py39; //Animate dead
!!SN:W^Life_Magic.SS40:P^/?y40;   !!SS40:Py40; //Sacrifice

//Life Magic (Luck) Bonus
!?FU77007; set spells before BG so it displays ok in magic book
!!SN:X?y1/?y98/?y99;
!!BMy1:I?y2;
!!BHy2:N?y3; check owner hero
!!FU&y3<0:E; //exit if no hero

!!HEy3:S9/?y7; //Life Magic (Luck)
!!VRy7:*50 +100;


!!SN:W^Life_Magic.SS37:P^/?y37; //cure
!!SN:W^Life_Magic.SS38:P^/?y38; //Ressurection
!!SN:W^Life_Magic.SS39:P^/?y39; //Animate dead
!!SN:W^Life_Magic.SS40:P^/?y40; //Sacrifice


!!HEy3:E?y71/?y72 X?y73/?y74/?y75/?y76/?y77/?y78/?y79;  y71, y75-y79 are dummies
!!VRy70:S5 *y72; 5% per level
!!VRy7&y73=0/y74=9:+25 +y70; 25% bonus + above for specialist



//Begin of spellpower routine
!!VRy37:*y7:100; !!SS37:Py37; //cure
!!VRy38:*y7:100; !!SS38:Py38; //Ressurection
!!VRy39:*y7:100; !!SS39:Py39; //Animate dead
!!VRy40:*y7:100; !!SS40:Py40; //Sacrifice
//END of spellpower routine


--------------------------------------------------------------------------------

!?BG1;[restore spells power after movement/spell/whatever]
!!SN:W^Astromancy.SS17:P^/?y-17;   !!SS17:Py-17; //lighting bolt
!!SN:W^Astromancy.SS19:P^/?y-19;   !!SS19:Py-19; //chain lighting
!!SN:W^Astromancy.SS23:P^/?y-23;   !!SS23:Py-23; //meteor shower
!!SN:W^Astromancy.SS26:P^/?y-26;   !!SS26:Py-26; //armagedon
!!SN:W^Life_Magic.SS37:P^/?y-37;   !!SS37:Py-37; //cure
!!SN:W^Life_Magic.SS38:P^/?y-38;   !!SS38:Py-38; //Ressurection
!!SN:W^Life_Magic.SS39:P^/?y-39;   !!SS39:Py-39; //Animate dead
!!SN:W^Life_Magic.SS40:P^/?y-40;   !!SS40:Py-40; //Sacrifice





It should work for both AI and Player, if only owner has Astromancy(former navigation) or Life Magic(former Luck). So now with knightmare heroes, you get rid of two weak skills. Icons and description granted :). At least I'm happy that reseting works, so i won't have to restart game if something gets wrong :P

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


Admirable
Omnipresent Hero
Wog refugee
posted March 31, 2013 12:19 PM
Edited by Salamandre at 12:20, 31 Mar 2013.

You don't need to restore spells power both in BG1 and FU77007, if function detect an hero who has not astromancy, it resets before his creature gets to move. I would use a single PI and a single FU77007 and do the conditions with if/en, but is ok.
____________
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 March 31, 2013 12:49 PM

yeah it does not need both :P
in fact doing both introduced a bug Astromancy not always working.
but i modified it to fix this bug


changed these lines
Quote:
!?BG1;[restore spells power after end of battle]
!!BU:C?y-1; !!FU&y-1<>1:E;

it's important because it have to show normal damage in adventure map spellbook

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


Admirable
Omnipresent Hero
Wog refugee
posted March 31, 2013 12:51 PM

No need, BA1 does the job.
____________
Era II mods and utilities

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


Known Hero
posted March 31, 2013 07:18 PM

It is possible change Catherine from Castle Hero to Conflux Hero?
With !!HE146:R3/$1/$2; and something else? What?

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


Admirable
Omnipresent Hero
Wog refugee
posted March 31, 2013 07:29 PM

HE:B2/$
____________
Era II mods and utilities

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


Known Hero
posted April 01, 2013 12:27 AM
Edited by Sguazz at 00:28, 01 Apr 2013.

Quote:
HE:B2/$

I have already written this:
!?PI;
!!HE146:B2/17;               [Elementalist]
but if I create a match with only Castle Town and all random Hero, Catherine has a chance to appear.
If I create a match with only Conflux Town and random Hero, Catherine doesn't appear...
Is the trigger correct?

 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 ... 196 197 198 199 200 ... 250 300 350 400 407 · «PREV / NEXT»
Post New Poll    Post New Topic    Post New Reply

Page compiled in 0.5163 seconds