The Forums Are Now Closed!

The content will remain as a historical reference, thank you.

[REL] Health and Mana 1.01

UI mod for DG.

By on September 19, 2008 10:51:28 AM from Demigod Forums Demigod ForumsExternal Link

hehe, i'm at it again. more UI mods for DG. 

this one a lot more people shall find useful; it makes the health, mana, and experience meters stay visible even when the mouse isn't over them. 

i also added regen to it as well, but as i can't find proper functions to call i've made a bit of a work-around that looks rather ugly. 

i'm going to use gaspowered forums for the mod as i can *cough* edit and update my thread there, please feel free to reply and make simple suggestions for future releases. 

[EDIT:] made a small addition.


Changelog: (last updated 21SEP08)

1.01: health and mana text is now toggleable (click on the bars to show/hide), thanks goes to Sorian for sharing that.

hopefully there'll be no more irrelevant code-spam in the thread either.


grab it from here, and enjoy.

 

+37 Karma | 5 Replies
September 19, 2008 1:03:47 PM from Demigod Forums Demigod Forums

Nice. Of my short beta testing of the game I found that mouse cursor will block the health numbers so you can't see them clearly. That definitely need fixing.

September 20, 2008 1:58:32 AM from Stardock Forums Stardock Forums

If you are looking for the formula search around the base code, open it with a text program, IT WILL NOT DIRECTLY GIVE YOU THE FORMULA, but It is there.

Plus for demigods you have to add the variable of them upgrading them selves.

But the first part of this post should help with all the creeps.

EXAMPLE OF BASE CODE:

(Taken from Supreme Commander Forged Alliances  "Paragon Structure")

[code]ResourceOn = State {
        Main = function(self)
            local aiBrain = self:GetAIBrain()
            local massAdd = 0
            local energyAdd = 0
            local maxMass = self:GetBlueprint().Economy.MaxMass
            local maxEnergy = self:GetBlueprint().Economy.MaxEnergy
           
            while true do
                local massNeed = aiBrain:GetEconomyRequested('MASS') * 10
                local energyNeed = aiBrain:GetEconomyRequested('ENERGY') * 10

                local massIncome = (aiBrain:GetEconomyIncome( 'MASS' ) * 10) - massAdd
                local energyIncome = (aiBrain:GetEconomyIncome( 'ENERGY' ) * 10) - energyAdd
               
                massAdd = 20
                if massNeed - massIncome > 0 then
                    massAdd = massAdd + massNeed - massIncome
                end
               
                if maxMass and massAdd > maxMass then
                   massAdd = maxMass
                end
                self:SetProductionPerSecondMass(massAdd)

                energyAdd = 1000
                if energyNeed - energyIncome > 0 then
                    energyAdd = energyAdd + energyNeed - energyIncome
                end
                if maxEnergy and energyAdd > maxEnergy then
                    energyAdd = maxEnergy
                end
                self:SetProductionPerSecondEnergy(energyAdd)

                WaitSeconds(.5)
            end
        end,
    },
[code]

September 20, 2008 2:04:37 AM from Stardock Forums Stardock Forums

Damn impulse bugs.

WTB WORKING edit button.

local massNeed = aiBrain:GetEconomyRequested('MASS') * 10
local energyNeed = aiBrain:GetEconomyRequested('ENERGY') * 10

Translation: Need = ('Matrerial') * 10

local massIncome = (aiBrain:GetEconomyIncome( 'MASS' ) * 10) - massAdd
local energyIncome = (aiBrain:GetEconomyIncome( 'ENERGY' ) * 10) - energyAdd

Translation: Increase Produce = (('Material') * 10) - Current production

if massNeed - massIncome > 0 then
massAdd = massAdd + massNeed - massIncome

This is a rare case where they actually give a formula.

Simply put: It makes whatever is needed.

 

September 21, 2008 2:29:24 AM from Demigod Forums Demigod Forums

bump for new version.

September 21, 2008 8:27:16 AM from Demigod Forums Demigod Forums

Neat.  I hope they make it so clicking on them makes them stay put in the actual game itself

Stardock Forums v1.0.0.0    #108434  walnut1   Server Load Time: 00:00:00.0000125   Page Render Time:

Stardock Magazine | Register | Online Privacy Policy | Terms of Use

Copyright ?? 2012 Stardock Entertainment and Gas Powered Games. Demigod is a trademark of Gas Powered Games. All rights reserved. All other trademarks and copyrights are the properties of their respective owners. Windows, the Windows Vista Start button and Xbox 360 are trademarks of the Microsoft group of companies, and 'Games for Windows' and the Windows Vista Start button logo are used under license from Microsoft. ?? 2012 Advanced Micro Devices, Inc. All rights reserved. AMD, the AMD Arrow logo and combinations thereof are trademarks of Advanced Micro Devices, Inc.