Page 1 of 3

Ally Resource Bars 1.84 Alpha 3

Posted: 29 Dec 2010, 09:24
by Manoa
this is a BIG update of the good old plugin, it also includes all the changes previously made by BD and AF, it is beta (1.6) / alpha (1.7) and requires testing so please report when you encounter bugs.

for all versions older than 1.80 ONLY!, 1.80 has an options menu
top of plugin for control area controls:
left button moves him
middle button toggles forced mode for threshold indicators
right button toggles capacity indicators
the buttons can be changed in lines 1013 through 1025

beta 20 saves/loads plugin position on the screen independently for spectator and player modes, and some minor optimizations

beta 21 should fix the drifting of the y-axis when saving the plugin's position bug, and the not enabling the spectator mode teamList bug due to a variable which was not set

known bugs in beta 21:
1. plugin may not load after being unloaded when spectating AI games
2. if at start of the game the player was a player and became a spectator later and if the plugin is moved from it's location - the new position after moving the plugin will be saved as if it is a player mode position - for now just try not to move the plugin when becoming a spectator
3. the list of players is not sorted by their team yet
4. does not work in multithreaded spring
5. plugin position may not be saveable when in spectator mode

what's new in 1.7:
alpha 1: player list is sorted
alpha 2: add cleaning of unused tables
alpha 3: hopefully fixed the display of the empty player when in player mode. if spectator mode position doesn't exist, load the player mode position for spectator mode, the other way around for player mode, and only when none exist load the default position that is calculated at load based on resolution. widget will unload himself when there are no allies.
alpha 4: fixed the bug that prevented plugin from activating after being deactivated when in spectator mode (bugs 1 and 5). fixed save/load position for spectator mode and added proper boundary checks
alpha 5: fixed movement from player to spectator only showing the players from the player's team
alpha 6: added actual numeric resource amount and capacity as tooltip on the right
1.71: player list is drawn at all times
1.72 alpha 1: added team separators, added players list from other teams without bars for both spectator and player modes
Alpha 2: cleanup, added option to control the drawing of the list of teams (DRAW_TEAMS)

current list of things to add:
right click on resource of player to ask for that resource from player (I need energy d00d / I need metal d00d) - DONE

an options user interface for configuration of various parameters (like not always draw the player list and use the old tooltips functionality, option for capacity indicators (which may not be needed for mods like Zero-K), optionally allow drawing the list of spectators) - DONE

draw the list of spectators

provide an option to quickly share units instead of resources to player (or ask units from player with for example shift+right click)

thanks to jk and FabriceFABS for the help

Re: ally resource bars 1.4 beta

Posted: 29 Dec 2010, 09:40
by Hobo Joe

Re: ally resource bars 1.4 beta

Posted: 29 Dec 2010, 09:43
by Manoa

Re: ally resource bars 1.6 beta 18

Posted: 04 Jan 2011, 20:09
by Floris
Well, I got problems with both of these widgets:


Re: ally resource bars 1.6 beta 18

Posted: 05 Jan 2011, 16:45
by Manoa
im re-openinig this topic, I am considering to redesign the allied resource management approach and I would like to know if anyone has any design ideas.

some ideas to start with:

1. merge allied resource bars with adv player list
(the potential problem with this idea is the amount of screen space that would be taken by the combined display of player names and their resources)

2. pop-up resource tooltip of clicked unit of allied player
(one of the problems with this method is that it is necessary to look up the player with or without the resources, and that requires clicking on all the allied players in the team to find out which player has the necessary resources for a particular purpose, so it takes clicking and looking all over the map)

3. the current method of simple bars
(the problems with the current state of the plugin: it takes some space on the screen, when adv player list is also on, them combined can take approximately 1/5 and in bigger battles 1/4 of the screen space, the question that is also asked is whether it is really necessary to display the resources of all the players in the team all the time, what kind of advantages does it provide ? (showing all team resources and the ability to transfer resources to any of the players in the team) so how to manage the drawbacks of taking screen space versus the advantages of access to team resources ? resources are an essential part of many spring mods, but are they worth the amount of space on the screen that this plugin takes ?

4. filter the list of players whose resources are displayed
(it can be for example only the players WITH resources, or only the players WITHOUT resources, the potential problem with this method is that these can change quickly for the better or worse so this can result in the list changing too many times and it's going to be hard to know who is who, and different battle circumstances may need to display players with resources while other circumstances may require players without so it may require the player to constantly manage the display, and that is not something the player should be spending concentration on)

5. remove the bars and only use numbers

Re: Ally Resource Bars 1.72 alpha 1

Posted: 15 Nov 2011, 09:22
by Forboding Angel
bumping thread, manoa forgot to make a new post and just edited his last.

Re: Ally Resource Bars 1.72 alpha 1

Posted: 15 Nov 2011, 09:35
by Jools
Some tips:

* The bars are quite ugly. My idea is to make a smalll gradient to them by making the botton pixel a slightly different colour, makes for a 3d look.

* Show ally income instead of storage as default (and the other in tooltip).It is more important.

* Maybe reduce the opacity a bit.

* I wouldnt merge them, because many people don't use Adv. Playerslist, but some other list instead.

Re: Ally Resource Bars 1.72 alpha 1

Posted: 15 Nov 2011, 12:57
by Manoa
I can reduce default opacity and add option to control it relatively easy
ally income is abit of a problem because it updates VERY slowly (once per second) but do you mean you want income in the form of bars ? how can that be done ? you have more specific idea ? I could add that as an option
I will try to change the bottom pixel colors

Re: Ally Resource Bars 1.72 alpha 1

Posted: 15 Nov 2011, 16:19
by Jools
Well, gte the value of ally income and draw a bar whose length is proportional to that value.

Actually, I added that feature to my statistics widget because I thought it was important, but maybe it's just me. But it has those kind of bars, and it draws the bars as a percentage of the leading player's economy. But that widget is about teams and not about players, so it doesn't really offer the same functionality as ally bars.

Re: Ally Resource Bars 1.80 alpha 2

Posted: 17 Nov 2011, 07:31
by Manoa
1.80 alpha 1: added options menu
this version has one big bug that will sometimes draw the players list in the middle of the bars
1.80 alpha 2: fixed a nasty luaUI-crashing bug with saveY, added metal/energy request from players on right click, re-added TOOL_TIPS player name drawing when player names are not drawn

Re: Ally Resource Bars 1.80 alpha 2

Posted: 17 Nov 2011, 08:20
by Forboding Angel
Bump because it's been updated.

Re: Ally Resource Bars 1.80 alpha 2

Posted: 24 Nov 2011, 23:38
by Manoa
anyone up for helping solve the apparently last bug that draws the playerlist in the wrong place inside the bars sometimes ? I tried for days I still don't get it

there is a random change to the value of x1 in 1.80 alpha 2 but the change to the value cannot be detected
I tried to monitor for it in almost all the functions
the value changes by itself without any assignment operation made to it, and affects the position of tool tips, the player names, the "Options >" and the separators
for some unknown reason when pressing the area that was supposed to be "Options >" it fixes itself
it also gets fixed when I remove the line
if optionsList then glCallList(optionsList) end
that doesn't make sense

Re: Ally Resource Bars 1.80 alpha 2

Posted: 30 Nov 2011, 01:10
by Manoa
with help from jK the bug is fixed in version 1.80 alpha 3, that's the version with all the known bugs fixed

Re: Ally Resource Bars 1.80 alpha 3

Posted: 30 Nov 2011, 01:49
by Forboding Angel
Have you done chili integration yet?

Re: Ally Resource Bars 1.80 alpha 3

Posted: 01 Dec 2011, 03:45
by Manoa
so far the options system is there and it's fully functional, but for some reason widget:SetConfigData and widget:GetConfigData don't work, so it is always at the pre-calculated location, I'm still trying to figure it out, but zero-k is bugged and it's flooding the console and your mod doesn't show the plugin so I have no way to find out if these functions execute at all, so it's working but without saving or loading the position

I also need to remove the options menu I created when chili mode is detected, but I don't know how to detect the presence of chili

Re: Ally Resource Bars 1.80 alpha 3

Posted: 01 Dec 2011, 04:19
by jK
Manoa wrote:but I don't know how to detect the presence of chili

Code: Select all

if (WG.Chili) then

Re: Ally Resource Bars 1.81

Posted: 08 Dec 2011, 09:38
by Manoa
released version 1.81 with Initial Chili support
(in Settings/Interface/Ally Resource Bars 1.81)

but it still doesn't save it's position from my tests in Zero-K and I have no idea how to fix that, if it is my fault in the first place, it saves and loads positions just fine in other mods

version 1.82: fixed the Chili options save/load conflicting with set/get configdata, added a size option to Chili menu (exclusive to Chili for now)

Re: Ally Resource Bars 1.82

Posted: 08 Dec 2011, 11:59
by Forboding Angel

To add onto it, you should do the bars themselves in a chili window. Kinda the point of chili is to make it so that it fits in with our current themes.

This is excellent. You sir, win +9001 internets.

Re: Ally Resource Bars 1.82

Posted: 08 Dec 2011, 18:09
by CarRepairer
Also if you actually use chili to make the resbars, the docking widget saves screen positions for you so you don't have to. You'll find you can reduce your code to a fraction of what it was before and wish you had used chili in the first place. Nice work.

Re: Ally Resource Bars 1.82

Posted: 08 Dec 2011, 18:25
by Jools
It looks nice. O como dice celia, my English is very good looking.