-
Notifications
You must be signed in to change notification settings - Fork 282
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New top bar using priority gadget #3666
base: master
Are you sure you want to change the base?
New top bar using priority gadget #3666
Conversation
luaui/Widgets/gui_top_bar.lua
Outdated
break | ||
end | ||
end | ||
cacheDataBase['realWindStrength'] = realWindStrength |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Id love if this data tracking could be extracted into an API widget and made available to other widgets! Not just this value, but any others. (Even the values that arent kept 100% up-to-date every frame they could be useful.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Which values would you like to extract?
It would be nice to have less code in this lua. So I am very open for proposals how to manage this.
What functionality is this introducing, and why is it needed? |
It's the new version of the top bar. This updated version of the top bar includes build power. It has a separate BAR. It also includes the possibility to show the correct metal and energy request of low priority builders. After this version I will work on the newer, more modern look of the top bar, designed by Scoopa |
…t, repaired graphic
…ng, cleaned up drawScreen a bit
… nowChecking, trackedPosBase; improved gameframe a bit
substituded: local _, _, _, metalIncome, metalExpense, _, _ = spGetTeamResources(myTeamID, "metal") BP['metalExpense'] = metalExpense local _, _, _, energyIncome, energyExpense, _, _ = spGetTeamResources(myTeamID, "energy") BP['energyIncome'] = energyIncome BP['energyExpense'] = energyExpense local metalExpense = r['metal'][4] local metalIncome = r['metal'][4] local metalExpense = r['metal'][5] local energyIncome = r['energy'][4] local energyExpense = r['energy'][5] ----------------------- deleted: cacheDataBase['usedBPIfNoStall'] = cacheDataBase['usedBPIfNoStall'] + buildingBP because this value isn't calculated correctly, and it isn't used... mayBeBuilding, guardedUnitID because they where just nonsene local unitDefsBeingBuilt = {} local builderStates = {} local unitsReservedBP = {} no real benefit in having so many tables, when a simple variable is enough
Can we please not have the labels above the units? They are very cluttering and cryptic. |
@icexuick Is this something that is going to be merged after making changes, or closed entirely? What is our path forward with this? |
Thx for having a look at the widget. The performance is far away of where it needs to be. I am painfully aware of this fact. The labels have nothing to do with the widget. They are part of the gadget implemented by Beherith I turned them off. |
@Ruwetuin would/should know the most about the current Topbar. Regarding Buildpower from a (new) player perspective - I'm unsure if the current design of the buildpower BAR helps explain them what BP is/does. For them I'd like to fully align with Scopa on the design/usability first. And with that I'd for now would leave this as a separate gadget that pro-players can enable. |
Work done
A running version of the New Top Bar.
It shows an additional bar for BP.
It shows the % of BP that is actually used and spending resources and it shows how much of your BP has orders that are related to use BP like guard and repair.
This bar includes indicators that show you how much of your BP can be supplied with your energy income and metal income. This is indicated by moving sliders.
Additionally there is a possibility to actually see the wind risk. This is indicated by a yellow line next to the BP bar. It will all make sense when you see it :)
ToDo
It still has unused variables in the gadget.
Still needs work if in game scaling is needed
Improve addWeightedValue
Use getwind instead of Energy from s random windgen.
Use minWind for windrisk
Use maxwind instead of Spring.WindMax
Seperate stalling['lowPrioEnergy'] and n %6
Local usedBP_instant = BP['usedBP_instant']
Try to use old slider pos and delete 20 lines