Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

[help] rotation base

Initiate Mage
Joined
Aug 20, 2019
Messages
9
Reaction score
0
Could someone help me to put rotation base in each round?
Would someone make the code available?
 
Initiate Mage
Joined
Aug 20, 2019
Messages
9
Reaction score
0
I don't believe it.

I know the sources have it, but I would like to know which source, and the exact location I should look for.I'm not good with programming, so I'm asking for support.I know it's easy for anyone who messes with it.But if anyone can collaborate, I appreciate it.
 
Upvote 0
Experienced Elementalist
Joined
Oct 14, 2015
Messages
290
Reaction score
83
I know the sources have it, but I would like to know which source, and the exact location I should look for.I'm not good with programming, so I'm asking for support.I know it's easy for anyone who messes with it.But if anyone can collaborate, I appreciate it.

I believe that there is no such thing in any published source so far.
 
Upvote 0
Initiate Mage
Joined
Aug 20, 2019
Messages
9
Reaction score
0
Can you show a video of the feature?

I can't, but I can explain it better.
For example on the Mansion map, in round 1 you are born in the base blue.
When the round ends and round 2 begins, you are born in the base red.
And so on.

Or on the Garden map, in the first round you spawn on top, and on the second round you spawn on the bottom.
In the third round you will be born on top again.
 
Upvote 0
Experienced Elementalist
Joined
Oct 14, 2015
Messages
290
Reaction score
83
The gunz that are currently active all have the base rotation.
If most other servers have base rotation and because the developer of each server has developed their own code.
 
Upvote 0
Junior Spellweaver
Joined
Feb 2, 2012
Messages
157
Reaction score
53
I can't, but I can explain it better.
For example on the Mansion map, in round 1 you are born in the base blue.
When the round ends and round 2 begins, you are born in the base red.
And so on.

Or on the Garden map, in the first round you spawn on top, and on the second round you spawn on the bottom.
In the third round you will be born on top again.

So if I'm understanding you, this is for Team matches?
 
Upvote 0
Banned
Banned
Joined
Jun 26, 2012
Messages
254
Reaction score
10
If most other servers have base rotation and because the developer of each server has developed their own code.

I agree with what you say.



The gunz that are currently active all have the base rotation.

It is not obvious, contact programming services and ask for this in exchange for money or other things, in my case I bought it and asked for services for that and other things.
 
Upvote 0
I'm retired, I'm already
Banned
Joined
Oct 3, 2011
Messages
832
Reaction score
155
Could someone help me to put rotation base in each round?
Would someone make the code available?

Are you looking for this?


This is not public and I doubt that it is public, if you are lucky enough that someone does you a favor it would be fine but I am afraid I will not do it, I no longer have the interest to contribute anything in this section, there is a boy who made a publication which says to be willing to help people here I leave the post.

https://forum.ragezone.com/f311/help-thread-post-helped-1200864/

He knows a lot of people who are good at this, I'm sure he will ask for the support of those people to help you.
 
Last edited:
Upvote 0
Junior Spellweaver
Joined
Feb 2, 2012
Messages
157
Reaction score
53
Are you looking for this?


This is not public and I doubt that it is public, if you are lucky enough that someone does you a favor it would be fine but I am afraid I will not do it, I no longer have the interest to contribute anything in this section, there is a boy who made a publication which says to be willing to help people here I leave the post.

https://forum.ragezone.com/f311/help-thread-post-helped-1200864/

He knows a lot of people who are good at this, I'm sure he will ask for the support of those people to help you.

Thank you for the visual aid Jork. I think I see what he wants.
 
Upvote 0
Initiate Mage
Joined
Oct 28, 2019
Messages
7
Reaction score
1
Go to ZMatch.cpp and locate the method InitCharactersPosition
Replace the first if with this one:

Code:
if (this->IsTeamPlay()) 
{
    int nSpawnIndex[2] = { 0, 0 };
    for (auto const& pair : ZGetGame()->m_CharacterManager)
    {
        auto pCharacter = pair.second;
        const auto teamId = pCharacter->GetTeamID();

        if (teamId == MMT_RED || teamId == MMT_BLUE)
        {
            auto teamIndex = teamId % MMT_RED;
            if (this->GetCurrRound() % 2 == 0)
            {
                teamIndex = teamIndex == 0 ? 1 : 0;
            }

            if (auto pSpawnData = ZGetGame()->GetMapDesc()->GetSpawnManager()->GetTeamData(teamIndex, nSpawnIndex[teamIndex]))
            {
                pCharacter->SetPosition(pSpawnData->m_Pos);
                pCharacter->SetDirection(pSpawnData->m_Dir);
                nSpawnIndex[teamIndex]++;
            }
       }
    }
    return;
}

Obs: I wrote using Notepad++, so I haven't tested it. It's just a base and probably won't work properly with custom game modes (eg. CTF) unless you do a few changes. You also might want to add an option to turn this on / off.
 
Last edited:
Upvote 0
I'm retired, I'm already
Banned
Joined
Oct 3, 2011
Messages
832
Reaction score
155
Go to ZMatch.cpp and locate the method InitCharactersPosition
Replace the first if with this one:

Code:
if (this->IsTeamPlay()) 
{
    int nSpawnIndex[2] = { 0, 0 };
    for (auto const& pair : g_pGame->m_CharacterManager)
    {
        auto pCharacter = pair.second;
        const auto teamId = pCharacter->GetTeamID();

        if (teamId == MMT_RED || teamId == MMT_BLUE)
        {
            auto teamIndex = teamId % MMT_RED;
            if (this->GetCurrRound() % 2 == 0)
            {
                teamIndex = teamIndex == 0 ? 1 : 0;
            }

            if (auto pSpawnData = g_pGame->GetMapDesc()->GetSpawnManager()->GetTeamData(teamIndex, nSpawnIndex[teamIndex]))
            {
                pCharacter->SetPosition(pSpawnData->m_Pos);
                pCharacter->SetDirection(pSpawnData->m_Dir);
                nSpawnIndex[teamIndex]++;
            }
       }
    }
    return;
}

Obs: I wrote using Notepad++, so I haven't tested it. It's just a base and probably won't work properly with custom game modes (eg. CTF) unless you do a few changes. You also might want to add an option to turn this on / off.

This is definitely not going to work, it looks like for a source code version 2007 or possibly refined gunz.
 
Upvote 0
Initiate Mage
Joined
Oct 28, 2019
Messages
7
Reaction score
1
This is definitely not going to work, it looks like for a source code version 2007 or possibly refined gunz.

Nop, . Just tested and it does what OP asked, and no, I didn't use refined, but a random source that I've found in the Gunz Repo. It's true that it's not from a 1.5 source, but no matter, since the only thing that changed in the InitCharactersPosition method was the way how ZGame is accessed (it uses ZGetGame() instead of g_pGame).
 
Upvote 0
I'm retired, I'm already
Banned
Joined
Oct 3, 2011
Messages
832
Reaction score
155
Nop, . Just tested and it does what OP asked, and no, I didn't use refined, but a random source that I've found in the Gunz Repo. It's true that it's not from a 1.5 source, but no matter, since the only thing that changed in the InitCharactersPosition method was the way how ZGame is accessed (it uses ZGetGame() instead of g_pGame).

I am aware of that change, you just have to make it work for Clan War, Team Match and do it as a switch in Stage Setting to activate it, it is very easy.
 
Upvote 0
Initiate Mage
Joined
Oct 28, 2019
Messages
7
Reaction score
1
I am aware of that change, you just have to make it work for Clan War, Team Match and do it as a switch in Stage Setting to activate it, it is very easy.

I think I didn't make myself clear in my previous reply, so I'll try again. The code I posted is working and is specifically for team matches. Since clan war is a team match game mode, I can't see why it wouldn't work on that mode either. The only thing that is really missing is the switch to enable/disable the base rotation in the stage and clan war matches. Although it is fairly simple to do, I don't feel like doing it since there is already a tutorial demonstrating how to mess with stage options, which anyone could base themselves on.
 
Upvote 0
I'm retired, I'm already
Banned
Joined
Oct 3, 2011
Messages
832
Reaction score
155
I think I didn't make myself clear in my previous reply, so I'll try again. The code I posted is working and is specifically for team matches. Since clan war is a team match game mode, I can't see why it wouldn't work on that mode either. The only thing that is really missing is the switch to enable/disable the base rotation in the stage and clan war matches. Although it is fairly simple to do, I don't feel like doing it since there is already a tutorial demonstrating how to mess with stage options, which anyone could base themselves on.

It is a good explanation but I already have this done a couple of months ago but this information will be useful for many who seek this method.

td8lsdd - [help] rotation base - RaGEZONE Forums
 

Attachments

You must be registered for see attachments list
Upvote 0
Back
Top