Skip to content

Posts from MEGApack update.

5.0 (2 ratings)
Closed
How do we update the megapack?
9 voters
Single choice Closed 2021-03-15
This poll is closed.
Update by adding creatures to the main pack.
0% 0 votes
Update by creating a new file, MegaPack_upd.pak
77.8% 7 votes
Creatures should be added to the archive as separate files so that they can be deleted/modified individually
11.1% 1 vote
Create a setup file for the megapak, with automatic extraction of creatures into the megapack_upd file
11.1% 1 vote
5 years ago
Auto-translated
It crashes with an error, just like I showed in a video in another thread.
Either it doesn't leave any logs, or it leaves them somewhere unknown, and I can't find them. The error message only says that a certain executable was launched.

What's the problem with you testing it on a random map in Guild Fort and getting the same result?

What's there to talk about? Look at the files for the Dendroids; everything works correctly there, by analogy. Although, I arrived at the correct updates even without the Dendroids.

CREATURE_221
CREATURE_222


Added 18 minutes ago
But, to get to the essence of the problem, it's already clear even without the log. It's either not there or can't be found, but the problem is that the game goes into Guild Fort, launches the handler, sees that the creature has updates, and then goes there. It looks for what is hidden behind the lines CREATURE_TURGAK and CREATURE_GAPLAN, finds nothing, crashes with an error, and sends a message to Windows .

This is another example of why updates for neutral creatures are not very good, ESPECIALLY if they are suddenly split into different packs. On the English forum, there's a giant mod, and the updates there are also defined through CREATURE_DIGIT, but in different packs, and it turns out that one pack doesn't work without the other because they are dependent.

In this case, everything is fine, but to fix the problem, you just need to specify numerical updates instead of string ones.
I've seen that in the scripts, there's something like CREATURE_TURGAK = 458, just like for the Dendroids. But there are no source files for the executable, and no one knows in what order these lines are loaded and why the game can't find them.

When creating the NCF in the startup scripts, there's a loading of 999 creatures and assigning them numbers from another script. But no one knows how the pack scripts are loaded. There's no forced loading of them in the startup scripts, and some even made creatures without a scripts folder, which work. This isn't very good because it's a hint to the person about what creature is in the pack.
User Avatar
5 years ago
Auto-translated
@**vasik**, if I could run the game, I wouldn't ask!

*

By the way, if anyone is willing, please create a map where the main hero is the Necromancer Kaspar, and near his castle there is a "Fort on a Hill"!
User Avatar
5 years ago
Auto-translated
Here you go, comrade Psatkha. I happen to have one right here among my maps (no; I just made it).
Attachments 1
1 file attached • Total size: 53.0 KB
In reply to }{0TT@6bI4
User Avatar
5 years ago
Auto-translated
vasik
Another example of why neutral unit updates aren't very good, ESPECIALLY if they are suddenly split into different packs.
There's a giant on the English forum, and the updates there are also written through CREATURE_DIGIT, but in different packs, and as a result, one pack doesn't work without the other. Because they are dependent.
This isn't a problem with neutral unit upgrades. And certainly not ANOTHER example. What were the previous examples?

The problem here is the confusing and non-optimal file structure created by a specific modder. And the fact that it's difficult for you to understand. That's all.
Specifically, in this case, if I understand the situation correctly, you simply didn't notice that they gave the unit a text ID instead of leaving the default numerical one. If I understand correctly, please explain how it happened that you didn't notice, and the problem is somehow with the neutral units?

Regarding the structure, that's a separate issue and it is indeed a problem.
I've written a lot about creating a universal, optimal file structure that I used to create mods. I described why it's more convenient and why it's many times faster to work with. So much faster that this structure can save you several hours.
You can read about it with examples here.
In reply to zahar0z
User Avatar
5 years ago
Auto-translated
Standing on asphalt in ski boots... Well, you know what happens next. All exception files have been added. EWA version. I followed the scheme (according to the video). It complains about this line: `name, id_ = lua_content.replace(" ", "").strip().split("=")`
Attachments 2
2 files attached • Total size: 103.8 KB
5 years ago
Auto-translated
I reattached the file. Apparently, I just uploaded the wrong version somewhere (raise instead of the correct continue. You can find and replace it on line 119 without downloading the new file). If something doesn't work here, I'll write to you in a private message. So, how are things going with the Asker? I've already fixed it myself, and it works fine in the Guild Fortress, and I even pointed out in detail where the problem was. But maybe testing on that map will reveal something else?
Attachments 1
1 file attached • Total size: 6.7 KB
In reply to vasik
User Avatar
5 years ago
Auto-translated
vasik
But maybe the tests on that map will reveal something different?

I don't know, I haven't gotten to the computer with HoMM5 installed yet... I'll check it out myself and let you know!
5 years ago
Auto-translated
I'd like to clarify one point regarding the update procedure itself?
Please let me know where I am wrong.

So:

0. 5. The most important part about the exe.
Based on https://github.com/Might-Magic-Heroes-5-5/MMH55/blob/master/Frameworks/NewCreatureFramework/NewCreatureFramework.yml#L28

Checked 0x006E1A20 and 0x006E1A21 (I have standard NCF heroes without other changes, where the number of creatures is 1000)

E8 03 (0x3e8 = 1000 - current value)
meaning if I want 3k for myself, I should set (0xbb8), so by analogy it will be
0x006E1A20 => E8 -> B8
0x006E1A21 => 03 -> 0B

Based on https://github.com/Might-Magic-Heroes-5-5/MMH55/blob/master/Frameworks/NewCreatureFramework/NewCreatureFramework.yml#L22
0x006CA781 => E8 -> B8
0x006CA782 => 03 -> 0B

Simplifying all this, the new exe should differ from the old one by the 4 bytes mentioned above.


1. Overwriting types.xml (a new fresh pack containing a new file) -

-> then look for /GameMechanics/RefTables/Creatures.xdb#xpointer(/Table_Creature_CreatureType)
And a parallel db_id node to this one, where there are and a list of creatures.
Currently, standard creatures are listed there, then CREATURE_181 (and 180 is the thunder bird), and so on up to CREATURE_999.

Essentially p1 is xml expansion.

2. CreatureType
Two nodes below are lists like this,

CREATURE_185
185
expand by analogy

3. Table_Creature_CreatureType via search, two nodes below, change the 3rd occurrence of ref_table_num_objs to X+1? (I didn't quite understand why 1000 if there are originally 999 creatures)?
4. GameMechanics\Creature\Creatures\Neutrals\Creature _XXX.xdb throw a million files here

5. UI\UIGameRoot\ xdb \ - expand by analogy
6. Cameras\Interface\HireCreatures\Creature_XXX.(Came ra).xdb -> add by analogy

7. create such files with clear content Scripts/creature_XXX.lua
8. Scripts/common.lua by analogy doFile("/scripts/creature_180.lua")
9. But as for index.bin, it's completely unclear.

If I manage to finish the work today, an auto-generator can be made for the first 8 points.
main question - DID I FORGET ANYTHING HERE?

Source https://heroes5.fandom.com/wiki/New_Creature_Framework_(NCF)

If I don't do p9 (since I have no idea how, and I won't click 3k by hand), will it work? In theory, it's only for the editor, but will the creatures work normally?

Added after 19 minutes
Forgotten due to inattention

GameMechanics\RefTables\Creatures.xdb by analogy
User Avatar
5 years ago
Auto-translated
9) In my opinion, there isn't a better tool for editing index.bin than the map editor itself.

Basically, you need someone with 10,050 free hours who will spend their time adding creature files to GameMechanics (I believe that only these files should be kept "visible"), as well as AdvMapObjectLink.

The first task hasn't been completed for the first 810 creatures, and now it's impossible to do (or if you do, you have to start over), so you can skip it when developing the remaining 2,000 creatures. Besides, you can work with each individual file using workarounds 🤔

As for AdvMapObjectLink, you can do it through the editor (this is a very quick process), about 30 seconds per creature (relatively fast). But then the editor will be cluttered with two thousand added creatures, making it difficult to find the one you need. So, I think point 9 can be skipped.
5 years ago
Auto-translated
Something seems to be missing in the instructions? 1) Modified the executable (section 3.1 from the website) 2) Modified the types (section 3.2 from the website) 3) Modified GameMechanics/Creature/Creatures/Neutrals (section 3.3) 4) Added Creatures\Neutrals (section 3.4) 5) Modified UI \ gameroot (section 3.5) 6) Added Cameras (section 3.6) 7) Did not touch index.bin; took it from the existing ncf_core 8) Did not touch AdvMapObjectLink 9) Modified Scripts / common.lua (section 3.10) 10) Added Scripts / creature_xxx.lua However, it doesn't work as I expected. Specifically, I'm running the modified H5_Game.NCF_3000.exe. I'm adding creature 2993 to my game and giving it to a hero. I have a blank creature with stats of 1 and a reference to the SNOW_APE template. When I try to use creature 3993, it simply doesn't appear; this part is working correctly. My problem is that, DESPITE having the pack, I have a placeholder creature. If I delete the original NCF__Core.pak (leaving NCF__Core_3000.pak), all the NCF creatures turn into placeholders. I've attached an archive containing NCF__Core_3000.pak. What did I miss? I think we can rule out overwriting gGameMechanics/Creature/Creatures/Neutrals/Creature_XXX as a new file based on the date. Because I made 2993 an older file. Plus, when both NCF__Core.pak and NCF__Core_3000.pak are present, the existing creatures are displayed correctly. So, something is simply missing. Please look at the text files inside NCF__Core_3000.pak. What's missing?
5 years ago
Auto-translated
Interesting observations, though.

The problem was indeed in _AdvMapObjectLink. I made the change, and everything is now working correctly for the new creature.

HOWEVER - the new creature, 2993, is displayed correctly, but the older ones are not.

This is because the files added to the game mechanics, or more likely in the links or somewhere else - are newer, and they are read over the already added creatures.

In other words, if we add the Core with new files, we need to update all the creature packs with at least a minimal edit so that they are newer and read over the blank creatures. Because replacement files are read based on their date.

I will re-upload the files and think about what to do with the problem of the older (by date) creature pack files.

Today, I added a proper new Core; yesterday, I mistakenly attached the standard one to this message.
Attachments 2
2 files attached • Total size: 23.6 MB
5 years ago
Auto-translated
Okay, I took a quick look at the files. It didn't find everything, it just found that the files exist and where they are located. For example: "463": {         "string_name": "CREATURE_HELL_KNIGHT",         "growth": 0,         "tier": 0,         "file": "NCF_UltraPack.pak"     }, This is most likely because the game mechanics or somewhere else expected to see Creature_463, but found CREATURE_HELL_KNIGHT. Those who followed the standard were found, judging by the list. In any case, at the very least, it's good that even for the names that weren't found, there's an understanding that the ID is occupied, and by whom. Regarding duplicates, if you decipher what came out, you have a list of conflicting IDs and their locations. In the list, the first one found is listed, and the duplicate is in the duplicate file. * In UltraPack, there's 771, which overlaps with "NCF_Rakshasa_noble.pak" in the list file. * "NCF_0811-0812_H7_Abbots_131020.pak" (811 Chaplains), "NCF_0809-0810_H7_Wardens_250620.pak" (810 Justiciars), "NCF_0809-0810_H7_Wardens_250620.pak" (809 Faith Guardians) overlap with something in UltraPack. * "NCF_darkdwarf_T6_by_fktifzobr_06022018.pak" (475 Lower-Cast Mummy) overlaps with "NCF_minor_mummy.pak". And so on. Regarding errors, I can say this about the Ifrits. I had the same issue. If the game now reads and, using AddHeroCreatures, can assign any of the Ifrits to a hero without problems, then nothing needs to be done. If it doesn't assign one of them, then you need to find the files from the game mechanics and, in Notepad++, select Encoding -> Encode to UTF-8 and save. One of the Ifrits has a non-standard encoding. It might be read by the game without problems, but it wasn't read during generation, so I had to edit one of the Ifrits for myself. I can't really say anything about the others, as I don't have the files. In general, what can be done is to fix the duplicates. I attached the files in the post above. NCF__Core_3000.pak contains the text content for the game with 3k creatures. In source_files, there's H5_Game.NCF_3000.exe with 4 bytes changed. You don't have to download it, you can change the original / NCF.exe using the programs you usually use for this, BUT (!) when doing this, using the core mentioned above, you must strictly change the original executable's maximum number of creatures to 3000. Because if you run that executable with the old NCF__Core, you'll get messages like "Empty pointer on creature #1000" or something like that. The Core is strictly designed for 3k. It's not particularly difficult to redraw it for another value, but I think it would take many people a long time to configure it. Also, as a side effect, after applying the pack, you'll have to update all the creature files with a minimal edit to update the modification date. If a large 2-3k pack is ready, I can do that too
5 years ago
Auto-translated
Psatha, I'll clarify regarding the asker.
http://c2n.me/4b6Z0ny here's the screenshot.
Honestly, I would never have thought to call this a log (at the very least, a log that would be recorded by Heroes 5). Regarding the other topic, I understood exactly what you need, otherwise I was just wondering what you want from me, what other logs are there in Heroes, what and where?).

At the same time, I rummaged through old files and remembered where the crash logs are in Windows,
I'll attach them in a more beautiful format
https://c2n.me/4b6Z6ET

Nevertheless, the reason for the crashes is the same as I described above.

And regarding the original topic, do the creatures themselves exist so that they can be added properly? Mine, together with the standard ones, won't even amount to half a kilo.
In reply to vasik
User Avatar
5 years ago
Auto-translated
vasik
Psatha, let me clarify about the "asker."
http://c2n.me/4b6Z0ny here's a screenshot.
Honestly, I would never have thought to call this a log (or at least a log that would be recorded by Heroes 5). Regarding the other topic, I now understand exactly what you need. I was sitting here wondering what you wanted and what other logs there are in the game and where to find them.

At the same time, I rummaged through the old files and remembered where the Windows crash logs are located.
I'll attach them in a more presentable format.
https://c2n.me/4b6Z6ET

Nevertheless, the reason for the crashes is the same as I described above.

And regarding the original topic, do the creatures themselves exist, so that they can be properly added? Mine, together with the standard ones, don't even amount to half a kilobyte.
Basically, I needed the offset address... tomorrow, i.e., today, I'll take a look at what exactly is located there!
By the way, does the crash occur immediately when the hero enters "Fort on the Hill" or when choosing an upgrade?!

Statistics

Welcome our newest member: recijeb