how disable cd key check?
how disable cd key check?
Each time when i start my Ioquake3 he askes for the CD Key how can I disable this where it is in the code anybode knows?
Otherwise how can i add .cfg in the console /exec example.cfg but where in the code I can do this that he made this example.cfg as a default?
Thank you
Otherwise how can i add .cfg in the console /exec example.cfg but where in the code I can do this that he made this example.cfg as a default?
Thank you
Re: how disable cd key check?
it is not legal
also you dont need to enter anything
also you dont need to enter anything
Re: how disable cd key check?
hmm sure?
Because the Standalone games ala urbanterror that based on ioquake3 doesnt have the cd key check anymore
and what is with my other question any ideas?
Because the Standalone games ala urbanterror that based on ioquake3 doesnt have the cd key check anymore
and what is with my other question any ideas?
Re: how disable cd key check?
standalone games are not quake3
quake3 is a commercial game, ioquake3 didn't removed the check because it works with quake3 media
assuming you are working on a standalone game take look at this...
http://openarena.ws/svn/source/oachanges.diff
quake3 is a commercial game, ioquake3 didn't removed the check because it works with quake3 media
assuming you are working on a standalone game take look at this...
http://openarena.ws/svn/source/oachanges.diff
-
- Posts: 2237
- Joined: Sat Mar 12, 2005 10:49 pm
Re: how disable cd key check?
but OpenArena merely replaces the Quake 3 media with GPL friendly media. It runs on IOQuake3 irrc...
Also, the code is open source now. I don't see any problems with disabling the cd key check regardless if the executable can read and use the vanilla Q3 media.
In any case, this is how I disabled the cdkey check since I couldn't get anything to run even if I entered nothing for the cdkey.
in ui_main.c, take a peek at UI_SetActiveMenu(uiMenuCommand_t menu)...
I simply commented out the checks for a cd key.
See if you can spot the checks and try commenting them out yourself
I had my version of the function posted but I edited this post because merely copying/pasting code doesn't teach you anything.
Good luck!
Also, the code is open source now. I don't see any problems with disabling the cd key check regardless if the executable can read and use the vanilla Q3 media.
In any case, this is how I disabled the cdkey check since I couldn't get anything to run even if I entered nothing for the cdkey.
in ui_main.c, take a peek at UI_SetActiveMenu(uiMenuCommand_t menu)...
I simply commented out the checks for a cd key.
See if you can spot the checks and try commenting them out yourself

Good luck!
Re: how disable cd key check?
I commented out everything that looks as if it could have something to do with the cdkey, but without success
(oh, in "normal" q3, not ioquake). I'm not a coder and guess I'll never become one. Just would like to make that stupid keycheck disappear from my mod... Could you pm me the altered code?! Don't want to ruin the learning experience for others of course! 


[color=#FF0000]Visit MONKEYS of DOOM at [url]http://www.monkeysofdoom.org[/url][/color]
Re: how disable cd key check?
OA does have ui/engine code changes, it doesn't ask for a cd key...Silicone_Milk wrote:but OpenArena merely replaces the Quake 3 media with GPL friendly media. It runs on IOQuake3 irrc...
-
- Posts: 4022
- Joined: Sat Mar 12, 2005 6:24 pm
Re: how disable cd key check?
Yep, it branched from ioquake3 nearly two years ago (rev 1106, I think).
Re: how disable cd key check?
I need this for Symbian OS Q3, which is based on the id version of the source. But I'm gonna have a look at the code from oa. Maybe ui_main.c doesn't differ too much...
[color=#FF0000]Visit MONKEYS of DOOM at [url]http://www.monkeysofdoom.org[/url][/color]
-
- Posts: 4022
- Joined: Sat Mar 12, 2005 6:24 pm
Re: how disable cd key check?
UI_MainMenu() in q3_ui/ui_menu.c. Remove this bit:
Code: Select all
if( !uis.demoversion && !ui_cdkeychecked.integer ) {
char key[17];
trap_GetCDKey( key, sizeof(key) );
if( trap_VerifyCDKey( key, NULL ) == qfalse ) {
UI_CDKeyMenu();
return;
}
}
Re: how disable cd key check?
Great, works! Thanks a lot once again! 

[color=#FF0000]Visit MONKEYS of DOOM at [url]http://www.monkeysofdoom.org[/url][/color]
-
- Posts: 2237
- Joined: Sat Mar 12, 2005 10:49 pm
Re: how disable cd key check?
Interesting. I hadn't touched UI_MainMenu but still managed to disable the cd key check.
Hmm... I probably ended up breaking something rather than disabling the check -_-
Hmm... I probably ended up breaking something rather than disabling the check -_-
Re: how disable cd key check?
PS:
I think it isn't worth opening a new thread for this cause it might not be interesting for anyone but me: How do I disable (skip) the "confirm" window, too?
Can I just set "qboolean" to "qtrue" and comment out the rest?
(I know, I know... I'm asking a whole lot of questions theese days)
I think it isn't worth opening a new thread for this cause it might not be interesting for anyone but me: How do I disable (skip) the "confirm" window, too?
Code: Select all
/*
=================
ConfirmMenu_Event
=================
*/
static void ConfirmMenu_Event( void* ptr, int event ) {
qboolean result;
if( event != QM_ACTIVATED ) {
return;
}
UI_PopMenu();
if( ((menucommon_s*)ptr)->id == ID_CONFIRM_NO ) {
result = qfalse;
}
else {
result = qtrue;
}
if( s_confirm.action ) {
s_confirm.action( result );
}
}
(I know, I know... I'm asking a whole lot of questions theese days)

[color=#FF0000]Visit MONKEYS of DOOM at [url]http://www.monkeysofdoom.org[/url][/color]
Re: how disable cd key check?
Hm... No, doesn't work that way.
[color=#FF0000]Visit MONKEYS of DOOM at [url]http://www.monkeysofdoom.org[/url][/color]
Re: how disable cd key check?
"qboolean" is the type of "result"
qtrue and qfalse are possible values for "result". they are not types
qtrue and qfalse are possible values for "result". they are not types

Re: how disable cd key check?
In the main menu code, ui_menu.c, each of the buttons you can press are giving unique identification numbers, #define'd up at the very top. Whenever the user clicks on a button, the mouse/key handling code routes the button to the "callback" function, where an appropriate decision about what to do is made based upon the ID.
Since you know that clicking the exit button is what triggers the confirmation menu, then look for where the button is defined:
You can see that the id is set to ID_EXIT, and the callback is Main_MenuEvent. So have a gander there to see what happens:
This is where you want to be working. If you want it to just exit, then you need to investigate UI_ConfirmMenu() further to find out what is done when the user presses "yes", and then copy that up to this level and remove the call to UI_ConfirmMenu().
If I were you I'd pick up The C Programming Language; reading just the first couple of chapters will help you out immensely, and even if you don't want to sit down and learn the language, you can use it as a reference to look things up and figure out what code is doing. It's like < 200 pages IIRC and very concise.
Since you know that clicking the exit button is what triggers the confirmation menu, then look for where the button is defined:
Code: Select all
s_main.exit.generic.type = MTYPE_PTEXT;
s_main.exit.generic.flags = QMF_CENTER_JUSTIFY|QMF_PULSEIFFOCUS;
s_main.exit.generic.x = 320;
s_main.exit.generic.y = y;
s_main.exit.generic.id = ID_EXIT;
s_main.exit.generic.callback = Main_MenuEvent;
s_main.exit.string = "EXIT";
s_main.exit.color = color_red;
s_main.exit.style = style;
Code: Select all
/*
=================
Main_MenuEvent
=================
*/
void Main_MenuEvent (void* ptr, int event) {
if( event != QM_ACTIVATED ) {
return;
}
switch( ((menucommon_s*)ptr)->id ) {
case ID_SINGLEPLAYER:
UI_SPLevelMenu();
break;
case ID_MULTIPLAYER:
UI_ArenaServersMenu();
break;
case ID_SETUP:
UI_SetupMenu();
break;
case ID_DEMOS:
UI_DemosMenu();
break;
case ID_CINEMATICS:
UI_CinematicsMenu();
break;
case ID_MODS:
UI_ModsMenu();
break;
case ID_TEAMARENA:
trap_Cvar_Set( "fs_game", "missionpack");
trap_Cmd_ExecuteText( EXEC_APPEND, "vid_restart;" );
break;
case ID_EXIT:
UI_ConfirmMenu( "EXIT GAME?", 0, MainMenu_ExitAction );
break;
}
}
If I were you I'd pick up The C Programming Language; reading just the first couple of chapters will help you out immensely, and even if you don't want to sit down and learn the language, you can use it as a reference to look things up and figure out what code is doing. It's like < 200 pages IIRC and very concise.
Re: how disable cd key check?
Thanks for the detailed explanation!
I had a closer look at ConfirmMenu_Event, but what I found there doesn't seem to fit within Main_MenuEvent...
Don't understand what happens when the player hits "Yes", only that it's not the same as when he hits "No"...
Oh, and I would like to get completely rid of that "Confirm" dialog! (Appears in some other occasions, too...)

Code: Select all
/*
=================
ConfirmMenu_Event
=================
*/
static void ConfirmMenu_Event( void* ptr, int event ) {
qboolean result;
if( event != QM_ACTIVATED ) {
return;
}
UI_PopMenu();
if( ((menucommon_s*)ptr)->id == ID_CONFIRM_NO ) {
result = qfalse;
}
else {
result = qtrue;
}
if( s_confirm.action ) {
s_confirm.action( result );
}
}

Oh, and I would like to get completely rid of that "Confirm" dialog! (Appears in some other occasions, too...)
[color=#FF0000]Visit MONKEYS of DOOM at [url]http://www.monkeysofdoom.org[/url][/color]
-
- Posts: 4022
- Joined: Sat Mar 12, 2005 6:24 pm
Re: how disable cd key check?
You want every confirmation menu to not display and act like the user clicked 'Yes'? Or only one or two specific instances?
Re: how disable cd key check?
Exactly!^misantropia^ wrote:You want every confirmation menu to not display and act like the user clicked 'Yes'?
[color=#FF0000]Visit MONKEYS of DOOM at [url]http://www.monkeysofdoom.org[/url][/color]
-
- Posts: 4022
- Joined: Sat Mar 12, 2005 6:24 pm
Re: how disable cd key check?
Easy. q3_ui/ui_confirm.c, replace this code:
With this:
Code: Select all
void UI_ConfirmMenu( const char *question, void (*draw)( void ), void (*action)( qboolean result ) ) {
UI_ConfirmMenu_Style(question, UI_CENTER|UI_INVERSE, draw, action);
}
Code: Select all
void UI_ConfirmMenu( const char *question, void (*draw)( void ), void (*action)( qboolean result ) ) {
if (action) {
action(qtrue);
}
}
Re: how disable cd key check?
Not for me!^misantropia^ wrote:Easy.

[color=#FF0000]Visit MONKEYS of DOOM at [url]http://www.monkeysofdoom.org[/url][/color]