How to mod

Locked
JB
Posts: 1030
Joined: Fri Sep 22, 2006 11:31 am

How to mod

Post by JB »

Can someone walk me through what to do to a) mod Quake 3 and b) compile it as a standalone game with OS X or Windows XP?

I have the source code and some (basic) coding knowledge.
^misantropia^
Posts: 4022
Joined: Sat Mar 12, 2005 6:24 pm

Re: How to mod

Post by ^misantropia^ »

Just to be sure: http://ioquake3.org/source-codes/ <-- the source you'll need for a standalone game. How to mod: edit the source. What exactly are you trying to accomplish?
JB
Posts: 1030
Joined: Fri Sep 22, 2006 11:31 am

Re: How to mod

Post by JB »

a total graphical conversion, as well as gameplay changes, new models, skins, physics, pretty much everything.

I dont know where to start, or how to finish, if you know what i mean. Compiling the .app file is completely lost on me at this stage, and i have no idea what to do :(

EDIT: Also, im here: http://svn.icculus.org/quake3/?rev=1268#dirlist and i dont know how to download the directory tree. I assume thats the source i need to get, right?
Nanoko
Posts: 76
Joined: Thu Jun 07, 2007 6:40 am

Re: How to mod

Post by Nanoko »

take a look at openarena. I know I haven't actually contributed anything, but I figure out how to mod by looking at what other people have done and checking each thing out individually. then come the tutorials when its FUBAR.

also, this will make your life a lot (a LOT) easier. http://quark.planetquake.gamespy.com/


and I hate GTKRadiant. ugh.

wel, since its a total conversion, Id say start checking out models to put in it yourself, so you can get something accomplished before you go about asking people to help you. Modelling is really, really hard, but you may want to start there anyway. You can piece together maps, or model it somewhere like 3dsmax, and then import it as a map. Physics, you're on your own, but I'm working on ragdolls. (I know its possible, and it should be a lot easier than this. SoF did it, if not too advanced. I have the ragdolls custom made for the model I want to test it on, but I still need to figure out how to get it in.)

... Oh. Right. to sum it all up, fuck around a bit, use Quark, and get a few tutorials. The folk at the TES forums are really generous when it comes to donating models, btw.

and for http://svn.icculus.org/quake3/?rev=1268#dirlist, you need an svn updater. I personally use TortoiseSVN (google it), and hit SVN checkout on an empty folder, then give it that link.


or I can just get it and upload it as an .rar. That would work too.
Nanoko
Posts: 76
Joined: Thu Jun 07, 2007 6:40 am

Re: How to mod

Post by Nanoko »

and because I'm so nice, I uploaded it for ya. It compressed nicely - 32 megs or so down to 6. here ya go.

http://www.sendspace.com/file/yct36n
JB
Posts: 1030
Joined: Fri Sep 22, 2006 11:31 am

Re: How to mod

Post by JB »

wow, thanks a lot :D

To clear some stuff up, i already know how to model (Maya and Blender), skin, animate in 3D (kinda), i can stumble my way through code probably, and a friend of mine is great with GTKradiant. Things are sorta set there, what i DONT know is how to do it.

I dont know what to do - do i open pak0.pk3 and change whats in that, then recompile that as a pk3? Then compile that with ioq3?
corncobman
Posts: 304
Joined: Fri Aug 08, 2003 7:00 am

Re: How to mod

Post by corncobman »

No you need to download the source code in order to make a mod.

You should be able to download the source code for openarena from their website.

If you want to start from scratch you can search for the 1.32 source code.

You make changes to the code and then compile it using the bat files provided or using Microsoft Visual Studio / Minggw, or other IDE etc.

Pak0.pk3 just contains the media and the compiled stuff, no source in it.
-It is not the fall that kills you. It's the sudden stop at the end. (Douglas Adams)-

[url=http://www.violationentertainment.com/misc/ccm]-An eyeful a day is bloody fantastic!-[/url]
JB
Posts: 1030
Joined: Fri Sep 22, 2006 11:31 am

Re: How to mod

Post by JB »

so how do i change the media?

Total graphical conversion.
corncobman
Posts: 304
Joined: Fri Aug 08, 2003 7:00 am

Re: How to mod

Post by corncobman »

If you want to make a total graphical conversion that is standalone and free you will need to create all the media yourself. You would have to either replace the existing media with files of the same name, or modify the code to suit your new media.

If you want other people to need Quake 3 then you can just create a new .pk3 file called pak9.pk3 or something. As long as it's alphabetically after pak0-pak8.pk3.

To create .pk3 files, just make .zip files and rename the extension to .pk3
-It is not the fall that kills you. It's the sudden stop at the end. (Douglas Adams)-

[url=http://www.violationentertainment.com/misc/ccm]-An eyeful a day is bloody fantastic!-[/url]
JB
Posts: 1030
Joined: Fri Sep 22, 2006 11:31 am

Re: How to mod

Post by JB »

That may be the better way to start, before releasing something standalone. So i DO modify pak0.pk3 to change the media in-game?

Sweet, easy :)

K, ill start with just a Q3 mod, and then work up to the standalone conversion.
JB
Posts: 1030
Joined: Fri Sep 22, 2006 11:31 am

Re: How to mod

Post by JB »

kk, id also like to become acquainted with the code, like, finding out where stuff is, what to edit to change what, etc.

I mean, which .c file or .h file do i edit to change weapon rate of fire and damage?

EDIT: pardon my double post :)
DTS
Posts: 2879
Joined: Thu Jul 13, 2000 7:00 am

Re: How to mod

Post by DTS »

JB wrote:So i DO modify pak0.pk3 to change the media in-game?
No, open up a custom map or model or skin pk3 to see how it's done.

Basically you arrange the directories and filenames the same way as the original pk3s, and Q3 loads pk3s in alphabetical order, so after it's loaded the original pk3s it will load yours, if it's named starting with a letter after the original pk3s (which is why some custom pks are named starting with "z-"), and the files loaded in later pk3s replace the ones loaded in earlier pk3s, so that way the original media can be replaced as the game loads.

I wouldn't call it pak9 cause that could get confused with the originals (or if they make a patch that adds another pk3, then they couldn't be in the same folder (you can't have two identically named files with identical extensions)).

Btw, we have a coding forum here, wouldn't that be a better place to ask about modding?

There's the maps and models forum for changing media aswell.
corncobman
Posts: 304
Joined: Fri Aug 08, 2003 7:00 am

Re: How to mod

Post by corncobman »

Weapon fire rate: bg_pmove.c

Weapon damage: g_weapon.c
-It is not the fall that kills you. It's the sudden stop at the end. (Douglas Adams)-

[url=http://www.violationentertainment.com/misc/ccm]-An eyeful a day is bloody fantastic!-[/url]
Nanoko
Posts: 76
Joined: Thu Jun 07, 2007 6:40 am

Re: How to mod

Post by Nanoko »

hey, while we're here, how do you change fall damage? It pisses me off falling off a giant cliff and only taking 10 damage.
JB
Posts: 1030
Joined: Fri Sep 22, 2006 11:31 am

Re: How to mod

Post by JB »

corncobman wrote:Weapon fire rate: bg_pmove.c

Weapon damage: g_weapon.c
What about movement? Physics? Could you list more pages of possible interest? :)

Also, i dont think i quite follow whats being implied. I create my custom .pk3 (by renaming a .zip file) and put it in baseq3. The folder structure of the contents of that file needs to match the contents of the respective .pk3, provided by ID, to make the game deviate from its norm in the way i specify?

What if i wanted to create a mod where the player selects it from the mod menu?

If i compile ioquake3 with my edited code and use pak0.pk3 for its media, will my modded changes work?
corncobman
Posts: 304
Joined: Fri Aug 08, 2003 7:00 am

Re: How to mod

Post by corncobman »

hey, while we're here, how do you change fall damage? It pisses me off falling off a giant cliff and only taking 10 damage.
I believe falling damage is in g_active.c
What about movement? Physics? Could you list more pages of possible interest?
bg_pmove.c also deals with the physics.

files you may want to look at:

g_items.c (item pickup)
g_missile.c (projectile weapons)
g_client.c (client spawning)
bg_misc.c (item definitions)
Also, i dont think i quite follow whats being implied. I create my custom .pk3 (by renaming a .zip file) and put it in baseq3. The folder structure of the contents of that file needs to match the contents of the respective .pk3, provided by ID, to make the game deviate from its norm in the way i specify?
Say in pak0.pk3 there is a file

sound/players/grunt/jump.wav

If you wanted to "replace" this in your mod you would put a file called jump.wav
into a folder called grunt, put that folder inside a folder called players and put that folder inside a folder called sound.

If you are making a standalone mod you are eventually going to have to replace all the media (or create a new folder structure entirely changing the code to match). If not, you only replace the ones as needed.
What if i wanted to create a mod where the player selects it from the mod menu?
You just create a folder for your mod in the same folder as baseq3. It's not a good idea to run mods using the mod menu, settings get overwritten and mod cvars become added where they shouldn't.

I prefer to run mods using shortcuts to quake3.exe with

+set fs_game [name of mod folder]

added to the end of the target box in the shortcut properties. It's safer.
If i compile ioquake3 with my edited code and use pak0.pk3 for its media, will my modded changes work?
Provided that you use a mod folder with the compiled .qvm files, a normal Q3 installation should work with your mod. Qvm files go in a folder called vm inside your mod .pk3 archive.
-It is not the fall that kills you. It's the sudden stop at the end. (Douglas Adams)-

[url=http://www.violationentertainment.com/misc/ccm]-An eyeful a day is bloody fantastic!-[/url]
User avatar
Foo
Posts: 13840
Joined: Thu Aug 03, 2000 7:00 am
Location: New Zealand

Re: How to mod

Post by Foo »

I don't think anyone's mentioned this yet so here goes: You cannot redistribute pak0.pk3 or any of the files within as part of a standalone q3 mod. You have to recreate the lot.

id allows you to alter and redistribute the Q3 source code but this does not cover the media.

So to distribute a standalone mod you must:
- Compile your custom quake3.exe
- Create a new pak0.pk3 containing all-new media
JB
Posts: 1030
Joined: Fri Sep 22, 2006 11:31 am

Re: How to mod

Post by JB »

So if i wanted to, right now, make a .pk3 that i can use as a mod for Quake 3, do i edit the Q3 source, or the ioq3 source that was posted earlier?
DTS
Posts: 2879
Joined: Thu Jul 13, 2000 7:00 am

Re: How to mod

Post by DTS »

JB wrote:So if i wanted to, right now, make a .pk3 that i can use as a mod for Quake 3, do i edit the Q3 source, or the ioq3 source that was posted earlier?
If you just want to change the media you don't need to change the main code. I say "main code" cause you might consider shaders and things like that code. You don't need to compile any code I mean.
User avatar
Foo
Posts: 13840
Joined: Thu Aug 03, 2000 7:00 am
Location: New Zealand

Re: How to mod

Post by Foo »

JB wrote:So if i wanted to, right now, make a .pk3 that i can use as a mod for Quake 3, do i edit the Q3 source, or the ioq3 source that was posted earlier?
The source code? Whichever you fancy. The ioq3 code is an improvement over the q3 code.
JB
Posts: 1030
Joined: Fri Sep 22, 2006 11:31 am

Re: How to mod

Post by JB »

ok, ive been playing around with the code, and made a few changes, but when i go to compile it, the .app and .exe show up but the vm folders it compiles are all empty :(
corncobman
Posts: 304
Joined: Fri Aug 08, 2003 7:00 am

Re: How to mod

Post by corncobman »

Any errors appear while compiling?
-It is not the fall that kills you. It's the sudden stop at the end. (Douglas Adams)-

[url=http://www.violationentertainment.com/misc/ccm]-An eyeful a day is bloody fantastic!-[/url]
Locked