Skip to content

Posts from Attempt to add new spells and skills.

5.0 (1 rating)
In reply to vasik
User Avatar
5 years ago
Auto-translated
vasik
Something didn't work for me.

According to the specified value, I have byte 97, and in your version, it's 98 (+1). It's not entirely clear why it's 97+, and not 353 - 354.

I've attached the added file that I used, changing the extension from zip to h5u. I was adding extra spells, but they didn't appear anywhere. Maybe you just need to replace the XML file in the date, and not add a new h5u file. Maybe I missed something, maybe it doesn't work, or maybe the byte is just incorrect???
Just download what I uploaded... and regarding why 353 in decimal is 161h (hexadecimal) 01 61 - the bytes in the .exe file go from least significant to most significant, i.e., 61 01, therefore 354 will be 162h - 62 01.

It's better to use the .pak extension, and the file should be in the data folder.

By the way, which version did you modify the types.xml file from?! It's significantly different from the one in 3.1!

In general, you did something wrong - that's why it didn't work...

So, the .exe file reserves an array for 354 elements, and the types.xml file has an array defined for 353 elements!
Table_Spell_SpellID
00000000

<__ClassTypeID>270064327
<__ObjectData>


ref_table_is_pointer

04000000
true



ref_table

03000000




ref_table_num_objs

01000000
353 this should be 354

and a little lower:

			

a80da3ef
objects
2



<__ClassTypeID>270062596
<__ObjectData>
353 also 354 here
353 and 354 here





00000000


00000000


In the .exe file, I only added +1, i.e., you need to conduct an experiment with one spell... for this, you need to replace 353 with 354 in these three places in the types.xml file.

I've added the correct version in the attachment... you need to unpack it... put the vasik_add_spells.pak file in the data folder and use the .exe file - H5_Game_vasik.exe

I added the uber-freeze spell to Kaspar... check it in the game, unfortunately, I can't, as I can't run the game at work!

In general, I added the SPELL_VASIK spell to Kaspar - I checked it on my laptop... in battle, this spell consumes mana, but nothing happens... absolutely nothing...

Conclusion - there is probably some handler in the .exe file that, based on the spell name, calls the necessary subroutine... the only hope is for spells like:

				SPELL_ABILITY_CUSTOM1
SPELL_ABILITY_CUSTOM2
SPELL_ABILITY_CUSTOM3
SPELL_ABILITY_CUSTOM4


At least you can work with them somehow... because the respected comrade Dyrman in NHF successfully uses them!

In reply to vasik
5 years ago
Auto-translated
your pack is completely broken; when it's present and any of the Heroes games are launched, it starts displaying messages like https://c2n.me/49LhsdJ, http://c2n.me/49LhtWL, and then it says the original version of the game cannot be found. As soon as the pack is removed, everything works fine. Mine was taken from data.pak; it's only found there. Yours has 2000 more lines, but it still doesn't work. I also fixed mine in 2 places as you suggested – nothing new happened. (The hero in question received the spells in the file; they're not in the book, everything is the same as yesterday.)
In reply to vasik
User Avatar
5 years ago
Auto-translated
vasik
Your pack is completely broken; when it's present and any of the heroes are launched, it starts displaying messages like https://c2n.me/49LhsdJ, http://c2n.me/49LhtWL, and then it says the original version of the game cannot be found. As soon as the pack is removed, everything is fine.

Mine was taken from data.pak; it's only found there. Yours has 2000 more lines, but it still doesn't work. I also corrected mine in 2 places as you wrote – nothing new appeared. (The required hero received the spells in the file; they're not in the spellbook, everything is as it was yesterday.)
Is 180 Screech NCF?!

Well, I don't know... my friend isn't a hardcore Heroes player... he just installed 3.0, applied patch 3.1, put the H5_Game_vasik.exe file in the bin folder, and the vasik_Kaspar_new_spell.pak file in the data folder.

He launches the game through the H5_Game_vasik.exe file on any standard map, selects Kaspar... and in battle, he sees one more spell in addition to Raise Dead!
5 years ago
Auto-translated
Could it be that the heroes are different? I tried it with your file and with my modified NCF file, but they don't appear even in the book. I launched it using both your EXE and the NCF file, but the result is the same. Version 3.1. Could it be that something is wrong with the byte number?
In reply to vasik
User Avatar
5 years ago
Auto-translated
vasik
Maybe the heroes are different? I tried it with your file and with my modified NCF, but they don't even appear in the book.

Added 58 seconds later
I ran both your EXE and the NCF, but the result is the same.

Maybe something is wrong with the byte number?
Forget about NCF for now.

You need to run the H5_Game_vasik.exe file on a clean, patched version of the game 3.1 - the presence of the vasik_Kaspar_new_spell.pak file in the data folder is mandatory!

Damn! Just do what I wrote above, and use those files! Or upload your version of the .exe here.

In general, as I suspected, the .exe contains a list of all the spells:

 SSZ00E66F28_SPELL_EFFECT_FIRST_AID_TENT_PLAG:
 SSZ00E66F4C_SPELL_ABILITY_CUSTOM4:
 SSZ00E66F64_SPELL_ABILITY_CUSTOM3:

So, who knows if the script method will work for the new SPELL_ABILITY_CUSTOM5 spell.

P.S. I checked CREATURE_... and all the standard creature identifiers are hardcoded into the .exe, so who knows... maybe it's for the command line debugger, or maybe for something else!

P.P.S. All my attachments need to be unpacked, not just renamed from .zip to .pak! The .pak is inside the .zip!
In reply to vasik
User Avatar
5 years ago
Auto-translated
Okay. I think we can start a new topic (an important one) to discuss this useful content, so as not to go too far off-topic. Do you mind?

Dear comrade psatkha, could you explain the mechanics of adding the scripted spell SPELL_CUSTOM_ABILITY5 again (in detail, please)? I couldn't figure it out from the information provided.

And based on these spells, it will be possible to give abilities (activated ones) to creatures, just as comrade Gerter noticed!

P.S. If you consider this discussion important enough, then there is nothing stopping us from moving all the messages above to a new topic!
In reply to vasik
User Avatar
5 years ago
Auto-translated
Gerter, in the video example, are you activating the Berserker Rage spell on the zombies?
User Avatar
5 years ago
Auto-translated
I'm moving all the messages here!
In reply to }{0TT@6bI4
User Avatar
5 years ago
Auto-translated
}{0TT@6bI4
Okay. I think we can start a new topic (an important one) to discuss this useful content, so as not to go too far off-topic. Do you mind?

Dear comrade psatkha, could you explain the mechanics of adding the scripted spell SPELL_CUSTOM_ABILITY5 again (in detail, please)? I couldn't figure it out from the information provided.

And based on these spells, it will be possible to give abilities (activated ones) to creatures, just as comrade Gerter noticed!

P.S. If you consider this discussion important enough, there is nothing stopping us from moving all the messages above to a new topic!
In the .exe file, I increase the size of the spell table by +1, then add a new spell to the types.xml file and to the GameMechanics\RefTables\UndividedSpells.xdb file.

Attached is an archive - you need to unpack the contents of the bin and data folders, which contain the .exe and .pak files, in which Kaspar has a new spell added - SPELL_CUSTOM_ABILITY5.
Attachments 1
1 file attached • Total size: 5.3 MB
5 years ago
Auto-translated
But what's the point of moving things around if it doesn't work and the changes don't help? When I took the original data for a regular game, launched the map, a gray spell appeared in the book. But I can't use it; it's always gray. It just exists, and that's it, no matter how I edit the files. As for NCF 0x0044bdc0, it's probably incorrect. The original NCF.exe has a value of 97 for it, and the modified and attached version has 98. Spells don't appear in the book, not even in gray. I had an incorrect XML file for NCF; I took a new one from NCF Core and made changes, but it doesn't help, not even for gray spells.
In reply to vasik
User Avatar
5 years ago
Auto-translated
vasik
What's the point of moving things around if it doesn't work and changes don't help?

I took the original data for a regular game, launched the map, and a gray spell appeared in the book. But I can't use it; it's always gray. It just exists, and that's it, no matter how I edit the files.

And for NCF 0x0044bdc0, it's probably incorrect. The original NCF.exe has a value of 97 for it; the modified and attached one has 98. Spells don't even appear in the book in a grayed-out state.

I had an incorrect XML file for NCF; I took a new one from NCF Core and made changes, but it doesn't help, even for gray spells.

Read the above... for now, forget about NCF – you need to experiment with a clean 3.1 version!
In reply to psatkha
User Avatar
5 years ago
Auto-translated
psatkha

In the .exe file, I increase the size of the spell table by +1, then I add a new spell to the types.xml file and to the GameMechanics\RefTables\UndividedSpells.xdb file.

Attached is an archive - you need to extract the contents of the bin and data folders, which contain the .exe and .pak files, in which Kaspar has a new spell added - SPELL_CUSTOM_ABILITY5.
Okay, thank you. We'll try changing the bytes in the .exe file as indicated above!
In reply to }{0TT@6bI4
User Avatar
5 years ago
Auto-translated
}{0TT@6bI4
Okay, thank you. And change the bytes in the .exe file, as indicated above. Let's try it!
There's no need to change anything – the complete set is attached to message #24!
User Avatar
5 years ago
Auto-translated
Thank you, I understand. I actually wanted to try making it myself. If it's not too much trouble, could you create a patch with spells up to and including SPELL_CUSTOM_ABILITY_10? Perhaps I'm asking for too much, but I hope...)

We'll need to organize the information and put it in the header.
5 years ago
Auto-translated
I'm telling you, in the simple version, there's a gray spell, and after that, it's useless.

NCF doesn't even have this, probably because the byte is incorrect.

Statistics

Welcome our newest member: recijeb