Page 1 of 1

Question on factions

Posted: Wed May 11, 2016 7:12 pm
by Gangrenous
I have a question on the faction structure. I am getting somewhat close to being to at least dabble in creating the world but I am not understanding the faction structure. I see it is only two tables, I am not sure how it can be accomplished though. Lets take something somewhat simple, like an orc that could be on Crushbone faction. Of course this orc would also be KOS to players, a standard KOS mob but it has has positive and negative faction hits.

So lets say this is what the old factions were, if someone were wanting to create a custom server they may use something like the old faction values.

Factions

Crushbone Orcs (-30)
Indigo Brotherhood (-30)

Opposing Factions

Emerald Warriors (10)
Faydark's Champions (10)
Storm Guard (10)

Lets say you add new primary faction for all orcs, called maybe "Crush Bone" faction as the primary faction and do your alliances as such, you do your alliance and opposing. So how do you make the Orc KOS to the player if you do not have it's primary faction as KOS? I can understand how to make an NPC KOS, just set it's faction to 1. But if the Mob is KOS to all lower level players and it has faction hits, I am not seeing how you can accomplish this with only two tables, unless I am missing something.

Re: Question on factions

Posted: Wed May 11, 2016 8:04 pm
by Jabantiz
To make a faction KOS by default you would set its `default_level` in the `factions` table to -40,000 to -50,000. These values are client controlled and needs to be those values to show properly on the faction page. Now any mob with this faction will take a faction hit when you kill them, if you set up the `faction_alliances` table those factions will also take hits or gains depending on if they are friend or foe

Re: Question on factions

Posted: Thu May 12, 2016 6:12 am
by Gangrenous
Yep, verified working. I see what I did wrong. I had assigned the new faction at around -4000 not seeing the other zero. Then I made one kill and that put an entry under my character. Once I changed the default faction to -50000 since my entry was in for my character, well you know the rest.

I am really excited with how far the Emu has gotten. Sure I will have to make a few tweaks and plenty of Lua functions will have to be added but those are not difficult to do. I really wish the pathing was in the database, that is the biggest thing that will be time consuming. I wish there was a pathing system built into the Gui. It is not a deal breaker, just a wish.