[HUDBOT]: How to create own .pngs? (aka HALP ME!)

Psychosis
03-19-2004, 05:13 PM
Ok, so i got photoshop CS... create new blank file, transparent bkgrnd, 300x300 (just for testing)... draw a circle in the middle... fill it w/ red... 75% opacity. Save as gui.test.png... add appropriate call to hudbot.cs...

HudBot::AddCustomPng("test", "200 200", "Background");

and all i get is a 300x300 flickering white box :(

I have no idea what I'm doing wrong... hudbot works fine, I just can't make my own pngs (newb w/ no idea how) :p

HALP PLZ :D


thx

Shinigami
03-19-2004, 05:16 PM
Holy Shit

Psychosis
03-19-2004, 05:17 PM
indeed. now help me plz
:D

btw owned by caps filter

Limbo
03-19-2004, 05:21 PM
help me fix hudbot psy
it's not even working :(

the skies and skins show up, but they're shitting low res, i'm thinking hudbot isn't loaded or something
but i already ran hudbot before i start up T1

Psychosis
03-19-2004, 05:22 PM
do you have hudbot.cs executed?

Limbo
03-19-2004, 05:24 PM
i don't even have a hudbot.cs

Psychosis
03-19-2004, 05:36 PM
well no wonder why it isnt working :p
go to andrews site and get the newest version, 3n i think

Psychosis
03-19-2004, 05:38 PM
k apparently there isnt one :p

lol

heres mine... you should be able to figure it out :p

///////////////////////////////////////////////////////////////////////
// HudBot.cs v0.3d - taNiCoLoRiN by Andrew
///////////////////////////////////////////////////////////////////////

//add colorguis ("name", "position", "size", "color", "layer")
//HudBot::AddColorGui("blue", "0 0", "100 100", "255 0 0 128", "Overlay"); //test blue colorgui,

topleft of screen

//add custom pngs ("name, "position", "layer")
//HudBot::AddCustomPng("test", "550 250", "Overlay"); //this will load

"tribes/andrew/gui.test.png" at [x=550,y=250]

///////////////////////////////////////////////////////////////////////

//tells hudbot to delete/reload the custom hud list
$HudBot::RefreshPNGs = "True";

//these hold the list of colorguis/custom pngs for hudbot
$HudBot::ColorGUIs = "";
$HudBot::CustomPNGs = "";

///////////////////////////////////////////////////////////////////////
// function: HudBot::AddColorGui
// purpose: Adds a ColorGUI rectangle to HudBot
//
// format (all fields seperated by a space):
// %name = "name";
// %position = "X Y";
// %size = "WIDTH HEIGHT";
// %color = "R G B A";
// %layer = {"Underlay", "Overlay"}
//
///////////////////////////////////////////////////////////////////////

function HudBot::AddColorGui(%name , %position, %size, %color, %layer)
{
%name = "$HudBot::ColorGUI::"@%name;
%colorgui = %position @ " " @ %size @ " " @ %color;

if (%layer == "Overlay")
%layer = "1";
else
%layer = "0";

eval(%name@"=\""@%colorgui@"\";");
if ($HudBot::ColorGUIs != "")
$HudBot::ColorGUIs = $HudBot::ColorGUIs @ " ";
$HudBot::ColorGUIs = $HudBot::ColorGUIs @ %name @ %layer;
}

///////////////////////////////////////////////////////////////////////
// function: HudBot::AddCustomPng
// purpose: Adds a Custom PNG to hudbot
//
// format (all fields seperated by a space):
// %name = [Tribes/Andrew/gui.]%name[.png]
// %position = "X Y";
// %layer = {"Underlay", "Overlay"}
//
// example: place "gui.myhud.png" in "Tribes/Andrew/" and call
// the AddCustomPng function like so:
// HudBot::AddCustomPng(myhu d, "20 50");
//
///////////////////////////////////////////////////////////////////////

function HudBot::AddCustomPng(%nam e, %position, %layer)
{
%varname = "$HudBot::CustomPNG::"@%name;
%custompng = %position;

if (%layer == "Overlay")
%layer = "1";
else
%layer = "0";

eval(%varname@"=\""@%custompng@"\";");
if ($HudBot::CustomPNGs != "")
$HudBot::CustomPNGs = $HudBot::CustomPNGs @ " ";
$HudBot::CustomPNGs = $HudBot::CustomPNGs @ %name @ %layer;
}

///////////////////////////////////////////////////////////////////////
// HUDBot GUI Stuff
///////////////////////////////////////////////////////////////////////

// The chathud background
//HudBot::AddCustomPng("chat", "256 2", "Background");

// My custom reticle
HudBot::AddCustomPng("ret", "480 352", "Overlay");

// The PingHud
//if($Viking::PingHud)HudBo t::AddCustomPng("pinghud", "896 2", "Background");

// The CTFHud
//if($Viking::FlagHUD) HudBot::AddCustomPng("ctfhud", "0 -20", "Background");

// The ItemHud
if($Viking::ItemHUD) HudBot::AddCustomPng("itemhud", "886 699", "Background");


//HudBot::AddCustomPng("test", "200 200", "Background");
HudBot::AddColorGui("blue", "0 0", "1024 54", "0 0 255 128", "Background");

Shinigami
03-19-2004, 05:39 PM
I have no idea what that problem is, but two things:

1) Tribes cannot load pngs on its own.
2) Hudbot.cs does not serve any purpose but loading non replacement png huds.

Psychosis
03-19-2004, 05:50 PM
ah.
i know #1 :huh:

and 2 you have a point.

alot of stuff in the Andrew folder (t2, etc) doesn't work, dunno how to make it work. skys and clear weapons work fine tho.

anywho, i'm trying to make the custom ping for hudbot to load :p (w/ script)

but i'm doing something wrong in the creation of the image... need HALP

Shinigami
03-19-2004, 05:51 PM
yes

There are instructions.

At one point, they say the image's dimensions must be powers of two.

Limbo
03-19-2004, 06:40 PM
i can't get the fucking jaggies around sarcastick's health/jet meter to go away

vortex
03-19-2004, 06:55 PM
RTFM, powers of 2.

Shinigami
03-19-2004, 08:23 PM
Limbo's problem is beyond me.

Psychosis
03-19-2004, 08:24 PM
oh yeahhhh

i'm retarded

Psychosis
03-19-2004, 08:28 PM
it worked

i love you guys

:lovepink:

:heart:

KPace85
03-19-2004, 10:47 PM
Haha

I forgot about the powers of 2 when I first started :roller:

bad_billy
03-22-2004, 12:57 AM
i can't get the fucking jaggies around sarcastick's health/jet meter to go awaypost a pic

DarKSouL_BC
03-22-2004, 01:06 AM
u are hawt

bad_billy
03-22-2004, 01:26 AM
u are hawti know thx ;}