Author Topic: qvm_build cvar; Lets establish a standard  (Read 11804 times)

Paradox

  • Posts: 2612
  • Turrets: +253/-250
    • Paradox Designs
qvm_build cvar; Lets establish a standard
« on: May 20, 2008, 12:21:31 am »
Knowing which QVM a server uses can be difficult, if not outright confusing. Also, knowing which version can be useful too, not only to players, but to server owners. Rezyn and I have made a simple patch (incredibly simple) that adds a new cvar, qvm_build, that contains info from the qvm. QVM authors and compilers have to add the information by hand, but it is pretty easy. The cvar is a serverinfo, so it is easy to figure out whats used where, and gain statistics about a qvm.

I am hoping various qvm authors add this feature to their qvm.

The patch can be found at the Patch Tracker

∧OMG ENTROPY∧

Paradox

  • Posts: 2612
  • Turrets: +253/-250
    • Paradox Designs
Re: qvm_build cvar; Lets establish a standard
« Reply #1 on: May 20, 2008, 01:24:09 am »
Well, i forgot that cvars are limited in length, so i split this off into 4 cvars. Patch has been updated.

∧OMG ENTROPY∧

Lakitu7

  • Tremulous Developers
  • *
  • Posts: 1002
  • Turrets: +120/-73
Re: qvm_build cvar; Lets establish a standard
« Reply #2 on: May 20, 2008, 01:42:04 am »
I've thought about something like this for a bit, to give people more of a way to differentiate the crap servers from those that might be worth playing on, and also so that I can pester people who're still running with godawful old bugs to update. But, *4* serverinfo cvars is incredibly excessive. Just use qvm_version and put the qvm name + version there. Scrap URL and date; those are useless and redundant.

I'll come on board to do qvm_version I specified. The rest just spams users unnecessarily.

It does raise a bit of a naming problem when people make derivitive QVMs, being as most QVMs nowadays are derived from others, and then people with compilers go and add even more retarded patches on top of those. What is such a qvm called? Who knows, but oh well. This is better than nothing, anyway.
« Last Edit: May 20, 2008, 01:45:46 am by Lakitu7 »

Paradox

  • Posts: 2612
  • Turrets: +253/-250
    • Paradox Designs
Re: qvm_build cvar; Lets establish a standard
« Reply #3 on: May 20, 2008, 01:48:24 am »
What i really want is to just set up a standard for providing qvm info

I hope to establish that in the format of cvars with a qvm_ prefix.

QVM owners could set their own data, but the prefix should remain the same.

The main goal is to make it possible to gather statistics using qstat and grep

∧OMG ENTROPY∧

Lakitu7

  • Tremulous Developers
  • *
  • Posts: 1002
  • Turrets: +120/-73
Re: qvm_build cvar; Lets establish a standard
« Reply #4 on: May 20, 2008, 01:50:24 am »
Sure. Put whatever you want.. in one cvar. We do not need to use our positions as qvm authors to spam up the serverinfo list with tons things that the player who queried it doesn't give a damn about.

Paradox

  • Posts: 2612
  • Turrets: +253/-250
    • Paradox Designs
Re: qvm_build cvar; Lets establish a standard
« Reply #5 on: May 20, 2008, 02:39:27 am »
Your correct, and ill remove the 4, shrink them back down to 1.
« Last Edit: May 20, 2008, 02:45:07 am by Paradox »

∧OMG ENTROPY∧

benmachine

  • Posts: 915
  • Turrets: +99/-76
    • ben's machinery
Re: qvm_build cvar; Lets establish a standard
« Reply #6 on: May 20, 2008, 03:30:11 pm »
I'm uneasy about the qvm_ prefix. Remeber that there are actually three QVMs in use during normal play. Admittedly only one will show up in serverinfo, but nevertheless I don't see why we can't keep to the convention of using g_ as the prefix for game variables.
By the way, I read the patch and it seems to me it could be made a lot simpler if you remembered that adjacent quoted string constants in C are automatically concatenated: you should be able to just use
Code: [Select]
trap_Cvar_Set( "g_qvmVersion", QVM_VARIANT " " QVM_VERSION " " QVM_URL );Lakitu is right though, that serverinfo string space is limited. It might not be an issue yet but sooner or later you will find it overflowing and then you will be in trouble.
benmachine

Paradox

  • Posts: 2612
  • Turrets: +253/-250
    • Paradox Designs
Re: qvm_build cvar; Lets establish a standard
« Reply #7 on: May 21, 2008, 02:13:34 am »
Doh. I was just used to substitutions with %s. And as i said, i have switched back to 1 cvar.

You are correct that 3 qvm's are called. But when the community at large refers to "the qvm", they generally mean game.qvm. If they mean otherwise, it is usually mentioned explicitly, as in "i have a problem with ui.qvm".

Currently 2 servers are using it, both running SVN versions of pgqvm

∧OMG ENTROPY∧

Amanieu

  • Posts: 647
  • Turrets: +135/-83
    • Amanieu
Re: qvm_build cvar; Lets establish a standard
« Reply #8 on: May 21, 2008, 09:40:36 am »
Added to release 1.3 of tremulous-amanieu.
I just set the contents of the var to Q3_VERSION and modified q_shared.h a bit.
Quote
< kevlarman> zakk is getting his patches from shady frenchmen on irc
< kevlarman> this can't be a good sign :P

Paradox

  • Posts: 2612
  • Turrets: +253/-250
    • Paradox Designs
Re: qvm_build cvar; Lets establish a standard
« Reply #9 on: June 11, 2008, 02:12:12 am »
Here are some statistics:
  • Number of unique qvm names (excluding time): 1
  • Number of servers using qvm: 34
  • Number of server reporting: 198

Pie of usage based off QVM type (grouped)


Permeation


And in the next svn of p-g-qvm, ill be removing the website tag. It is pointless, and looks silly
« Last Edit: June 11, 2008, 02:15:14 am by Paradox »

∧OMG ENTROPY∧

Le Compilateur

  • Posts: 315
  • Turrets: +14/-19
Re: qvm_build cvar; Lets establish a standard
« Reply #10 on: June 11, 2008, 02:47:06 am »
I like the qvm_ cvar initiative, only one question: should regular players be allowed to read it from their console?
I'm a developer! If you'd like to contribute to the Equilibrium QVM project or download the latest version, please visit this thread.

QVMs now compile under Leopard; get the patch here. Requires SVN r1053 or later.

Lakitu7

  • Tremulous Developers
  • *
  • Posts: 1002
  • Turrets: +120/-73
Re: qvm_build cvar; Lets establish a standard
« Reply #11 on: June 11, 2008, 03:50:56 am »
If it's not serverinfo, nobody can see it. If it's serverinfo, players can see it in /serverinfo.

Le Compilateur

  • Posts: 315
  • Turrets: +14/-19
Re: qvm_build cvar; Lets establish a standard
« Reply #12 on: June 11, 2008, 09:46:49 pm »
Ohhhhhhh... I thought they could just do /qvm_version...
I'm a developer! If you'd like to contribute to the Equilibrium QVM project or download the latest version, please visit this thread.

QVMs now compile under Leopard; get the patch here. Requires SVN r1053 or later.

Lakitu7

  • Tremulous Developers
  • *
  • Posts: 1002
  • Turrets: +120/-73
Re: qvm_build cvar; Lets establish a standard
« Reply #13 on: June 12, 2008, 12:09:51 am »
Client consoles see client vars. Server consoles see server vars.

You could make a server command named qvm_version that would send the text back to the client, but this is more convenient. Personally as a player I'd rather know if people are running something sane or something full of godawful crap BEFORE I get there and start to play.

Paradox

  • Posts: 2612
  • Turrets: +253/-250
    • Paradox Designs
Re: qvm_build cvar; Lets establish a standard
« Reply #14 on: June 12, 2008, 12:18:30 am »
Lak, thats half the idea of this qvm_ thing.

So you can tell if someone is using a qvm to your liking or not.
45% percent is for qvm devs, to see how their qvm breaks down
5% is for ops and players to see how up-to-date a qvm is

∧OMG ENTROPY∧

Lakitu7

  • Tremulous Developers
  • *
  • Posts: 1002
  • Turrets: +120/-73
Re: qvm_build cvar; Lets establish a standard
« Reply #15 on: June 12, 2008, 12:28:35 am »
Yes. That's why it's serverinfo.