2
\$\begingroup\$

I'm developing some additions to WH40K Armageddon and trying to add a Weapon 4 to units.

Game uses .gui file called unit_details.gui for when right clicking to a unit. Weapon 1, 2, 3 is exactly the same for each other and with this, I added a Weapon 4.

And in game's source files, I thought I added all necessary codes for Weapon 4.

But this doesn't work. It only writes "Weapon 4, 85, 85, 85, 1" and etc, not weapon's actual stats. But stats for Weapon 1, 2, 3 work well except for Weapon 4.

And in visual studio's console it writes: "Gui WARNING:Override class 'CUnitDetailsGui::Weapon4' not found". But I'm sure I added all necessary codes for Weapon4 in all related classes I found. There is none other class for Weapon4.

Do you have opinion what I'm not doing?

Here is an example in unit_details.gui file. All codes for Weapon 1 and 2 is exactly same as well.

[CUnitDetailsGui::Weapon3] RootElement
                                    {
                                        classOverride = "CUnitDetailsGui::Weapon3"
                                        offset = (294, 86)
                                        offsetRB = (700, 108)
                                        size = (406, 22)
                                        childs = {
                                            [Weapon::Range] Text
                                            {
                                                classOverride = "Weapon::Range"
                                                offset = (200, 10)
                                                font = "fonts/caslon.ttf"
                                                text = "85"
                                                textAlignX = CENTER
                                                textAlignY = CENTER
                                                fontSize = 14
                                                lineGap = 9
                                            },
                                            [Weapon::Damage] Text
                                            {
                                                classOverride = "Weapon::Damage"
                                                offset = (239, 10)
                                                font = "fonts/caslon.ttf"
                                                text = "85"
                                                textAlignX = CENTER
                                                textAlignY = CENTER
                                                fontSize = 14
                                                lineGap = 9
                                            },
                                            [Weapon::AP] Text
                                            {
                                                classOverride = "Weapon::AP"
                                                offset = (277, 10)
                                                font = "fonts/caslon.ttf"
                                                text = "85"
                                                textAlignX = CENTER
                                                textAlignY = CENTER
                                                fontSize = 14
                                                lineGap = 9
                                            },
                                            [Weapon::Ammo] Text
                                            {
                                                classOverride = "Weapon::Ammo"
                                                offset = (316, 10)
                                                font = "fonts/caslon.ttf"
                                                text = "3"
                                                textAlignX = CENTER
                                                textAlignY = CENTER
                                                fontSize = 14
                                                lineGap = 9
                                            },
                                            [Weapon::Accuracy] Text
                                            {
                                                classOverride = "Weapon::Accuracy"
                                                offset = (354, 10)
                                                font = "fonts/caslon.ttf"
                                                text = "35%"
                                                textAlignX = CENTER
                                                textAlignY = CENTER
                                                fontSize = 14
                                                lineGap = 9
                                            },
                                            RootElement
                                            {
                                                offset = (0, 1)
                                                offsetRB = (184, 22)
                                                size = (184, 21)
                                                childs = {
                                                    [Weapon::Name] Text
                                                    {
                                                        classOverride = "Weapon::Name"
                                                        offset = (5, 10)
                                                        font = "fonts/caslon.ttf"
                                                        text = "Weapon 3"
                                                        textAlignY = CENTER
                                                        fontSize = 15
                                                    }
                                                }
                                                crop = false
                                            },
                                            [Weapon::HexAccuracy] Text
                                            {
                                                classOverride = "Weapon::HexAccuracy"
                                                offset = (392, 10)
                                                font = "fonts/caslon.ttf"
                                                text = "10%"
                                                textAlignX = CENTER
                                                textAlignY = CENTER
                                                fontSize = 14
                                                lineGap = 9
                                            },
                                            [Weapon::TraitList] List
                                            {
                                                classOverride = "Weapon::TraitList"
                                                offset = (415, -2)
                                                offsetRB = (506, 24)
                                                size = (91, 26)
                                                childs = {}
                                                crop = false
                                            }
                                        }
                                        crop = false
                                    },
                                    [CUnitDetailsGui::Weapon4] RootElement
                                    {
                                        classOverride = "CUnitDetailsGui::Weapon4"
                                        offset = (294, 114)
                                        offsetRB = (700, 136)
                                        size = (406, 22)
                                        childs = {
                                            [Weapon::Range] Text
                                            {
                                                classOverride = "Weapon::Range"
                                                offset = (200, 10)
                                                font = "fonts/caslon.ttf"
                                                text = "85"
                                                textAlignX = CENTER
                                                textAlignY = CENTER
                                                fontSize = 14
                                                lineGap = 9
                                            },
                                            [Weapon::Damage] Text
                                            {
                                                classOverride = "Weapon::Damage"
                                                offset = (239, 10)
                                                font = "fonts/caslon.ttf"
                                                text = "85"
                                                textAlignX = CENTER
                                                textAlignY = CENTER
                                                fontSize = 14
                                                lineGap = 9
                                            },
                                            [Weapon::AP] Text
                                            {
                                                classOverride = "Weapon::AP"
                                                offset = (277, 10)
                                                font = "fonts/caslon.ttf"
                                                text = "85"
                                                textAlignX = CENTER
                                                textAlignY = CENTER
                                                fontSize = 14
                                                lineGap = 9
                                            },
                                            [Weapon::Ammo] Text
                                            {
                                                classOverride = "Weapon::Ammo"
                                                offset = (316, 10)
                                                font = "fonts/caslon.ttf"
                                                text = "1"
                                                textAlignX = CENTER
                                                textAlignY = CENTER
                                                fontSize = 14
                                                lineGap = 9
                                            },
                                            [Weapon::Accuracy] Text
                                            {
                                                classOverride = "Weapon::Accuracy"
                                                offset = (354, 10)
                                                font = "fonts/caslon.ttf"
                                                text = "35%"
                                                textAlignX = CENTER
                                                textAlignY = CENTER
                                                fontSize = 14
                                                lineGap = 9
                                            },
                                            RootElement
                                            {
                                                offset = (0, 1)
                                                offsetRB = (184, 22)
                                                size = (184, 21)
                                                childs = {
                                                    [Weapon::Name] Text
                                                    {
                                                        classOverride = "Weapon::Name"
                                                        offset = (5, 10)
                                                        font = "fonts/caslon.ttf"
                                                        text = "Weapon 4"
                                                        textAlignY = CENTER
                                                        fontSize = 15
                                                    }
                                                }
                                                crop = false
                                            },
                                            [Weapon::HexAccuracy] Text
                                            {
                                                classOverride = "Weapon::HexAccuracy"
                                                offset = (392, 10)
                                                font = "fonts/caslon.ttf"
                                                text = "10%"
                                                textAlignX = CENTER
                                                textAlignY = CENTER
                                                fontSize = 14
                                                lineGap = 9
                                            },
                                            [Weapon::TraitList] List
                                            {
                                                classOverride = "Weapon::TraitList"
                                                offset = (415, -2)
                                                offsetRB = (506, 24)
                                                size = (91, 26)
                                                childs = {}
                                                crop = false
                                            }
                                        }
                                        crop = false
                                    } 
\$\endgroup\$
1
\$\begingroup\$

I figured out problem... Project wasn't even building correctly. So I was working with old codes.

|improve this answer|||||
\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.