HoMM IV - Possible to script spells to cast at start of battle?

Maps and the art of mapmaking.

Moderator: Moderators

Khannot
Leprechaun
Leprechaun
Posts: 4
Joined: 05 Aug 2022

HoMM IV - Possible to script spells to cast at start of battle?

Postby Khannot » Aug 5 2022, 17:26

Hi all,

Making a campaign in which the player encounters an overly powerful enemy army, which can be reduced in power if the player completes certain tasks (triggering events on the army). One takes creatures away (no problem), while another grants the player extra creatures to fight them (also shouldn't be a problem). The third is meant to place serious debuffs on the enemy army. Ideally, I would like to a bunch of mass debuffing spells to be cast on them (Curse, Weakness, etc) when the battle begins.

Unfortunately, there isn't such an option under the Encountered tab (or any other). I do recall some other maps containing enemy heroes which came with Guardian Angel or Potions of Immortality pre-cast on them. But after looking at Rakne Fne's Hundred Years' War, all I was able to find was that the enemy hero had the Guardian Angel spell.

Is there any way to pull this off, or should I just think of something else? I notice that heroes can be debuffed and that morale and luck can be reduced (though I also know that script is very buggy). Is that the best that can be done? If it is, what can I do the make the possible debuffs equal in power to the other two options? (They are mutually exclusive, as their availability is tied to the player's choice of advance class)


Context:
The campaign is a historical campaign based on the life of Genghis Khan. The first mission covers his period of exile after his family was cast out of their tribe, hence the lack of troops (or hero power). One of the problems the Mongol and other steppe tribes faced in this period was interference from Chinese empires to the south (primarily of the Jin Dynasty, which they later conquered). In the mission, Temujin (his actual name - this is before he got the title Genghis Khan) encounters a large Jin army which he has to reduce in power by either triggering a landslide to destroy part of their army (Placed Event near rocks triggering Take Creatures script on army), luring a group of Frenzied Gnashers into attacking them (quest hut giving them to him), and poisoning an oasis they are drinking from (the debuffs). Earlier in the map, Temujin will have the chance to select an Advanced Class, with his choice conferring special abilities (dual might classes get Attack and Defence boosts, dual magic classes get spells unlocked automatically and extra mana and speed, mixed might/magic classes get morale and luck boosts). This will also determine how specific quests can be completed (as is the case here).

On a side note, is there a solution to the Decrease Luck/Morale script bug?

User avatar
iLiVeInAbOx05
Equilibris Team
Equilibris Team
Posts: 705
Joined: 21 Jul 2014

Re: HoMM IV - Possible to script spells to cast at start of battle?

Postby iLiVeInAbOx05 » Aug 6 2022, 14:22

Well, you could start by giving the enemy hero certain artifacts that give them buffs, and then if they need to be debuffed based on the player's choice you can debuff the hero by removing those artifacts.

You can also give the hero certain spells based on the player's class, so the hero gets weaker spells if they are supposed to be debuffed.

Just a couple thoughts off the top of my head. Might think of others later :)

Khannot
Leprechaun
Leprechaun
Posts: 4
Joined: 05 Aug 2022

Re: HoMM IV - Possible to script spells to cast at start of battle?

Postby Khannot » Aug 8 2022, 14:19

That's a brilliant idea! Very clever, especially as a way to circumvent morale/luck bugs. I suppose I could give the heroes artifacts like the Sword of the Gods and Adamantine Shield, which boost their creatures, then 'debuff' the creatures by taking those away.

Alternatively, I think I'll set a morale/luck debuff using a placed event (which Iirc doesn't bug) and debuff the heroes' stats and mana (so no spellcasting for them). This will render the spellcaster mostly powerless and allow the tactics hero to be killed off quickly, thereby 'debuffing' the army by removing his bonuses. Might go with the latter as it's a bit more telegraphed and thus easier for the player to see the significance of their actions. Will definitely keep the artifact removal idea in mind though.

Thanks a lot!

User avatar
iLiVeInAbOx05
Equilibris Team
Equilibris Team
Posts: 705
Joined: 21 Jul 2014

Re: HoMM IV - Possible to script spells to cast at start of battle?

Postby iLiVeInAbOx05 » Aug 8 2022, 14:21

No prob, glad I could help!

Khannot
Leprechaun
Leprechaun
Posts: 4
Joined: 05 Aug 2022

Re: HoMM IV - Possible to script spells to cast at start of battle?

Postby Khannot » Aug 8 2022, 14:22

Another question: As a mapmaker, how do you ensure that battles are balanced, especially for different difficulties? Do you just test manually until you get it right, or is there a rough way to gauge whether a fight is winnable (like DnD CR or whatever)?

On my first map, which is mostly hero-based with no mines (thinking of adding some weekly ones) and recruitment only from a few dwellings, I think that fights might be way too easy on lower difficulties and too difficult on higher ones. At least, that's what's happened in the tests I've run.

An additional issue is the balancing between subclasses. I think some subclasses (Demonologist) may have a far easier time than others. Is this likely? Is there any way to fix it?

(Should this be its own topic?)
Last edited by Khannot on Aug 8 2022, 14:25, edited 1 time in total.

Khannot
Leprechaun
Leprechaun
Posts: 4
Joined: 05 Aug 2022

Re: HoMM IV - Possible to script spells to cast at start of battle?

Postby Khannot » Aug 8 2022, 14:22

iLiVeInAbOx05 wrote: Aug 8 2022, 14:21 No prob, glad I could help!
:)


Return to “Mapmaking Guild”

Who is online

Users browsing this forum: No registered users and 1 guest