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: How to edit HotA? (started by Baronus in January 2016)
How to edit HotA? This Popular Thread is 128 pages long: 1 2 3 4 5 ... 30 60 90 120 ... 124 125 126 127 128 · «PREV
purerogue3
purerogue3


Famous Hero
posted October 28, 2026 04:47 PM

I mean it checks the clone spell bas, instead of clone spell non with only 06->05
In the original it doesn't differentiate but that's just the game setting, it allows differentiation - does it matter?
There should be nothing in it that makes it not work because it is bas or non
Why is it checking clone when we want it to check berserk/blind that is the question

 View Profile
BigPig2
BigPig2


Known Hero
posted October 28, 2026 04:55 PM
Edited by BigPig2 at 17:02, 28 Oct 2026.

Oh, you mean you want it to read the values from the attributes of whichever spell you are using? That was not what I was aiming for, seing as Blind has the percentage values for retaliation strength and Berserk has the values for the cursor shadow.

My aim from the outset was for any spell routed through the case to use Clone's Effect attributes in SPtraits but the spell's own school of magic, and that is what this patch does.

edit: I mean we have discussed that as an option, yes, but I am satisfied with the way this patch works. I dont mind having the level thresholds for different skills follow the same progression, and the silver lining is those spells can still keep their own unique effects.

I am sure it is possible to make the function check the current spell's attributes but that will require further edits.

 View Profile
purerogue3
purerogue3


Famous Hero
posted October 28, 2026 05:06 PM

Oh sorry, i forgot that IS what I was aiming
my sincere apologizes once again

onto Hypnotize, as you were saying..

 View Profile
BigPig2
BigPig2


Known Hero
posted October 28, 2026 05:09 PM

For Hypnotize: see page 172. The same working principle, set case to 04, the school of magic skill of the current spell will be applied, the HP allowed will follow Hypnotize's attributes and formula.

 View Profile
purerogue3
purerogue3


Famous Hero
posted October 28, 2026 05:16 PM
Edited by purerogue3 at 17:17, 28 Oct 2026.

What are we trying to do with Hypnotize again?

edit: oh, use the hp requirement
does it work just like that?

 View Profile
BigPig2
BigPig2


Known Hero
posted October 28, 2026 05:30 PM

The patch I posted allows the routing of any skill currently using the default case 06 to use Hypnotize's target HP restrictions. Or specifically, simply setting the spell's switch to 04 does that, the patch makes the game check the spell's own school of magic, instead of Hypnotize's Air magic.

 View Profile
purerogue3
purerogue3


Famous Hero
posted October 28, 2026 05:36 PM

And it reads the power setting from Hypnotize not the spell itself?
So, for example, if you route Blind through it 06->04, the sp*hp is read from Hypnotize, but the retaliation % still read from Blind?
That's quite a neat thing you have achieved, it will have many future applications I am sure

 View Profile
BigPig2
BigPig2


Known Hero
posted October 28, 2026 05:42 PM

Yes, just changing the switch value to 04 should check the target HP according to Hypnotize's formula (which can be changed to use a scaling multiplier, see page 123) and attributes in SPtraits according to the hero's Air magic.

Applying the patch will make it do the check using the spell's own School of magic, so for example Fire magic for Blind.

 View Profile
purerogue3
purerogue3


Famous Hero
posted October 28, 2026 07:15 PM

Is it possible to direct fireball through berserk's targeting so that it 's radius is determined by berserk's radius?
Like it grows to inferno size because of the 3 in exp.berserk.
You could use this for the aoe spells you were discussing your thread.

 View Profile
BigPig2
BigPig2


Known Hero
posted October 28, 2026 08:05 PM

Im sure it can be done but it is not handled by this function.

One other thing I realised, routing a spell through Clone's level check has the side effect of making any unit with a clone currently on the battlefield immune to said spell, as Clone cannot be cast on such a unit. This limitation is easy to remove but its something to consider.

 View Profile
purerogue3
purerogue3


Famous Hero
posted October 28, 2026 08:08 PM

^
Why? How does that work?

 View Profile
BigPig2
BigPig2


Known Hero
posted October 28, 2026 08:46 PM

You cant cast Clone on a unit which already has one, or on an existing Clone itself, and this case checks for that and then the level of the target. So any spell you route through this case will check both things.

The Hypnotize spell immunity and unit type are checked somewhere else so 04 is just the HP check as far as I can see.

 View Profile
purerogue3
purerogue3


Famous Hero
posted October 28, 2026 08:59 PM

Good thing you would probably never want to cast that anyways as the closest unit would probably be said clone, so why would you waste an attack destroying a clone, also it would destruct immediately not retaliating, nor would you berserk a clone because it would die from the retaliation but it doesn't hurt the enemy

i don't understand why you can't cast(/such things) intuitively but i'll take your word for it

 View Profile
BigPig2
BigPig2


Known Hero
posted October 28, 2026 09:38 PM
Edited by BigPig2 at 21:39, 28 Oct 2026.

If you mean you dont get how it works: the case 04 05 runs a check on the target chosen: a) is it currently cloned? (I think thats what the first check is) b) is it a clone? c) is it within the level restrictions? all in one block. If any of these is failed the whole test fails.

If you mean you dont get why the devs chose these restrictions to apply then it might be a legacy of homm2, where the spell was called "Mirror Image" implying more intuitively that any unit can only have one and I guess it cant be mirrored back? idk I also believe in homm2 the Image died if the original unit did, not sure if this carried over to homm3, assuming it really did work that way.

Purely practically, I dont know how OP it is to be able to clone a unit more than once, or clone a clone, each new clone takes a whole turn of spellcasting to be cloned so I dont personally feel its that big a deal.

 View Profile
purerogue3
purerogue3


Famous Hero
posted October 28, 2026 10:06 PM

I see..
Only one clone allowed is probably to prevent abuse because if you have a fast shooter or non-retaliating unit, you could buff it up many times and pull off impossible feats against a fully stacked but speed restricted enemy
Leaving this restriction in is good because it prevents the ai from berserking clones or the cloned (as I explained above why it's most likely sub-optimal)

But one thing - if the level check fails the spell still casts (wasted) which is a legacy of the aoe targeting.. need to fix this or not?

 View Profile
BigPig2
BigPig2


Known Hero
posted October 28, 2026 10:46 PM

Afaik the only way to allow the AI to use Berserk in the first place is changing its targetting flag from area effect to single target. If I understand correctly the spell still affects an area but the centre of it needs to be aimed at a unit. I do not know if the AI will ever choose to cast it on an ineligible target, I dont recall reading any feedback about this.

I actually think doing both, changing the targetting flag and routing it through case 04 or 05 will prevent the AI (and the player) from casting it if the cursor points at a target which is immune due to these restrictions, but you can play around with it and share your findings?

 View Profile
purerogue3
purerogue3


Famous Hero
posted October 28, 2026 11:16 PM

That's a little beyond me at the moment.. still haven't grasped why 06->05 works
(translation: all progress depends on you)
take a break, we (you) have done alot

 View Profile
BigPig2
BigPig2


Known Hero
posted October 29, 2026 01:58 PM

The function SpellCastWorkChance starts at 1A83A0. It runs some common checks like cursed ground, recanters cloak first, a couple more specific like antimagic and dispel vs sphere of permanence and then something with eligibility for res/animate/sacrifice. Then, at 1A8673 it starts listing 5 cases, starting with Hypnotize, then Armageddon, Antimagic, Clone, and then Res/animate (again, yes), then Sacrifice and finally the default. Followed by a switch table at 1A891C (starting with a 00 for Armageddon) with 40 values for each spell from Arma until Clone (you can see the order in BTB's guide). Each spell has a value of 00-06 assigned directing to the relevant case (not in the order they occur in the code), 06 being the default. If you change the value the spell gets directed through another case. Some or all cases also run through the default case afterwards. I think the default is a check for magic resistance auras? Its something about a 20% chance not to work anyway.

 View Profile
purerogue3
purerogue3


Famous Hero
posted October 29, 2026 03:47 PM

Nice. Do you look at IDA in line form or through charts? I prefer the later, but they quickly get complicated esp. with jump tables. I'll lable it with the stuff you figured out (beyond what Alex already done).
Yeah the 20% is probably auras because they do not stack with resistance skill or creature resistance, but skill and creature stack.
This is so cool figuring out every bit of the game.

 View Profile
BigPig2
BigPig2


Known Hero
posted October 29, 2026 04:17 PM
Edited by BigPig2 at 09:19, 02 Nov 2026.

I use mostly view A and pseudocode, then view B and hexview as needed. And most importantly I am viewing the .i64 file (link somewhere earlier in this thread) where a lot of stuff is already labelled.

Edit: An unrelated question.

I am looking at army::SoD_ComputeAttackerDamageBonuses function (starting 43040h in the exe):

if ( this->iLuckStatus > 0 )
   HIDWORD(v37) += base_damage;

This i believe is where the luck bonus damage is added. If I were instead to double base_damage at this point, would this make lucky strikes behave the way they do in HotA? Is this how that was acheived?

 View Profile
Jump To: « Prev Thread . . . Next Thread » This Popular Thread is 128 pages long: 1 2 3 4 5 ... 30 60 90 120 ... 124 125 126 127 128 · «PREV
Post New Poll   Post New Topic   Post New Reply

Page compiled in 0.0966 seconds