Zombie problem and global database

Hello everyone,

If you always play Tremulous, you’ve probably seen that we opened back X, W and Z servers from XserverX.
But we have got two problems :

First, we need XserverX database to make all the globals command work (!gban, !gmute, !ghandicap), we also need the zombie database to record the stats of the players. Database is not shared in the source code of these servers, so please if you have it tell me.

Secondly, we’ve got a big problem in the Z server. The zombies are counted as players and not as bots. We need to restart every game because we can’t join a team. That’s very embarassing and if you know how to fix it, it would be so nice of you.

Thanks for your help guys!


I’m not very familiar with the source code for X, W, and Z (I only browsed the Z code a bit when I was implementing the grenade launcher and the ckit side arm for 1.3’s swirl mode), it might help if you posted a link to the versions of the source code of those QVM’s you are using. Also are you using the tremded for X, W, Z? Again I"m not familiar with hosting those servers, but I do know that you need their custom tremded for the database support. I believe this should be it: https://github.com/AlienHoboken/Tremulous-xserverx-tremded

As a disclaimer, I’m not yet familiar with databases. But in the readme to the above repo it does say that you should have both MySQL and the MySQL development libraries installed before building the tremded. Also you would have to look up the instructions for how to setup a MySQL server.

As for the problem with bots and slots, it is better to take the approach in the ioquake3 code for bots, and handle that part of the bots in the tremded. For reference check out this file:

In particular the function SV_BotAllocateClient(). That first for loop checks to make sure that a slot is definitely free by checking to see if the client’s state is CS_FREE. Since you are using a QVM, you would also have to setup a new trap call for that function to be called inside the game QVM:

And you might call it like this:


Hi @dGr8LookinSparky,

Thanks for your very detailed answer. As you said, I’m using the same xserverx tremded for all of the servers (X, W and Z) > https://github.com/AlienHoboken/Tremulous-xserverx-tremded

For Z we use the github QVM from that same user : https://github.com/AlienHoboken/Tremulous-Z-Server

Also, for the mysql database, I forgot to say that we succeed connecting it to the servers, but for example, when I !gban a user, he is banned from the game and it should insert one row in the database “globals” (I created this table myself and I don’t know if the structure is correctly setted up). But the table “globals” stills empty so if I reboot the server, the user will be able to join it again. Whereas if I insert into the table a row, when I !glist in the server it will appear. This is very weird.

For the problem with the slots, thank you again for all the time you took to answer me, but I don’t understand this type of langage (C)… This is embarassing, I don’t know how to fix that even with your explanations.

Thanks again


@Zkimi , as I understand it, @IronClaw has been helping you with the development, be sure to direct him to my above post about the bot slots, and if he has any questions, or comes across any errors while implementing that improvement, he can post here.

Regarding the database issue, again I’m not yet familiar with databases (it sounds like you might know more than me in that area actually), and I haven’t setup/run an xserverx server before, so I can’t say if it is an issue in the code or in your setup, or both. So I’m afraid that I can’t help you much with that issue, perhaps someone else can. Have you noticed if the database has been correctly updating for any of is uses?


@dGr8LookinSparky, absolutely IronClaw helped us. I will tell him about what you said :slight_smile:

For the database, it’s okay, you tried to help me and that’s very kind of you. If anyone reading this post have the database of xserverx servers, it would be great to share it with me.

Thanks again :stuck_out_tongue:


Did you add proper permissions to the user used by your server?

When creating a user you should have something like this.
Make sure you give the proper permissions. (Note that you can also just create the user and alter the permission per database instead of general permissions like I did below.)

I’m not super good with mysql, but I messed with it enough to maybe think the problem you have right now is because your server doesn’t have enough permissions or the table structure wasn’t done correctly.

(You should have a primary key which should be the ID usually and the ID should be auto-incremental and unique. :slight_smile:)
Example of what I did:
(But truly, it all depends how you and IronClaw set your database structure.)



I don’t know if you’re french, I saw on one of your tutorials that your screen is on french / J’ai vu que sur un de tes tutos que l’un de tes screens était en français.

I will speak english but tell me if you’re french. So my database is not in localhost, not installed on the gameserver. I use a hosting website for the database, I don’t know if it’s the problem.

The database is hosted on alwaysdata. Maybe the website does not grant all the permission to the user.

Thanks for your reply!


What I mean is that your database should allow you to create users. And if you can’t well, setting a local database might be easier and better. Is your server hosted on a VPS or a Dedicated?

If your database is hosted on a free hosting service, it might be the cause.

What I would suggest you to try is to setup a simple mysql server locally and see if it works/fix anything.

But yea. You should always have access to creating users on your own database. If they blocked that, well, it might be time to look for a better host :stuck_out_tongue:

Ps. And yes I’m french, but no worries I understand english pretty well :stuck_out_tongue:


Je préfères parler en français, je suis plus à l’aise.

Nous sommes hébergés sur VPS, on va tenter d’installer un serveur mysql et se connecter puis je te tiens au courant, merci encore d’essayer de nous aider :wink:

Mais c’est vrai que c’est une possibilité j’avais pas pensé a ce que l’hébergeur puisse restreindre des droits à l’utilisateur.



Pas de probleme ^^’ (Deso pour pas d’accents, clavier setup en englais :stuck_out_tongue:)



On a essayé ce matin, et toujours rien.

Quand on me !gmute in game, je suis mute et j’apparais dans !glist mais dans la base de donnée aucune ligne. Pareil quand on restart le serveur je n’apparais plus dans !glist puisqu’il récupère les ligne de la BDD mais vu qu’elle est vide il y a rien et donc je suis de-mute (pareil pour un changement de map ou un deco-reco).

J’en viens donc à penser qu’il n’y a pas de problème de liaison entre la BDD et le serveur parce qu’à chaque démarrage il apparaît dans la console “MySQL Loaded 5.1” ou encore “MySQL connect to localhost in 2 seconds” mais une problème dans la structure de la BDD.

Je l’ai structurée au pif, je sais pas du tout si c’est comme ça qu’il faut s’y prendre mais la voici :

C’est pour ça que si quelqu’un à celle de xserverx ce serait vraiment sympa de la partager.

Merci encore.


We tried this morning, and nothing.

When someone !gmute me, i’m mute and I appear in the !glist but there is no row in the database. Same when we restart the server, I no longer appear in the !glist because the server’s fetch the database rows but the problem is that there is no row! That’s why I’m unmute (same for map changement or disconnect and reconnect).

So I think there is no connection problem with the database and the server because on each start of the server, it appears in the console : “MySQL Loaded 5.1” or “MySQL connect to localhost in 2 seconds”. I think it’s a problem from the structure of the DB.

I did the structure randomly:


Also, to create this structure I help myself with the github source as you can see :

And also I forgot to say that I put credentials of the mysql server here :


Ok so we finally did it! The database is now fully connected to the servers! The structure wasn’t correctly set. That’s why the server couldn’t insert a row.

Btw we always have that zombie bot bug :x You can try it by joining our Z server.


Be sure to point @IronClaw to my post recommending how a fix can be implemented, I’m pretty sure my recommendation should address that zombie bot behavior :slight_smile: .


Glad this could be fixed that fast ^^. But yea, such problem often gets fixed by trial and error.

But from now on you should know more how to set up a database generally. (Usually all the same configuration on any other game or software using it.)


@Zkimi , you should try longer names for your Z, W, and X servers, they aren’t showing up in the 1.3 client’s server browser, and I think that might be related to those servers having only a single letter for their name.

@dGr8LookinSparky Thanks for the advice, we tried to name it exactly as the old ones from xserverx. Also, we added in front of the letters Z, W and X some specials symbols. You can’t see them on tremfusion, but on the basic trem client you should see them. You can also notice that we can see these servers on : Real-time Tremulous Listings for Master Server master.tremulous.net



It is just that on the 1.3 client they are not listed, and trying to connect directly with the 1.3 client to the ip and port yeilds the error:

Bad challenge for challengeResponse. Ignored.

From what I have heard, tremfusion can connect? I haven’t tried it myself yet though, and I don’t know if those servers are listed in the server browser on tremfusion. @StarlightGlimmer indicated to me that he was able to connect to those servers with tremfusion , but he got the same connection error as me if he tried connecting with the 1.3 client. I was able to connect to your servers before they had more than a single character in their name.

I suspect that it might be the length of server name that is leading to the connection error, as I recall @DevHC mentioning that he may have added a provision to discourage the use of single letter server names.

If that is the cause of this issue, if you were to make the server names longer (something like what you had before), more players could access your servers as a decent percentage of the current trem population does use the 1.3 client. I understand the idea of wanting to use the same exact name as the old servers for the brand value and/or nostalgia, but really with the current state of the community, I don’t think you would get less players from changing the names a bit (you could still keep the same color formatted single letters as part of the names of course).

Anyways, that is my recommendation for perhaps getting more players. The other thing is, if using a longer name still doesn’t correct the connection issue for the 1.3 clients, that would help us with finding an issue to fix with the 1.3 client.


Please don’t @Sayori me on this topic.

1 Like

Oh alright, I did changed the name of the servers. Can you tell me if you can see them now on 1.3 client?

Thanks :stuck_out_tongue: