Multi-Gaming Community
It is currently 18 Jun 2025, 07:21

All times are UTC+02:00




Post new topic  Reply to topic  [ 15 posts ] 
Author Message
 Post subject: Ingame menu
PostPosted: 10 Apr 2009, 16:09 
Offline
Geek (690)
User avatar
How could a man like me use a menu (like the sound commands) with options being bound to certain console commands? There are some things I'd like to have arranged in that so they can't be activated on accident by pressing a key.

.res I suppose, but how and when and howto if possible.


Top
   
 Post subject: Re: Ingame menu
PostPosted: 10 Apr 2009, 16:18 
Offline
Community slut (13474)
User avatar
Menu's are initialized from the server on our servers. Not sure if its even possible to create a client side menu.


Top
   
 Post subject: Re: Ingame menu
PostPosted: 10 Apr 2009, 16:29 
Offline
The Necromancer (4970)
It is. It's slightly complicated though. I'll writ about it when I don't have guests at home like now. :-P

_________________
War does not determine who is right - only who is left. - Bertrand Russell


Top
   
 Post subject: Re: Ingame menu
PostPosted: 10 Apr 2009, 16:50 
Offline
Has no REAL life! (1120)
Also very interested in this matter. Possibilities!

_________________
slurper


Top
   
 Post subject: Re: Ingame menu
PostPosted: 10 Apr 2009, 16:52 
Offline
Geek (690)
User avatar
Code:
"customcommands"
{
	"menu_1"
	{
		"item_1"
		{
			"menu_label"				"Reload HUD"
			"command"				"engine hud_reloadscheme"
		}
		
		"item_2"
		{	
			"menu_label"				Net Graph ON"
			"command"				"engine net_graph 3"
		}
	}
}
Something like that I suppose? But how would I bind it? Just stick it in resource folder and it works by binding something to "customcommands"? I don't very surely think so


Top
   
 Post subject: Re: Ingame menu
PostPosted: 10 Apr 2009, 18:39 
Offline
Geek (690)
User avatar
[SpA]SaintK wrote:
Menu's are initialized from the server on our servers. Not sure if its even possible to create a client side menu.
Wait, can you run clientside commands with the server's menu? If that's the case, maybe we could have a !problem command or something. Missing cart display and messed up names/team colors are common and many don't know how to fix it. Or something.


Top
   
 Post subject: Re: Ingame menu
PostPosted: 10 Apr 2009, 20:04 
Offline
Community slut (13474)
User avatar
Murk wrote:
[SpA]SaintK wrote:
Menu's are initialized from the server on our servers. Not sure if its even possible to create a client side menu.
Wait, can you run clientside commands with the server's menu? If that's the case, maybe we could have a !problem command or something. Missing cart display and messed up names/team colors are common and many don't know how to fix it. Or something.
I think that would be a possibility, not entirely sure thought. Will first wait for Lim-dul's reply 8)


Top
   
 Post subject: Re: Ingame menu
PostPosted: 10 Apr 2009, 20:27 
Offline
Has no REAL life! (1829)
User avatar
[SpA]Lim-Dul wrote:
It is. It's slightly complicated though. I'll writ about it when I don't have guests at home like now. :-P
"Excuse me for 30mins, I have to spam the SpA Forums"

:D

_________________
All roads may lead to Rome, but all Wikipedia pages eventually get you to the Third Reich. - m3n


Top
   
 Post subject: Re: Ingame menu
PostPosted: 10 Apr 2009, 21:19 
Offline
The Necromancer (4970)
OK - as to the GUI menu... I searched around and apparently Valve removed this option from the games. It was mainly for CS/CS:S as they had a +commandmenu command. In TF2 (and L4D for that matter) you can only try to edit existing menus since they don't have a separate option for custom menus...

As to the client commands - in some update Valve blocked executing client-side commands unless they set some CVAR I can't be arsed to look for and which nobody ever sets to 1 anyway, so it's kinda pointless...

_________________
War does not determine who is right - only who is left. - Bertrand Russell


Top
   
 Post subject: Re: Ingame menu
PostPosted: 10 Apr 2009, 21:37 
Offline
Geek (690)
User avatar
Well that's pretty lame.

Okay, let's have a different approach. Is it possible to draw text (multiline if possible) from client? This could be made with a borderless list of stuff and loads of aliases... Maybe.


Top
   
 Post subject: Re: Ingame menu
PostPosted: 10 Apr 2009, 21:43 
Offline
The Necromancer (4970)
Draw text client-side? You mean like printing console output (developer 1) and echoing text with the "echo" command? Yeah, that is possible - I have extensive scripts for CS:S using this technique - ah, and the loadout switching scripts for TF2 that don't work anymore thanks to Valve's stupid updates also used this...

The number of lines shown is controlled via a CVAR. I'd have to re-check the details.

_________________
War does not determine who is right - only who is left. - Bertrand Russell


Top
   
 Post subject: Re: Ingame menu
PostPosted: 10 Apr 2009, 21:45 
Offline
Geek (690)
User avatar
I did some more research and came up with a theory.

For the thing to be availible to the game, it needs to be listed in ROOT\tf\reslists\engine.lst (or one of those million lists. it's confusing) and to show up, it needs to be defined in ROOT\tf\scripts\hudlayout.res. Is it possible that maybe it can work then?


Also that text drawing clientside, yeah i thought of echo, but it's pretty crappy when it comes to staying on screen and actually telling you something.


Top
   
 Post subject: Re: Ingame menu
PostPosted: 10 Apr 2009, 21:49 
Offline
The Necromancer (4970)
Oh yes indeed it is crappy - especially since Valve modified the behavior of the developer 1 switch a while ago as well... They can't really be blamed - they simply want to limit script abusers since for every useful legit script there's some cheater script designed to give an unfair advantage to the player.

As to defining new menus and such - this is outside my area of knowledge since this borders on MOD-making and I'd have to read up on that just as much as you...

_________________
War does not determine who is right - only who is left. - Bertrand Russell


Top
   
 Post subject: Re: Ingame menu
PostPosted: 10 Apr 2009, 21:54 
Offline
Geek (690)
User avatar
I think I'll give it a shot and see if it works.



And if it will work I'll be super famous and all women will want me for my superior team fortress 2 haxxors skillz and i'll wear a diamond encrusted platinum tophat
also i'll donate some more to be the richest again




Top
   
 Post subject: Re: Ingame menu
PostPosted: 11 Apr 2009, 12:19 
Offline
Illiterate (1)
Murk wrote:
Well that's pretty lame.

Okay, let's have a different approach. Is it possible to draw text (multiline if possible) from client? This could be made with a borderless list of stuff and loads of aliases... Maybe.
Seen it done by enabling developer console and using echoes.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 15 posts ] 

All times are UTC+02:00


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Limited