[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4787: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4789: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4790: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4791: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
InsideQC Forums • View topic - Adding a class editor to the engine?

Adding a class editor to the engine?

Discuss programming topics for the various GPL'd game engine sources.

Moderator: InsideQC Admins

Adding a class editor to the engine?

Postby drm_wayne » Wed Sep 05, 2012 11:13 am

Hi,

Most of you know the classic shirt/pants color selector i nthe multiplayer options...
But since i am kinda bad at enginecoding i have a question:

It it possible to use the shirt/pants color selector as a class editor, meaning:

Player can select 2 weapons from there for multiplayer gaming,
the first row will be used for primary weapons (IT_NAILGUN etc..),
second row for secondary / sidearm weapons (IT_SHOTGUN etc..)...

I know in quake the starting weapons are defined in client.qc.

I am using Bakers newest ProQuake.
User avatar
drm_wayne
 
Posts: 232
Joined: Sat Feb 11, 2012 5:47 pm

Re: Adding a class editor to the engine?

Postby Spike » Wed Sep 05, 2012 1:49 pm

using quakeworld, you can use the setinfo console command paired with the infokey builtin to read a user's settings. this includes their "topcolor" and "bottomcolor" fields.
using vanilla NQ, you are only able to read their bottomcolor value via the .team field, the topcolor value is inaccessible.
using DP, you can define a .clientcolors field which gets set to some bitfield of the upper and lower values.
using baker's newest proquake, you may need to use qccx hacks instead, I don't know if he added either infokey or clientcolors.

from an engine-hack perspective, you'd want to edit the menu.c code to display text instead of images. sprintf combined with some M_DrawString call or something would do the job.
The alternative is a centerprint menu, combined with stuffcmd(self, "color ", bottom, top, "\n") to save it.
Beware that not all clients will save colours that are sent from a server over map changes, to avoid TF breaking overriding people's configs.
.
Spike
 
Posts: 2914
Joined: Fri Nov 05, 2004 3:12 am
Location: UK

Re: Adding a class editor to the engine?

Postby drm_wayne » Wed Sep 05, 2012 7:24 pm

User avatar
drm_wayne
 
Posts: 232
Joined: Sat Feb 11, 2012 5:47 pm

Re: Adding a class editor to the engine?

Postby Spike » Wed Sep 05, 2012 8:33 pm

SetNewParms is called before the player entity is valid, and cannot reference 'self'. You cannot do any class specific stuff within it. All you can do is set some parm to 'unknown', and choose properly later on (ie: within putclientinserver).
.
Spike
 
Posts: 2914
Joined: Fri Nov 05, 2004 3:12 am
Location: UK

Re: Adding a class editor to the engine?

Postby ceriux » Thu Sep 06, 2012 1:13 pm

he wants to edit the engine, so that the engine is defining the IT_*** fields rather than QC. he wants the players to pick a primary and secondary weapon defined in qc but chosen in the multiplayer options menu.

(select your weapon set in multiplayer options.)
User avatar
ceriux
 
Posts: 2230
Joined: Sat Sep 06, 2008 3:30 pm
Location: Indiana, USA

Re: Adding a class editor to the engine?

Postby drm_wayne » Fri Sep 07, 2012 2:57 pm

Maybe it can be done with using impulse commands in the menu?

example: If you select "Class Bla1" you will get IT_SHOTGUN and IT_NAILGUN via an impulsecommand,
and you can only change the class when you are dead in multiplayer...
User avatar
drm_wayne
 
Posts: 232
Joined: Sat Feb 11, 2012 5:47 pm

Re: Adding a class editor to the engine?

Postby ceriux » Mon Sep 10, 2012 5:49 pm

wouldnt that require having more buttons? or making the player always travel to an accept option after death? maybe, only once and the begginging of the game?

if the menu's up the player cant spawn really with or without impulse commands.

not to mention everytime the menu's up it'll probably cause lag. centerprint menu's seem to work best in short spurts.
User avatar
ceriux
 
Posts: 2230
Joined: Sat Sep 06, 2008 3:30 pm
Location: Indiana, USA


Return to Engine Programming

Who is online

Users browsing this forum: No registered users and 2 guests