This is a read only copy without any forum functionality of the old Modcraft forum.
If there is anything that you would like to have removed, message me on Discord via Kaev#5208.
Big thanks to Alastor for making this copy!

Menu

Author Topic: [QUESTION] Playable factions.  (Read 2773 times)

Sicarius

  • Registred Member
  • BLP Convertor
  • *****
  • Posts: 11
    • View Profile
[QUESTION] Playable factions.
« 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?
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Sicarius

  • Registred Member
  • BLP Convertor
  • *****
  • Posts: 11
    • View Profile
Re: [QUESTION] Playable factions.
« Reply #1 on: June 25, 2014, 09:17:38 pm »
bump
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Gurluas

  • Contributors
  • Creator of Worlds
  • *****
  • Posts: 344
    • View Profile
Re: [QUESTION] Playable factions.
« Reply #2 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.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Sicarius

  • Registred Member
  • BLP Convertor
  • *****
  • Posts: 11
    • View Profile
Re: [QUESTION] Playable factions.
« Reply #3 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
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Gurluas

  • Contributors
  • Creator of Worlds
  • *****
  • Posts: 344
    • View Profile
Re: [QUESTION] Playable factions.
« Reply #4 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.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Supora

  • Registred Member
  • Wiki Incarnate
  • *****
  • Posts: 143
    • View Profile
Re: [QUESTION] Playable factions.
« Reply #5 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:

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.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Gurluas

  • Contributors
  • Creator of Worlds
  • *****
  • Posts: 344
    • View Profile
Re: [QUESTION] Playable factions.
« Reply #6 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.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Supora

  • Registred Member
  • Wiki Incarnate
  • *****
  • Posts: 143
    • View Profile
Re: [QUESTION] Playable factions.
« Reply #7 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.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Gurluas

  • Contributors
  • Creator of Worlds
  • *****
  • Posts: 344
    • View Profile
Re: [QUESTION] Playable factions.
« Reply #8 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.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Valkryst

  • Moderators
  • Model Change Addict
  • *****
  • Posts: 224
    • View Profile
    • http://valkryst.com/blog/
Re: [QUESTION] Playable factions.
« Reply #9 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.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »
MY BLOG IS NOW HERE.

kojak488

  • Registred Member
  • Creator of Worlds
  • *****
  • Posts: 351
    • View Profile
Re: [QUESTION] Playable factions.
« Reply #10 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.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Supora

  • Registred Member
  • Wiki Incarnate
  • *****
  • Posts: 143
    • View Profile
Re: [QUESTION] Playable factions.
« Reply #11 on: June 29, 2014, 05:33:35 pm »
So at the end you need to add new team to shareddefines.h
Like this:

(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.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Supora

  • Registred Member
  • Wiki Incarnate
  • *****
  • Posts: 143
    • View Profile
Re: [QUESTION] Playable factions.
« Reply #12 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).
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Steff

  • Administrator
  • Creator of Worlds
  • *****
  • Posts: 4551
    • View Profile
Re: [QUESTION] Playable factions.
« Reply #13 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
« Last Edit: January 01, 1970, 01:00:00 am by Admin »
Please mark as solved if solved.
Don't ask if you could ask a question... JUST ask the Question.
You can send me also offline messages. I will answer if I get online.
Skype: project.modcraft
Discord: steff#6954

MR. Farrare

  • Registred Member
  • Creator of Worlds
  • *****
  • Posts: 963
    • View Profile
Re: [QUESTION] Playable factions.
« Reply #14 on: June 30, 2014, 12:32:50 pm »
nice beard
« Last Edit: January 01, 1970, 01:00:00 am by Admin »