Poll

Le Compilateur should...

...give this project the most effort he can.
...try reasonably hard but not break his back over it.
...leave coding to the professionals.

Author Topic: Equilibrium QVM  (Read 42833 times)

Le Compilateur

  • Posts: 315
  • Turrets: +14/-19
Equilibrium QVM
« on: June 01, 2008, 02:56:45 am »
I've transferred ownership of this project to Bomb, who is a close friend of mine. He has much more experience with C. You can find the new project thread here.

I've been working on a new Tremulous QVM. It includes modifications for balancing gameplay and making everyone's lives easier. It's designed to be a "standard" QVM, meaning one for people who don't want to be stuck with something like TJW's stock QVM, don't want to have to manage a "crazy" QVM, and don't want to learn C/C++ and compile their own.

My knowledge of C and its derivatives is not what you would call extensive, so chances are there are going to be a lot of versions before I get everything right.

Based on SVN r1055.

Upcoming Features:
- !togglepause pauses or unpauses the game.
- /getadmin sets the user to getadminLevel, provided they enter getadminPassword properly.

Current Features:
- /stats displays statistics for both you and your team, as well as a rough indicator of skill for each.
- !say displays an anonymous message. Useful for hiding your true identity.
- Aliens with override turned on regenerate twice as fast.
- !override gives you various special admin priveleges, including unlimited stamina, the ability to buy ammo anywhere, and free weapons/upgrades/evolution.
- !givefunds and !takefunds (can't use either on yourself).
- !tkprotect prevents a player from being teamkilled. Reverse it with !untkprotect.
- !adminlog shows a log of all recent admin command usage.
- !tklog shows a log of all recent teamkills.
- Less spam written to the server console during map changes.
- !denyvote prevents a player from calling votes. Reverse it with !allowvote.
- !tame prevents a player from doing damage. Reverse it with !untame.
- !legalize turns off a player's cheats.
- !cheattest tests a player to see which cheats they are using.
- !denycheat prevents a player from using /god, /noclip, /notarget, or /give. Reverse it with !allowcheat.
- !cheats lets you toggle cheats on or off without using /devmap or !devmap.
- !terminate severs a player's connection to the server.
- !smite instakills a player.
- !print prints a message to everyone.
- Various useful admin commands.
- Aliens can evolve in their base even if humans are nearby.
- When you get killed, your killer's HP is shown.
- You can't vote-kick players who are in the process of connecting.
- You can vote to put someone on the spectator team.
- If your client is outdated, a notice telling you where to get TJW's backport client is displayed.
- Newline parser in cp. "\n" is a new line, "\\" is "\".
- URL download redirection.
- Suicide time changed to 5.

- g_dretchPunt and g_friendlyFireMovementAttacks.
- g_connectNotice is displayed to clients when they successfully connect. Toggle this functionality on or off with g_showConnectNotice.
- If g_allowMultipleRepeaters is set to 1, you can build repeaters in powered areas.
- If g_allowMultipleHovels is set to 1, you can have more than one hovel.
- If g_repeatersNoExplode is set to 1, repeaters don't self-destruct after having no dependents for 90 seconds.
- g_instantSuicide makes suicide instant if set to 1.
- g_instantBuild. It has four modes:
    0 (default): standard building
    1: instant building and disabled buildtimer
    2: instant building
    3: disabled buildtimer

If there are any bugs (or blatant coding errors), please tell me! Thanks in advance.

Releases:

[QVM 2.8]
[Patch 2.8]

[QVM 2.7]
[Patch 2.7]

[QVM 2.6]
[Patch 2.6]

[QVM 2.5]
[Patch 2.5]

[QVM 2.4]
[Patch 2.4]

[QVM 2.3]
[Patch 2.3]

[QVM 2.2]
[Patch 2.2]

[QVM 2.1]
[Patch 2.1]

[QVM 2.0]
[Patch 2.0]

Miscellaneous Files:

[Sample admin.dat for use with Equilibrium QVM]
[Patch for enabling QVM compiling under Leopard] - Requires SVN r1053 or later
« Last Edit: June 23, 2008, 03:02:48 am by Le Compilateur »
I'm a developer! If you'd like to contribute to the Equilibrium QVM project or download the latest version, please visit this thread.

QVMs now compile under Leopard; get the patch here. Requires SVN r1053 or later.

Rocinante

  • Posts: 642
  • Turrets: +252/-668
    • My Homepage
Re: Equilibrium QVM
« Reply #1 on: June 01, 2008, 03:45:23 am »
When I first saw this, I thought wow, I didn't know Equilibrium was a coder/modder :P

Some interesting balance changes you've made, I'd be curious to see how they play out.
}MG{Mercenaries Guild
"On my ship, the Rocinante, wheeling through the galaxies, headed for the heart of Cygnus, headlong into mystery." -- Rush, "Cygnus X-1"

Lakitu7

  • Tremulous Developers
  • *
  • Posts: 1002
  • Turrets: +120/-73
Re: Equilibrium QVM
« Reply #2 on: June 01, 2008, 03:59:09 am »
Same. It's a rather confusing name, indeed, when people tend to name QVMs after themselves and Equilibrium is a very well known player.

googles

  • Posts: 219
  • Turrets: +30/-19
Re: Equilibrium QVM
« Reply #3 on: June 01, 2008, 09:07:16 am »
The features sound cool, hope to see it soon. Remember to change the qvm_version to your QVM's :)

Le Compilateur

  • Posts: 315
  • Turrets: +14/-19
Re: Equilibrium QVM
« Reply #4 on: June 01, 2008, 12:38:06 pm »
Ooh, I didn't know there was a player named Equilibrium. But anyway, thanks for the support! :)

*sigh* Unfortunately, I have neither the time nor the expertise to compile it properly (if only QVM compiling on Leopard weren't broken :'(). If one of you Linux/Windows dudes would like to compile it for me (source code here), I would be eternally grateful. Karma cookies might result.


Attention: outdated
« Last Edit: June 02, 2008, 02:35:41 am by Le Compilateur »
I'm a developer! If you'd like to contribute to the Equilibrium QVM project or download the latest version, please visit this thread.

QVMs now compile under Leopard; get the patch here. Requires SVN r1053 or later.

Paradox

  • Posts: 2612
  • Turrets: +253/-250
    • Paradox Designs
Re: Equilibrium QVM
« Reply #5 on: June 02, 2008, 12:37:16 am »
Comp, what revision did you use?

If its newer than 61, you wanna change the info in g_main.c for the qvm_version cvar

∧OMG ENTROPY∧

Le Compilateur

  • Posts: 315
  • Turrets: +14/-19
Re: Equilibrium QVM
« Reply #6 on: June 02, 2008, 02:03:11 am »
I based it on r61, so I edited QVM_VERSION to say "1.0 - SVN r61". Was I supposed to do that?

Attention: outdated
« Last Edit: June 02, 2008, 02:35:31 am by Le Compilateur »
I'm a developer! If you'd like to contribute to the Equilibrium QVM project or download the latest version, please visit this thread.

QVMs now compile under Leopard; get the patch here. Requires SVN r1053 or later.

Paradox

  • Posts: 2612
  • Turrets: +253/-250
    • Paradox Designs
Re: Equilibrium QVM
« Reply #7 on: June 02, 2008, 11:33:19 pm »
Quote from: Le Compilateur
Sorry for the double post but I really gotta bump this topic.
Bumping is STRICTLY against the rules, and usually results in a ban. You dont see other people doing it, dont do it yourself.

∧OMG ENTROPY∧

benmachine

  • Posts: 915
  • Turrets: +99/-76
    • ben's machinery
Re: Equilibrium QVM
« Reply #8 on: June 02, 2008, 11:47:29 pm »
Unfortunately, my computer will not compile QVMs :'(. If you would like to try this for me, I will be eternally grateful (and you will probably get a karma cookie as well).
http://svn.icculus.org/quake3?view=rev&revision=1326
http://svn.icculus.org/quake3?view=rev&revision=1327

Code: [Select]
svn diff -r 1325:1327 svn://svn.icculus.org/quake3/trunk/ | patch -p0
That should get you started :) (forgive any silly mistakes, I'm writing that command from memory)

In addition: lol, mediafire. Try www.mercenariesguild.net/files/

Bumping is STRICTLY against the rules, and usually results in a ban. You dont see other people doing it, dont do it yourself.
[citation needed]
« Last Edit: June 02, 2008, 11:49:09 pm by benmachine »
benmachine

Le Compilateur

  • Posts: 315
  • Turrets: +14/-19
Re: Equilibrium QVM
« Reply #9 on: June 02, 2008, 11:50:54 pm »
Bumping's against the rules? Grr... Well, I've never been one to ignore the rules. Although, as benmachine said, [citation needed].

What's wrong with MediaFire?

I don't know what to do with the links you gave me, I don't know how to merge them with the current Makefile. If it helps any, here is the entire Terminal output when I run make on Source 1.0 (using the Makefile that came with Tremulous SVN r966):
Code: [Select]
make -C src/tools/lcc install
install -s -m 0755 build-darwin-x86/q3lcc ../
install -s -m 0755 build-darwin-x86/q3cpp ../
install -s -m 0755 build-darwin-x86/q3rcc ../
make -C src/tools/asm install
install -s -m 0755 q3asm ../

Building Tremulous in build/release-darwin-x86:
  CC: cc

  CFLAGS:
    -Wall
    -Wimplicit
    -Wstrict-prototypes
    -mstackrealign
    -fno-strict-aliasing
    -DMACOS_X
    -fno-common
    -pipe
    -gfull
    -DUSE_OPENAL=1
    -DUSE_CURL=1
    -DUSE_CURL_DLOPEN=1
    -DUSE_SDL_VIDEO=1
    -DUSE_SDL_SOUND=1
    -D_THREAD_SAFE=1
    -Isrc/SDL12/include
    -DUSE_LOCAL_HEADERS=1
    -MMD
    -DSVN_VERSION="1.1.0_SVN966M"
    -DNDEBUG
    -march=prescott
    -mfpmath=sse
    -ffast-math
    -falign-loops=16

  Output:
    build/release-darwin-x86/tremded.x86
    build/release-darwin-x86/tremulous.x86
    build/release-darwin-x86/tremulous-smp.x86
    build/release-darwin-x86/base/cgamex86.dylib
    build/release-darwin-x86/base/gamex86.dylib
    build/release-darwin-x86/base/uix86.dylib
    build/release-darwin-x86/base/vm/cgame.qvm
    build/release-darwin-x86/base/vm/game.qvm
    build/release-darwin-x86/base/vm/ui.qvm

DED_CC src/server/sv_client.c
DED_CC src/server/sv_ccmds.c
DED_CC src/server/sv_game.c
DED_CC src/server/sv_init.c
DED_CC src/server/sv_main.c
DED_CC src/server/sv_net_chan.c
DED_CC src/server/sv_snapshot.c
DED_CC src/server/sv_world.c
DED_CC src/qcommon/cm_load.c
DED_CC src/qcommon/cm_patch.c
DED_CC src/qcommon/cm_polylib.c
DED_CC src/qcommon/cm_test.c
DED_CC src/qcommon/cm_trace.c
DED_CC src/qcommon/cmd.c
DED_CC src/qcommon/common.c
DED_CC src/qcommon/cvar.c
DED_CC src/qcommon/files.c
DED_CC src/qcommon/md4.c
DED_CC src/qcommon/msg.c
DED_CC src/qcommon/net_chan.c
DED_CC src/qcommon/huffman.c
DED_CC src/qcommon/parse.c
DED_CC src/qcommon/q_math.c
DED_CC src/qcommon/q_shared.c
DED_CC src/qcommon/unzip.c
DED_CC src/qcommon/vm.c
DED_CC src/qcommon/vm_interpreted.c
DED_CC src/unix/linux_signals.c
DED_CC src/unix/unix_main.c
src/unix/unix_main.c:1364:2: warning: #warning Sys_BinName not implemented
DED_CC src/unix/unix_net.c
src/unix/unix_net.c: In function ‘NET_GetLocalAddress’:
src/unix/unix_net.c:438: error: ‘OSIOCGIFADDR’ undeclared (first use in this function)
src/unix/unix_net.c:438: error: (Each undeclared identifier is reported only once
src/unix/unix_net.c:438: error: for each function it appears in.)
make[2]: *** [build/release-darwin-x86/ded/unix_net.o] Error 1
make[1]: *** [targets] Error 2
make: *** [release] Error 2
It doesn't appear to have compiled anything, there are no QVMs to be seen :'(.

*sigh* I am sad, I have no idea where to cd to before running the svn diff command.
« Last Edit: June 03, 2008, 12:14:41 am by Le Compilateur »
I'm a developer! If you'd like to contribute to the Equilibrium QVM project or download the latest version, please visit this thread.

QVMs now compile under Leopard; get the patch here. Requires SVN r1053 or later.

Paradox

  • Posts: 2612
  • Turrets: +253/-250
    • Paradox Designs
Re: Equilibrium QVM
« Reply #10 on: June 03, 2008, 12:45:59 am »
Didn't timbo's original "RULES" topic say no bumping?

∧OMG ENTROPY∧

Lakitu7

  • Tremulous Developers
  • *
  • Posts: 1002
  • Turrets: +120/-73
Re: Equilibrium QVM
« Reply #11 on: June 03, 2008, 09:24:20 am »
I would say that it's linking whatever unix libraries, while you're actually building on a mac. The errors you're getting are outside any of the files that you modified, so it's your environment and not what you've actually done to the code (though you may well start finding errors in that once you get past these).

I can't really help you with that, though Benmachine is the resident mac compiling guy around here. I think I may have seen a guide floating around, even. I know that you need to be running make-macosx-ub.sh instead of regular make, but past that I'm sorry to say you've picked the only platform of the 3 that I haven't set up. :)

MartinX3

  • Guest
Re: Equilibrium QVM
« Reply #12 on: June 03, 2008, 03:10:35 pm »
I tried to compile it.
Can't.
Every time when I want to compile i get errors at the end. =(
Have windows. =( =(  :( :( :(

benmachine

  • Posts: 915
  • Turrets: +99/-76
    • ben's machinery
Re: Equilibrium QVM
« Reply #13 on: June 03, 2008, 03:11:00 pm »
I know that you need to be running make-macosx-ub.sh instead of regular make,

Not unless you want a universal binary, which doesn't affect QVMs.

I now remember, though, that the SVN revision on which Lakitu's QVM is based will not compile on Leopard without a bunch of other fixes. I don't really have the time to track all these down, so I'm going to try to give you the tools to fix it yourself.
Here's the svn diff command:
Code: [Select]
svn diff -rREV1:REV2 URL > patchfile.patchThat will take the differences from URL between REV1 and REV2 and put them in patchfile.patch. The URL for ioq3's SVN repository is:
Code: [Select]
svn://svn.icculus.org/quake3/trunk/Here's the ioq3 revision history:
http://svn.icculus.org/quake3?view=rev&revision=1237
or you can checkout the source for ioq3 and use the svn log command, which might be faster.
Use the arrows by the Go button to scroll through revisions and find things that might be important to you, then use the svn diff command with URL as svn://svn.icculus.org/quake3/ to get a patchfile for that revision, which you should then be able to apply to your source.
Note that ioq3 stores its source in code/ not src/, so you can either rename the tremulous source directory (put it back afterwards, please) or use
Code: [Select]
patch -d src -p1(that is, strip the code/ part of the paths off the patch and change to directory src, then do the patch)
to tell patch where to find the source files. This isn't necessary for Makefile patches.

The revision in the link I gave you will solve the specific error you gave, but it's likely to be more complicated than that. I'm afraid this won't be easy, but it should be more than possible.
« Last Edit: June 03, 2008, 03:12:40 pm by benmachine »
benmachine

MartinX3

  • Guest
Re: Equilibrium QVM
« Reply #14 on: June 03, 2008, 06:53:06 pm »

Le Compilateur

  • Posts: 315
  • Turrets: +14/-19
Re: Equilibrium QVM
« Reply #15 on: June 03, 2008, 08:15:29 pm »
Thanks benmachine, I will try what you suggested.

In the meantime, would it be possible to get a later revision (one that will compile on Leopard) and manually add Lakitu's changes, or is that going to be virtually impossible for a novice coder such as myself?

Or maybe I could track down some individual patches and use those so I have more control over the features I want.

Well, I abandoned 1.x and moved on to 2.0. This is based on SVN r1055.
« Last Edit: June 15, 2008, 12:27:59 am by Le Compilateur »
I'm a developer! If you'd like to contribute to the Equilibrium QVM project or download the latest version, please visit this thread.

QVMs now compile under Leopard; get the patch here. Requires SVN r1053 or later.

Paradox

  • Posts: 2612
  • Turrets: +253/-250
    • Paradox Designs
Re: Equilibrium QVM
« Reply #16 on: June 03, 2008, 11:26:00 pm »
Geez, you release more than i do.

∧OMG ENTROPY∧

Le Compilateur

  • Posts: 315
  • Turrets: +14/-19
Re: Equilibrium QVM
« Reply #17 on: June 04, 2008, 12:09:35 am »
I know. That's because I keep coming up with new features immediately after I post a new release. ::)
« Last Edit: June 04, 2008, 01:32:59 am by Le Compilateur »
I'm a developer! If you'd like to contribute to the Equilibrium QVM project or download the latest version, please visit this thread.

QVMs now compile under Leopard; get the patch here. Requires SVN r1053 or later.

Death On Ice

  • Posts: 1287
  • Turrets: +126/-141
Re: Equilibrium QVM
« Reply #18 on: June 04, 2008, 02:47:49 am »
I know. That's because I keep coming up with new features immediately after I post a new release. ::)
And almost as much as Impulse, of Impulse's HUD.

Paradox

  • Posts: 2612
  • Turrets: +253/-250
    • Paradox Designs
Re: Equilibrium QVM
« Reply #19 on: June 04, 2008, 03:10:22 am »
I know. That's because I keep coming up with new features immediately after I post a new release. ::)
Thats why you do SVN my friend.
Then you can make at least a "boilerplate" release monthly, and release other times when big updates are made.

∧OMG ENTROPY∧

Le Compilateur

  • Posts: 315
  • Turrets: +14/-19
Re: Equilibrium QVM
« Reply #20 on: June 04, 2008, 03:19:56 am »
Don't worry, I don't think I'll be releasing another version of Equilibrium QVM for a while.
I'm a developer! If you'd like to contribute to the Equilibrium QVM project or download the latest version, please visit this thread.

QVMs now compile under Leopard; get the patch here. Requires SVN r1053 or later.

benmachine

  • Posts: 915
  • Turrets: +99/-76
    • ben's machinery
Re: Equilibrium QVM
« Reply #21 on: June 04, 2008, 02:04:31 pm »
If you're now basing off revision 1055, you should only need one patch to make it Leopard-compatible - the diff between ioq3 revisions 1325 and 1327. From your Makefile directory:
Code: [Select]
svn diff -r1325:1327 svn://svn.icculus.org/quake3/trunk/ | patch -d src -p1
benmachine

Le Compilateur

  • Posts: 315
  • Turrets: +14/-19
Re: Equilibrium QVM
« Reply #22 on: June 04, 2008, 09:20:20 pm »
Ah, thank you. This is one of the reasons for basing it on an earlier SVN; I saw a post from someone, I forget who, who said it's impossible/very difficult to compile QVMs before r1053.

=== After Using ===

I did what you said but I did it as two separate commands. Since the ioq3 patch references code/ and not src/, I found it easier to get the patch, diddle around with the paths, and then apply it. I screwed up the first time (thank the Lord for Time Machine!).

Anyway...

IT WORKED! Thank you!! You get a fresh karma chip cookie for your help. ;)
« Last Edit: June 04, 2008, 09:41:30 pm by Le Compilateur »
I'm a developer! If you'd like to contribute to the Equilibrium QVM project or download the latest version, please visit this thread.

QVMs now compile under Leopard; get the patch here. Requires SVN r1053 or later.

_Equilibrium_

  • Posts: 1845
  • Turrets: +96/-89
Re: Equilibrium QVM
« Reply #23 on: June 05, 2008, 02:53:22 am »
Yeah, just saying "Balance QVM" would have been boring. Equilibrium is a much spicier word. :D


And responding to the couple early posts in this thread, me trying to code would a disaster. This guy looks like he knows what he's doing. I wish you luck with your QVM development.
« Last Edit: June 05, 2008, 02:54:56 am by _Equilibrium_ »

Slayer.

  • Posts: 120
  • Turrets: +11/-23
Re: Equilibrium QVM
« Reply #24 on: June 05, 2008, 03:55:41 am »
You never know? Give it a try ;)

Le Compilateur

  • Posts: 315
  • Turrets: +14/-19
Re: Equilibrium QVM
« Reply #25 on: June 05, 2008, 12:14:10 pm »
Thank you Equilibrium :). Sorry to have stolen your name...but it sounds cool... ;)
I'm a developer! If you'd like to contribute to the Equilibrium QVM project or download the latest version, please visit this thread.

QVMs now compile under Leopard; get the patch here. Requires SVN r1053 or later.

Le Compilateur

  • Posts: 315
  • Turrets: +14/-19
Re: Equilibrium QVM
« Reply #26 on: June 06, 2008, 03:06:10 am »
As of 2.0 distribution version and 2.1 development version, everything is working great. Just one problem: why doesn't the armory window update when you buy/sell something?

Please pardon the double post.
I'm a developer! If you'd like to contribute to the Equilibrium QVM project or download the latest version, please visit this thread.

QVMs now compile under Leopard; get the patch here. Requires SVN r1053 or later.

Lakitu7

  • Tremulous Developers
  • *
  • Posts: 1002
  • Turrets: +120/-73
Re: Equilibrium QVM
« Reply #27 on: June 06, 2008, 03:15:44 am »
As of 2.0 distribution version and 2.1 development version, everything is working great. Just one problem: why doesn't the armory window update when you buy/sell something?


Based on SVN r1055.

Quote from: Tremulous SVN log
------------------------------------------------------------------------
r1028 | tma | 2007-10-30 11:18:47 -0700 (Tue, 30 Oct 2007) | 27 lines

* (bug 3384) Remove server side armoury refresh and replace with UI side
  refresh

'need to "backport" out that change if you're going to use svn revisions that have it.

Le Compilateur

  • Posts: 315
  • Turrets: +14/-19
Re: Equilibrium QVM
« Reply #28 on: June 06, 2008, 03:35:17 am »
Er... I'm a noob coder so bear with me... How do I do that?
I'm a developer! If you'd like to contribute to the Equilibrium QVM project or download the latest version, please visit this thread.

QVMs now compile under Leopard; get the patch here. Requires SVN r1053 or later.

benmachine

  • Posts: 915
  • Turrets: +99/-76
    • ben's machinery
Re: Equilibrium QVM
« Reply #29 on: June 06, 2008, 11:34:08 am »
Find the change in the changelog
http://svn.icculus.org/tremulous?view=rev&revision=1028
and undo it (look further down the page for a trunk/src/game/g_whatever.c change and click "text changed"... if it's removing something that looks important, put it back).
benmachine