How do I change protocol for a modded server?
#1
how i can change server protocol?

Mod edit: More explicit title
Thanks given by:
#2
What would you like to change it to? Provide more details pl0x
Thanks given by:
#3
oh , just wanna make some mod with friend
Thanks given by:
#4
good question...
I guess there is some macro in the code called PROTOCOL or PROTOCOLVERSION... i never touched this.
But it is really nice to you changing it for your mod (really honest)
Thanks given by:
#5
i found it on source code

#define PROTOCOL_VERSION 1337 // bump when protocol changes (use negative numbers for mods!)


edit: its in old ac source code
Thanks given by:
#6
[Image: untitled.JPG]

cilent protocol changed ,
but how i can change server protocol?


please someone help me :)
Thanks given by:
#7
That's a start. I mean, why would you want a modded server nobody could play on?
Thanks given by:
#8
Cause i wanna make my own mod
Thanks given by:
#9
\source\src\protocol.h
Line 8,
#define PROTOCOL_VERSION 1129           // bump when protocol changes (use negative numbers for mods!)
You can change 1129 to a negative number so normal clients can still use the /modconnect command.

These comments at the top of server.h are also useful.
#define SERVER_PROTOCOL_VERSION    (PROTOCOL_VERSION)    // server without any gameplay modification
//#define SERVER_PROTOCOL_VERSION   (-PROTOCOL_VERSION)  // server with gameplay modification but compatible to vanilla client (using /modconnect)
//#define SERVER_PROTOCOL_VERSION  (PROTOCOL_VERSION)    // server with incompatible protocol (change PROTOCOL_VERSION in file protocol.h to a negative number!)
Thanks given by:
#10
i got this error when ill try to compile with code::blocks

mingw32-make.exe: Makefile: No such file or directory
mingw32-make.exe: *** No rule to make target `Makefile'
now new errors


-------------- Build: relase in AssaultCube ---------------

Precompiling header: ..\src\cube.h
In file included from C:\Documents and Settings\aceric\My Documents\AssaultCube_v1.1\ac\source\src\cube.h:52:
C:\Documents and Settings\aceric\My Documents\AssaultCube_v1.1\ac\source\src\/protos.h:32: error: conflicting declaration 'SA_KICK'
C:\Documents and Settings\aceric\My Documents\AssaultCube_v1.1\ac\source\src\/protocol.h:54: error: 'SA_KICK' has a previous declaration as `<anonymous enum> SA_KICK'
C:\Documents and Settings\aceric\My Documents\AssaultCube_v1.1\ac\source\src\/protos.h:32: error: declaration of `SA_KICK'
C:\Documents and Settings\aceric\My Documents\AssaultCube_v1.1\ac\source\src\/protocol.h:54: error: conflicts with previous declaration `<anonymous enum> SA_KICK'
C:\Documents and Settings\aceric\My Documents\AssaultCube_v1.1\ac\source\src\/protos.h:32: error: conflicting declaration 'SA_BAN'
C:\Documents and Settings\aceric\My Documents\AssaultCube_v1.1\ac\source\src\/protocol.h:54: error: 'SA_BAN' has a previous declaration as `<anonymous enum> SA_BAN'
C:\Documents and Settings\aceric\My Documents\AssaultCube_v1.1\ac\source\src\/protos.h:32: error: declaration of `SA_BAN'
C:\Documents and Settings\aceric\My Documents\AssaultCube_v1.1\ac\source\src\/protocol.h:54: error: conflicts with previous declaration `<anonymous enum> SA_BAN'
C:\Documents and Settings\aceric\My Documents\AssaultCube_v1.1\ac\source\src\/protos.h:32: error: conflicting declaration 'SA_REMBANS'
C:\Documents and Settings\aceric\My Documents\AssaultCube_v1.1\ac\source\src\/protocol.h:54: error: 'SA_REMBANS' has a previous declaration as `<anonymous enum> SA_REMBANS'
C:\Documents and Settings\aceric\My Documents\AssaultCube_v1.1\ac\source\src\/protos.h:32: error: declaration of `SA_REMBANS'
C:\Documents and Settings\aceric\My Documents\AssaultCube_v1.1\ac\source\src\/protocol.h:54: error: conflicts with previous declaration `<anonymous enum> SA_REMBANS'
C:\Documents and Settings\aceric\My Documents\AssaultCube_v1.1\ac\source\src\/protos.h:32: error: conflicting declaration 'SA_MASTERMODE'
C:\Documents and Settings\aceric\My Documents\AssaultCube_v1.1\ac\source\src\/protocol.h:54: error: 'SA_MASTERMODE' has a previous declaration as `<anonymous enum> SA_MASTERMODE'
C:\Documents and Settings\aceric\My Documents\AssaultCube_v1.1\ac\source\src\/protos.h:32: error: declaration of `SA_MASTERMODE'
C:\Documents and Settings\aceric\My Documents\AssaultCube_v1.1\ac\source\src\/protocol.h:54: error: conflicts with previous declaration `<anonymous enum> SA_MASTERMODE'
C:\Documents and Settings\aceric\My Documents\AssaultCube_v1.1\ac\source\src\/protos.h:32: error: conflicting declaration 'SA_AUTOTEAM'
C:\Documents and Settings\aceric\My Documents\AssaultCube_v1.1\ac\source\src\/protocol.h:54: error: 'SA_AUTOTEAM' has a previous declaration as `<anonymous enum> SA_AUTOTEAM'
C:\Documents and Settings\aceric\My Documents\AssaultCube_v1.1\ac\source\src\/protos.h:32: error: declaration of `SA_AUTOTEAM'
C:\Documents and Settings\aceric\My Documents\AssaultCube_v1.1\ac\source\src\/protocol.h:54: error: conflicts with previous declaration `<anonymous enum> SA_AUTOTEAM'
C:\Documents and Settings\aceric\My Documents\AssaultCube_v1.1\ac\source\src\/protos.h:32: error: conflicting declaration 'SA_FORCETEAM'
C:\Documents and Settings\aceric\My Documents\AssaultCube_v1.1\ac\source\src\/protocol.h:54: error: 'SA_FORCETEAM' has a previous declaration as `<anonymous enum> SA_FORCETEAM'
C:\Documents and Settings\aceric\My Documents\AssaultCube_v1.1\ac\source\src\/protos.h:32: error: declaration of `SA_FORCETEAM'
C:\Documents and Settings\aceric\My Documents\AssaultCube_v1.1\ac\source\src\/protocol.h:54: error: conflicts with previous declaration `<anonymous enum> SA_FORCETEAM'
C:\Documents and Settings\aceric\My Documents\AssaultCube_v1.1\ac\source\src\/protos.h:32: error: conflicting declaration 'SA_GIVEADMIN'
C:\Documents and Settings\aceric\My Documents\AssaultCube_v1.1\ac\source\src\/protocol.h:54: error: 'SA_GIVEADMIN' has a previous declaration as `<anonymous enum> SA_GIVEADMIN'
C:\Documents and Settings\aceric\My Documents\AssaultCube_v1.1\ac\source\src\/protos.h:32: error: declaration of `SA_GIVEADMIN'
C:\Documents and Settings\aceric\My Documents\AssaultCube_v1.1\ac\source\src\/protocol.h:54: error: conflicts with previous declaration `<anonymous enum> SA_GIVEADMIN'
C:\Documents and Settings\aceric\My Documents\AssaultCube_v1.1\ac\source\src\/protos.h:32: error: conflicting declaration 'SA_MAP'
C:\Documents and Settings\aceric\My Documents\AssaultCube_v1.1\ac\source\src\/protocol.h:54: error: 'SA_MAP' has a previous declaration as `<anonymous enum> SA_MAP'
C:\Documents and Settings\aceric\My Documents\AssaultCube_v1.1\ac\source\src\/protos.h:32: error: declaration of `SA_MAP'
C:\Documents and Settings\aceric\My Documents\AssaultCube_v1.1\ac\source\src\/protocol.h:54: error: conflicts with previous declaration `<anonymous enum> SA_MAP'
C:\Documents and Settings\aceric\My Documents\AssaultCube_v1.1\ac\source\src\/protos.h:32: error: conflicting declaration 'SA_RECORDDEMO'
C:\Documents and Settings\aceric\My Documents\AssaultCube_v1.1\ac\source\src\/protocol.h:54: error: 'SA_RECORDDEMO' has a previous declaration as `<anonymous enum> SA_RECORDDEMO'
C:\Documents and Settings\aceric\My Documents\AssaultCube_v1.1\ac\source\src\/protos.h:32: error: declaration of `SA_RECORDDEMO'
C:\Documents and Settings\aceric\My Documents\AssaultCube_v1.1\ac\source\src\/protocol.h:54: error: conflicts with previous declaration `<anonymous enum> SA_RECORDDEMO'
C:\Documents and Settings\aceric\My Documents\AssaultCube_v1.1\ac\source\src\/protos.h:32: error: conflicting declaration 'SA_STOPDEMO'
C:\Documents and Settings\aceric\My Documents\AssaultCube_v1.1\ac\source\src\/protocol.h:54: error: 'SA_STOPDEMO' has a previous declaration as `<anonymous enum> SA_STOPDEMO'
C:\Documents and Settings\aceric\My Documents\AssaultCube_v1.1\ac\source\src\/protos.h:32: error: declaration of `SA_STOPDEMO'
C:\Documents and Settings\aceric\My Documents\AssaultCube_v1.1\ac\source\src\/protocol.h:54: error: conflicts with previous declaration `<anonymous enum> SA_STOPDEMO'
C:\Documents and Settings\aceric\My Documents\AssaultCube_v1.1\ac\source\src\/protos.h:32: error: conflicting declaration 'SA_CLEARDEMOS'
C:\Documents and Settings\aceric\My Documents\AssaultCube_v1.1\ac\source\src\/protocol.h:54: error: 'SA_CLEARDEMOS' has a previous declaration as `<anonymous enum> SA_CLEARDEMOS'
C:\Documents and Settings\aceric\My Documents\AssaultCube_v1.1\ac\source\src\/protos.h:32: error: declaration of `SA_CLEARDEMOS'
C:\Documents and Settings\aceric\My Documents\AssaultCube_v1.1\ac\source\src\/protocol.h:54: error: conflicts with previous declaration `<anonymous enum> SA_CLEARDEMOS'
C:\Documents and Settings\aceric\My Documents\AssaultCube_v1.1\ac\source\src\/protos.h:32: error: conflicting declaration 'SA_SERVERDESC'
C:\Documents and Settings\aceric\My Documents\AssaultCube_v1.1\ac\source\src\/protocol.h:54: error: 'SA_SERVERDESC' has a previous declaration as `<anonymous enum> SA_SERVERDESC'
C:\Documents and Settings\aceric\My Documents\AssaultCube_v1.1\ac\source\src\/protos.h:32: error: declaration of `SA_SERVERDESC'
C:\Documents and Settings\aceric\My Documents\AssaultCube_v1.1\ac\source\src\/protocol.h:54: error: conflicts with previous declaration `<anonymous enum> SA_SERVERDESC'
C:\Documents and Settings\aceric\My Documents\AssaultCube_v1.1\ac\source\src\/protos.h:32: error: conflicting declaration 'SA_SHUFFLETEAMS'
C:\Documents and Settings\aceric\My Documents\AssaultCube_v1.1\ac\source\src\/protocol.h:54: error: 'SA_SHUFFLETEAMS' has a previous declaration as `<anonymous enum> SA_SHUFFLETEAMS'
Process terminated with status 1 (0 minutes, 10 seconds)
50 errors, 0 warnings
Thanks given by:
#11
I guess you have some headers set incorrectly.
Maybe try using VC++ (Express) instead of CB, the project that comes with AC worked fine for me.
Thanks given by:
#12
so , how i can compile with vc++?
Thanks given by:
#13
Raver i think you want to start a mod right?
well in that case you need to have all the skills needed to start it and complete it,
then if someone decides to help you, you'll finish earlier, but if u cant manage to compile it i dont see how you could manage to finish it...

sry for being "pessimistic" (if that's a word) but you have to discover that kind of stuff by yourself... google is your friend for that things.
Thanks given by:
#14
okey:D
Thanks given by:
#15
Put the .vcproj or whatever project file located in /source/vcpp into Visual C++. Edit the appropriate code, then click "Batch Build" chose Win32 Standalone and Release (both). Every time you want to update you have to click "rebuild". There you go.
Thanks given by:
#16
(27 Jul 10, 01:33PM)Gibstick Wrote: Put the .vcproj or whatever project file located in /source/vcpp into Visual C++. Edit the appropriate code, then click "Batch Build" chose Win32 Standalone and Release (both). Every time you want to update you have to click "rebuild". There you go.





Thanks Gibstick !:)

that helped me :)



(luv ya 4 3v3r !)
Thanks given by:
#17
[3D][Raver] you do know that if you want to base your own game off the AssaultCube project that the zlib license requires you to replace ALL media?!? You can't use the models, textures, maps or sounds without the original authors' explicit permission.
You also really need to change the address of the masterserver and provide one for your project yourself.
And you should probably pick some other default ports, to avoid confusion.
Thanks given by:
#18
yeah , i know that
Thanks given by:
#19
so , protocol changed , now one question :/

void respawn()
{

health = 1000;
armour = 1000;
gunselect = false;
akimbo = false;
loopi(NUMGUNS) ammo[i] = mag[i] = gunwait[i] = 0;
ammo[GUN_KNIFE] = mag[GUN_KNIFE] = 1;
}



how i can change health for only one team , like CLA
Thanks given by:
#20
Good luck with your modding :]
Thanks given by:
#21
Please someone :D!
Thanks given by:
#22
i dont like the sound of what you are trying to do.
as kirin said, if you cant do basics dont try to do so much and read some!
Thanks given by:
#23
Alright, let me be honest. If you really really want to make a mod, only a handful of people here would be helpful. The rest just discourages you. Don't forget that this is mainly a gaming forum, not a programmer's forum.

Anyways, the reason you can't do it there is that "playerstate" doesn't store the data about which team the player is on. "playerent" which is a derived class from "playerstate" is the one you should be looking for.

In the same file (entity.h) scroll down further and you should be able to find the class "playerent". There, you can find the respawn function:

void respawn()
    {
        dynent::reset();
        playerstate::respawn();
        history.reset();
        if(weaponsel) weaponsel->reset();
        lastaction = 0;
        lastattackweapon = NULL;
        attacking = false;
        weaponchanging = 0;
        resetspec();
        eardamagemillis = 0;
        eyeheight = maxeyeheight;
        curskin = nextskin[team_base(team)];
    }

Over there, insert this:

if (team == TEAM_CLA || team == TEAM_CLA_SPECT)
health = 2000;

By what you're trying to do, I'm guessing you're doing a zombie mod. Am I right? ;)
Thanks given by:
#24
Thanks leezh :)

your right :D
so , it should look like this:)?

void respawn()
{
dynent::reset();
playerstate::respawn();
history.reset();
if(weaponsel) weaponsel->reset();
lastaction = 0;
lastattackweapon = NULL;
attacking = false;
weaponchanging = 0;
resetspec();
eardamagemillis = 0;
eyeheight = maxeyeheight;
curskin = nextskin[team_base(team)];
if (team == TEAM_CLA || team == TEAM_CLA_SPECT)
health = 2000;
}
Thanks given by:
#25
Right now I'm using library computers and the trouble in setting up a build environment is not worth it as the settings reset each restart.

But why don't you compile and test it out yourself? :)
Thanks given by: