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 4 - Lands of Axeoth > Thread: CHANGING the mass spells (new and for plugin)
Thread: CHANGING the mass spells (new and for plugin)
NimoStar
NimoStar


Responsible
Legendary Hero
Modding the Unmoddable
posted June 23, 2021 06:17 AM
Edited by NimoStar at 14:53, 09 Jun 2022.

CHANGING the mass spells (new and for plugin)

So, I was looking at the Heroes 4 exe for several hours trying to find where were creature spells stored. So far, no luck, but I did find something nearly equally interesting that I didn't know...

There is a section which lists the Mass Spells and to WHICH individual spell each mass spell corresponds.

Earlier I had experimented a bit with this mechanic butonly in the spell table: H4 Ultimate Prerelease changes Curse to Chaos Magic (since Death already has weakness and lots of other debuffs), but leaves Mass Curse in Death. This worked fine, but what about changing Mass Curse to a yet unused mass spell, like Mass Aging?

Eureka, this is exactly what this section of the Hex code does!

First we have the hex of the spell which is to be the "massified" applier, then we have the hex of the spell which is the massed!



Here I made Mass Fervor (Mirth) into Mass Strenght Potion (non existent in original game)

Everything works perfectly including the attach anim.

Just after the mass fervor hex 00 00 00 63
(which is in 0058bfc8 in Hex Editor Neo, add 400000 for ida pro)
Change from 00 00 00 94 (Mirth)
To 00 00 00 99 (Strenght potion)



Even unused spells slots could conceivably be turned into mass spells this way. Problem is we have limited hex space. A plugin should be programmed immediately (psst, tell rosekavalier ). This is extremely easy, just correspond this with the hex spell list, the plugin should only extend this section of the code with a configurable "This hex (massivizer) -> This spell (massive)" method.

SO far so good, but there is also the question: Can a spell mass itself by repetition 00 00 00 17 00 00 00 17 ?
Turns out, no, this behaviour will confuse the game and lead to crash.

Too bad? Well not really;
turns out ANY other spell you put as the originator of Mass_Spell will work as an initiator. So I can take Aging and turn it into Mass Curse.

As it happens, this doesn't affect combat cast, so while the spellbook Aging will turn to Mass Curse, the Ghost/Mummies in Ultimate attacking will still generate the normal Aging. A fancy way to add more mass spells, but much more useful with the plugin since otherwise you are disabling one of the existing mass spells to do this.


Some spells which have no mass variant But can be made this way:

Note that some of these spells maybe very powerful, some would have to be level 5, others like Mass Hypnotize would be entirely too OP to be available normally. But even these are interesting to make powerful scrolls.

[spells with a "V" are in Ultimate Mod]

[Blessings]
v- Regeneration
- Magic Resistance
- Magic Immunity
- Dragon Strenght
v- Magic Mirror
- Cat Reflexes (Double attack)
- Life Draining (Vampirism)
v- Quickness (potion)
- Pain Mirror
- Protection from Fire
- Freezing Attack
v- Fire Aura
- Immortality

[Curses]
- Aging
- Acid (Vial of)
- Disrupting Ray
- Spell Shackle
- Mana Leech
- Power Drain
(affects allies because they are area dependant: )
- Choking Gas (Vial of)

[Disabling]
- Berserk
- Cowardice
- Song of Peace
- Hypnotize
- Charm (Mermaid)
- Blind
- Freeze
- Confusion
- Wasp Swarm
( affects allies because they are area dependant: )
- Cloud of confusion

Blesses, Curses and Disables in general are proven to work.

... Targeting obeys the targeting rules of the "child" spell, as said in spell table. The mass spell will attack all possible creature and hero targets, as if replacing "target" with "each". If the spell is restricted to allied targets the Mass will apply to all allies. If the spell is restricted to enemy targets, the mass will apply to all enemies. And such.

... The following spell types need more testing:

[Damage]
( Needs more testing like spell power and such in the table. The graphic effect appears at least.)
(PROVEN they take power from new spell, not original)
v- Magic Fist
- Poison
- Magic Arrow
- Fire Bolt
v- Lightning
- Implosion
- Banish
( affects allies because they are area dependant: )
- Demon Fire (Vial of)
- Fire Ring
- Fireball
- Inferno
- Chain Lightning
( unknown if would work since they have special mechanics: )
- Sparks (probably would not work)

[quasi-damage]
v- Hand of Death

Unworking:
- Holy Water (because it has "self-targeting" alt-mode)

Confirmed damage spells work with due table.spells configuration. They need to have a power set and the like. I made a spell that works like Mass Magic Arrow.

[Healing+]
- Simple Healing
- Resurrection
v- Rebirth
(Any in general, same as damage.)

Heal unworking:
- Sacrifice

[Summoning]
( unknown if would work since they have special mechanics, also require table edit with power and more
[CONFIRMED working, but making more than one creature type generates superposition.]
w- Create Illusion
w- Phantom Image
w- Animate Dead
w- Death Call
w- Raise Skeleton
w- Raise Ghost
w- Raise Vampire

Unworking others:
- Smoke ( Smokes the location of all creatures and heroes with a cloud, seems to not work but may require more testing.)
- Teleport
- Displacement (probably)
- Quicksand (almost certainly)

Tere remains many other untested spells.

________________________________

With just hex edit, we are limited to the existing number, but with a plugin to just extend this very simple 00 00 00 XX -> 00 00 00 YY list, we could have as many new mass spells as we want.


Incidentally, in an indirect way this allows to change the spells of creatures - for example, turn the Bloodlust of the Ogre Magi into Mass Slayer, and Mass Slayer into something else like Mass Cat Reflexes. The bad part is that without a plugin, you are "sacrificing" one spell each time you do this (in this case using the Bloodlust spell instead of Bloodfrenzy, which will then become useless without the code to become mass, since it does nothing "by itself"), so the plugin is a priority to get the most out of the system.
____________

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


Responsible
Legendary Hero
Modding the Unmoddable
posted June 23, 2021 07:44 AM

Confirmed Mass Chain Lightning works (with table edit) and is really cool as a sort of apocalyptic effect. Looks much better when animated, too.


____________

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


Legendary Hero
posted June 23, 2021 09:29 AM
Edited by Baronus at 09:32, 23 Jun 2021.

Baronus

Congratulations! Great discovery! Massive pluggin is needed. Hexediting is tired.
All we know should be added. Eg. town unit recruitment.

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


Hired Hero
posted June 24, 2021 07:07 PM

Chain Lighting Apocalypse looks cool!
____________

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


Responsible
Legendary Hero
Modding the Unmoddable
posted June 25, 2021 07:19 AM

Thanks to this method, I was able to create a new spell "Mass Poison Attack" and to give it to Ogre Magi instead of Bloodlust:




Unfortunately, doing this means that both Bloodlust and Bloodfrenzy no longer exist since I had to replace their hex for it, which is why we need the plugin, so that there is no "cost" of doing it.
____________

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


Legendary Hero
posted June 25, 2021 10:23 AM

Yes looks really fantastic. But must be placed high lvl of guild. I think they planned something like spells lvls as in H3 but they abandon it. You discovered abandon content.
I think that if we discover magi,genie,eye,water,faerie spellbooks in code maybe viad pluggin will be possible add more spellbooks to other units. Angel, phonix, leorechaun, satir ,spells' de facto have skills using spell code. But magical units are using spells.
These spellboks must look like this table eg. 000000 0A 000000.

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


Responsible
Legendary Hero
Modding the Unmoddable
posted July 05, 2021 05:07 AM
Edited by NimoStar at 10:05, 09 Jul 2021.

Still no luck finding creature spells.

But I have been researching which spells can be turned into addittional mass spells with the plugin.

Note question: Can adventure-type spells be massified (other than healing)? Example: Mass Immortality. Test.

TO DO "CASTABLE" (SPELLBOOK ENABLED) BUT UNWORKING SPELLS TO MAKE MASS SPELLS:

- binding
- cold resistance
- fear_effect
- fire shield
- fire_aura_effect
- mana leech
- panic
- precognition
- stone_gaze
- stun
- water walk


These spells, appearing in the .exe list, will appear in the spellbook if enabled with "learnable" in the spell table. However, by default they don't work/do nothing when you try to cast them. They can be made work (in theory) by turning them into mass spells with other effects.


SEMI WORKING BY DEFAULT
- rebirth (could actually be cast, but needs dead on stack, thus quite useless for hero; can be added to creatures, and is used by phoenix by default)

UNWORKING (spellbook disabled) so far:
- devour
- mana_potion
- martyr_client
- physical protection
- precognition
- ranged protection
- robe_of_the_guardian
- sacrifice_client
- vampirism
...

These spells, appearing in the .exe list, will not appear in spellbook even if set as "learnable" in the table.


To test: hex 00682751 in exe
more "potions"
hypnotize_effect
berserk_effect
devour
____________

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


Adventuring Hero
posted July 18, 2021 07:31 PM

Nimo is it possible to give a hero such regeneration spell,so that the hero can fully regenerate in one round/move in combat map like trolls have as their ability,or perhaps to give/create such an artifact.Thank you.

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


Responsible
Legendary Hero
Modding the Unmoddable
posted July 19, 2021 07:47 AM

There are two ways of doing that which are "possible", one is just to increase the power of the Regeneration spell, another is to increase the power of the breastplateof regeneration but this requires finding the hexes for the formula, probably.

It's also possible to make a mass regeneration spell, but I didn't due to a lack of mass spells plugin.

Equilibris could make another such artifact as well, but their method is undocumented and unsupported.
____________

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


Responsible
Legendary Hero
Modding the Unmoddable
posted January 11, 2023 10:11 PM
Edited by NimoStar at 22:13, 11 Jan 2023.

Since I cannot edit the main one, I post an update:

So, I was looking at the Heroes 4 exe for several hours trying to find where were creature spells stored. So far, no luck, but I did find something nearly equally interesting that I didn't know...

There is a section which lists the Mass Spells and to WHICH individual spell each mass spell corresponds.

Earlier I had experimented a bit with this mechanic butonly in the spell table: H4 Ultimate Prerelease changes Curse to Chaos Magic (since Death already has weakness and lots of other debuffs), but leaves Mass Curse in Death. This worked fine, but what about changing Mass Curse to a yet unused mass spell, like Mass Aging?

Eureka, this is exactly what this section of the Hex code does!

First we have the hex of the spell which is to be the "massified" applier, then we have the hex of the spell which is the massed!



Here I made Mass Fervor (Mirth) into Mass Strenght Potion (non existent in original game)

Everything works perfectly including the attach anim.

Just after the mass fervor hex 00 00 00 63
(which is in 0058bfc8 in Hex Editor Neo, add 400000 for ida pro)
Change from 00 00 00 94 (Mirth)
To 00 00 00 99 (Strenght potion)



Even unused spells slots could conceivably be turned into mass spells this way. Problem is we have limited hex space. A plugin should be programmed immediately (psst, tell rosekavalier ). This is extremely easy, just correspond this with the hex spell list, the plugin should only extend this section of the code with a configurable "This hex (massivizer) -> This spell (massive)" method.

SO far so good, but there is also the question: Can a spell mass itself by repetition 00 00 00 17 00 00 00 17 ?
Turns out, no, this behaviour will confuse the game and lead to crash.

Too bad? Well not really;
turns out ANY other spell you put as the originator of Mass_Spell will work as an initiator. So I can take Aging and turn it into Mass Curse.

As it happens, this doesn't affect combat cast, so while the spellbook Aging will turn to Mass Curse, the Ghost/Mummies in Ultimate attacking will still generate the normal Aging. A fancy way to add more mass spells, but much more useful with the plugin since otherwise you are disabling one of the existing mass spells to do this.


Some spells which have no mass variant But can be made this way:

Note that some of these spells maybe very powerful, some would have to be level 5, others like Mass Hypnotize would be entirely too OP to be available normally. But even these are interesting to make powerful scrolls.

[spells with a "V" are in Ultimate Mod]

[Blessings]
v- Regeneration
v- Magic Resistance
- Magic Immunity
- Dragon Strenght
v- Magic Mirror
- Cat Reflexes (Double attack)
- Life Draining (Vampirism)
v- Quickness (potion)
?- Pain Mirror
- Protection from Fire
- Freezing Attack
v- Fire Aura
- Immortality

[Curses]
v- Aging
?- Acid (Vial of)
- Disrupting Ray
- Spell Shackle
- Mana Leech
- Power Drain
(affects allies because they are area dependant: )
- Choking Gas (Vial of)

[Disabling]
v- Berserk
- Cowardice
- Song of Peace
- Hypnotize
- Charm (Mermaid)
- Blind
- Freeze
- Confusion
- Wasp Swarm
( affects allies because they are area dependant: )
- Cloud of confusion

Blesses, Curses and Disables in general are proven to work.

... Targeting obeys the targeting rules of the "child" spell, as said in spell table. The mass spell will attack all possible creature and hero targets, as if replacing "target" with "each". If the spell is restricted to allied targets the Mass will apply to all allies. If the spell is restricted to enemy targets, the mass will apply to all enemies. And such.

... The following spell types need more testing:

[Damage]
( Needs more testing like spell power and such in the table. The graphic effect appears at least.)
(PROVEN they take power from new spell, not original)
v- Magic Fist
- Poison
- Magic Arrow
- Fire Bolt
v- Lightning
- Implosion
- Banish
( affects allies because they are area dependant: )
- Demon Fire (Vial of)
- Fire Ring
- Fireball
- Inferno
- Chain Lightning
( unknown if would work since they have special mechanics: )
x- Sparks (probably would not work... and it didn't)

[quasi-damage]
v- Hand of Death

Unworking:
- Holy Water (because it has "self-targeting" alt-mode)

Confirmed damage spells work with due table.spells configuration. They need to have a power set and the like. I made a spell that works like Mass Magic Arrow.

[Healing+]
- Simple Healing
- Resurrection
v- Rebirth
(Any in general, same as damage.)

Heal unworking:
- Sacrifice

[Summoning]
( unknown if would work since they have special mechanics, also require table edit with power and more
[CONFIRMED working, but making more than one creature type in ILLUSION spells generates superposition.]
w- Create Illusion
w- Phantom Image
v- Animate Dead
v- Death Call
v- Raise Skeleton
v- Raise Ghost
v- Raise Vampire

Unworking others:
- Smoke ( Smokes the location of all creatures and heroes with a cloud, seems to not work but may require more testing.)
- Teleport (everything disappears, game crashes)
- Displacement (probably)
- Quicksand (almost certainly)

There remains many other untested spells.

________________________________

With just hex edit, we are limited to the existing number, but with a plugin to just extend this very simple 00 00 00 XX -> 00 00 00 YY list, we could have as many new mass spells as we want.


Incidentally, in an indirect way this allows to change the spells of creatures - for example, turn the Bloodlust of the Ogre Magi into Mass Slayer, and Mass Slayer into something else like Mass Cat Reflexes. The bad part is that without a plugin, you are "sacrificing" one spell each time you do this (in this case using the Bloodlust spell instead of Bloodfrenzy, which will then become useless without the code to become mass, since it does nothing "by itself"), so the plugin is a priority to get the most out of the system.

Disabling spells this way makes scripts learning that spell generate a lock of the map (the edited game will not be able to open to play a map with this script); this was my Mass Bloodlust problem, thus I had to reverse Ogre Magi
____________

 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.1087 seconds