Skip to content

Posts from Attempt to add new spells and skills.

5.0 (1 rating)
In reply to vasik
User Avatar
#16
Auto-translated
vasik
I didn't manage to get anything working.

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

I attached the added file that I was using, changing the extension from zip to h5u. I added the extra spells, but they didn't appear anywhere. Maybe the xml just needs to be replaced directly in the data, rather than adding a new h5u, maybe I missed something somewhere, maybe it doesn't work, or maybe the byte is just incorrect???
Just download what I posted... and as for why 353 in decimal is 161h (hexadecimal) 01 61 - the bytes in the .exe go from least significant to most significant, i.e. 61 01, therefore 354 would be 162h - 62 01

It's better if the extension is .pak and the file should be located in the data folder

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

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

Anyway, it turns out that the .exe reserves an array for 354 elements, while in types.xml the array is defined for 353 elements!
<TypeName>Table_Spell_SpellID</TypeName>
<EnclosingNamespace>00000000</EnclosingNamespace>
<Attributes>
<__ClassTypeID>270064327</__ClassTypeID>
<__ObjectData>
<Attributes>
<Item>
<Key>ref_table_is_pointer</Key>
<Data>
<Type>04000000</Type>
<Data>true</Data>
</Data>
</Item>
<Item>
<Key>ref_table</Key>
<Data>
<Type>03000000</Type>
<Data/>
</Data>
</Item>
<Item>
<Key>ref_table_num_objs</Key>
<Data>
<Type>01000000</Type>
<Data>353</Data> вот тут должно быть 354

and a bit below:

			<Fields>
<Item>
<Type>a80da3ef</Type>
<Name>objects</Name>
<ChunkID>2</ChunkID>
<Description/>
<Constraints>
<Item>
<__ClassTypeID>270062596</__ClassTypeID>
<__ObjectData>
<MinElements>353</MinElements> тут тоже 354
<MaxElements>353</MaxElements> и тут 354
</__ObjectData>
</Item>
</Constraints>
<Attributes/>
<DefaultValue>
<Type>00000000</Type>
</DefaultValue>
<ComplexDefaultValue>
<Type>00000000</Type>
</ComplexDefaultValue>
</Item>
</Fields>

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

I attached the correct version to the post... you need to unpack it... put the file vasik_add_spells.pak in the data folder and you need to use the .exe - H5_Game_vasik.exe

I added an uber-freeze spell to Kaspar... check it in the game, unfortunately I can't do it myself since I can't launch the game at work!

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

Conclusion - most likely there's some handler in the .exe that calls the appropriate subroutine by the spell's name... the only hope is for spells like:

				<Item>SPELL_ABILITY_CUSTOM1</Item>
<Item>SPELL_ABILITY_CUSTOM2</Item>
<Item>SPELL_ABILITY_CUSTOM3</Item>
<Item>SPELL_ABILITY_CUSTOM4</Item>


With those, at least somewhat, but you can work... since the esteemed comrade Dyrman successfully uses them in NHF!

С уважением, Psatkha (Псатха)

---------------------------------------------

Неудачное планирование ведёт к неудаче ...

NCF - мод, добавляющий дополнительных существ в HeroesV 3.1
In reply to vasik
#17
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
#18
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!
С уважением, Psatkha (Псатха)

---------------------------------------------

Неудачное планирование ведёт к неудаче ...

NCF - мод, добавляющий дополнительных существ в HeroesV 3.1
#19
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
#20
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!
С уважением, Psatkha (Псатха)

---------------------------------------------

Неудачное планирование ведёт к неудаче ...

NCF - мод, добавляющий дополнительных существ в HeroesV 3.1
In reply to vasik
User Avatar
#21
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!
С уважением, }{0TT@6bI4
_________________
Группа картостроителей
Там ответы на вопросы, руководства, гайды и прочее
Discord-сервер "Герои 5: S.T.A.L.K.E.R"
Сервер по модификации "Герои 5: S.T.A.L.K.E.R"
_________________
In reply to vasik
User Avatar
#23
Auto-translated
Gerter, in the video example, are you activating the Berserker Rage spell on the zombies?
С уважением, }{0TT@6bI4
_________________
Группа картостроителей
Там ответы на вопросы, руководства, гайды и прочее
Discord-сервер "Герои 5: S.T.A.L.K.E.R"
Сервер по модификации "Герои 5: S.T.A.L.K.E.R"
_________________
User Avatar
#24
Auto-translated
I'm moving all the messages here!
С уважением, }{0TT@6bI4
_________________
Группа картостроителей
Там ответы на вопросы, руководства, гайды и прочее
Discord-сервер "Герои 5: S.T.A.L.K.E.R"
Сервер по модификации "Герои 5: S.T.A.L.K.E.R"
_________________
In reply to }{0TT@6bI4
User Avatar
#25
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
С уважением, Psatkha (Псатха)

---------------------------------------------

Неудачное планирование ведёт к неудаче ...

NCF - мод, добавляющий дополнительных существ в HeroesV 3.1
#26
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
#27
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!
С уважением, Psatkha (Псатха)

---------------------------------------------

Неудачное планирование ведёт к неудаче ...

NCF - мод, добавляющий дополнительных существ в HeroesV 3.1
In reply to psatkha
User Avatar
#28
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!
С уважением, }{0TT@6bI4
_________________
Группа картостроителей
Там ответы на вопросы, руководства, гайды и прочее
Discord-сервер "Герои 5: S.T.A.L.K.E.R"
Сервер по модификации "Герои 5: S.T.A.L.K.E.R"
_________________
In reply to }{0TT@6bI4
User Avatar
#29
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!
С уважением, Psatkha (Псатха)

---------------------------------------------

Неудачное планирование ведёт к неудаче ...

NCF - мод, добавляющий дополнительных существ в HeroesV 3.1
User Avatar
#30
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.
С уважением, }{0TT@6bI4
_________________
Группа картостроителей
Там ответы на вопросы, руководства, гайды и прочее
Discord-сервер "Герои 5: S.T.A.L.K.E.R"
Сервер по модификации "Герои 5: S.T.A.L.K.E.R"
_________________
#31
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.