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 > Library of Enlightenment > Thread: New Spells Plugin, The
Thread: New Spells Plugin, The This thread is 4 pages long: 1 2 3 4 · NEXT»
AlexSpl
AlexSpl


Responsible
Supreme Hero
posted October 05, 2021 12:27 PM
Edited by AlexSpl at 19:13, 26 Nov 2021.

New Spells Plugin, The

Quite recently (August) I was challenged with a task of adding new spells to the game via a plugin for the HD mod. I said then that it's quite easy to implement, meaning the very core mechanics.

Now I and Rolex, another user from HandBookHMM (who is the graphic designer of the project btw), can present the plugin which actually allows you to add new spells, with some spells already added by us as examples.

16 new spells have been added (well, some of them are not quite new, but we don't have a lot of original graphics and animations anyway).

Earth Magic: Poison, Disease, Fear, Death Cloud, Drain Life
Fire Magic: Mobility, Age, Death Blow, Behemoth's Claws, Incineration, Explosion, Summon Firebird
Water Magic: Toughness
Air Magic: Eye of the Magi, Summon Sprite
And Summon Magic Elemental which went to every magic school.

All spell work and AI can use them, except Mobility.

This plugin is compatible with SoD 3.2 and Complete Edition with HD mod, and doesn't work with ERA/WoG properly. This plugin is also compatible with the vanilla SoD 3.2 (without HD mod), if you prefer to play the way your ancestors did







Download

New Spells Plugin v1.01

How to install

Copy NewSpells folder to _HD3_Data\Packs folder. Then just add our plugin in the HD Launcher.

Make sure to delete all old resources from _HD3_Data\Common folder, if you tested previous versions.

I recommend to test it on a fresh Heroes 3 installation, as the savegame format used by the plugin is incompatible with the original savegame format because of the new spells, particularly due to storing info for Mobility and Eye of the Magi spells (the plugin doesn't replace the original spells though, it really adds new ones).

Wanna add your own spells?

As a bonus you can add a real game changer called Water Shield if you follow the steps from this guide that will teach you how to add new spells to the game.

If you know how to write plugins, you may try to add your own spells as well. The source code is attached.

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

Tavern Dweller
posted October 05, 2021 02:28 PM

[link:http://www.google.com]your link text[/link]
[link="http://www.google.com"] google [/link]
[url=http://www.google.com] google[/url]
<a href="https://www.Google.com"> google </a>
[google](http://www.google.com)
[[http://www.google.com|google ]]
[http://www.google.com google ]
[a=http://www.google.com] google[/a]
[Google](https://www.google.com/)
"link text":http://link.com/
[url "https://www.google.com/"]Google[/url]

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

Tavern Dweller
posted October 10, 2021 12:02 AM
Edited by Mahno at 00:04, 10 Oct 2021.

AlexSpl said:
Quite recently (August) I was challenged with a task of adding new spells to the game via a plugin for the HD mod. I said then that it's quite easy to implement, meaning the very core mechanics. Now I and Rolex, another user from HandBookHMM (who is the graphic designer of the project btw),

That's all well, but: 1) only summoning spells have effects; 2) will people be able to add the spells they want themselves?

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


Honorable
Supreme Hero
Modding the Unmoddable
posted October 10, 2021 07:41 AM
Edited by NimoStar at 07:44, 10 Oct 2021.

Very good!

Could you take a look at this, since you have the abilities? I "challenge" you as well And maybe could even pay for such plugin.

http://heroescommunity.com/viewthread.php3?TID=47071
https://github.com/RoseKavalier/H4MS

I have found all that's necessary for adding and configuring new mass spells to Heroes 4, but solely because of lack of hex space, no new can be added. A very simple plugin could take care of that and allow for unlimited mass spells.

______________

It's somewhat sad that the only other answer to this seem to be bots.
____________
https://www.moddb.com/mods/heroes-iv-ultimate/

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


Responsible
Supreme Hero
posted October 10, 2021 05:59 PM
Edited by AlexSpl at 18:02, 10 Oct 2021.

Quote:
That's all well, but: 1) only summoning spells have effects; 2) will people be able to add the spells they want themselves?

Sorry for lack of description, I'm still working on the plugin. And yes, you can add new spells, those which are not complicated, you can add already by adding cases into applySpell() and resetSpell() functions.

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


Adventuring Hero
posted October 10, 2021 07:01 PM
Edited by VIP at 21:03, 10 Oct 2021.

Wow
It's possible add new artifact (SoD) this method?


Edit:
It's very nice mod. "Fear" probably doesn't work for "shooting" enemy, becasue he doesn't move (how blind). Deadth blow in my creature hehe - I thinked It's error hehe xDD. Poison and sprite maybe change to best photo?, BUT IT"S VERY COOL - Nostalgia SoD ! Adding maybe new effect (new spell) "turn to stone"

Edit2:
Polish font doesn't support :/. Fear for normal -> How working move % ban or nothing - slow? Upper had 2-time, 3-time cost. If I good calculate 25%?

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


Responsible
Supreme Hero
posted October 10, 2021 09:40 PM
Edited by AlexSpl at 21:54, 10 Oct 2021.

Quote:
Polish font doesn't support :/. Fear for normal -> How working move % ban or nothing - slow? Upper had 2-time, 3-time cost. If I good calculate 25%?

Well, if your game supports Polish, the plugin does also. Just change descriptions in NewSpells.ini.

Fear, and how it works.

Well, I wanted it to work as close to the original descriptions we have. But now, that spell also changes retaliations power: 50% at Basic Earth Magic, 25% at Advanced, and no retaliation at Expert. AI shooters just defend, melee units move, but don't attack. AI also can cast it just like the rest of the new spells.


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


Adventuring Hero
posted October 10, 2021 10:22 PM
Edited by VIP at 21:40, 02 Nov 2021.

I changed descriptions, but mod doesn't support (I too polish fonts - original SoD) : ((

I analizing, I think this:

Fear:
Default - Enemy doesn't attack AND 25% slow move
Basic - Default AND half cost reduct spell
Advanced - Basic AND +25% slow move
Expert - Basic AND 2*25% (seperate) slow move

retaliations power?
Added more upper analizing?

Fear (?):
Default - Enemy doesn't attack AND 25% slow move
Basic - Default AND half cost reduct spell ||retaliations power: 50%||
Advanced - Basic AND +25% slow move ||retaliations power: 25%||
Expert - Basic AND 2*25% (seperate) slow move


Edit:
Look only "new spell" broken language => others works
https://i.ibb.co/r4YLJRd/obraz.png - IMAGE

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


Responsible
Supreme Hero
posted October 11, 2021 12:02 AM
Edited by AlexSpl at 00:24, 11 Oct 2021.

Maybe try to change encoding of NewSpells.ini from ANSI to your local?

OK, I think I understand why that happens. I use GetPrivateProfileStringA() function instead of Unicode version.

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


Honorable
Supreme Hero
Modding the Unmoddable
posted October 11, 2021 01:41 AM
Edited by NimoStar at 01:42, 11 Oct 2021.

As for the default implementation, I think adding the new spells mostly for Earth is bad for balance. Though I guess new stuff for Fire is good.

Also I see Magic ELemental is moved to air
____________
https://www.moddb.com/mods/heroes-iv-ultimate/

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


Responsible
Supreme Hero
posted October 11, 2021 02:56 PM
Edited by AlexSpl at 15:21, 11 Oct 2021.

Quote:
As for the default implementation, I think adding the new spells mostly for Earth is bad for balance. Though I guess new stuff for Fire is good.

Also I see Magic ELemental is moved to air

It's mostly because of the picture colors we have. You can move a spell to another school by changing its school_flags in the ini. Summon Magic Elemental has school_flags = 1 + 2 + 4 + 8 = 15, it means it belongs to all four magic schools.

2VIP: Can you change the encoding of the NewSpells.ini to UTF-8 (use Notepad++ for example) and type Polish letters directly?

It seems the game uses a single byte to encode Polish letters. From my old Delphi project:


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


Responsible
Supreme Hero
posted October 11, 2021 06:25 PM
Edited by AlexSpl at 14:14, 16 Oct 2021.

Short descriptions of new spells.

Poison

Poison reduces Health by 10%/20%/30% at Basic/Advanced/Expert Earth Magic once cast and then by 10% the next 2 rounds. Can be dispelled unlike the original Poison. Wyvern Monarchs cast new Poison at Basic. Duration - SP rounds.

Disease

Disease reduces Attack and Defense by 2, Speed by 20% at Basic Earth Magic, Attack and Defense by 4, Speed by 40% at Advanced Earth Magic. The spell has a mass version on Expert Earth Magic. Zombies cast new Disease. Duration - SP rounds.

Age

Age reduces Health by 30%/40%/50% at Basic/Advanced/Expert Earth Magic. Duration - SP rounds.

Fear

Fear reduces Speed by 25%/50%/75% at Basic/Advanced/Expert Earth Magic. Units cannot attack and retaliate only with half strength at Basic Fear, with only 25% of their strength at Advanced, no retaliation at Expert. Duration - SP rounds.

Death Cloud

Works as Fireball, but do 30/60/120 + 40 * SP damage at Basic/Advanced/Expert Earth Magic. Undead immune to Death Cloud.

Death Blow

Works like the ability of Dread Knights but with 20%/40%/60% chance at Basic/Advanced/Expert Fire Magic. Duration - SP rounds.

Drain Life

Works like the ability of Vampire Lords, but restores 30%/40%/50% of damage as Health. Cannot be cast on Stone/Obsidian Gargoyles, Golems, Elementals, and Vampire Lords themselves. Duration - SP rounds.

Summon Sprite

Summons 10/15/20 * SP Sprites at Basic/Advanced/Expert Air Magic.

Summon Magic Elemental

Summons 1/1.5/2 * SP Magic Elementals at Basic/Advanced/Expert. Belongs to all four Magic Schools.

Summon Firebird

Summons 0.5/0.75/1 * SP Firebirds at Basic/Advanced/Expert Fire Magic.

Mobility

Gives +300 MP to your hero. Can be cast 1/2/3/4 times at None/Basic/Advanced/Expert Fire Magic a day.

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


Adventuring Hero
posted October 11, 2021 06:56 PM
Edited by VIP at 18:59, 11 Oct 2021.

I had set UTF-8 :/.

Example Text Fear:


; Spell #81
[Fear]
enabled=1
type=1
wav_name=FearRoE.wav
animation_ix=83
flags=132117
short_name=Strach
name=Strach
level=4
school_flags=8
mana_cost_0=16
mana_cost_1=8
mana_cost_2=8
mana_cost_3=8
eff_power=0
effect_0=75
effect_1=75
effect_2=50
effect_3=25
castle=0
rampart=0
tower=5
inferno=10
necropolis=15
dungeon=10
stronghold=0
fortress=0
conflux=5
ai_value_0=50
ai_value_1=50
ai_value_2=100
ai_value_3=150
description_0={Strach}nnDoprowadza wrog&#261; jednostk&#281; do takiego strachem, &#380;e staje si&#281; ona niezdolna do ataku i omal niezdolna do poruszania.n
description_1={Strach - poziom podstawowy}nnDoprowadza wrog&#261; jednostk&#281; do takiego strachu, &#380;e staje si&#281; ona niezdolna do ataku i omal niezdolna do poruszania.nnRedukuje koszt zakl&#281;cia o po&#322;ow&#281; ni&#380; w przypadku normalnego zakl&#281;cia.n
description_2={Strach - poziom zaawansowany}nnDoprowadza wrog&#261; jednostk&#281; do takiego strachu, &#380;e staje si&#281; ona niezdolna do ataku i omal niezdolna do poruszania.nnKara za ruch jest dwukrotnie wy&#380;sza od poziomu podstawowego.n
description_3={Strach - poziom mistrzowski}nnDoprowadza wrog&#261; jednostk&#281; do takiego strachu, &#380;e staje si&#281; ona niezdolna do ataku i omal niezdolna do poruszania.nnKara za ruch jest trzykrotnie wy&#380;sza od poziomu podstawowego.n



I don't know good understand logic "working spell"


---
edit. Ah HC parset charset (

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


Responsible
Supreme Hero
posted October 11, 2021 07:03 PM

Can you share your Polish sptraits.txt file? I want to see which encoding you use.

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


Adventuring Hero
posted October 11, 2021 07:34 PM

sptraits.txt ?
It's in h3 resources? You have discord?

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


Responsible
Supreme Hero
posted October 11, 2021 07:41 PM

No, I haven't. Use a file sharing service.

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


Adventuring Hero
posted October 11, 2021 08:00 PM
Edited by VIP at 20:01, 11 Oct 2021.

Link (original polish):  https://megawrzuta.pl/download/f373ff77ad75391b99bb6446ca21c87c.html

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


Adventuring Hero
posted October 11, 2021 08:12 PM
Edited by VIP at 20:13, 11 Oct 2021.

You know how cast spell for all creatures? I see only -1, 0, 1
ally, elements (ally orange), enemy

///

I thinked maybe in future "I want add support new spell for Sword Of Frost", animation frozen, when i have artifact (how armagedon). Feature for my mod Heroes Chronicles SoD.

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


Responsible
Supreme Hero
posted October 11, 2021 08:22 PM

Try to open NewSpells.ini in Notepad++, choose Windows-1250 encoding and type some Polish letters. What do you see in the game?

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


Adventuring Hero
posted October 11, 2021 08:28 PM
Edited by VIP at 20:32, 11 Oct 2021.

It's same bug.



Edit.

Ah working my mistaces, conversion change my polish charset!
Thank you!

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Jump To: « Prev Thread . . . Next Thread » This thread is 4 pages long: 1 2 3 4 · NEXT»
Post New Poll    Post New Topic    Post New Reply

Page compiled in 0.0599 seconds