Back to my attempts though, finding the relevant part of the code that should be changed to achieve this didn't take long and it only involves replacing the DrawRadarLabel simulated function in OS2's ONSPowerNodeSpecial class with the following:
Code: Select all
/**
Draws additional radar labels for this node.
The screen location of the node is available through the HUDLocation variable.
*/
simulated function DrawRadarLabel(Canvas C, ONSHUDOnslaught Hud)
{
local string CountdownString;
local float XL, YL;
local float MAX_BAR_WIDTH;
local float proportionOfNodeHealthRemaining;
//N: Little Hack to draw node health Bars on the radar minimap
MAX_BAR_WIDTH = 15.0;
proportionOfNodeHealthRemaining = float(Health)/float(NodeHealth);
if(proportionOfNodeHealthRemaining < 0.35){
C.DrawColor = Hud.RedColor;
}else if(proportionOfNodeHealthRemaining < 0.70){
C.DrawColor = Hud.GoldColor;
}else{
C.DrawColor = Hud.GreenColor;
}
C.SetPos(HudLocation.X-MAX_BAR_WIDTH/2.0, HudLocation.Y-12.0);
C.DrawHorizontal(HudLocation.Y-12.0, MAX_BAR_WIDTH*proportionOfNodeHealthRemaining);
if (CoreStage != 0 || CountdownTime == 0)
return;
CountdownString = string(RemainingTime);
C.Font = Hud.GetConsoleFont(C);
C.StrLen(CountdownString, XL, YL);
C.DrawColor = Hud.GoldColor;
C.SetPos(HudLocation.X - 0.5 * XL, HudLocation.Y);
C.DrawTextClipped(CountdownString);
}
Now I consider myself a sufficiently intelligent person, the extent of said quality constantly measured, reevaluated and weighed for years by the range of my abilities to understand and master various PC related "crafts" and fields like image/audio/video editing and transcoding; reverse engineering, streamlining, making portable, extracting from or minimally modifying OS resources, games and any other kind of interesting program/code and generally being able to achieve all that I set my mind to where others would prefer to treat these things as "black boxes" and just make do with what's given to them. I achieve what I set out to do 99% of the time and all without ever having to actively ask anyone else for help. I mean, why should anyone? Armed with perseverance and just average smarts, the vastness of knowledge on most of these fields on the 'net should be more than enough to help you achieve what you're aiming to without ever having to pester anyone about it.
Strangely, not so with UT-related crafts for me. Even though I have a comp. science background and have long been reading Uscript code and studied plenty of mapping tutorials (merely out of curiosity) as well as believe I boast a respectable working knowledge of how it all ties together, the active practice of those things always struck me as haphazard, achieved through a multitude of poorly cross-communicating, temperamental half-broken tools and, most of all, very, very poorly documented. I could always figure out what a prolific and prominent coder's work does down to a line-by-line breakdown level, but ask me to implement something similar myself and there's probably a million different, spectacular ways I'd fail at it with incorrect (syntactically, decleratively... surreally) code. Nobody ever learned Uscripting from any single, definitive and all-encompassing resource that clearly explains why a specific function's scope was defined the way it was and not another, for example, because such a thing simply doesn't exist; likewise for mapping too, it seems. Just a loose collection of wikis and msg boards that you always hope will contain the answer to your particular obstacle, but deep down you know exactly what the harsh probabilities against it actually are. Everyone seems to "get there" by putting their failures up on public display for all others to review (perhaps laugh at) and eventually help with, but how parading one's ignorance in front of others in hope of some "elder druid" deciding to reward you for the entertainment derived from your fumbling by divulging the right answer to just that specific problem and hoping to improve through such an experience not seemed as clearly both bad form and a bad idea to anyone else I'll never know. Sacrificing dignity for knowledge is simply an unacceptable tradeoff to me.
The only reason I'm appealing to others this time is, partly, to vent for the seemingly absurd and illogical conundrum I seemed to've found myself in through no fault of my own (if I just compile the package as OnslaughtSpecials2 everything works lovely, but what kind of long-term practice would labeling different code versions by the same name be?) and it's been pissing me off enough to want to rant about the current "status quo" of knowledge dissemination in the UT-related creative crafts field. It's exactly the kind of problem that's been preventing innovative thinkers from trying their own hand at implementing potentially groundbreaking ideas ever since the game came out and who knows how many ppl that's lost us.
Fffff, anyway, rant over. Any suggestions?