Quake MOD - In The Shadows

Discuss anything not covered by any of the other categories.
Baker
Posts: 3666
Joined: Tue Mar 14, 2006 5:15 am

Re: Quake MOD - In The Shadows

Post by Baker »

*tips hat to Sock*
The night is young. How else can I annoy the world before sunsrise? 8) Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
sock
Posts: 137
Joined: Thu Aug 23, 2012 7:16 pm
Location: Wandering Around
Contact:

Re: Quake MOD - In The Shadows

Post by sock »

@leileilol, I think the BrutalDoom thing is good because it is a crazy old game and it is a thriving community of players who just love playing Doom. If something existed like that for Quake it would be awesome! lots of people wanting to play and test new Quake level/mod content, that would just rock!
@frag.machine, yeah money sucks, I always thought if I did stuff I enjoy I could survive, not this time.
@Dr. Shadowborg, this has been a long time coming, I just been hoping things would change, but reality is a bitch sometimes.
@qbism, I just want to tidy up all my source files and do one final release.
@Seven, yeah it has been cool how many custom engines have helped me get the MOD working. Just shows the community can pull together sometimes.
@r00k, good luck with your engine, you now have some extra level candy to play with!
@Baker, thanks for all the help with the Mark V engine and the pimpage at Quakeone
Well he was evil, but he did build a lot of roads. - Gogglor
Baker
Posts: 3666
Joined: Tue Mar 14, 2006 5:15 am

Re: Quake MOD - In The Shadows

Post by Baker »

Sock, sorry I don't check my email and pretty much no one has an email address for me anyway (I more check private messages and my box here). Apologies for not checking it.

re: Mark V "Baker, Is there any plans for another update soon? "

I hadn't planned on it mostly because I'm more or less assuming a far less active role in Quake and concentrating on private projects (I'm writing something of a multiplatform +iOS minor 2D/3D programming language -- a self-documenting programming language, which is kinda fun but at times a bit of a 5 dimensional chess game at times).

Yeah I can make the small change you requested. Here @ I3D were a small enough close-knit group you can feel free asking me in this thread about anything you'd normally do in a private message. I won't say what you told me in private messages, but that's very neat. :D
The night is young. How else can I annoy the world before sunsrise? 8) Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
sock
Posts: 137
Joined: Thu Aug 23, 2012 7:16 pm
Location: Wandering Around
Contact:

Re: Quake MOD - In The Shadows

Post by sock »

Baker wrote:Here @ I3D were a small enough close-knit group you can feel free asking me in this thread about anything you'd normally do in a private message.
Well it is no secret what I am trying to do, I have mentioned the idea at func and I wrote emails to Id asking them about the shareware version of Quake and what can be done with it.

The Plan
I want to make my MOD available for anyone to download and play without the registered version of Quake. About 80% of my existing mod (v1.1) can run with the official shareware version. I have spent the last couple of weeks replacing all the remaining assets (models and sounds) with my own versions. From my tests I can now run my MOD with the shareware version of Quake but there is one more piece to this puzzle, the engine. My MOD will not work with the shareware Quake engine, but it will work with a re-compiled version of the engine.

I am sure most of you here are well aware of the security checks that are performed to test if the engine is working with a shareware or registered version. (PAK file size, file count, looking for 'pop.lmp' file in the GFX directory and doing a byte by byte comparison) I cannot run my MOD with Fitz or Mark V engines because they have the original security protection. I don't want to suggest that anyone disable these checks in their engine but I want to extend it instead. I don't want to distribute the pop.lmp file with my MOD because this is from the registered version.

I am proposing another idea, that the security checks by the engine are extended so that the engine can recognize a second pop.lmp file. This one generated by the community so that people can use the shareware version of the Quake engine for releasing stuff but not for breaking the existing security. Once the Fitz or MarkV engine recognize the new security file they will let the -game option work and a MOD can then run with the shareware assets. Obviously you are thinking that if someone can add this second community file then they can simply add registered assets, true but if someone is doing that, they might as well just include the pop.lmp file as it would quicker.

I want to create a way for the community to use custom engines with the shareware Quake assets by allowing people to add an extra file that the engine will recognize and allow custom content. Does anyone have any other ideas? Is this idea worth adopting for other Quake engines? This is why I was trying to contact Baker because I wanted him to add this extra security check to the Mark V engine so that I could distribute the new engine with my final zip file.

My ultimate goal is to have one complete package; new engine + Quake shareware assets + ITS MOD
Well he was evil, but he did build a lot of roads. - Gogglor
Baker
Posts: 3666
Joined: Tue Mar 14, 2006 5:15 am

Re: Quake MOD - In The Shadows

Post by Baker »

Make one and I'll add it in. This sounds like a rather good idea that is better than engines which disable the register check (DarkPlaces, for example, since many total conversions have targeted it).

The registered check is important because if someone is truly running shareware, you need those start map gates that won't open so you don't try to play a map you don't have (then again I'm a tad Quake rusty and maybe those happen anyway via the registered cvar).
The night is young. How else can I annoy the world before sunsrise? 8) Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
Spike
Posts: 2914
Joined: Fri Nov 05, 2004 3:12 am
Location: UK
Contact:

Re: Quake MOD - In The Shadows

Post by Spike »

adding support for a second pop.lmp to enable support for -game etc is pointless. you might as well just disable the check entirely (and avoid including the copyrighted file to check it against inside the gpled engine).
(you could also open the gpled source and dump that chunk of data to disk, of course).

if you use the shareware assets with something that violates the terms and conditions of using those shareware assets, then you are in violation of those terms and conditions whether the engine cares or not.

Really, the engine should enable the shareware protections when it finds pak0.pak (and not pop.lmp) rather than merely because it can't find pop.lmp.
The problem is that I'm lead to believe that there are multiple versions of pak0.pak. So maybe if id1/pak0.pak exists, whatever its crc.

the registered cvar is used to signify to the mod that the extra content isn't available, rather than any real protection. This allows you to set it to 1 in single player to gain access to beyond those doors for deathmatch to work on the start map.
frag.machine
Posts: 2126
Joined: Sat Nov 25, 2006 1:49 pm

Re: Quake MOD - In The Shadows

Post by frag.machine »

What would be the effort to replace all shareware assets and thus turn the entire mod a standalone game ? Seems to me the Right Thing (tm) to do, legally speaking.
I know FrikaC made a cgi-bin version of the quakec interpreter once and wrote part of his website in QuakeC :) (LordHavoc)
Baker
Posts: 3666
Joined: Tue Mar 14, 2006 5:15 am

Re: Quake MOD - In The Shadows

Post by Baker »

@Spike - He's not breaking anything, he's got permission to do this. (note my ambigous "that's very neat" above)
The night is young. How else can I annoy the world before sunsrise? 8) Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
taniwha
Posts: 401
Joined: Thu Jan 14, 2010 7:11 am
Contact:

Re: Quake MOD - In The Shadows

Post by taniwha »

QF checks only that gfx/pop.lmp exists. It does read the first 128 bytes, but then discards them (no checks performed, not even that 128 bytes were read). The pop data array is long gone (Jan 2000, it seems).

Other than the fact it prevents unpleasant crashes, I'm inclined to think the engine should just set the cvar to 1 and be done with it. On gaining the GPL, the engine lost the need, or even ability, really, to do any enforcement and it really is the responsibility of the user to do the right thing.

There is no longer the need for any id data to be used by the engine. From readme.txt:
The code is all licensed under the terms of the GPL (gnu public license). You should read the entire license, but the gist of it is that you can do anything you want with the code, including sell your new version. The catch is that if you distribute new binary versions, you are required to make the entire source code available for free to everyone.
...
All of the Quake data files remain copyrighted and licensed under the original terms, so you cannot redistribute data from the riginal game, but if you do a true total conversion, you can create a standalone game based on this code.
The latter means, technically, that the pop array used for the registered check is actually in violation of id's copyright on the game data, or at best creates a conflict with the gpl, which I think is the reason the array was removed in the first place ('twasn't me that did it).

In fact, I'll go remove the useless data read from QF.
Leave others their otherness.
http://quakeforge.net/
sock
Posts: 137
Joined: Thu Aug 23, 2012 7:16 pm
Location: Wandering Around
Contact:

Re: Quake MOD - In The Shadows

Post by sock »

Spike wrote:adding support for a second pop.lmp to enable support for -game etc is pointless. you might as well just disable the check entirely (and avoid including the copyrighted file to check it against inside the gpled engine).
Some engine coders don't want to remove the original security checks. I know some engines have removed it, but I really want to include either Fitz or MarkV in with my final package and I thought this idea might be the easier method without disturbing the original code to much.
frag.machine wrote:What would be the effort to replace all shareware assets and thus turn the entire mod a standalone game ? Seems to me the Right Thing (tm) to do, legally speaking.
I don't think many people realize how many assets are in the Quake shareware version. It would take months to replace and there have been countless projects that have tried. Plus the primary reason for this idea is, I want to work with the original assets, they are awesome. If I replace the shareware assets with something else it would no longer be Quake, I might as well just make another game! I love the game Quake and I thought why not use the shareware assets, they can be distributed free (unmodified)

I thought if I can get my MOD to work with the shareware assets and add anything extra myself then it will not be breaking any agreement. You are allowed to distribute the shareware Quake as long as it is not modified. (all of the files included) The main engine has been under GPL for a long time, if I re-compile the engine to allow my MOD then it should work. The engine will not activate the registered cvar until the pop.lmp file has been found.

Here is an example of what I mean, new file, small code change and new GPL engine exe ready to allow community content to work with the shareware files.

New security file : http://www.simonoc.com/files/misc/community.lmp

Code changes to the common.c file

Code: Select all

// this graphic needs to be in the pak file to use registered features
unsigned short pop[] =
{
 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000
,0x0000,0x0000,0x6600,0x0000,0x0000,0x0000,0x6600,0x0000
,0x0000,0x0066,0x0000,0x0000,0x0000,0x0000,0x0067,0x0000
,0x0000,0x6665,0x0000,0x0000,0x0000,0x0000,0x0065,0x6600
,0x0063,0x6561,0x0000,0x0000,0x0000,0x0000,0x0061,0x6563
,0x0064,0x6561,0x0000,0x0000,0x0000,0x0000,0x0061,0x6564
,0x0064,0x6564,0x0000,0x6469,0x6969,0x6400,0x0064,0x6564
,0x0063,0x6568,0x6200,0x0064,0x6864,0x0000,0x6268,0x6563
,0x0000,0x6567,0x6963,0x0064,0x6764,0x0063,0x6967,0x6500
,0x0000,0x6266,0x6769,0x6a68,0x6768,0x6a69,0x6766,0x6200
,0x0000,0x0062,0x6566,0x6666,0x6666,0x6666,0x6562,0x0000
,0x0000,0x0000,0x0062,0x6364,0x6664,0x6362,0x0000,0x0000
,0x0000,0x0000,0x0000,0x0062,0x6662,0x0000,0x0000,0x0000
,0x0000,0x0000,0x0000,0x0061,0x6661,0x0000,0x0000,0x0000
,0x0000,0x0000,0x0000,0x0000,0x6500,0x0000,0x0000,0x0000
,0x0000,0x0000,0x0000,0x0000,0x6400,0x0000,0x0000,0x0000
};

// this graphic needs to be in the pak file to use registered features
unsigned short community[] =
{
 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000
,0x0000,0x0000,0x3600,0x0000,0x0000,0x0000,0x3600,0x0000
,0x0000,0x0036,0x0000,0x0000,0x0000,0x0000,0x0036,0x0000
,0x0000,0x3635,0x0000,0x0000,0x0000,0x0000,0x0035,0x3600
,0x0033,0x3531,0x0000,0x0000,0x0000,0x0000,0x0031,0x3533
,0x0034,0x3531,0x0000,0x0000,0x0000,0x0000,0x0031,0x3534
,0x0034,0x3534,0x0000,0x3438,0x3838,0x3400,0x0034,0x3534
,0x0033,0x3538,0x3200,0x0034,0x3834,0x0000,0x3238,0x3533
,0x0000,0x3537,0x3833,0x0034,0x3734,0x0033,0x3837,0x3500
,0x0000,0x3236,0x3738,0x3938,0x3738,0x3938,0x3736,0x3200
,0x0000,0x0032,0x3536,0x3636,0x3636,0x3636,0x3532,0x0000
,0x0000,0x0000,0x0032,0x3334,0x3534,0x3332,0x0000,0x0000
,0x0000,0x0000,0x0000,0x0032,0x3632,0x0000,0x0000,0x0000
,0x0000,0x0000,0x0000,0x0031,0x3631,0x0000,0x0000,0x0000
,0x0000,0x0000,0x0000,0x0000,0x3500,0x0000,0x0000,0x0000
,0x0000,0x0000,0x0000,0x0000,0x3400,0x0000,0x0000,0x0000
};

/*
================
COM_CheckRegistered

Looks for the pop.txt file and verifies it.
Sets the "registered" cvar.
Immediately exits out if an alternate game was attempted to be started without
being registered.
================
*/
void COM_CheckRegistered (void)
{
	int             h;
	unsigned short  check[128];
	int                     i;
	int							community_check;

	// New community file check
	COM_OpenFile("gfx/community.lmp", &h);
	static_registered = 0;
	community_check = 0;

	if (h != -1)
	{
		Sys_FileRead (h, check, sizeof(check));
		COM_CloseFile (h);
		community_check = 1;

		for (i=0 ; i<128 ; i++)
			if (pop[i] != (unsigned short)BigShort (check[i]))
				community_check = 0;
	}
	
	if (community_check == 1)
	{
		Cvar_Set ("cmdline", com_cmdline+1); //johnfitz -- eliminate leading space
		Cvar_Set ("registered", "1");
		static_registered = 1;
		Con_Printf ("Playing community version.\n");
	}
	else
	{
		COM_OpenFile("gfx/pop.lmp", &h);
		static_registered = 0;
	
		if (h == -1)
		{
	#if WINDED
		Sys_Error ("This dedicated server requires a full registered copy of Quake");
	#endif
			Con_Printf ("Playing shareware version.\n");
			if (com_modified)
				Sys_Error ("You must have the registered version to use modified games");
			return;
		}
	
		Sys_FileRead (h, check, sizeof(check));
		COM_CloseFile (h);
	
		for (i=0 ; i<128 ; i++)
			if (pop[i] != (unsigned short)BigShort (check[i]))
				Sys_Error ("Corrupted data file.");
	
		Cvar_Set ("cmdline", com_cmdline+1); //johnfitz -- eliminate leading space
		Cvar_Set ("registered", "1");
		static_registered = 1;
		Con_Printf ("Playing registered version.\n");
	}
}
Well he was evil, but he did build a lot of roads. - Gogglor
sock
Posts: 137
Joined: Thu Aug 23, 2012 7:16 pm
Location: Wandering Around
Contact:

Re: Quake MOD - In The Shadows

Post by sock »

taniwha wrote:Other than the fact it prevents unpleasant crashes, I'm inclined to think the engine should just set the cvar to 1 and be done with it. On gaining the GPL, the engine lost the need, or even ability, really, to do any enforcement and it really is the responsibility of the user to do the right thing.
I just want to find a way for the community to use the shareware assets so more people can play Quake community projects. Personally I think all custom quake engines should ignore the pop.lmp security check but this is up to the individual engine developer. I though by having a community security check file then all engines could be adapted and still maintain the original check.

I am sure I am not alone but hardly any of my friends have a full copy of Quake anymore and not many want to buy a copy just to play my MOD. I thought if we can find a way for the shareware version to work with custom content that does not infringe the registered version then it will open up the community to a lot more people! The real hurdle was the engine but that is GPL'd so the security check can either be extended or removed.
Well he was evil, but he did build a lot of roads. - Gogglor
LordHavoc
Posts: 322
Joined: Fri Nov 05, 2004 3:12 am
Location: western Oregon, USA
Contact:

Re: Quake MOD - In The Shadows

Post by LordHavoc »

I want to point out that based on what I have heard, Quake1 is one of the best selling games of all time, and keeps selling to this day, it has frequently been in the top 10 sellers on Steam week to week (at times being the #1 when it goes on sale), and that means something, there is an audience for Quake, the question is if there is a way to reach the Quake players and whether they want new content, perhaps more importantly if they're willing to chip in funds to make new content.

It's easy to lose sight of the nuances of the audience when you are a developer, it seems more likely this was a case of not reaching the audience than a case of the audience not caring.

Just my take on it.

EDIT: on the topic of gfx/pop.lmp, in darkplaces I simply detect the presence of the file and do not care about its contents and set the registered cvar accordingly, furthermore DP allows you to run mods without the file present, but posts a warning that mods usually require the full quake to properly function, this kept in place the mechanic of closing the episode halls in start.bsp but without violating copyright (ironic as it may be) on the pop.lmp itself. Furthermore I block downloads of any file from any pak that contains gfx/pop.lmp to prevent people from using the download functionality on the client to pull files that they shouldn't have. And if the active game is not one of the Quake-derived ones (Nexuiz or Steel Storm: Burning Retribution, or Darsana, etc), it does not post any such notice about shareware/registered Quake as it isn't pertinent. If you really wanted to check the pop.lmp contents you can replace it with a CRC comparison of the contents anyway. It was clearly an oversight of id to leave the contents in the source code.
Baker
Posts: 3666
Joined: Tue Mar 14, 2006 5:15 am

Re: Quake MOD - In The Shadows

Post by Baker »

LordHavoc wrote:I want to point out that based on what I have heard, Quake1 is one of the best selling games of all time, and keeps selling to this day, it has frequently been in the top 10 sellers on Steam week to week (at times being the #1 when it goes on sale), and that means something, there is an audience for Quake, the question is if there is a way to reach the Quake players and whether they want new content, perhaps more importantly if they're willing to chip in funds to make new content.
Some of the Steam people's are incredibly confused even with the idea of installing a modified engine, which isn't surprising as most people aren't looking for a new hobby they just want the game to work out of the box. Which of course you know, GLQuake doesn't work out of the box (if it works at all) and then if it does there is the +mlook deal ...

Sockums ... how about this version of Mark V defaulting all of the command line parameters you need so ppl need not be bothered with that so tell me what you want ...
The night is young. How else can I annoy the world before sunsrise? 8) Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
taniwha
Posts: 401
Joined: Thu Jan 14, 2010 7:11 am
Contact:

Re: Quake MOD - In The Shadows

Post by taniwha »

Unfortunately, it's not really legal to use the shareware data with mod data, but I'm not one for enforcing that.

What I want to see is some free (even if crappy) assets for quake. Fortunately, the palette seems to be free (apparently public domain), so compatible textures aren't a problem (other than creating them in the first place). The maps have been put under the GPL, so the maps themselves aren't a probllem (just need new textures: even null textures would be sufficient, if ugly). Even the QC code is GPL. That leaves monsters and items, and most items are easy enough as they are not animated. There's also the font, but that's pretty much a non issue for many modern engines (QF not included at this time) since they use freefont (or similar).

Sock, you're already partway there with your mod.
Leave others their otherness.
http://quakeforge.net/
sock
Posts: 137
Joined: Thu Aug 23, 2012 7:16 pm
Location: Wandering Around
Contact:

Re: Quake MOD - In The Shadows

Post by sock »

LordHavoc wrote:It's easy to lose sight of the nuances of the audience when you are a developer, it seems more likely this was a case of not reaching the audience than a case of the audience not caring.
Totally agree, I have tried every way I know to reach the steam quake audience. It is impossible at this point to get custom quake content on steam. I go to steam, look at quake and there is no option to publish MODs for Quake, it certainly possible I could be missing something with the steam interface. I would love to get my MOD on steam but got no idea how that is going to happen.
Baker wrote:
LordHavoc wrote:how about this version of Mark V defaulting all of the command line parameters you need so ppl need not be bothered with that so tell me what you want ...
-heapsize 64000
-game shadows
+mlook
+map start

Also is there a way to have the same model lighting as Fitz? I still get lots of model pitch black but they look fine in Fitz. I remember John over at Func saying something about a lightmap change but I am not sure what the technical fix was.
Well he was evil, but he did build a lot of roads. - Gogglor
Post Reply