1
\$\begingroup\$

I was browsing through how to mod a game (Urban Terror, a Quake 3 mod). I found that it can be done by editing .qvm files in the game. Under the file named zpak000.pk3. That file contains other files named

ui.qvm
qagame.qvm
cgame.qvm

But I can't find a way in which I can edit these files.

\$\endgroup\$
10
\$\begingroup\$

You create qvm files using the c-compiler in the Quake SDK.

You can't edit QVM files.

(You could technically modify them using a hex editor, in the same way that you can modify other compiled programs, but this is not useful for your purposes.)

\$\endgroup\$
  • \$\begingroup\$ U know urban terror is a mod of quacke 3. And from where can i get that The modded sdk ? \$\endgroup\$ – kritya Jul 22 '11 at 16:16
  • 1
    \$\begingroup\$ You don't need a "modded" SDK. Urban terror uses the SDK that ID Software provides. You can't edit the QVM files that the Urban Terror modders produced, as I've already said. \$\endgroup\$ – Olhovsky Jul 22 '11 at 18:16
  • 3
    \$\begingroup\$ To clarify on Olhovsky's comment: to modify Urban Terror, you'll probably need to get your hands on the source code that the devs used to compile the QVMs. That probably means contacting them and asking for it, unless they've released it. \$\endgroup\$ – Gregory Avery-Weir Jul 22 '11 at 20:00
  • \$\begingroup\$ @Olhovsky There is (was?) plethora of mods for Urban Terror. Most of the mod-developers used "qvm" disassemblers; many of which, I know, where written by the mod-developers them self in a long night. Those disassemblers were used to locate specific procedures, so that the mod-devs could overwrite them. Also, Urban Terror doesn't use the original quake SDK. In fact, they use their own version, called ioQuake SDK, which is open source. \$\endgroup\$ – LaVolpe Jan 27 '17 at 0:19
  • \$\begingroup\$ @GregoryAvery-Weir The engine "ioQuake" is open source on GitHub. See here. \$\endgroup\$ – LaVolpe Jan 27 '17 at 0:23
0
\$\begingroup\$

There are basically 2 ways to "mod a mod". Either you get hands on the original source code or you have to delve into the blackbox.

Since the source of Urban Terror is closed-source (except for the engine; which is a fork of the Quake 3 engine, called ioQuake 3), you have to 'delve' into the blackbox.

This involves using a disassembler, which is able to process them .qvm's binary data and yields the assembler logic of the mod. Using this, one is able to make modifications. The "workflow" is quite comparable to "cracking" existing software: Disassemble the binary. Find the instructions of interest overwritte them.

On the links posted below, you'll find a small guide and a disassembler.

It is important to notice, that the License of the game prohibits ANY modifications.

EDIT: I answered this when I was 14, the original answer isn't good. But left here "historical" reasons.

Well, never heared about google :) ?

Look at game-deception it explains how to modificate a qvm (' after it has been compiled '). It just over-compile the certain lines / commands. The only problem ( for you ) is, that you have to work with opcodes ( / assembler ). Well, here's the tutorial made by the great macpunk : http://www.gamedeception.net/threads/19198-Runtime-QVM-Modification

> vmHeader_t *hook_VM_LoadQVM( vm_t *vm, qboolean alloc )
> 
> {
> 
> vmHeader_t *ret = orig_VM_LoadQVM(vm, alloc);
> 
> if(!strcmp(vm->name, "cgame")
> 
> {
> 
>     vm->instructionPointers[0x0FF5E7] = 0x00; //0x00 is the opcode of whatever you want the instruction to be
> 
> }
> 
> return ret; }

You need to Quake3 Engine SDK for the structs.

\$\endgroup\$
-7
\$\begingroup\$

Edit them with a hex editor downloaded somewhere from the 'net.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.