Skip to content

Posts from Interface changes = crash. Auto-translated

No ratings yet — be the first to rate!
User Avatar
#1
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
#3
Auto-translated
Waterfall_13 Show what you've got, because it's really not clear at all. Maybe the link to Shared is wrong, maybe the data in the <Texture> file is incorrect (format or link). There could be a lot of things there — we won't be able to guess just like that.
Грешить, злодействовать, а равно и делать добро или совершать подвиги надо без натуги. А если с натугой — то лучше не надо.
К. Прутков-инженер. Мысль № 77.
Многие вещи нам непонятны не потому, что наши понятия слабы; но потому, что сии вещи не входят в круг наших понятий.
© Козьма Прутков
In reply to vova2112
User Avatar
#4
Auto-translated
vova2112
Waterfall_13 Show what you have, because it's completely unclear. Maybe the link to Shared is wrong, maybe there's incorrect data in the <Texture> file (format or link). There could be a lot of things there — guessing won't help.
Yes, of course, here let's look at how it happens on my end

And here I'm attaching a link to the UserInterface files used in the mod

LINK

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

Well, if we can't solve the problem, I'll have to abandon the fresh version of the mod, go back to the old one and rework it again to accommodate the changes that appeared in the new one (an extremely demoralizing prospect).
Ссылка на мой мод Heroes 5 Armageddons Blade

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

Ссылка на мой Artstation
In reply to Waterfall_13
User Avatar
#5
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
#6
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
#7
Auto-translated
Waterfall_13
These are the correct ClassTypeIDs:

<BackgroundSimpleScallingTexture>
    <ClassTypeID>285694784</ClassTypeID>

<BackgroundSimpleTexture>
    <ClassTypeID>285694785</ClassTypeID>

<BackgroundTiledTexture>
    <ClassTypeID>285694786</ClassTypeID>

Regarding mipmaps, you just need a simple rule - always disable their generation (if it's an interface texture).

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

<Type>REGULAR</Type>
<ConversionType>CONVERT_ORDINARY</ConversionType>
For selection and Highlight textures I use

<Type>REGULAR</Type>
<ConversionType>CONVERT_TRANSPARENT_ADD</ConversionType>
and
<Type>REGULAR</Type>
<ConversionType>CONVERT_TRANSPARENT</ConversionType>
The TF_8888 format (lossless) is the least picky about non-standard width and height dimensions; with other formats (TF_DXT1 - TF_DXT5, TF_565) sometimes you have to "play around with the canvas size".
in ...(Texture).xdb files these formats are used successfully:

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

EPA_HIGH_END - align to right\bottom edge
EPA_LOW_END - align to left\top edge
EPA_MARGIN - stretch across the entire screen
ERA_CENTER - position at center
can be used together with values (x\y) in the Position section; they won't be taken into account as long as the value in the Second section = false.

I also noticed that you're not working with buttons "correctly" - they can be combined into groups and track visual state
[spoiler=Something like this:]
you can combine them into a group where they will turn on when pressed and turn off when another button from the group is activated

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:
    <ButtonStates>
        <Item>
            <MessageOnEnterState/>
            <CommandsOnEnterState>
                <Commands/>
                <Reversable>false</Reversable>
            </CommandsOnEnterState>
            <CommandsOnRightClick>
                <Commands/>
                <Reversable>false</Reversable>
            </CommandsOnRightClick>
            <commandsOnLDblKlick>
                <Commands/>
                <Reversable>false</Reversable>
            </commandsOnLDblKlick>
            <WaitVisual>false</WaitVisual>
            <ReverseCommands>false</ReverseCommands>
            <Name/>
        </Item>
        <Item>
            <MessageOnEnterState/>
            <CommandsOnEnterState>
                <Commands/>
                <Reversable>false</Reversable>
            </CommandsOnEnterState>
            <CommandsOnRightClick>
                <Commands/>
                <Reversable>false</Reversable>
            </CommandsOnRightClick>
            <commandsOnLDblKlick>
                <Commands/>
                <Reversable>false</Reversable>
            </commandsOnLDblKlick>
            <WaitVisual>false</WaitVisual>
            <ReverseCommands>false</ReverseCommands>
            <Name/>
        </Item>
    </ButtonStates>
   <ButtonGroupID>1</ButtonGroupID>
    <AutoChangeState>true</AutoChangeState>
    <PushEffect>
        <Commands/>
        <Reversable>false</Reversable>
    </PushEffect>
    <State>0</State>
    <TextFileRef href=""/>
    <TextFormat/>
</WindowMSButton>
And in their Shared files add a handler for changing the visual state in "button press mode":

        <Item>
...
...
            <DefaultSubState>BST_NORMAL</DefaultSubState>
            <VisualOnEnterState>
                <Commands>
                    <Item href="Open.(UISSendUIMessage).xdb#xpointer(/UISSendUIMessage)"/>
                </Commands>
                <Reversable>false</Reversable>
            </VisualOnEnterState>
        </Item>
        <Item>
...
...
            <DefaultSubState>BST_NORMAL</DefaultSubState>
            <VisualOnEnterState>
                <Commands>
                    <Item href="Close.(UISSendUIMessage).xdb#xpointer(/UISSendUIMessage)"/>
                </Commands>
                <Reversable>false</Reversable>
            </VisualOnEnterState>
        </Item>
    </VisualStates>
    <TriggerMode>BCST_ON_PUSH</TriggerMode>
</WindowMSButtonShared>

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