Ally Resource Bars 1.84 Alpha 3

Ally Resource Bars 1.84 Alpha 3

Discuss Lua based Spring scripts (LuaUI widgets, mission scripts, gaia scripts, mod-rules scripts, scripted keybindings, etc...)

Moderator: Moderators

Manoa
Posts: 79
Joined: 19 May 2008, 18:51

Ally Resource Bars 1.84 Alpha 3

Post by Manoa » 29 Dec 2010, 09:24

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
Attachments
gui_ally_res-1.84-nopairs.lua
1.84 Alpha 2
(71.85 KiB) Downloaded 30 times
gui_ally_res-1.83a3.lua
1.83 Beta 3
(51.31 KiB) Downloaded 15 times
gui_ally_res-1.7.lua
1.70 final version
(49.33 KiB) Downloaded 34 times
Last edited by Manoa on 08 Nov 2015, 07:15, edited 91 times in total.
0 x

User avatar
Hobo Joe
Posts: 1001
Joined: 02 Jan 2008, 21:55

Re: ally resource bars 1.4 beta

Post by Hobo Joe » 29 Dec 2010, 09:40

Screenshot?
0 x

Manoa
Posts: 79
Joined: 19 May 2008, 18:51

Re: ally resource bars 1.4 beta

Post by Manoa » 29 Dec 2010, 09:43

Last edited by Manoa on 27 Apr 2013, 10:02, edited 6 times in total.
0 x

User avatar
Floris
Balanced Annihilation Developer
Posts: 599
Joined: 04 Jan 2011, 20:00

Re: ally resource bars 1.6 beta 18

Post by Floris » 04 Jan 2011, 20:09

Well, I got problems with both of these widgets:

see:
Image
0 x

Manoa
Posts: 79
Joined: 19 May 2008, 18:51

Re: ally resource bars 1.6 beta 18

Post by Manoa » 05 Jan 2011, 16:45

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
Last edited by Manoa on 15 Nov 2011, 10:34, edited 1 time in total.
0 x

User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14603
Joined: 17 Nov 2005, 02:43

Re: Ally Resource Bars 1.72 alpha 1

Post by Forboding Angel » 15 Nov 2011, 09:22

bumping thread, manoa forgot to make a new post and just edited his last.
0 x

User avatar
Jools
XTA Developer
Posts: 2804
Joined: 23 Feb 2009, 16:29

Re: Ally Resource Bars 1.72 alpha 1

Post by Jools » 15 Nov 2011, 09:35

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.
0 x

Manoa
Posts: 79
Joined: 19 May 2008, 18:51

Re: Ally Resource Bars 1.72 alpha 1

Post by Manoa » 15 Nov 2011, 12:57

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
0 x

User avatar
Jools
XTA Developer
Posts: 2804
Joined: 23 Feb 2009, 16:29

Re: Ally Resource Bars 1.72 alpha 1

Post by Jools » 15 Nov 2011, 16:19

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.
0 x

Manoa
Posts: 79
Joined: 19 May 2008, 18:51

Re: Ally Resource Bars 1.80 alpha 2

Post by Manoa » 17 Nov 2011, 07:31

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
0 x

User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14603
Joined: 17 Nov 2005, 02:43

Re: Ally Resource Bars 1.80 alpha 2

Post by Forboding Angel » 17 Nov 2011, 08:20

Bump because it's been updated.
0 x

Manoa
Posts: 79
Joined: 19 May 2008, 18:51

Re: Ally Resource Bars 1.80 alpha 2

Post by Manoa » 24 Nov 2011, 23:38

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
Image
0 x

Manoa
Posts: 79
Joined: 19 May 2008, 18:51

Re: Ally Resource Bars 1.80 alpha 2

Post by Manoa » 30 Nov 2011, 01:10

with help from jK the bug is fixed in version 1.80 alpha 3, that's the version with all the known bugs fixed
0 x

User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14603
Joined: 17 Nov 2005, 02:43

Re: Ally Resource Bars 1.80 alpha 3

Post by Forboding Angel » 30 Nov 2011, 01:49

Have you done chili integration yet?
0 x

Manoa
Posts: 79
Joined: 19 May 2008, 18:51

Re: Ally Resource Bars 1.80 alpha 3

Post by Manoa » 01 Dec 2011, 03:45

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
0 x

User avatar
jK
Spring Developer
Posts: 2299
Joined: 28 Jun 2007, 07:30

Re: Ally Resource Bars 1.80 alpha 3

Post by jK » 01 Dec 2011, 04:19

Manoa wrote:but I don't know how to detect the presence of chili

Code: Select all

if (WG.Chili) then
 ...
end
0 x

Manoa
Posts: 79
Joined: 19 May 2008, 18:51

Re: Ally Resource Bars 1.81

Post by Manoa » 08 Dec 2011, 09:38

released version 1.81 with Initial Chili support
(in Settings/Interface/Ally Resource Bars 1.81)
Image

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)
0 x

User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14603
Joined: 17 Nov 2005, 02:43

Re: Ally Resource Bars 1.82

Post by Forboding Angel » 08 Dec 2011, 11:59

SUWEEEEET ASS!

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.
0 x

User avatar
CarRepairer
Cursed Zero-K Developer
Posts: 3359
Joined: 07 Nov 2007, 21:48

Re: Ally Resource Bars 1.82

Post by CarRepairer » 08 Dec 2011, 18:09

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.
0 x

User avatar
Jools
XTA Developer
Posts: 2804
Joined: 23 Feb 2009, 16:29

Re: Ally Resource Bars 1.82

Post by Jools » 08 Dec 2011, 18:25

It looks nice. O como dice celia, my English is very good looking.
0 x

Post Reply

Return to “Lua Scripts”