Skip to content

Posts from Interface changes = crash.

No ratings yet — be the first to rate!
User Avatar
Auto-translated
Does anyone from the interface development team know why the game might crash after making changes? Are there any strict limitations?

I tried to add a button to the sections of the lobby for single-player, multiplayer, and duels (with information). And it seems that after that, the game started crashing 5 seconds after the main menu appeared.
I don't understand what's going on. However, when I launch the old version of the mod, everything is fine.
I've already reverted the changes I made... but it still doesn't help.

P.S. If you delete the account from the C drive where it's created and launch the game again, it won't crash. However, after playing and exiting the game, and then trying to launch it again, the game will start crashing. So, you have to do this constantly (which means a major hassle for the player and loss of saves). In short, it's not an option.
Ссылка на мой мод Heroes 5 Armageddons Blade

Ссылка на мои уроки по модостроению в Героях 5

Ссылка на мой Artstation
User Avatar
Auto-translated
Waterfall_13 Show what you have, because it's not clear at all. Maybe the link to Shared is incorrect, or maybe the file contains incorrect data (format or link). There could be many reasons, but it's impossible to guess.
Грешить, злодействовать, а равно и делать добро или совершать подвиги надо без натуги. А если с натугой — то лучше не надо.
К. Прутков-инженер. Мысль № 77.
Многие вещи нам непонятны не потому, что наши понятия слабы; но потому, что сии вещи не входят в круг наших понятий.
© Козьма Прутков
In reply to vova2112
User Avatar
Auto-translated
vova2112
Waterfall_13 Show what you have, because it's not clear at all. Maybe the link to Shared is incorrect, or maybe the file contains incorrect data (format or link). There could be many reasons, it's just impossible to guess.
Yes, of course, here's how it works for me:

And here's a link to the UserInterface files used in the mod:

LINK

I would be very grateful if those "in the know" could browse the files; maybe you'll notice where the error occurred, where a character is missing.

If we can't solve the problem, I'll have to abandon the new version of the mod, revert to the old one, and rework the old one to accommodate the changes that appeared in the new one (a very demoralizing prospect).
Ссылка на мой мод Heroes 5 Armageddons Blade

Ссылка на мои уроки по модостроению в Героях 5

Ссылка на мой Artstation
In reply to Waterfall_13
User Avatar
Auto-translated
Waterfall_13
Here, I'm attaching a link to the UserInterface files used in the mod.
So, to report: I couldn't reproduce the crashes. Perhaps the files you sent weren't the right ones, because in the lobby for creating a multiplayer game (where the video showed a long loading time), the button you added is missing.
I noticed other errors:
- In the file [InfoWindows\Buttons\CreatureInfo\Conjunction\InfoB utton.(BackgroundSimpleTexture).xdb], the ClassTypeID is incorrect.
- Many dds files intended for the interface use mipmaps, which is very bad because when the graphics level is changed to below high, the game becomes unstable and crashes. (You need to abandon mipmaps in the interface textures, and where mipmaps are necessary, generate them in multiples of 4, as in the original game files).

Since I couldn't reproduce the error, I assume that the path to the working folder in the shortcut may have changed (I had a similar issue, and the game behaves unstably - it crashes at the beginning). Try launching the game without using the shortcut.
Also, don't forget about the d3d9.dll file, which may also have an impact
Грешить, злодействовать, а равно и делать добро или совершать подвиги надо без натуги. А если с натугой — то лучше не надо.
К. Прутков-инженер. Мысль № 77.
Многие вещи нам непонятны не потому, что наши понятия слабы; но потому, что сии вещи не входят в круг наших понятий.
© Козьма Прутков
In reply to vova2112
User Avatar
Auto-translated
vova2112
So, I'm reporting that I couldn't reproduce the crashes. You probably sent the wrong files because in the lobby for creating a multiplayer game (where the video showed a long loading time), the button you added is missing.
I noticed other errors:
- In the file [InfoWindows\Buttons\CreatureInfo\Conjunction\InfoB utton.(BackgroundSimpleTexture).xdb], the ClassTypeID is incorrect.
- Many DDS files intended for the interface use mipmaps, which is very bad because when the graphics level is set below high, the game becomes unstable and crashes. (You need to stop using mipmaps in interface textures, and where mipmaps are necessary, generate them in multiples of 4, like in the original game files).

Since I couldn't reproduce the error, I assume that the path to the working folder in the shortcut may have changed (I had a similar issue, and the game behaves unstably, crashing at the beginning). Try launching the game without using the shortcut.
Also, don't forget about the d3d9.dll file, which can also have an impact.

1) What ClassTypeID should it be?
2) I didn't know about mipmaps (I probably have them everywhere, considering the number of icons and other things; it's hard to clean up at this stage).
3) The path in the shortcut hasn't changed (the funny thing is that a couple of days ago, everything was fine, and then I started tweaking the interface a bit, and it started crashing).

4) d3d9.dll has been in the mod for about 3 years.

In general, it's clear that nothing is clear =)
In any case, thank you for taking the time to figure it out; not everyone would want to delve into someone else's mess 😅
Ссылка на мой мод Heroes 5 Armageddons Blade

Ссылка на мои уроки по модостроению в Героях 5

Ссылка на мой Artstation
In reply to Waterfall_13
User Avatar
Auto-translated
Waterfall_13
These are the correct ClassTypeID values:


    285694784


    285694785


    285694786

For mipmaps, you just need to define a rule – always disable their generation (if it's an interface texture).

Here are some more of my observations while working on the game's interface:
For regular textures in the ...(Texture).xdb files, the following structure has proven to be more stable:

REGULAR
CONVERT_ORDINARY
For highlight and selection textures, I use

REGULAR
CONVERT_TRANSPARENT_ADD
and
REGULAR
CONVERT_TRANSPARENT
The TF_8888 format (lossless) is the most tolerant of non-standard height and width sizes; with other formats (TF_DXT1 - TF_DXT5, TF_565), you sometimes need to "play around with the canvas size."
The following formats are successfully used in the ...(Texture).xdb files:

TF_565
TF_4444
TF_8888
TF_DXT5
TF_DXT4
TF_DXT3
TF_DXT1
Don't forget about precise positioning of elements

EPA_HIGH_END - align to the right/bottom edge
EPA_LOW_END - align to the left/top edge
EPA_MARGIN - stretch to the entire screen
ERA_CENTER - position in the center
You can use this in conjunction with the (x/y) values in the Position section; it will not be taken into account until the value in the Second section = false.

I also noticed that you're not working with buttons "correctly"; you can group them and track their visual state.
[spoiler=Something like this:]
You can group them in a way that they are enabled when clicked and disabled when another button from the group is enabled

To do this, in the files:
SpellsInfoTableButton.(WindowMSButton).xdb
BloodInfoTableButton.(WindowMSButton).xdb
CreatureInfoTableButton.(WindowMSButton).xdb
ElementInfoTableButton.(WindowMSButton).xdb
HeroesInfoTableButton.(WindowMSButton).xdb
NecroInfoTableButton.(WindowMSButton).xdb
Set:
   
       
           
           
               
                false
           
           
               
                false
           
           
               
                false
           
            false
            false
           
       
       
           
           
               
                false
           
           
               
                false
           
           
               
                false
           
            false
            false
           
       
   
   1
    true
   
       
        false
   
    0
   
   

And in their Shared sections, add a handler for changing the visual state in "button click mode":

       
...
...
            BST_NORMAL
           
               
                   
               
                false
           
       
       
...
...
            BST_NORMAL
           
               
                   
               
                false
           
       
   
    BCST_ON_PUSH


[/spoiler]
Грешить, злодействовать, а равно и делать добро или совершать подвиги надо без натуги. А если с натугой — то лучше не надо.
К. Прутков-инженер. Мысль № 77.
Многие вещи нам непонятны не потому, что наши понятия слабы; но потому, что сии вещи не входят в круг наших понятий.
© Козьма Прутков
In reply to vova2112
User Avatar
Auto-translated
vova2112
Waterfall_13

I also noticed that you don't work with buttons "correctly"; you can group them and track their visual state.

To be honest, I don't really understand buttons; at most, I can "move" them and add images in this art of interface design.
If you knew how I created the appearance of the main menu, you'd be amazed.

Ссылка на мой мод Heroes 5 Armageddons Blade

Ссылка на мои уроки по модостроению в Героях 5

Ссылка на мой Artstation

Statistics