Client Side Custom CVARs?

Discuss all aspects related to modding Zandronum here.
Post Reply
XutaWoo
Forum Regular
Posts: 113
Joined: Mon Jun 04, 2012 7:04 am

Client Side Custom CVARs?

#1

Post by XutaWoo » Tue Apr 01, 2014 8:04 pm

Quick question, since I'm not sure where to check: Is there a way to GetCVAR the client's CVAR? I'm asking because I'm trying to implent a strictly player-based option ( display their team's object health as a percentage instead of a raw value ) and I can't really use my ZDoom knowledge here.

Thanks in advance.
[spoiler]Image[/spoiler]
Image

Ijon Tichy
Frequent Poster Miles card holder
Posts: 901
Joined: Mon Jun 04, 2012 5:07 am

RE: Client Side Custom CVARs?

#2

Post by Ijon Tichy » Tue Apr 01, 2014 8:43 pm

Look at Samsara's ACS for that. Basically, you need a clientside OPEN script that reads off the client CVars, packs them off somehow (booleans are easy enough, and for other crap you'll likely need multiple invocations), and uses StrParam with ConsoleCommand to puke net scripts to tell the server what that client has its CVars set to. Ideally, only do it on connect, and when the values change (Samsara has it easy as it only uses boolean CVars).

Roundabout as hell, but it works.


I'm not even sure how ZDoom handles user CVars in ACS online!
Last edited by Ijon Tichy on Tue Apr 01, 2014 8:45 pm, edited 1 time in total.

XutaWoo
Forum Regular
Posts: 113
Joined: Mon Jun 04, 2012 7:04 am

RE: Client Side Custom CVARs?

#3

Post by XutaWoo » Tue Apr 01, 2014 9:12 pm

... I think I'll just wait until CVARINFO hits the scene.

Thanks for the quick answer, though! :p
[spoiler]Image[/spoiler]
Image

Ijon Tichy
Frequent Poster Miles card holder
Posts: 901
Joined: Mon Jun 04, 2012 5:07 am

RE: Client Side Custom CVARs?

#4

Post by Ijon Tichy » Wed Apr 02, 2014 1:44 am

XutaWoo wrote: ... I think I'll just wait until CVARINFO hits the scene.
So five years?

XutaWoo
Forum Regular
Posts: 113
Joined: Mon Jun 04, 2012 7:04 am

RE: Client Side Custom CVARs?

#5

Post by XutaWoo » Wed Apr 02, 2014 1:45 am

Ijon Tichy wrote:
XutaWoo wrote: ... I think I'll just wait until CVARINFO hits the scene.
So five years?
It's merely for personal preference when it comes to aesthetics anyway, so I don't think that's too big of an issue. :P
[spoiler]Image[/spoiler]
Image

Post Reply