DebugSetSaberMove

Forum concernant ce jeu et les serveurs que j'héberge. (ce sous-forum remplace conseiljedi.com)
Post Reply
User avatar
Niw
Posts: 4
Joined: Fri Oct 16, 2009 5:31 pm

DebugSetSaberMove

Post by Niw » Fri Oct 16, 2009 5:44 pm

Hi there,

I would like to ask about this little problem of mine. I run a server on Jedi Academy 1.00 Linux (dont ask why I dont have a 1.01 patch, I just do not want it, thank you) and there happened to appear quite a problem which I proved unable to solve.

If a client types following cmd into the game console: /debugsetsabermove x (where x is a number 1-200); it execs a debug move which is not allowed in the base game. So for instance, a player types this command and he does a move that could do only NPC Tavion in the Singeplayer mode. A single-saber wielder can perform a staff-saber special combo move etc.

Is it possible to disable clients writing this cmd into the console? Or to disable the cmd itself?

Thank you for your time and attention :)

User avatar
Gamall
Hic sunt dracones
Posts: 4145
Joined: Fri May 26, 2006 11:09 pm
Contact:

Re: DebugSetSaberMove

Post by Gamall » Fri Oct 16, 2009 11:38 pm

Hello,

The Bad:
There does not appear to be any "easy" way do disable this command.

The Good:
The code governing this console command is open: see http://www.mt-wudan.com/jkamp/g__cmds_8c.html#a64
Since it is a debug command I would have assumed there is a switch somewhere to disable all such commands in one fell swoop but I don't see anything like that in the code...

The Ugly:
This command should not exist in the first place: see g_cmds.c

Code: Select all

void ClientCommand( int clientNum ) {
...
#ifndef FINAL_BUILD
03603         else if (Q_stricmp(cmd, "debugSetSaberMove") == 0)
03604         {
03605                 Cmd_DebugSetSaberMove_f(ent);
03606         }
 
so this command should only be understood by the console if the build in not final (ie. in a debug build). So JKA 1.00 was not a final build ?!.

Given that, I think it is safe to assume that any mod out there would solve your problem, since they should be compiled as FINAL. But I have a feeling this is not a solution you are prepared to accept: people who stick to 1.00 are generally very fussy over the slightest alterations of gameplay, if I recall, and every mod brings its own, even if it is not the modder's agenda. And come to think of it, I don't even think there is an SDK for 1.00. So you're completely stuck.

So I would think your best bet would be to use an hexadecimal editor to garble the string in here "else if (Q_stricmp(cmd, "debugSetSaberMove") ", which must appear somewhere in the executable. This should be both reasonably easy to do and effective. In theory the command will still exist and be activable, but you will be the only one to know its new name.

Let me know how this works out. If you have trouble doing it I can do it for you if you post the jampgame component of your server -- it should be a 30 seconds manipulation. Of course I am assuming that you have root access on your linux server; if you don't you can't alter jampgame and my suggestions are moot. In that case you'll have to negotiate with whoever has root access.

PS/disclaimer: I have not touched JKA in a long time, and I never used 1.00 anyway, so I'm more than a little fuzzy over the differences between 1.00 and 1.01 and all that.
{<§ Gamall Wednesday Ida §>}
{ Mods and Programs - Mods TES-IV Oblivion }

User avatar
Niw
Posts: 4
Joined: Fri Oct 16, 2009 5:31 pm

Re: DebugSetSaberMove

Post by Niw » Sat Oct 17, 2009 1:32 pm

Hi :)

Thank you for your help and support. I did as you said and it worked! I managed to rewrite the name of the cmd. Firstly, I thought it would be located in "linuxjampded" executable, but while searching for the entry "debugsetsabermove" with no result a friend of mine suggested to look also into the jampgamei386.so located in the base root directory and voilá! It was there. I connected to the server and debugs are gone (cmd have been renamed).

As for the 1.00 and 1.01
The version 1.00 contains very little number of game servers listed. It may sound weird, but there's this kind of "home" background. With not so much players, you get to know a large bit of them very soon. I have played 1.00 since 2005, so I think of it as it was my "home". Furthermore, the most of the players from my country play there. For me the 1.00 has sentimental value even though I'm familiarised with all of its errors, exploits and bugs which have been fixed on 1.01.
On the other hand, 1.01 brings anonymity. Others just don't care about you. And your server gets lost among all of the others. Which I consider a big advantage as well. Additionally, you can play ESL on 1.01 ("a pro league for the skilled players").

Thanks a lot once more for your help :)

Take care

User avatar
Gamall
Hic sunt dracones
Posts: 4145
Joined: Fri May 26, 2006 11:09 pm
Contact:

Re: DebugSetSaberMove

Post by Gamall » Sat Oct 17, 2009 3:15 pm

You are welcome; glad to hear that it worked :)



PS: Yes it is in jampgame; I should have put more emphasis on that in my post, sorry. Jampded's code is not available (unfortunately). Jampded is the server component, dealing with the technical aspects of connections with the clients, while Jampgame deals with everything gameplay-related, and is open-source in its 1.01 version.
{<§ Gamall Wednesday Ida §>}
{ Mods and Programs - Mods TES-IV Oblivion }

Post Reply

Who is online

Users browsing this forum: No registered users and 118 guests