Page 1 of 1

playerstat

Posted: Tue Aug 16, 2005 10:11 pm
by lizardkid
Since i'm becoming intensely interested in ui and menus lately, i've discovered something that got me interested.

In hud_fraglimit.urc there's a way to get such things as time and.. well you know what i'm talking about.

Code: Select all

resource
Label
{
title "score display"
name "Default"
rect 64 0 32 24
fgcolor 0.69 0.69 0.00 1.00
bgcolor 0.50 0.50 0.50 0.00
borderstyle "NONE"
playerstat "21"
font facfont-20
textalign right

}

Code: Select all

playerstat "21"
i'm wondering if theres a guide to what each number argument to playerstat would give.
i could of course, play with it. but i'd need a server and such, and it'd be much simpler to just get a list.

List

Posted: Wed Aug 17, 2005 2:33 pm
by tltrude

Posted: Sat Jun 03, 2006 8:10 pm
by Rookie One.pl
Bump!

I've been investigating the playerstats. Here's what I came up with (nothing new, really):

Code: Select all

// Rookie One: for ent->client->ps.stats
// source: ui/hud_*.urc
typedef enum {
	STAT_HEALTH,				// current player health
	STAT_MAX_HEALTH,			// max player health
	STAT_DUMMY1,
	STAT_DUMMY2,
	STAT_AMMO_REMAINING,		// total ammo
	STAT_MAXAMMO_SINGLE,		// max ammo for single-round clip weapons (e.g. bazooka, grenade)
	STAT_CLIPAMMO,				// ammo in current clip
	STAT_MAXAMMO,				// max ammo amount a clip can hold
	STAT_DUMMY3,
	STAT_DUMMY4,
	STAT_DUMMY5,
	STAT_DUMMY6,
	STAT_DUMMY7,
	STAT_DUMMY8,
	STAT_DUMMY9,
	STAT_DUMMY10,
	STAT_NORTHYAW,				// north direction for compass
	STAT_OBJECTIVE_LEFTBALL,	// position of the left ball on the compass objective indicator
	STAT_OBJECTIVE_RIGHTBALL,	// position of the right ball on the compass objective indicator
	STAT_OBJECTIVE,				// objective direction
	STAT_DUMMY11,
	STAT_SCORE,					// own (team) score
	STAT_DUMMY12,
	STAT_DUMMY13,
	STAT_DUMMY14,
	STAT_STREAK,				// streak
	STAT_DUMMY15,
	STAT_DUMMY16,
	STAT_DUMMY17,
	STAT_DAMAGE_DIRECTION		// direction damage was taken from
} playerstat_t;
And itemstats:

Code: Select all

// Rookie One: for ent->client->ps.activeItems
// source: ui/hud_items.urc
#define ITEM_CURRENT		1
#define ITEM_SLOT1			2
#define ITEM_SLOT2			3
#define ITEM_SLOT3			4
#define ITEM_SLOT4			5
As you can see, there are quite a few ones the purpose of is yet unknown. I'll be trying and find out.

<EDIT>After some testing, I find STAT_DUMMY2 to be the ammo type used by current weapon, STAT_DUMMY5 seems to be indicating the means of death and is 0 if the player is alive, and STAT_DUMMY12 seems to be the number of suicides (not sure if for the whole team or just the player himself).</EDIT>
<EDIT2>Wrong, STAT_DUMMY2 is the weapon class. ;)</EDIT2>

Posted: Sun Jun 04, 2006 6:55 am
by jv_map
Neat research :) I would say it is something new :wink:

Posted: Sun Jun 04, 2006 10:57 am
by Rookie One.pl
Hehe. :)

Well, STAT_DUMMY5 is in fact not the means of death but the amount of pain last taken by the player.

And the ITEM_CURRENT stuff is a quite puzzle to me. :? It seems to have different values depending on the player's team and the order they choose the weapons. :roll:

If I manage to work it out, I should be able to pull something awesome off. :)