Majesty Gold HD

Majesty Gold HD

Palandus Mar 20, 2016 @ 9:19pm
Setting Hero Levels for Powerful Spells
I've found that it is possible to give heroes spells from monsters, ie Vortex (ie Witch King), Magic Mirror (ie Vampire), or Horrify (ie Abomination), but the spell is given to the hero at LV 1, when they are first created, and thus they start with all these super powerful spells when hired. I've also been able to give heroes other hero spells or spells from magical items, ie Stoneback's Shield effect.

I was wondering if anyone has found a way to set specific spells to a set level. ie Have the wizard automatically learn Vortex at LV 10.

Additionally, I also notice that trying to give heroes what are traditionally Sovereign spells, ie Vigilance, Resurrection, or Wither, causes the game to crash. Note crash, not Runtime Error. Anyone know how to make it so that they don't crash the game the moment a hero tries to cast them?

Finally, is there a preset maximum number of spells a hero can have? I just ask in case the crash may have been because the hero has 10 or more spells, rather than the spells being the problem.
Last edited by Palandus; Mar 20, 2016 @ 9:21pm
< >
Showing 1-5 of 5 comments
Andi Mar 20, 2016 @ 10:02pm 
I am very interested in giving heroes soverign spells. The thing is though, do they "know" what to target with them? Like vines for example, say a cultist knows it and decides to use it. The player usually clicks on the enemy to cast it, so there might not be any codeing that tells the hero what to cast that spell on in the way that monks can buff themselves, or wizards can cast at enemies. The spell might need some nugget of code that says "Hey, this is what you cast me on!"

I'd take a very close look at the code for some of the other spells and see if you can gleam anything from them.
Palandus Mar 20, 2016 @ 10:56pm 
Ok thanks!

I figure that may be problem, that there is no functional code available for designating a target. However, I feel it may be possible, as the Special Items sometimes derive their effect from a Sovereign Spell.
Hassat Hunter Mar 22, 2016 @ 3:34pm 
They are special versions of said power, not the same sovereign power. You may notice however Wind Storm, that's granted through a Krolm's Anvil item, doesn't work.
dmolnar Mar 5, 2017 @ 4:57am 
The problem is that "monster spells" have no level pre-conditions, as monsters have no level. So when you add them to a hero, they will appear at lvl. 1.
I've tried to "duplicate" the spells at the "spells.gpl," for example creating a "Magic Mirror - priestess spell lvl 4," (while keeping the original "monster spell" as well), then add it as a mod. So far it didn't worked, but I'll let you know if I found a solution.
dmolnar Mar 5, 2017 @ 9:59am 
Aaand I solwed the problem.
I used your "better heroes mode".
The task is to create a new heroes spell - which has all the values of the original "monster" one. Creating a clone with different name.
1: - Clopy-paste it's GPL-info from the core Spell.gpl file. Give it a different name, like "krypta_magic_mirror_begin" and so on. Put it into your Heroes1.gpl, (or any other gpl) and create a bitecode from it.
2: At "Actions.xml," find the magic mirror, and clone it (into a new xml document, or just under the original one) as well. Rewrite it's Gpl-function and add the field "CharacterLevel value"(monster spells doesn't have it).
If you finished, it will look like this:
<Description type="Action" subType="Standard" ID="NRi1" Name="krypta_magic_mirror" Description="Magic Mirror">
<Engine version="1">
<ImageSet value="Cast"/>
<CompletionImageSet value="Stand"/>
<Sound value="Magic_Mirror"/>
<SoundPhase begin="Begin"/>
<Script type="0" cProc="0" GPLFunction="Krypta_Magic_Mirror_Begin"/>
</Engine>
<Game version="1">
<Flags value="IsSpell"/>
<EffectorDuration value="23000"/>
<TimeoutDuration value="55000"/>
<SpellType value="Attack"/>
<CharacterLevel value="5"/>
<SpellRank value="1"/>
</Game>
</Description>

3: Put it to the mod's DATA, and add it to the mmxml-path. Add the new spell to the heroes at the Heroes.xml file.

< >
Showing 1-5 of 5 comments
Per page: 1530 50

Date Posted: Mar 20, 2016 @ 9:19pm
Posts: 5