Show icons as red if not enough resources
#1
Posted 28 April 2012 - 09:24 PM
#2
Posted 28 April 2012 - 10:48 PM
#3
Posted 29 April 2012 - 06:38 AM
Not sure if that's actually feasible, but I think using the resource icon and not the name would improve readability. Ever so slightly, but still.
Also: it might make it look a lot like a Christmas tree, which would be bad, but have you tried coloring more and more red as the resource lacking are important (with alpha)? So that at a glance, we'd now how much we need more. If it works from an aesthetic point of view, it could be useful. I think the effect can be quite potent even with small differences in the alpha, so that it looks good, and useful.
Edit: I also recommend changing your code in Unit_command.js to this:
if(guiName == CONSTRUCTION || guiName == TRAINING){
selection.hidden = true;
var totalCosts = {};
var multiplier = 1;
if (guiName == TRAINING && Engine.HotkeyIsPressed("session.batchtrain"))
multiplier = 5;
for each (var r in ["food", "wood", "stone", "metal"])
totalCosts[r] = Math.floor(template.cost[r]*multiplier);
var neededC = Engine.GuiInterfaceCall("FindCostNeeded", totalCosts);
if(neededC.length){
//only put on the red overlay if the button is not already grayed out
if(button.enabled != false){
button.enabled = false;
selection.hidden = false;
}
button.tooltip += "\n[font=\"serif-bold-13\"]Insufficient resources:[/font]\n"+neededC.join(", ");
}
}
It will show red properly if the user clicks on "shift", which is much more intuitive. It doesn't take into account the batch size, though, I'm not too sure how to get that.
Edited by wraitii, 29 April 2012 - 07:20 AM.
Wildfire Games Programmer, AI developer, auxiliary map designer, dealing with anything water.
Contact me: wraitii@wildfiregames.com
Also the world's only three-dimensional poodle.
#4
Posted 29 April 2012 - 08:27 AM
Edited by FeXoR, 29 April 2012 - 08:28 AM.
Im Übrigen bin ich der Meinung, dass 0A.D. Auslöser braucht. (IMO 0A.D. needs triggers ASAP.)
#5
Posted 29 April 2012 - 10:17 AM
Wildfire Games Programmer, AI developer, auxiliary map designer, dealing with anything water.
Contact me: wraitii@wildfiregames.com
Also the world's only three-dimensional poodle.
#6
Posted 29 April 2012 - 01:27 PM
howlingflute, on 28 April 2012 - 09:24 PM, said:
Erik Johansson [ aka feneur ]
Wildfire Games
Contact me: feneur@wildfiregames.com
Support Wildfire Games!
#7
Posted 29 April 2012 - 01:31 PM
Maybe you can also enfatize the missing resources using a red color for them in the tooltip.
#8
Posted 29 April 2012 - 10:00 PM
fabio, on 29 April 2012 - 01:31 PM, said:
Wildfire Games Programmer
Contact me: ben@wildfiregames.com
#9
Posted 29 April 2012 - 10:45 PM
Wildfire Games Project Leader
Contact me: michaeldhafer[at]gmail.com
Support Wildfire Games!
#10
Posted 08 May 2012 - 07:51 AM
Wildfire Games Programmer, AI developer, auxiliary map designer, dealing with anything water.
Contact me: wraitii@wildfiregames.com
Also the world's only three-dimensional poodle.
#11
Posted 08 May 2012 - 08:33 AM
Fried Banana, Steamed Banana, Banana Kolak, Nagasari, Banana Ceriping, and still many more delicious banana based cuisine.
#12
Posted 01 August 2012 - 10:14 AM
Some small differences:
For units, when you push "shift" it will display accordingly if you an create a batch of 5. The "rediness" of icons will increase slightly as the resources needed increase (I'm not sure if it's useful).
It works for technologies too, but I wasn't too sure how to handle paired resources (since they already have a red overlay). They gain an additional faintly red overlay and the tooltip indication.
Attached Files
Wildfire Games Programmer, AI developer, auxiliary map designer, dealing with anything water.
Contact me: wraitii@wildfiregames.com
Also the world's only three-dimensional poodle.
#13
Posted 02 August 2012 - 05:12 AM
Kieran P [ aka k776 ]
Wildfire Games Open Source Development Manager
Contact me: kieran@wildfiregames.com
#14
Posted 02 August 2012 - 06:12 AM
Wildfire Games Programmer, AI developer, auxiliary map designer, dealing with anything water.
Contact me: wraitii@wildfiregames.com
Also the world's only three-dimensional poodle.
#15
Posted 03 August 2012 - 04:47 PM
#16
Posted 26 August 2012 - 07:10 PM
Also, it would IMO be nice if in addition to turning the icon red, it actually disabled the button - it's annoying to Shift-click the icon 10 times, see it turn red, accidentally click it another time, and then get the "not enough resources" message and having to start all over.
#17
Posted 26 August 2012 - 07:48 PM
Buttons are supposed to be disabled when the red overlay is present. Can you tell me how to reproduce that issue? I can presently manage to do it because the overlay display is calculated at render-time, so if I click more than once per rendered frame, I can end up attempting to queue more than I have resources for.
I was thinking that right click should probably decrement the batch size by five, much as left click increments it by five. That'd at least allow you to correct mistakes (whether your batch is about to fail or you just didn't want that many units).
Wildfire Games Programmer
Contact me: deiz@wildfiregames.com
#18
Posted 26 August 2012 - 08:10 PM
Deiz, on 26 August 2012 - 07:48 PM, said:
#19
Posted 02 September 2012 - 10:00 AM
#20
Posted 02 September 2012 - 12:26 PM
Wildfire Games Art Department
Contact me: amish13@gmail.com
AIM handle: Mythgamer
MSN Account: amish13@live.com
"The fate of 0 AD is in the hands of those who have vision and perseverance." - Ken Wood
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users













