Modcraft - The community dedicated to quality WoW modding!

Wrath of the Lich King Modding => Serverside Modding => Topic started by: Sicarius on June 18, 2014, 04:59:44 pm

Title: [QUESTION] Playable factions.
Post by: Sicarius on June 18, 2014, 04:59:44 pm
Is it possible to create a third playable faction as well as editing the names of the ones that are there at the moment?
Title: Re: [QUESTION] Playable factions.
Post by: Sicarius on June 25, 2014, 09:17:38 pm
bump
Title: Re: [QUESTION] Playable factions.
Post by: Gurluas on June 26, 2014, 12:06:30 am
Technically 3.3.5 DOES support a third faction.
This was seen during the Zombie plague event.
It'd take some serious core editing and dbc editing to make a third faction playable. In fact, I don't even think the UI interface can select a third faction even if the game can run it.
Title: Re: [QUESTION] Playable factions.
Post by: Sicarius on June 28, 2014, 12:51:33 am
I suppose I could just edit the races in wow to what I want it to do
Title: Re: [QUESTION] Playable factions.
Post by: Gurluas on June 28, 2014, 06:59:57 am
Maybe..Try to experiment, this hasn't been documented.
If you find a way to enable the third faction in 3.3.5 you'd be lauded as a hero.
Title: Re: [QUESTION] Playable factions.
Post by: Supora on June 28, 2014, 10:59:08 am
I've already added third side faction as Scourge. But I don't remember what exactly I've changed in core and in client.
Here is the Screen:
(http://imageshack.com/a/img51/1419/kedk.jpg)
And look at this topic:
http://modcraft.io/viewtopic.php?f=12&t=7226
BTW I think it's impossible to add a neutral faction for players. Every new faction would be Hostile to another.
Title: Re: [QUESTION] Playable factions.
Post by: Gurluas on June 28, 2014, 12:21:00 pm
I think it is possible if the basis for that is a faction that is friendly to the player factions and the npc factions of the other races.
Title: Re: [QUESTION] Playable factions.
Post by: Supora on June 28, 2014, 01:05:35 pm
It can be frienldy with npc, but not with other players. That's what I'm talking about.
Title: Re: [QUESTION] Playable factions.
Post by: Gurluas on June 29, 2014, 04:58:46 am
Friendlyness with players is determined by the core and the player factions. Basically whatever player faction the new race uses has to be made friendly to the player factions of the other races.
It may require faction.dbc editing.
Title: Re: [QUESTION] Playable factions.
Post by: Valkryst on June 29, 2014, 06:58:23 am
Just create a new faction (you can use my tutorial) and set the player to that faction upon login or character creation. That should allow for a 'third faction'. Although this is a pure guess.
Title: Re: [QUESTION] Playable factions.
Post by: kojak488 on June 29, 2014, 04:08:15 pm
Quote from: "Valkryst"
Just create a new faction (you can use my tutorial) and set the player to that faction upon login or character creation. That should allow for a 'third faction'. Although this is a pure guess.

The player is still a horde or alliance member because what you described doesn't alter the player faction.
Title: Re: [QUESTION] Playable factions.
Post by: Supora on June 29, 2014, 05:33:35 pm
So at the end you need to add new team to shareddefines.h
Like this:
(http://img163.imageshack.us/img163/3605/ldd9.jpg)
(I've added scourge)(Team Scourge = 468 where 468 is just a faction from faction.dbc)
Then in Player.h you need to change the code from this
Code: [Select]
       TeamId GetTeamId() const { return m_team == ALLIANCE ? TEAM_ALLIANCE : TEAM_HORDE; }
        void setFactionForRace(uint8 race);
to this
Code: [Select]
  TeamId GetTeamId() const { return m_team == ALLIANCE ? TEAM_ALLIANCE : m_team == HORDE ? TEAM_HORDE : TEAM_SCOURGE; }In Player.cpp you need to change
Code: [Select]
uint32 Player::TeamForRace(uint8 race)
{
    if (ChrRacesEntry const* rEntry = sChrRacesStore.LookupEntry(race))
    {
        switch (rEntry->TeamID)
        {
            case 1: return HORDE;
            case 7: return ALLIANCE;
        }
        TC_LOG_ERROR("entities.player", "Race (%u) has wrong teamid (%u) in DBC: wrong DBC files?", uint32(race), rEntry->TeamID);
    }
    else
        TC_LOG_ERROR("entities.player", "Race (%u) not found in DBC: wrong DBC files?", uint32(race));

    return ALLIANCE;
}
to
Code: [Select]
uint32 Player::TeamForRace(uint8 race)
{
    if (ChrRacesEntry const* rEntry = sChrRacesStore.LookupEntry(race))
    {
        switch (rEntry->TeamID)
        {
            case 1: return HORDE;
   case 5: return SCOURGE;
            case 7: return ALLIANCE;
        }
        TC_LOG_ERROR("entities.player", "Race (%u) has wrong teamid (%u) in DBC: wrong DBC files?", uint32(race), rEntry->TeamID);
    }
    else
        TC_LOG_ERROR("entities.player", "Race (%u) not found in DBC: wrong DBC files?", uint32(race));

    return ALLIANCE;
}
After this you need to create two new factions(one for player and one for npc's)
I've created faction with id = 468 for npc's and then I've also created a faction for player.
Then You need to add a new race in dbc and in core.
When adding a new race you need to set up the TeamId in the 8'th column in ChrRace.dbc and player faction in the third column.

Finally I can miss something, but hope that this info could be helpful. BTW I don't fix bg's and achievements.
Title: Re: [QUESTION] Playable factions.
Post by: Supora on June 29, 2014, 07:29:10 pm
And it's doesn't possible to make players neutral in two side relationship.
Orc has 15k rep with faction 1(Player:Human) and Human is a friendly target.
But orc for human is not friendly.[attachment=1:gsqj8gih]WoWScrnShot_062914_200509.jpg[/attachment:gsqj8gih][attachment=0:gsqj8gih]WoWScrnShot_062914_200520.jpg[/attachment:gsqj8gih]

And with active PvP they all are rivals for each side(Horde and Alliance).
Title: Re: [QUESTION] Playable factions.
Post by: Steff on June 29, 2014, 10:04:49 pm
The main problems are hardcoded larts in emulator and mor bad fixed filds in dbcs for  hord and alliance
Title: Re: [QUESTION] Playable factions.
Post by: MR. Farrare on June 30, 2014, 12:32:50 pm
nice beard