Tremulous Forum

Mods => Mod Releases => Non-Gameplay Changing => Topic started by: Le Compilateur on June 01, 2008, 02:56:45 am

Title: Equilibrium QVM
Post by: Le Compilateur 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 (http://tremulous.net/forum/index.php?topic=8452.0).

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 (http://mercenariesguild.net/files/621080)]
[Patch 2.8 (http://mercenariesguild.net/files/413187)]

[QVM 2.7 (http://mercenariesguild.net/files/105913)]
[Patch 2.7 (http://mercenariesguild.net/files/610675)]

[QVM 2.6 (http://mercenariesguild.net/files/456166)]
[Patch 2.6 (http://mercenariesguild.net/files/900539)]

[QVM 2.5 (http://mercenariesguild.net/files/82143)]
[Patch 2.5 (http://mercenariesguild.net/files/794976)]

[QVM 2.4 (http://mercenariesguild.net/files/726214)]
[Patch 2.4 (http://mercenariesguild.net/files/327422)]

[QVM 2.3 (http://mercenariesguild.net/files/842352)]
[Patch 2.3 (http://mercenariesguild.net/files/341498)]

[QVM 2.2 (http://mercenariesguild.net/files/405334)]
[Patch 2.2 (http://mercenariesguild.net/files/616668)]

[QVM 2.1 (http://mercenariesguild.net/files/890331)]
[Patch 2.1 (http://mercenariesguild.net/files/282115)]

[QVM 2.0 (http://www.mediafire.com/?szo1twagmzg)]
[Patch 2.0 (http://www.mediafire.com/?msmn7nxb4nj)]

Miscellaneous Files:

[Sample admin.dat for use with Equilibrium QVM (http://mercenariesguild.net/files/343602)]
[Patch for enabling QVM compiling under Leopard (http://mercenariesguild.net/files/740381)] - Requires SVN r1053 or later
Title: Re: Equilibrium QVM
Post by: Rocinante on June 01, 2008, 03:45:23 am
When I first saw this, I thought wow, I didn't know Equilibrium (http://tremulous.net/forum/index.php?action=profile;u=2409) was a coder/modder :P

Some interesting balance changes you've made, I'd be curious to see how they play out.
Title: Re: Equilibrium QVM
Post by: Lakitu7 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.
Title: Re: Equilibrium QVM
Post by: googles 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 :)
Title: Re: Equilibrium QVM
Post by: Le Compilateur 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 (http://www.mediafire.com/?nmbm0bjjo1g)), I would be eternally grateful. Karma cookies might result.


Attention: outdated
Title: Re: Equilibrium QVM
Post by: Paradox 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
Title: Re: Equilibrium QVM
Post by: Le Compilateur 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
Title: Re: Equilibrium QVM
Post by: Paradox 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.
Title: Re: Equilibrium QVM
Post by: benmachine 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] (http://tremulous.net/forum/index.php?topic=4305.0)
Title: Re: Equilibrium QVM
Post by: Le Compilateur 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.
Title: Re: Equilibrium QVM
Post by: Paradox on June 03, 2008, 12:45:59 am
Didn't timbo's original "RULES" topic say no bumping?
Title: Re: Equilibrium QVM
Post by: Lakitu7 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. :)
Title: Re: Equilibrium QVM
Post by: MartinX3 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. =( =(  :( :( :(
Title: Re: Equilibrium QVM
Post by: benmachine 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 (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.
Title: Re: Equilibrium QVM
Post by: MartinX3 on June 03, 2008, 06:53:06 pm
http://svn.icculus.org/quake3?view=rev&revision=1363

It's a newer ioq3 revision
Title: Re: Equilibrium QVM
Post by: Le Compilateur 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.
Title: Re: Equilibrium QVM
Post by: Paradox on June 03, 2008, 11:26:00 pm
Geez, you release more than i do.
Title: Re: Equilibrium QVM
Post by: Le Compilateur 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. ::)
Title: Re: Equilibrium QVM
Post by: Death On Ice 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. (http://tremulous.net/forum/index.php?topic=8073.0)
Title: Re: Equilibrium QVM
Post by: Paradox 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.
Title: Re: Equilibrium QVM
Post by: Le Compilateur 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.
Title: Re: Equilibrium QVM
Post by: benmachine 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
Title: Re: Equilibrium QVM
Post by: Le Compilateur 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. ;)
Title: Re: Equilibrium QVM
Post by: _Equilibrium_ 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.
Title: Re: Equilibrium QVM
Post by: Slayer. on June 05, 2008, 03:55:41 am
You never know? Give it a try ;)
Title: Re: Equilibrium QVM
Post by: Le Compilateur on June 05, 2008, 12:14:10 pm
Thank you Equilibrium :). Sorry to have stolen your name...but it sounds cool... ;)
Title: Re: Equilibrium QVM
Post by: Le Compilateur 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.
Title: Re: Equilibrium QVM
Post by: Lakitu7 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.
Title: Re: Equilibrium QVM
Post by: Le Compilateur on June 06, 2008, 03:35:17 am
Er... I'm a noob coder so bear with me... How do I do that?
Title: Re: Equilibrium QVM
Post by: benmachine 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).
Title: Re: Equilibrium QVM
Post by: Le Compilateur on June 06, 2008, 12:22:00 pm
Fixed it. Thanks Lakitu and benmachine! It was in g_active.c.

2.1 is now ready for release.
Title: Re: Equilibrium QVM
Post by: Le Compilateur on June 07, 2008, 04:40:34 am
Version 2.2 released. Version 2.3 released soon after.
Title: Re: Equilibrium QVM
Post by: Le Compilateur on June 07, 2008, 02:10:44 pm
Version 2.4 released. Fixes bug where toggling cheats to off with !cheats would keep all cheat-using players from turning them off. All cheat flags are automatically removed if sv_cheats is 0.

Also fixed numerous small bugs with !smite.
Title: Re: Equilibrium QVM
Post by: Divmax on June 07, 2008, 03:19:52 pm
Compilateur, please apply this patch to prevent any overflows.
http://code.google.com/p/p-g-qvm/issues/detail?id=111&colspec=ID%20Type%20Status%20Priority%20Component%20Revision%20Owner%20Summary%20Milestone%20Modified (http://code.google.com/p/p-g-qvm/issues/detail?id=111&colspec=ID%20Type%20Status%20Priority%20Component%20Revision%20Owner%20Summary%20Milestone%20Modified)
Title: Re: Equilibrium QVM
Post by: Le Compilateur on June 08, 2008, 01:04:16 am
Thanks Divmax. Of course, this means I have to release yet another version. ;)
Title: Re: Equilibrium QVM
Post by: Le Compilateur on June 08, 2008, 04:53:34 am
Version 2.5 released. Adds bugfix patch and several new features.
Title: Re: Equilibrium QVM
Post by: Le Compilateur on June 10, 2008, 12:19:23 am
Released version 2.6. Adds two new admin commands and improves g_instantBuild.
Title: Re: Equilibrium QVM
Post by: Le Compilateur on June 13, 2008, 03:18:01 am
Decided to release 2.7 because I couldn't think of any new features to add.
Title: Re: Equilibrium QVM
Post by: Le Compilateur on June 15, 2008, 08:20:30 pm
2.8 released. Hope you like it, it's a landmark release since these are the last features I'm adding for a while.
Title: Re: Equilibrium QVM
Post by: Stythys on June 16, 2008, 08:46:49 pm
I can't seem to get this .qvm to work. I've tried with the arcade mod, balance mod, and base. In arcade, I get disconnected from my server with some weird bad corpseNum error, with balance I get a mismatch of client/server error, and with the base I'm unable to spawn. any help?
Title: Re: Equilibrium QVM
Post by: Le Compilateur on June 16, 2008, 08:49:01 pm
You need to be using TJW's tremded if that's any help. Get it here (http://tjw.org/tremulous/).

This is base, the corpseNum is because of using the wrong game files, same with the mismatch, and what does it say when you can't spawn? If it has a build error or a buildtimer error, your client might be incompatible — although I don't see how that's possible since this was made entirely from r1055, which should be compatible with everything.

The stock client might not work with this QVM. If that's what you're using, get the backport at http://trem.tjw.org/backport/.

P.S. Make sure you're using the latest version of Equilibrium QVM.
Title: Re: Equilibrium QVM
Post by: Stythys on June 16, 2008, 09:07:57 pm
I am using TJW's tremded, and am using the backport client.

you said the mismatch was from wrong game files? is that client or server end? and how would I go about diagnosing that?
Title: Re: Equilibrium QVM
Post by: Le Compilateur on June 16, 2008, 09:20:04 pm
You said you tried it with arcade and balance, so I'm assuming that's server-side. This QVM is for good ol' base game.

You can also try Risujin's backport (http://risujin.org/tremulous/#backport). I'm pretty sure that's the one I use, although I'm not sure.

If all else fails, get yourself a copy of SVN r1055, apply my patch, and compile a tremded. Personally, on my end, it works fine with TJW's tremded.
Title: Re: Equilibrium QVM
Post by: Stythys on June 16, 2008, 09:29:22 pm
If I compile the tremded will it work with the mods correctly? If so do you mind walking me through that?

And if not, how do I go about fixing the base. When I try and spawn as humans I just get an error saying I can't build this structure here because the surface is too steep or unsuitable to build upon.
Title: Re: Equilibrium QVM
Post by: Le Compilateur on June 16, 2008, 09:40:53 pm
It should work fine with the tremded.

1. Get and install Subversion (http://subversion.tigris.org/).
2. cd to the folder/directory where you want the source code to be.
2. Run "svn co svn://svn.icculus.org/tremulous/trunk trem-svn-1055 -r 1055".
3. You now have some source code.
4. Download the latest Equilibrium QVM patch.
5. Put it in trem-svn-1055.
6. cd to trem-svn-1055.
7. Run "patch -p0 < NAME_OF_PATCH.patch".
8. Your source code is now ready to be compiled. Run "make". After a very long list of progress, and if you did everything properly, you now have three binaries and some other things in trem-svn-1055/build/NAME_OF_PLATFORM/. What you want here is tremded.(x86/exe).

If that tremded doesn't work, use tremulous.(x86/exe) and make sure to set dedicated to 1 or 2 (1 for LAN, 2 for internet) when launching it.

If I compile the tremded will it work with the mods correctly?
No, you can't use a QVM with a mod unless it was designed for that mod. Arcade will not work with a TremX QVM and vice-versa. Since this QVM was designed for base, the simple answer to your question is no.

Your problem could also be because recent SVN is not compatible with old clients, in which case my advice to you is: get a client based on a recent revision.