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: Henchmen revival on battlefield
Thread: Henchmen revival on battlefield
XEricSin
XEricSin


Famous Hero
posted August 26, 2016 04:29 AM

Henchmen revival on battlefield

I am looking for the part of the henchmen script that prohibits henchmen from being resurrected.

However, from the script, I dont see any change in the monster special abilities (BM:F EA:B) after the stack is summoned (BU:S).

Furthermore, when I use some function to resurrect the henchman, the stack will first seem normal, and after its turn becomes not accessible. The stack just becomes the background. The box showing the number of troops disappears. The stack cannot be controlled, cannot be targeted. (This is what happens to the split troops option.)

Looking for some help please.

=================================================================
** start of battlefield trigger **
!?BF&v7181=1;                                        [continue if enabled]

!!VRv7207:C-1/-1/-1/-1/-1/-1;                        [initialize variables]
!!VRy-1:S-2;                                         [initialize variable]

!!BU:E2/?y-7;                                        [check for enemy creature at position 2 for banks]

!!BA:H0/?y-1;                                        [get hero number - attacker]
!!HEy-1&y-1>-1?y-3;                                [get attacker's owner]
!!OW:Iy-3/?y-6;                                      [check if AI]
!!FU7103&y-6=1/y-1>-1y-1;                          [choose henchman for AI]
!!IF&y-1>-1:Wy-1;                                    [enable hero variable - attacker]
!!VRy-8&y-7<21:S20;                                  [set position - normal]
!!VRy-8&y-7>20:S25;                                  [set position - bank]
!!BU&w118>-1/w119=1/y-1>-1:Sw118/1/y-8/0/-1/0;       [add a creature to attacker's army at position y-8]
!!BU&w118>-1/w119=1/y-1>-1:Ey-8/?v7207;              [get stack]
!!FU7101&w118>-1/w119=1/y-1>-1/v7207>-1v7207/0/y-1;[add stat increases - attacker]

!!VRy-2:S-2;                                         [initialize variable]
!!BA:H1/?y-2;                                        [get hero number - defender]
!!HEy-2&y-2>-1?y-3;                                [get defender's owner]
!!OW:Iy-3/?y-6;                                      [check if AI]
!!FU7103&y-6=1/y-2>-1y-2;                          [choose henchman for AI]
!!IF&y-2>-1:Wy-2;                                    [enable hero variable - defender]
!!BU&w118>-1/w119=1/y-2>-1:Sw118/1/30/1/-1/0;        [add a creature to defender's army at position 30]
!!BU&w118>-1/w119=1/y-2>-1:E30/?v7208;               [get stack]
!!FU7101&w118>-1/w119=1/y-2>-1/v7208>-1v7208/1/y-2;[add stat increases - defender]
** end of battlefield trigger **

=================================================================
** function to give stat increases    x1=stack  x2=attacker/defender  x3=hero number
!?FU7101;

!!BMx1:T?y6;                                         [get stack type]
!!FU7104&y6>-1y6;                                  [get monster level]
!!VRy7&y6>-1:Sv7215;                                 [copy monster level]
!!IF&y6>-1:Wx3;                                      [enable hero variable]
!!HEx3:E?y1/?y2/1;                                   [get hero exp, level]
!!VRy10:Sy2 -1 *10 +w117 +c;                         [experience points = (hero level -1) x10  +earned xp + current day]
!!VRv7213&x2=0/y6>-1:Sy10 :y7 +1;                    [level = experience points / monster level + 1 - attacker]
!!VRv7214&x2=1/y6>-1:Sy10 :y7 +1;                    [level = experience points / monster level + 1 - defender]
!!VRy8&x2=0/y6>-1:Sv7213;                            [copy attacker level to y8]
!!VRy8&x2=1/y6>-1:Sv7214;                            [copy defender level to y8]

!!VRy4&y6>-1:Sy8 :10 +1;                             [bonus = level / 10 + 1]
!!BMx1&y6>-1:Sdy4;                                   [give +1 speed per 10 levels]

!!BMx1&y6>-1:U1/d2;                                  [give +2 min damage]
!!BMx1&y6>-1:U2/d5;                                  [give +5 max damage]

!!VRy4&y6>-1:Sy8 :3 +1;                              [bonus = level / 3 + 1]
!!BMx1&y6>-1:Ady4 Ddy4;                              [give +1 attack and +1 defense per 3 levels]

!!BMx1&y6>-1:H?y4;                                   [get health]
!!VRy5&y6>-1:Sy4 +10 *y8;                            [health - add 10, multiply by level]
!!BMx1&y6>-1:Hy5;                                    [set health]
!!BMx1&y6>-1:Ny8;                                    [set quantity to level]

!!BMx1|y6=63/y6=154:By8;                             [if vampire lord or blood dragon set starting quantity to level]

!!BMx1&y6>-1:M4/100/1;                               [give disguise dummy spell to make tag yellow]

!!VRw117&y6>-1:+6 T4;                                [experience counter - gain 6-10 points per battle]


*tactics speed boost if enabled*

!!UN218/?y1;                                       [check if tactics is enabled in WoG options]
!!FU&y1<>1:E;                                        [exit if it isn't]
!!VRy3:S0;                                           [initialize y3]
!!VRy4:S0;                                           [initialize y4]
!!BH0:N?y1;                                          [attacking hero #]
!!BH1:N?y2;                                          [defending hero #]
!!HEy1&y1>=0:S19/?y3;                                [get attacker's tactics]
!!HEy2&y2>=0:S19/?y4;                                [get defender's tactics]
!!FU&y3=0/y4=0:E;                                    [exit if no one has tactics]
!!FU&y3=y4:E;                                        [exit if equal tactics level]
!!FU&y3<y4/x2=0:E;                                   [exit if defender's tactics superior - attacker]
!!FU&y3>y4/x2=1:E;                                   [exit if attacker's tactics superior - defender]
!!VRy5&y3>y4/x2=0:S0 +y3 -y4;                        [set bonus if attackers tactics superior - attacker]
!!VRy5&y3<y4/x2=1:S0 +y4 -y3;                        [set bonus if defenders tactics superior - defender]
!!BMx1&y6>-1:Sdy5;                                   [give tactics speed boost]

** end of function

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


Admirable
Omnipresent Hero
Wog refugee
posted August 26, 2016 08:44 AM

I did a short test and I can't see why henchman can't be resurrected, there is nothing in the code prohibiting it, yet it can't. I have no time to further test but I will ask the henchman author as soon as the russian forum is back, as now it is migrating to new host. Then I will post back here, so patience.

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


Famous Hero
posted August 26, 2016 11:44 AM

thanks

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

Tavern Dweller
posted March 11, 2020 10:42 AM

Hi,
I know it is different topic but I have some other question about henchmen, maybe somebody can help me.
I have WOG revised and Henchmen (NEW) script is choosen.

I change amount of experience henchmen get for Heroes level and it seems to work well but when a click on red banner to see unit statistic they are like before my "upgrade". Experience and level are shown as previous but when I enter the battle henchmen statiscitics are different according to my changes.

Is there possibility to make statistics be correct after clicking red banner only?
Thanks for help
____________

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


Famous Hero
posted March 14, 2020 01:36 PM

Everything about the henchman is in the script. You can definitely find the part controlling the texts. You have to look in to the code yourself.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Jump To: « Prev Thread . . . Next Thread »
Post New Poll    Post New Topic    Post New Reply

Page compiled in 0.0647 seconds