ID:160393
 
I figured out a problem I was having with my statpanel stuff (post in Developer How-To.) Apparently you cannot have an obj image and such in the 1st argument of the procedure stat().

This thread is about the fact that I think we should be able to have em there. For example, which is exactly what I'm trying to do, I want to make a skill icon appear, then the skill name, then the skill level for that skill. So I make an obj that has the icon/icon_state of the image I want, and name it the skill's name. I also have a variable thats the skill's level.
I do the following code:
stat(skillobj,skilllevel) The skillobj never shows up, but skilllevel does show. Essentially you get (Lets say theres something called Skills above it from stat() as well)
Skills:
0

On the other hand, if you do this code:
stat(skilllevel,skillobj)
you get the following:
Skills:
0 [objicon] Skill Name

I am requesting that stat() be changed, or another instance of it be included that allows you to put whatever you want for the first instance, and whatever you want for the second.

I don't really know how to access the statpanels or anything like that, never really cared to know until now, so I can't do it myself if I wanted to.
A change of that magnitude to stat() would at this point constitute a major overhaul. Why not use grids? That's what we made them for.

Lummox JR
In response to Lummox JR
Grids? I have to admit, I unfortunately have been unable to keep up with any of the major interface things with the beta, and therefore have no clue how to implement a grid. Would there be a tutorial or something for them around somewhere?
In response to Polantaris
Just check out Lummox's guide on interfaces. And after that skim the skin reference to see all the possible things you can do.
You could simply have an object for each skill, and then set its suffix.

obj
skill
icon = 'skills.dmi'
var
level
Attack
icon_state = "attack"
Craft
icon_state = "craft"
Mining
icon_state = "mining"

New(nlevel)
level = nlevel

mob
var
list/skills = list()
Stat()
statpanel("Skills")
for(var/obj/skill/s in skills)
s.suffix = "[s.level]"
stat(s)

verb
add_Attack()
if(!(locate(/obj/skill/Attack) in skills))
skills += new/obj/skill/Attack(0)
var/obj/skill/Attack/a = locate() in skills
a.level++

add_Craft()
if(!(locate(/obj/skill/Craft) in skills))
skills += new/obj/skill/Craft(0)
var/obj/skill/Craft/a = locate() in skills
a.level++

add_Mining()
if(!(locate(/obj/skill/Mining) in skills))
skills += new/obj/skill/Mining(0)
var/obj/skill/Mining/a = locate() in skills
a.level++
In response to Hazman
Note it'd be better to update the suffix whenever you update the level instead, then in Stat() just use stat(,skills). But yes, like you said what he's requesting is indeed possible already with statpanels; I'm pretty sure he could also use an <IMG> tag (or the \icon macro) in the Name argument.